diff options
author | prspkt <prspkt@protonmail.com> | 2019-03-28 16:02:55 +0200 |
---|---|---|
committer | prspkt <prspkt@protonmail.com> | 2019-03-28 16:32:59 +0200 |
commit | bcb310e369feb437d01bf66e48a1abaa16d3eb8e (patch) | |
tree | 39abec48a761a92c99c71574daaad359344f081a | |
parent | 1e4bd108ccc057442ab035758575e332efcf8148 (diff) | |
download | aports-bcb310e369feb437d01bf66e48a1abaa16d3eb8e.tar.bz2 aports-bcb310e369feb437d01bf66e48a1abaa16d3eb8e.tar.xz |
community/py-ethtool: upgrade to 0.14
- Add asciidoc and libnl3-dev makedepends.
-rw-r--r-- | community/py-ethtool/APKBUILD | 13 | ||||
-rw-r--r-- | community/py-ethtool/fix-includes-and-types.patch | 18 | ||||
-rw-r--r-- | community/py-ethtool/python-ethtool-libnl-1.0-support.patch | 71 |
3 files changed, 14 insertions, 88 deletions
diff --git a/community/py-ethtool/APKBUILD b/community/py-ethtool/APKBUILD index 645eb3af45..0c54f7d166 100644 --- a/community/py-ethtool/APKBUILD +++ b/community/py-ethtool/APKBUILD @@ -1,19 +1,17 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=py-ethtool _pkgname=ethtool -pkgver=0.7 +pkgver=0.14 pkgrel=0 pkgdesc="Python library for the ethtool kernel interface" url="https://github.com/fedora-python/python-ethtool" arch="all" license="GPL-2.0-only" depends= -depends_dev="libnl-dev pkgconfig python2-dev" -makedepends="linux-headers $depends_dev" -install= +makedepends="asciidoc libnl3-dev linux-headers py-setuptools python2-dev + python3-dev" subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3 $pkgname-doc" source="$pkgname-$pkgver.tar.gz::https://github.com/fedora-python/python-ethtool/archive/v$pkgver.tar.gz - python-ethtool-libnl-1.0-support.patch fix-includes-and-types.patch " builddir="$srcdir"/python-ethtool-$pkgver @@ -54,6 +52,5 @@ _py() { $python setup.py install --prefix=/usr --root="$subpkgdir" } -sha512sums="ee258bbb308d405c7089ab3a9e307c3bdafe557d220a2fad2498af3c54938ef9093973cdde52b6b971d07f888698af42bdcdbff00300c461248cfb2bdc3c35f5 python-ethtool-0.7.tar.bz2 -f3b3fbebfc276de712383f24439539bc649dd8cb91c9f63dd53ddf2c074592eb8deb22200947237e52dc6262c1dd3c4729e3912a40d42634a949c8b23deb96c9 python-ethtool-libnl-1.0-support.patch -d600fb49864b328be7dae349d948e6f32d1608e590c5dec5289ac6873bb1386527a5eb05e310a94033bc2e48c019b23a88da277b14ad99c798935c9d9359e4c9 fix-includes-and-types.patch" +sha512sums="57a3f2d60dd8309192fc858614645d4e7533c90c03113ffc1eeeb810b86eb71b0a80b4eb209d3452c7624c5318a853de50d9d716d41334bf079e6e3e2490fd4b py-ethtool-0.14.tar.gz +847d7468b5897746d9bfa89d69630629b391f786c89a5d4602768bc3d5bfa84439af5cbf6832ce9b242af374031a2125c5cf119e0af93cb6f2764b238eb60828 fix-includes-and-types.patch" diff --git a/community/py-ethtool/fix-includes-and-types.patch b/community/py-ethtool/fix-includes-and-types.patch index da655f7c67..4562ce44ad 100644 --- a/community/py-ethtool/fix-includes-and-types.patch +++ b/community/py-ethtool/fix-includes-and-types.patch @@ -1,16 +1,16 @@ ---- python-ethtool-0.7.orig/python-ethtool/etherinfo.c -+++ python-ethtool-0.7/python-ethtool/etherinfo.c -@@ -16,7 +16,6 @@ - */ - +--- a/python-ethtool/etherinfo.c ++++ b/python-ethtool/etherinfo.c +@@ -18,7 +18,6 @@ #include <Python.h> + #include "include/py3c/compat.h" + #include <bytesobject.h> -#include <bits/sockaddr.h> #include <stdio.h> #include <string.h> #include <sys/types.h> ---- python-ethtool-0.7.orig/python-ethtool/ethtool.c -+++ python-ethtool-0.7/python-ethtool/ethtool.c -@@ -41,9 +41,9 @@ +--- a/python-ethtool/ethtool.c ++++ b/python-ethtool/ethtool.c +@@ -45,9 +45,9 @@ #endif typedef unsigned long long u64; @@ -22,4 +22,4 @@ +typedef uint8_t u8; #include "ethtool-copy.h" - #include <linux/sockios.h> /* for SIOCETHTOOL */ + #include <linux/sockios.h> /* for SIOCETHTOOL */ diff --git a/community/py-ethtool/python-ethtool-libnl-1.0-support.patch b/community/py-ethtool/python-ethtool-libnl-1.0-support.patch deleted file mode 100644 index 43c53dba4e..0000000000 --- a/community/py-ethtool/python-ethtool-libnl-1.0-support.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff --git a/python-ethtool/etherinfo.c b/python-ethtool/etherinfo.c -index 3d2072b..23f03c6 100644 ---- a/python-ethtool/etherinfo.c -+++ b/python-ethtool/etherinfo.c -@@ -30,6 +30,52 @@ - #include "etherinfo_struct.h" - #include "etherinfo.h" - -+#ifdef LIBNL_1_0 -+#define NLHDR_COMMON \ -+ int ce_refcnt; \ -+ struct nl_object_ops * ce_ops; \ -+ struct nl_cache * ce_cache; \ -+ struct nl_list_head ce_list; \ -+ int ce_msgtype; \ -+ int ce_flags; \ -+ uint32_t ce_mask; -+ -+struct nl_cache -+{ -+ struct nl_list_head c_items; -+ int c_nitems; -+ int c_iarg1; -+ int c_iarg2; -+ struct nl_cache_ops * c_ops; -+}; -+ -+struct nl_object -+{ -+ NLHDR_COMMON -+}; -+ -+void nl_cache_free(struct nl_cache *cache) -+{ -+ struct nl_object *obj, *tmp; -+ -+ if( !cache ) -+ return; -+ -+ nl_list_for_each_entry_safe(obj, tmp, &cache->c_items, ce_list) { -+ struct nl_cache *cache = obj->ce_cache; -+ if( !cache ) { -+ break; -+ } -+ -+ nl_list_del(&obj->ce_list); -+ obj->ce_cache = NULL; -+ nl_object_put(obj); -+ cache->c_nitems--; -+ } -+ free(cache); -+} -+#endif -+ - /* - * - * Internal functions for working with struct etherinfo -diff --git a/setup.py b/setup.py -index bde04dc..9adff64 100644 ---- a/setup.py -+++ b/setup.py -@@ -67,7 +67,8 @@ setup(name='ethtool', - include_dirs = libnl['include'], - library_dirs = libnl['libdirs'], - libraries = libnl['libs'], -- define_macros = [('VERSION', '"%s"' % version)] -+ define_macros = [('VERSION', '"%s"' % version), -+ ('LIBNL_1_0', None)] - ) - ] - ) |