summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgenstern2021-03-06 16:34:32 +1300
committerMorgenstern2021-03-06 16:34:32 +1300
commitd8fd682a2d934b0a4f79a5afebc0d833b334e063 (patch)
tree935fba27029b84763578b339a82a181f645773c9
parent9b3f942543bbeea1c16dbb6735e15301534d4bb9 (diff)
downloadaur-d8fd682a2d934b0a4f79a5afebc0d833b334e063.tar.gz
Update to Qt 5 and Python 3 version
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD76
-rw-r--r--procexp.install12
-rw-r--r--procexp.patch105
4 files changed, 171 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 86ee70837d19..ba93dd412fa3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,20 @@
pkgbase = procexp
- pkgdesc = Graphical process explorer for Linux.
- pkgver = 1.7.289
+ pkgdesc = Graphical process explorer for Linux
+ pkgver = 20200715
pkgrel = 1
- url = http://sourceforge.net/projects/procexp/
- install = procexp.install
+ url = https://github.com/wolfc01/procexp
arch = any
- license = GPL2
- depends = util-linux
- depends = python2-pyqwt
- depends = python2
- depends = python2-pyqt4
- depends = python2-configobj
- depends = tcpdump
+ license = GPL3
+ depends = ethtool
depends = polkit
- optdepends = ethtool: obtain ethernet cards statistics
- options = docs
- source = http://downloads.sourceforge.net/project/procexp/bin_v1/procexp_1.7.289-0ubuntu1_all.deb
- md5sums = 5ce96fd6a5772f4e371ab863f032450f
+ depends = python-configobj
+ depends = python-pyqt5
+ depends = pyqt-qwt
+ depends = tcpdump
+ source = procexp-ebd5d47d4e457d3776754eda9068ced7e31fc3e8.tar.gz::https://github.com/wolfc01/procexp/archive/ebd5d47d4e457d3776754eda9068ced7e31fc3e8.tar.gz
+ source = procexp.patch
+ sha256sums = ac5541e5bdd6ba82e9fda11f78c98cbfbf6d0dc887c276cc5a10c80ce4972799
+ sha256sums = 19d93a5cd060a58f69df92e948cc67850c92d0f974594ff255c59216d03bd543
pkgname = procexp
diff --git a/PKGBUILD b/PKGBUILD
index c7f6dadd978b..3f158d28c45f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,61 @@
-#Maintainer: Daniel Gerbaudo <info@danielgerbaudo.com>
-#Reuploaded Stephen Zhang's package.
-#Fixed dependencies
+# Maintainer: Morgenstern <charles [at] charlesbwise [dot] com>
+# Contributor: Daniel Gerbaudo <info@danielgerbaudo.com>
pkgname=procexp
-pkgver=1.7.289
+pkgver=20200715
+_commit=ebd5d47d4e457d3776754eda9068ced7e31fc3e8
pkgrel=1
-pkgdesc="Graphical process explorer for Linux."
+pkgdesc="Graphical process explorer for Linux"
arch=('any')
-url="http://sourceforge.net/projects/procexp/"
-license=('GPL2')
-depends=('util-linux' 'python2-pyqwt' 'python2' 'python2-pyqt4' 'python2-configobj' 'tcpdump' 'polkit')
-optdepends=('ethtool: obtain ethernet cards statistics')
-options=(docs)
-install=$pkgname.install
-source=("http://downloads.sourceforge.net/project/${pkgname}/bin_v1/${pkgname}_${pkgver}-0ubuntu1_all.deb")
-md5sums=("5ce96fd6a5772f4e371ab863f032450f")
-package() {
- cd $srcdir
- tar -zxvf data.tar.gz
- sed -e '20s#python#/usr/bin/python2.7#' $srcdir/usr/bin/procexp.sh > $srcdir/usr/bin/procexp
- rm $srcdir/usr/bin/procexp.sh
-
- sed -i -e '5s/.sh//' $srcdir/usr/share/applications/procexp.desktop
+url="https://github.com/wolfc01/${pkgname}"
+license=('GPL3')
+depends=('ethtool'
+ 'polkit'
+ 'python-configobj'
+ 'python-pyqt-qwt'
+ 'python-pyqt5'
+ 'tcpdump')
+source=("${pkgname}-${_commit}.tar.gz::https://github.com/wolfc01/${pkgname}/archive/${_commit}.tar.gz"
+ "${pkgname}.patch")
+sha256sums=('ac5541e5bdd6ba82e9fda11f78c98cbfbf6d0dc887c276cc5a10c80ce4972799'
+ '19d93a5cd060a58f69df92e948cc67850c92d0f974594ff255c59216d03bd543')
+
+prepare() {
+ mv ${pkgname}-{$_commit,$pkgver}
+
+ # Patch (upstream is not maintained)
+ cd "${pkgname}-${pkgver}"
+ patch --strip=1 --input="${srcdir}/${pkgname}.patch"
+
+ # Remove RPM tools
+ rm make_rpm.py process_explorer.spec
- chmod a+x $srcdir/usr/bin/procexp
+ # Fix .desktop file
+ sed -i -e "s/${pkgname}.sh/${pkgname}/" -e "s/.*icon.png$/Icon=${pkgname}/" \
+ -e "s/StartupNotify=True/StartupNotify=true/" "${pkgname}.desktop"
- cp -dpr --no-preserve=ownership $srcdir/usr/ $pkgdir/
- chmod a+x $pkgdir/usr/lib/procexp/rootproxy/procroot.py
+ # Fix wrapper
+ sed -i '1i #!/bin/bash\n' "${pkgname}.sh"
}
+package() {
+ cd "${pkgname}-${pkgver}"
+
+ # Install Python components
+ install -d "${pkgdir}/usr/lib/${pkgname}"
+ find ./ -type f -name '*.py' -perm 0644 -exec install -Dm0644 "{}" "${pkgdir}/usr/lib/${pkgname}/""{}" \;
+ find ./ -type f -name '*.py' -perm 0755 -exec install -D "{}" "${pkgdir}/usr/lib/${pkgname}/""{}" \;
+ find ./ -type f -name '*.ui' -exec install -Dm0644 "{}" "${pkgdir}/usr/lib/${pkgname}/""{}" \;
+ install -Dm0644 ./ui/icon.png "${pkgdir}/usr/lib/${pkgname}/ui/icon.png"
+ install -Dm0644 ./rootproxy/log.txt "${pkgdir}/usr/lib/${pkgname}/rootproxy/log.txt"
+
+ # Install wrapper
+ install -D "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
+
+ # Install freedesktop components
+ install -Dm0644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm0644 icon.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+
+ # Install polkit component
+ install -Dm0644 "com.${pkgname}.pkexec.policy" "${pkgdir}/usr/share/polkit-1/actions/com.${pkgname}.pkexec.policy"
+}
diff --git a/procexp.install b/procexp.install
deleted file mode 100644
index 8658a2cfa7d6..000000000000
--- a/procexp.install
+++ /dev/null
@@ -1,12 +0,0 @@
-post_install() {
- [[ -x /usr/bin/gtk-update-icon-cache ]] && gtk-update-icon-cache -q -t -f usr/share/icons/hicolor || true
- [[ -x /usr/bin/update-desktop-database ]] && update-desktop-database -q || true
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
diff --git a/procexp.patch b/procexp.patch
new file mode 100644
index 000000000000..e6ba31e5f2e9
--- /dev/null
+++ b/procexp.patch
@@ -0,0 +1,105 @@
+diff --unified --recursive --text procexp-20200715.orig/aboutui.py procexp-20200715.new/aboutui.py
+--- procexp-20200715.orig/aboutui.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/aboutui.py 2021-03-06 15:09:50.551561415 +1300
+@@ -15,13 +15,13 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+-from PyQt5 import QtGui, uic
++from PyQt5 import QtGui, QtWidgets, uic
+ import os
+
+ def doAboutWindow():
+ """Make an about window"""
+ icon = os.path.dirname(__file__) + "/ui/icon.png"
+- dialog = QtGui.QDialog()
++ dialog = QtWidgets.QDialog()
+ about = uic.loadUi(os.path.join(os.path.dirname(__file__), "./ui/about.ui"), baseinstance=dialog)
+ about.label.setPixmap(QtGui.QPixmap(icon))
+ dialog.exec_()
+diff --unified --recursive --text procexp-20200715.orig/colorlegend.py procexp-20200715.new/colorlegend.py
+--- procexp-20200715.orig/colorlegend.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/colorlegend.py 2021-03-06 15:09:03.571487336 +1300
+@@ -15,12 +15,12 @@
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+-from PyQt5 import QtGui, uic
++from PyQt5 import QtWidgets, uic
+ import os
+
+ def doColorHelpLegend():
+ """Make a color legend window"""
+- dialog = QtGui.QDialog()
++ dialog = QtWidgets.QDialog()
+ myui = uic.loadUi(os.path.join(os.path.dirname(__file__), "./ui/helplegend.ui"), baseinstance=dialog)
+ dialog.setModal(True)
+ dialog.exec_()
+Only in procexp-20200715.new/plotobjects: __pycache__
+Only in procexp-20200715.new/procreader: __pycache__
+diff --unified --recursive --text procexp-20200715.orig/procreader/reader.py procexp-20200715.new/procreader/reader.py
+--- procexp-20200715.orig/procreader/reader.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/procreader/reader.py 2021-03-06 15:01:42.880714429 +1300
+@@ -191,8 +191,8 @@
+ ethtoolerror = True
+
+ if data[0] is not None:
+- for line in data[0].split("\n"):
+- if line.find("Speed") != -1:
++ for line in data[0].split(b"\n"):
++ if line.find(b"Speed") != -1:
+ try:
+ speed = int(line.split(":")[1].split("Mb/s")[0])
+ except:
+diff --unified --recursive --text procexp-20200715.orig/procreader/tcpip_stat.py procexp-20200715.new/procreader/tcpip_stat.py
+--- procexp-20200715.orig/procreader/tcpip_stat.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/procreader/tcpip_stat.py 2021-03-06 14:34:07.328205942 +1300
+@@ -83,7 +83,9 @@
+ def start(self):
+ """start measuring"""
+ if self._started == False:
+- self._fifo = "/tmp/procexp_"+str(uuid.uuid4())
++ home = os.environ["HOME"]
++ fifopath = os.path.join(home,".cache","procexp")
++ self._fifo = os.path.join(fifopath,"procexp_"+str(uuid.uuid4()))
+ os.mkfifo(self._fifo)
+ rootproxy.doContinuousCommand(["tcpdump", "-U" , "-l", "-q", "-nn", "-t", "-i", "any"], self._fifo)
+ self._started = True
+Only in procexp-20200715.new: __pycache__
+diff --unified --recursive --text procexp-20200715.orig/rootproxy/__init__.py procexp-20200715.new/rootproxy/__init__.py
+--- procexp-20200715.orig/rootproxy/__init__.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/rootproxy/__init__.py 2021-03-06 15:17:56.885706642 +1300
+@@ -34,12 +34,16 @@
+ global procroot
+ global started
+
+- ptoc_filename = "/tmp/ptoc"+str(uuid.uuid4()) #ParentTOChild
+- ctop_filename = "/tmp/ctop"+str(uuid.uuid4()) #ChildTOParent
++ home = os.environ["HOME"]
++ fifopath = os.path.join(home,".cache","procexp")
++ access_rights = 0o755
++ ptoc_filename = os.path.join(fifopath,"ptoc"+str(uuid.uuid4())) #ParentTOChild
++ ctop_filename = os.path.join(fifopath,"ctop"+str(uuid.uuid4())) #ChildTOParent
+
++ os.makedirs(fifopath, access_rights, exist_ok=True)
+ os.mkfifo(ptoc_filename) #ParentToChild
+ os.mkfifo(ctop_filename) #ChildTOParent
+-
++
+ if asRoot:
+ thisFile = __file__
+ thisFile = thisFile.replace(".pyc", ".py")
+Only in procexp-20200715.new/rootproxy: __pycache__
+diff --unified --recursive --text procexp-20200715.orig/utils/procutils.py procexp-20200715.new/utils/procutils.py
+--- procexp-20200715.orig/utils/procutils.py 2020-07-15 08:14:09.000000000 +1200
++++ procexp-20200715.new/utils/procutils.py 2021-03-06 14:34:07.328205942 +1300
+@@ -47,7 +47,7 @@
+ errorbox = QtWidgets.QMessageBox()
+ errorbox.setText("Unhandled exception:\n"+msg)
+ errorbox.exec_()
+- file("/tmp/procexp.log","ab").write(msg+"\n")
++ file("/var/log/procexp.log","ab").write(msg+"\n")
+
+ # sys.excepthook = logUnhandledException
+
+Only in procexp-20200715.new/utils: __pycache__