Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: openstack-pkg-to...@packages.debian.org
Control: affects -1 + src:openstack-pkg-tools

Please unblock package openstack-pkg-tools

[ Reason ]
Since we don't have /usr/bin/uwsgi_python3X (but only
/usr/bin/uwsgi_python311), openstack-pkg-tools's
init template isn't finding uwsgi's binary, and
none of the OpenStack API services can be started.

The fix searches correctly for /usr/bin/uwsgi_python311,
and uses it (as expected).

[ Impact ]
None of the API daemons of OpenStack can start without
this patch.

[ Tests ]
I've rebuilt and tested manually that the attached debdiff
fixes the situation.

[ Risks ]
Version 123, compared to the current Bookworm version 120,
includes 3 patches. Let me review them one by one.

https://salsa.debian.org/openstack-team/debian/openstack-pkg-tools/-/commit/c87b6a0a576b2acaa9d1b2f008196677ce6d42ea
Add pkgos_add_section().

To be completely honest, this commit isn't really needed,
as it adds a new function to all postinst. However, since
it isn't actually called currently (I'm using this elsewhere,
in a currently ongoing development), it's IMO safe to leave
it as-is, and I don't think it's necessary to add more work
to remove it (ie: I would need to revert the commit, upload
version 124, let this migrate to Bookworm, and re-upload
to unstable version 125 with this commit again).

Please allow this to get in, it's really harmless as long
as sh parses it and there's no syntax error, which is the
case.

https://salsa.debian.org/openstack-team/debian/openstack-pkg-tools/-/commit/5498a3cd2e223578343ce61735a9e9dbd8515a2f
Remove ~bpo.* from the exported OSLO_PACKAGE_VERSION, because of new
restrictions in setuptools.

Under the latest version of setuptools (available in Bookworm),
complex Python module versions aren't allowed anymore. This
commit makes openstack-pkg-tools generate python module versions
(in the egg-info) that are compatible with setuptools.

https://salsa.debian.org/openstack-team/debian/openstack-pkg-tools/-/commit/ef6da658138ab7c68e714616f5b512107ab7cb24
Fix init template to support uwsgi with Python 3.11 and up.

That's the very important commit that I wish to get in
Bookworm. Without this one, OpenStack API runninf under
UWSGI wouldn't start.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]
Note that I will need unblocks for all OpenStack
API daemons after openstack-pkg-tools migrates to
Bookworm, as they need to be rebuilt using that new
version. I'll open separate bugs for them then.

unblock openstack-pkg-tools/123
diff -Nru openstack-pkg-tools-120/debian/changelog 
openstack-pkg-tools-123/debian/changelog
--- openstack-pkg-tools-120/debian/changelog    2022-09-14 14:09:51.000000000 
+0200
+++ openstack-pkg-tools-123/debian/changelog    2023-04-14 10:01:22.000000000 
+0200
@@ -1,3 +1,22 @@
+openstack-pkg-tools (123) unstable; urgency=medium
+
+  * Fix init template to support uwsgi with Python 3.11 and up.
+
+ -- Thomas Goirand <z...@debian.org>  Fri, 14 Apr 2023 10:01:22 +0200
+
+openstack-pkg-tools (122) experimental; urgency=medium
+
+  * Remove ~bpo.* from the exported OSLO_PACKAGE_VERSION, because of new
+    restrictions in setuptools.
+
+ -- Thomas Goirand <z...@debian.org>  Mon, 13 Mar 2023 21:02:11 +0100
+
+openstack-pkg-tools (121) experimental; urgency=medium
+
+  * Add pkgos_add_section().
+
+ -- Thomas Goirand <z...@debian.org>  Sat, 11 Mar 2023 14:53:35 +0100
+
 openstack-pkg-tools (120) unstable; urgency=medium
 
   * Deprecate option --no-py2 and --no-py3 (always package for PY3 only).
diff -Nru openstack-pkg-tools-120/init-template/init-script-template 
openstack-pkg-tools-123/init-template/init-script-template
--- openstack-pkg-tools-120/init-template/init-script-template  2022-09-14 
14:09:51.000000000 +0200
+++ openstack-pkg-tools-123/init-template/init-script-template  2023-04-14 
10:01:22.000000000 +0200
@@ -30,7 +30,7 @@
        # Sid doesn't have /usr/bin/uwsgi_python3, so we need
        # to search for a more specific daemon name. For stretch
        # /usr/bin/uwsgi_python3 is fine.
-       for i in 3 35 36 37 38 39 ; do
+       for i in 3 35 36 37 38 39 310 311 312 313 314 315 316 317 318 319 ; do
                if [ -x /usr/bin/uwsgi_python${i} ] ; then
                        DAEMON=/usr/bin/uwsgi_python${i}
                fi
diff -Nru openstack-pkg-tools-120/pkgos_func openstack-pkg-tools-123/pkgos_func
--- openstack-pkg-tools-120/pkgos_func  2022-09-14 14:09:51.000000000 +0200
+++ openstack-pkg-tools-123/pkgos_func  2023-04-14 10:01:22.000000000 +0200
@@ -6,6 +6,18 @@
        echo ${i% *}
 }
 
+pkgos_add_section () {
+        local CONF_FILE SECTION
+        CONF_FILE=${1}
+        SECTION=${2}
+
+        # Check if section exists
+        if ! grep -q -E '^[ \t]*\['${SECTION}'\][ \t]*$' ${CONF_FILE} ; then
+               # If not, add it to the config file
+               echo "[${SECTION}]" >>${CONF_FILE}
+        fi
+}
+
 # This function removes a section, because we need that in the case
 # of an upgrade from one version to the next. It is for example
 # needed for keystone to upgrade from Grizzly to Havana.
diff -Nru openstack-pkg-tools-120/pkgos.make openstack-pkg-tools-123/pkgos.make
--- openstack-pkg-tools-120/pkgos.make  2022-09-14 14:09:51.000000000 +0200
+++ openstack-pkg-tools-123/pkgos.make  2023-04-14 10:01:22.000000000 +0200
@@ -13,7 +13,7 @@
 MANIFEST_EXCLUDE_STANDARD ?= $(DEBPKGNAME)
 DEBIAN_BRANCH  ?= $(shell cat debian/gbp.conf | grep debian-branch | cut -d'=' 
-f2 | awk '{print $1}')
 
-export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 
's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~/.0/' -e 
's/+dfsg1//' -e 's/+ds1//' | head -n 1)
+export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 
's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 
's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)
 
 gen-init-configurations:
        # Create the init scripts and systemd unit files from the template

Reply via email to