Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ masterfilesdir=$(prefix)/masterfiles

EXTRA_DIST = README.md inventory/README.md lib/README.md CONTRIBUTING.md LICENSE CFVERSION modules/promises

# Do not reveal usernames of the buildslave
TAR_OPTIONS = --owner=0 --group=0
# Do not reveal usernames of the buildslave, and emit members in a stable
# order so two builds of the same source tree produce an identical tarball.
TAR_OPTIONS = --owner=0 --group=0 --sort=name
export TAR_OPTIONS

# Store the permissions properly in the tarball for acceptance tests to succeed
# Store the permissions properly in the tarball for acceptance tests to succeed.
# Also normalize directory permissions (which otherwise leak the builder's
# umask) and, when SOURCE_DATE_EPOCH is set, clamp every mtime to it so the
# "make dist" source tarball is reproducible.
dist-hook:
find $(distdir) -name '*.cf*' | xargs chmod go-w
find $(distdir) -type d -exec chmod 755 {} +
if [ -n "$$SOURCE_DATE_EPOCH" ]; then \
find $(distdir) -exec touch -d @$$SOURCE_DATE_EPOCH {} + ; \
fi

tar-package:
pkgdir=`mktemp -d` && export pkgdir && \
Expand All @@ -24,8 +32,11 @@ tar-package:
$(MAKE) prefix=$$pkgdir install && \
( cd $$pkgdir && \
find . -name '*.cf*' | xargs -n1 chmod go-w && \
if [ -n "$$SOURCE_DATE_EPOCH" ]; then \
find . -exec touch -d @$$SOURCE_DATE_EPOCH {} + ; \
fi && \
tardir=. && $(am__tar) | \
GZIP=$(GZIP_ENV) gzip -c \
GZIP=$(GZIP_ENV) gzip -nc \
> "$$origdir"/$(PACKAGE)-$(VERSION)-$(RELEASE).pkg.tar.gz \
) ; \
[ x$$pkgdir != x ] && rm -rf $$pkgdir
Expand Down
Loading