[arch-commits] Commit in python-pyroute2/repos (4 files)

Felix Yan felixonmars at gemini.archlinux.org
Fri Dec 3 00:42:49 UTC 2021


    Date: Friday, December 3, 2021 @ 00:42:48
  Author: felixonmars
Revision: 1063978

archrelease: copy trunk to community-staging-any

Added:
  python-pyroute2/repos/community-staging-any/
  python-pyroute2/repos/community-staging-any/PKGBUILD
    (from rev 1063973, python-pyroute2/trunk/PKGBUILD)
  python-pyroute2/repos/community-staging-any/fix-wireguard-key-parsing.patch
    (from rev 1063973, python-pyroute2/trunk/fix-wireguard-key-parsing.patch)
  python-pyroute2/repos/community-staging-any/fix_sphinx_css.patch
    (from rev 1063973, python-pyroute2/trunk/fix_sphinx_css.patch)

---------------------------------+
 PKGBUILD                        |   46 ++++++++++++++++++++++++++++++++++++++
 fix-wireguard-key-parsing.patch |   42 ++++++++++++++++++++++++++++++++++
 fix_sphinx_css.patch            |    9 +++++++
 3 files changed, 97 insertions(+)

Copied: python-pyroute2/repos/community-staging-any/PKGBUILD (from rev 1063973, python-pyroute2/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-12-03 00:42:48 UTC (rev 1063978)
@@ -0,0 +1,46 @@
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: brent s. <bts[at]square-r00t[dot]net>
+# Contributor: Alexander Phinikarides <alexisph _AT_ gmail _DOT_ com>
+
+pkgbase='python-pyroute2'
+_pkgbase="${pkgbase//python-/}"
+pkgname=("python-${_pkgbase}")
+pkgdesc="A pure Python netlink and Linux network configuration library"
+pkgver=0.5.19
+pkgrel=5
+arch=('any')
+url="https://docs.pyroute2.org/"
+license=('GPL2' 'Apache')
+depends=('python')
+makedepends=('python' 'python-setuptools' 'python-setuptools-scm' 'python-sphinx' 'git' 'python-aafigure' 'twine')
+source=("https://files.pythonhosted.org/packages/source/${_pkgbase:0:1}/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz"
+        'fix-wireguard-key-parsing.patch')
+# source=("${_pkgbase}-${pkgver}.tar.gz::https://github.com/svinota/${_pkgbase}/archive/${pkgver}.tar.gz"
+#        'fix_sphinx_css.patch')
+sha512sums=('bd60e2adf59b8438ff4f6abf2d41cf18eb60dcef3072577648488db45ffe89bd9c7207c4eccc38eb9256533ea2950e7f20b82ae4940b1207ba71d0f261e83f6d'
+            '612e81058337e4e9d08fb083cfaf0efae180fbdc6c4150fa122160aa91b71b005bacef6cd3f171091ee1cb7e79523470db156448368f183b87f6474eb984691a')
+
+prepare() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  patch -p1 -N -i "${srcdir}/fix-wireguard-key-parsing.patch"
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py build
+}
+
+check() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py check
+}
+
+package() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  python setup.py install --root="${pkgdir}/" --optimize=1
+  # Tests get installed into the package for some reason
+  PYTHON_STDLIB="$(python -c "from sysconfig import get_path; print(get_path('stdlib'))")"
+  rm -rf "${pkgdir%/}/${PYTHON_STDLIB#/}/site-packages/tests"
+}
+
+# vim:set ts=2 sw=2 et:

Copied: python-pyroute2/repos/community-staging-any/fix-wireguard-key-parsing.patch (from rev 1063973, python-pyroute2/trunk/fix-wireguard-key-parsing.patch)
===================================================================
--- community-staging-any/fix-wireguard-key-parsing.patch	                        (rev 0)
+++ community-staging-any/fix-wireguard-key-parsing.patch	2021-12-03 00:42:48 UTC (rev 1063978)
@@ -0,0 +1,42 @@
+From 1fba06684062a298b22801c71a1ae091d313cc11 Mon Sep 17 00:00:00 2001
+From: K900 <me at 0upti.me>
+Date: Mon, 24 May 2021 09:57:11 +0300
+Subject: [PATCH] wireguard: fix parsing keys
+
+Load the keys from the correct place in the message, and load them as the right length as well.
+---
+ pyroute2/netlink/generic/wireguard.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/pyroute2/netlink/generic/wireguard.py b/pyroute2/netlink/generic/wireguard.py
+index 17b510d2..74f448e0 100644
+--- a/pyroute2/netlink/generic/wireguard.py
++++ b/pyroute2/netlink/generic/wireguard.py
+@@ -151,11 +151,11 @@ class wgdevice_peer(nla):
+                    ('WGPEER_A_PROTOCOL_VERSION', 'uint32'))
+ 
+         class parse_peer_key(nla):
+-            fields = (('key', 's'), )
++            fields = (('key', '32s'), )
+ 
+             def decode(self):
+                 nla.decode(self)
+-                self['value'] = b64encode(self['value'])
++                self['value'] = b64encode(self['key'])
+ 
+             def encode(self):
+                 self['key'] = b64decode(self['value'])
+@@ -220,11 +220,11 @@ def decode(self):
+                 self['addr'] = '{0}/{1}'.format(self['addr'], wgaddr)
+ 
+     class parse_wg_key(nla):
+-        fields = (('key', 's'), )
++        fields = (('key', '32s'), )
+ 
+         def decode(self):
+             nla.decode(self)
+-            self['value'] = b64encode(self['value'])
++            self['value'] = b64encode(self['key'])
+ 
+         def encode(self):
+             self['key'] = b64decode(self['value'])

Copied: python-pyroute2/repos/community-staging-any/fix_sphinx_css.patch (from rev 1063973, python-pyroute2/trunk/fix_sphinx_css.patch)
===================================================================
--- community-staging-any/fix_sphinx_css.patch	                        (rev 0)
+++ community-staging-any/fix_sphinx_css.patch	2021-12-03 00:42:48 UTC (rev 1063978)
@@ -0,0 +1,9 @@
+diff -upr a/docs/conf.py b/docs/conf.py
+--- a/docs/conf.py	2021-05-13 23:09:46.000000000 +0200
++++ b/docs/conf.py	2021-09-01 11:32:22.089740192 +0200
+@@ -46,4 +46,4 @@ texinfo_documents = [('index',
+ 
+ 
+ def setup(app):
+-    app.add_stylesheet('custom.css')
++    app.add_css_file('custom.css')



More information about the arch-commits mailing list