aboutsummaryrefslogtreecommitdiffstats
path: root/community/gparted
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-31 21:36:34 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2019-06-14 11:21:51 +0000
commitdedf835b18a9a54b05a327c448a9bf79a9220517 (patch)
treee16e7b8f70b1419de15c22126d7eb9aeea22542a /community/gparted
parent2df6777909d9eb4ef7a4b637763db531ae273b5c (diff)
downloadaports-dedf835b18a9a54b05a327c448a9bf79a9220517.tar.bz2
aports-dedf835b18a9a54b05a327c448a9bf79a9220517.tar.xz
community/gparted: move from main
Diffstat (limited to 'community/gparted')
-rw-r--r--community/gparted/APKBUILD38
-rw-r--r--community/gparted/gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch46
2 files changed, 84 insertions, 0 deletions
diff --git a/community/gparted/APKBUILD b/community/gparted/APKBUILD
new file mode 100644
index 0000000000..ce94bcb8cf
--- /dev/null
+++ b/community/gparted/APKBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=gparted
+pkgver=0.33.0
+pkgrel=0
+pkgdesc="a graphical partition editor for creating, reorganizing, and deleting disk partitions"
+url="http://gparted.sourceforge.net/"
+arch="all"
+license="GPL"
+depends="e2fsprogs ntfs-3g-progs"
+makedepends="gtkmm-dev parted-dev util-linux-dev"
+install=
+subpackages="$pkgname-doc $pkgname-lang"
+source="https://downloads.sourceforge.net/project/gparted/gparted/gparted-$pkgver/gparted-$pkgver.tar.gz
+ gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch
+ "
+builddir="$srcdir"/$pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-doc \
+ --disable-scrollkeeper
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="07b3f8ef355ce6c3302ed4747b9f542f1e231555c5ef39e758ee9a658bb14c9db2742af7f472a866bd122eb1ad9b2d45fd921484abb4ee319df1f15a74829f32 gparted-0.33.0.tar.gz
+565f65440fed9d603aaff4e08d4c319c62e61bb064f9edc5934f671b3a63df02aa505200c0224038db64a4275352a30913755a4ad030e71e7b5c372a9316c278 gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch"
diff --git a/community/gparted/gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch b/community/gparted/gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch
new file mode 100644
index 0000000000..d9e935b2ee
--- /dev/null
+++ b/community/gparted/gparted.in-Use-reliable-way-of-detecting-gpartedbin-.patch
@@ -0,0 +1,46 @@
+From 640709cd2eeb5037b871e6d96ffc186779bcf387 Mon Sep 17 00:00:00 2001
+From: Przemyslaw Pawelczyk <przemoc@gmail.com>
+Date: Sun, 4 Dec 2016 01:55:43 +0100
+Subject: [PATCH] gparted.in: Use reliable way of detecting gpartedbin process
+ existence.
+
+Grepping ps output had only one advantage, it's using tools available in
+any POSIX system. pidof looks for exact process name, regardless of
+the path used to call the binary (which is not true for pgrep).
+pidof is provided by busybox, procps-ng, sysvinit-tools or as a
+stand-alone package on some systems.
+
+We cannot guarantee that if gpartedbin is running there, then it's
+really gpartedbin and not something else renamed to it.
+We could try to detect if it is at least gpartedbin from a known
+location by checking $(readlink /proc/$PID/exe), but it wouldn't prevent
+user from running its own compiled gpartedbin from other location.
+
+ps, pgrep or pidof are simply not the right tools to prevent running
+more than one instance of the program. If such feature is really
+needed, then it should be built into the program to make it truly
+reliable (assuming correct implementation, obviously).
+Alternatively, if the program always run via one and only one
+supervisor, then the supervisor should be able to do the right job,
+because only parent process can reliably tell when it created the child,
+or when the child process execed into given binary or died.
+---
+ gparted.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gparted.in b/gparted.in
+index c435bac..625e50f 100755
+--- a/gparted.in
++++ b/gparted.in
+@@ -30,7 +30,7 @@
+ #
+ # Only permit one instance of GParted to execute at a time
+ #
+-if test "z`ps -e | grep gpartedbin`" != "z"; then
++if pidof -s gpartedbin >/dev/null; then
+ echo "The process gpartedbin is already running."
+ echo "Only one gpartedbin process is permitted."
+ exit 1
+--
+2.8.3
+