mirror of
https://git.yoctoproject.org/poky
synced 2026-03-10 01:09:40 +01:00
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>
28 lines
774 B
Diff
28 lines
774 B
Diff
lsb-release maintains it's own copy of help2man. Include the support
|
|
for specifying SOURCE_DATE_EPOCH from upstream.
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
|
|
|
diff --git a/help2man b/help2man
|
|
index 13015c2..63439db 100755
|
|
--- a/help2man
|
|
+++ b/help2man
|
|
@@ -173,7 +173,14 @@ my ($help_text, $version_text) = map {
|
|
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
|
} qw(help), $opt_version_key;
|
|
|
|
-my $date = strftime "%B %Y", localtime;
|
|
+my $epoch_secs = time;
|
|
+if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/)
|
|
+{
|
|
+ $epoch_secs = $1;
|
|
+ $ENV{TZ} = 'UTC0';
|
|
+}
|
|
+
|
|
+my $date = strftime "%B %Y", localtime $epoch_secs;
|
|
(my $program = $ARGV[0]) =~ s!.*/!!;
|
|
my $package = $program;
|
|
my $version;
|