From patchwork Fri Feb 4 15:43:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon South X-Patchwork-Id: 36995 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CADAB27BBEA; Fri, 4 Feb 2022 15:54:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 829D727BBE9 for ; Fri, 4 Feb 2022 15:54:54 +0000 (GMT) Received: from localhost ([::1]:51792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nG0vF-0007PX-LC for patchwork@mira.cbaines.net; Fri, 04 Feb 2022 10:54:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG0li-00052v-Tq for guix-patches@gnu.org; Fri, 04 Feb 2022 10:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nG0li-0007Ym-Kr for guix-patches@gnu.org; Fri, 04 Feb 2022 10:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nG0li-0000yH-K0 for guix-patches@gnu.org; Fri, 04 Feb 2022 10:45:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53779] [PATCH 2/5] gnu: iwd: Build from Git sources. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Feb 2022 15:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53779 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53779@debbugs.gnu.org Received: via spool by 53779-submit@debbugs.gnu.org id=B53779.16439894463651 (code B ref 53779); Fri, 04 Feb 2022 15:45:02 +0000 Received: (at 53779) by debbugs.gnu.org; 4 Feb 2022 15:44:06 +0000 Received: from localhost ([127.0.0.1]:60849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG0ka-0000vl-Qs for submit@debbugs.gnu.org; Fri, 04 Feb 2022 10:44:06 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:45968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG0kS-0000ua-Cq for 53779@debbugs.gnu.org; Fri, 04 Feb 2022 10:43:51 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 1C88A346E for <53779@debbugs.gnu.org>; Fri, 4 Feb 2022 15:43:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo02-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DghKFWtLfu_H for <53779@debbugs.gnu.org>; Fri, 4 Feb 2022 15:43:38 +0000 (UTC) Received: from laptop.simonsouth.net (23-233-96-244.cpe.pppoe.ca [23.233.96.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 733B4345B for <53779@debbugs.gnu.org>; Fri, 4 Feb 2022 15:43:38 +0000 (UTC) From: Simon South Date: Fri, 4 Feb 2022 10:43:33 -0500 Message-Id: <6ec2d0a5b769bdbd66a99f9c0240363964f66ee0.1643988584.git.simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 In-Reply-To: References: MIME-Version: 1.0 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/networking.scm (iwd)[source]: Use "git-fetch" and "git-file-name". [inputs]: Add ell source code. [native-inputs]: Add autoconf, automake, libtool. [arguments]<#:phases>: Add "copy-ell-header-files" phase to copy shared header files from ell source into source tree. --- gnu/packages/networking.scm | 38 ++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 064248600e..dc42ec4d73 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2021 Milkey Mouse ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2022 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -3568,20 +3569,25 @@ (define-public iwd (name "iwd") (version "1.20") (source (origin - ;; FIXME: We're using the bootstrapped sources because - ;; otherwise using an external ell library is impossible. - ;; How to bootstrap with Guix? - (method url-fetch) - (uri (string-append "https://www.kernel.org/pub/linux/network" - "/wireless/iwd-" version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "https://git.kernel.org/pub/scm/network/wireless/iwd.git") + (commit version))) + (file-name (git-file-name name version)) (sha256 (base32 - "03q5scahyg86h4bdxqxm32shyssgpmfp5b3183j01ig7mg6f4lbx")))) + "0xlbnsgw9giakfj0xr526i7mcwyaryb18g66mv90njnrm8radjhr")))) (build-system gnu-build-system) (inputs - (list dbus ell readline)) + (list dbus ell (package-source ell) readline)) (native-inputs - (list pkg-config python python-docutils openssl)) + (list autoconf + automake + libtool + pkg-config + python + python-docutils + openssl)) (arguments `(#:configure-flags (let ((dbus (assoc-ref %outputs "out"))) @@ -3596,6 +3602,20 @@ (define-public iwd dbus "/share/dbus-1/system-services"))) #:phases (modify-phases %standard-phases + (add-after 'unpack 'copy-ell-header-files + ;; Copy into the source tree two of ell's private header files that + ;; it shares with iwd, as is required to build with the + ;; "--enable-external-ell" configure option. + ;; See the definition of "ell_shared" in iwd's Makefile.am. + (lambda* (#:key inputs #:allow-other-keys) + (let ((ell-header-dir (search-input-directory inputs "/ell")) + (target-dir "ell")) + (mkdir target-dir) + (for-each + (lambda (file-name) + (copy-file (string-append ell-header-dir "/" file-name) + (string-append target-dir "/" file-name))) + '("asn1-private.h" "useful.h"))))) (add-after 'configure 'patch-Makefile (lambda _ (substitute* "Makefile"