wok rev 23814

libfm: do not treat desktop entries as executables
author Hans-G?nter Theisgen
date Tue May 26 14:12:52 2020 +0100 (2020-05-26)
parents 3f40a3c71c48
children 213fbb313815
files libfm/receipt libfm/stuff/patches/fm-file-info.c-1.3.1
line diff
     1.1 --- a/libfm/receipt	Mon May 25 18:40:12 2020 +0000
     1.2 +++ b/libfm/receipt	Tue May 26 14:12:52 2020 +0100
     1.3 @@ -3,24 +3,23 @@
     1.4  PACKAGE="libfm"
     1.5  VERSION="1.3.1"
     1.6  CATEGORY="system-tools"
     1.7 -SHORT_DESC="File management support (core library)"
     1.8 -MAINTAINER="devel@slitaz.org"
     1.9 +SHORT_DESC="File management support (core library)."
    1.10 +MAINTAINER="maintainer@slitaz.org"
    1.11  LICENSE="GPL2"
    1.12 +WEB_SITE="http://pcmanfm.sourceforge.net"
    1.13 +
    1.14  TARBALL="$PACKAGE-$VERSION.tar.xz"
    1.15 -WEB_SITE="http://pcmanfm.sourceforge.net"
    1.16  WGET_URL="$SF_MIRROR/pcmanfm/$TARBALL"
    1.17 -#EXTRA_SOURCE_FILES="$PACKAGE-reversepatch_SF949_7daeaf3.u" # Really fix segfault
    1.18 -#WGET_URL2="https://github.com/lxde/libfm/commit/7daeaf3.patch"
    1.19 -#WGETURL3="https://github.com/lxde/libfm/commit/2c00984.patch" #narrow icon cell
    1.20 -HOST_ARCH="i486 arm"
    1.21 -GENERIC_MENUS="no"
    1.22  
    1.23  SUGGESTED="gvfs"
    1.24  DEPENDS="glib glibc-base libffi libgio menu-cache pcre zlib"
    1.25 -BUILD_DEPENDS="automake gtk-doc libtool \
    1.26 -gtk+-dev dbus-glib-dev dbus-dev startup-notification-dev \
    1.27 -libxcb-dev xcb-util-dev menu-cache-dev expat-dev libgio-dev \
    1.28 -shared-mime-info-dev" # git-version deps: gtk-doc libtool automake
    1.29 +BUILD_DEPENDS="automake dbus-dev dbus-glib-dev expat-dev gtk-doc gtk+-dev 
    1.30 +	libgio-dev libtool libxcb-dev menu-cache-dev shared-mime-info-dev 
    1.31 +	startup-notification-dev xcb-util-dev" # git-version deps: gtk-doc libtool automake
    1.32 +
    1.33 +GENERIC_MENUS="no"
    1.34 +
    1.35 +HOST_ARCH="i486 arm"
    1.36  
    1.37  case "$ARCH" in
    1.38  	i?86) BUILD_DEPENDS="$BUILD_DEPENDS intltool vala"
    1.39 @@ -29,34 +28,41 @@
    1.40  # Rules to configure and make the package.
    1.41  compile_rules()
    1.42  {
    1.43 -#	[ -s $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES ] || \
    1.44 -#		wget -O $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES $WGET_URL2
    1.45 -#	patch -p1 -R -i $SOURCES_REPOSITORY/$EXTRA_SOURCE_FILES
    1.46 -#	# fix freeze when using custom action with "inode/directory":
    1.47 -#	sed 's|TRUE, 0.5, 0.0|FALSE, 0.0f, 0.0f|' -i src/gtk/fm-standard-view.c
    1.48  	./autogen.sh
    1.49  
    1.50  	patch -p1 -i $stuff/quick-exec.patch
    1.51 -	./configure \
    1.52 -		--sysconfdir=/etc \
    1.53 -		--disable-static \
    1.54 +
    1.55 +	# Do *not* treat desktop entries as executables!
    1.56 +	patch --input $stuff/patches/fm-file-info.c-1.3.1 \
    1.57 +		src/base/fm-file-info.c
    1.58 +
    1.59 +	./configure			\
    1.60 +		--sysconfdir=/etc	\
    1.61 +		--disable-static	\
    1.62  		$CONFIGURE_ARGS &&
    1.63 -	make && make install || return 1
    1.64 +	make &&
    1.65 +	make install || return 1
    1.66  
    1.67  	# remove libfm-extra files (already provided by libfm-extra package)
    1.68 -	rm $install/usr/lib/libfm-extra.* $install/usr/lib/pkgconfig/libfm-extra.pc
    1.69 +	rm $install/usr/lib/libfm-extra.*
    1.70 +	rm $install/usr/lib/pkgconfig/libfm-extra.pc
    1.71  }
    1.72  
    1.73  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.74  genpkg_rules()
    1.75  {
    1.76 -	mkdir -p $fs/usr/lib/libfm/modules $fs/usr/share/libfm
    1.77 -	cp -a $install/etc                        $fs/
    1.78 -	cp -a $install/usr/lib/libfm.so*          $fs/usr/lib/
    1.79 -	cp -a $install/usr/lib/libfm/modules/vfs* $fs/usr/lib/libfm/modules/
    1.80 -	cp -a $install/usr/share/libfm/*.list     $fs/usr/share/libfm/
    1.81 +	mkdir -p $fs/usr/lib/libfm/modules
    1.82 +	mkdir -p $fs/usr/share/libfm
    1.83 +
    1.84 +	cp -a $install/etc				$fs
    1.85 +	cp -a $install/usr/lib/libfm.so*		$fs/usr/lib
    1.86 +	cp -a $install/usr/lib/libfm/modules/vfs*	$fs/usr/lib/libfm/modules
    1.87 +	cp -a $install/usr/share/libfm/*.list		$fs/usr/share/libfm
    1.88 +
    1.89  	# define terminal
    1.90 -	sed -i 2i\ 'terminal=terminal' $fs/etc/xdg/libfm/libfm.conf
    1.91 -	# set small & pane icon size to 16
    1.92 -	sed -i 's|\(\(small\|pane\)_icon_size=\).*|\116|' $fs/etc/xdg/libfm/libfm.conf
    1.93 +	sed -i 2i\ 'terminal=terminal' \
    1.94 +		$fs/etc/xdg/libfm/libfm.conf
    1.95 +	# set small and pane icon size to 16
    1.96 +	sed -i 's|\(\(small\|pane\)_icon_size=\).*|\116|' \
    1.97 +		$fs/etc/xdg/libfm/libfm.conf
    1.98  }
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/libfm/stuff/patches/fm-file-info.c-1.3.1	Tue May 26 14:12:52 2020 +0100
     2.3 @@ -0,0 +1,10 @@
     2.4 +--- src/base/fm-file-info.c.orig
     2.5 ++++ src/base/fm-file-info.c
     2.6 +@@ -1385,6 +1385,7 @@
     2.7 +     else if(strcmp(type, "application/x-desktop") == 0)
     2.8 +     { /* treat desktop entries as executables if
     2.9 +          they are native and have read permission */
    2.10 ++         return FALSE;
    2.11 +         if(fm_path_is_native(fi->path) && (fi->mode & (S_IRUSR|S_IRGRP|S_IROTH)))
    2.12 +         {
    2.13 +             if (fi->shortcut && fi->target) {