[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/45: gnu: cryptsetup-static: Fix static build.
From: |
guix-commits |
Subject: |
07/45: gnu: cryptsetup-static: Fix static build. |
Date: |
Sun, 18 Feb 2024 08:41:04 -0500 (EST) |
jpoiret pushed a commit to branch core-updates-glibc-2.39
in repository guix.
commit 7997641091d32ffa603b3d1188f342f3d932a299
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Wed Jan 17 11:54:22 2024 +0100
gnu: cryptsetup-static: Fix static build.
* gnu/packages/cryptsetup.scm (cryptsetup-static): Pass static variants of
dependencies. Also work around wrong pkg-config paths of util-linux for the
static output.
Change-Id: I025f241b02ee0ea80227ef7d31789571e635ef2c
---
gnu/packages/cryptsetup.scm | 86 ++++++++++++++++++++++++---------------------
1 file changed, 45 insertions(+), 41 deletions(-)
diff --git a/gnu/packages/cryptsetup.scm b/gnu/packages/cryptsetup.scm
index 8e2bdb6d9e..8ff649bccc 100644
--- a/gnu/packages/cryptsetup.scm
+++ b/gnu/packages/cryptsetup.scm
@@ -23,6 +23,7 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
+ #:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages gnupg)
@@ -116,56 +117,59 @@ files). This assumes LIBRARY uses Libtool."
(inherit cryptsetup)
(name "cryptsetup-static")
(arguments
- '(#:configure-flags '("--disable-shared"
- "--enable-static-cryptsetup"
-
- "--disable-veritysetup"
- "--disable-cryptsetup-reencrypt"
- "--disable-integritysetup"
-
- ;; The default is OpenSSL which provides better
PBKDF performance.
- "--with-crypto_backend=gcrypt"
-
- "--disable-blkid"
- ;; 'libdevmapper.a' pulls in libpthread, libudev
and libm.
- "LIBS=-ludev -pthread -lm")
-
- #:allowed-references () ;this should be self-contained
-
- #:modules ((ice-9 ftw)
- (ice-9 match)
- (guix build utils)
- (guix build gnu-build-system))
+ (substitute-keyword-arguments (package-arguments cryptsetup)
+ ((#:configure-flags flags ''())
+ `(cons* "--disable-shared"
+ "--enable-static-cryptsetup"
- #:phases (modify-phases %standard-phases
- (add-after 'install 'remove-cruft
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Remove everything except the 'cryptsetup' command.
- (let ((out (assoc-ref outputs "out")))
- (with-directory-excursion out
- (let ((dirs (scandir "."
- (match-lambda
- ((or "." "..") #f)
- (_ #t)))))
- (for-each delete-file-recursively
- (delete "sbin" dirs))
- (for-each (lambda (file)
- (rename-file (string-append file
- ".static")
- file)
- (remove-store-references file))
- '("sbin/cryptsetup"))
- #t))))))))
+ "--disable-veritysetup"
+ "--disable-integritysetup"
+ ;; Bypass broken pkg-config paths for the static output of
+ ;; util-linux. Only blkid is located through pkg-config, not
+ ;; uuid.
+ (format #f "BLKID_CFLAGS=-I~a"
+ (search-input-directory %build-inputs "include/blkid"))
+ (format #f "BLKID_LIBS=-L~a -lblkid"
+ (dirname (search-input-file %build-inputs
"lib/libblkid.a")))
+ ,flags))
+ ((#:allowed-references refs '())
+ '())
+ ((#:modules modules '())
+ '((ice-9 ftw)
+ (ice-9 match)
+ (guix build utils)
+ (guix build gnu-build-system)))
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-after 'install 'remove-cruft
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Remove everything except the 'cryptsetup' command.
+ (let ((out (assoc-ref outputs "out")))
+ (with-directory-excursion out
+ (let ((dirs (scandir "."
+ (match-lambda
+ ((or "." "..") #f)
+ (_ #t)))))
+ (for-each delete-file-recursively
+ (delete "sbin" dirs))
+ (for-each (lambda (file)
+ (rename-file (string-append file
+ ".static")
+ file)
+ (remove-store-references file))
+ '("sbin/cryptsetup"))
+ #t)))))))))
(inputs
(let ((libgcrypt-static
(package
(inherit (static-library libgcrypt))
(propagated-inputs
`(("libgpg-error-host" ,(static-library libgpg-error)))))))
- `(("json-c" ,json-c-0.13)
+ `(("argon2" ,(static-library argon2))
+ ("json-c" ,(static-library json-c-0.13))
("libgcrypt" ,libgcrypt-static)
("lvm2" ,lvm2-static)
("util-linux" ,util-linux "static")
("util-linux" ,util-linux "lib")
- ("popt" ,popt))))
+ ("popt" ,(static-library popt)))))
(synopsis "Hard disk encryption tool (statically linked)")))
- branch core-updates-glibc-2.39 created (now cbfa13a859), guix-commits, 2024/02/18
- 05/45: gnu: libblockdev: Add libcryptsetup propagated inputs., guix-commits, 2024/02/18
- 01/45: gnu: cryptsetup: Update to 2.6.1., guix-commits, 2024/02/18
- 08/45: Partially revert gnu: python-matplotlib: Fix flaky Legend loc test., guix-commits, 2024/02/18
- 15/45: gnu: linux-pam: Add libxcrypt dependency., guix-commits, 2024/02/18
- 40/45: gnu: mailutils: Add libxcrypt dependency., guix-commits, 2024/02/18
- 07/45: gnu: cryptsetup-static: Fix static build.,
guix-commits <=
- 06/45: gnu: lvm2-static: Properly handle eudev dependency in pkg-config., guix-commits, 2024/02/18
- 02/45: gnu: Add libdevmapper-propagated-inputs., guix-commits, 2024/02/18
- 03/45: gnu: Add libcryptsetup-propagated-inputs., guix-commits, 2024/02/18
- 04/45: gnu: volume-key: Add required transitive dependencies., guix-commits, 2024/02/18
- 10/45: gnu: glibc: Update to 2.39., guix-commits, 2024/02/18
- 11/45: gnu: gcc: Simplify application of Hurd-specific pthread patch., guix-commits, 2024/02/18
- 39/45: gnu: also-utils: Adapt for glibc 2.39., guix-commits, 2024/02/18
- 36/45: gnu: python-natsort: Add en_US.UTF-8 locale for tests., guix-commits, 2024/02/18
- 32/45: gnu: cyrus-sasl: Add libxcrypt dependency., guix-commits, 2024/02/18
- 31/45: gnu: cups-minimal: Add libxcrypt dependency., guix-commits, 2024/02/18