mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-05 14:20:45 +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() {
|
postcheck() {
|
||||||
local dir="$1" name="$2" i= e=0
|
local dir="$1" name="$2" i= j= e=0
|
||||||
msg "Running postcheck for $name"
|
msg "Running postcheck for $name"
|
||||||
# checking for FHS compat
|
# checking for FHS compat
|
||||||
if ! options_has "!fhs"; then
|
if ! options_has "!fhs"; then
|
||||||
for i in "$dir"/srv/* "$dir"/usr/local/* "$dir"/opt/*; do
|
for i in srv usr/local opt run var/run tmp var/tmp var/lock var/empty home sys proc mnt dev; do
|
||||||
if [ -e "$i" ]; then
|
for j in "$dir"/"$i"/* "$dir"/"$i"/.[!.]* "$dir"/"$i"/..?*; do
|
||||||
error "Packages must not put anything under /srv, /usr/local or /opt"
|
if [ -L "$j" ] || [ -e "$j" ]; then
|
||||||
e=1
|
error "Packages must not put anything under /$i"
|
||||||
fi
|
e=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
if [ -d "$dir"/usr/var ]; then
|
if [ -d "$dir"/usr/var ]; then
|
||||||
error "Found /usr/var, localstatedir is most likely wrong"
|
error "Found /usr/var, localstatedir is most likely wrong"
|
||||||
|
Loading…
Reference in New Issue
Block a user