From: "Björn Höfling" <bjoern.hoefling@bjoernhoefling.de>
To: 35570@debbugs.gnu.org
Subject: [bug#35570] [PATCH 1/8] gnu: ant-build-system: Don't override symlinks.
Date: Sun, 5 May 2019 00:37:16 +0200 [thread overview]
Message-ID: <20190505003716.4a38433e@alma-ubu> (raw)
In-Reply-To: <20190505003450.3bc9058a@alma-ubu>
[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]
When repacking jar-files, don't work on symlinks: Otherwise, they would be
overridden with the repacked jar-file.
* guix/build/ant-build-system.scm (regular-jar-file-predicate): New procedure.
(generate-jar-indices, strip-jar-timestamps): Use it.
---
guix/build/ant-build-system.scm | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/guix/build/ant-build-system.scm b/guix/build/ant-build-system.scm
index d79a2d55ed..0fec06f497 100644
--- a/guix/build/ant-build-system.scm
+++ b/guix/build/ant-build-system.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -171,6 +172,12 @@ to the default GNU unpack strategy."
#:allow-other-keys)
(apply invoke `("ant" ,build-target ,@make-flags)))
+(define (regular-jar-file-predicate file stat)
+ "Predicate returning true if FILE is ending on '.jar'
+and STAT indicates it is a regular file."
+ (and ((file-name-predicate "\\.jar$") file stat)
+ (eq? 'regular (stat:type stat))))
+
(define* (generate-jar-indices #:key outputs #:allow-other-keys)
"Generate file \"META-INF/INDEX.LIST\". This file does not use word wraps
and is preferred over \"META-INF/MANIFEST.MF\", which does use word wraps,
@@ -181,7 +188,10 @@ dependencies of this jar file."
(invoke "jar" "-i" jar))
(for-each (match-lambda
((output . directory)
- (for-each generate-index (find-files directory "\\.jar$"))))
+ (for-each generate-index
+ (find-files
+ directory
+ regular-jar-file-predicate))))
outputs)
#t)
@@ -222,7 +232,8 @@ repack them. This is necessary to ensure that archives are reproducible."
(for-each (match-lambda
((output . directory)
- (for-each repack-archive (find-files directory "\\.jar$"))))
+ (for-each repack-archive
+ (find-files directory regular-jar-file-predicate))))
outputs)
#t)
--
2.21.0
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2019-05-04 22:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 22:34 [bug#35570] java-tomcat: Make it the full package Björn Höfling
2019-05-04 22:37 ` Björn Höfling [this message]
2019-05-04 22:37 ` [bug#35570] [PATCH 2/8] gnu: java-javaee-servletapi: Don't use unstable tarball Björn Höfling
2019-05-04 22:38 ` [bug#35570] [PATCH 3/8] gnu: java-javaee-servletapi: Add properties-files to jar Björn Höfling
2019-05-04 22:39 ` [bug#35570] [PATCH 4/8] gnu: Remove dependencies on java-tomcat, use servlet API Björn Höfling
2019-05-04 22:41 ` [bug#35570] [PATCH 5/8] gnu: java-commons-daemon: Update to 1.1.0 Björn Höfling
2019-05-04 22:41 ` [bug#35570] [PATCH 6/8] gnu: Add java-ecj in version 4.6.3 Björn Höfling
2019-05-04 22:42 ` [bug#35570] [PATCH 7/8] gnu: java-tomcat: Build the full Tomcat package Björn Höfling
2019-05-04 22:42 ` [bug#35570] [PATCH 8/8] gnu: java-tomcat: Update to 8.5.40 Björn Höfling
2019-10-13 20:58 ` bug#35570: java-tomcat: Make it the full package Björn Höfling
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=20190505003716.4a38433e@alma-ubu \
--to=bjoern.hoefling@bjoernhoefling.de \
--cc=35570@debbugs.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.