The updated Frrouting needed some adaptations: - packaging CESNET's libyang - adding some dependencies (libcap, libyang, pcre for libyang) I was not sure if I should have made pcre a propagated-input in libyang instead of adding it to frrouting or something like that. I used the BSD-3 license for libyang, this should be checked as I am not sure this is the right one. Any feedback ? -- Vincent Legoll
* gnu/packages/networking.scm (libyang): New variable. --- gnu/packages/networking.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 30b17da069..0b19ab87d0 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3509,6 +3509,33 @@ libraries and instead utilizing features provided by the Linux kernel to the maximum extent possible.") (license license:lgpl2.1+))) +(define-public libyang + (package + (name "libyang") + (version "1.0.184") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CESNET/libyang") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00vzka0bdlx1znd06fb0ps0szigdm2x96bpdfx220x79jr9qywhx")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DENABLE_BUILD_TESTS=ON" "-DENABLE_LYD_PRIV=ON"))) + (inputs `(("pcre" ,pcre))) + (native-inputs `(("cmocka" ,cmocka) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/CESNET/libyang") + (synopsis "YANG data modelling language library") + (description "libyang is a YANG data modelling language parser and toolkit +written (and providing API) in C. Current implementation covers YANG 1.0 (RFC +6020) as well as YANG 1.1 (RFC 7950).") + (license license:bsd-3))) + (define-public batctl (package (name "batctl") -- 2.29.2
* gnu/packages/networking.scm (frrouting): Update to 7.5. [inputs]: Add libyang, libcap & pcre. --- gnu/packages/networking.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 0b19ab87d0..f149f41c45 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3426,7 +3426,7 @@ communication.") (define-public frrouting (package (name "frrouting") - (version "6.0.2") + (version "7.5") (source (origin (method url-fetch) (uri (string-append "https://github.com/FRRouting/frr/releases/" @@ -3434,11 +3434,14 @@ communication.") ".tar.xz")) (sha256 (base32 - "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd")))) + "1a27wvxmc51sr0kchy0hjfpv19imlgrr3s9k48lik9k01g71yrdr")))) (build-system gnu-build-system) (inputs `(("c-ares" ,c-ares) ("json-c" ,json-c) + ("libcap" ,libcap) + ("libyang" ,libyang) + ("pcre" ,pcre) ("readline" ,readline))) (native-inputs `(("perl" ,perl) -- 2.29.2
On Tue, Dec 29, 2020 at 11:17:54AM +0100, Vincent Legoll wrote: > I was not sure if I should have made pcre a > propagated-input in libyang instead of adding > it to frrouting or something like that. libyang includes pcre in the Requires.private field of libyang.pc. According to the 'package reference' section of the Guix manual, inputs should be propagated in this case: https://guix.gnu.org/manual/en/html_node/package-Reference.html > I used the BSD-3 license for libyang, this should > be checked as I am not sure this is the right one. (guix licenses) includes links to authoritative sources on licenses: https://git.savannah.gnu.org/cgit/guix.git/tree/guix/licenses.scm#n167 You can check the package's LICENSE file against those resources.
* gnu/packages/networking.scm (libyang): New variable. --- gnu/packages/networking.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index fad917a7c0..fec0341147 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3508,6 +3508,33 @@ libraries and instead utilizing features provided by the Linux kernel to the maximum extent possible.") (license license:lgpl2.1+))) +(define-public libyang + (package + (name "libyang") + (version "1.0.184") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CESNET/libyang") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00vzka0bdlx1znd06fb0ps0szigdm2x96bpdfx220x79jr9qywhx")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list "-DENABLE_BUILD_TESTS=ON" "-DENABLE_LYD_PRIV=ON"))) + (propagated-inputs `(("pcre" ,pcre))) + (native-inputs `(("cmocka" ,cmocka) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/CESNET/libyang") + (synopsis "YANG data modelling language library") + (description "libyang is a YANG data modelling language parser and toolkit +written (and providing API) in C. Current implementation covers YANG 1.0 (RFC +6020) as well as YANG 1.1 (RFC 7950).") + (license license:bsd-3))) + (define-public batctl (package (name "batctl") -- 2.29.2
* gnu/packages/networking.scm (frrouting): Update to 7.5. [inputs]: Add libyang, libcap & pcre. --- gnu/packages/networking.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index fec0341147..affab5c7e6 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3425,7 +3425,7 @@ communication.") (define-public frrouting (package (name "frrouting") - (version "6.0.2") + (version "7.5") (source (origin (method url-fetch) (uri (string-append "https://github.com/FRRouting/frr/releases/" @@ -3433,11 +3433,13 @@ communication.") ".tar.xz")) (sha256 (base32 - "0xfrvi62w8qlh46f504ka0skb7pm0g0p8vmdng4w90gsbirlzpdd")))) + "1a27wvxmc51sr0kchy0hjfpv19imlgrr3s9k48lik9k01g71yrdr")))) (build-system gnu-build-system) (inputs `(("c-ares" ,c-ares) ("json-c" ,json-c) + ("libcap" ,libcap) + ("libyang" ,libyang) ("readline" ,readline))) (native-inputs `(("perl" ,perl) -- 2.29.2
The latet patch set removed pcre from frrouting's inputs and modified libyang to propagate this input. The BSD-3 License should be the right one in fact. As is is a Modified 3-clause BSD. Tchuss -- Vincent Legoll
On Tue, Jan 05, 2021 at 11:57:27AM +0100, Vincent Legoll wrote: > * gnu/packages/networking.scm (libyang): New variable. > + (home-page "https://github.com/CESNET/libyang") > + (synopsis "YANG data modelling language library") > + (description "libyang is a YANG data modelling language parser and toolkit > +written (and providing API) in C. Current implementation covers YANG 1.0 (RFC > +6020) as well as YANG 1.1 (RFC 7950).") I don't really understand what this package does but, I wonder if networking.scm is the right place for it?
Hello, On Sat, Feb 20, 2021 at 7:49 PM Leo Famulari <leo@famulari.name> wrote: > I don't really understand what this package does Neither do I, you should have noticed I don't really know what I'm doing. Kind of a monkey packager I guess :-) I hope that's not too frightening. > but, I wonder if networking.scm is the right place for it? This looks related to Network Configuration Protocol (NETCONF), and I had to find a place for it, so I chose to put it near its user... WDYT ? -- Vincent Legoll
On Sat, Feb 20, 2021 at 08:02:01PM +0100, Vincent Legoll wrote: > Neither do I, you should have noticed I don't really know what > I'm doing. Kind of a monkey packager I guess :-) > > I hope that's not too frightening. No worries, everybody starts at the beginning! > This looks related to Network Configuration Protocol > (NETCONF), and I had to find a place for it, so I chose > to put it near its user... > > WDYT ? Alright, makes sense. I pushed as 55fddf93079fa6e75bbe2d748c6abf8b5897d2c3 after updating libyang to the latest (thanks to `guix lint` for letting me know about a new release) and making sure that frrouting still builds. Sorry these patches took so long to get in...