2018-02-20 21:30:34 +01:00
|
|
|
DEPENDS=$(cat_file_merge "ROOTFS" | sort -u)
|
2018-01-24 12:52:41 +01:00
|
|
|
|
2018-01-16 17:44:43 +01:00
|
|
|
build() {
|
2019-04-18 12:42:11 +02:00
|
|
|
local listing="$PKGDEPLOYDIR/$PKGNAME.files"
|
|
|
|
local desc="$PKGDEPLOYDIR/$PKGNAME.desc"
|
|
|
|
|
|
|
|
# generate package description and file listing
|
2019-06-10 15:16:41 +02:00
|
|
|
pkg install -l pkg -r "$TCDIR/$TARGET" $DEPENDS | sort -u > "$listing"
|
2019-04-18 12:42:11 +02:00
|
|
|
touch "$desc"
|
2018-01-18 14:23:48 +01:00
|
|
|
|
2018-04-19 07:23:15 +02:00
|
|
|
# move configuration to preserve directory
|
2019-03-07 08:38:16 +01:00
|
|
|
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
|
2019-03-07 08:23:09 +01:00
|
|
|
|
|
|
|
mv "$TCDIR/$TARGET/etc" "$TCDIR/$TARGET/cfg/preserve/etc"
|
|
|
|
mv "$TCDIR/$TARGET/usr" "$TCDIR/$TARGET/cfg/preserve/usr"
|
|
|
|
mv "$TCDIR/$TARGET/var/lib" "$TCDIR/$TARGET/cfg/preserve/var_lib"
|
|
|
|
rm -rf "$TCDIR/$TARGET/var"
|
2018-01-23 16:34:33 +01:00
|
|
|
|
2019-04-18 12:42:11 +02:00
|
|
|
sed -i 's#etc/#cfg/preserve/etc/#g' "$listing"
|
|
|
|
sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$listing"
|
|
|
|
sed -i 's#usr/#cfg/preserve/usr/#g' "$listing"
|
|
|
|
|
|
|
|
egrep -v "^(dir|file|slink) (var|etc|usr)" "$listing" > "./temp"
|
|
|
|
mv "./temp" "$listing"
|
|
|
|
|
|
|
|
cat <<_EOF >> "$listing"
|
|
|
|
dir etc 0755 0 0
|
|
|
|
dir var 0755 0 0
|
|
|
|
dir usr 0755 0 0
|
|
|
|
dir cfg 0755 0 0
|
|
|
|
dir cfg/preserve 0755 0 0
|
|
|
|
dir cfg/preserve/etc 0755 0 0
|
|
|
|
dir cfg/preserve/usr 0755 0 0
|
|
|
|
dir cfg/preserve/var_lib 0755 0 0
|
|
|
|
dir cfg/overlay 0755 0 0
|
|
|
|
_EOF
|
2018-01-16 17:44:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
deploy() {
|
2019-04-18 12:42:11 +02:00
|
|
|
return
|
2018-01-16 17:44:43 +01:00
|
|
|
}
|
2018-05-06 17:23:31 +02:00
|
|
|
|
|
|
|
check_update() {
|
|
|
|
return
|
2018-06-16 17:46:17 +02:00
|
|
|
}
|