Package: guix-patches;
Reported by: Ryan Sundberg <ryan <at> arctype.co>
Date: Sun, 6 Jun 2021 21:58:05 UTC
Severity: normal
Tags: patch
To reply to this bug, email your comments to 48889 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Sun, 06 Jun 2021 21:58:05 GMT) Full text and rfc822 format available.Ryan Sundberg <ryan <at> arctype.co>
:guix-patches <at> gnu.org
.
(Sun, 06 Jun 2021 21:58:05 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: guix-patches <at> gnu.org Cc: Ryan Sundberg <ryan <at> arctype.co> Subject: [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2 Date: Sun, 6 Jun 2021 11:52:01 -0700
Adds the bird BGP daemon to gnu/packages/bird.scm --- 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 @@ -0,0 +1,74 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages bird) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages readline) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses)) + +(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 + `(#:configure-flags '("--enable-ipv6") + #:tests? #f + #:phases (modify-phases %standard-phases + ; Fix "cc not found" in tools/mergedirs + (add-after 'bootstrap 'set-cc + (lambda _ + (setenv "CPP" "gcc -E") + #t))))) + (inputs + `(("autoconf" ,autoconf) + ("bison" ,bison) + ("flex" ,flex) + ("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+))) + +(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 + `(#:configure-flags '("--enable-ipv6"))))) -- 2.31.1
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Sun, 06 Jun 2021 22:13:02 GMT) Full text and rfc822 format available.Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: guix-patches <at> gnu.org Cc: Ryan Sundberg <ryan <at> arctype.co> Subject: [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe Date: Sun, 6 Jun 2021 11:52:02 -0700
Removes hardcoded paths assumed in /sbin and /bin compiled into the `rbd` tool. Patch originally discussed at https://github.com/ceph/ceph/pull/20938 and rejected by upstream for ambiguous security concerns related to relative paths. --- .../patches/ceph-relative-paths.patch | 22 +++++++++++++++++++ gnu/packages/storage.scm | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ceph-relative-paths.patch diff --git a/gnu/packages/patches/ceph-relative-paths.patch b/gnu/packages/patches/ceph-relative-paths.patch new file mode 100644 index 0000000000..e1b1d3599f --- /dev/null +++ b/gnu/packages/patches/ceph-relative-paths.patch @@ -0,0 +1,22 @@ +diff --git a/src/common/module.c b/src/common/module.c +index f19f74324c..53355b8185 100644 +--- a/src/common/module.c ++++ b/src/common/module.c +@@ -66,7 +66,7 @@ int module_has_param(const char *module, const char *param) + char command[128]; + + snprintf(command, sizeof(command), +- "/sbin/modinfo -F parm %s | /bin/grep -q ^%s:", ++ "modinfo -F parm %s | grep -q ^%s:", + module, param); + + return run_command(command) == 0; +@@ -76,7 +76,7 @@ int module_load(const char *module, const char *options) + { + char command[128]; + +- snprintf(command, sizeof(command), "/sbin/modprobe %s %s", ++ snprintf(command, sizeof(command), "modprobe %s %s", + module, (options ? options : "")); + + return run_command(command); diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index d53327df75..b4f7d5e301 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -64,7 +64,7 @@ (base32 "0lmdri415hqczc9565s5m5568pnj97ipqxgnw6085kps0flwq5zh")) (patches - (search-patches "ceph-disable-cpu-optimizations.patch")) + (search-patches "ceph-disable-cpu-optimizations.patch" "ceph-relative-paths.patch")) (modules '((guix build utils))) (snippet '(begin -- 2.31.1
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Sun, 06 Jun 2021 22:13:02 GMT) Full text and rfc822 format available.Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: guix-patches <at> gnu.org Cc: Ryan Sundberg <ryan <at> arctype.co> Subject: [PATCH 4/4] bpftool: new package Date: Sun, 6 Jun 2021 11:52:04 -0700
Adds the bpftool package from the Linux kernel source tree. --- gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c8ec310665..06bb344475 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -54,6 +54,7 @@ ;;; Copyright © 2020 David Dashyan <mail <at> davie.li> ;;; Copyright © 2020 pukkamustard <pukkamustard <at> posteo.net> ;;; Copyright © 2021 B. Wilson <elaexuotee <at> wilsonb.com> +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co> ;;; ;;; This file is part of GNU Guix. ;;; @@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linux kernel trace events. These trace events are logged in @file{/sys/kernel/debug/tracing} and reported through standard log mechanisms like syslog.") (license license:gpl2))) + +(define-public bpftool + (package + (name "bpftool") + (version (package-version linux-libre)) + (source (package-source linux-libre)) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ (chdir "tools/bpf") #t)) + (delete 'configure) + (replace 'build + (lambda _ (invoke "make" "CC=gcc" "bpftool") #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/sbin")) + (mkdir-p (string-append out "/share/bash-completion/completions")) + (invoke "make" + (string-append "prefix=" out) + (string-append "bash_compdir=" out "/share/bash-completion/completions") + "-C" "bpftool" + "install") + #t)))))) + (inputs + `(("bison" ,bison) + ("python" ,python-3) + ("readline" ,readline))) + (propagated-inputs + `(("libcap" ,libcap) + ("libelf" ,libelf) + ("zlib" ,zlib))) + (home-page (package-home-page linux-libre)) + (synopsis "bpftool is a tool for inspection and simple manipulation of eBPF programs and maps") + (description "*bpftool* allows for inspection and simple modification of BPF objects on the system. Note that format of the output of all tools is not guaranteed to be stable and should not be depended upon.") + (license (package-license linux-libre)))) -- 2.31.1
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Sun, 06 Jun 2021 22:13:03 GMT) Full text and rfc822 format available.Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: guix-patches <at> gnu.org Cc: Ryan Sundberg <ryan <at> arctype.co> Subject: [PATCH 3/4] Ceph: upgrade minor version to latest stable release (14.2.21) Date: Sun, 6 Jun 2021 11:52:03 -0700
--- gnu/packages/storage.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/storage.scm b/gnu/packages/storage.scm index b4f7d5e301..9e64b9417f 100644 --- a/gnu/packages/storage.scm +++ b/gnu/packages/storage.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke <at> fastmail.com> ;;; Copyright © 2017 Rutger Helling <rhelling <at> mykolab.com> ;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr> +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co> ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,14 +56,14 @@ (define-public ceph (package (name "ceph") - (version "14.2.16") + (version "14.2.21") (source (origin (method url-fetch) (uri (string-append "https://download.ceph.com/tarballs/ceph-" version ".tar.gz")) (sha256 (base32 - "0lmdri415hqczc9565s5m5568pnj97ipqxgnw6085kps0flwq5zh")) + "1hhdxrmp7a8n00kmx9s4bib84dvfal98x7i9c65p4q6nknlcdvdw")) (patches (search-patches "ceph-disable-cpu-optimizations.patch" "ceph-relative-paths.patch")) (modules '((guix build utils))) @@ -76,7 +77,6 @@ ;"src/zstd" ;"src/civetweb" ;"src/seastar/fmt" - "src/test/downloads" "src/c-ares" "src/googletest" "src/rapidjson" -- 2.31.1
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Mon, 07 Jun 2021 09:36:01 GMT) Full text and rfc822 format available.Message #17 received at 48889 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Ryan Sundberg <ryan <at> arctype.co>, 48889 <at> debbugs.gnu.org Subject: Re: [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2 Date: Mon, 07 Jun 2021 11:35:21 +0200
[Message part 1 (text/plain, inline)]
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 <at> 1.6.7 should detect that. Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Mon, 07 Jun 2021 09:42:01 GMT) Full text and rfc822 format available.Message #20 received at 48889 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Ryan Sundberg <ryan <at> arctype.co>, 48889 <at> debbugs.gnu.org Subject: Re: [bug#48889] [PATCH 2/4] Ceph: patch rbd to use $PATH lookups for modprobe Date: Mon, 07 Jun 2021 11:40:59 +0200
[Message part 1 (text/plain, inline)]
Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700]: > Removes hardcoded paths assumed in /sbin and /bin compiled into the > `rbd` tool. > > Patch originally discussed at https://github.com/ceph/ceph/pull/20938 > and rejected by upstream for ambiguous security concerns related to > relative paths. > --- > .../patches/ceph-relative-paths.patch | 22 +++++++++++++++++++ > gnu/packages/storage.scm | 2 +- > 2 files changed, 23 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/ceph-relative-paths.patch > > diff --git a/gnu/packages/patches/ceph-relative-paths.patch b/gnu/packages/patches/ceph-relative-paths.patch > new file mode 100644 > index 0000000000..e1b1d3599f > --- /dev/null > +++ b/gnu/packages/patches/ceph-relative-paths.patch > @@ -0,0 +1,22 @@ > +diff --git a/src/common/module.c b/src/common/module.c > +index f19f74324c..53355b8185 100644 > +--- a/src/common/module.c > ++++ b/src/common/module.c > +@@ -66,7 +66,7 @@ int module_has_param(const char *module, const char *param) > + char command[128]; > + > + snprintf(command, sizeof(command), > +- "/sbin/modinfo -F parm %s | /bin/grep -q ^%s:", > ++ "modinfo -F parm %s | grep -q ^%s:", modinfo is not necessarily in the profile. I'd recommend using substitute* from a build phase to replace /sbin/modinfo with the appropriate /gnu/store path. ((string-append (assoc-ref inputs "???") "/sbin/modinfo") or something like that, were you'll need to replace "???") > +- snprintf(command, sizeof(command), "/sbin/modprobe %s %s", > ++ snprintf(command, sizeof(command), "modprobe %s %s", > + module, (options ? options : "")); Likewise. Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Mon, 07 Jun 2021 09:51:02 GMT) Full text and rfc822 format available.Message #23 received at 48889 <at> debbugs.gnu.org (full text, mbox):
From: Maxime Devos <maximedevos <at> telenet.be> To: Ryan Sundberg <ryan <at> arctype.co>, 48889 <at> debbugs.gnu.org Subject: Re: [bug#48889] [PATCH 4/4] bpftool: new package Date: Mon, 07 Jun 2021 11:50:31 +0200
[Message part 1 (text/plain, inline)]
Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700]: > Adds the bpftool package from the Linux kernel source tree. > --- > gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index c8ec310665..06bb344475 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -54,6 +54,7 @@ > ;;; Copyright © 2020 David Dashyan <mail <at> davie.li> > ;;; Copyright © 2020 pukkamustard <pukkamustard <at> posteo.net> > ;;; Copyright © 2021 B. Wilson <elaexuotee <at> wilsonb.com> > +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co> > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linux kernel trace events. > These trace events are logged in @file{/sys/kernel/debug/tracing} and reported > through standard log mechanisms like syslog.") > (license license:gpl2))) > + > +(define-public bpftool > + (package > + (name "bpftool") > + (version (package-version linux-libre)) > + (source (package-source linux-libre)) > + (build-system gnu-build-system) > + (arguments > + `(#:tests? #f Why are tests disabled? > + #:phases > + (modify-phases %standard-phases > + (add-before 'configure 'chdir > + (lambda _ (chdir "tools/bpf") #t)) > + (delete 'configure) > + (replace 'build > + (lambda _ (invoke "make" "CC=gcc" "bpftool") #t)) Use ,(string-append "CC=" (cc-for-target)), to make sure cross-compiling bpftools works. > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out"))) > + (mkdir-p (string-append out "/sbin")) > + (mkdir-p (string-append out "/share/bash-completion/completions")) > + (invoke "make" > + (string-append "prefix=" out) > + (string-append "bash_compdir=" out "/share/bash-completion/completions") > + "-C" "bpftool" > + "install") > + #t)))))) > + (inputs > + `(("bison" ,bison) Bison looks like a native input to me. > + ("python" ,python-3) Could be input, could be native-input. I don't know what's appropriate for bpftools. You can check with ./pre-inst-env guix build bpftools --target=aarch64-linux-gnu If there is "command not found: python" or something like that, you'll need to move python to native-inputs. > + ("readline" ,readline))) > + (propagated-inputs > + `(("libcap" ,libcap) > + ("libelf" ,libelf) > + ("zlib" ,zlib))) bpftool is a tool, and not a library, right? Then these libraries should be in inputs, not propagated-inputs, to avoid polluting the profile. bpftool should still have access to these libraries by ELF's RPATH or something like that. > + (home-page (package-home-page linux-libre)) I don't see anything about bpftools on <https://www.gnu.org/software/linux-libre/>. Maybe bpftools has a wiki somewhere? > + (synopsis "bpftool is a tool for inspection and simple manipulation of eBPF programs and maps") > + (description "*bpftool* allows for inspection and simple modification of BPF objects on the system. Note that format of the output of all tools is not guaranteed to be stable and should not be depended upon.") Line is too long. Also, what's up with surrounding bpftools with *asterisks*? Greetings, Maxime.
[signature.asc (application/pgp-signature, inline)]
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Wed, 09 Jun 2021 06:51:02 GMT) Full text and rfc822 format available.Message #26 received at 48889 <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: Maxime Devos <maximedevos <at> telenet.be>, 48889 <at> debbugs.gnu.org Subject: Re: [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2 Date: Tue, 8 Jun 2021 23:50:36 -0700
[Message part 1 (text/plain, inline)]
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 <at> 1.6.7 should detect that. > > Greetings, > Maxime. >
[0001-gnu-Add-bird-versions-1.6.7-and-2.0.8.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Wed, 09 Jun 2021 07:07:02 GMT) Full text and rfc822 format available.Message #29 received at 48889 <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: Maxime Devos <maximedevos <at> telenet.be> Cc: 48889 <at> debbugs.gnu.org Subject: Re: [bug#48889] [PATCH 4/4] bpftool: new package Date: Wed, 9 Jun 2021 00:06:04 -0700
[Message part 1 (text/plain, inline)]
Here is the revised bpftool patch. Responses below. -- Sincerely, Ryan Sundberg On 6/7/21 2:50 AM, Maxime Devos wrote: > Ryan Sundberg via Guix-patches via schreef op zo 06-06-2021 om 11:52 [-0700]: >> Adds the bpftool package from the Linux kernel source tree. >> --- >> gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 40 insertions(+) >> >> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm >> index c8ec310665..06bb344475 100644 >> --- a/gnu/packages/linux.scm >> +++ b/gnu/packages/linux.scm >> @@ -54,6 +54,7 @@ >> ;;; Copyright © 2020 David Dashyan <mail <at> davie.li> >> ;;; Copyright © 2020 pukkamustard <pukkamustard <at> posteo.net> >> ;;; Copyright © 2021 B. Wilson <elaexuotee <at> wilsonb.com> >> +;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co> >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linux kernel trace events. >> These trace events are logged in @file{/sys/kernel/debug/tracing} and reported >> through standard log mechanisms like syslog.") >> (license license:gpl2))) >> + >> +(define-public bpftool >> + (package >> + (name "bpftool") >> + (version (package-version linux-libre)) >> + (source (package-source linux-libre)) >> + (build-system gnu-build-system) >> + (arguments >> + `(#:tests? #f > > Why are tests disabled? This program has no tests. I commented as such in the new patch. > >> + #:phases >> + (modify-phases %standard-phases >> + (add-before 'configure 'chdir >> + (lambda _ (chdir "tools/bpf") #t)) >> + (delete 'configure) >> + (replace 'build >> + (lambda _ (invoke "make" "CC=gcc" "bpftool") #t)) > > Use ,(string-append "CC=" (cc-for-target)), to make sure cross-compiling bpftools > works. > >> + (replace 'install >> + (lambda* (#:key outputs #:allow-other-keys) >> + (let* ((out (assoc-ref outputs "out"))) >> + (mkdir-p (string-append out "/sbin")) >> + (mkdir-p (string-append out "/share/bash-completion/completions")) >> + (invoke "make" >> + (string-append "prefix=" out) >> + (string-append "bash_compdir=" out "/share/bash-completion/completions") >> + "-C" "bpftool" >> + "install") >> + #t)))))) >> + (inputs >> + `(("bison" ,bison) > > Bison looks like a native input to me. > >> + ("python" ,python-3) > > Could be input, could be native-input. I don't know what's appropriate for bpftools. You are right, python should be a native-input. > > You can check with > ./pre-inst-env guix build bpftools --target=aarch64-linux-gnu Cross-compiling produced this linker error I'm not sure how to deal with right now: ld: staticobjs/libbpf.o: error adding symbols: file in wrong format > > If there is "command not found: python" or something like that, > you'll need to move python to native-inputs. > >> + ("readline" ,readline))) >> + (propagated-inputs >> + `(("libcap" ,libcap) >> + ("libelf" ,libelf) >> + ("zlib" ,zlib))) > > bpftool is a tool, and not a library, right? > Then these libraries should be in inputs, not propagated-inputs, > to avoid polluting the profile. > > bpftool should still have access to these libraries by ELF's RPATH > or something like that. > >> + (home-page (package-home-page linux-libre)) > > I don't see anything about bpftools on <https://www.gnu.org/software/linux-libre/>. > Maybe bpftools has a wiki somewhere? I linked https://lwn.net/Articles/739357/ as the new home-page, which is the closest this program gets to online documentation that I could find. > >> + (synopsis "bpftool is a tool for inspection and simple manipulation of eBPF programs and maps") >> + (description "*bpftool* allows for inspection and simple modification of BPF objects on the system. Note that format of the output of all tools is not guaranteed to be stable and should not be depended upon.") > > Line is too long. Also, what's up with surrounding bpftools with *asterisks*? Copy-paste error > > Greetings, > Maxime. >
[0001-gnu-Add-bpftool-in-sync-with-the-Linux-kernel-versio.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
guix-patches <at> gnu.org
:bug#48889
; Package guix-patches
.
(Fri, 18 Jun 2021 15:42:02 GMT) Full text and rfc822 format available.Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Ryan Sundberg <ryan <at> arctype.co> To: guix-patches <at> gnu.org Subject: Re: [bug#48889] [PATCH 1/4] New package: bird bgp daemon, versions 1 and 2 Date: Fri, 18 Jun 2021 08:40:42 -0700
[Message part 1 (text/plain, inline)]
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 <at> 1.6.7 should detect that. >> >> Greetings, >> Maxime. >>
[0001-gnu-Add-bird-versions-1.6.7-and-2.0.8.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.