unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#28015] [PATCH] Reproducible issue for djvulibre
@ 2017-08-08  7:31 Z. Ren
  2017-08-22 12:55 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Z. Ren @ 2017-08-08  7:31 UTC (permalink / raw)
  To: 28015

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

Hi!
While conducting a study inspired by the "reproducible builds" practice [1], we have noticed that the package djvulibre could not be built reproducibly.

After investigation, we observe that the unreproducibility is caused by "desktopfiles/Makefile.in", in which the command gzip is invoked without the "-n" argument. Consequently, timestamp is captured in the built file "share/icons/hicolor/scalable/mimetypes/djvu.svgz".

The attached patch adds the argument to the gzip command. Once applied, djvulibre could be built reproducibly.

 [1]: https://wiki.debian.org/ReproducibleBuilds

[-- Attachment #2: 0001-reproducible-fix-for-djvulibre.patch --]
[-- Type: application/octet-stream, Size: 973 bytes --]

From b068209414c8f176abd8603ad75f91dc79cd1f31 Mon Sep 17 00:00:00 2001
From: Z. Ren <zren@dlut.edu.cn>
Date: Tue, 8 Aug 2017 14:22:18 +0800
Subject: [PATCH] reproducible fix for djvulibre

---
 gnu/packages/djvu.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/djvu.scm b/gnu/packages/djvu.scm
index e739df377..a374174b7 100644
--- a/gnu/packages/djvu.scm
+++ b/gnu/packages/djvu.scm
@@ -34,6 +34,13 @@
                (base32
                 "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+        (add-after 'unpack 'reproducible
+         (lambda _
+          (substitute* "desktopfiles/Makefile.in"
+           (("gzip") "gzip -n")))))))
     (home-page "http://djvu.sourceforge.net/")
     (synopsis "Implementation of DjVu, the document format")
     (description "DjVuLibre is an implementation of DjVu,
-- 
2.11.0


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

* [bug#28015] [PATCH] Reproducible issue for djvulibre
  2017-08-08  7:31 [bug#28015] [PATCH] Reproducible issue for djvulibre Z. Ren
@ 2017-08-22 12:55 ` Ludovic Courtès
  2017-08-23  9:48   ` [bug#28015] " Z. Ren
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-08-22 12:55 UTC (permalink / raw)
  To: Z. Ren; +Cc: 28015

"Z. Ren" <zren@dlut.edu.cn> skribis:

> --- a/gnu/packages/djvu.scm
> +++ b/gnu/packages/djvu.scm
> @@ -34,6 +34,13 @@
>                 (base32
>                  "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
>      (build-system gnu-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +        (add-after 'unpack 'reproducible
> +         (lambda _
> +          (substitute* "desktopfiles/Makefile.in"
> +           (("gzip") "gzip -n")))))))

In the ‘core-updates’ branch, which is about to be merged, this should
be unnecessary because there’s an extra ‘reset-gzip-timestamps’ phase
that has the same effect (for files whose name ends in “.gz” or “.tgz”,
which I assume is the case?

Thanks,
Ludo’.

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

* [bug#28015] Re: [bug#28015] [PATCH] Reproducible issue for djvulibre
  2017-08-22 12:55 ` Ludovic Courtès
@ 2017-08-23  9:48   ` Z. Ren
  2017-09-01  9:08     ` bug#28015: " Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Z. Ren @ 2017-08-23  9:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 28015

Thanks for your kind reply. I re-check the build result. According to the output of diffoscope (see below for the snippet), the file that's different between the two builds is scalable/mimetypes/djvu.svgz. It is indeed a gzip file, though the extension is svgz. Not sure whether it could be handled automatically by the upcoming build system?

├── scalable
├── mimetypes
├── djvu.svgz
├── metadata
│ │ │ │ │ │ │ @@ -1 +1 @@
│ │ │ │ │ │ │ -gzip compressed data, last modified: Fri Mar 10 23:39:11 2017, from Unix
│ │ │ │ │ │ │ +gzip compressed data, last modified: Wed Aug 23 09:27:59 2017, from Unix

Best regards,
Ren

> -----Original Messages-----
> From: "Ludovic Courtès" <ludo@gnu.org>
> Sent Time: 2017-08-22 20:55:44 (Tuesday)
> To: "Z. Ren" <zren@dlut.edu.cn>
> Cc: 28015@debbugs.gnu.org
> Subject: Re: [bug#28015] [PATCH] Reproducible issue for djvulibre
> 
> "Z. Ren" <zren@dlut.edu.cn> skribis:
> 
> > --- a/gnu/packages/djvu.scm
> > +++ b/gnu/packages/djvu.scm
> > @@ -34,6 +34,13 @@
> >                 (base32
> >                  "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))
> >      (build-system gnu-build-system)
> > +    (arguments
> > +     `(#:phases
> > +       (modify-phases %standard-phases
> > +        (add-after 'unpack 'reproducible
> > +         (lambda _
> > +          (substitute* "desktopfiles/Makefile.in"
> > +           (("gzip") "gzip -n")))))))
> 
> In the ‘core-updates’ branch, which is about to be merged, this should
> be unnecessary because there’s an extra ‘reset-gzip-timestamps’ phase
> that has the same effect (for files whose name ends in “.gz” or “.tgz”,
> which I assume is the case?
> 
> Thanks,
> Ludo’.

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

* bug#28015: Re: [bug#28015] [PATCH] Reproducible issue for djvulibre
  2017-08-23  9:48   ` [bug#28015] " Z. Ren
@ 2017-09-01  9:08     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-09-01  9:08 UTC (permalink / raw)
  To: Z. Ren; +Cc: 28015-done

Hello,

"Z. Ren" <zren@dlut.edu.cn> skribis:

> Thanks for your kind reply. I re-check the build result. According to the output of diffoscope (see below for the snippet), the file that's different between the two builds is scalable/mimetypes/djvu.svgz. It is indeed a gzip file, though the extension is svgz. Not sure whether it could be handled automatically by the upcoming build system?
>
> ├── scalable
> ├── mimetypes
> ├── djvu.svgz
> ├── metadata
> │ │ │ │ │ │ │ @@ -1 +1 @@
> │ │ │ │ │ │ │ -gzip compressed data, last modified: Fri Mar 10 23:39:11 2017, from Unix
> │ │ │ │ │ │ │ +gzip compressed data, last modified: Wed Aug 23 09:27:59 2017, from Unix

Oh right, .svgz is not handled by the new phase.

I pushed your patch with small cosmetic changes:

  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=5fe2a139dfdef058f544fc4b83742628e1fa04bc

Thanks!

Ludo’.

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

end of thread, other threads:[~2017-09-01  9:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08  7:31 [bug#28015] [PATCH] Reproducible issue for djvulibre Z. Ren
2017-08-22 12:55 ` Ludovic Courtès
2017-08-23  9:48   ` [bug#28015] " Z. Ren
2017-09-01  9:08     ` bug#28015: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).