wok-next rev 21050

gparted: implement SliTaz graphical "su" in a right way
Note, it isn't in *.desktop file anymore (as for gparted-0.32.0), it is inside /usr/bin/gparted script!
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Nov 28 12:35:25 2018 +0200 (2018-11-28)
parents f56bd5e4256c
children e7e7475e84c9
files gparted/receipt gparted/stuff/patches/busybox-compatible.patch gparted/stuff/patches/series
line diff
     1.1 --- a/gparted/receipt	Wed Nov 28 03:53:55 2018 +0200
     1.2 +++ b/gparted/receipt	Wed Nov 28 12:35:25 2018 +0200
     1.3 @@ -15,29 +15,20 @@
     1.4  BUILD_DEPENDS="gtk2-dev libsigc++-dev glibmm-dev gtkmm-dev parted-dev \
     1.5  cairomm-dev pangomm-dev glibmm-dev intltool util-linux-uuid-dev"
     1.6  
     1.7 +COPY_std="@std @ico"
     1.8 +DEPENDS_std="atkmm glib glibmm gtk2 gtkmm libsigc++ pangomm parted \
     1.9 +util-linux-uuid"
    1.10 +SUGGESTED_std="e2fsprogs dosfstools mtools ntfs-3g ntfsprogs jfsutils xfsprogs \
    1.11 +reiserfsprogs reiser4progs btrfs-progs f2fs-tools hfsutils hfsprogs \
    1.12 +util-linux-mkfs util-linux-misc lvm2 cryptsetup dmsetup nilfs-utils xfsdump"
    1.13 +
    1.14  compile_rules() {
    1.15 -	# Remove the "-v" option from the swapon/off commands.
    1.16 -	# This will allow gparted to play nicely with busybox.
    1.17 -	sed -i 's/swapoff -v/swapoff/; s/swapon -v/swapon/' src/Win_GParted.cc
    1.18 -	# Process test busybox compatible
    1.19 -	sed -i 's/ps -e | grep/pgrep/' gparted.in
    1.20 -	# Remove keywords from desktop file and apply SliTaz graphical SU method
    1.21 -	sed -i '/^_Keywords=/d; s|@gksuprog@|tazbox su|' gparted.desktop.in.in
    1.22 -
    1.23  	./configure \
    1.24  		--disable-scrollkeeper \
    1.25  		--disable-doc \
    1.26 +		GKSUPROG="tazbox su" \
    1.27  		$CONFIGURE_ARGS &&
    1.28  	fix libtool &&
    1.29  	make &&
    1.30  	make install
    1.31  }
    1.32 -
    1.33 -genpkg_rules() {
    1.34 -	copy gparted gpartedbin
    1.35 -	DEPENDS="atkmm glib glibmm gtk2 gtkmm libsigc++ pangomm parted \
    1.36 -	util-linux-uuid"
    1.37 -	SUGGESTED="e2fsprogs dosfstools mtools ntfs-3g ntfsprogs jfsutils xfsprogs \
    1.38 -	reiserfsprogs reiser4progs btrfs-progs f2fs-tools hfsutils hfsprogs \
    1.39 -	util-linux-mkfs util-linux-misc lvm2 cryptsetup dmsetup nilfs-utils xfsdump"
    1.40 -}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/gparted/stuff/patches/busybox-compatible.patch	Wed Nov 28 12:35:25 2018 +0200
     2.3 @@ -0,0 +1,64 @@
     2.4 +--- a/src/Win_GParted.cc
     2.5 ++++ b/src/Win_GParted.cc
     2.6 +@@ -2730,12 +2730,12 @@
     2.7 + 	switch ( action )
     2.8 + 	{
     2.9 + 		case SWAPOFF:
    2.10 +-			cmd = "swapoff -v " + Glib::shell_quote( filesystem_ptn.get_path() );
    2.11 ++			cmd = "swapoff " + Glib::shell_quote( filesystem_ptn.get_path() );
    2.12 + 			success = ! Utils::execute_command( cmd, output, error );
    2.13 + 			error_msg = "<i># " + cmd + "\n" + error + "</i>";
    2.14 + 			break;
    2.15 + 		case SWAPON:
    2.16 +-			cmd = "swapon -v " + Glib::shell_quote( filesystem_ptn.get_path() );
    2.17 ++			cmd = "swapon " + Glib::shell_quote( filesystem_ptn.get_path() );
    2.18 + 			success = ! Utils::execute_command( cmd, output, error );
    2.19 + 			error_msg = "<i># " + cmd + "\n" + error + "</i>";
    2.20 + 			break;
    2.21 +--- a/gparted.in
    2.22 ++++ b/gparted.in
    2.23 +@@ -30,7 +30,7 @@
    2.24 + #
    2.25 + #  Only permit one instance of GParted to execute at a time
    2.26 + #
    2.27 +-if test "z`ps -e | grep gpartedbin`" != "z"; then
    2.28 ++if test "z`pgrep gpartedbin`" != "z"; then
    2.29 + 	echo "The process gpartedbin is already running."
    2.30 + 	echo "Only one gpartedbin process is permitted."
    2.31 + 	exit 1
    2.32 +@@ -94,7 +94,7 @@
    2.33 + HAVE_SYSTEMCTL=no
    2.34 + for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
    2.35 + 	if test -x "$k/systemctl"; then
    2.36 +-		if test "z`ps -e | grep systemd`" != "z"; then
    2.37 ++		if test "z`pgrep systemd`" != "z"; then
    2.38 + 			HAVE_SYSTEMCTL=yes
    2.39 + 			break
    2.40 + 		fi
    2.41 +@@ -107,7 +107,7 @@
    2.42 + #
    2.43 + HAVE_UDISKS2_INHIBIT=no
    2.44 + if test -x "/usr/lib/udisks2/udisks2-inhibit"; then
    2.45 +-	if test "z`ps -e | grep 'udisksd'`" != "z"; then
    2.46 ++	if test "z`pgrep 'udisksd'`" != "z"; then
    2.47 + 		HAVE_UDISKS2_INHIBIT=yes
    2.48 + 	fi
    2.49 + fi
    2.50 +@@ -119,7 +119,7 @@
    2.51 + HAVE_UDISKS=no
    2.52 + for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
    2.53 + 	if test -x "$k/udisks"; then
    2.54 +-		if test "z`ps -e | grep udisks-daemon`" != "z"; then
    2.55 ++		if test "z`pgrep udisks-daemon`" != "z"; then
    2.56 + 			HAVE_UDISKS=yes
    2.57 + 			break
    2.58 + 		fi
    2.59 +@@ -133,7 +133,7 @@
    2.60 + HAVE_HAL_LOCK=no
    2.61 + for k in '' `echo "$PATH" | sed 's,:, ,g'`; do
    2.62 + 	if test -x "$k/hal-lock"; then
    2.63 +-		if test "z`ps -e | grep hald`" != "z"; then
    2.64 ++		if test "z`pgrep hald`" != "z"; then
    2.65 + 			HAVE_HAL_LOCK=yes
    2.66 + 			break
    2.67 + 		fi
     3.1 --- a/gparted/stuff/patches/series	Wed Nov 28 03:53:55 2018 +0200
     3.2 +++ b/gparted/stuff/patches/series	Wed Nov 28 12:35:25 2018 +0200
     3.3 @@ -1,1 +1,5 @@
     3.4 +# Provide exact package names for SliTaz
     3.5  slitaz-pkgs.patch
     3.6 +
     3.7 +# Be Busybox compatible
     3.8 +busybox-compatible.patch