[arch-commits] Commit in lsb-release/trunk (2 files)
Jonas Witschel
diabonas at archlinux.org
Sat Jul 11 15:19:46 UTC 2020
Date: Saturday, July 11, 2020 @ 15:19:45
Author: diabonas
Revision: 663268
upgpkg: lsb-release 1.4-18: respect SOURCE_DATE_EPOCH in man page text
My previous commit missed the date embedded in the text of the man page, so the
package would only have been reproducible for this month.
Added:
lsb-release/trunk/lsb_release_make_man_page_reproducible.patch
Modified:
lsb-release/trunk/PKGBUILD
----------------------------------------------+
PKGBUILD | 22 +++++++------
lsb_release_make_man_page_reproducible.patch | 41 +++++++++++++++++++++++++
2 files changed, 54 insertions(+), 9 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-11 14:33:50 UTC (rev 663267)
+++ PKGBUILD 2020-07-11 15:19:45 UTC (rev 663268)
@@ -4,7 +4,7 @@
pkgname=lsb-release
pkgver=1.4
-pkgrel=17
+pkgrel=18
pkgdesc="LSB version query program"
arch=('any')
url="http://www.linuxbase.org/"
@@ -12,20 +12,24 @@
depends=('bash')
install=lsb-release.install
source=(https://downloads.sourceforge.net/lsb/$pkgname-$pkgver.tar.gz
- lsb_release_description.patch)
+ lsb_release_description.patch
+ lsb_release_make_man_page_reproducible.patch)
sha512sums=('84f6f8794380463587005043f601b7a40190cd9e3409abff7f5ce7658cf029a14346eff87838296d90307192bdeff68cc00480c5c04814da7acdb3e220640fde'
- '145ef64f90f5e6cc59075679e640cf7c1ad02617c12eff17f10b05c1cc219591fdba1b27be2b2c8480742aed24ce81d6a7badcbaca6772faea4ebc6a55695b62')
+ '145ef64f90f5e6cc59075679e640cf7c1ad02617c12eff17f10b05c1cc219591fdba1b27be2b2c8480742aed24ce81d6a7badcbaca6772faea4ebc6a55695b62'
+ 'ab64a1d236d00a30a48e3af2c5bdfa0aad0183ebe0df4f2b0c6af58530c2a1fdac1b0a5cdd8a1800d5f8405f44562603cddf28eb318b5badaabd49a82e0b7e83')
-build() {
+prepare() {
cd "$srcdir/$pkgname-$pkgver"
patch -Np0 < "$srcdir/lsb_release_description.patch"
+ patch -Np1 < "$srcdir/lsb_release_make_man_page_reproducible.patch"
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
make
-
- # The automatically generated gzipped man page includes a timestamp and is therefore not reproducible,
- # uncompress it again and rely on makepkg to compress the man page reproducibly
- gunzip lsb_release.1.gz
}
package() {
@@ -37,6 +41,6 @@
echo "DISTRIB_RELEASE=rolling" >> "$pkgdir/etc/lsb-release"
echo "DISTRIB_DESCRIPTION=\"Arch Linux\"" >> "$pkgdir/etc/lsb-release"
- install -Dm 644 lsb_release.1 "$pkgdir/usr/share/man/man1/lsb_release.1"
+ install -Dm 644 lsb_release.1.gz "$pkgdir/usr/share/man/man1/lsb_release.1.gz"
install -Dm 755 lsb_release "$pkgdir/usr/bin/lsb_release"
}
Added: lsb_release_make_man_page_reproducible.patch
===================================================================
--- lsb_release_make_man_page_reproducible.patch (rev 0)
+++ lsb_release_make_man_page_reproducible.patch 2020-07-11 15:19:45 UTC (rev 663268)
@@ -0,0 +1,41 @@
+From 1f5eb29ad59e7302e0407855333fbf1377f6f127 Mon Sep 17 00:00:00 2001
+From: Jonas Witschel <diabonas at archlinux.org>
+Date: Sat, 11 Jul 2020 17:02:59 +0200
+Subject: [PATCH] Make man page reproducible
+
+Respect SOURCE_DATE_EPOCH and remove the embedded timestamp from the gzipped
+man page.
+---
+ Makefile | 2 +-
+ help2man | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 04fdecd..d2f6230 100644
+--- a/Makefile
++++ b/Makefile
+@@ -17,7 +17,7 @@ man: lsb_release.1.gz
+
+ lsb_release.1.gz: lsb_release
+ @./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release >lsb_release.1
+- @gzip -9f lsb_release.1
++ @gzip -9f -n lsb_release.1
+
+ install: all
+ install -D -m 644 lsb_release.1.gz ${mandir}/man1/lsb_release.1.gz
+diff --git a/help2man b/help2man
+index 13015c2..d448342 100755
+--- a/help2man
++++ b/help2man
+@@ -173,7 +173,7 @@ 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 $date = strftime "%B %Y", gmtime($ENV{SOURCE_DATE_EPOCH} || time);
+ (my $program = $ARGV[0]) =~ s!.*/!!;
+ my $package = $program;
+ my $version;
+--
+2.27.0
+
More information about the arch-commits
mailing list