[pkg-uWSGI-devel] Bug#865224: uwsgi: ftbfs with multiple supported python3 versions

gregor herrmann gregoa at debian.org
Mon Jul 17 23:19:55 UTC 2017


On Thu, 13 Jul 2017 18:56:52 -0400, Scott Kitterman wrote:

> > 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 :)
> 
> 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).

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

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Dire Straits: Walk Of Life
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-uwsgi-devel/attachments/20170718/6174ba2b/attachment.sig>


More information about the pkg-uWSGI-devel mailing list