[PATCH] Makefile.local: have all files in release tarball be owned by root

Subject: [PATCH] Makefile.local: have all files in release tarball be owned by root

Date: Sat, 8 Apr 2017 22:00:17 +0300

To: notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: Tomi Ollila


The tar content `git archive` creates (reproducibly) have owner and
group set to 'root'. (GNU) tar writes user ids to the added file
`version` by default. The contents of tar archive looks better and
more consistent when owner and group in all files are the same.

While at it, split this long command line to multiple lines.
---

Tested with make notmuch-0.24.1+63~g9338dda.tar.gz -- YMMV.

 Makefile.local | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile.local b/Makefile.local
index 03eafaa..3d3474e 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -31,7 +31,9 @@ $(TAR_FILE):
 	fi ; \
 	git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ $$ref > $(TAR_FILE).tmp
 	echo $(VERSION) > version.tmp
-	tar --append -f $(TAR_FILE).tmp --transform s_^_$(PACKAGE)-$(VERSION)/_  --transform 's_.tmp$$__' version.tmp
+	tar --owner root --group root --append -f $(TAR_FILE).tmp \
+		--transform s_^_$(PACKAGE)-$(VERSION)/_  \
+		--transform 's_.tmp$$__' version.tmp
 	rm version.tmp
 	gzip < $(TAR_FILE).tmp > $(TAR_FILE)
 	@echo "Source is ready for release in $(TAR_FILE)"
-- 
2.9.3


Thread: