all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: guix-devel@gnu.org, "Gábor Boskovits" <boskovits@gmail.com>
Subject: "jar" tool and and reproducible builds - how?
Date: Mon, 4 Nov 2019 18:18:42 +0100	[thread overview]
Message-ID: <20191104181842.0d392ece@scratchpost.org> (raw)


[-- 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 --]

             reply	other threads:[~2019-11-04 17:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 17:18 Danny Milosavljevic [this message]
2019-11-04 21:43 ` "jar" tool and and reproducible builds - how? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191104181842.0d392ece@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.