]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
iotop: Update to work with python3
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 10 May 2021 17:03:08 +0000 (19:03 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 May 2021 16:26:12 +0000 (16:26 +0000)
- v2 version has updated rootfile. One line was accidentally missed out of
   original patch submission.
- Change from building with python2 to python3
- iotop setup.py used "itervalues" which is no longer used by python3
   In python3 this has been changed to "values". Patch created to update
   this in the source tarball setup.py
- Update lfs file with patch application and use of python3
- Update of rootfile
- Installed updated version into vm testbed and iotop confirmed working

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/packages/iotop
lfs/iotop
src/patches/iotop-0.6-replace-itervalues-with-values-in-setup.py.patch [new file with mode: 0644]

index 5ebe221eff9200bb395dc42421700e4d31370b74..541d6b3eedac343d014fd8f829a855fea56ac09f 100644 (file)
@@ -1,20 +1,12 @@
-usr/lib/python2.7/site-packages/iotop
-#usr/lib/python2.7/site-packages/iotop-0.6-py2.7.egg-info
-#usr/lib/python2.7/site-packages/iotop/__init__.py
-#usr/lib/python2.7/site-packages/iotop/__init__.pyc
-#usr/lib/python2.7/site-packages/iotop/data.py
-#usr/lib/python2.7/site-packages/iotop/data.pyc
-#usr/lib/python2.7/site-packages/iotop/genetlink.py
-#usr/lib/python2.7/site-packages/iotop/genetlink.pyc
-#usr/lib/python2.7/site-packages/iotop/ioprio.py
-#usr/lib/python2.7/site-packages/iotop/ioprio.pyc
-#usr/lib/python2.7/site-packages/iotop/netlink.py
-#usr/lib/python2.7/site-packages/iotop/netlink.pyc
-#usr/lib/python2.7/site-packages/iotop/ui.py
-#usr/lib/python2.7/site-packages/iotop/ui.pyc
-#usr/lib/python2.7/site-packages/iotop/version.py
-#usr/lib/python2.7/site-packages/iotop/version.pyc
-#usr/lib/python2.7/site-packages/iotop/vmstat.py
-#usr/lib/python2.7/site-packages/iotop/vmstat.pyc
+usr/lib/python3.8/site-packages/iotop
+#usr/lib/python3.8/site-packages/iotop-0.6-py3.8.egg-info
+#usr/lib/python3.8/site-packages/iotop/__init__.py
+#usr/lib/python3.8/site-packages/iotop/data.py
+#usr/lib/python3.8/site-packages/iotop/genetlink.py
+#usr/lib/python3.8/site-packages/iotop/ioprio.py
+#usr/lib/python3.8/site-packages/iotop/netlink.py
+#usr/lib/python3.8/site-packages/iotop/ui.py
+#usr/lib/python3.8/site-packages/iotop/version.py
+#usr/lib/python3.8/site-packages/iotop/vmstat.py
 usr/sbin/iotop
 #usr/share/man/man8/iotop.8
index d286eb1a9fb2a7a3b54f305c2926d6e1b89ebddd..02f027e5cbcbf429d60ee91c57ad62b5b22ce4fc 100644 (file)
--- a/lfs/iotop
+++ b/lfs/iotop
@@ -33,7 +33,7 @@ DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
 PROG       = iotop
-PAK_VER    = 1
+PAK_VER    = 2
 DEPS       =
 
 ###############################################################################
@@ -77,6 +77,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && python setup.py install
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/iotop-0.6-replace-itervalues-with-values-in-setup.py.patch
+       cd $(DIR_APP) && python3 setup.py install
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/src/patches/iotop-0.6-replace-itervalues-with-values-in-setup.py.patch b/src/patches/iotop-0.6-replace-itervalues-with-values-in-setup.py.patch
new file mode 100644 (file)
index 0000000..9778d19
--- /dev/null
@@ -0,0 +1,11 @@
+--- iotop-0.6/setup.py.orig    2013-05-27 00:44:18.000000000 +0200
++++ iotop-0.6/setup.py 2021-05-08 23:20:44.340837716 +0200
+@@ -7,7 +7,7 @@
+ # Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/
+ # while still honoring the choice of installing into local/ or not.
+ if hasattr(distutils_install, 'INSTALL_SCHEMES'):
+-    for d in distutils_install.INSTALL_SCHEMES.itervalues():
++    for d in distutils_install.INSTALL_SCHEMES.values():
+         if d.get('scripts', '').endswith('/bin'):
+             d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin'