cookutils view modules/qa @ rev 899

Some important changes:
* cook: better die handling; cook can now mark packages as broken by itself; less chatty zip extracting; rename internal function copy() to scopy(); new copy() is the main tool to copy files from $install to $fs (docs to come); automatic patching (if patches are in $stuff/patches and patch list is $stuff/patches/series); better local packages handling; update packages.info database after each successful build, virtual packages are accessible immediately after build.
* doc/cookopts.txt: added "!perlz" and "!rmpod" options description.
* modules/compressor: strip Perl files.
* modules/pkgdb: calculate estimated time for cook:pkgdb too (as well as for cook:package).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 11 00:36:43 2017 +0300 (2017-05-11)
parents
children
line source
1 #!/bin/sh
2 #
3 # qa - module of the SliTaz Cook
4 # Copyright (C) SliTaz GNU/Linux - GNU GPL v3
5 #
7 . /usr/lib/slitaz/libcook.sh
10 result() {
11 # using external $rule, $check
12 [ -n "$check" ] || return
13 echo "$rule:"
14 echo "$check" | awk '{printf(" %s\n", $0)}'
15 echo
16 }
18 # FHS: http://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html
20 # FHS 3.16.2
21 rule='Subdirectories in /sbin'
22 check="$(find $root/sbin -mindepth 1 -type d 2>/dev/null | sed "s|^$root||")"
23 result
25 # FHS 4.2, 4.3
26 rule='Non-standard directories in /usr'
27 check="$(ls $root/usr 2>/dev/null | sed '/^bin$/d; /^lib$/d; /^local$/d; /^sbin$/d; /^share$/d; /^games$/d; /^include$/d; /^libexec$/d; /^lib[0-9][0-9]*$/d; /^src$/d' | sed 's|^|/usr/|')"
28 result
30 # FHS 4.4.2
31 rule='Subdirectories in /usr/bin'
32 check="$(find $root/usr/bin -mindepth 1 -type d 2>/dev/null | sed "s|^$root||")"
33 result
35 # FHS 4.9.1
36 rule='Using /usr/local for system packages'
37 check="$(ls -d $root/usr/local 2>/dev/null | sed "s|^$root||")"
38 result
40 # FHS 4.10.2
41 rule='Subdirectories in /usr/sbin'
42 check="$(find $root/usr/sbin -mindepth 1 -type d 2>/dev/null | sed "s|^$root||")"
43 result
47 exit 0
49 echo 'Check extra folders'
51 for i in /bin /sbin /usr/bin /usr/sbin; do
52 find $i -mindepth 1 -type d
53 done
56 echo 'Check bad folders'
58 for i in /usr/etc /usr/man; do
59 find $i -type d -maxdepth 0
60 done
63 echo ''
66 case dir in
67 bin) user='root'; maskf='+022'; maskd='+777';;
68 etc/init.d) user='root'; maskf='!755'
69 etc) user='root'; maskf='+133'; permd='';;
70 /usr/share/applications) find /usr/share/applications -maxdepth 1 \( -type d -o ! -user root -o ! -perm 644 \) -exec ls -land {} \;
71 esac