all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* "jar" tool and and reproducible builds - how?
@ 2019-11-04 17:18 Danny Milosavljevic
  2019-11-04 21:43 ` Gábor Boskovits
  2019-11-05  8:20 ` Hartmut Goebel
  0 siblings, 2 replies; 7+ messages in thread
From: Danny Milosavljevic @ 2019-11-04 17:18 UTC (permalink / raw)
  To: guix-devel, Gábor Boskovits


[-- Attachment #1.1: Type: text/plain, Size: 748 bytes --]

Hi,

I'm trying to package nesc which has some small tools written in Java.
It compiles them using "javac" and then packs the result using "jar".

If I want

  guix build --rounds=2 nesc

to pass, how do I best proceed?

I tried

             (substitute* "tools/Makefile.in"
              ((" jar cf \\.\\./nesc.jar")
               " zip -0 -X ../nesc.jar META-INF/MANIFEST.MF "))

but that doesn't seem to be enough.

WIP attached.

Furthermore, I think it would be nice to patch our "jar" tool in icedtea:jdk
so that it provides an option to disable timestamps (not put the timestamp
field into the generated ZIP file in the first place).  I've thus unpacked
icedtea but I can't find where the source code to "jar" is.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: nesc.scm --]
[-- Type: text/x-scheme, Size: 1664 bytes --]

(define-module (wip nesc)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages java)
  #:use-module (gnu packages perl))

(define-public nesc
  (package
    (name "nesc")
    (version "1.3.4")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/nescc/nescc/v" version
                                  "/nesc-" version ".tar.gz"))
              (sha256
               (base32
                "0n4mjnm6q96s8pkdq2n9z6cxf5xpy2386cfn30wm4if9gdwhc3w7"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("icedtea" ,icedtea "jdk") ; for tools/java
       ("perl" ,perl)
       ("zip" ,zip)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'make-jar-reproducible
           (lambda _
             ;; Make JAR file "lib/ncc/nesc.jar" reproducible.
             ;(substitute* "tools/Makefile.in"
             ; ((" jar") " zip -0 -X META-INF/MANIFEST.MF "))
             (substitute* "tools/Makefile.in"
              ((" jar cf \\.\\./nesc.jar")
               " zip -0 -X ../nesc.jar META-INF/MANIFEST.MF "))
             #t)))))
    (synopsis "nesc compiler")
    (description "This package provides a C-like programming language with
small extensions to C, notably a module system (including interfaces),
concurrency and platform-independent networking.")
    (home-page "http://nescc.sourceforge.net/")
    (license license:gpl2)))

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2019-11-05 17:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-04 17:18 "jar" tool and and reproducible builds - how? Danny Milosavljevic
2019-11-04 21:43 ` Gábor Boskovits
2019-11-05  9:49   ` Danny Milosavljevic
2019-11-05 11:53     ` Gábor Boskovits
2019-11-05 15:09       ` Danny Milosavljevic
2019-11-05 17:17         ` Gábor Boskovits
2019-11-05  8:20 ` Hartmut Goebel

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.