tazwok rev 525 4.3
Merge bugfixes from default branch.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Tue May 17 13:30:38 2011 +0000 (2011-05-17) |
parents | 80c33ad3414d b04f3fe52b16 |
children | 6b76b34dbe1b |
files | examples/tazwok.conf tazwok |
line diff
1.1 --- a/examples/README.tazbb Tue May 10 08:11:06 2011 +0000 1.2 +++ b/examples/README.tazbb Tue May 17 13:30:38 2011 +0000 1.3 @@ -3,7 +3,7 @@ 1.4 1.5 examples for /var/spool/cron/crontabs/root: 1.6 NOTE: you need full path for file you want to execute in chroot 1.7 -*/2 * * * tazbb /usr/bin/tank-bin 1.8 +*/2 * * * tazbb /usr/bin/tank-bot 1.9 1.10 1 * * * tazbb /usr/bin/gen-iso 1.11
2.1 --- a/examples/tazwok.conf Tue May 10 08:11:06 2011 +0000 2.2 +++ b/examples/tazwok.conf Tue May 17 13:30:38 2011 +0000 2.3 @@ -75,7 +75,7 @@ 2.4 # SourceForge mirror : 2.5 SF_MIRROR="http://switch.dl.sourceforge.net/sourceforge" 2.6 # Xorg mirror : 2.7 -XORG_MIRROR="ftp://ftp.solnet.ch/mirror/x.org/pub/individual" 2.8 +XORG_MIRROR="http://xorg.freedesktop.org/releases/individual" 2.9 # Gnome mirror : 2.10 GNOME_MIRROR="http://ftp.gnome.org/pub/GNOME/sources" 2.11 2.12 @@ -85,7 +85,7 @@ 2.13 # FSH standard directories with init. Package generation will abort if 2.14 # a file is installed in a non-specified path. Note /vz is for OpenVZ. 2.15 FSH="bin boot dev etc home init lib media mnt proc root sbin share sys \ 2.16 -tmp usr var vz usr/bin usr/games usr/include usr/lib usr/local usr/sbin \ 2.17 +tmp usr run var vz usr/bin usr/games usr/include usr/lib usr/local usr/sbin \ 2.18 usr/share usr/src" 2.19 2.20 # tazpkg compression "gzip" or "lzma". 2.21 @@ -130,7 +130,6 @@ 2.22 # Note : order is not important here. 2.23 SLITAZ_TOOLCHAIN_EXTRA="tazpkg 2.24 tazwok 2.25 -slitaz-boot-scripts 2.26 pkg-config 2.27 libtool 2.28 libpthread-stubs"
3.1 --- a/tazwok Tue May 10 08:11:06 2011 +0000 3.2 +++ b/tazwok Tue May 17 13:30:38 2011 +0000 3.3 @@ -547,7 +547,7 @@ 3.4 report end-step 3.5 if { [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$nounpack" ] ; } || \ 3.6 { [ -f "$SOURCES_REPOSITORY/$TARBALL" ] && [ "$repack_src" != yes ] && [ "$nounpack" ] ; }; then 3.7 - [ -d "$tmp_src" ] && rm -r $tmp_src 3.8 + [ -d "$tmp_src" ] && rm -r "$tmp_src" 3.9 return 0 3.10 fi 3.11 3.12 @@ -557,11 +557,11 @@ 3.13 echo "untaring source tarball" >> $LOG 3.14 3.15 # If $tmp_src exists, there's already a unpacked tarball in it. 3.16 - if ! [ -d $tmp_src ]; then 3.17 - mkdir $tmp_src 3.18 + if ! [ -d "$tmp_src" ]; then 3.19 + mkdir "$tmp_src" 3.20 if [ -f "$SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ] && [ "$repack_src" = yes ]; then 3.21 lzma d $SOURCES_REPOSITORY/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma -so | \ 3.22 - tar xf - -C $tmp_src 3.23 + tar xf - -C "$tmp_src" 3.24 repack_src=no 3.25 TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma 3.26 elif [ -f "$SOURCES_REPOSITORY/$TARBALL" ]; then 3.27 @@ -589,15 +589,15 @@ 3.28 fi 3.29 3.30 # Check if uncompressed tarball is in a root dir or not. 3.31 - if [ "$(ls -A $tmp_src | wc -l)" -gt 1 ] || [ -f $(echo $tmp_src/*) ]; then 3.32 + if [ "$(ls -A $tmp_src | wc -l)" -gt 1 ] || [ -f "$(echo $tmp_src/*)" ]; then 3.33 if check_for_var_modification src _pkg; then 3.34 - mv $tmp_src $tmp_src-1 3.35 - mkdir $tmp_src 3.36 - mv $tmp_src-1 $tmp_src/${SOURCE:-$PACKAGE}-$VERSION 3.37 + mv "$tmp_src" "$tmp_src-1" 3.38 + mkdir "$tmp_src" 3.39 + mv "$tmp_src-1" "$tmp_src/${SOURCE:-$PACKAGE}-$VERSION" 3.40 else 3.41 - mv $tmp_src/* $WOK/$PACKAGE 3.42 + mv "$tmp_src"/* "$WOK/$PACKAGE" 3.43 repack_src=no 3.44 - rm -r $tmp_src 3.45 + rm -r "$tmp_src" 3.46 tazwok_warning "Putting all files in $WOK/$PACKAGE; not sure about how to handle this tarball (no root dir)... Please try to remove src/_pkg definition from the receipt if you encounter any problems." 3.47 fi 3.48 fi 3.49 @@ -607,7 +607,7 @@ 3.50 report step "Repacking sources in .tar.lzma format" 3.51 [ "$TARBALL" ] && rm -f $SOURCES_REPOSITORY/$TARBALL 3.52 TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma 3.53 - cd $tmp_src 3.54 + cd "$tmp_src" 3.55 tar -c * | lzma e $SOURCES_REPOSITORY/$TARBALL -si 3.56 fi 3.57 3.58 @@ -626,7 +626,7 @@ 3.59 fi 3.60 3.61 if [ "$nounpack" ]; then 3.62 - [ -d "$tmp_src" ] && rm -r $tmp_src 3.63 + [ -d "$tmp_src" ] && rm -r "$tmp_src" 3.64 report end-step 3.65 return 3.66 fi 3.67 @@ -634,19 +634,19 @@ 3.68 # Permissions settings. 3.69 chown -R root.root "$tmp_src" 3.70 if [ -d "$src" ]; then 3.71 - mkdir -p $src 3.72 - for f in $tmp_src/*/*; do 3.73 - cp -a $f $src || { report end-step; rm -r $tmp_src; return 1; } 3.74 + mkdir -p "$src" 3.75 + for f in "$tmp_src"/*/*; do 3.76 + cp -a "$f" "$src" || { report end-step; rm -r "$tmp_src"; return 1; } 3.77 done 3.78 else 3.79 if ! check_for_var_modification src _pkg && ! [ "$target" ]; then 3.80 src="${src%/*}/$(ls $tmp_src)" 3.81 fi 3.82 - mv $(echo $tmp_src/*) "$src" || { report end-step; rm -r $tmp_src; return 1; } 3.83 + mv "$(echo $tmp_src/*)" "$src" || { report end-step; rm -r "$tmp_src"; return 1; } 3.84 fi 3.85 - rm -r $tmp_src 3.86 + rm -r "$tmp_src" 3.87 else 3.88 - [ -d "$tmp_src" ] && rm -r $tmp_src 3.89 + [ -d "$tmp_src" ] && rm -r "$tmp_src" 3.90 echo "There's already something at $src. Abort." >&2 3.91 fi 3.92 report end-step 3.93 @@ -861,6 +861,20 @@ 3.94 continue 3.95 fi 3.96 ;; 3.97 + cvs*) 3.98 + file=${WGET_URL#cvs|} 3.99 + [ "$COMMAND" = get-src ] && [ ! -f $INSTALLED/cvs/receipt ] && tazpkg get-install cvs --forced 3.100 + if [ -f $INSTALLED/cvs/receipt ]; then 3.101 + mkdir $tmp_src 3.102 + cd $tmp_src 3.103 + mod=${src##*/} 3.104 + [ "$CVS_MODULE" ] && mod=$CVS_MODULE 3.105 + cvs -z3 -d:$file co $mod && rm -rf $mod/CVS && break 3.106 + else 3.107 + tazwok_warning "Needs cvs to download the source tarball from $file, please add it as a build-depend." 3.108 + continue 3.109 + fi 3.110 + ;; 3.111 https*) 3.112 [ "$COMMAND" = get-src ] && [ ! -f $INSTALLED/wget/receipt ] && tazpkg get-install wget --forced 3.113 if [ -d $INSTALLED/wget ]; then 3.114 @@ -988,12 +1002,19 @@ 3.115 report end-step 3.116 } 3.117 3.118 -# Remove .pyc, .pyo, perllocal.pod and .packlist files from packages. 3.119 +# Remove .pyc and .pyo files from packages. 3.120 py_compiled_files_remove() 3.121 { 3.122 - report step "Removing all .pyc, .pyo, perllocal.pod, and .packlist files from package" 3.123 + report step "Removing all .pyc and .pyo files from package" 3.124 find $fs -type f -name "*.pyc" -delete 2>/dev/null 3.125 find $fs -type f -name "*.pyo" -delete 2>/dev/null 3.126 + report end-step 3.127 +} 3.128 + 3.129 +# Removing all perllocal.pod and .packlist files from package 3.130 +perl_compiled_files_remove() 3.131 +{ 3.132 + report step "Removing all perllocal.pod and .packlist files from package" 3.133 find $fs -type f -name "perllocal.pod" -delete 2>/dev/null 3.134 find $fs -type f -name ".packlist" -delete 2>/dev/null 3.135 report end-step 3.136 @@ -1123,7 +1144,7 @@ 3.137 copy_generic_files 3.138 fi 3.139 look_for_cookopt !strip || strip_package 3.140 - py_compiled_files_remove 3.141 + perl_compiled_files_remove 3.142 else 3.143 echo "No package rules to gen $PACKAGE..." >&2 3.144 set_pkg_broken 3.145 @@ -1171,6 +1192,8 @@ 3.146 LAST_FILE="$file" 3.147 done > files.list 3.148 3.149 + py_compiled_files_remove 3.150 + 3.151 # Next, check if something has changed in lib files. 3.152 # Plan to recook each packages which depends on libs 3.153 # which doesn't exists anymore. 3.154 @@ -1203,7 +1226,7 @@ 3.155 unset pkg_file pkg_file_dir pkg_to_check 3.156 report end-step 3.157 fi 3.158 - 3.159 + 3.160 # Update lib_db 3.161 libs=$(for file in $(find * -type f); do 3.162 [ "$(dd if=$file bs=1 skip=1 count=3 2> /dev/null)" = "ELF" ] || continue 3.163 @@ -1219,7 +1242,7 @@ 3.164 sort -o $lib_db $lib_db 3.165 fi 3.166 unset libs 3.167 - 3.168 + 3.169 if [ ! "$EXTRAVERSION" ]; then 3.170 case "$PACKAGE" in 3.171 linux*);;