Hi! This is a continuation of the "Finalizing Fedora's Switch to Python 3" thread on fedora-devel, using the procedure from https://fedoraproject.org/wiki/Mass_package_changes. I'm proposing an automated change to ~723 packages, and manual fixes or follow-up bug filing for the remaining ~114 packages. ### Proposed changes ### The change is to ensure that as many as possible python packages which provide a version for python2 have a python2- subpackage as required by the guidelines [https://fedoraproject.org/wiki/Packaging:Naming#Python2_binary_package_naming]. For source packages which do *not* have a python- prefix, but already have a python-foo subpackage, that subpackage will be renamed to python2-foo. For packages which are called python-foo and just build a main binary package python-foo, a new python2-foo subpackage will be created. Provides/Requires/Conflicts/Obsoletes are moved from the main package to the new subpackage. In all cases, the new python2- subpackage will use lower-case naming. This may lead to a situation where an existing python3- subpackage has a differently-cased name than the python2- subpackage. [Q: maybe the python3- subpackage should be renamed automatically in this case?] An effort is made (thanks Miro!) to preserve the style which is used in the spec file, so that if e.g. python-%{real_name} was used originally, this is changed to python2-%{real_name}. If this macro cannot be guessed or if it resolves to a non-lowercase name, a non-macro lower-case string will be used. %{python_provide python2-foobar} are added as required by the guidelines [https://fedoraproject.org/wiki/Packaging:Python#The_.25python_provide_macro]. One or two: %{python_provide python2-foobar} is always added, and if the package has a non-lower-case name, %{python_provide python2-FooBar} is also added. This provides backward compatible names to the package (python-foobar, python-FooBar), as long as %{python_provide} is defined as it is now. Once %python_provide macro is switched to prefer python3 subpackages, those compat names will be gone. In case the source package name does not have a python- prefix, a Provides for the old name is also added, with a comment that it should be removed later. Example: +%package -n python2-atpy +Summary: %summary +Requires: numpy python-astropy +%{?python_provide:%python_provide python2-atpy} +# Remove before F30 +Provides: ATpy = %{version}-%{release} Changes are implemented in an automated way using https://pagure.io/pyrenamer. rpmdev-bumpspec is used to add changelog entries will be added that look like: * Sat Aug 05 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> - 3.3-4 - Python 2 subpackage renamed to python2-foobar See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 Current diff: https://in.waw.pl/~zbyszek/fedora/python2-renaming.diff [https://in.waw.pl/~zbyszek/fedora/python2-renaming.color.diff is a version will color escapes, to be downloaded and viewed with less: curl https://in.waw.pl/~zbyszek/fedora/python2-renaming.color.diff | less -RF] ### Which packages need to change ### http://fedora.portingdb.xyz/namingpolicy/ "Misnamed subpackage" lists 877 subpackages. It seems that the real number is a bit lower, because there are some dead packages and some that have been fixed in the meanwhile on that list. I'll generate a canonical maintainer: package, package: maintainer list for the final version. The automated rename currently works for 723 packages, 39 don't need work. The remaining 141 packages will require manual fixes. Some patches will be generated manually. They will be applied at the same time. I do *not* want maintainers to fix packages which are covered by the automated changes by hand, since that provides no benefit. Maintainers are of course encouraged to fix packages which are not covered, or to take the automated patch and use it as a basis of their own fix if the automated change is deficient for some reason. I'm looking for volunteers to help with the remaining ~141 packages which cannot be done automatically. If you can participate (either as a proven packager or not), let me know. It is possible that automated cleanup can be applied to some more packages (e.g. I just noticed that there's a bunch of packages which have python%{python3_pkgversion}- subpackage, which could done automatically...), so please coordinate with me to avoid duplicated work. [I'll be generating all the diffs as separate files and uploading them somewhere later this weekend.] Currently unhandled packages: CONDITIONALS: ahkab mod_wsgi pystache python-alembic python-ansi2html python-backports-ssl_match_hostname python-beaker python-bugzilla python-cairocffi python-chameleon python-cliff python-cssmin python-datanommer-models python-deltasigma python-django-dynamite python-django-filter python-django-post_office python-django-socialregistration python-docker-py python-flask-images python-flask-wtf python-fmn-lib python-fmn-web python-messaging python-nine python-postman python-pyramid-chameleon python-qt5 python-repoze-who python-requestbuilder python-rhsm python-simplevisor python-sparklines python-sphinxcontrib-cheeseshop python-sqlalchemy-utils python-straight-plugin python-summershum python-tahrir python-tahrir-api python-taskw python-trollius python-tw2-core python-tw2-jit python-tw2-sqla python-websocket-client vertica-python zanata-python-client MANY-SUBPACKAGES: ansible audit brltty bro catfish ceph claws-mail dbus-python edk2 file firewalld fts-rest ganglia gfal2-python gofed gpaw gstreamer-python kernel kross-interpreters lcgdm libappindicator libcaca libchewing libgpod liblouis libpeas libpwquality librapi librra libsmbios lvm2 mirrorbrain nautilus-python nemo-extensions openvdb pam_wrapper pjproject pki-core pulp-python pygame pygobject3 pykde4 pyke PyQt4 python2-docs python-blessed python-dirq python-drat python-narcissus-app python-networking-bigswitch python-productmd python-pytest-cov python-qpid python-retask python-rtslib python-taboot pywbem qpid-cpp redland-bindings root samba sip sympy uwsgi waf BLACKLISTED: pcp vim-syntastic ### Opting out and independent fixes ### The script skips all packages which already have a python2- subpackage and %python_provide, so all packages which are fixed in the meantime will be skipped. If packages need to be skipped even without that, let me know and I'll add the package to the blacklist. ### Timeline ### around 2017-08-08: finalized form of this draft is sent to devel-announce and individual maintainers. soon after 2017-08-15 (F27 branching): automatically and manually generated patches are applied, and packages are rebuilt. ### Contingency plan ### For each package, a Provides for the existing name is added, so dependent packages should be affected. It is also not a problem if only a subset of packages is converted. But if things go wrong, and a package cannot be fixed manually, the last resort is to revert the change, bump release, rebuild affected package. ### Future outlook ### Once all or most packages have been updated to provide python2- names, I plan to start changing dependent packages to use Requires: python2-*. But not yet ;) Zbyszek PS. If you have some time, please look for errors in the diff at https://in.waw.pl/~zbyszek/fedora/python2-renaming.color.diff. If you have a bit more time, please join the effort and help with the remaining packages. If your are not a provenpackager, I'll be happy to apply patches and do the rebuilds myself. PPS. For this kind work, Python3.6 f-strings are fan-tas-tic! _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx