[OE-core] [PATCH 1/1] rpm_4.14.0: clamp timestamps by default
Juro Bystricky
juro.bystricky at intel.com
Tue Jan 2 23:16:13 UTC 2018
Improve reproducibility by making sure that timestamps
in built rpms are not later than the value of SOURCE_DATE_EPOCH as
found in the environment.
Timestamps as usual when SOURCE_DATE_EPOCH is not set.
[YOCTO #12425]
Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
---
.../recipes-devtools/rpm/files/0001-support-sde.patch | 19 +++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.0.bb | 1 +
2 files changed, 20 insertions(+)
create mode 100644 meta/recipes-devtools/rpm/files/0001-support-sde.patch
diff --git a/meta/recipes-devtools/rpm/files/0001-support-sde.patch b/meta/recipes-devtools/rpm/files/0001-support-sde.patch
new file mode 100644
index 0000000..b947c62d
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-support-sde.patch
@@ -0,0 +1,19 @@
+
+Improve reproducibility: clamp timestamps by default.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Juro Bystricky <juro.bystricky at intel.com>
+
+diff --git a/macros.in b/macros.in
+index d086248..af39c4a 100644
+--- a/macros.in
++++ b/macros.in
+@@ -248,7 +248,7 @@ package or when debugging this package.\
+ # If true, make sure that timestamps in built rpms
+ # are not later than the value of SOURCE_DATE_EPOCH.
+ # Is ignored when SOURCE_DATE_EPOCH is not set.
+-%clamp_mtime_to_source_date_epoch 0
++%clamp_mtime_to_source_date_epoch 1
+
+ # The directory where newly built binary packages will be written.
+ %_rpmdir %{_topdir}/RPMS
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.0.bb b/meta/recipes-devtools/rpm/rpm_4.14.0.bb
index e4e9c3e..83af18e 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.0.bb
@@ -40,6 +40,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
file://0001-perl-disable-auto-reqs.patch \
+ file://0001-support-sde.patch \
"
PE = "1"
--
2.7.4
More information about the Openembedded-core
mailing list