diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-07-09 20:28:44 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-07-10 09:00:33 +0200 |
commit | 2118a0f08fda28754d966110166374d7a813a753 (patch) | |
tree | da75878e88948577ca5619c7c83f77fb7ae6c02c /source/a/pkgtools | |
parent | 23f4d09946da280124d3818145a37c25f9e11442 (diff) | |
download | current-2118a0f08fda28754d966110166374d7a813a753.tar.gz current-2118a0f08fda28754d966110166374d7a813a753.tar.xz |
Mon Jul 9 20:28:44 UTC 201820180709202844
a/kernel-generic-4.14.54-x86_64-1.txz: Upgraded.
a/kernel-huge-4.14.54-x86_64-1.txz: Upgraded.
a/kernel-modules-4.14.54-x86_64-1.txz: Upgraded.
a/pkgtools-15.0-noarch-21.txz: Rebuilt.
Modify makepkg to make reproducible builds possible:
makepkg: sort symlinks in doinst.sh
makepkg: sort the filelist piped into tar
makepkg: add the -n flag to gzip to avoid embedding a timestamp
makepkg: support the SOURCE_DATE_EPOCH environment variable
Thanks to David Spencer.
d/kernel-headers-4.14.54-x86-1.txz: Upgraded.
k/kernel-source-4.14.54-noarch-1.txz: Upgraded.
IP_FIB_TRIE_STATS n -> y
NETWORK_PHY_TIMESTAMPING n -> y
NET_KEY_MIGRATE n -> y
NF_CONNTRACK_EVENTS n -> y
NF_CONNTRACK_TIMEOUT n -> y
NF_CONNTRACK_TIMESTAMP n -> y
TCP_MD5SIG n -> y
VLAN_8021Q_MVRP n -> y
XFRM_MIGRATE n -> y
+DP83640_PHY m
+MRP m
Thanks to Wayne, aka slackwhere on LQ.
l/QScintilla-2.10.7-x86_64-1.txz: Upgraded.
isolinux/initrd.img: Rebuilt.
kernels/*: Upgraded.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/a/pkgtools')
-rw-r--r-- | source/a/pkgtools/manpages/makepkg.8 | 7 | ||||
-rwxr-xr-x | source/a/pkgtools/pkgtools.SlackBuild | 2 | ||||
-rw-r--r-- | source/a/pkgtools/scripts/makepkg | 16 |
3 files changed, 20 insertions, 5 deletions
diff --git a/source/a/pkgtools/manpages/makepkg.8 b/source/a/pkgtools/manpages/makepkg.8 index 16a98f3fb..488519e1f 100644 --- a/source/a/pkgtools/manpages/makepkg.8 +++ b/source/a/pkgtools/manpages/makepkg.8 @@ -80,6 +80,13 @@ with pkgtools version < 15.0. .B --xattrs Support storing extended attributes in the package. The resulting package will not be compatible with pkgtools version < 15.0. +.SH ENVIRONMENT +.TP +.B SOURCE_DATE_EPOCH +A UNIX date-time (seconds since 1 Jan 1970). If set, any newer timestamps in the package +will be rewritten ("clamped") to this date-time. See +.I https://reproducible-builds.org/specs/source-date-epoch/ +for more details. .SH INSTALLATION SCRIPTS There are 3 types of installation scripts supported in the Slackware package system. diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild index bdcb11ac0..749641335 100755 --- a/source/a/pkgtools/pkgtools.SlackBuild +++ b/source/a/pkgtools/pkgtools.SlackBuild @@ -30,7 +30,7 @@ PKGNAM=pkgtools # *** UPDATE THESE WITH EACH BUILD: VERSION=15.0 ARCH=${ARCH:-noarch} -BUILD=${BUILD:-20} +BUILD=${BUILD:-21} # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information diff --git a/source/a/pkgtools/scripts/makepkg b/source/a/pkgtools/scripts/makepkg index f9241cb96..63ab83cb8 100644 --- a/source/a/pkgtools/scripts/makepkg +++ b/source/a/pkgtools/scripts/makepkg @@ -21,6 +21,9 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +# Mon 2 Jul 15:32:14 UTC 2018 +# Sort file lists and support SOURCE_DATE_EPOCH, for reproducibility. +# # Mon May 21 18:31:20 UTC 2018 # Add --compress option, usually used to change the preset compression level # or block size. @@ -163,6 +166,11 @@ while [ 0 ]; do fi done +unset MTIME +if [ -n "${SOURCE_DATE_EPOCH}" ]; then + MTIME="--clamp-mtime --mtime=@${SOURCE_DATE_EPOCH}" +fi + PACKAGE_NAME="$1" TARGET_NAME="$(dirname $PACKAGE_NAME)" PACKAGE_NAME="$(basename $PACKAGE_NAME)" @@ -171,14 +179,14 @@ PACKAGE_NAME="$(basename $PACKAGE_NAME)" if [ ! "$(basename $PACKAGE_NAME .tgz)" = "$PACKAGE_NAME" ]; then EXTENSION="tgz" COMPEXT="gz" - COMPRESSOR="gzip ${COMPRESS_OPTION} -c" + COMPRESSOR="gzip ${COMPRESS_OPTION} -cn" if ! which gzip 1> /dev/null 2> /dev/null ; then echo "ERROR: gzip compression utility not found in \$PATH." exit 3 fi elif [ ! "$(basename $PACKAGE_NAME .tar.gz)" = "$PACKAGE_NAME" ]; then EXTENSION="tar.gz" - COMPRESSOR="gzip ${COMPRESS_OPTION} -c" + COMPRESSOR="gzip ${COMPRESS_OPTION} -cn" if ! which gzip 1> /dev/null 2> /dev/null ; then echo "ERROR: gzip compression utility not found in \$PATH." exit 3 @@ -290,7 +298,7 @@ echo echo "Searching for symbolic links:" # Get rid of possible pre-existing trouble: INST=$(mktemp $TMP/makepkg.XXXXXX) -find . -type l -printf "%p\t%l\n" | sed 's,^\./,, ; s, ,\\ ,g' | tee $INST +find . -type l -printf "%p\t%l\n" | LC_COLLATE=C sort | sed 's,^\./,, ; s, ,\\ ,g' | tee $INST if [ ! "$(cat $INST)" = "" ]; then echo echo "Making symbolic link creation script:" @@ -404,7 +412,7 @@ rm -f ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} # find ./ | sed '2,$s,^\./,,' | cpio --quiet -ovHustar > ${TARGET_NAME}/${TAR_NAME}.tar # Create the package: -find ./ | sed '2,$s,^\./,,' | tar --no-recursion $ACLS $XATTRS -T - -cvf - | $COMPRESSOR > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} +find ./ | LC_COLLATE=C sort | sed '2,$s,^\./,,' | tar --no-recursion $ACLS $XATTRS $MTIME -T - -cvf - | $COMPRESSOR > ${TARGET_NAME}/${TAR_NAME}.${EXTENSION} ERRCODE=$? if [ ! $ERRCODE = 0 ]; then echo "ERROR: $COMPRESSOR returned error code $ERRCODE -- makepkg failed." |