[PATCH 1/2] gnu: add python-librouteros

OpenSubmitted by Denis 'GNUtoo' Carikli.
Details
3 participants
  • Denis 'GNUtoo' Carikli
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Severity
normal
D
D
Denis 'GNUtoo' Carikli wrote on 23 Apr 18:44 +0200
(address . guix-patches@gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
20220423164428.28465-1-GNUtoo@cyberdimension.org
* gnu/packages/python-xyz.scm (python-librouteros): New variable

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

Toggle diff (37 lines)
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@pisemsky.com>
 ;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
 ;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@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
D
D
Denis 'GNUtoo' Carikli wrote on 23 Apr 18:54 +0200
[PATCH 2/2] gnu: Add bundlewrap
(address . 55083@debbugs.gnu.org)(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
20220423165445.30956-1-GNUtoo@cyberdimension.org
* gnu/packages/configuration-management.scm (bundlewrap): New variable

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

Toggle diff (66 lines)
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@gmail.com>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@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
M
M
Maxime Devos wrote on 23 Apr 20:45 +0200
Re: [bug#55083] [PATCH 1/2] gnu: add python-librouteros
b82bfbcef16e06353571544d160f6b5b3efcc213.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
Toggle quote (4 lines)
> * gnu/packages/python-xyz.scm (python-librouteros): New variable
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRJMhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7upeAQDbz8bMf12YbSn6pedECLOtm6ZK
hN9eUsw2IJgOqwHF8wD/Ry8VmBXFjNmbH5NEJR5w8Vqlwt6pTvl0KaZY6kePbA8=
=3Ub6
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 20:45 +0200
74bd5814aee9776451fb20e0c157921aa7736956.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
Toggle quote (3 lines)
> +    (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)
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRJUxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7joVAQCgNlAz5mopYKvq9+Kv8HiMSseq
/uVv9AcONOFDK0vutQEA7iLwcdOsLedG7cJfTrj51POpwboNhxrYFJdLiE57IQg=
=hvpm
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 20:48 +0200
8e74310feba017a21a008d1892cc927f5e0297e6.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:44 [+0200]:
Toggle quote (2 lines)
> +    (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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRJ9RccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pfnAQCXnCpK36BWPtLbpoNUWHZcXuyB
1WWzAA5kQdinsQw/mQD+J5Lg3N4IylyPVgTG8iwABv8khMPX2CFQZDf9NAFs7Qs=
=hQDL
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 20:49 +0200
Re: [bug#55083] [PATCH 2/2] gnu: Add bundlewrap
82e750be4d7b9730b48f395fd96a1c5ee1a35188.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
Toggle quote (2 lines)
> +    (license license:gpl3)))

Isn't this incompatible with librouteros' license?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRKHBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tvqAP0b9iCoXJGaCLO3/evTATCKvze3
e/NzDtzI0DJfBNc5ZwEA6IgTGG4J5D9h6Q4DW+AP8GpOL0SYuFkOkVQYcMeRfQY=
=YpC9
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 20:52 +0200
df6b72d277b78000f61bdf74497cf03b91a32da0.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
Toggle quote (3 lines)
> +    (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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRK0hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lW2APwMjJXn9/XmC3YGqY7wGsBBj+h2
g+qDl1MZ19npH1HoQgD+PoSSdPZr0WmkJU7r5tfIDs9k3SyIK/zkLhL+JCcnZA0=
=PWo6
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 20:55 +0200
88d22f3a4a0787153e3a54524372d7415932c203.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
Toggle quote (2 lines)
> +                  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

Greeetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRLoRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7m38AP9SdzfWo98Ydr1Lcy0+esoBwBih
8JZznosqEy8tJvbBvAEAoW4VsAfA3Mj1DldcNVB7HUVdT8iKFdDeUNuEpb73aQY=
=6hPr
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 21:00 +0200
270dce1ebc7434840fa404e6cf61d3d881ea638e.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
Toggle quote (6 lines)
> +              (method url-fetch)
> +              (uri (pypi-uri "bundlewrap" version))
> +              (sha256
> +               (base32
> +               

It uses /usr/bin/less
which does not exist in Guix.

It also uses git, bzr and hg:


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

There's also a use of 'stat':


Possibly there are more things to absolutise.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRMuBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tIwAQCydwFm6kbVQgyoUjzktsev7nMW
I7pw2RxOUEUXsG87iAEAtIONE0+3hGofA5tYbhsr1HivB8rg+wxOhpotdVqdNQc=
=B83p
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 Apr 21:03 +0200
1ea13b25b658a664f32f0a54753d19704b4d980a.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op za 23-04-2022 om 18:54 [+0200]:
Toggle quote (11 lines)
> +(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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYmRNjxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g/1AQCkY+oE4UVv0ZO7wf0mrBRp3iN4
X0dMfyVUi6XdV7uShwD8Cn9Y9qAneYR89NIb9bHRalKP9QRkw4ssjQ+kGA8J2gg=
=Sy55
-----END PGP SIGNATURE-----


D
D
Denis 'GNUtoo' Carikli wrote on 26 Apr 17:32 +0200
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 55083@debbugs.gnu.org)
20220426173241.2ba56ef7@primarylaptop.localdomain
On Sat, 23 Apr 2022 20:49:00 +0200
Maxime Devos <maximedevos@telenet.be> wrote:

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

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmJoEJkACgkQX138wUF3
4mMoTg//ZQskbLr7TRbvamT2QCMZ3IdlshTiqpmO6mpCbSpqM16Am60770YZQFio
oKh2l29nKMEbD51Mg8fn6X8Ly5StY5wD9EEIOQJDYNIfqzG+gNnGf8o386TQn4rR
YM6ye8dRt/XKzneZbfdKbdRKcfWf8T4IpYpopQqgUxJk9BP9Ue5uHlUpTz1JIdgl
+9p4Cp0W2d5nrxNo2YbSsyANWIUxz7TsDW4uwJzLmyD7/C3o3MKFFF5me3UPXxsR
m6g05FgJtmBVcDEdn4ITEwO235OvYhwYVEfmXRVsWOqs3SHwEW7yFGj9nInKMKlB
ZospO20daG4TcUX1/PBGveizGErp0++oR5m7NNLTi7lsGcVHzyQzf3CqmQgqxINR
EJVF0n9zLrROg2+lDECqkTMjMKm95E4S3/SxOd5Wi6rSlk4JJK/uAITtpW1MGJWz
UYWOkmCzK84NZUwkeFhCfkZJJk+IV9yo7mXg0Hps9GtWw8dnTJO/M6BHNw6db9Tq
L6zFc3GaDt90T6AKOPKJQ26kGtkWOtbcpddgJeZwFTgthqy3H3KxCXc6sDVWy+wJ
yk42taMqHLU7GYg1PWM2D0m7djTh5qF/T8CLSSpHCTlhV+fhCGkxEQfDagZnhD0d
SvxDWx1gbcmoJ/1zsZezBU8u0lg8wvrc2fYAl3ukwiSw+iaIw74=
=xci+
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 23 May 15:19 +0200
Re: bug#55083: [PATCH 1/2] gnu: add python-librouteros
(name . Denis 'GNUtoo' Carikli)(address . GNUtoo@cyberdimension.org)
87pmk475ez.fsf_-_@gnu.org
Hi Denis,

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

Seems like little is missing to get those patches applied.

Thanks,
Ludo’.
D
D
Denis 'GNUtoo' Carikli wrote on 23 May 18:08 +0200
(name . Ludovic Courtès)(address . ludo@gnu.org)
20220523180849.02eda788@primarylaptop.localdomain
On Mon, 23 May 2022 15:19:16 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (1 lines)
> Hi Denis,
Hi,

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

And here the issue mentioned in the first link is the GPLv2 section 6
which has:
Toggle quote (5 lines)
> [...]
> 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:
-----------

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmKLsZEACgkQX138wUF3
4mMj0RAAi04AxljD1isCeakd83X+0o6i52O4cKFy5BldqQd7TIAXXqIMmEqDavOd
u/pQI15kO7iBYjmr/olEmk5w/nSypbHCBNIyXk1DmlGoep6lmbv5sObosUkc6FUC
lXIZXVkRvMPI0fVIldKXphvX5YDiy2ai82pRADje7+L2nBYYXWjAZh988VjYS7VI
U6NQcyA9DuRz5fN5Z9VPQ1/VsEqWluc86d/oqMj/9UAyEMn+frJpnrem9YxnpWd8
F87FGA5mrZc4EHA0s2GNGbJ9n0rp8dm6dlBB3I8FITDrSlbRe5qKVh5qyrZbYl6F
u1+L/ECXDANeMZ3wzIJHR9sGq7dN/Y/qDyi/usqf33XaYLnm3XWLvDHikJlsuuHZ
1tfL0Vxc3KcDh52jym+1m/4+U/9ukflCqwjIHeKEUCuAE0oyrioPmvW0QnhYOvtj
xvMZAXOexekhE+ztw8CQUsI/PpfVj1JzEoidGdkUGJYBDEXgmlrQEjAPfoRx2LeB
JEYPP/spoI9tyCA1TWIrPxjL4P1JAtiRcyAbcFMrsH7pCyIyFWl9649euUVTKgN2
CXbFvuYxE65royXqor6/24w0F2dmJQMhYP1JU1aO+8c2nhmtd8SCGIToLKj7Pd0j
wxvJb6DWdiKtSLToQJ+vyJGmmlLK5iCSC+FJAT877kVSifA1WgI=
=LTzx
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 23 May 18:37 +0200
(address . 55083@debbugs.gnu.org)
eb7b8580688a3040620ba96abea021bfcd4ed992.camel@telenet.be
Denis 'GNUtoo' Carikli schreef op ma 23-05-2022 om 18:08 [+0200]:
Toggle quote (4 lines)
> 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]


Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYou4XhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qfQAP0YVs7fnUwbLEdo1OmgtGD6yQXR
VL/mgWHni67caHeVXwEA0qWRhFmW69D68WIQ9RU1RtIa3zZaZiWwuIBRSE1HYQk=
=wmKa
-----END PGP SIGNATURE-----


?