tazpkg rev 747
Add and use icons from Faenza icon theme (new light look and feel); fix last recharge date (pay respect to timezone time offset); add few comments; stylize search toolbar; fix "up" command; admin: select mirror as standard way to select item from list; open external links in the new tab (or new window); and a ton of other small changes.
line diff
1.1 --- a/Makefile Mon Jan 19 18:51:32 2015 +0100 1.2 +++ b/Makefile Wed Jan 21 17:53:26 2015 +0200 1.3 @@ -73,6 +73,8 @@ 1.4 cp -a tazpanel/pkgs $(DESTDIR)/var/www/tazpanel/menu.d 1.5 install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default 1.6 cp -a tazpanel/pkgs.css $(DESTDIR)/var/www/tazpanel/styles/default 1.7 + install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default/images 1.8 + cp -a tazpanel/icons/* $(DESTDIR)/var/www/tazpanel/styles/default/images 1.9 1.10 # The i18n files 1.11 install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale 1.12 @@ -113,6 +115,7 @@ 1.13 1.14 rm -f $(DESTDIR)/var/www/tazpanel/pkgs.cgi 1.15 rm -f $(DESTDIR)/var/www/tazpanel/menu.d/pkgs 1.16 + rm -rf $(DESTDIR)/var/www/tazpanel/styles/default/images/tp-*.png 1.17 1.18 rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg.mo 1.19
2.1 Binary file tazpanel/icons/tp-add.png has changed
3.1 Binary file tazpanel/icons/tp-admin.png has changed
4.1 Binary file tazpanel/icons/tp-block.png has changed
5.1 Binary file tazpanel/icons/tp-check.png has changed
6.1 Binary file tazpanel/icons/tp-default.png has changed
7.1 Binary file tazpanel/icons/tp-dl-dvd.png has changed
8.1 Binary file tazpanel/icons/tp-link.png has changed
9.1 Binary file tazpanel/icons/tp-list.png has changed
10.1 Binary file tazpanel/icons/tp-new.png has changed
11.1 Binary file tazpanel/icons/tp-pkg-ins.png has changed
12.1 Binary file tazpanel/icons/tp-pkg-rem.png has changed
13.1 Binary file tazpanel/icons/tp-pkgi.png has changed
14.1 Binary file tazpanel/icons/tp-pkgib.png has changed
15.1 Binary file tazpanel/icons/tp-recharge.png has changed
16.1 Binary file tazpanel/icons/tp-remove.png has changed
17.1 Binary file tazpanel/icons/tp-repack.png has changed
18.1 Binary file tazpanel/icons/tp-save.png has changed
19.1 Binary file tazpanel/icons/tp-tag.png has changed
20.1 Binary file tazpanel/icons/tp-unblock.png has changed
21.1 Binary file tazpanel/icons/tp-up.png has changed
22.1 Binary file tazpanel/icons/tp-web.png has changed
23.1 --- a/tazpanel/pkgs Mon Jan 19 18:51:32 2015 +0100 23.2 +++ b/tazpanel/pkgs Wed Jan 21 17:53:26 2015 +0200 23.3 @@ -5,13 +5,13 @@ 23.4 <li><a href="/pkgs.cgi">$(gettext 'Packages')</a> 23.5 <ul> 23.6 <li><a href="/pkgs.cgi?list&my=my&cat=all&repo=Any"><img 23.7 - src="/styles/default/images/tazpkg.png" />$(gettext 'My packages')</a></li> 23.8 + src="/styles/default/images/tp-list.png" />$(gettext 'My packages')</a></li> 23.9 <li><a href="/pkgs.cgi?recharge"><img 23.10 - src="/styles/default/images/update.png" />$(gettext 'Recharge list')</a></li> 23.11 + src="/styles/default/images/tp-recharge.png" />$(gettext 'Recharge list')</a></li> 23.12 <li><a href="/pkgs.cgi?up"><img 23.13 - src="/styles/default/images/update.png" />$(gettext 'Check updates')</a></li> 23.14 + src="/styles/default/images/tp-up.png" />$(gettext 'Check updates')</a></li> 23.15 <li><a href="/pkgs.cgi?admin"><img 23.16 - src="/styles/default/images/edit.png" />$(gettext 'Administration')</a></li> 23.17 + src="/styles/default/images/tp-admin.png" />$(gettext 'Administration')</a></li> 23.18 </ul> 23.19 </li> 23.20 EOT
24.1 --- a/tazpanel/pkgs.cgi Mon Jan 19 18:51:32 2015 +0100 24.2 +++ b/tazpanel/pkgs.cgi Wed Jan 21 17:53:26 2015 +0200 24.3 @@ -91,68 +91,39 @@ 24.4 } 24.5 24.6 24.7 -# Parse mirrors list to be able to have an icon and remove link 24.8 - 24.9 -list_mirrors() { 24.10 - while read line 24.11 - do 24.12 - cat << EOT 24.13 -<li> 24.14 - <a href="?admin=rm-mirror=$line&file=$(httpd -e $1)"> 24.15 - <img src="$IMAGES/clear.png" title="$(_ 'Delete')" /> 24.16 - </a> 24.17 - <a href="?admin=select-mirror&mirror=$line"> 24.18 - <img src="$IMAGES/start.png" title="$(_ 'Use as default')" /> 24.19 - </a> 24.20 - <a href="$line">$line</a> 24.21 -</li> 24.22 -EOT 24.23 - done < $1 24.24 -} 24.25 - 24.26 - 24.27 -# Parse repositories list to be able to have an icon and remove link 24.28 - 24.29 -list_repos() { 24.30 - ls $PKGS_DB/undigest 2> /dev/null | while read repo ; do 24.31 - cat <<EOT 24.32 - <li><a href="?admin=rm-repo=$repo"> 24.33 - <img src="$IMAGES/clear.png">$repo</a></li> 24.34 -EOT 24.35 - done 24.36 -} 24.37 - 24.38 - 24.39 # Show button 24.40 show_button() { 24.41 - case $1 in 24.42 - recharge) img='recharge'; label="$(_ 'Recharge list')" ;; 24.43 - up) img='update'; label="$(_ 'Check upgrades')" ;; 24.44 - list) img='tazpkg'; label="$(_ 'My packages')" ;; 24.45 - tag=) img=''; label="$(_ 'Tags')" ;; 24.46 - linkable) img='tazpkg'; label="$(_ 'Linkable packages')" ;; 24.47 - admin) img='edit'; label="$(_ 'Administration')" ;; 24.48 - *Install*nf*) img='tazpkg-installed'; label="$(_ 'Install (Non Free)')" ;; 24.49 - *Install*) img='tazpkg-installed'; label="$(_ 'Install')" ;; 24.50 - *Remove*) img='stop'; label="$(_ 'Remove')" ;; 24.51 - *Link*) img='tazpkg'; label="$(_ 'Link')" ;; 24.52 - *Block*) img='tazpkg'; label="$(_ 'Block')" ;; 24.53 - *Unblock*) img='tazpkg'; label="$(_ 'Unblock')" ;; 24.54 - *Repack*) img='tazpkg'; label="$(_ 'Repack')" ;; 24.55 - *saveconf*) img='tazpkg'; label="$(_ 'Save configuration')" ;; 24.56 - *listconf*) img='edit'; label="$(_ 'List configuration files')" ;; 24.57 - *quickcheck*) img='recharge'; label="$(_ 'Quick check')" ;; 24.58 - *fullcheck*) img='recharge'; label="$(_ 'Full check')" ;; 24.59 - *clean*) img='stop'; label="$(_ 'Clean')" ;; 24.60 - *setlink*) img='harddisk'; label="$(_ 'Set link')" ;; 24.61 - *removelink*) img='stop'; label="$(_ 'Remove link')" ;; 24.62 - esac 24.63 - cat << EOT 24.64 - <button class="button" type="submit" name="${1%%=*}" value="${1#*=}"> 24.65 + for button in $@; do 24.66 + case $button in 24.67 + recharge) img='tp-recharge'; label="$(_ 'Recharge list')" ;; 24.68 + up) img='tp-up'; label="$(_ 'Check upgrades')" ;; 24.69 + list) img='tp-list'; label="$(_ 'My packages')" ;; 24.70 + tags) img='tp-tag'; label="$(_ 'Tags')" ;; 24.71 + linkable) img='tp-link'; label="$(_ 'Linkable packages')" ;; 24.72 + admin) img='tp-admin'; label="$(_ 'Administration')" ;; 24.73 + *Install*nf*) img='tp-pkg-ins'; label="$(_ 'Install (Non Free)')" ;; 24.74 + *Install*) img='tp-pkg-ins'; label="$(_ 'Install')" ;; 24.75 + *Remove*) img='tp-pkg-rem'; label="$(_ 'Remove')" ;; 24.76 + *Link*) img='tp-link'; label="$(_ 'Link')" ;; 24.77 + *Block*) img='tp-block'; label="$(_ 'Block')" ;; 24.78 + *Unblock*) img='tp-unblock'; label="$(_ 'Unblock')" ;; 24.79 + *Repack*) img='tp-repack'; label="$(_ 'Repack')" ;; 24.80 + *saveconf*) img='tp-save'; label="$(_ 'Save configuration')" ;; 24.81 + *listconf*) img='tp-list'; label="$(_ 'List configuration files')" ;; 24.82 + *quickcheck*) img='tp-check'; label="$(_ 'Quick check')" ;; 24.83 + *fullcheck*) img='tp-check'; label="$(_ 'Full check')" ;; 24.84 + *clean*) img='tp-remove'; label="$(_ 'Clean')" ;; 24.85 + *setlink*) img='tp-link'; label="$(_ 'Set link')" ;; 24.86 + *removelink*) img='tp-remove'; label="$(_ 'Remove link')" ;; 24.87 + *add-mirror) img='tp-add'; label="$(_n 'Add mirror')" ;; 24.88 + *add-repo) img='tp-add'; label="$(_n 'Add repository')" ;; 24.89 + esac 24.90 + cat << EOT 24.91 + <button class="button" type="submit" name="${button%%=*}" value="${button#*=}"> 24.92 <img src="$IMAGES/$img.png"/>$label 24.93 </button> 24.94 EOT 24.95 - 24.96 + done 24.97 } 24.98 24.99 24.100 @@ -168,15 +139,13 @@ 24.101 [ -z "$repo" ] && repo="$(GET repo)" 24.102 [ -z "$repo" ] && repo="Any" 24.103 cat << EOT 24.104 -<div class="search"> 24.105 - <form method="get" action=""> 24.106 - <p> 24.107 - <input type="text" name="search" size="20"> 24.108 - <input type="submit" value="$(gettext 'Search')"> 24.109 - <input class="radius" type="submit" name="files" value="$(_n 'Files')"> 24.110 - </p> 24.111 - </form> 24.112 -</div> 24.113 +<form method="get" action=""> 24.114 + <div class="search"><input 24.115 + type="search" name="search" results="5" autosave="pkgsearch" autocomplete="on"><input 24.116 + type="submit" value="$(_n 'Search')"><input 24.117 + type="submit" value="$(_n 'Files')" name="files"> 24.118 + </div> 24.119 +</form> 24.120 EOT 24.121 } 24.122 24.123 @@ -306,23 +275,25 @@ 24.124 # Print links to the pages 24.125 24.126 pager() { 24.127 - awk -F'"' -vpage="$page" -vnum_lines="$(wc -l < $1)" -vtext="$(_ 'Pages:') " -vurl="?list&page=" ' 24.128 + PAGE_SIZE=${PAGE_SIZE:-100} 24.129 + [ "$PAGE_SIZE" != "0" ] && \ 24.130 + awk -F'"' -vpage="$page" -vsize="$PAGE_SIZE" -vnum_lines="$(wc -l < $1)" -vtext="$(_ 'Pages:') " -vurl="?list&page=" ' 24.131 BEGIN{ 24.132 - num_pages = int(num_lines / 100) + (num_lines % 100 != 0) 24.133 + num_pages = int(num_lines / size) + (num_lines % size != 0) 24.134 if (num_pages != 1) printf "<p>%s", text 24.135 } 24.136 { 24.137 if (num_pages == 1) exit 24.138 - r = NR % 100 24.139 + r = NR % size 24.140 if (r == 1) { 24.141 - p = int(NR / 100) + 1 24.142 + p = int(NR / size) + 1 24.143 printf "<a class=\"pages%s\" href=\"%s%s\" title=\"%s\n···\n", p==page?" current":"", url, p, $6 24.144 } else if (r == 0) 24.145 - printf "%s\">%s</a> ", $6, int(NR / 100) 24.146 + printf "%s\">%s</a> ", $6, int(NR / size) 24.147 } 24.148 END{ 24.149 if (num_pages == 1) exit 24.150 - if (r != 0) printf "%s\">%s</a>", $6, int(NR / 100) + 1 24.151 + if (r != 0) printf "%s\">%s</a>", $6, int(NR / size) + 1 24.152 print "</p>" 24.153 }' $1 24.154 } 24.155 @@ -331,6 +302,8 @@ 24.156 # Show packages list by category or tag 24.157 24.158 show_list() { 24.159 + PAGE_SIZE=${PAGE_SIZE:-100} 24.160 + page=$(GET page); page=${page:-1} 24.161 cached=$(mktemp) 24.162 [ -n "$tag" ] && cat='' 24.163 { 24.164 @@ -362,12 +335,14 @@ 24.165 if (! INS) { VER = $2; DSC = $4; WEB = $5 } 24.166 } 24.167 }' > $cached 24.168 - page=$(GET page); [ -z "$page" ] && page=1 24.169 24.170 pager="$(pager $cached)" 24.171 - list="$(tail -n+$((($page-1)*100+1)) $cached | head -n100)" 24.172 - list1=${list:1:1} 24.173 - if [ "$pager" != "<p>$(_ 'Pages:') </p>" ] && [ -n "$list1" ]; then 24.174 + case $PAGE_SIZE in 24.175 + 0) list="$(cat $cached)";; 24.176 + *) list="$(tail -n+$((($page-1)*$PAGE_SIZE+1)) $cached | head -n$PAGE_SIZE)";; 24.177 + esac 24.178 + 24.179 + if [ "$pager" != "<p>$(_ 'Pages:') </p>" ] && [ -n "${list:1:1}" ]; then 24.180 cat << EOT 24.181 $(header_repo_name $i) 24.182 $pager 24.183 @@ -387,7 +362,7 @@ 24.184 if [ -n "$1" ]; then 24.185 echo -n "<tr><td><b>$2</b></td><td>" 24.186 echo $1 | tr ' ' $'\n' | awk -vt="$3" '{ 24.187 - printf "<a href=\"?%s=%s\">%s</a> ", t, gensub(/\+/, "%2B", "g", $1), $1 24.188 + printf "<a href=\"?%s=%s\">%s</a> ", t, gensub(/\+/, "%2B", "g", $1), $1 24.189 }' 24.190 echo "</td></tr>" 24.191 fi 24.192 @@ -416,7 +391,7 @@ 24.193 <form method="get" action=""> 24.194 <div id="actions"> 24.195 <div class="float-left">$(_ 'Selection:') $(show_button do=Link)</div> 24.196 - <div class="float-right">$(show_button recharge) $(show_button up)</div> 24.197 + <div class="float-right">$(show_button recharge up)</div> 24.198 </div> 24.199 EOT 24.200 table_head 24.201 @@ -457,8 +432,8 @@ 24.202 <thead> 24.203 <tr> 24.204 <td>$(_ 'Category')</td> 24.205 - <td>$(_ 'Repository')</td> 24.206 - <td>$(_ 'Installed')</td> 24.207 + <td>$(_ 'Available packages')</td> 24.208 + <td>$(_ 'Installed packages')</td> 24.209 </tr> 24.210 </thead> 24.211 <tbody> 24.212 @@ -512,7 +487,7 @@ 24.213 $([ "$my" != 'my' ] && show_button do=Install) 24.214 $(show_button do=Remove) 24.215 </div> 24.216 - <div class="float-right">$(show_button recharge; show_button up)</div> 24.217 + <div class="float-right">$(show_button recharge up)</div> 24.218 </div> 24.219 EOT 24.220 for i in $(repo_list ""); do 24.221 @@ -538,9 +513,9 @@ 24.222 24.223 <form method="get" action=""> 24.224 <div id="actions"> 24.225 - <div class="float-left">$(_ 'Selection:'; show_button do=Install; show_button do=Remove) 24.226 + <div class="float-left">$(_ 'Selection:'; show_button do=Install do=Remove) 24.227 <a href="$(cat $PANEL/lib/checkbox.js)">$(_ 'Toogle all')</a></div> 24.228 - <div class="float-right">$(show_button recharge; show_button up)</div> 24.229 + <div class="float-right">$(show_button recharge up)</div> 24.230 </div> 24.231 EOT 24.232 if [ -n "$(GET files)" ]; then 24.233 @@ -620,22 +595,20 @@ 24.234 24.235 <form method="get" action=""> 24.236 <div id="actions"> 24.237 - <div class="float-left">$(_ 'Selection:'; show_button do=Install; show_button do=Remove) 24.238 - <a href="$(cat $PANEL/lib/checkbox.js)">$(_ 'Toogle all')</a></div> 24.239 + <div class="float-left">$(_ 'Selection:'; show_button do=Install do=Remove) 24.240 + <button class="button" onclick="$(cat $PANEL/lib/checkbox.js)">$(_ 'Toogle all')</button></div> 24.241 <div class="float-right">$(show_button recharge)</div> 24.242 </div> 24.243 EOT 24.244 + # Ask tazpkg to make "packages.up" file 24.245 tazpkg up --check >/dev/null 24.246 table_head 24.247 - for pkg in $(cat packages.up); do 24.248 - grep -hs "^$pkg |" $PKGS_DB/packages.desc $PKGS_DB/undigest/*/packages.desc | \ 24.249 - parse_packages_desc 24.250 + 24.251 + for pkg in $(cat $PKGS_DB/packages.up); do 24.252 + grep -hs "^$pkg " $PKGS_DB/packages.info $PKGS_DB/undigest/*/packages.info | parse_packages_info 24.253 done 24.254 - cat << EOT 24.255 -</tbody> 24.256 -</table> 24.257 -</form> 24.258 -EOT 24.259 + 24.260 + echo "</tbody></table></form>" 24.261 ;; 24.262 24.263 24.264 @@ -644,13 +617,17 @@ 24.265 # Do an action on one or some packages 24.266 # 24.267 search_form; sidebar 24.268 - LOADING_MSG="$(_ 'Please wait')"; loading_msg 24.269 + loading_msg 24.270 24.271 - opt="" 24.272 + # Find the command 24.273 cmd=$(echo $(GET do) | tr [:upper:] [:lower:]) 24.274 + 24.275 + # Find the packages list 24.276 pkgs=$(echo $QUERY_STRING | awk 'BEGIN{RS="&";FS="="}{if($1=="pkg")print $2}') 24.277 pkgs=$(httpd -d "$pkgs") 24.278 - bpkgs="<b>$pkgs</b>" 24.279 + 24.280 + # Describe the command 24.281 + bpkgs="<b>$pkgs</b>"; opt='' 24.282 case $cmd in 24.283 install) MSG="$(_ 'Installing: %s' "$bpkgs")"; opt=--forced; cmd=get-install ;; 24.284 remove) MSG="$(_ 'Removing: %s' "$bpkgs")" ;; 24.285 @@ -659,14 +636,15 @@ 24.286 unblock) MSG="$(_ 'Unblocking: %s' "$bpkgs")" ;; 24.287 repack) MSG="$(_ 'Repacking: %s' "$bpkgs")" ;; 24.288 esac 24.289 + 24.290 cat << EOT 24.291 <h2>TazPkg: $(GET do)</h2> 24.292 - 24.293 -<div class="box">$MSG</div> 24.294 +<p>$MSG</p> 24.295 EOT 24.296 + # Do the command for all asked packages 24.297 for pkg in $pkgs; do 24.298 echo '<pre>' 24.299 - echo $(_n 'y') | tazpkg $cmd $pkg $opt 2>/dev/null | filter_taztools_msgs 24.300 + echo $(_n 'y') | tazpkg $cmd $pkg $opt 2>/dev/null | filter_taztools_msgs 24.301 echo '</pre>' 24.302 done ;; 24.303 24.304 @@ -679,11 +657,19 @@ 24.305 search_form; sidebar 24.306 LOADING_MSG=$(_ 'Getting package info...'); loading_msg 24.307 24.308 - temp="${pkg#get-}" 24.309 + cat << EOT 24.310 +<h2>$(_ 'Package %s' $pkg)</h2> 24.311 + 24.312 +<form method="get" action=""> 24.313 +<input type="hidden" name="pkg" value="${pkg#get-}"/> 24.314 +<div id="actions"> 24.315 +EOT 24.316 + 24.317 + # Get receipt variables, show Install/Remove buttons 24.318 if [ -d $INSTALLED/$pkg ]; then 24.319 . $INSTALLED/$pkg/receipt 24.320 files=$(wc -l < $INSTALLED/$pkg/files.list) 24.321 - action="Remove" 24.322 + show_button do=Remove 24.323 else 24.324 cd $PKGS_DB 24.325 eval "$(awk -F$'\t' -vp=$pkg ' 24.326 @@ -694,22 +680,14 @@ 24.327 }' packages.info undigest/*/packages.info)" 24.328 PACKED_SIZE=${SIZES% *} 24.329 UNPACKED_SIZE=${SIZES#* } 24.330 - 24.331 - action="Install" 24.332 - fi 24.333 - cat << EOT 24.334 -<h2>$(_ 'Package %s' $PACKAGE)</h2> 24.335 - 24.336 -<form method="get" action=""> 24.337 -<input type="hidden" name="pkg" value="$temp"/> 24.338 -<div id="actions"> 24.339 -EOT 24.340 - if [ "$temp" != "$pkg" -a "$action" == "Install" ]; then 24.341 - show_button "do=Install&nf" 24.342 - else 24.343 - show_button "do=$action" 24.344 + if [ "${pkg#get-}" != "$pkg" ]; then 24.345 + show_button "do=Install&nf" 24.346 + else 24.347 + show_button do=Install 24.348 + fi 24.349 fi 24.350 24.351 + # Show Block/Unblock, and Repack buttons 24.352 if [ -d $INSTALLED/$pkg ]; then 24.353 if grep -qs "^$pkg$" $PKGS_DB/blocked-packages.list; then 24.354 show_button do=Unblock 24.355 @@ -718,10 +696,14 @@ 24.356 fi 24.357 show_button do=Repack 24.358 fi 24.359 + 24.360 + # Translate short description 24.361 i18n_desc $pkg 24.362 + 24.363 + # Show info table 24.364 cat << EOT 24.365 </div> 24.366 -<table class="zebra outbox"> 24.367 +<table class="zebra summary outbox"> 24.368 <tbody> 24.369 <tr><td><b>$(_ 'Name')</b></td><td>$PACKAGE</td></tr> 24.370 <tr><td><b>$(_ 'Version')</b></td><td>$VERSION</td></tr> 24.371 @@ -729,7 +711,7 @@ 24.372 <tr><td><b>$(_ 'Description')</b></td><td>$SHORT_DESC</td></tr> 24.373 $([ -n "$MAINTAINER" ] && echo "<tr><td><b>$(_ 'Maintainer')</b></td><td>$MAINTAINER</td></tr>") 24.374 $([ -n "$LICENSE" ] && echo "<tr><td><b>$(_ 'License')</b></td><td><a href=\"?license=$pkg\">$LICENSE</a></td></tr>") 24.375 - <tr><td><b>$(_ 'Website')</b></td><td><a href="$WEB_SITE">$WEB_SITE</a></td></tr> 24.376 + <tr><td><b>$(_ 'Website')</b></td><td><a href="$WEB_SITE" target="_blank">$WEB_SITE</a></td></tr> 24.377 $(show_info_links "$TAGS" "$(_ 'Tags')" 'tag') 24.378 <tr><td><b>$(_ 'Sizes')</b></td><td>$PACKED_SIZE/$UNPACKED_SIZE</td></tr> 24.379 $(show_info_links "$DEPENDS" "$(_ 'Depends')" 'info') 24.380 @@ -737,9 +719,16 @@ 24.381 </tbody> 24.382 </table> 24.383 EOT 24.384 + 24.385 + # Show description 24.386 DESC="$(tazpkg desc $pkg)" 24.387 [ -n "$DESC" ] && echo "<pre>$DESC</pre>" 24.388 24.389 + # Show configuration files list 24.390 + CONFIGS="$(tazpkg list-config $pkg | sed 's|\(.*\)|\1 \1|')" 24.391 + [ -n "$CONFIGS" ] && echo "<p>$(_ 'Configuration files')</p><pre>$(printf '<a href="index.cgi?file=%s">%s</a>\n' $CONFIGS)</pre>" 24.392 + 24.393 + # Show installed files list 24.394 if [ -d $INSTALLED/$pkg ]; then 24.395 cat << EOT 24.396 <p>$(_ 'Installed files: %s' $(wc -l < $INSTALLED/$pkg/files.list))</p> 24.397 @@ -763,157 +752,187 @@ 24.398 # TazPkg configuration page 24.399 # 24.400 cmd=$(GET admin) 24.401 + pager="$(GET pager)"; pager=${pager:-$PAGE_SIZE}; pager=${pager:-100} 24.402 + mirror="$(GET mirror)"; mirror="${mirror%/}/" 24.403 + repository="$PKGS_DB/undigest/$(GET repository)" 24.404 + link="$(GET link)"; link=${link%/} 24.405 search_form; sidebar 24.406 + loading_msg 24.407 24.408 case "$cmd" in 24.409 clean) 24.410 rm -rf $CACHE_DIR/* ;; 24.411 add-mirror) 24.412 - # Decode url 24.413 - mirror=$(GET mirror) 24.414 - case "$mirror" in 24.415 - http://*|ftp://*) 24.416 - echo "$mirror" >> $(GET file) ;; 24.417 - esac ;; 24.418 - rm-mirror=http://*|rm-mirror=ftp://*) 24.419 - mirror=${cmd#rm-mirror=} 24.420 - sed -i -e "s@$mirror@@" -e '/^$/d' $(GET file) ;; 24.421 - select-mirror*) 24.422 - release=$(cat /etc/slitaz-release) 24.423 - mirror="$(GET mirror)packages/$release/" 24.424 - tazpkg setup-mirror $mirror | log 24.425 - ;; 24.426 + echo "$mirror" >> $(GET file) ;; 24.427 + rm-mirror) 24.428 + sed -i "/^"$(echo $mirror | sed 's|/|\\/|g')"$/d" $(GET file) ;; 24.429 + select-mirror) 24.430 + tazpkg setup-mirror "${mirror}packages/$(cat /etc/slitaz-release)/" | log ;; 24.431 add-repo) 24.432 - # Decode url 24.433 - mirror=$(GET mirror) 24.434 - repository=$PKGS_DB/undigest/$(GET repository) 24.435 - case "$mirror" in 24.436 - http://*|ftp://*) 24.437 - mkdir -p $repository 24.438 - echo "$mirror" > $repository/mirror 24.439 - echo "$mirror" > $repository/mirrors ;; 24.440 - esac ;; 24.441 - rm-repo=*) 24.442 - repository=${cmd#rm-repo=} 24.443 - rm -rf $PKGS_DB/undigest/$repository ;; 24.444 + mkdir -p $repository 24.445 + echo "$mirror" > $repository/mirror 24.446 + echo "$mirror" > $repository/mirrors ;; 24.447 + rm-repo) 24.448 + rm -rf $repository ;; 24.449 setlink) 24.450 - [ -d "$(GET link)/$INSTALLED" ] && ln -fs $(GET link) $PKGS_DB/fslink ;; 24.451 + [ -d "$link/$INSTALLED" ] && ln -fs $link $PKGS_DB/fslink ;; 24.452 removelink) 24.453 rm -f $PKGS_DB/fslink ;; 24.454 + pager) 24.455 + TP_CONF=/etc/slitaz/tazpanel.conf 24.456 + if [ -z "$PAGE_SIZE" ]; then 24.457 + echo -e "\n# Size of packages list page\nPAGE_SIZE=\"$pager\"" >> $TP_CONF 24.458 + else 24.459 + sed -i "s|PAGE_SIZE=.*|PAGE_SIZE=\"$pager\"|" $TP_CONF 24.460 + fi ;; 24.461 esac 24.462 24.463 cat << EOT 24.464 <h2>$(_ 'Administration')</h2> 24.465 24.466 +<p>$(_ 'TazPkg administration and settings')</p> 24.467 + 24.468 <form method="get" action=""> 24.469 <input type="hidden" name="admin" /> 24.470 24.471 -<div> 24.472 - <p>$(_ 'TazPkg administration and settings')</p> 24.473 -</div> 24.474 <div id="actions"> 24.475 - $(show_button action=saveconf) 24.476 - $(show_button action=listconf) 24.477 - $(show_button action=quickcheck) 24.478 - $(show_button action=fullcheck) 24.479 + $(show_button action=saveconf action=listconf action=quickcheck action=fullcheck) 24.480 </div> 24.481 </form> 24.482 EOT 24.483 case "$(GET action)" in 24.484 - saveconf) 24.485 - LOADING_MSG=$(_ 'Creating the package...'); loading_msg 24.486 + saveconf) 24.487 + LOADING_MSG=$(_ 'Creating the package...'); loading_msg 24.488 + echo "<pre>" 24.489 + cd /tmp 24.490 + tazpkg repack-config | filter_taztools_msgs 24.491 + echo -n "$(_ 'Path:') "; ls /tmp/config-*.tazpkg 24.492 + echo "</pre>" ;; 24.493 + listconf) 24.494 + echo "<h4>$(_ 'Configuration files')</h4>" 24.495 + echo "<ul>" 24.496 + tazpkg list-config | while read file; do 24.497 + if [ -e $file ]; then 24.498 + echo "<li><a href=\"index.cgi?file=$file\">$file</a></li>" 24.499 + else 24.500 + echo "<li>$file</li>" 24.501 + fi 24.502 + done 24.503 + echo "</ul>" ;; 24.504 + quickcheck) 24.505 + LOADING_MSG=$(_ 'Checking packages consistency...'); loading_msg 24.506 + echo "<pre>" 24.507 + tazpkg check 24.508 + echo "</pre>" ;; 24.509 + fullcheck) 24.510 + LOADING_MSG=$(_ 'Full packages check...'); loading_msg 24.511 + echo "<pre>" 24.512 + tazpkg check --full 24.513 + echo "</pre>" ;; 24.514 + dvdimage) 24.515 + dev=$(POST dvdimage) 24.516 + mkdir -p /mnt/packages 2> /dev/null 24.517 + echo "<pre>" 24.518 + mount -t iso9660 -o loop,ro $dev /mnt/packages && 24.519 + /mnt/packages/install.sh && 24.520 + _ '%s is installed on /mnt/packages' $dev 24.521 + echo "</pre>" ;; 24.522 + dvdusbkey) 24.523 + mkdir -p /mnt/packages 2> /dev/null 24.524 + for tag in "LABEL=\"packages-$version\" TYPE=\"iso9660\"" \ 24.525 + "LABEL=\"sources-$version\" TYPE=\"iso9660\"" ; do 24.526 + dev=$(blkid | grep "$tag" | cut -d: -f1) 24.527 + [ -n "$dev" ] || continue 24.528 echo "<pre>" 24.529 - cd $HOME 24.530 - tazpkg repack-config | filter_taztools_msgs 24.531 - echo -n "$(_ 'Path:') "; ls $HOME/config-*.tazpkg 24.532 - echo "</pre>" ;; 24.533 - listconf) 24.534 - echo "<h4>$(_ 'Configuration files')</h4>" 24.535 - echo "<ul>" 24.536 - tazpkg list-config | while read file; do 24.537 - if [ -e $file ]; then 24.538 - echo "<li><a href=\"index.cgi?file=$file\">$file</a></li>" 24.539 - else 24.540 - echo "<li>$file</li>" 24.541 - fi 24.542 - done 24.543 - echo "</ul>" 24.544 - ;; 24.545 - quickcheck) 24.546 - LOADING_MSG=$(_ 'Checking packages consistency...'); loading_msg 24.547 - echo "<pre>" 24.548 - tazpkg check 24.549 - echo "</pre>" ;; 24.550 - fullcheck) 24.551 - LOADING_MSG=$(_ 'Full packages check...'); loading_msg 24.552 - echo "<pre>" 24.553 - tazpkg check --full 24.554 - echo "</pre>" ;; 24.555 - esac 24.556 + mount -t iso9660 -o ro $dev /mnt/packages && 24.557 + /mnt/packages/install.sh && 24.558 + _ '%s is installed on /mnt/packages' $dev 24.559 + echo "</pre>" 24.560 + break 24.561 + done ;; 24.562 + esac 24.563 24.564 - cache_files=$(find $CACHE_DIR -name *.tazpkg | wc -l) 24.565 + cache_files=$(find $CACHE_DIR -name '*.tazpkg' | wc -l) 24.566 cache_size=$(du -sh $CACHE_DIR | cut -f1 | sed 's|\.0||') 24.567 [ "$cache_files" == 0 ] && cache_size="0K" 24.568 + mirror=$(cat $PKGS_DB/mirror) 24.569 + default_mirror=${mirror%/packages/*} 24.570 cat << EOT 24.571 +<article> 24.572 <h3>$(_ 'Packages cache')</h3> 24.573 24.574 -<div> 24.575 - <form method="get" action=""> 24.576 - <p>$(_ 'Packages in the cache: %s (%s)' $cache_files $cache_size) 24.577 - $(show_button admin=clean) 24.578 - <!--input type="hidden" name="admin" value="clean" /> 24.579 - <input type="submit" value="$(_n 'Clean')" /--> 24.580 - </p> 24.581 - </form> 24.582 -</div> 24.583 +<form method="get" action=""> 24.584 + <p>$(_ 'Packages in the cache: %s (%s)' $cache_files $cache_size) 24.585 + $(show_button admin=clean) 24.586 + </p> 24.587 +</form> 24.588 +</article> 24.589 24.590 -<h3>$(_ 'Default mirror')</h3> 24.591 24.592 -<pre>$(cat $PKGS_DB/mirror)</pre> 24.593 - 24.594 +<article> 24.595 <h3>$(_ 'Current mirror list')</h3> 24.596 EOT 24.597 + 24.598 + # List mirrors 24.599 + version=$(cat /etc/slitaz-release) 24.600 for i in $PKGS_DB/mirrors $PKGS_DB/undigest/*/mirrors; do 24.601 [ -s $i ] || continue 24.602 - echo '<div class="box">' 24.603 if [ $i != $PKGS_DB/mirrors ]; then 24.604 - Repo_Name="$(repo_name $(dirname $i))" 24.605 - echo "<h4>$(_ 'Repository: %s' $Repo_Name)</h4>" 24.606 + echo "<h4>$(_ 'Repository: %s' "$(repo_name $(dirname $i))")</h4>" 24.607 fi 24.608 - echo "<ul>" 24.609 - list_mirrors $i 24.610 - echo "</ul>" 24.611 cat << EOT 24.612 -</div> 24.613 +<form method="get" action=""> 24.614 +<input type="hidden" name="admin" value="select-mirror"/> 24.615 +<table class="zebra"> 24.616 +EOT 24.617 + while read line; do 24.618 + cat << EOT 24.619 +<tr> 24.620 + <td> 24.621 + <input type="radio" name="mirror" id="$line" value="$line" onchange="this.form.submit()" 24.622 + $([ "$line" == "$default_mirror/" ] && echo -n 'checked="checked"')> 24.623 + <label for="$line"><code>$line</code></label></td> 24.624 + <td><a class="w" href="$line" target="_blank"></a></td> 24.625 + <td><a href="?admin=rm-mirror&mirror=$line&file=$i"> 24.626 + <img src="$IMAGES/tp-remove.png" title="$(_ 'Delete')"/></a></td> 24.627 +</tr> 24.628 +EOT 24.629 + done < $i 24.630 + cat << EOT 24.631 +</table> 24.632 +</form> 24.633 + 24.634 <form method="get" action=""> 24.635 <p> 24.636 - <input type="hidden" name="admin" value="add-mirror" /> 24.637 <input type="hidden" name="file" value="$i" /> 24.638 - <input type="text" name="mirror" size="60"> 24.639 - <input type="submit" value="$(_n 'Add mirror')" /> 24.640 + <input type="text" name="mirror" size="40" /> 24.641 + $(show_button admin=add-mirror) 24.642 </p> 24.643 </form> 24.644 EOT 24.645 done 24.646 + echo "</article><article>" 24.647 echo "<h3>$(_ 'Private repositories')</h3>" 24.648 - [ -n "$(ls $PKGS_DB/undigest 2> /dev/null)" ] && cat << EOT 24.649 -<div class="box"> 24.650 - <ul> 24.651 - $(list_repos) 24.652 - </ul> 24.653 -</div> 24.654 + if [ -n "$(ls $PKGS_DB/undigest 2> /dev/null)" ]; then 24.655 + echo '<table class="zebra">' 24.656 + ls $PKGS_DB/undigest 2> /dev/null | while read repo ; do 24.657 + cat <<EOT 24.658 + <tr><td><a href="?admin=rm-repo&repository=$repo"><img src="$IMAGES/tp-remove.png" title="$(_ 'Delete')"></a>$repo</td></tr> 24.659 EOT 24.660 + done 24.661 + echo '</table>' 24.662 + fi 24.663 + 24.664 cat << EOT 24.665 <form method="get" action=""> 24.666 - <p> 24.667 - <input type="hidden" name="admin" value="add-repo" /> 24.668 - $(_ 'Name') <input type="text" name="repository" size="10"> 24.669 - $(_ 'mirror') 24.670 - <input type="text" name="mirror" value="http://" size="50"> 24.671 - <input type="submit" value="$(_n 'Add repository')" /> 24.672 - </p> 24.673 + <p>$(_ 'Name') <input type="text" name="repository" size="10"/> 24.674 + $(_ 'URL:') <input type="text" name="mirror" value="http://"> 24.675 + $(show_button admin=add-repo)</p> 24.676 </form> 24.677 +</article> 24.678 24.679 + 24.680 +<article> 24.681 <h3>$(_ 'Link to another SliTaz installation')</h3> 24.682 24.683 <p>$(_ "This link points to the root of another SliTaz installation. \ 24.684 @@ -921,15 +940,14 @@ 24.685 24.686 <form method="get" action=""> 24.687 <p> 24.688 - <input type="text" name="link" value="$(readlink $PKGS_DB/fslink 2> /dev/null)" size="50"> 24.689 - $(show_button admin=setlink) 24.690 - $(show_button admin=removelink) 24.691 + <input type="text" name="link" value="$(readlink $PKGS_DB/fslink 2> /dev/null)"/> 24.692 + $(show_button admin=setlink admin=removelink) 24.693 </p> 24.694 </form> 24.695 -EOT 24.696 - version=$(cat /etc/slitaz-release) 24.697 - cat << EOT 24.698 +</article> 24.699 24.700 + 24.701 +<article> 24.702 <h3 id="dvd">$(_ 'SliTaz packages DVD')</h3> 24.703 24.704 <p>$(_ "A bootable DVD image of all available packages for the %s version is \ 24.705 @@ -937,45 +955,30 @@ 24.706 without an internet connection. This image can be installed on a DVD or a USB \ 24.707 key." $version)</p> 24.708 24.709 -<div> 24.710 - <form method="post" action='?admin&action=dvdimage#dvd'> 24.711 - <p> 24.712 - <a class="button" 24.713 - href='http://mirror.slitaz.org/iso/$version/packages-$version.iso'> 24.714 - <img src="$IMAGES/tazpkg.png" />$(_ 'Download DVD image')</a> 24.715 - <a class="button" href='?admin&action=dvdusbkey#dvd'> 24.716 - <img src="$IMAGES/tazpkg.png" />$(_ 'Install from DVD/USB key')</a> 24.717 - </p> 24.718 - <div class="box"> 24.719 - $(_ 'Install from ISO image:') 24.720 - <input type="text" name="dvdimage" size="40" value="/root/packages-$version.iso"> 24.721 - </div> 24.722 - </form> 24.723 +<button class="button" onclick='http://mirror.slitaz.org/iso/$version/packages-$version.iso'> 24.724 + <img src="$IMAGES/tp-dl-dvd.png" />$(_ 'Download DVD image')</button> 24.725 +<button class="button" onclick='?admin&action=dvdusbkey'> 24.726 + <img src="$IMAGES/tp-link.png" />$(_ 'Install from DVD/USB key')</button> 24.727 +<div class="box"> 24.728 + <form method="post" action='?admin&action=dvdimage'> 24.729 + $(_ 'Install from ISO image:') 24.730 + <input type="text" name="dvdimage" size="40" value="/root/packages-$version.iso" /> 24.731 </div> 24.732 +</form> 24.733 +</article> 24.734 + 24.735 + 24.736 +<article> 24.737 +<h3>$(_ 'Packages list')</h3> 24.738 + 24.739 +<p>$(_ 'Long list of packages is paginated. Here you can set the page size (default: 100, turning off the pager: 0).')</p> 24.740 +<form method="get" action=""> 24.741 + <input type="hidden" name="admin" value="pager" /> 24.742 + <input type="number" name="pager" value="$pager" min="0" step="10" size="4" /> 24.743 + <button class="button" type="submit">$(_ 'Set')</button> 24.744 +</form> 24.745 +</article> 24.746 EOT 24.747 - if [ "$(GET action)" == "dvdimage" ]; then 24.748 - dev=$(POST dvdimage) 24.749 - mkdir -p /mnt/packages 2> /dev/null 24.750 - echo "<pre>" 24.751 - mount -t iso9660 -o loop,ro $dev /mnt/packages && 24.752 - /mnt/packages/install.sh && 24.753 - _ '%s is installed on /mnt/packages' $dev 24.754 - echo "</pre>" 24.755 - fi 24.756 - if [ "$(GET action)" == "dvdusbkey" ]; then 24.757 - mkdir -p /mnt/packages 2> /dev/null 24.758 - for tag in "LABEL=\"packages-$version\" TYPE=\"iso9660\"" \ 24.759 - "LABEL=\"sources-$version\" TYPE=\"iso9660\"" ; do 24.760 - dev=$(blkid | grep "$tag" | cut -d: -f1) 24.761 - [ -n "$dev" ] || continue 24.762 - echo "<pre>" 24.763 - mount -t iso9660 -o ro $dev /mnt/packages && 24.764 - /mnt/packages/install.sh && 24.765 - _ '%s is installed on /mnt/packages' $dev 24.766 - echo "</pre>" 24.767 - break 24.768 - done 24.769 - fi 24.770 ;; 24.771 24.772 24.773 @@ -987,79 +990,71 @@ 24.774 24.775 pkg=$(GET license) 24.776 case $pkg in 24.777 - /*) 24.778 - [ -e $pkg ] && { 24.779 + /*) [ -e $pkg ] && { 24.780 echo "<h2>${pkg#/usr/share/licenses/}</h2>" 24.781 case $pkg in 24.782 - *.htm*) 24.783 - cat $pkg ;; 24.784 - *) 24.785 - echo "<pre style=\"white-space: pre-wrap\">" 24.786 + *.htm*) cat $pkg ;; 24.787 + *) echo "<pre style=\"white-space: pre-wrap\">" 24.788 cat $pkg | htmlize | sed 's|\([hf]t*t*ps*://[a-zA-Z0-9./_-]*[a-zA-Z0-9/_-]\)|<a href="\1">\1</a>|' 24.789 echo "</pre>" 24.790 ;; 24.791 esac 24.792 } ;; 24.793 - *) 24.794 - echo "<h2>$(_ 'Licenses for package %s' $pkg)</h2>" 24.795 - ONLINE=''; OFFLINE='' 24.796 - 24.797 + *) echo "<h2>$(_ 'Licenses for package %s' $pkg)</h2>" 24.798 + OFFLINE='' 24.799 if [ -e "$PKGS_DB/installed/$pkg" ]; then 24.800 - for license in $(. $PKGS_DB/installed/$pkg/receipt; echo "$LICENSE"); do 24.801 - OSL=''; GNU=''; USR=''; LIC='' 24.802 - case $license in 24.803 - Apache) OSL='Apache-2.0'; URL='http://www.apache.org/licenses/' ;; 24.804 - Artistic) OSL='Artistic-2.0' ;; 24.805 - BSD) OSL='BSD-2-Clause' ;; 24.806 - BSD3) OSL='BSD-3-Clause' ;; 24.807 - 24.808 - CC-BY-SA*|CC-SA*) CCO='by-sa/4.0/' ;; 24.809 - CC-BY-ND*) CCO='by-nd/4.0/' ;; 24.810 - CC-BY-NC-SA*) CCO='by-nc-sa/4.0/' ;; 24.811 - CC-BY-NC-ND*) CCO='by-nc-nd/4.0/' ;; 24.812 - CC-BY-NC*) CCO='by-nc/4.0/' ;; 24.813 - CC-BY*) CCO='by/4.0/' ;; 24.814 - 24.815 - cc-pd) URL='http://creativecommons.org/publicdomain/' ;; 24.816 - CCPL) ;; 24.817 - CDDL*) OSL='CDDL-1.0' ;; 24.818 - CECILL*) OSL='CECILL-2.1' ;; 24.819 - Eclipse|EPL*) OSL='EPL-1.0' ;; 24.820 - FDL) GNU='fdl' ;; 24.821 - GPL) GNU='gpl'; OSL='gpl-license'; LIC='gpl.txt' ;; 24.822 - GPL2) GNU='old-licenses/gpl-2.0'; OSL='GPL-2.0' ;; 24.823 - GPL3) GNU='gpl'; OSL='GPL-3.0'; LIC='gpl.txt' ;; 24.824 - ISC) OSL='ISC' ;; 24.825 - LGPL) GNU='lgpl'; OSL='lgpl-license' ;; 24.826 - LGPL2) GNU='old-licenses/lgpl-2.0' ;; 24.827 - LGPL2.1) GNU='old-licenses/lgpl-2.1'; OSL='LGPL-2.1'; LIC='lgpl.txt' ;; 24.828 - LGPL3) GNU='lgpl'; OSL='LGPL-3.0' ;; 24.829 - LPPL*) OSL='LPPL-1.3c' ;; 24.830 - MIT) OSL='MIT'; LIC='mit.txt' ;; 24.831 - MPL) OSL='MPL-2.0'; LIC='mozilla.txt' ;; 24.832 - MPL2) OSL='MPL-2.0' ;; 24.833 - FL) OSL='Fair' ;; # ? 24.834 - PSL) ;; 24.835 - PublicDomain) ;; 24.836 - QPL*) OSL='QPL-1.0' ;; 24.837 - SIL_OFL*) OSL='OFL-1.1' ;; 24.838 - zlib/libpng) OSL='Zlib' ;; 24.839 - esac 24.840 - 24.841 - [ -n "$OSL" ] && ONLINE="$ONLINE <li><a href=\"http://opensource.org/licenses/$OSL\">$(_ '%s license on %s website' "<b>$OSL</b>" "OSL")</a></li>\n" 24.842 - [ -n "$GNU" ] && ONLINE="$ONLINE <li><a href=\"https://www.gnu.org/licenses/$GNU.html\">$(_ '%s license on %s website' "<b>${GNU#*/}</b>" "GNU")</a></li>\n" 24.843 - [ -n "$CCO" ] && ONLINE="$ONLINE <li><a href=\"http://creativecommons.org/licenses/$CCO\">$(_ '%s license on %s website' "<b>${CCO%%/*}</b>" "Creative Commons")</a></li>\n" 24.844 - [ -n "$URL" ] && ONLINE="$ONLINE <li><a href=\"$URL\">$URL</a></li>\n" 24.845 - [ -n "$LIC" ] && OFFLINE="$OFFLINE <li><a href=\"?license=/usr/share/licenses/$LIC\">licenses/<b>$LIC</b></a></li>\n" 24.846 - done 24.847 - 24.848 for lic in $(grep /usr/share/licenses/ $PKGS_DB/installed/$pkg/files.list); do 24.849 OFFLINE="$OFFLINE <li><a href=\"?license=$lic\">licenses/<b>${lic#/usr/share/licenses/}</b></a></li>\n" 24.850 done 24.851 - fi 24.852 - [ -n "$ONLINE" ] && echo -e "<p>$(_ 'Read online:')</p>\n<ul>\n$ONLINE</ul>\n" 24.853 - [ -n "$OFFLINE" ] && echo -e "<p>$(_ 'Read local:')</p>\n<ul>\n$OFFLINE</ul>\n" 24.854 - ;; 24.855 + echo "\ 24.856 +Apache|Apache-2.0||||http://www.apache.org/licenses/#Artistic|Artistic-2.0||||#\ 24.857 +BSD|BSD-2-Clause||||#BSD3|BSD-3-Clause||||#CC-BY-SA||by-sa/4.0/|||#\ 24.858 +CC-SA||by-sa/4.0/|||#CC-BY-ND||by-nd/4.0/|||#CC-BY-NC-SA||by-nc-sa/4.0/|||#\ 24.859 +CC-BY-NC-ND||by-nc-nd/4.0/|||#CC-BY-NC||by-nc/4.0/|||#CC-BY||by/4.0/|||#\ 24.860 +cc-pd|||||http://creativecommons.org/publicdomain/#CDDL|CDDL-1.0||||#\ 24.861 +CECILL|CECILL-2.1||||#Eclipse|EPL-1.0||||#EPL|EPL-1.0||||#FDL|||fdl||#\ 24.862 +GPL|gpl-license||gpl|gpl.txt|#GPL2|GPL-2.0||old-licenses/gpl-2.0||#\ 24.863 +GPL3|GPL-3.0||gpl|gpl.txt|#ISC|ISC||||#LGPL|lgpl-license||lgpl||#\ 24.864 +LGPL2|||old-licenses/lgpl-2.0||#\ 24.865 +LGPL2.1|LGPL-2.1||old-licenses/lgpl-2.1|lgpl.txt|#LGPL3|LGPL-3.0||lgpl||#\ 24.866 +LPPL|LPPL-1.3c||||#MIT|MIT|||mit.txt|#MPL|MPL-2.0|||mozilla.txt|#\ 24.867 +MPL2|MPL-2.0||||#PublicDomain|||||http://creativecommons.org/publicdomain/#\ 24.868 +QPL|QPL-1.0||||#SIL_OFL|OFL-1.1||||#OFL|OFL-1.1||||#zlib/libpng|Zlib||||" | \ 24.869 +awk -vlicenses="$(. $PKGS_DB/installed/$pkg/receipt; echo "$LICENSE")" \ 24.870 + -vtext="$(_ '%s license on %s website' %s %s)" \ 24.871 + -vro="$(_ 'Read online:')" -vrl="$(_ 'Read local:')" \ 24.872 + -vofflic="$OFFLINE" ' 24.873 +BEGIN{ FS="|"; RS="#"; split(licenses, lic, " "); if (offlic) OFFLINE[0]=offlic } 24.874 +function link1(u, l, ll, w) { 24.875 + return sprintf("\t<li><a href=\"%s%s\">" text "</a></li>", u, l, "<b>" ll "</b>", w) } 24.876 +function link2(u, l, ll) { 24.877 + return sprintf("\t<li><a href=\"%s%s\">%s</b></a></li>", u, l, ll) } 24.878 +function link_osl(n) { 24.879 + return link1("http://opensource.org/licenses/", n, n, "OSL") } 24.880 +function link_cc(n) { 24.881 + split(n, ll, "/") 24.882 + return link1("http://creativecommons.org/licenses/", n, ll[1], "Creative Commons") } 24.883 +function link_gnu(n) { 24.884 + split(n, ll, "/") 24.885 + return link1("https://www.gnu.org/licenses/", n ".html", ll[2] ? ll[2] : ll[1], "GNU") } 24.886 +function link_loc(n) { 24.887 + return link2("?license=/usr/share/licenses/", n, "licenses/<b>" n "</b>") } 24.888 +function link_url(n) { 24.889 + return link2(n, "", n) } 24.890 +{ 24.891 + if ($1 == lic[1] || $1 == lic[2] || $1 == lic[3] || $1 == lic[4]) { 24.892 + if ($2) ONLINE[$2]=link_osl($2) 24.893 + if ($3) ONLINE[$3]=link_cc($3) 24.894 + if ($4) ONLINE[$4]=link_gnu($4) 24.895 + if ($5) OFFLINE[$5]=link_loc($5) 24.896 + if ($6) OFFLINE[$6]=link_url($6) 24.897 + } 24.898 +} 24.899 +END{ 24.900 + if (length(ONLINE) > 0) { print "<p>" ro "</p>\n<ul>"; for (o in ONLINE) print ONLINE[o]; print "</ul>" } 24.901 + if (length(OFFLINE) > 0) { print "<p>" rl "</p>\n<ul>"; for (o in OFFLINE) print OFFLINE[o]; print "</ul>" } 24.902 +}' 24.903 + fi ;; 24.904 esac 24.905 ;; 24.906 24.907 @@ -1076,11 +1071,14 @@ 24.908 Any) title="$(_ 'List of tags in all repositories')" ;; 24.909 *) title="$(_ 'List of tags in repository "%s"' "$brepo")" ;; 24.910 esac 24.911 - echo "<p>$title</p><p>" 24.912 + echo "<p>$title</p><p id=\"tags\">" 24.913 to_read="" 24.914 for i in $(repo_list ""); do 24.915 - if [ ! -e $i/packages.info ] && [ $repo == 'Public' ]; then 24.916 - list=installed; else list=packages; fi 24.917 + if [ ! -e $i/packages.info ]; then 24.918 + list=installed 24.919 + else 24.920 + list=packages 24.921 + fi 24.922 to_read="$to_read $i/$list.info" 24.923 done 24.924 TAGS="$(awk -F$'\t' '{if($6){print $6}}' $to_read | tr ' ' $'\n' | sort | uniq -c)" 24.925 @@ -1105,9 +1103,10 @@ 24.926 <form method="get" action=""> 24.927 <div id="actions"> 24.928 <div class="float-left"> 24.929 - $(_ 'Selection:') 24.930 - <input type="submit" name="do" value="Install" /> 24.931 - <input type="submit" name="do" value="Remove" /> 24.932 + $(_ 'Selection:'; show_button do=Install do=Remove) 24.933 + </div> 24.934 + <div class="float-right"> 24.935 + $(show_button tags) 24.936 </div> 24.937 </div> 24.938 EOT 24.939 @@ -1150,8 +1149,6 @@ 24.940 # 24.941 search_form; sidebar 24.942 24.943 - [ -n "$(GET block)" ] && tazpkg block $(GET block) 24.944 - [ -n "$(GET unblock)" ] && tazpkg unblock $(GET unblock) 24.945 cat << EOT 24.946 <h2>$(_ 'Summary')</h2> 24.947 24.948 @@ -1160,19 +1157,23 @@ 24.949 EOT 24.950 fslink=$(readlink $PKGS_DB/fslink) 24.951 [ -n "$fslink" -a -d "$fslink/$INSTALLED" ] && show_button linkable 24.952 - show_button recharge 24.953 - show_button up 24.954 - show_button admin 24.955 + show_button recharge up admin 24.956 cat << EOT 24.957 </div> 24.958 24.959 +<article> 24.960 +<h3>$(_ 'Summary')</h3> 24.961 <table class="zebra summary"> 24.962 <tbody> 24.963 <tr> 24.964 <td>$(_ 'Last recharge:')</td> 24.965 - <td>$(list=$PKGS_DB/packages.info 24.966 + <td>$(list=$PKGS_DB/ID 24.967 if [ -e $list ]; then 24.968 - $((days=$(date +%s)/86400-$(date -r $list +%s)/86400)) 24.969 + ohhmm="$(date +%z)" # '+0200' for EET (+2 hours) 24.970 + offset=$(( 60 * (60 * ${ohhmm:0:3} + ${ohhmm:3:2}) )) # in the seconds 24.971 + daynow=$(( ($(date +%s) + $offset) / 86400 )) 24.972 + dayupd=$(( ($(date -r $list +%s) + $offset) / 86400 )) 24.973 + days=$(( $daynow - $dayupd )) 24.974 time=$(date -r $list +%R) 24.975 ago="$(_p '%d day ago.' '%d days ago.' $days $days)" 24.976 case $days in 24.977 @@ -1190,31 +1191,38 @@ 24.978 fi)</td></tr> 24.979 <tr> 24.980 <td>$(_ 'Installed packages:')</td> 24.981 - <td><b>$(cat $PKGS_DB/installed.info | wc -l)</a></b> 24.982 - <a href="?list&my=my&cat=all&repo=Any">$(_ '(show)')</a></td></tr> 24.983 + <td><a href="?list&my=my&cat=all&repo=Any"> 24.984 + <b>$(cat $PKGS_DB/installed.info | wc -l)</b> 24.985 + </a></td></tr> 24.986 <tr> 24.987 <td>$(_ 'Mirrored packages:')</td> 24.988 - <td><b>$(cat $PKGS_DB/packages.list | wc -l)</b></td></tr> 24.989 + <td><a href="?list&my=no&cat=all&repo=Any"> 24.990 + <b>$(cat $PKGS_DB/packages.list | wc -l)</b> 24.991 + </a></td></tr> 24.992 <tr> 24.993 <td>$(_ 'Upgradeable packages:')</td> 24.994 - <td><b>$(cat $PKGS_DB/packages.up | wc -l)</b> 24.995 - <a href="?up">$(_ '(show)')</a></td></tr> 24.996 + <td><a href="?up"> 24.997 + <b>$(cat $PKGS_DB/packages.up | wc -l)</b> 24.998 + </a></td></tr> 24.999 <tr> 24.1000 <td>$(_ 'Installed files:')</td> 24.1001 <td><b>$(cat $INSTALLED/*/files.list | wc -l)</b></td></tr> 24.1002 <tr> 24.1003 <td>$(_ 'Blocked packages:')</td> 24.1004 - <td><b>$(cat $PKGS_DB/blocked-packages.list | wc -l)</b> 24.1005 - <a href="?blocked">$(_ '(show)')</a></td></tr> 24.1006 + <td><a href="?blocked"> 24.1007 + <b>$(cat $PKGS_DB/blocked-packages.list | wc -l)</b> 24.1008 + </a></td></tr> 24.1009 </tbody> 24.1010 -</table> 24.1011 +</table></article> 24.1012 24.1013 +<article> 24.1014 <h3>$(_ 'Latest log entries')</h3> 24.1015 24.1016 <pre> 24.1017 -$(tail -n 5 $LOG | fgrep "-" | awk '{print $1, $2, $3, $4, $5, $6, $7}') 24.1018 +$(tail -n 5 $LOG | fgrep "-" | awk '{print $1, $2, $3, $4, $5, "<a href=\"?info=" $6 "\">" $6 "</a>", $7}') 24.1019 <a href="index.cgi?file=$LOG">$(_ 'more...')</a> 24.1020 </pre> 24.1021 +</article> 24.1022 EOT 24.1023 ;; 24.1024 esac
25.1 --- a/tazpanel/pkgs.css Mon Jan 19 18:51:32 2015 +0100 25.2 +++ b/tazpanel/pkgs.css Wed Jan 21 17:53:26 2015 +0200 25.3 @@ -1,51 +1,61 @@ 25.4 +body { -webkit-appearance: window; } 25.5 25.6 -/* Sidebar menus */ 25.7 +/** 25.8 + * Sidebar menus 25.9 + */ 25.10 25.11 -#content-sidebar { margin: 20px 144px 20px 20px; } 25.12 +#content-sidebar { 25.13 + margin-right: 138px; /* sidebar width */ 25.14 + padding: 10px; 25.15 +} 25.16 25.17 -#sidebar { 25.18 - position: fixed; 25.19 - top: 60px; 25.20 - right: 0; 25.21 - padding: 5px 5px 0 0; 25.22 - width: 132px; 25.23 - height: 100%; 25.24 +#sidebar { /* full width = width(132) + h-padding(5) + border(1) = 138px */ 25.25 + position: fixed; top: 60px; bottom: 0; right: 0; 25.26 + width: 132px; padding: 5px 5px 0 0; 25.27 border-left: 1pt solid #AAA; 25.28 background-color: #EEE; 25.29 + overflow-y: auto; overflow-x: hidden; /* for tiny screens */ 25.30 } 25.31 25.32 #sidebar h4 { 25.33 - margin: 0; 25.34 + margin: 0; padding: 0; 25.35 font-size: 16px; color: #222; 25.36 text-align: center; 25.37 } 25.38 25.39 +/* hack to remove unwanted scrollbar from multiline selector */ 25.40 .select_wrap { 25.41 display: inline-block; 25.42 vertical-align: top; 25.43 overflow: hidden; 25.44 } 25.45 - 25.46 .select_wrap select { 25.47 padding: 5px; 25.48 margin:-5px -20px -5px -5px; 25.49 - width: 162px; 25.50 + width: 162px; /* sidebar:(138px) + this h-margin:(20px+5px) */ 25.51 font-size: small; 25.52 } 25.53 25.54 +/* zebra on selector */ 25.55 select option:nth-child(even) { 25.56 background-color: rgba(0,0,0,0.05); 25.57 } 25.58 25.59 +option:checked { color: red; font-weight: bold; background-color: orange; } 25.60 + 25.61 +/* sidebar links */ 25.62 #sidebar a { 25.63 display: inline-block; 25.64 padding: 0 0 0 0.5em; margin: 0; 25.65 - color: #666; 25.66 + color: #000; 25.67 font-size: small; 25.68 width: 100%; 25.69 } 25.70 25.71 25.72 +/** 25.73 + * List of packages 25.74 + */ 25.75 25.76 /* links classes: 25.77 * pkg - package (not installed); 25.78 @@ -56,78 +66,86 @@ 25.79 * you can style links using icons and/or color 25.80 */ 25.81 25.82 -a.pkg { 25.83 - background: url(images/tazpkg.png) no-repeat left; } 25.84 -a.pkgi, a.pkgib { 25.85 - background: url(images/tazpkg-installed.png) no-repeat left; } 25.86 -/* 25.87 -a.pkgi { 25.88 - color: green; } 25.89 -*/ 25.90 -a.pkgib { 25.91 - color: red; } 25.92 +a.pkg { background: url(images/tp-new.png) no-repeat left; } 25.93 +a.pkgi { background: url(images/tp-pkgi.png) no-repeat left; } 25.94 +a.pkgib { background: url(images/tp-pkgib.png) no-repeat left; color: red; } 25.95 a.w, .pkglist td:nth-child(4) a { 25.96 - background: url(images/browser.png) no-repeat left; } 25.97 + background: url(images/tp-web.png) no-repeat left; } 25.98 25.99 a.pkg, a.pkgi, a.pkgib, a.w, .pkglist td:nth-child(4) a { 25.100 margin: 0; padding: 0 0 0 17px; 25.101 min-height: 16px; min-width: 16px; 25.102 - display: inline-block; } 25.103 + display: inline-block; 25.104 +} 25.105 25.106 +/* not break the line */ 25.107 +.pkglist td:nth-child(1), 25.108 +.filelist td:nth-child(1) { white-space: nowrap; } 25.109 25.110 -.pkglist td:nth-child(1), .filelist td:nth-child(1) { 25.111 - white-space: nowrap; 25.112 - } 25.113 +.pkglist td:nth-child(1) a, 25.114 +.filelist td:nth-child(1) a { max-width: 12em; } 25.115 +.pkglist td:nth-child(2) { max-width: 7em; } 25.116 +.filelist td:nth-child(2) { max-width: 30em; } 25.117 25.118 -.pkglist td:nth-child(1) a, .filelist td:nth-child(1) a { 25.119 - max-width: 12em; 25.120 - } 25.121 - 25.122 -.pkglist td:nth-child(2) { 25.123 - max-width: 7em; 25.124 - } 25.125 - 25.126 -.pkglist td:nth-child(1) a, .pkglist td:nth-child(2), 25.127 -.filelist td:nth-child(1) a, .filelist td:nth-child(2) { 25.128 +/* ellipsize content of 1st and 2nd columns */ 25.129 +.pkglist td:nth-child(1) a, 25.130 +.pkglist td:nth-child(2), 25.131 +.filelist td:nth-child(1) a, 25.132 +.filelist td:nth-child(2) { 25.133 white-space: nowrap; 25.134 overflow: hidden; 25.135 text-overflow: ellipsis; -o-text-overflow: ellipsis; 25.136 - } 25.137 +} 25.138 25.139 -.filelist td:nth-child(2) { 25.140 - max-width: 30em; 25.141 - } 25.142 25.143 .pkglist tr { border-bottom: 1pt solid #DDD; } 25.144 25.145 -.pkglist, .pkglist thead, .summary { border: 1.5pt solid #BBB!important; } 25.146 +.pkglist, .pkglist thead { border: 1.5pt solid #BBB!important; } 25.147 25.148 -.summary td:nth-child(1) { 25.149 - width:10%; white-space: nowrap; /* to have minimal width of first column */ 25.150 - } 25.151 25.152 -#actions { overflow: auto; } 25.153 + 25.154 +/** 25.155 + * Summary table 25.156 + */ 25.157 + 25.158 +/* to have minimal width of first column */ 25.159 +.summary td:nth-child(1) { width:10%; white-space: nowrap; } 25.160 + 25.161 +/* light blue links on summary table */ 25.162 +.summary a { color: #248; } 25.163 + 25.164 + 25.165 + 25.166 +/** 25.167 + * Pager 25.168 + */ 25.169 25.170 a.pages { 25.171 + display: inline-block; 25.172 padding: 0.5ex; 25.173 margin: 0.5ex 0; 25.174 border: 1px solid #AAA; 25.175 width: 3ex; 25.176 - display: inline-block; 25.177 text-align: center; 25.178 - } 25.179 +} 25.180 a.pages:hover { 25.181 border: 1px solid #F94; 25.182 background: #F94; 25.183 color: black; 25.184 - } 25.185 +} 25.186 a.pages.current, a.pages.current:hover { 25.187 font-weight: bold; 25.188 border: 1px solid #07F; 25.189 background: #07F; 25.190 color: #eee; 25.191 - } 25.192 +} 25.193 25.194 + 25.195 + 25.196 +/* 25.197 + * Tags 25.198 + */ 25.199 +#tags { text-align: center; } 25.200 a.tag1 { font-size: 0.9em; color: #678; } 25.201 a.tag2 { font-size: 1.0em; color: #444; } 25.202 a.tag3 { font-size: 1.1em; color: #16A; } 25.203 @@ -136,22 +154,86 @@ 25.204 a.tag6 { font-size: 1.8em; color: #862; } 25.205 a.tag7 { font-size: 2.1em; color: #FA0; } 25.206 a.tag8 { font-size: 2.4em; color: #F00; } 25.207 -a.tag1, a.tag2, a.tag3, a.tag4, a.tag5, a.tag6, a.tag7, a.tag8 { 25.208 +#tags a { 25.209 display: inline-block; 25.210 white-space: nowrap; 25.211 vertical-align: middle; 25.212 padding: 0.2em 0.5em; 25.213 } 25.214 -a.tag1:hover, a.tag2:hover, a.tag3:hover, a.tag4:hover, a.tag5:hover, a.tag6:hover, a.tag7:hover, a.tag8:hover { 25.215 - outline: 1.5pt solid #FC8; } 25.216 +#tags a:hover { 25.217 + outline: 1.5pt solid #FC8; 25.218 +} 25.219 25.220 + 25.221 + 25.222 +/* 25.223 + * Action buttons panel 25.224 + */ 25.225 #actions { 25.226 - background-color: #EEE; 25.227 - margin: 0; padding: 0 0.5ex!important; 25.228 - border: 1pt solid #DDD; 25.229 - border-radius: 0.5ex; 25.230 + background-color: rgba(229,229,229,0.5); 25.231 + margin: 0; padding: 0.2rem 0.3rem!important; 25.232 + border: 1pt solid #CCC; 25.233 + border-radius: 0.3rem; 25.234 + overflow: auto; /* provide break after floated objects */ 25.235 } 25.236 .button img { 25.237 padding: 0 4px 0 0; 25.238 } 25.239 25.240 + 25.241 +/* "articles" are used in the admin page */ 25.242 +article, fieldset { 25.243 + display: block; 25.244 + border: 1pt solid rgba(128, 128, 128, 0.5); 25.245 + border-radius: 0.3rem; 25.246 + padding: 0.3rem 0.3rem 0 0.3rem; 25.247 + margin: 0.5rem 0; 25.248 + background-color: rgba(128, 128, 128, 0.2); 25.249 +} 25.250 +article h3 { 25.251 + padding: 0.3rem; margin: -0.3rem; 25.252 + border-bottom: 1pt solid rgba(128, 128, 128, 0.5); 25.253 + border-radius: 0.3rem 0.3rem 0 0; 25.254 + background-color: rgba(128, 128, 128, 0.3); 25.255 +} 25.256 +legend { 25.257 + font-weight: bold; 25.258 +} 25.259 +/* Disable too much borders */ 25.260 +article pre, article table { border: none } 25.261 + 25.262 + 25.263 +/* 25.264 + * Search block 25.265 + */ 25.266 +.search { 25.267 + position: fixed; right: 10px; top: 8px; 25.268 + height: 25px; 25.269 + border-radius: 4px; 25.270 + background-color: #FFF; 25.271 + padding: 0; margin: 0; 25.272 +} 25.273 +.search input { 25.274 + height: 100%; 25.275 + margin: 0; padding: 4px; 25.276 + /*outline: none;*/ 25.277 +} 25.278 +.search input:nth-child(1) { 25.279 + width: 200px; 25.280 + border: none; 25.281 + -webkit-appearance: none; /* remove borders for input type="search" */ 25.282 +} 25.283 +.search input:nth-child(2), .search input:nth-child(3) { -webkit-appearance: push-button; } 25.284 + 25.285 +.search input:nth-child(1) { 25.286 + border-radius: 4px 0 0 4px; 25.287 + -moz-border-radius: 4px 0 0 4px; 25.288 + -webkit-border-radius: 4px 0 0 4px; 25.289 +} 25.290 +.search input:nth-child(2) { border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; } 25.291 +.search input:nth-child(3) { 25.292 + border-top-left-radius: 0; border-bottom-left-radius: 0; 25.293 + -moz-border-top-left-radius: 0; -moz-border-bottom-left-radius: 0; 25.294 + -webkit-border-top-left-radius: 0; -webkit-border-bottom-left-radius: 0; 25.295 +} 25.296 +
26.1 --- a/tazpkg Mon Jan 19 18:51:32 2015 +0100 26.2 +++ b/tazpkg Wed Jan 21 17:53:26 2015 +0200 26.3 @@ -2108,53 +2108,61 @@ 26.4 if [ ! -f "receipt" ]; then 26.5 _ 'Receipt is missing. Please read the documentation.' 26.6 exit 0 26.7 - else 26.8 - title 'Packing package "%s"' $PACKAGE 26.9 - # Create files.list with redirecting find outpout. 26.10 - action "Creating the list of files..." 26.11 - cd fs 26.12 - find . -type f -print > ../files.list 26.13 - find . -type l -print >> ../files.list 26.14 - cd .. && sed -i s/'^.'/''/ files.list 26.15 - status 26.16 - action 'Creating %s of files...' $CHECKSUM 26.17 - while read file; do 26.18 - [ -L "fs$file" ] && continue 26.19 - [ -f "fs$file" ] || continue 26.20 - case "$file" in 26.21 - /lib/modules/*/modules.*|*.pyc) continue;; 26.22 - esac 26.23 - $CHECKSUM "fs$file" | sed 's/ fs/ /' 26.24 - done < files.list > $CHECKSUM 26.25 - status 26.26 - UNPACKED_SIZE=$(du -chs fs receipt files.list $CHECKSUM \ 26.27 - description.txt 2> /dev/null | awk \ 26.28 - '{ sz=$1 } END { print sz }') 26.29 - # Build cpio archives. 26.30 - action "Compressing the FS..." 26.31 - find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si 26.32 - rm -rf fs 26.33 - status 26.34 - PACKED_SIZE=$(du -chs fs.cpio.lzma receipt files.list \ 26.35 - $CHECKSUM description.txt 2> /dev/null | awk \ 26.36 - '{ sz=$1 } END { print sz }') 26.37 - action "Updating receipt sizes..." 26.38 - sed -i s/^PACKED_SIZE.*$// receipt 26.39 - sed -i s/^UNPACKED_SIZE.*$// receipt 26.40 - sed -i "s/^PACKAGE=/PACKED_SIZE=\"$PACKED_SIZE\"\nUNPACKED_SIZE=\"$UNPACKED_SIZE\"\nPACKAGE=/" receipt 26.41 - status 26.42 - action "Creating full cpio archive..." 26.43 - find . -print | cpio -o -H newc --quiet > ../$PACKAGE.tazpkg 26.44 - status 26.45 - action "Restoring original package tree..." 26.46 - unlzma -c fs.cpio.lzma | cpio -idm --quiet 26.47 - status 26.48 - rm fs.cpio.lzma && cd .. 26.49 - footer "$(_ 'Package "%s" compressed successfully.' $PACKAGE)" 26.50 - pkg_size=$(du -sh $PACKAGE.tazpkg) 26.51 - _ 'Size: %s' $pkg_size 26.52 - newline 26.53 - fi ;; 26.54 + fi 26.55 + 26.56 + title 'Packing package "%s"' $PACKAGE 26.57 + # Create files.list with redirecting find outpout. 26.58 + 26.59 + action "Creating the list of files..." 26.60 + cd fs 26.61 + find . -type f -print > ../files.list 26.62 + find . -type l -print >> ../files.list 26.63 + cd .. && sed -i s/'^.'/''/ files.list 26.64 + status 26.65 + 26.66 + action 'Creating %s of files...' $CHECKSUM 26.67 + while read file; do 26.68 + [ -L "fs$file" ] && continue 26.69 + [ -f "fs$file" ] || continue 26.70 + case "$file" in 26.71 + /lib/modules/*/modules.*|*.pyc) continue;; 26.72 + esac 26.73 + $CHECKSUM "fs$file" | sed 's/ fs/ /' 26.74 + done < files.list > $CHECKSUM 26.75 + status 26.76 + 26.77 + UNPACKED_SIZE=$(du -chs fs receipt files.list $CHECKSUM \ 26.78 + description.txt 2> /dev/null | awk \ 26.79 + '{ sz=$1 } END { print sz }') 26.80 + # Build cpio archives. 26.81 + 26.82 + action "Compressing the FS..." 26.83 + find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si 26.84 + rm -rf fs 26.85 + status 26.86 + 26.87 + PACKED_SIZE=$(du -chs fs.cpio.lzma receipt files.list \ 26.88 + $CHECKSUM description.txt 2> /dev/null | awk \ 26.89 + '{ sz=$1 } END { print sz }') 26.90 + 26.91 + action "Updating receipt sizes..." 26.92 + sed -i s/^PACKED_SIZE.*$// receipt 26.93 + sed -i s/^UNPACKED_SIZE.*$// receipt 26.94 + sed -i "s/^PACKAGE=/PACKED_SIZE=\"$PACKED_SIZE\"\nUNPACKED_SIZE=\"$UNPACKED_SIZE\"\nPACKAGE=/" receipt 26.95 + status 26.96 + 26.97 + action "Creating full cpio archive..." 26.98 + find . -print | cpio -o -H newc --quiet > ../$PACKAGE.tazpkg 26.99 + status 26.100 + 26.101 + action "Restoring original package tree..." 26.102 + unlzma -c fs.cpio.lzma | cpio -idm --quiet 26.103 + status 26.104 + 26.105 + rm fs.cpio.lzma && cd .. 26.106 + footer "$(_ 'Package "%s" compressed successfully.' $PACKAGE)" 26.107 + _ 'Size: %s' "$(ls -lh $PACKAGE.tazpkg | awk '{print $5}')" 26.108 + ;; 26.109 26.110 26.111 recharge) 26.112 @@ -2197,7 +2205,7 @@ 26.113 base_path="$(basename $path)" 26.114 repository_name="$(_n 'Undigest %s' $base_path)" 26.115 fi 26.116 - _ 'Repository "%s" is up to date.' $repository_name 26.117 + _ 'Repository "%s" is up to date.' "$repository_name" 26.118 rm ID.bak 26.119 continue 26.120 fi 26.121 @@ -2299,7 +2307,7 @@ 26.122 emsg "<n>$(_ 'Package')<i 28> $(_ 'Version')<i 48> $(_ 'Status')<->" 26.123 26.124 cd $INSTALLED 26.125 - newline > $UP_LIST 26.126 + echo -n > $UP_LIST 26.127 blocked_count=0 26.128 installed_sum=$PKGS_DB/installed.$SUM 26.129