Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update asciidoc to changed upstream source and build for python2.7 + python3 #946

Merged
merged 2 commits into from
Feb 2, 2023

Conversation

dhomeier
Copy link
Contributor

asciidoc has silently replaced its 8.6.10 sources to (mostly) python3 syntax (#909 (comment)), breaking in turn a few statements not supported in 2.7.
This PR is conditionally applying one patch to restore python2.7 support for those, and another to apply the missing py3 updates (system python3 on 12+ unfortunately does not come with 2to3, so including the output as a patch).
The testasciidoc.py update command still fails on 2.7 with a number of exceptions which I have not tried to fix, rather skipping it; on 12.6 I could only test the python3 variant without the proper TestDepends (which do not build on arm64 yet).

Alternatively we might dist-restrict the update to 12.0, 13.0 and try to use the older version for python 2 – have all tests been passing for that one?

@nieder
Copy link
Member

nieder commented Jan 19, 2023

I don't have the original tarball to see how it's building/passing on 10.14.6 and our mirrors don't have it either. Do you have a copy of the original that I can grab?

@dhomeier
Copy link
Contributor Author

This is the old 8.6.10 (also found an 8.6.9, but that is > 8 years old):
asciidoc-8.6.10.tar.gz

@dhomeier
Copy link
Contributor Author

On my old 10.14.6 installation all 202 tests are reported as PASSED, although I see a bunch if messages like

music2png.py: failed command: abc2ly -o "/private/var/tmp/fink.build/asciidoc-8.6.10-1/asciidoc-8.6.10/tests/data/tmpmsFPfQ.ly" "/private/var/tmp/fink.build/asciidoc-8.6.10-1/asciidoc-8.6.10/tests/data/tmpmsFPfQ.abc" 2>/dev/null
music2png.py: failed command: lilypond --png -o "/private/var/tmp/fink.build/asciidoc-8.6.10-1/asciidoc-8.6.10/tests/data/tmp3wv8gW" "/private/var/tmp/fink.build/asciidoc-8.6.10-1/asciidoc-8.6.10/tests/data/tmp3wv8gW.ly" 2>/dev/null
PASSED: html4: tests/data/filters-test-html4.html

With the new 8.6.10 source, all those are SKIPPED, possibly because testasciidoc.py update is now broken for python2.

On 13.2 strangely, although the missing source-highlight is reported, all 202 tests are now passing as well (not quite there at building the TestDepends "The following 203 additional packages will be installed"...)

@dhomeier
Copy link
Contributor Author

As the 9.1.1 version from upstream builds pretty much out of the box with python3, I might push a dist-restricted (to 11.0-13.0?) asciidoc-9.1.1 update. Backporting that to python2 is becoming rather unfeasible, so we could try to pin the original 8.6.10 source for the Distribution: < 11.0 version.

@nieder
Copy link
Member

nieder commented Jan 27, 2023

Since the package hardcodes the python version used, we'll either need to split .info files according to /usr/bin/python[2.7|3], or switch to using a Fink python. Benefit of using a Fink python3 is that everyone will get the latest asciidoc.

Pulling in @clepple since it his package.

@nieder
Copy link
Member

nieder commented Jan 27, 2023

On 10.14.5 (/usr/bin/python2.7) with your original 8.6.10 tarball:

TOTAL PASSED:  202
phase test: passed

@clepple
Copy link
Contributor

clepple commented Jan 27, 2023

To be honest, I haven't had time to do much with Fink recently, so I should probably not be listed as a maintainer anymore. My main interest here was getting the build dependencies set up for the NUT package (and macOS+USB in userspace is getting harder, but that's another story). We can easily work around whatever py2/py3 invocation is needed in the NUT autoconf scripts.

Please split the info file as needed to comply with Fink policy about py2/3 dependencies.

@dhomeier
Copy link
Contributor Author

Since the package hardcodes the python version used, we'll either need to split .info files according to /usr/bin/python[2.7|3], or switch to using a Fink python. Benefit of using a Fink python3 is that everyone will get the latest asciidoc.

Both work now with their respective system pythons, but upgrading to 10.x will probably require an installation into %p/lib/pythonNN/site-packages. Drawback is perhaps that we then have to decide which of the currently supported 3.x Pythons to select, or drag them all along.

@dhomeier
Copy link
Contributor Author

dhomeier commented Feb 1, 2023

As there have been comments in favour of getting the updated version from upstream where possible, I have now split the package into python3 and python2 versions. The latter needs a copy of the original 8.6.10 source and passes all tests without patches; 9.1.1 also passes all tests on 13.2 (some are skipped in both, even with graphviz and source-highlight installed).
This mainly needs a safe source path for https://github.com/fink/fink-distributions/files/10504438/asciidoc-8.6.10.tar.gz, and confirmation if python3 is indeed available on all 11.0 systems (I think on 10.15 it needed extra action to install via Xcode) – should work even with 3.8, as the Python code is not very special.

@nieder
Copy link
Member

nieder commented Feb 1, 2023

I've uploaded the original python2 version of asciidoc-8.6.10 to our SourceForge space since upstream already silently changed it once. The following should work in the Source field for the older version only:

Source: mirror:sourceforge:fink/%n-%v.tar.gz

For confirmation,
SHA1: 53b9c916bb4e29d2a4b850446be070ef81dcd792
SHA256: 9e52f8578d891beaef25730a92a6e723596ddbd07bfe0d2a56486fcf63a0b983

@dhomeier
Copy link
Contributor Author

dhomeier commented Feb 1, 2023

Thanks, just tested a fresh download, and it got it already from one of the sf mirrors!
Interestingly it seems to have just returned from the dead lately: #123

Copy link
Member

@nieder nieder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested and passed tests on 10.14.6 and 12.6

10.9-libcxx/stable/main/finkinfo/text/asciidoc-py2.patch Outdated Show resolved Hide resolved
@nieder nieder merged commit 573669c into fink:master Feb 2, 2023
@nieder
Copy link
Member

nieder commented Feb 2, 2023

py310 is available everywhere, so if we move up to a pymod in the 10.x series, we can use that until someone asks for another variant.

@dhomeier dhomeier deleted the asciidoc-2-pythons branch February 2, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants