From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: "jar" tool and and reproducible builds - how? Date: Mon, 4 Nov 2019 18:18:42 +0100 Message-ID: <20191104181842.0d392ece@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/s7dYJwZiEekovKN1gx+eMoE"; protocol="application/pgp-signature"; micalg=pgp-sha256 Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:60099) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRg0M-0006cy-6s for guix-devel@gnu.org; Mon, 04 Nov 2019 12:19:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRg0K-0002Dn-UP for guix-devel@gnu.org; Mon, 04 Nov 2019 12:19:02 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:37268) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iRg0K-0002Ch-At for guix-devel@gnu.org; Mon, 04 Nov 2019 12:19:00 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org, =?ISO-8859-1?Q?G=E1bor?= Boskovits --Sig_/s7dYJwZiEekovKN1gx+eMoE Content-Type: multipart/mixed; boundary="MP_/svoYdpYoTN.ZBsNh1QPO7Hh" --MP_/svoYdpYoTN.ZBsNh1QPO7Hh Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=3D2 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. --MP_/svoYdpYoTN.ZBsNh1QPO7Hh Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=nesc.scm (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" vers= ion "/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))) --MP_/svoYdpYoTN.ZBsNh1QPO7Hh-- --Sig_/s7dYJwZiEekovKN1gx+eMoE Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl3AXXIACgkQ5xo1VCww uqWQrgf8CMlgtN+sRGvbrLGdXC4srYDPePD9pbRzcy8cRHstUCFzf2/pRM8Ok59+ HV3oUdJzRPTRR8RcbG1k45kQPMEZ+NEQyjFgIgxoai/zKZBZPkCBqnKUxBurwxfz WCebNDE1ZNlI1/RPkrBreLr4rNz9p4vsXWN/qNE3DdflIzy/Ez6b0doFWJStoUjj Q94CHlMRzGYZRLvgPHxqjBav+yoJ2DdFG9QphiSv3j9+TOhVNPbMbH/rW/XRcJRG 8GP3IaLM1z6tw9VC25Ls2kx0IfyNdwTmSaM4iUF7cqwzmwZfUYgYF+EbD2ctiIyO rgPgiezCoBWE4AXcSBG5eIoNMDM8Og== =Y6l2 -----END PGP SIGNATURE----- --Sig_/s7dYJwZiEekovKN1gx+eMoE--