Re: [rt-tests][PATCH] rt-tests: make manpages builds reproducible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 26 Feb 2020, Jeremy A. Puhlman wrote:

> 
> 
> On 2/26/2020 9:18 AM, John Kacur wrote:
> >
> > On Tue, 25 Feb 2020, Jeremy A. Puhlman wrote:
> >
> >> From: Jeremy Puhlman <jpuhlman@xxxxxxxxxx>
> >>
> >> Add -n to gzip call to make the build output
> >> of the manpages reproducible.
> >>
> >> Signed-off-by: Jeremy A. Puhlman <jpuhlman@xxxxxxxxxx>
> >> ---
> >>   Makefile | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/Makefile b/Makefile
> >> index 8747971..1b37ba7 100644
> >> --- a/Makefile
> >> +++ b/Makefile
> >> @@ -181,7 +181,7 @@ ssdd: $(OBJDIR)/ssdd.o $(OBJDIR)/librttest.a
> >>    $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(RTTESTLIB)
> >>   
> >>   %.8.gz: %.8
> >> -	gzip -c $< > $@
> >> +	gzip -nc $< > $@
> >>   
> >>   %.8.bz2: %.8
> >>   	bzip2 -c $< > $@
> >> -- 
> >> 2.20.1
> >>
> >>
> > Could you explain to me how this makes the build output of manpages more
> > reproducible?
> 
> gzip adds the name of the file(not really an issue) and the modification time
> into the header of the
> gzipped archive.  Different modification times can cause the archives to have
> different md5sums even
> though the content is identical.  Adding -n causes the archives to always be
> identical regardless of when
> they are built so long as the content is identical. Its less of an
> issue(provided the build system in question
> doesn't touch or modify the man pages) when you are building from released
> tarballs, but if you build
> from git, the modification time of the file is when the file was checked out.
> 
> Tools like rpm will object to the files being installed(like say multilib
> versions of the same packages) together
> due different md5sums and the fact that they are not elf binaries, even though
> the files are the same.
> 
> 
> -- 
> Jeremy A. Puhlman
> jpuhlman@xxxxxxxxxx
> 
> 
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux