From cb8c4d90e1603912617c54ea99371fd0d77ae282 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 29 Mar 2021 18:28:32 +0100 Subject: [PATCH] podwrapper: Use the tarball release date to calculate the stable date. Fixes: commit eb53d74ba2e5e9086a5ac8679d55e6a338397e07 --- podwrapper.pl.in | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/podwrapper.pl.in b/podwrapper.pl.in index 2af3d8463..49305521c 100755 --- a/podwrapper.pl.in +++ b/podwrapper.pl.in @@ -297,32 +297,7 @@ die "$progname: ./configure substitutions were not performed" $package_name && $package_version; # Create a stable date (thanks Hilko Bengen). -my $date; -my $filename = "$abs_top_srcdir/ChangeLog"; -if (-r $filename) { - open FILE, $filename or die "$progname: $filename: $!"; - while () { - if (/^Date:\s+...\s+(...)\s+(\d+)\s+..:..:..\s+(\d{4})\s+.*$/) { - my $i = 0; - my %month = - map { $_ => ++$i } - (qw< Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec >); - $date = sprintf '%04d-%02d-%02d', $3, $month{$1}, $2; - last; - } - } - close FILE; -} -$filename = "$abs_top_srcdir/.git"; -if (!$date && -d $filename) { - local $ENV{GIT_DIR} = $filename; - $_ = `git show -s --format=%ci`; - $date = $1 if /^(\d+-\d+-\d+)\s/; -} -if (!$date) { - my ($day, $month, $year) = (gmtime($ENV{SOURCE_DATE_EPOCH} || time))[3,4,5]; - $date = sprintf ("%04d-%02d-%02d", $year+1900, $month+1, $day); -} +my $date = "@RELEASE_DATE@"; # Create a release string. my $release = "$package_name-$package_version";