linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rt-tests][PATCH] rt-tests: make manpages builds reproducible
@ 2020-02-25 23:42 Jeremy A. Puhlman
  2020-02-26 17:18 ` John Kacur
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremy A. Puhlman @ 2020-02-25 23:42 UTC (permalink / raw)
  To: williams, jkacur; +Cc: linux-rt-users, Jeremy Puhlman

From: Jeremy Puhlman <jpuhlman@mvista.com>

Add -n to gzip call to make the build output
of the manpages reproducible.

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [rt-tests][PATCH] rt-tests: make manpages builds reproducible
  2020-02-25 23:42 [rt-tests][PATCH] rt-tests: make manpages builds reproducible Jeremy A. Puhlman
@ 2020-02-26 17:18 ` John Kacur
  2020-02-26 17:40   ` Jeremy A. Puhlman
  0 siblings, 1 reply; 4+ messages in thread
From: John Kacur @ 2020-02-26 17:18 UTC (permalink / raw)
  To: Jeremy A. Puhlman; +Cc: williams, linux-rt-users



On Tue, 25 Feb 2020, Jeremy A. Puhlman wrote:

> From: Jeremy Puhlman <jpuhlman@mvista.com>
> 
> Add -n to gzip call to make the build output
> of the manpages reproducible.
> 
> Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
> ---
>  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?

Thanks

John

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rt-tests][PATCH] rt-tests: make manpages builds reproducible
  2020-02-26 17:18 ` John Kacur
@ 2020-02-26 17:40   ` Jeremy A. Puhlman
  2020-02-27 18:29     ` John Kacur
  0 siblings, 1 reply; 4+ messages in thread
From: Jeremy A. Puhlman @ 2020-02-26 17:40 UTC (permalink / raw)
  To: John Kacur; +Cc: williams, linux-rt-users



On 2/26/2020 9:18 AM, John Kacur wrote:
>
> On Tue, 25 Feb 2020, Jeremy A. Puhlman wrote:
>
>> From: Jeremy Puhlman <jpuhlman@mvista.com>
>>
>> Add -n to gzip call to make the build output
>> of the manpages reproducible.
>>
>> Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
>> ---
>>   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@mvista.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [rt-tests][PATCH] rt-tests: make manpages builds reproducible
  2020-02-26 17:40   ` Jeremy A. Puhlman
@ 2020-02-27 18:29     ` John Kacur
  0 siblings, 0 replies; 4+ messages in thread
From: John Kacur @ 2020-02-27 18:29 UTC (permalink / raw)
  To: Jeremy A. Puhlman; +Cc: williams, linux-rt-users

[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]



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@mvista.com>
> >>
> >> Add -n to gzip call to make the build output
> >> of the manpages reproducible.
> >>
> >> Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
> >> ---
> >>   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@mvista.com
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-27 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 23:42 [rt-tests][PATCH] rt-tests: make manpages builds reproducible Jeremy A. Puhlman
2020-02-26 17:18 ` John Kacur
2020-02-26 17:40   ` Jeremy A. Puhlman
2020-02-27 18:29     ` John Kacur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).