current GNUmakefile.in, 1.260, 1.261 configure.in, 1.210, 1.211

Fabian Keil <[email protected]> Thu, 25 May 2017 11:14:30 +0000
Newsgroups gmane.comp.web.privoxy.cvs
Message-ID <[email protected]>
Update of /cvsroot/ijbswa/current
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1792

Modified Files:
	GNUmakefile.in configure.in 
Log Message:
Add a 'reproducible-tarball-dist' target

It's currently separate from the "tarball-dist" target
because it requires a tar implementation with mtree spec
support.

It's far from being perfect and does not enforce a
reproducible mode, but it's better than nothing.

After the git migration it can probably be removed anyway.


Index: GNUmakefile.in
===================================================================
RCS file: /cvsroot/ijbswa/current/GNUmakefile.in,v
retrieving revision 1.260
retrieving revision 1.261
diff -C2 -d -r1.260 -r1.261
*** GNUmakefile.in	20 May 2017 09:27:07 -0000	1.260
--- GNUmakefile.in	25 May 2017 11:14:27 -0000	1.261
***************
*** 45,48 ****
--- 45,50 ----
  SNAPVERSION   = $(VERSION)-$(shell date "+%Y%m%d")
  
+ SOURCE_DATE_EPOCH = @SOURCE_DATE_EPOCH@
+ MTREE_SPEC_FILE = privoxy-$(VERSION)-$(CODE_STATUS).spec
  
  #############################################################################
***************
*** 420,423 ****
--- 422,446 ----
  	@$(ECHO) Tarball distribution created.
  
+ # Create a mtree spec file that can be used to get a reproducible tar ball
+ mtree-spec:
+ 	$(LN) -s `pwd` ../privoxy-$(VERSION)-$(CODE_STATUS)
+ 	$(ECHO) "#mtree 2.0" > $(MTREE_SPEC_FILE)
+ 	for i in `find . -type f -a -not \( -path "*/CVS*" -o -name ".*" \
+ 	-o -path "*/debian/*" -o -path "*/actions/*" -o -name "*.php" -o \
+ 	-name "PACKAGERS" -o -path "*.git/*" -o -name "*.spec" \) | env -i sort`; do \
+ 	   $(ECHO) "privoxy-$(VERSION)-$(CODE_STATUS)/$$i time=$(SOURCE_DATE_EPOCH) type=file uname=privoxy gname=privoxy mode=0555"; \
+ 	done >> $(MTREE_SPEC_FILE)
+ 	$(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
+ 
+ # Create a reproducible tarball.
+ # Requires a tar implementation with mtree support.
+ reproducible-tarball-dist: dist-check clean clobber mtree-spec
+ 	$(LN) -s `pwd` ../privoxy-$(VERSION)-$(CODE_STATUS)
+ 
+ 	$(TAR) cvhf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar -C .. @privoxy-$(VERSION)-$(CODE_STATUS)/$(MTREE_SPEC_FILE)
+ 	$(GZIP_PROG) -n privoxy-$(VERSION)-$(CODE_STATUS)-src.tar
+ 	$(RM) ../privoxy-$(VERSION)-$(CODE_STATUS) $(MTREE_SPEC_FILE)
+ 	@$(ECHO) Reproducible tarball distribution created.
+ 
  # anonymously ncftps the tarball to sourceforge
  tarball-upload:

Index: configure.in
===================================================================
RCS file: /cvsroot/ijbswa/current/configure.in,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** configure.in	4 May 2017 14:34:28 -0000	1.210
--- configure.in	25 May 2017 11:14:27 -0000	1.211
***************
*** 82,85 ****
--- 82,89 ----
  CODE_STATUS="UNRELEASED"
  
+ dnl Timestamp (date +%s) used by the mtree-spec target.
+ dnl Should be updated before releases but forgetting it isn't critical.
+ SOURCE_DATE_EPOCH=1494070262
+ 
  dnl CODE_STATUS can be "alpha", "beta", "stable" or "UNRELEASED",
  dnl and will be used for CGI output. Increment version number and
***************
*** 95,98 ****
--- 99,103 ----
  AC_SUBST(VERSION_POINT)
  AC_SUBST(CODE_STATUS)
+ AC_SUBST(SOURCE_DATE_EPOCH)
  
  dnl


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot