X-Loop: help-debbugs@HIDDEN Subject: [bug#35312] core-update: Handle jar-files with patches Resent-From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= <bjoern.hoefling@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Thu, 18 Apr 2019 05:07:02 +0000 Resent-Message-ID: <handler.35312.B.155556400029451 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 35312 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 35312 <at> debbugs.gnu.org X-Debbugs-Original-To: <guix-patches@HIDDEN> Received: via spool by submit <at> debbugs.gnu.org id=B.155556400029451 (code B ref -1); Thu, 18 Apr 2019 05:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Apr 2019 05:06:40 +0000 Received: from localhost ([127.0.0.1]:41369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hGzFv-0007ew-Hg for submit <at> debbugs.gnu.org; Thu, 18 Apr 2019 01:06:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <bjoern.hoefling@HIDDEN>) id 1hGzFs-0007eg-Lz for submit <at> debbugs.gnu.org; Thu, 18 Apr 2019 01:06:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:60993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <bjoern.hoefling@HIDDEN>) id 1hGzFn-000259-Hj for submit <at> debbugs.gnu.org; Thu, 18 Apr 2019 01:06:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <bjoern.hoefling@HIDDEN>) id 1hGzFm-0000vG-26 for guix-patches@HIDDEN; Thu, 18 Apr 2019 01:06:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, FROM_EXCESS_BASE64, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <bjoern.hoefling@HIDDEN>) id 1hGzFk-00024H-NF for guix-patches@HIDDEN; Thu, 18 Apr 2019 01:06:30 -0400 Received: from m4s11.vlinux.de ([83.151.27.109]:35006 helo=bjoernhoefling.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <bjoern.hoefling@HIDDEN>) id 1hGzFk-000222-3Y for guix-patches@HIDDEN; Thu, 18 Apr 2019 01:06:28 -0400 Received: from alma-ubu (unknown [37.49.7.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bjoernhoefling.de (Postfix) with ESMTPSA id 073513F943 for <guix-patches@HIDDEN>; Thu, 18 Apr 2019 07:06:21 +0200 (CEST) Date: Thu, 18 Apr 2019 07:06:21 +0200 From: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= <bjoern.hoefling@HIDDEN> Message-ID: <20190418070621.09cd7307@alma-ubu> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/EQ+KlU/5e8NC4dsCpY6owft"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 83.151.27.109 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.2 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.2 (---) --Sig_/EQ+KlU/5e8NC4dsCpY6owft Content-Type: multipart/mixed; boundary="MP_/O_BdbNh.VyB3WSzQcACN=uk" --MP_/O_BdbNh.VyB3WSzQcACN=uk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Please review carefully, this is my first work below the gexp-border. This patch is the outcome of my question at: https://lists.gnu.org/archive/html/guix-devel/2019-04/msg00226.html When a jar-file had patches, it was not recognized and wrongly handled with "tar xz". There is one open question: For patch-and-repack, the flags defaults to '("p1"), but for jar-files we would usually need a "p0". That would mean for jar-sources with patches, one would need to manually add the patch-flags with "p0" to the origin. This is not nice. On the other hand, I would not like to override the patch-flags for jar-files to always "p0". WDYT? Bj=C3=B6rn --MP_/O_BdbNh.VyB3WSzQcACN=uk Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-guix-Handle-patching-of-jar-files-correctly.patch =46rom 84098800908c732facea1196cbc51b06128ff2ab Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Bj=3DC3=3DB6rn=3D20H=3DC3=3DB6fling?=3D <bjoern.hoefling@HIDDEN> Date: Thu, 18 Apr 2019 06:27:39 +0200 Subject: [PATCH] guix: Handle patching of jar-files correctly. When jar-files are used as origins with patches, they were not handled correctly and unpacked with the default "tar xz" command. This fix adds a case for jar-files. * guix/packages.scm (%standard-inputs): Add entry for jar-files. (patch-and-repack)(decompression-type): Handle "jar" suffix. patch-and-repack)(build): Unpack jar-files with unzip. Don't change into first-file for jar-files. See discussion at: <https://lists.gnu.org/archive/html/guix-devel/2019-04/msg00226.html>. --- guix/packages.scm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index a961dc3973..5af2c25cd9 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -436,6 +436,7 @@ identifiers. The result is inferred from the file name= s of patches." ("gzip" ,(ref '(gnu packages compression) 'gzip)) ("lzip" ,(ref '(gnu packages compression) 'lzip)) ("unzip" ,(ref '(gnu packages compression) 'unzip)) + ("jar" ,(ref '(gnu packages compression) 'unzip)) ("patch" ,(ref '(gnu packages base) 'patch)) ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales))))) =20 @@ -492,6 +493,7 @@ specifies modules in scope when evaluating SNIPPET." ((string-suffix? "bz2" source-file-name) "bzip2") ((string-suffix? "lz" source-file-name) "lzip") ((string-suffix? "zip" source-file-name) "unzip") + ((string-suffix? "jar" source-file-name) "jar") (else "xz"))) =20 (define original-file-name @@ -585,12 +587,17 @@ specifies modules in scope when evaluating SNIPPET." (directory (string-drop base (+ 1 dash)))) (mkdir directory) (copy-recursively #+source directory)) - #+(if (string=3D? decompression-type "unzip") + #+(if (or + (string=3D? decompression-type "unzip") + (string=3D? decompression-type "jar")) #~(invoke "unzip" #+source) #~(invoke (string-append #+tar "/bin/tar") "xvf" #+source))) =20 - (let ((directory (first-file "."))) + ;; jar-files have their contents directly in the root folder + (let ((directory (if (string=3D? #+decompression-type "jar") + "." + (first-file ".")))) (format (current-error-port) "source is under '~a'~%" directory) (chdir directory) --=20 2.21.0 --MP_/O_BdbNh.VyB3WSzQcACN=uk-- --Sig_/EQ+KlU/5e8NC4dsCpY6owft Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQQiGUP0np8nb5SZM4K/KGy2WT5f/QUCXLgFzQAKCRC/KGy2WT5f /TGRAJ45ly76SM+G8g+Aeh3WpBYojjRIOwCfdPG6lYuvdTiysK5fMqMWYIzsnIs= =6EI4 -----END PGP SIGNATURE----- --Sig_/EQ+KlU/5e8NC4dsCpY6owft--
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: =?UTF-8?Q?Bj=C3=B6rn_?= =?UTF-8?Q?H=C3=B6fling?= <bjoern.hoefling@HIDDEN> Subject: bug#35312: Acknowledgement (core-update: Handle jar-files with patches) Message-ID: <handler.35312.B.155556400029451.ack <at> debbugs.gnu.org> References: <20190418070621.09cd7307@alma-ubu> X-Gnu-PR-Message: ack 35312 X-Gnu-PR-Package: guix-patches Reply-To: 35312 <at> debbugs.gnu.org Date: Thu, 18 Apr 2019 05:07:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 35312 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 35312: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D35312 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#35312] core-update: Handle jar-files with patches Resent-From: swedebugia <swedebugia@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Thu, 27 Jun 2019 14:18:01 +0000 Resent-Message-ID: <handler.35312.B.15616450538399 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 35312 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 35312 <at> debbugs.gnu.org X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.15616450538399 (code B ref -1); Thu, 27 Jun 2019 14:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jun 2019 14:17:33 +0000 Received: from localhost ([127.0.0.1]:39163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1hgVDQ-0002BP-P4 for submit <at> debbugs.gnu.org; Thu, 27 Jun 2019 10:17:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:43744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <swedebugia@HIDDEN>) id 1hgVDO-0002BH-P1 for submit <at> debbugs.gnu.org; Thu, 27 Jun 2019 10:17:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45748) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <swedebugia@HIDDEN>) id 1hgVDL-0003BP-P1 for guix-patches@HIDDEN; Thu, 27 Jun 2019 10:17:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <swedebugia@HIDDEN>) id 1hgVDH-0002LI-SA for guix-patches@HIDDEN; Thu, 27 Jun 2019 10:17:26 -0400 Received: from mx1.riseup.net ([198.252.153.129]:44278) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <swedebugia@HIDDEN>) id 1hgVDD-0001jc-8s for guix-patches@HIDDEN; Thu, 27 Jun 2019 10:17:21 -0400 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 489291B9350 for <guix-patches@HIDDEN>; Thu, 27 Jun 2019 07:15:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1561644953; bh=JpSwoTtDWgFUlboaHqCHdpQlOaJ76LKqdrX5qTNrM04=; h=Subject:To:References:From:Date:In-Reply-To:From; b=T548vnLHXaOWIHYcIajUFc7wxogWBQpUEBJXksLp27EqgrkqSs7Ex8wHbLskZqRXU mMbg6Nhd01ZvRerlpDpk+vjRFecz55J9G0uBS6mof5zYDg+GpxuSNlzQ+vMC50AZPI OXlFPDuQ2+HgSguXUvvWh+FWX0d12X1d3dQ0jpgM= X-Riseup-User-ID: EC2B49B7F91BFC31B18F4DBE5A73D2C5DF6675F49CB1E6F50B643774CC7AC26D Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 800B41203F2 for <guix-patches@HIDDEN>; Thu, 27 Jun 2019 07:15:52 -0700 (PDT) References: <20190418070621.09cd7307@alma-ubu> From: swedebugia <swedebugia@HIDDEN> Message-ID: <30fb000b-35d1-f7ab-f5f5-ceb9bc8a4ab9@HIDDEN> Date: Thu, 27 Jun 2019 16:15:50 +0200 MIME-Version: 1.0 In-Reply-To: <20190418070621.09cd7307@alma-ubu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 198.252.153.129 X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) On 2019-04-18 07:06, Bj=C3=B6rn H=C3=B6fling wrote: > Please review carefully, this is my first work below the gexp-border. >=20 > This patch is the outcome of my question at: >=20 > https://lists.gnu.org/archive/html/guix-devel/2019-04/msg00226.html >=20 > When a jar-file had patches, it was not recognized and wrongly handled > with "tar xz". >=20 > There is one open question: For patch-and-repack, the flags defaults > to '("p1"), but for jar-files we would usually need a "p0". That would > mean for jar-sources with patches, one would need to manually add the > patch-flags with "p0" to the origin. This is not nice. On the other > hand, I would not like to override the patch-flags for jar-files to > always "p0". >=20 > WDYT? >=20 > Bj=C3=B6rn >=20 This seem to have fallen through the cracks. Can someone with gexp=20 knowledge review this? --=20 Cheers Swedebugia
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.