From patchwork Fri Jun 18 15:40:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Sundberg X-Patchwork-Id: 30368 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 CEBAC27BC81; Fri, 18 Jun 2021 16:43:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 351C927BC78 for ; Fri, 18 Jun 2021 16:43:08 +0100 (BST) Received: from localhost ([::1]:37628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luGeB-00035x-5Y for patchwork@mira.cbaines.net; Fri, 18 Jun 2021 11:43:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luGd8-0001WO-SN for guix-patches@gnu.org; Fri, 18 Jun 2021 11:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46122) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luGd8-0000Lf-H8 for guix-patches@gnu.org; Fri, 18 Jun 2021 11:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luGd8-000279-2L for guix-patches@gnu.org; Fri, 18 Jun 2021 11:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2 Resent-From: Ryan Sundberg Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 15:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48889 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48889@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16240308918087 (code B ref -1); Fri, 18 Jun 2021 15:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2021 15:41:31 +0000 Received: from localhost ([127.0.0.1]:57668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luGcY-00026H-GB for submit@debbugs.gnu.org; Fri, 18 Jun 2021 11:41:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:50118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luGcW-000269-4T for submit@debbugs.gnu.org; Fri, 18 Jun 2021 11:41:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luGcV-0000rj-SV for guix-patches@gnu.org; Fri, 18 Jun 2021 11:41:23 -0400 Received: from mail.arctype.co ([138.68.9.245]:34280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luGcP-0008El-0b for guix-patches@gnu.org; Fri, 18 Jun 2021 11:41:23 -0400 Received: from authenticated-user (mail.arctype.co [138.68.9.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.arctype.co (Postfix) with ESMTPSA id 08B4111F074 for ; Fri, 18 Jun 2021 08:40:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arctype.co; s=mail; t=1624030843; bh=6AGy6nw/A7Fu6EacuzNu8K+VC/sIu6UVIWPoAJxF9y8=; h=Subject:To:References:From:Date:In-Reply-To:From; b=fY3UT4eCLvklPYs6woVs17oKZ9piq0qd6aZTQtdKKT7odlVN9onhf9yXWrC/Tn3EH G/Ag2R1sD15O+AHpLIhA3skUxB2YfKEq4H5AmCKCA/wjUsBOJfKAAXxTOoophxkZnS CPoMviuIjhi5IUM0gp28RTCvwRFzAyvSY4zGx823ZGG2qPOovvD+co09FebLmvBLYU iVQCgsVMYLT58JFf3P1QYmzia9S+NDedCcbE+1uJqV/9/A3S/JVRcf/LatmRcoz7Cn JxMTjLkbLkK3gDVFM7MYJPPrYm6+3GGZqrPq3KKPVA2dZd2C1Sw+lmljJg1IqK3Ssf kLd9ME7UuViag== References: <20210606185204.17617-1-ryan@arctype.co> Message-ID: <121011e9-4626-bdd1-ab77-cfef163b903e@arctype.co> Date: Fri, 18 Jun 2021 08:40:42 -0700 MIME-Version: 1.0 In-Reply-To: Received-SPF: pass client-ip=138.68.9.245; envelope-from=ryan@arctype.co; helo=mail.arctype.co X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: Ryan Sundberg X-ACL-Warn: , Ryan Sundberg via Guix-patches X-Patchwork-Original-From: Ryan Sundberg via Guix-patches via From: Ryan Sundberg X-getmail-retrieved-from-mailbox: Patches Hello Guix, here is one more version of this patch to add the bird daemon. This time it builds both bird and bird6 individually for bird version 1.x, since --enable-ipv6 is a mutually exclusive config option,the binaries have to be built separately. --- Sincerely, Ryan Sundberg On 6/8/21 11:50 PM, Ryan Sundberg via Guix-patches via wrote: > Hi Maxime, thanks for the good feedback. Please see the revised patch here. > > -- > Sincerely, > Ryan Sundberg > > On 6/7/21 2:35 AM, Maxime Devos wrote: >> Hi, >> >> Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700]: >>> Adds the bird BGP daemon to gnu/packages/bird.scm >> >> See commits (e.g. git log -n9) for how to format commit messages. >> >>> --- >>> gnu/packages/bird.scm | 74 +++++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 74 insertions(+) >>> create mode 100644 gnu/packages/bird.scm >>> >>> diff --git a/gnu/packages/bird.scm b/gnu/packages/bird.scm >>> new file mode 100644 >>> index 0000000000..5fac395906 >>> --- /dev/null >>> +++ b/gnu/packages/bird.scm >> >> Maybe gnu/packages/networking.scm, instead of creating a new >> module for a single package. >> >>> + #:phases (modify-phases %standard-phases >>> + ; Fix "cc not found" in tools/mergedirs >>> + (add-after 'bootstrap 'set-cc >>> + (lambda _ >>> + (setenv "CPP" "gcc -E") >>> + #t))))) >> >> This most likely should be ,(string-append (cc-for-target) " -E"), to >> make sure cross-compiling works. Also, the more declarative #:make-flags >> is preferred above imperative setenv. >> >>> + (inputs >>> + `(("autoconf" ,autoconf) >>> + ("bison" ,bison) >>> + ("flex" ,flex) >> >> autoconf, bison & flex most likely should be native inputs. >> >>> + ("ncurses" ,ncurses) >>> + ("readline" ,readline))) >>> + (home-page "http://bird.network.cz/") >>> + (synopsis "BIRD Internet Routing Daemon") >>> + (description "The BIRD project aims to develop a dynamic IP routing daemon with full support of all modern routing protocols, easy to use configuration interface and powerful route filtering language, primarily targeted on (but not limited to) Linux and other UNIX-like systems and distributed under the GNU General Public License.") >>> + (license gpl2+))) >> >> The description line is too long. >> ./pre-inst-env guix lint bird@1.6.7 should detect that. >> >> Greetings, >> Maxime. >> From ed01b4254a54e43ce66d910c780b5a1ee885e243 Mon Sep 17 00:00:00 2001 From: Ryan Sundberg Date: Fri, 4 Jun 2021 20:53:11 -0700 Subject: [PATCH] gnu: Add bird versions 1.6.7 and 2.0.8 * gnu/packages/networking.scm (bird): New variable. {bird-1}: New variable. --- gnu/packages/networking.scm | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index f7357a263b..0c14331a5b 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -43,6 +43,7 @@ ;;; Copyright © 2020 Hamzeh Nasajpour ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Hartmut Goebel +;;; Copyright © 2021 Ryan Sundberg ;;; ;;; This file is part of GNU Guix. ;;; @@ -4199,3 +4200,65 @@ IPv6 Internet connectivity - it also works over IPv4.") ;; version. This exception does not (and cannot) modify any license terms ;; which apply to the Application, with which you must still comply license:lgpl3))) + +(define configure-bird6 + `(lambda* (#:key #:allow-other-keys #:rest args) + (let ((configure-phase (assoc-ref %standard-phases 'configure))) + (apply + configure-phase + (append args '(#:configure-flags ("--enable-ipv6"))))))) + +(define-public bird-1 + (package + (name "bird") + (version "1.6.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.nic.cz/labs/bird.git") + (commit (string-append "v" version)))) + (sha256 (base32 "0vbjp42c2zqmcrqcwm4g4fq1v93l6rlk0c27i0k08f3v07w75cih")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;; No tests defined for bird 1 + #:phases + (modify-phases + %standard-phases + ;; Fix "cc not found" in tools/mergedirs + (add-after 'bootstrap 'set-cc + (lambda _ + (setenv "CPP" ,(string-append (cc-for-target) " -E")))) + ;; Build bird6 after building bird. + ;; bird6 and bird are configured independently. + (add-after 'install 'configure-bird6 ,configure-bird6) + (add-after 'configure-bird6 'build-bird6 + (assoc-ref %standard-phases 'build)) + (add-after 'build-bird6 'install-bird6 + (assoc-ref %standard-phases 'install))))) + (inputs + `(("ncurses" ,ncurses) + ("readline" ,readline))) + (native-inputs + `(("autoconf" ,autoconf) + ("bison" ,bison) + ("flex" ,flex))) + (home-page "http://bird.network.cz/") + (synopsis "BIRD Internet Routing Daemon") + (description "The BIRD project aims to develop a dynamic IP routing daemon +with full support of all modern routing protocols, easy to use configuration +interface and powerful route filtering language.") + (license license:gpl2+))) + +(define-public bird + (package + (inherit bird-1) + (version "2.0.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.nic.cz/labs/bird.git") + (commit (string-append "v" version)))) + (sha256 (base32 "07mh41hsmkcpf6f6lnygzp6g59jma542pcqdkl54ysiqnjmi5zz1")))) + (arguments `()))) -- 2.31.1