From patchwork Tue Sep 1 17:41:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 96974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A12C624D3 for ; Tue, 1 Sep 2026 17:41:59 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.566.1788284512043528208 for ; Tue, 01 Sep 2026 10:41:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=0npFOetW; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 6558D1A1937 for ; Tue, 1 Sep 2026 17:41:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 323436053C for ; Tue, 1 Sep 2026 17:41:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5B7C211C792AB; Tue, 1 Sep 2026 19:41:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788284509; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=tOrwNCXrEphq+Ko9BpqniwFRfWoV11/iNFqGYWsTuCk=; b=0npFOetWcBWV3POz4ZNiq6+hWRbGhppdHjrERLEZjvNFv3K01OMSK5DISIR6oAaAz/4Xlm 4AjzaYHunJfdzsD1RjAXI6mZIF/ZVF0ceB+wIzfNn2qXhRc40iElJNf0SF69ghYtNteaL0 MHYM/t+PmCHStFODRwIYt9Ca8o48C3t6Fwo5+MD/+LK2/PNpVU16o79ix1emSG0KTjhY7z CULa0hwW96y8Ou43T0bsKKzbIn76fzdOE0aJu1zMV7LD9LrEOPmwiT3A/AGXkGF2PuA/6l CuLwJ/kpW0cGPuBfVb/1wBq4gjE6K1oW6iWxsXIevQAr5eI0tC1sWsldzDdiow== From: Mathieu Dubois-Briand Date: Tue, 01 Sep 2026 19:41:44 +0200 Subject: [PATCH 1/2] libfaketime: Import recipe from meta-oe MIME-Version: 1.0 Message-Id: <20260901-mathieu-reproducible-faketime-v1-1-eac182548422@bootlin.com> References: <20260901-mathieu-reproducible-faketime-v1-0-eac182548422@bootlin.com> In-Reply-To: <20260901-mathieu-reproducible-faketime-v1-0-eac182548422@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788284507; l=4234; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=nAB9NQc/4a0d/sfZjB32bj75o2ghx5teWOc86MVb9Qs=; b=kZnHhRbxspP2fRKlSWhkMl7NaYr1/Koxvrh73gYc+9nOfhsrEiFrx9X7vT1bST2McALo3pzIL 5BWJdBD9g1kBbDFCpb6sTwkSWj8Ew8MRUMhct7dda3KFn7uOHnZRtdR X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Sep 2026 17:41:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/244842 Signed-off-by: Mathieu Dubois-Briand --- meta/conf/distro/include/maintainers.inc | 1 + ...onst-qualifiers-to-fix-build-with-ISO-C23.patch | 34 ++++++++++++++++++++++ .../libfaketime/libfaketime_0.9.12.bb | 31 ++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 2966cddc0569..fc57eb1395a1 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -342,6 +342,7 @@ RECIPE_MAINTAINER:pn-libevdev = "Unassigned " RECIPE_MAINTAINER:pn-libevent = "Unassigned " RECIPE_MAINTAINER:pn-libexif = "Unassigned " RECIPE_MAINTAINER:pn-libfakekey = "Unassigned " +RECIPE_MAINTAINER:pn-libfaketime = "Mathieu Dubois-Briand " RECIPE_MAINTAINER:pn-libffi = "Unassigned " RECIPE_MAINTAINER:pn-libfm = "Unassigned " RECIPE_MAINTAINER:pn-libfm-extra = "Unassigned " diff --git a/meta/recipes-support/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch b/meta/recipes-support/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch new file mode 100644 index 000000000000..1696e7146e83 --- /dev/null +++ b/meta/recipes-support/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch @@ -0,0 +1,34 @@ +From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001 +From: Tomas Korbar +Date: Mon, 15 Dec 2025 11:03:21 +0100 +Subject: [PATCH] Add const qualifiers to fix build with ISO C23 + +Fix https://github.com/wolfcw/libfaketime/issues/524 + +Upstream-Status: Backport [https://github.com/wolfcw/libfaketime/pull/525] +--- + src/libfaketime.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/libfaketime.c b/src/libfaketime.c +index ef1dca9..02839c8 100644 +--- a/src/libfaketime.c ++++ b/src/libfaketime.c +@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base) + static void parse_ft_string(const char *user_faked_time) + { + struct tm user_faked_time_tm; +- char * tmp_time_fmt; ++ const char * tmp_time_fmt; + char * nstime_str; + + if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN)) +@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents) + bool str_array_contains(const char *haystack, const char *needle) + { + size_t needle_len = strlen(needle); +- char *pos = strstr(haystack, needle); ++ const char *pos = strstr(haystack, needle); + while (pos) { + if (pos == haystack || *(pos - 1) == ',') { + char nextc = *(pos + needle_len); diff --git a/meta/recipes-support/libfaketime/libfaketime_0.9.12.bb b/meta/recipes-support/libfaketime/libfaketime_0.9.12.bb new file mode 100644 index 000000000000..89e4eebeaa46 --- /dev/null +++ b/meta/recipes-support/libfaketime/libfaketime_0.9.12.bb @@ -0,0 +1,31 @@ +SUMMARY = "A library for faking the system time in user-space programs" +SECTION = "libs" +HOMEPAGE = "https://github.com/wolfcw/libfaketime" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRCREV = "3ccdd344aadf1e317156fa5fb7c881f2c4404778" + +SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;tag=v${PV};protocol=https \ + file://0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch \ +" + +CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" + +do_configure[noexec] = "1" + +do_compile () { + oe_runmake +} + +do_install () { + install -d ${D}${libdir}/faketime + oe_libinstall -C src libfaketime ${D}${libdir}/faketime + install -d ${D}${bindir} + install -m 0755 src/faketime ${D}${bindir} +} + +FILES:${PN} = "${bindir}/faketime ${libdir}/faketime/lib*${SOLIBS}" +FILES:${PN}-dev += "${libdir}/faketime/lib*${SOLIBSDEV}" + +BBCLASSEXTEND = "native" From patchwork Tue Sep 1 17:41:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 96973 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 313B2C61DD3 for ; Tue, 1 Sep 2026 17:41:59 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.567.1788284512744649830 for ; Tue, 01 Sep 2026 10:41:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=qQuk6xne; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 1C21D1A193B for ; Tue, 1 Sep 2026 17:41:51 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id E4CB06053C for ; Tue, 1 Sep 2026 17:41:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 239A811C792B9; Tue, 1 Sep 2026 19:41:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1788284510; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=kBrepcuKJmdhY237oE+x/Cox9y6bTbDRatLAjmlBukg=; b=qQuk6xneJQcujcM569uyfPijNQaZaSkXVnVHJl3WxOsR9dcj3hqpBFHbFhK0cynwd8hRSj vTX8YQuaPaEe0NAdWoAbp5PblRgmCx59ST6UEfhY+TA9gmMxtibfY4TO3fgFwQSdwxaoEC Ye/LIIDOa4nIxIjZLDpm7uPJZAiyc9TA/MPRoMnghsjVRHbS0Q4GDcd+ATkVIW1AQ5s/fx rztHvMa/oqpJeUsk4aPqIrgEXMOxIRqCuF/xvN82biNGsEAfugHWW7/zaPg3Zzy5gqcfY4 d4WikLK6iEn/KmE1MdjM36xgdoZWFvHXYH2ijGlBml6Dt17KTt/YC4o109xlGA== From: Mathieu Dubois-Briand Date: Tue, 01 Sep 2026 19:41:45 +0200 Subject: [PATCH 2/2] oeqa/selftest/reproducible: Use a fake time during build MIME-Version: 1.0 Message-Id: <20260901-mathieu-reproducible-faketime-v1-2-eac182548422@bootlin.com> References: <20260901-mathieu-reproducible-faketime-v1-0-eac182548422@bootlin.com> In-Reply-To: <20260901-mathieu-reproducible-faketime-v1-0-eac182548422@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788284507; l=4009; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=H0hdbqp6LLmIXrOFb4+cn3PznxLSTEVhRdW6+5NvEqs=; b=w/Tzx8K3LK2O9Ikj5ILVPiqRjmzxomoAOIbD78/5cJwE6unUkSxbPtBmMfl0Lx6kLgbHZdOAy 5cXNZ8z6tuwBlbU2+lx6Qx/VHoKUKNR7T70UPUiumMYa+qHjLqsibSz X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 01 Sep 2026 17:41:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/244843 Use a fake time during the second build, ensuring the build time is way different from the first build. Fixes [YOCTO #13509] Signed-off-by: Mathieu Dubois-Briand --- meta/lib/oeqa/selftest/cases/reproducible.py | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index 7adeaacd4f53..1a71b9832e34 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py @@ -229,7 +229,7 @@ class ReproducibleTests(OESelftestTestCase): bb.utils.mkdirhier(os.path.dirname(dest)) shutil.copyfile(source, dest) - def do_test_build(self, name, use_sstate): + def do_test_build(self, name, use_sstate, use_faketime, libfaketime_sysroot): capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes] tmpdir = os.path.join(self.topdir, name, 'tmp') @@ -295,7 +295,17 @@ class ReproducibleTests(OESelftestTestCase): d = get_bb_vars(capture_vars) try: # targets used to be called images - bitbake("--continue "+' '.join(getattr(self, 'images', self.targets))) + targets = ' '.join(getattr(self, 'images', self.targets)) + if use_faketime: + # 397 days: one year and 31/32 days: this will always be a + # different year, month and day of week. + # 2 hours, 2 minutes and 2 seconds: different values, even if we + # have some DST or leap second involved. + timespecs = "+397days +2hours +2minutes +2seconds" + runCmd(f"faketime '{timespecs}' bitbake --continue {targets}", + native_sysroot=libfaketime_sysroot) + else: + bitbake(f"--continue {targets}") except AssertionError as e: bitbake_failure_count += 1 self.logger.error("Bitbake failed! but keep going... Log:") @@ -320,9 +330,10 @@ class ReproducibleTests(OESelftestTestCase): # Build native utilities self.write_config('') - bitbake("diffoscope-native diffutils-native -c addto_recipe_sysroot") + bitbake("diffoscope-native diffutils-native libfaketime-native -c addto_recipe_sysroot") diffutils_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffutils-native") diffoscope_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffoscope-native") + libfaketime_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "libfaketime-native") if self.save_results: os.makedirs(self.save_results, exist_ok=True) @@ -338,10 +349,13 @@ class ReproducibleTests(OESelftestTestCase): fails = [] vars_list = [None, None] - for i, (name, use_sstate) in enumerate( - (('reproducibleA', self.build_from_sstate), - ('reproducibleB-extended', False))): - (variables, bitbake_failure_count) = self.do_test_build(name, use_sstate) + for i, (name, use_sstate, use_faketime) in enumerate( + (('reproducibleA', self.build_from_sstate, False), + ('reproducibleB-extended', False, True))): + (variables, bitbake_failure_count) = self.do_test_build(name, + use_sstate, + use_faketime, + libfaketime_sysroot) if bitbake_failure_count > 0: self.logger.error('%s build failed. Trying to compute built packages differences but the test will fail.' % name) fails.append("Bitbake %s failure" % name)