mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-03 13:12:15 +00:00
abuild: extend fhs check
This commit is contained in:
parent
ec11f495cd
commit
08d2d81587
15
abuild.in
15
abuild.in
@ -781,15 +781,18 @@ targz() {
|
||||
}
|
||||
|
||||
postcheck() {
|
||||
local dir="$1" name="$2" i= e=0
|
||||
local dir="$1" name="$2" i= j= e=0
|
||||
msg "Running postcheck for $name"
|
||||
# checking for FHS compat
|
||||
if ! options_has "!fhs"; then
|
||||
for i in "$dir"/srv/* "$dir"/usr/local/* "$dir"/opt/*; do
|
||||
if [ -e "$i" ]; then
|
||||
error "Packages must not put anything under /srv, /usr/local or /opt"
|
||||
e=1
|
||||
fi
|
||||
for i in srv usr/local opt run var/run tmp var/tmp var/lock var/empty home sys proc mnt dev; do
|
||||
for j in "$dir"/"$i"/* "$dir"/"$i"/.[!.]* "$dir"/"$i"/..?*; do
|
||||
if [ -L "$j" ] || [ -e "$j" ]; then
|
||||
error "Packages must not put anything under /$i"
|
||||
e=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [ -d "$dir"/usr/var ]; then
|
||||
error "Found /usr/var, localstatedir is most likely wrong"
|
||||
|
Loading…
Reference in New Issue
Block a user