Here is an ebuild update for www-apps/trac-1.0.1 to support the new distutils-r1 eclass. Here is the change list : - Move to EAPI 5 - Move to distutils-r1 ( restrict to python{2_6,2_7} and one single implementation for binary files) - SLOT DEPENDs - Remove python:2.5 from RDEPEND as now mask in tree, #480070 - Remove dev-python/pysqlite from RDEPEND as remove from tree, #408835 - Don't install cgi and fcgi as-is, but use python_doscript to fix shebangs - Add test IUSE and add needed DEPEND, replace with python_test() for new eclass usage, but still fail src_test return me this at the moment ====================================================================== ERROR: test_unicode_branches (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 155, in setUp self._git('config', 'user.name', u"Joé") File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git cwd=self.repos_path) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings ====================================================================== ERROR: test_unicode_filename (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 155, in setUp self._git('config', 'user.name', u"Joé") File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git cwd=self.repos_path) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings ====================================================================== ERROR: test_unicode_tags (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 155, in setUp self._git('config', 'user.name', u"Joé") File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git cwd=self.repos_path) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings ====================================================================== ERROR: test_unicode_verifyrev (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 155, in setUp self._git('config', 'user.name', u"Joé") File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git cwd=self.repos_path) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception TypeError: execv() arg 2 must contain only strings ====================================================================== FAIL: runTest (trac.wiki.tests.functional.ReStructuredTextWikiTest) Render reStructured text using a wikiprocessor ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/wiki/tests/functional.py", line 106, in runTest tc.find(r'<h1[^>]*>Hello') File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/tests/functional/better_twill.py", line 204, in better_find raise twill.errors.TwillAssertionError(*args) TwillAssertionError: ("no match to '<h1[^>]*>Hello'", '/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/testenv/trac/log/ReStructuredTextWikiTest.html') ====================================================================== FAIL: runTest (trac.wiki.tests.functional.ReStructuredTextCodeBlockTest) Render reStructured code block ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/wiki/tests/functional.py", line 125, in runTest tc.notfind("code-block") File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/trac/tests/functional/better_twill.py", line 212, in better_notfind raise twill.errors.TwillAssertionError(*args) TwillAssertionError: ("match to 'code-block'", '/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/testenv/trac/log/ReStructuredTextCodeBlockTest.html') Reproducible: Always
Created attachment 356648 [details] www-apps/trac/trac-1.0.1.ebuild www-apps/trac/trac-1.0.1.ebuild
Created attachment 356650 [details, diff] trac-1.0.1.ebuild-distutils-r1.diff Diff from ebuild in portage tree with previous attachement
(In reply to Bertrand Jacquin from comment #1) > Created attachment 356648 [details] > www-apps/trac/trac-1.0.1.ebuild > > www-apps/trac/trac-1.0.1.ebuild This ebuild also drop KEYWORDS ~ppc64 ~sparc and move to ~amd64 ~x86 and ~ppc as : amd64 does not have stable dev-python/Babel with python-r1 amd64 does not have stable dev-python/twill with python-r1 ppc does not have stable dev-python/Babel with python-r1 ppc does not have stable dev-python/mysql-python with python-r1 ppc does not have stable dev-python/psycopg with python-r1 ppc does not have stable dev-python/twill with python-r1 ppc does not have stable dev-python/lxml with python-r1 ppc64 does not have stable dev-python/Babel with python-r1 ppc64 does not have stable dev-python/mysql-python with python-r1 ppc64 does not have stable dev-python/psycopg with python-r1 ppc64 does not have stable dev-python/twill with python-r1 ppc64 does not have stable dev-python/lxml with python-r1 sparc does not have stable dev-python/twill with python-r1 x86 does not have stable dev-python/Babel with python-r1 x86 does not have stable dev-python/twill with python-r1
Created attachment 356652 [details, diff] trac.initd-var-run.diff This patch also move /var/run to /run
Thanks for giving this such a thorough look. Some comments. - I'm not sure I see the value in these slot depends. Why do we need them? If we don't, I'd rather not have them. - I think we should be able to use something like PYTHON_USE_WITH="sqlite" rather than the convoluted python[sqlite] dependencies. - For now, >=Babel-1.0 seems to fail I18nDateFormatTestCase, so we should depend on older Babel (I filed https://github.com/mitsuhiko/babel/issues/51). - I'd prefer not to pull in the twill dependency while doing so causes extra test failures, so we should patch those tests (preferably upstream first). - It would be nice if you could look into the PyGIT failures.
(In reply to Dirkjan Ochtman from comment #5) > Thanks for giving this such a thorough look. Some comments. > > - I'm not sure I see the value in these slot depends. Why do we need them? > If we don't, I'd rather not have them. Recommandation from Tom Wijsman that is mentoring me. > - I think we should be able to use something like PYTHON_USE_WITH="sqlite" > rather than the convoluted python[sqlite] dependencies. Right, I discovered this yesterday working on another topic. > - For now, >=Babel-1.0 seems to fail I18nDateFormatTestCase, so we should > depend on older Babel (I filed https://github.com/mitsuhiko/babel/issues/51). > > - I'd prefer not to pull in the twill dependency while doing so causes extra > test failures, so we should patch those tests (preferably upstream first). > > - It would be nice if you could look into the PyGIT failures. Noted, will try to find some time to work on it next beginning week.
(In reply to Dirkjan Ochtman from comment #5) > - I'm not sure I see the value in these slot depends. Why do we need them? > If we don't, I'd rather not have them. It prevents the dependency from breaking when someone later slots a new version differently; also, it prevents that person from having to add the :0 later on to this reverse dependency. It guarantees that the dependency will not break; also, it will spare out unnecessary commits for the person who slotted a new version.
Looking through the ebuild, I think some [${PYTHON_USEDEP}] are missing.
Created attachment 357850 [details, diff] trac-1.0.1.ebuild-distutils-r1.diff Update from previous patch that fix missing [${PYTHON_USEDEP}], implement PYTHON_REQ_USE for sqlite. Test suite still fail, bugs open upstream http://trac.edgewall.org/ticket/11290 http://trac.edgewall.org/ticket/11291
Created attachment 357858 [details, diff] trac-1.0.1.ebuild-distutils-r1.diff Here is the change list : - Migrate to EAPI 5 - Migrate to distutils-r1 (restrict to python{2_6,2_7} and one single implementation for binary files) - SLOT DEPENDs - Remove python:2.5 from RDEPEND as now mask in tree, #480070 - Remove dev-python/pysqlite from RDEPEND as remove from tree, #408835 - Don't install cgi and fcgi as-is, but use python_doscript to fix shebangs - Add test IUSE and add needed DEPEND, replace with python_test() for new eclass usage Changes since attachement 357850 : - Use Makefile/emake to run test instead of directly calling python - Make trac.util.tests.datefmt.I18nDateFormatTestCase sucess including changesets 11684 11689 11690 11691 11712 11769 11771 11773 11776 11783 11816 11876 11892 11893 from http://svn.edgewall.org/repos/trac/branches/1.0-stable, see http://trac.edgewall.org/ticket/11290#comment:2
Created attachment 357860 [details, diff] trac-1.0.1-changeset_11684.diff
Created attachment 357862 [details, diff] files/trac-1.0.1-changeset_11684.diff
Created attachment 357864 [details, diff] files/trac-1.0.1-changeset_11689.diff
Created attachment 357866 [details, diff] files/trac-1.0.1-changeset_11690.diff
Created attachment 357868 [details, diff] files/trac-1.0.1-changeset_11691.diff
Created attachment 357870 [details, diff] files/trac-1.0.1-changeset_11712.diff
Created attachment 357872 [details, diff] files/trac-1.0.1-changeset_11769.diff
Created attachment 357874 [details, diff] files/trac-1.0.1-changeset_11771.diff
Created attachment 357876 [details, diff] files/trac-1.0.1-changeset_11773.diff
Created attachment 357878 [details, diff] files/trac-1.0.1-changeset_11776.diff
Created attachment 357880 [details, diff] files/trac-1.0.1-changeset_11783.diff
Created attachment 357882 [details, diff] files/trac-1.0.1-changeset_11816.diff
Created attachment 357884 [details, diff] files/trac-1.0.1-changeset_11876.diff
Created attachment 357886 [details, diff] files/trac-1.0.1-changeset_11892.diff
Created attachment 357888 [details, diff] files/trac-1.0.1-changeset_11893.diff
Created attachment 376934 [details] trac-1.0.1.ebuild Here is the complete ebuild
@mgorny, I added you as a CC as I see you spend some time on working on transitions to distutils-r1.
Errr.... *trac-1.0.1-r1 (22 Apr 2014) 22 Apr 2014; Michał Górny <mgorny@gentoo.org> +trac-1.0.1-r1.ebuild: Convert to distutils-r1. I think I didn't notice this bug before. Since I'm currently quite busy with multilib, could you check if I didn't miss anything you mentioned here?
(In reply to Michał Górny from comment #28) > Errr.... > > *trac-1.0.1-r1 (22 Apr 2014) > > 22 Apr 2014; Michał Górny <mgorny@gentoo.org> +trac-1.0.1-r1.ebuild: > Convert to distutils-r1. > > I think I didn't notice this bug before. Since I'm currently quite busy with > multilib, could you check if I didn't miss anything you mentioned here? That's the point of adding you ;) No pressure at all about time ! I can imagine your current work load. Here is the difference : - Drop python2_6 support - Add support for FEATURES=test (with the tons of patches needed for that) - Use python_doscript while installing cgi files - Use webapp_pkg_postinst to add some infos for users
Ah, sorry for staying away from this bug for so long. I don't really want to incorporate most of these changes. I particularly don't want to port 14 patches over just to get the test suite working. Tell them to release an 1.0.2 already! I also really dislike the explicit :0 SLOT on all of the dependencies, and I'm not sure why you dropped ~sparc and ~ppc64. If you make an ebuild with just the python2_6 deprecation, the python_doscript stuff and the python-single-r1_pkg_setup/webapp_pkg_postinst stuff, I'd be happy to commit it.
(In reply to Dirkjan Ochtman from comment #30) > Ah, sorry for staying away from this bug for so long. I don't really want to > incorporate most of these changes. I particularly don't want to port 14 > patches over just to get the test suite working. Tell them to release an > 1.0.2 already! I can understand that > I also really dislike the explicit :0 SLOT on all of the dependencies, and > I'm not sure why you dropped ~sparc and ~ppc64. This have been done under the advise from @TomWij in comment #7 > If you make an ebuild with just the python2_6 deprecation, the > python_doscript stuff and the python-single-r1_pkg_setup/webapp_pkg_postinst > stuff, I'd be happy to commit it. Ok, I'll work on it
Created attachment 377034 [details] trac-1.0.1-r1.ebuild Here is an update based on the current trac-1.0.1-r1 in tree with the following changes : - Drop python-2.6 support - Drop FEATURES=test as discussed (patch, src_test(), python_test_all()) - Stick more better to upstream dependency - Add a USE flag highlight that depend if enable on either >=dev-python/pygments-0.6[${PYTHON_USEDEP}] >=app-text/silvercity-0.9.4 >=app-text/pytextile-2.0 app-text/enscript - Add a USE flag markdown that depend if enable on >=dev-python/docutils-0.3.9 - src_prepare() now called epatch and then distutils-r1_src_prepare instead of defining python_prepare_all(). So it's more readable and classic. - Drop the git patch as is linked to test and is broken in any case - Add a patch for Babel-1.3 from upstream stable branch - Use python_doscript in a python_install() to install every cgi with the correct libexec wrapper and make the cgi usable by the best python version. I don't use python_install_all so the cgi available for other python version than only the best one. To be discussed - Use webapp_pkg_postinst to add some info to users on how to update You should note that esetup.py install lead to the source beeing build once again, what should not happened. I can't reproduce this when running manually the commands. I tried to add a function like python_install() { distutils-r1_python_install --skip-build } That work on a fresh uncompress release but in ebuild while setup.py is correctly called. The attachement #356652 (trac.initd-var-run.diff) is still needed to get ride of /var/run.
Created attachment 377036 [details, diff] 1.0.1-changeset_12275.diff Patch for to get ride of errors since Babel-1.3 AttributeError: NullTranslationsBabel instance has no attribute 'isactive' See http://trac.edgewall.org/ticket/11345
Created attachment 377038 [details] trac-1.0.1-r2.ebuild This ebuild inherit the previous enhancement and more : - Add a working FEATURES=test with the needed patch already attached to this bug - Drop ~ppc64 and ~sparc since USE=test DEPEND on dev-python/twill that is not keyworded for those arches
I took another look, I still don't really understand what you are trying to do here. - Why remove the DISTUTILS_SINGLE_IMPL stuff? - Why do the whole highlight USE flag thing? - Since when is Python 2.6 unsupported?
(In reply to Dirkjan Ochtman from comment #35) > I took another look, I still don't really understand what you are trying to > do here. > > - Why remove the DISTUTILS_SINGLE_IMPL stuff? Because there is no reason that trac site-packages file get installed for only one python implementation. trac support python 2.5, 2.6 and 2.7. Gentoo only support 2.7, but you can still unmask python2_6 USE flag, and try to install trac for python 2.6 and python 2.7. > - Why do the whole highlight USE flag thing? This to help people getting a working highlighting support in trac. But we maybe add a pkg_postinst() to tell people what to install to get highlighting ? > - Since when is Python 2.6 unsupported? Since the following mail on gentoo-dev with subject "Python 2.6 to be masked on 2014-04-28" with Message-ID: <20140420174313.63ec49f1@pomiot.lan>. See http://thread.gmane.org/gmane.linux.gentoo.devel/91009
This has been done.