#868752 cdbs: python helper finds python3.5 und python3.6 but no runtime for python3.6

Package:
cdbs
Source:
cdbs
Submitter:
Michael Hudson-Doyle
Date:
2025-08-31 11:07:05 UTC
Severity:
important
Tags:
#868752#5
Date:
2017-06-19 23:26:35 UTC
From:
To:
Dear Maintainer,

This may well turn out to be a cdbs bug in the end, but uwsgi does not build
when pysupport -r returns more than one version:

https://launchpadlibrarian.net/323025281/buildlog_ubuntu-artful-amd64.uwsgi_2.0.15-1ubuntu3_BUILDING.txt.gz

Picking out the failing lines:

*** asyncio_python27 plugin built and available in ./asyncio_python27_plugin.so ***
touch debian/stamp-uwsgi-plugin-asyncio-python
debian/rules:452: *** no python implementation resolved from flavor "python3.6" among packages python-uwsgidecorators python3-uwsgidecorators.  Stop.

In this build python 3.5 is the default and python 3.6 is supported. In a build
where python 3.6 is default and python 3.5 is supported, the error complains
about python 3.5 instead. And if python 3.6 is the only supported version, the
build completes successfully. So I think this is really a problem in uwsgi or
cdbs' handling of multiple supported python versions.

I tried to debug a bit but just got very very confused.

Cheers,
mwh

#868752#10
Date:
2017-06-30 06:25:19 UTC
From:
To:
./asyncio_python27_plugin.so ***
"python3.6" among packages python-uwsgidecorators python3-uwsgidecorators.
Stop.
build
the
or

We now have this in Debian, so bumping to serious.

Scott K

#868752#19
Date:
2017-06-30 20:28:09 UTC
From:
To:
Quoting Scott Kitterman (2017-06-30 08:25:19)

Thanks, both for reporting initially and for bumping!

 - Jonas

#868752#26
Date:
2017-07-13 21:37:12 UTC
From:
To:
It looks like a cdbs issue to me,
  $(call cdbs_expand_pythonruntime,,python3.6)
breaks while
  $(call cdbs_expand_pythonruntime,,python3.5)
works (and results in "python3" as expected.)

A workaround that seems to help is putting
 X-Python3-Version: 3.5
in the Source paragraph of debian/control to prevent it from trying 3.6
at all. This makes the build work for me (but doesn't help the python3.6
transition of course.)

This is the worst blocker for the Perl 5.26 transition too (uwsgi needs
to be rebuilt because uwsgi-plugin-psgi links against libperl), so even
a temporary ugly workaround would be appreciated from this side :)

#868752#31
Date:
2017-07-13 22:56:52 UTC
From:
To:
Changing the python3-all-dev build-depends to python3-dev would accomplish the
same thing while allowing a binNMU to work when we make python3.6 default.
Since this is blocking your work, I would recommend you NMU with that change
(I have forgotten approximately everything I ever new about CDBS, so I don't
mess with CDBS packages if I can possibly avoid it - I don't plan to do this
NMU).

Scott K

#868752#36
Date:
2017-07-14 06:39:57 UTC
From:
To:
Thanks, that's indeed even better!

I guess we'll look at an NMU soonish (unless Jonas wants to handle this?)

#868752#41
Date:
2017-07-17 18:30:01 UTC
From:
To:
Jonas, do you have time for an upload? This is more or less the last
blocker for the perl 5.26 transition which probably starts later this
week.

I'm also happy to do an NMU with the change Scott proposed.


Cheers,
gregor

#868752#46
Date:
2017-07-17 20:29:45 UTC
From:
To:
Quoting gregor herrmann (2017-07-17 20:30:01)
(via Iceland for a little week) in a few days, so am swamped with tasks.

Sorry for not reporting back here earlier.

 - Jonas


¹ I will be doing Debian-related packaging work at https://puri.sm/

#868752#51
Date:
2017-07-17 20:39:48 UTC
From:
To:
No worries, and thanks for the quick reply to my mail!
I'll look at the package.

Congratulations :)


Cheers,
gregor

#868752#56
Date:
2017-07-17 23:19:55 UTC
From:
To:
I'm afraid this doesn't help. With the change in Build-Depends from
python3-all-dev to python3-dev, the build still ends with:

*** asyncio_python27 plugin built and available in ./asyncio_python27_plugin.so ***
touch debian/stamp-uwsgi-plugin-asyncio-python
debian/rules:452: *** no python implementation resolved from flavor "python3.6" among packages python-uwsgidecorators python3-uwsgidecorators.  Stop.
dpkg-buildpackage: error: debian/rules build gave error exit status 2

The build log doesn't show anything about python3.6 packages.

From the log:

set -e; \
      sed -e 's/@@pkg_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_name@@/python3/g' -e 's/@@plugin_stem@@/python/g' -e 's/@@plugin_alternatives_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_alternatives_stem@@/python3/g' -e 's/@@plugin_alternatives_priority@@/35/g' -e 's/@@plugin_lang_kind@@/python3/g' -e 's/@@plugin_flavors_dotless@@/python36 python35/g' -e 's/@@plugin_defaultflavor_dotless@@/python35/g' < debian/uwsgi-plugin-__PLUGIN__.rtupdate.in.pri-py > debian/uwsgi-plugin-python3.rtupdate;   sed -e 's/@@pkg_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_name@@/python3/g' -e 's/@@plugin_stem@@/python/g' -e 's/@@plugin_alternatives_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_alternatives_stem@@/python3/g' -e 's/@@plugin_alternatives_priority@@/35/g' -e 's/@@plugin_lang_kind@@/python3/g' -e 's/@@plugin_flavors_dotless@@/python36 python35/g' -e 's/@@plugin_defaultflavor_dotless@@/python35/g' < debian/uwsgi-plugin-__PLUGIN__.dirs.in.python > debian/uwsgi-plugin-python3.dirs;     sed -e 's/@@pkg_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_name@@/python3/g' -e 's/@@plugin_stem@@/python/g' -e 's/@@plugin_alternatives_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_alternatives_stem@@/python3/g' -e 's/@@plugin_alternatives_priority@@/35/g' -e 's/@@plugin_lang_kind@@/python3/g' -e 's/@@plugin_flavors_dotless@@/python36 python35/g' -e 's/@@plugin_defaultflavor_dotless@@/python35/g' < debian/uwsgi-plugin-__PLUGIN__.prerm.in.pri-py > debian/uwsgi-plugin-python3.prerm;   sed -e 's/@@pkg_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_name@@/python3/g' -e 's/@@plugin_stem@@/python/g' -e 's/@@plugin_alternatives_name@@/uwsgi-plugin-python3/g' -e 's/@@plugin_alternatives_stem@@/python3/g' -e 's/@@plugin_alternatives_priority@@/35/g' -e 's/@@plugin_lang_kind@@/python3/g' -e 's/@@plugin_flavors_dotless@@/python36 python35/g' -e 's/@@plugin_defaultflavor_dotless@@/python35/g' < debian/uwsgi-plugin-__PLUGIN__.postinst.in.pri-py > debian/uwsgi-plugin-python3.postinst;    sed -e "s/@@plugin_name@@/python36/g" < debian/uwsgi-plugin-__PLUGIN__.install.in >> debian/uwsgi-plugin-python3.install; sed -e "s/@@plugin_name@@/python36/g" < debian/uwsgi-plugin-__PLUGIN__.links.in >> debian/uwsgi-plugin-python3.links; sed -e "s/@@plugin_name@@/python36/g" < debian/uwsgi-plugin-__PLUGIN__.manpages.in >> debian/uwsgi-plugin-python3.manpages;  sed -e "s/@@plugin_name@@/python35/g" < debian/uwsgi-plugin-__PLUGIN__.install.in >> debian/uwsgi-plugin-python3.install; sed -e "s/@@plugin_name@@/python35/g" < debian/uwsgi-plugin-__PLUGIN__.links.in >> debian/uwsgi-plugin-python3.links; sed -e "s/@@plugin_name@@/python35/g" < debian/uwsgi-plugin-__PLUGIN__.manpages.in >> debian/uwsgi-plugin-python3.manpages; chmod 755 debian/uwsgi-plugin-python3.rtupdate; echo "debian/uwsgi-plugin-python3.rtupdate usr/share/python3/runtime.d" >> debian/uwsgi-plugin-python3.install
touch debian/expand-files/uwsgi-plugin-python3

(Note the "python36" parts.)


Looking through the not ultra-short debian/rules, it seems that
$(plugin_flavors) still contains something python3.6ish, and then we
are at the expansion that Niko already found:

        $(if $(filter python,$(plugin_lang)),\
                $(foreach flavor,$(plugin_flavors),\
                        $(UWSGI_ENV) $(call cdbs_expand_pythonruntime,,$(flavor)) \
                                $(UWSGI_BUILDER) \
                                --plugin plugins/$(plugin_src) \
                                debian/buildconf/uwsgi-plugin.ini \
                                $(plugin_flavor_prefix)$(subst .,,$(flavor));),\
                $(UWSGI_ENV) $(cdbs_python2_defaultruntime) $(UWSGI_BUILDER) \
                        --plugin plugins/$(plugin_src) \
                        debian/buildconf/uwsgi-plugin.ini \
                        $(plugin_name))


So, both with python3-dev (i.e. no python3.6 around) and with
python3-all-dev (with python3.6 installed), '$(call
cdbs_expand_pythonruntime,,python3.6)' fails. Hm.

If someone is into makefile magic:

# runtime to use
# resolve from implicit singleflavor or optional binary package or optional (favored) flavor
#  1. provided binary package arch-indep: cdbs_$python_defaultruntime
#  2. default flavor: cdbs_$python_defaultruntime
#  3. name of flavor
cdbs_expand_pythonruntime = $(or $(strip \
    $(if $(filter $1,$(cdbs_python_indep_packages)),\
        $(cdbs_$(call _cdbs_expand_python,$1)_defaultruntime))),$(strip \
    $(foreach f,$(or $(strip \
     $2),$(strip \
     $(if $1,$(call _cdbs_expand_pythonflavors,$1))),$(strip \
     $(if word 2,$(cdbs_flavors),\
      $(error Too many flavors: $(cdbs_flavors)),\
      $(cdbs_flavors)))),\
        $(foreach p,$(call _cdbs_expand_pythonflavor2python,$f),$(or $(strip \
            $(if $(filter $f,$(cdbs_$p_defaultflavor)),\
                $(cdbs_$p_defaultruntime))),$(strip \
            $f),\
            $(error no python runtime resolved \
                from binary package "$1" and flavor "$2"))))))


(from /usr/share/cdbs/1/class/python-vars.mk)


So it looks like the cdbs python module finds a python3.6 "flavor"
(from py3versions) but no runtime for it.


Ultimately, this looks like a cdbs problem to me. Maybe we can find a
bandaid for uwsgi for now to tell d/rules to use only one python3
flavour or to not bail out of the python3.6 runtime is not detected.


Cheers,
gregor

#868752#61
Date:
2017-07-18 00:03:10 UTC
From:
To:
In that case, your X-Python3-Version hack is probably the best way to get the Perl transition done.  It'll be another RC bug against UWSGI once python3.6 is default, but I don't expect that soon.

Scott K

#868752#66
Date:
2017-07-18 09:27:56 UTC
From:
To:
Control: clone -1 -2
Control: reassign -2 cdbs
Control: retitle -2 cdbs: python helper finds python3.5 und python3.6 but no runtime for python3.6
Control: severity -2 important
Control: affects -2 src:uwsgi

(Cloning a separate bug for this issue.)
Indeed, adding 'X-Python3-Version: 3.5' to debian/control's source
stanza helps. (As already mentioned by Niko earlier.)

What also seems to work is the following workaround in debian/rules:

diff -Nru uwsgi-2.0.15/debian/rules uwsgi-2.0.15/debian/rules
--- uwsgi-2.0.15/debian/rules   2017-02-20 11:40:46.000000000 +0100
+++ uwsgi-2.0.15/debian/rules   2017-07-18 08:55:03.000000000 +0200
@@ -259,9 +259,11 @@
 plugin_lang_kind = $(strip \
        $(if $(filter java python,$(plugin_lang)),\
                $(lastword $(subst -, ,$(plugin_kind)))))
-plugin_flavors = $(strip \
-       $(if $(filter python,$(plugin_lang)),\
-               $(cdbs_$(plugin_lang_kind:python=python2)_allflavors)))
+#workaround, cf. #865224
+#plugin_flavors = $(strip \
+#      $(if $(filter python,$(plugin_lang)),\
+#              $(cdbs_$(plugin_lang_kind:python=python2)_allflavors)))
+plugin_flavors = $(plugin_defaultflavor)
 plugin_defaultflavor = $(strip \
        $(if $(filter python,$(plugin_lang)),\
                $(cdbs_$(plugin_lang_kind:python=python2)_defaultflavor)))

Then $(flavor) is later on only set to the default python versions,
i.e. python2.7 and python3.5 (tested with a strategic "echo" in one
of the loops), and the build succeeds. In practice this should brings
us back to the situation before python3.6 was added as a supported
python version in python3-defaults in June.


Maybe that's a bit less invasive and a bit more binNMU friendly than
hardcoding 'X-Python3-Version: 3.5'?


Cheers,
gregor

#868752#83
Date:
2017-07-18 10:24:31 UTC
From:
To:

It looks like something similar has already been discussed in the
past: #606530


Cheers,
gregor

#868752#96
Date:
2025-01-25 21:34:31 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
uwsgi, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 868752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <dr@jones.dk> (supplier of updated uwsgi package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 25 Jan 2025 20:27:36 +0100
Source: uwsgi
Architecture: source
Version: 2.0.28-2
Distribution: unstable
Urgency: medium
Maintainer: uWSGI packaging team <pkg-uwsgi-devel@lists.alioth.debian.org>
Changed-By: Jonas Smedegaard <dr@jones.dk>
Closes: 868752 1069875 1088393 1092756 1093818
Changes:
 uwsgi (2.0.28-2) unstable; urgency=medium
 .
   [ Alexandre Rossi ]
   * stop build-depend on dh-buildinfo;
     closes: bug#1088393
   * add 1007_fix_php_pypy_tests.patch
   * stop build or provide plugins now built externally:
     gccgo glusterfs java lua psgi python rados ruby;
     closes: bug#868752, #1069875, #1092756, #1093818
   * stop build useless binary uwsgi-core-local
 .
   [ Jonas Smedegaard ]
   * simplify long description slightly,
     to mention less details for separately built packages
   * update copyright info:
     + use field Reference
     + update coverage
   * have binary package uwsgi-app-integration-plugins depend on
     new separately built uwsgi-plugin-pypy3
   * drop done or externalized TODOs
Checksums-Sha1:
 26c9042319e83d43c4c3ac2f0e79b12c44362d19 3883 uwsgi_2.0.28-2.dsc
 6e85acca40278bcab3d89197bfadbe926c558c17 68624 uwsgi_2.0.28-2.debian.tar.xz
 17b6dc822603da687548f88c92222f61f7ccb555 14679 uwsgi_2.0.28-2_amd64.buildinfo
Checksums-Sha256:
 b1e4829f8674488b6600eb4daed90e79766bdf8fd801eb166de59a3badf5a9de 3883 uwsgi_2.0.28-2.dsc
 2e81d5876beca39c722676a6402d90974a30325c2307273ef73c478832a87e84 68624 uwsgi_2.0.28-2.debian.tar.xz
 80ae2e7cb351019124763cff3a8918f418548f1e0d64ed6505584fe7f5727508 14679 uwsgi_2.0.28-2_amd64.buildinfo
Files:
 f71b7537d8858a115d0d6842012de038 3883 httpd optional uwsgi_2.0.28-2.dsc
 1bc8c4f65da911f6a452317ebaa7835d 68624 httpd optional uwsgi_2.0.28-2.debian.tar.xz
 e81b2e20f144b2ea0ad21284b19c008e 14679 httpd optional uwsgi_2.0.28-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

wsG7BAEBCgBvBYJnlUafCRAsfDFGwaABIUcUAAAAAAAeACBzYWx0QG5vdGF0aW9u
cy5zZXF1b2lhLXBncC5vcmc1pWdxQ6kCxQihzo+eMPoWHEnQYty37NLCtfr7elZP
kRYhBJ/j6cNmkaaf9TzGhCx8MUbBoAEhAADVtA//Z41pNQ8e2HNN2KpuPD1qkEqQ
8roAowEmmeEuFJwjMnB79YHhX0Ti+icH/5S8A7W59O9hiWFBejaEJ8/at5Zu3bXp
DdD1GboY3yYHxGg69iNddQY45wnwO5K1oFo19gBqT71GTrBuUbB8FYMP6vVuVPOu
6LZWa+sOvNMeOLi7kNktddlR/7palfD1+3peMc9JST8RLaC0xjCqpSPS+ljfDLfw
3XUN0v/WO3c4iKDCDlw9ysh9epymCE6CNfHUUlQQ4ywpCgK8UYiuFZwNSg+Q78B4
CJlvgrICvQcXsptYHxNW+wJapbLnBR3DsO6fTaQXyA0OCkBdl4L3QO8Ocr0ZCqYx
C0ZaVfOyqbklOcFH6SCl8/d3vHM/MsfIG6dZivO3bVdW10y38aI/o0uQLL49vQaa
LQpNwyLvGxDZKmQHCppp3k1HenLDQN6h9ShMtTUB65eiHVfXQCwVrHx5vQxlsdxf
BSSF7tzrtMNAeTRWLzD1HuqTKXIPf64kNHERS51HPiAIPLy/y0W6olGcHSd52OTV
FCAQX7+bTU86SVZaLgMSLeoDZ0ERhQWE6g5tU1MT8Tq28GimZt36Gy6DW2JVOUG/
Uss6zI65uAUmb0+wVsaJUVtrCVdUxlujBv4g9CEryKIYv7YahNmAmNS4v2SiVTOH
qE6KJqLbhAJu/pymFNI=
=5kWc
-----END PGP SIGNATURE-----

#868752#111
Date:
2025-08-31 11:04:05 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
cdbs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 868752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alexandre Detiste <tchet@debian.org> (supplier of updated cdbs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 31 Aug 2025 12:32:38 +0200
Source: cdbs
Architecture: source
Version: 0.4.176
Distribution: unstable
Urgency: medium
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Alexandre Detiste <tchet@debian.org>
Closes: 430571 529284 565974 574791 587373 606217 606530 868752
Changes:
 cdbs (0.4.176) unstable; urgency=medium
 .
   * QA upload.
   * Remove python distutils support
     (Closes: #868752, #606530, #529284, #587373,
              #430571, #574791, #606217, #565974)
Checksums-Sha1:
 386b66757f09242dc8b966e3424aa1e43318297b 1914 cdbs_0.4.176.dsc
 0a77b812565043adeca9f34d0cccfd430cc965ef 176440 cdbs_0.4.176.tar.xz
 0915e8fe3ec408646485542473b1014abb6b0cff 315060 cdbs_0.4.176.git.tar.xz
 3c7bdafa7b682d91a265c442440bdfc3e5bc206e 18042 cdbs_0.4.176_source.buildinfo
Checksums-Sha256:
 a221307b5911916c615c45092cf1e1a57ea27c9d1ff04b4bab1a05428cd9d5ff 1914 cdbs_0.4.176.dsc
 d77dceac6b6a998bb7f9684e2bbeef10abfa5870f8fae4d6a4cc5e2e26e760ac 176440 cdbs_0.4.176.tar.xz
 1a53f91580bf4dddc9275d09fee71bc0646e42b6a96fea4fa56b8cbc58ead355 315060 cdbs_0.4.176.git.tar.xz
 0391563f7ef2975ee268006ed773687acafb74dbe4afab3a9c33b33b926240bd 18042 cdbs_0.4.176_source.buildinfo
Files:
 c4518a94f9627a2f1aa60f2cd6dc8366 1914 devel optional cdbs_0.4.176.dsc
 0c4acb896a6a633bcfa6d5a050507f2c 176440 devel optional cdbs_0.4.176.tar.xz
 ac3d5408c03a678a2ad6b2d6e72fa3e3 315060 devel optional cdbs_0.4.176.git.tar.xz
 2db8edf1cabfa66aff39c8eca26a02c7 18042 devel optional cdbs_0.4.176_source.buildinfo
Git-Tag-Info: tag=98d521041de686dd4277a34ab204481f7e108f12 fp=8f6de104377f3b11e741748731f3144544a1741a
Git-Tag-Tagger: Alexandre Detiste <tchet@debian.org>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmi0KG4ACgkQYG0ITkaD
wHlkFQ//R16V5LIbG4q/zd66DZpMSBJ/zu0HOUadSgxWYDgBXkeLPt21pAhDECmJ
IWtSi0rwP3sX9hOG7aE0Ba94o6l2tyaz3hJqD2y2P0b2ZYUr4o3l1jNOnxW0ms5x
Wj8uZ6sXfIDp/znFr+iqX2Uw1ydiNfgRS+Kff2kzLFj3GCt/qQSAlwVXy+ploCXD
zaq6ToE5GKpsPVQkFLdX5/3lgGNtORJ3NNDXjtOHuoAmrnom1iQJ9OfTeu2DK9OC
jn3uQYKEL3U3GAVzNwthfZ2I18ckkrh8fwqBunZudx1dU1n/pq+iQD4TJUiFQ1hh
0QSOd7g9ibgqn7skQS2q7mGMT6nI3J2z4KNm+bNOPg4fDSONCCKRrj96fD/BVsju
jzYduvDxcrDjZS6/qHHrXgm6CYpIa9A55H+tjCLfYzOPkaRT4IJhxLmpCgAj8b8e
S8L+uBmKC3jGUkGP5u6aYMAf8xt0yZmZ59V+mHKGi6XRzVhsG8BAZWyiQPB3O8DG
A+6FtHF3XPD37fP11tE4Rugh++vnbyv0JyDgoK+nn6At+hrMc4aAeVWXlI1jMNDR
PyVYwehg89XwvBcTR1JlwbOeuUKiL//5Y6unG6vbH1J8gD+cEQ/Nx0c7QC/V1NaB
Ac4n+TqdYIW4IYFGMf2eoN9g1t7HmeqHd1qYohdJd+gyxu9793E=
=ZBoF
-----END PGP SIGNATURE-----