summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2020-03-27 15:58:23 +0100
committerSebastian Pipping <sping@gentoo.org>2020-03-27 16:02:40 +0100
commit10233b368e888c075f84dd3b673c70dd009e7cff (patch)
treebd4ffb11f247cda65e17db1857d99ec3ef7c2b20 /dev-python/cgroup-utils
parentdev-python/autobahn: Add missing dep on unittest2 (diff)
downloadgentoo-10233b368e888c075f84dd3b673c70dd009e7cff.tar.gz
gentoo-10233b368e888c075f84dd3b673c70dd009e7cff.tar.bz2
gentoo-10233b368e888c075f84dd3b673c70dd009e7cff.zip
dev-python/cgroup-utils: 0.8 + EAPI 7 + tests + py3[78]
Bug: https://bugs.gentoo.org/711808 Signed-off-by: Sebastian Pipping <sping@gentoo.org> Package-Manager: Portage-2.3.92, Repoman-2.3.20
Diffstat (limited to 'dev-python/cgroup-utils')
-rw-r--r--dev-python/cgroup-utils/Manifest1
-rw-r--r--dev-python/cgroup-utils/cgroup-utils-0.8.ebuild29
-rw-r--r--dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-builddir.patch25
-rw-r--r--dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-mountpoint.patch25
4 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/cgroup-utils/Manifest b/dev-python/cgroup-utils/Manifest
index 1085d34b81f3..feddb90850bd 100644
--- a/dev-python/cgroup-utils/Manifest
+++ b/dev-python/cgroup-utils/Manifest
@@ -1 +1,2 @@
DIST cgroup-utils-0.6.tar.gz 33845 BLAKE2B 1e7688f9dc32cc976acbd0a89e561b6f5537972c286765370cd2d9e090ca95cc122442d82e617b6d7132d35459b7ddd3413060945651593ba7498da22af26ae6 SHA512 5751ad7979812117cd75fc74282fb24f3ee041cc08eaac986544a5f12b7e83c806f0d1bb4c92c32314c5c8af4995dc4f36e023037ed7617907c8f42f97dbf6b5
+DIST cgroup-utils-0.8.tar.gz 35260 BLAKE2B 11187a917d5159699eb46fb67f5057eb16317f86c32e6471d8543955e1d40107663517395226ae75e3b0739fb59c7521590a3d04a5d818b151970cbea559dee7 SHA512 fcc31fb6d2bdfa761c248553d056ea1bdcf697ae9ab8ccdc895feefdec7bc4e560bf2352968866b3064548545d98527d2a4092d4c8d2f335ef76e3c4b721bcf0
diff --git a/dev-python/cgroup-utils/cgroup-utils-0.8.ebuild b/dev-python/cgroup-utils/cgroup-utils-0.8.ebuild
new file mode 100644
index 000000000000..f2de2609d505
--- /dev/null
+++ b/dev-python/cgroup-utils/cgroup-utils-0.8.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Tools and libraries for control groups of Linux"
+HOMEPAGE="https://github.com/peo3/cgroup-utils"
+SRC_URI="https://github.com/peo3/cgroup-utils/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND=""
+RDEPEND=""
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8-tests-builddir.patch
+
+ # Upstream: https://github.com/peo3/cgroup-utils/pull/12
+ "${FILESDIR}"/${PN}-0.8-tests-mountpoint.patch
+)
+
+python_test() {
+ sh ./test_all.sh || die
+}
diff --git a/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-builddir.patch b/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-builddir.patch
new file mode 100644
index 000000000000..2ec6c4f4fbb0
--- /dev/null
+++ b/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-builddir.patch
@@ -0,0 +1,25 @@
+From cf44c226f26a3d753402d36c66fcb8f81b4748f5 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Fri, 27 Mar 2020 15:35:46 +0100
+Subject: [PATCH] Make tests find the build
+
+---
+ test_all.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test_all.sh b/test_all.sh
+index d158f76..4fbbf2e 100644
+--- a/test_all.sh
++++ b/test_all.sh
+@@ -85,7 +85,7 @@ test_support()
+ fi
+ }
+
+-buildpath=$(find ./build/lib.linux* -maxdepth 0 -type d)
++buildpath="${BUILD_DIR}"/lib # passed by distutils-r1 eclass
+ export PYTHONPATH=$buildpath:.
+
+ echo "## Testing each commands for each subsystems"
+--
+2.24.1
+
diff --git a/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-mountpoint.patch b/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-mountpoint.patch
new file mode 100644
index 000000000000..bff7b04868d3
--- /dev/null
+++ b/dev-python/cgroup-utils/files/cgroup-utils-0.8-tests-mountpoint.patch
@@ -0,0 +1,25 @@
+From 0697af646a8235f80856c472e623117719c7186e Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Fri, 27 Mar 2020 15:48:25 +0100
+Subject: [PATCH] test_all.sh: Fix detection of memory cgroup mountpoint
+
+---
+ test_all.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test_all.sh b/test_all.sh
+index d158f76..4d10e19 100644
+--- a/test_all.sh
++++ b/test_all.sh
+@@ -97,7 +97,7 @@ done
+
+ test_run bin/cgutil top -b -n 1
+
+-root=$(awk '/^cgroup.*memory/ {print $2;}' /proc/mounts)
++root=$(awk '/^(cgroup.*)?memory/ {print $2;}' /proc/mounts)
+ path=$root/memory.usage_in_bytes
+ test_run_event bin/cgutil event -t 0.1 $path +1M
+ path=$root/memory.oom_control
+--
+2.24.1
+