From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 8F5ZJTqJrmUqFgEAqHPOHw:P1 (envelope-from ) for ; Mon, 22 Jan 2024 16:26:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 8F5ZJTqJrmUqFgEAqHPOHw (envelope-from ) for ; Mon, 22 Jan 2024 16:26:50 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="Ke455/Fa"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705937210; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=D74yMCDyqxCfn6p6u5xQiGcWxflit1CxmD1ZYghBdPQ=; b=BKPUUnPrSUaICpNh+x6TM8OhYBxYliQupWT0cSGMi6TDQfRXQWlnx19SH0LZKJZazzTR9/ E8GML2ZRg/6t/Ia1BAZj5JrSqxEFZYbVvIW58azN1mJETnoUFLszXR2QdhPHDiQnZJ4DNu ZnSX+60OxoBdvL08z5alZnqsLLUUu+vBuQO+lO7mFyB9qfVncPyd9uErj1iikvbbxpEq86 mWE5zWwJQvsoejYexbnaPbDUTwYK7DzyD16RzMHB3K/EWxdu3yL1pjOuArqi3C9AWtZpO+ YGmX7BH6LqqK6WjMkTMle/aLpm6tqjcjg0YQpgbBzAY8ch3ke6HrESvvHhIjEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="Ke455/Fa"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705937210; a=rsa-sha256; cv=none; b=Ca/iZeAtSY0PYYbIC8wUDYTl1OaEhj7ggkRyAz4KG1vSYu2/sbFusCnTHP65I+2Q4hbvC5 7f5U1vCRBNoayhF7gcytD/5KPhSHUx5VS3TL0nFnruhL1fAWGc00lf3LsYdW5oZXB28CYr VF5HXCt9tILgZdecLPGimvYLFutVEqjjNRhODuxVEgYy7mozNKB/1qkxD1YROFM+fnfgE6 gBCaz5vokFutBkRmyuRI2lXIj5nudrCQq7uJCUCGmY4lhgW736hznN+x0yoyrxvuTMALZ3 JzXYLENGrw7b26ciM0O7i4qTtc1ryUCjy8wzqAQrXMbjCcCGGjFb/OynBUrAQw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6817A1A222 for ; Mon, 22 Jan 2024 16:26:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRwBY-0007O7-UR; Mon, 22 Jan 2024 10:26:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rRwBU-0007MX-C3 for guix-patches@gnu.org; Mon, 22 Jan 2024 10:26:01 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRwBU-0005gx-2g for guix-patches@gnu.org; Mon, 22 Jan 2024 10:26:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRwBY-00072Y-4R for guix-patches@gnu.org; Mon, 22 Jan 2024 10:26:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68656] [PATCH core-updates 7/7] gnu: cryptsetup-static: Fix static build. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 22 Jan 2024 15:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68656 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68656@debbugs.gnu.org Cc: Josselin Poiret Received: via spool by 68656-submit@debbugs.gnu.org id=B68656.170593715827005 (code B ref 68656); Mon, 22 Jan 2024 15:26:04 +0000 Received: (at 68656) by debbugs.gnu.org; 22 Jan 2024 15:25:58 +0000 Received: from localhost ([127.0.0.1]:41558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRwBS-00071V-A7 for submit@debbugs.gnu.org; Mon, 22 Jan 2024 10:25:58 -0500 Received: from jpoiret.xyz ([206.189.101.64]:44922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRwBE-00070a-Ad for 68656@debbugs.gnu.org; Mon, 22 Jan 2024 10:25:45 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 6A8A918530C; Mon, 22 Jan 2024 15:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1705937139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D74yMCDyqxCfn6p6u5xQiGcWxflit1CxmD1ZYghBdPQ=; b=Ke455/FaBV1Vpr+ZwGG35OaUaYh6eZaBL2Pm2eOOzMWzx0YDT8FopkrdYC3E6fPQQ4N6Jj +nHqHqnuDpx/9kosNym2x2sQE5G89hemlzmNYJYkCDfOSBP+JGcsY5hI72YWpLurUrJ8vE 8tW5WwI7Cnk8dQhFZJ8IYGGW8I26aaj0Y5Q7ZVzpCBJ+QVxJvLjruzFi5tlzvN48QCSFSJ 95sgEXRjJFpZlKz4gGa6ZnPxe31pmmLLrnr0ut34DMaOlUpcEpNJgi37IruPUHuZfCidqe pm9rkXwEBupfJpY2AhejiPggJTKaqZnWvBc9iaT3g1xEQkTcjDjXnuZxg9myjA== Date: Mon, 22 Jan 2024 14:36:23 +0100 Message-ID: <3b0266f455e3789bc3eb9eaa5f9e26551312852c.1705762361.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.17 X-Spam-Score: -5.17 X-Migadu-Queue-Id: 6817A1A222 X-Migadu-Scanner: mx12.migadu.com X-TUID: C7w3qzffOu32 From: Josselin Poiret * 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 @@ (define-module (gnu packages cryptsetup) #: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 @@ (define-public cryptsetup-static (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)"))) -- 2.41.0