summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2025-09-24 00:43:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-25 11:09:05 +0100
commitcea21917206f6688e6d37efde783941463289b28 (patch)
tree162b7cddd33f2bf62a4dd50fb511b0ef2decbe25
parent17e3dad8dbf648bf15b869c87923f01d92ad62d7 (diff)
downloadpoky-cea21917206f6688e6d37efde783941463289b28.tar.gz
apt: fix reproducibility issue
In oe-selftest of reproducibility, recipe apt has reproducibility issue: ... 2025-09-20 17:09:18,986 - oe-selftest - INFO - ====================================================================== 2025-09-20 17:09:18,986 - oe-selftest - INFO - FAIL: test_reproducible_builds (reproducible.ReproducibleTests) 2025-09-20 17:09:18,986 - oe-selftest - INFO - ---------------------------------------------------------------------- 2025-09-20 17:09:18,986 - oe-selftest - INFO - Traceback (most recent call last): File "/buildarea5/hjia/contrib/openembedded-core-contrib/meta/lib/oeqa/selftest/cases/reproducible.py", line 406, in test_reproducible_builds self.fail('\n'.join(fails)) AssertionError: The following deb packages are different and not in exclusion list: build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt-dbg_3.0.3-r0_amd64.deb build-st/reproducibleB-extended/tmp/deploy/deb/./x86-64-v3/apt_3.0.3-r0_amd64.deb The following ipk packages are different and not in exclusion list: build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt-dbg_3.0.3-r0_x86-64-v3.ipk build-st/reproducibleB-extended/tmp/deploy/ipk/./x86-64-v3/apt_3.0.3-r0_x86-64-v3.ipk The following rpm packages are different and not in exclusion list: build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-3.0.3-r0.x86_64_v3.rpm build-st/reproducibleB-extended/tmp/deploy/rpm/./x86_64_v3/apt-dbg-3.0.3-r0.x86_64_v3.rpm ... Due to upstream apt commit [1], it calls `id -gn root' in cmake to set ROOT_GROUP if not define. The output of `id -gn root' may differ in the compared builds which caused reproducibility issue ... |build-st/reproducibleB-extended/tmp/work/x86-64-v3-oe-linux/apt/ 3.0.3/temp/log.do_configure:124:-- Found root group: wheel ... |build-st/reproducibleA/tmp/work/x86-64-v3-oe-linux/apt/3.0.3/ temp/log.do_configure:124:-- Found root group: root ... Explicitly set ROOT_GROUP = "root" for cmake other than call `id -gn root' to support reproducibility [1] https://salsa.debian.org/apt-team/apt/-/commit/6f1f3c9afdb6ade6a7be110b90c8fc9e603254cf (From OE-Core rev: 5b3d5ae626b0d28535973be2a8a1cf48d314ba12) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/apt/apt_3.0.3.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/apt/apt_3.0.3.bb b/meta/recipes-devtools/apt/apt_3.0.3.bb
index 75d85dbbce..7f0a38ab29 100644
--- a/meta/recipes-devtools/apt/apt_3.0.3.bb
+++ b/meta/recipes-devtools/apt/apt_3.0.3.bb
@@ -51,6 +51,7 @@ EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \
51 -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \ 51 -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \
52 -DWITH_TESTS=False \ 52 -DWITH_TESTS=False \
53 -DCOMMON_ARCH=${DPKG_ARCH} \ 53 -DCOMMON_ARCH=${DPKG_ARCH} \
54 -DROOT_GROUP="root" \
54" 55"
55 56
56PACKAGECONFIG ??= "" 57PACKAGECONFIG ??= ""