Skip to content

Commit

Permalink
Exclude tar flags for non-Linux platforms.
Browse files Browse the repository at this point in the history
Exclude tar flags for non-Linux platforms as they don't support
reproducible builds at the moment.
  • Loading branch information
russjones authored and fspmarshall committed Aug 24, 2021
1 parent 9d2851e commit 3d1459a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ ifeq ("$(OS)","windows")
BINARIES=$(BUILDDIR)/tsh
endif

# On platforms that support reproducible builds (at the moment, only Linux)
# ensure the archive is created in a reproducible manner.
TAR_FLAGS ?=
ifeq ("$(OS)","linux")
TAR_FLAGS = --sort=name --owner=root:0 --group=root:0 --mtime='UTC 2015-03-02' --format=gnu
endif


VERSRC = version.go gitref.go api/version.go

KUBECONFIG ?=
Expand Down Expand Up @@ -277,7 +285,7 @@ release-unix: clean full
CHANGELOG.md \
teleport/
echo $(GITTAG) > teleport/VERSION
tar --sort=name --owner=root:0 --group=root:0 --mtime='UTC 2015-03-02' --format=gnu -c teleport | gzip -n > $(RELEASE).tar.gz
tar $(TAR_FLAGS) -c teleport | gzip -n > $(RELEASE).tar.gz
rm -rf teleport
@echo "---> Created $(RELEASE).tar.gz."
@if [ -f e/Makefile ]; then \
Expand Down

0 comments on commit 3d1459a

Please sign in to comment.