[PATCH 0/2] Update for frrouting & add libyang

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Vincent Legoll
Owner
unassigned
Submitted by
Vincent Legoll
Severity
normal
V
V
Vincent Legoll wrote on 29 Dec 2020 11:17
(name . Guix Patches)(address . guix-patches@gnu.org)
CAEwRq=ofLk7kYYM5uV6srU8Ce6cF7W+xVwQa50Ah2tGEVX7Y7Q@mail.gmail.com
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
V
V
Vincent Legoll wrote on 29 Dec 2020 11:20
[PATCH 1/2] gnu: Add libyang
(address . 45523@debbugs.gnu.org)(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
20201229102031.10797-1-vincent.legoll@gmail.com
* gnu/packages/networking.scm (libyang): New variable.
---
gnu/packages/networking.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
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
V
V
Vincent Legoll wrote on 29 Dec 2020 11:20
[PATCH 2/2] gnu: frrouting: Update to 7.5.
(address . 45523@debbugs.gnu.org)(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
20201229102031.10797-2-vincent.legoll@gmail.com
* 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(-)

Toggle diff (31 lines)
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
L
L
Leo Famulari wrote on 31 Dec 2020 01:11
Re: [bug#45523] [PATCH 0/2] Update for frrouting & add libyang
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 45523@debbugs.gnu.org)
X+0XTrc+Rnc+o0pt@jasmine.lan
On Tue, Dec 29, 2020 at 11:17:54AM +0100, Vincent Legoll wrote:
Toggle quote (4 lines)
> 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:


Toggle quote (3 lines)
> 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:


You can check the package's LICENSE file against those resources.
V
V
Vincent Legoll wrote on 5 Jan 2021 11:57
[PATCH 1/2] gnu: Add libyang
(address . 45523@debbugs.gnu.org)(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
20210105105728.11441-1-vincent.legoll@gmail.com
* gnu/packages/networking.scm (libyang): New variable.
---
gnu/packages/networking.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
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
V
V
Vincent Legoll wrote on 5 Jan 2021 11:57
[PATCH 2/2] gnu: frrouting: Update to 7.5.
(address . 45523@debbugs.gnu.org)(name . Vincent Legoll)(address . vincent.legoll@gmail.com)
20210105105728.11441-2-vincent.legoll@gmail.com
* 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(-)

Toggle diff (30 lines)
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
V
V
Vincent Legoll wrote on 5 Jan 2021 12:00
new patch set
(address . 45523@debbugs.gnu.org)
CAEwRq=pxjUVO5q97_vtsTe+OkeAxVQERZTxCcfTEdNKSNjDjXw@mail.gmail.com
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
L
L
Leo Famulari wrote on 20 Feb 2021 19:49
Re: [bug#45523] [PATCH 1/2] gnu: Add libyang
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 45523@debbugs.gnu.org)
YDFZpk6+LiUKL/MP@jasmine.lan
On Tue, Jan 05, 2021 at 11:57:27AM +0100, Vincent Legoll wrote:
Toggle quote (8 lines)
> * 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?
V
V
Vincent Legoll wrote on 20 Feb 2021 20:02
(name . Leo Famulari)(address . leo@famulari.name)(address . 45523@debbugs.gnu.org)
CAEwRq=ok6hQL=4ohzgtBp7qUG9bA4BbMbZ8zU5H0CK_7SRGbyA@mail.gmail.com
Hello,

On Sat, Feb 20, 2021 at 7:49 PM Leo Famulari <leo@famulari.name> wrote:
Toggle quote (2 lines)
> 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.

Toggle quote (2 lines)
> 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
L
L
Leo Famulari wrote on 21 Feb 2021 00:04
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 45523-done@debbugs.gnu.org)
YDGVfxDo41H57rdf@jasmine.lan
On Sat, Feb 20, 2021 at 08:02:01PM +0100, Vincent Legoll wrote:
Toggle quote (5 lines)
> 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!

Toggle quote (6 lines)
> 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...
Closed
?