wok rev 18732

Quote root dir in post_install (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 21 00:07:14 2015 +0100 (2015-12-21)
parents 60ed06eac8b9
children b685a2174a02
files boxbackup-server/receipt docbook-xml/receipt elksemu/receipt mingw32-gcc-c/receipt mingw32-gcc/receipt mingw32-runtime/receipt mingw32-w32api/receipt mplayerplug-in/receipt mysql/receipt pybootchartgui/receipt runcom/receipt squidguard/receipt tiptop/receipt tmux-mem-cpu-load/receipt
line diff
     1.1 --- a/boxbackup-server/receipt	Mon Dec 21 01:01:58 2015 +0200
     1.2 +++ b/boxbackup-server/receipt	Mon Dec 21 00:07:14 2015 +0100
     1.3 @@ -62,7 +62,7 @@
     1.4  {
     1.5  	# default conf dir is now /etc/boxbackup
     1.6  	if [ ! -e "$1/etc/box/bbstored.conf" ]; then
     1.7 -		mv /etc/box "$1$CONF_DIR"
     1.8 +		mv "$1/etc/box" "$1$CONF_DIR"
     1.9  	fi
    1.10  
    1.11  	# adduser BBUSER if needed
     2.1 --- a/docbook-xml/receipt	Mon Dec 21 01:01:58 2015 +0200
     2.2 +++ b/docbook-xml/receipt	Mon Dec 21 00:07:14 2015 +0100
     2.3 @@ -266,9 +266,9 @@
     2.4      "/etc/xml/docbook-xml"
     2.5  
     2.6    if [ -f "$1/etc/xml/catalog" ]; then
     2.7 -      xmlcatalog --noout "$1/etc/xml/catalog"
     2.8 +  	chroot "$1/" xmlcatalog --noout /etc/xml/catalog
     2.9    else
    2.10 -      xmlcatalog --noout --create "$1/etc/xml/catalog"
    2.11 +  	chroot "$1/" xmlcatalog --noout --create /etc/xml/catalog
    2.12    fi
    2.13    chroot "$1/" xmlcatalog --noout --add "delegatePublic" \
    2.14      "-//OASIS//ENTITIES DocBook XML" \
     3.1 --- a/elksemu/receipt	Mon Dec 21 01:01:58 2015 +0200
     3.2 +++ b/elksemu/receipt	Mon Dec 21 00:07:14 2015 +0100
     3.3 @@ -35,6 +35,6 @@
     3.4  # Pre remove command for Tazpkg.
     3.5  pre_remove()
     3.6  {
     3.7 -	echo -1 > "$1/proc/sys/fs/binfmt_misc/i86-elks"
     3.8 +	echo -1 > /proc/sys/fs/binfmt_misc/i86-elks
     3.9  	sed -i '/binfmt_misc/{N;/:i86-elks:M:/d}' "$1/etc/init.d/local.sh"
    3.10  }
     4.1 --- a/mingw32-gcc-c/receipt	Mon Dec 21 01:01:58 2015 +0200
     4.2 +++ b/mingw32-gcc-c/receipt	Mon Dec 21 00:07:14 2015 +0100
     4.3 @@ -66,7 +66,7 @@
     4.4  post_install()
     4.5  {
     4.6  	# Archives get stripped during packaging; need to run ranlib
     4.7 -	find "$1/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     4.8 +	chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     4.9  }
    4.10  
    4.11  # Rules to clean the package
     5.1 --- a/mingw32-gcc/receipt	Mon Dec 21 01:01:58 2015 +0200
     5.2 +++ b/mingw32-gcc/receipt	Mon Dec 21 00:07:14 2015 +0100
     5.3 @@ -84,8 +84,8 @@
     5.4  post_install()
     5.5  {
     5.6  	# Archives get stripped during packaging; need to run ranlib
     5.7 -	find "$1/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     5.8 -	find "$1/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     5.9 +	chroot "$1/" find "/usr/lib/gcc/$MINGW32_ID/" -name *.a -exec $MINGW32_ID-ranlib {} \;
    5.10 +	chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
    5.11  }
    5.12  
    5.13  # Rules to clean the package
     6.1 --- a/mingw32-runtime/receipt	Mon Dec 21 01:01:58 2015 +0200
     6.2 +++ b/mingw32-runtime/receipt	Mon Dec 21 00:07:14 2015 +0100
     6.3 @@ -54,7 +54,7 @@
     6.4  post_install()
     6.5  {
     6.6  	# Archives get stripped during packaging; need to run ranlib
     6.7 -	find "$1/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     6.8 +	chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     6.9  }
    6.10  
    6.11  # Rules to clean the package
     7.1 --- a/mingw32-w32api/receipt	Mon Dec 21 01:01:58 2015 +0200
     7.2 +++ b/mingw32-w32api/receipt	Mon Dec 21 00:07:14 2015 +0100
     7.3 @@ -54,7 +54,7 @@
     7.4  post_install()
     7.5  {
     7.6  	# Archives get stripped during packaging; need to run ranlib
     7.7 -	find "$1/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     7.8 +	chroot "$1/" find "/usr/$MINGW32_ID/lib/" -name *.a -exec $MINGW32_ID-ranlib {} \;
     7.9  }
    7.10  
    7.11  # Rules to clean the package
     8.1 --- a/mplayerplug-in/receipt	Mon Dec 21 01:01:58 2015 +0200
     8.2 +++ b/mplayerplug-in/receipt	Mon Dec 21 00:07:14 2015 +0100
     8.3 @@ -72,8 +72,9 @@
     8.4  {
     8.5  	echo -n "Processing post install commands..."
     8.6  	get_firefox_version "$1"
     8.7 -	for i in "$1"/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
     8.8 -		ln -s "$i" "$2/usr/lib/firefox-$FIREFOX_VER/plugins"
     8.9 +	cd "$1/"
    8.10 +	for i in usr/lib/mozilla/plugins/$PACKAGE*.so ; do
    8.11 +		ln -s "/$i" "$1/usr/lib/firefox-$FIREFOX_VER/plugins"
    8.12  	done 
    8.13  	status
    8.14  }
     9.1 --- a/mysql/receipt	Mon Dec 21 01:01:58 2015 +0200
     9.2 +++ b/mysql/receipt	Mon Dec 21 00:07:14 2015 +0100
     9.3 @@ -114,7 +114,7 @@
     9.4  			-g "MySQL Daemon user" -u 27 -H -D -S -G ${group} ${user}
     9.5  		status
     9.6  	fi
     9.7 -	#chroot "$1/" /bin/chown ${user}.${group} $(cat $1/$INSTALLED/$PACKAGE/files.list)
     9.8 +	#chroot "$1/" /bin/chown ${user}.${group} $(cat "$1/$INSTALLED/$PACKAGE/files.list")
     9.9  	chroot "$1/" /bin/chown -R ${user}.${group} /var/lib/mysql
    9.10  	chroot "$1/" mysql_install_db --user=${user} --basedir=/usr
    9.11  	cat <<EOF
    10.1 --- a/pybootchartgui/receipt	Mon Dec 21 01:01:58 2015 +0200
    10.2 +++ b/pybootchartgui/receipt	Mon Dec 21 00:07:14 2015 +0100
    10.3 @@ -27,7 +27,7 @@
    10.4  {
    10.5  	PY_VERSION=$(cat "$1/var/lib/tazpkg/installed/python/receipt" | grep "VERSION="|cut -d \" -f 2 | cut -d . -f 1,2)
    10.6  	if [ -f  "$1/usr/bin/pybootchartgui" ] ; then rm "$1/usr/bin/pybootchartgui" ; fi
    10.7 -	ln -s "$1/usr/lib/python$PY_VERSION/pybootchartgui.py" "$1/usr/bin/pybootchartgui"
    10.8 +	ln -s /usr/lib/python$PY_VERSION/pybootchartgui.py "$1/usr/bin/pybootchartgui"
    10.9  	if [ -f "$1/etc/bootchartd.conf" ] ; then
   10.10  		sed -i s/'AUTO_RENDER="no"'/'AUTO_RENDER="yes"'/ "$1/etc/bootchartd.conf"
   10.11  	fi
    11.1 --- a/runcom/receipt	Mon Dec 21 01:01:58 2015 +0200
    11.2 +++ b/runcom/receipt	Mon Dec 21 00:07:14 2015 +0100
    11.3 @@ -53,7 +53,7 @@
    11.4  # Pre remove command for Tazpkg.
    11.5  pre_remove()
    11.6  {
    11.7 -	echo -1 > "$1/proc/sys/fs/binfmt_misc/BOOTBIN"
    11.8 -	echo -1 > "$1/proc/sys/fs/binfmt_misc/DOSCOM"
    11.9 +	echo -1 > /proc/sys/fs/binfmt_misc/BOOTBIN
   11.10 +	echo -1 > /proc/sys/fs/binfmt_misc/DOSCOM
   11.11  	sed -i '/binfmt_misc/{NN;/DOSCOM:E::com/d}' "$1/etc/init.d/local.sh"
   11.12  }
    12.1 --- a/squidguard/receipt	Mon Dec 21 01:01:58 2015 +0200
    12.2 +++ b/squidguard/receipt	Mon Dec 21 00:07:14 2015 +0100
    12.3 @@ -67,13 +67,13 @@
    12.4  {
    12.5  	chown -R nobody "$1"/var/lib/squidGuard/*
    12.6  	# Recharge squid config
    12.7 -	[ -z "$1" ] && [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
    12.8 +	[ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; }
    12.9  }
   12.10  
   12.11  post_remove()
   12.12  {
   12.13  	# Recharge squid config
   12.14 -	[ -z "$1" ] && [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null
   12.15 +	[ "$1" ] || { [ -x $(which squid) ] && $(which squid) -k reconfigure 2> /dev/null; }
   12.16  }
   12.17  
   12.18  check_config()
    13.1 --- a/tiptop/receipt	Mon Dec 21 01:01:58 2015 +0200
    13.2 +++ b/tiptop/receipt	Mon Dec 21 00:07:14 2015 +0100
    13.3 @@ -32,7 +32,7 @@
    13.4  post_install()
    13.5  {
    13.6  	for i in $(ls "$1/home" 2> /dev/null); do
    13.7 -		[ -f "/home/$i/.tiptoprc" ] && continue
    13.8 +		[ -f "$1/home/$i/.tiptoprc" ] && continue
    13.9  		cp "$1/etc/skel/.tiptoprc" "$1/home/$i"
   13.10  		chroot "$1/" chown $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.tiptoprc"
   13.11  	done
    14.1 --- a/tmux-mem-cpu-load/receipt	Mon Dec 21 01:01:58 2015 +0200
    14.2 +++ b/tmux-mem-cpu-load/receipt	Mon Dec 21 00:07:14 2015 +0100
    14.3 @@ -36,9 +36,9 @@
    14.4  post_install()
    14.5  {
    14.6  	for i in $(ls "$1/home" 2> /dev/null); do
    14.7 -		grep -qs "tmux-mem-cpu-load" "/home/$i/.tmux.conf" && continue
    14.8 +		grep -qs "tmux-mem-cpu-load" "$1/home/$i/.tmux.conf" && continue
    14.9  		echo -n "Checking for .tmux.conf for $i ..."
   14.10 -		cp -a "$1/etc/skel/.tmux.conf" "/home/$i/"
   14.11 +		cp -a "$1/etc/skel/.tmux.conf" "$1/home/$i/"
   14.12  		chroot "$1/" chown $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.tmux.conf"
   14.13  		status
   14.14  	done