From ed19f486ac644ca4940bcf5d12b2822a0f54dcc4 Mon Sep 17 00:00:00 2001 From: Dan Voiculeasa Date: Mon, 20 Dec 2021 16:06:44 +0200 Subject: [PATCH] debian: Add and patch python3-setuptools package This is a transient work that enables us to progress Debian integration. This work affects only Debian. Sysinv loads stevedore plugins. The logic is based on the fact that the source files are listed in SOURCES.txt which is included in the egg. The package that provides a plugin is determined by parsing entry_point and distribution data. Distribution data loads information from SOURCES.txt. Setuptools doesn't copy the desired file to egg. Patch python3-setuptools so it copies the file to egg. Skip CentOS tests because this is a Debian only package. Debian tests: PASS: build python package, build non-package python PASS: SOURCES.txt present in .egg-info in python package Partial-Bug: https://bugs.launchpad.net/starlingx/+bug/1955648 Signed-off-by: Dan Voiculeasa Change-Id: Ia318aa0ca6825adfa3d23159691486067d96d475 --- debian_pkg_dirs | 1 + .../python3-setuptools/debian/meta_data.yaml | 7 +++++ ...vert-no-SOURCES.txt-in-egg-ingo.diff.patch | 31 +++++++++++++++++++ .../python3-setuptools/debian/patches/series | 1 + 4 files changed, 40 insertions(+) create mode 100644 python/python3-setuptools/debian/meta_data.yaml create mode 100644 python/python3-setuptools/debian/patches/0001-Revert-no-SOURCES.txt-in-egg-ingo.diff.patch create mode 100644 python/python3-setuptools/debian/patches/series diff --git a/debian_pkg_dirs b/debian_pkg_dirs index a200bb8e4..c75833709 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -50,6 +50,7 @@ ostree/initramfs-ostree ostree/mttyexec ostree/ostree ostree/ostree-upgrade-mgr +python/python3-setuptools security/keyrings.alt security/python-keyring storage-drivers/trident-installer diff --git a/python/python3-setuptools/debian/meta_data.yaml b/python/python3-setuptools/debian/meta_data.yaml new file mode 100644 index 000000000..60af33817 --- /dev/null +++ b/python/python3-setuptools/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: setuptools +debver: 52.0.0-4 +archive: https://snapshot.debian.org/archive/debian/20210629T151153Z/pool/main/s/setuptools/ +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/python/python3-setuptools/debian/patches/0001-Revert-no-SOURCES.txt-in-egg-ingo.diff.patch b/python/python3-setuptools/debian/patches/0001-Revert-no-SOURCES.txt-in-egg-ingo.diff.patch new file mode 100644 index 000000000..e7d426186 --- /dev/null +++ b/python/python3-setuptools/debian/patches/0001-Revert-no-SOURCES.txt-in-egg-ingo.diff.patch @@ -0,0 +1,31 @@ +From 70f8bcd677d9973193bba33b4ec45e3d09b57aab Mon Sep 17 00:00:00 2001 +From: Dan Voiculeasa +Date: Mon, 20 Dec 2021 14:24:46 +0200 +Subject: [PATCH] Revert no-SOURCES.txt-in-egg-ingo.diff + +Typo in upstream patchname aside, revert the upstream patch that +removes SOURCES.txt from egg. + +Partial-Bug: https://bugs.launchpad.net/starlingx/+bug/1955648 +Signed-off-by: Dan Voiculeasa +--- + setuptools/command/install_egg_info.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/setuptools/command/install_egg_info.py b/setuptools/command/install_egg_info.py +index 5f405bc..76fb20e 100644 +--- a/setuptools/command/install_egg_info.py ++++ b/setuptools/command/install_egg_info.py +@@ -72,9 +72,6 @@ class install_egg_info(namespaces.Installer, Command): + for skip in '.svn/', 'CVS/': + if src.startswith(skip) or '/' + skip in src: + return None +- if self.install_layout and self.install_layout in ['deb'] and src.startswith('SOURCES.txt'): +- log.info("Skipping SOURCES.txt") +- return None + self.outputs.append(dst) + log.debug("Copying %s to %s", src, dst) + return dst +-- +2.30.0 + diff --git a/python/python3-setuptools/debian/patches/series b/python/python3-setuptools/debian/patches/series new file mode 100644 index 000000000..bb9b5d568 --- /dev/null +++ b/python/python3-setuptools/debian/patches/series @@ -0,0 +1 @@ +0001-Revert-no-SOURCES.txt-in-egg-ingo.diff.patch