GNU bug report logs - #55083
[PATCH 1/2] gnu: add python-librouteros

Previous Next

Package: guix-patches;

Reported by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

Date: Sat, 23 Apr 2022 16:44:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 55083 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


Report forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 16:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 23 Apr 2022 16:44:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: guix-patches <at> gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 1/2] gnu: add python-librouteros
Date: Sat, 23 Apr 2022 18:44:28 +0200
* gnu/packages/python-xyz.scm (python-librouteros): New variable

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/python-xyz.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9a5d311680..8d6b91c8f7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -119,6 +119,7 @@
 ;;; Copyright © 2022 Evgeny Pisemsky <evgeny <at> pisemsky.com>
 ;;; Copyright © 2022 drozdov <drozdov <at> portalenergy.tech>
 ;;; Copyright © 2022 Peter Polidoro <peter <at> polidoro.io>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -12347,6 +12348,22 @@ (define-public python-idna
 (define-public python2-idna
   (package-with-python2 python-idna))
 
+(define-public python-librouteros
+  (package
+    (name "python-librouteros")
+    (version "3.2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "librouteros" version))
+              (sha256
+               (base32
+                "121z8w47sx9hczg0jhxwsy2ld1r52z9nnyxqzljb4vfphi0gkh78"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/luqasz/librouteros")
+    (synopsis "Python implementation of MikroTik RouterOS API")
+    (description "Python implementation of MikroTik RouterOS API")
+    (license license:gpl2)))
+
 (define-public python-libsass
   (package
     (name "python-libsass")
-- 
2.35.1





Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 16:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 55083 <at> debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Subject: [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 18:54:45 +0200
* gnu/packages/configuration-management.scm (bundlewrap): New variable

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
---
 gnu/packages/configuration-management.scm | 41 +++++++++++++++++++++--
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/configuration-management.scm b/gnu/packages/configuration-management.scm
index c64b937fe5..cbbddf3cd1 100644
--- a/gnu/packages/configuration-management.scm
+++ b/gnu/packages/configuration-management.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -18,11 +19,17 @@
 
 (define-module (gnu packages configuration-management)
   #:use-module (gnu packages)
-  #:use-module (guix build-system go)
-  #:use-module (guix git-download)
   #:use-module (gnu packages golang)
-  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages python-crypto)
+  #:use-module (gnu packages python-web)
+  #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages ssh)
   #:use-module (gnu packages textutils)
+  #:use-module (gnu packages version-control)
+  #:use-module (guix build-system go)
+  #:use-module (guix build-system python)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -103,3 +110,31 @@ (define-public chezmoi
     (description "This package helps to manage personal configuration files
 across multiple machines.")
     (license license:expat)))
+
+(define-public bundlewrap
+  (package
+    (name "bundlewrap")
+    (version "4.13.6")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "bundlewrap" version))
+              (sha256
+               (base32
+                "1fsy5kjpacrca85ckxhwq1y4lci4ysls5raam75jpkzg5ra1fxj7"))))
+    (build-system python-build-system)
+    (inputs (list python-cryptography
+                  python-jinja2
+                  python-librouteros
+                  python-mako
+                  python-passlib
+                  python-pyaml
+                  python-requests
+                  python-tomlkit
+                  openssh))
+    (arguments
+     ;; Tests require network
+     `(#:tests? #f))
+    (synopsis "Agent-less configuration management")
+    (description "Agent-less configuration management with Python")
+    (home-page "https://bundlewrap.org/")
+    (license license:gpl3)))
-- 
2.35.1





Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 1/2] gnu: add python-librouteros
Date: Sat, 23 Apr 2022 20:45:06 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
> * gnu/packages/python-xyz.scm (python-librouteros): New variable
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>

While this is a thing for, say, the Linux kernel, Guix does not have a
DCO and this is not what Signed-off-by means in Guix.  From the Guix
manual:

   When pushing a commit on behalf of somebody else, please add a
‘Signed-off-by’ line at the end of the commit log message—e.g., with
‘git am --signoff’.  This improves tracking of who did what.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 1/2] gnu: add python-librouteros
Date: Sat, 23 Apr 2022 20:45:39 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
> +    (synopsis "Python implementation of MikroTik RouterOS API")
> +    (description "Python implementation of MikroTik RouterOS API")

A description is missing here (it's identical to the synopsis)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:49:01 GMT) Full text and rfc822 format available.

Message #17 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 1/2] gnu: add python-librouteros
Date: Sat, 23 Apr 2022 20:48:21 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
> +    (license license:gpl2)))

GPL-2-only can easily cause compatibility issues, would upstream be
amenable to making it GPL-2-or-later, or (alternatively) just GPL-2-or-
3-at-your-choice?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:50:02 GMT) Full text and rfc822 format available.

Message #20 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 20:49:00 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> +    (license license:gpl3)))

Isn't this incompatible with librouteros' license?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:53:01 GMT) Full text and rfc822 format available.

Message #23 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 20:52:02 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> +    (synopsis "Agent-less configuration management")
> +    (description "Agent-less configuration management with Python")

What does this mean?  E.g., could I consider the text editor 'nano' to
be an ‘agent-less configuration management’ tool, because it allows me
the modify configuration files (‘managing’) and it doesn't have a
daemon (‘agent’)?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 18:56:02 GMT) Full text and rfc822 format available.

Message #26 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 20:55:29 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> +                  python-requests

Is python-requests used for contacting https:// URLs?  If so,
'bundlewrap' probably needs a SSL_CERT_FILE or SSL_CERT_DIR search path
(see, e.g., https://github.com/psf/requests/pull/2903).

Greeetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 19:01:02 GMT) Full text and rfc822 format available.

Message #29 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 21:00:08 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> +              (method url-fetch)
> +              (uri (pypi-uri "bundlewrap" version))
> +              (sha256
> +               (base32
> +               

It uses /usr/bin/less
<https://github.com/bundlewrap/bundlewrap/blob/567b5f055067b1e23ea8081b24f1bebfdc44c541/bundlewrap/utils/ui.py#L122>,
which does not exist in Guix.

It also uses git, bzr and hg:

https://github.com/bundlewrap/bundlewrap/blob/567b5f055067b1e23ea8081b24f1bebfdc44c541/bundlewrap/utils/scm.py#L10

these theoretically should be absolutised though there might be closure
size concerns.

There's also a use of 'stat':

https://github.com/bundlewrap/bundlewrap/blob/567b5f055067b1e23ea8081b24f1bebfdc44c541/bundlewrap/utils/remote.py#L8

Possibly there are more things to absolutise.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 23 Apr 2022 19:04:01 GMT) Full text and rfc822 format available.

Message #32 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Sat, 23 Apr 2022 21:03:43 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> +(define-public bundlewrap
> +  (package
> +    (name "bundlewrap")
> +    (version "4.13.6")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "bundlewrap" version))
> +              (sha256
> +               (base32
> +                "1fsy5kjpacrca85ckxhwq1y4lci4ysls5raam75jpkzg5ra1fxj7"))))

There appears to be some code that is broken in non-English locales:

   "stat -c '%U:%G:%a:%s:%F' -- {}".format(quote(path)),

    @property
    def is_directory(self):
        return self.stat['type'] == "directory"

    @property
    def is_file(self):
        return self.stat['type'] in ("regular file", "regular empty
file")

    @property
    def is_symlink(self):
        return self.stat['type'] == "symbolic link"

In my locale, it's 'map', not 'directory'.

Greetings,
Maxime.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Tue, 26 Apr 2022 15:32:02 GMT) Full text and rfc822 format available.

Message #35 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55083 <at> debbugs.gnu.org
Subject: Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
Date: Tue, 26 Apr 2022 17:32:41 +0200
[Message part 1 (text/plain, inline)]
On Sat, 23 Apr 2022 20:49:00 +0200
Maxime Devos <maximedevos <at> telenet.be> wrote:

> Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
> > +    (license license:gpl3)))
> 
> Isn't this incompatible with librouteros' license?
Yes it is.

I've deduced both licenses from the setup.py file which as I understand
constitutes a statement of the project license (according to the GPL
FAQ you need statements to be sure of the license, not just a COPYING
file), but the issue is that they don't tell if it's GPLv2-only or
GPLv2-or-later (or GPLv3-only or GPLv3-or-later for bundlewrap's).

At first I've asked librouteros to clarify the situation[1] and
if that doesn't work I can still ask bundlewrap to add an exception for
linking against GPLv2-only code.

The later is also possible because there is some copyright assignment
process when sending patches to bundlewrap[2].

References:
-----------
[1]https://github.com/luqasz/librouteros/issues/129
[2]https://github.com/bundlewrap/bundlewrap/blob/main/CAA.md

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Mon, 23 May 2022 13:20:01 GMT) Full text and rfc822 format available.

Message #38 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
Cc: 55083 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#55083: [PATCH 1/2] gnu: add python-librouteros
Date: Mon, 23 May 2022 15:19:16 +0200
Hi Denis,

Did you have a chance to address Maxime’s comments?

Seems like little is missing to get those patches applied.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Mon, 23 May 2022 16:10:02 GMT) Full text and rfc822 format available.

Message #41 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55083 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#55083: [PATCH 1/2] gnu: add python-librouteros
Date: Mon, 23 May 2022 18:08:49 +0200
[Message part 1 (text/plain, inline)]
On Mon, 23 May 2022 15:19:16 +0200
Ludovic Courtès <ludo <at> gnu.org> wrote:

> Hi Denis,
Hi,

> Did you have a chance to address Maxime’s comments?
> 
> Seems like little is missing to get those patches applied.
I could do that but we can only merge python-librouteros.

python-librouteros doesn't want to change license so only bundlewrap
can fix that licensing issue.

I've reported the bug upstream[1], and as there is a CLA, a single
entity (here a company) owns all the copyright, and they don't want to
re-license as GPLv2 or GPLv2-or-later, so as I understand the only
options left are:
- to somehow remove the python-librouteros dependency completely
- to add an exception to link it to GPLv2 code

As for the later the project expressed some doubts on if it's really
possible or not:
> Hm. Are you sure it's possible for me to "allow" BundleWrap to be
> linked against GPLv2 libs? Wouldn't that require the permission of
> the lib, rather than BundleWrap?

And so far I found the following information on the topic but nothing
really conclusive yet:
- https://www.gnu.org/licenses/gpl-faq.html#v2v3Compatibility
- https://www.gnu.org/licenses/gpl-faq.html#GPLIncompatibleLibs

And here the issue mentioned in the first link is the GPLv2 section 6
which has:
> [...]
> You may not impose any further restrictions on the recipients'
> exercise of the rights granted herein.
> [...]

So here I'm not sure anymore if there is a way to somehow satisfy
the GPLv2 of the library just with an exception in bundlewrap.

I'm also very interested in understanding that issue better as I've
written software (were I still own all the copyright) that has somewhat
similar requirements (I want to release it under GPLv2 or later (to
be able to be merged upstream) with an exception for linking against
Apache libraries).

References:
-----------
[1]https://github.com/bundlewrap/bundlewrap/issues/709

Denis.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Mon, 23 May 2022 16:39:01 GMT) Full text and rfc822 format available.

Message #44 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>, Ludovic
 Courtès <ludo <at> gnu.org>
Cc: 55083 <at> debbugs.gnu.org
Subject: Re: bug#55083: [PATCH 1/2] gnu: add python-librouteros
Date: Mon, 23 May 2022 18:37:50 +0200
[Message part 1 (text/plain, inline)]
Denis 'GNUtoo' Carikli schreef op ma 23-05-2022 om 18:08 [+0200]:
> I could do that but we can only merge python-librouteros.
> 
> python-librouteros doesn't want to change license

Upstream clarified it's GPLv2-only, but AFAICT hasn't explicitly
expressed any opinion on whether they would mind relicensing.  I asked
for clarification [1]

[1]: <https://github.com/luqasz/librouteros/issues/129#issuecomment-1134892145>

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55083; Package guix-patches. (Sat, 29 Oct 2022 11:31:01 GMT) Full text and rfc822 format available.

Message #47 received at 55083 <at> debbugs.gnu.org (full text, mbox):

From: Denis 'GNUtoo' Carikli <GNUtoo <at> cyberdimension.org>
To: 55083 <at> debbugs.gnu.org
Subject: Re: gnu: add python-librouteros
Date: Sat, 29 Oct 2022 13:30:29 +0200
[Message part 1 (text/plain, inline)]
Hi,

In the bug report about licensing it was unclear if
python-librouteros was GPLv2 only[1] or GPLv2 or later[2].

The comments were by the same person (the project owner in github) and
the one stating that it is GPLv2 or later came after the one stating
that it is GPLv2 only.

Bundlewrap considered it as GPLv2 of that later comment[3].

So to get a definitive clarification I send a patch to librouteros
for the license clarification[4] and it was accepted.

So I can now cleanup the code, update the packages to the latest
versions if necessary and get all that merged.

Do I need to use the exact commit with the license clarification or can
I use the latest release? Or do I backport that commit?

Since it's a license clarification and not a license change, I guess
that it works retrospectively too.

References:
-----------
[1]https://github.com/luqasz/librouteros/issues/129#issuecomment-1111537090
[2]https://github.com/luqasz/librouteros/issues/129#issuecomment-1136123888
[3]https://github.com/bundlewrap/bundlewrap/issues/709#issuecomment-1249674037
[4]https://github.com/luqasz/librouteros/commit/bbf0e580ac03b818190d2a3839046dc7e1a06a90

Denis.
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 1 year and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.