summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2021-05-07 14:35:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-09 23:30:14 +0100
commit3d6e67b389344e3f0932c949bac62b2a0a9b5b02 (patch)
treebceb157b18828ca4ae09dcab704c76ddbfc6304f /meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch
parent3eab7234311619d8e79a39ebaccf85a7053ddef7 (diff)
downloadpoky-3d6e67b389344e3f0932c949bac62b2a0a9b5b02.tar.gz
lsb-release: fix reproducibility failure
Make sure help2man output is reproducible. Fixes: | .\"·DO·NOT·MODIFY·THIS·FILE!··It·was·generated·by·help2man·1.022. .\"·DO·NOT·MODIFY·THIS·FILE!··It·was·generated·by·help2man·1.022. | .TH·FSG·"1"·"April·2021"·"FSG·lsb_release·v1.4"·FSG .TH·FSG·"1"·"May·2021"·"FSG·lsb_release·v1.4"·FSG | .SH·NAME 3 .SH·NAME (From OE-Core rev: 49371207a7f1fe3d3feb7b8b9aabb62b43ae34d1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch')
-rw-r--r--meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch b/meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch
new file mode 100644
index 0000000000..f32cd18370
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb-release/help2man-reproducibility.patch
@@ -0,0 +1,27 @@
1lsb-release maintains it's own copy of help2man. Include the support
2for specifying SOURCE_DATE_EPOCH from upstream.
3
4Upstream-Status: Pending
5
6Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
7
8diff --git a/help2man b/help2man
9index 13015c2..63439db 100755
10--- a/help2man
11+++ b/help2man
12@@ -173,7 +173,14 @@ my ($help_text, $version_text) = map {
13 or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
14 } qw(help), $opt_version_key;
15
16-my $date = strftime "%B %Y", localtime;
17+my $epoch_secs = time;
18+if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
19+{
20+ $epoch_secs = $1;
21+ $ENV{TZ} = 'UTC0';
22+}
23+
24+my $date = strftime "%B %Y", localtime $epoch_secs;
25 (my $program = $ARGV[0]) =~ s!.*/!!;
26 my $package = $program;
27 my $version;