[Reproducible-builds] Bug#791584: kfreebsd-source-10.1: umask setting can affect build

2015-07-06 Thread Steven Chamberlain
Package: kfreebsd-source-10.1
Version: 10.1~svn274115-6
Severity: wishlist
Tags: patch pending
User: reproducible-builds@lists.alioth.debian.org   

 
Usertags: timestamps

Hi,

The kfreebsd-10 (kernel) packaging distributes a source tarball in  

 
kfreebsd-source, a binary arch-indep package.

Files and directories in the tarball are owned by root:src, but
permissions depend on the package builder's umask setting.  To ensure
reproducibility, I guess we could chmod before building the tarball:

--- debian/rules(revision 5716)
+++ debian/rules(working copy)
@@ -170,6 +170,7 @@
 
mkdir -p $(SOURCE_PACKAGE)/usr/src
chown -R root.src $(SRC_DIR)
+   chmod -R go+r-w $(SRC_DIR)
# Clamp timestamps to be no newer than last changelog entry, see
# https://wiki.debian.org/ReproducibleBuilds/TimestampsInTarball
find $(SRC_DIR) -newermt "$(BUILD_DATE)" -print0 \

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64-xenhvm-ipsec
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds


[Reproducible-builds] Bug#791584: kfreebsd-source-10.1: umask setting can affect build

2015-07-06 Thread Steven Chamberlain
Steven Chamberlain wrote:
> [...] I guess we could chmod before building the tarball:

On second thoughts, that's not as efficient as using tar's --mode option
so I'll use that.  The example given on the Debian Wiki page is more
comprehensive than my chmod anyway.

--- debian/rules(revision 5717)
+++ debian/rules(revision 5719)
@@ -176,8 +176,11 @@
 | xargs -0r touch --no-dereference --date="$(BUILD_DATE)"
# Create tarball with files sorted in a stable order, see
# https://wiki.debian.org/ReproducibleBuilds/FileOrderInTarballs
+   # and normalised file permissions regardless of umask, see
+   # 
https://wiki.debian.org/ReproducibleBuilds/VaryingPermissionsInTarballs
find $(SRC_DIR) -print0 | LC_ALL=C sort -z \
 | tar --null --no-recursion --files-from - \
+   --mode=go=rX,u+rw,a-s \
-cJf $(SOURCE_PACKAGE)/usr/src/$(SRC_TAR)
 
touch install-indep-stamp

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org

___
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds