mirror of
https://github.com/pygos/build.git
synced 2024-11-05 11:37:10 +01:00
David Oberhollenzer
5bc2523af5
This commit overhauls the rootfs package to create a regular package for the root filesystem instead of creating a packaged squashfs. The release packages then use pkg2sqfs to turn it into a squashfs image. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
47 lines
1.1 KiB
Text
Executable file
47 lines
1.1 KiB
Text
Executable file
DEPENDS=$(cat_file_merge "ROOTFS" | sort -u)
|
|
|
|
build() {
|
|
local listing="$PKGDEPLOYDIR/$PKGNAME.files"
|
|
local desc="$PKGDEPLOYDIR/$PKGNAME.desc"
|
|
|
|
# generate package description and file listing
|
|
pkg install -l pkg -R "$REPODIR" -r "$TCDIR/$TARGET" $DEPENDS |\
|
|
sort -u > "$listing"
|
|
|
|
touch "$desc"
|
|
|
|
# move configuration to preserve directory
|
|
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
|
|
|
|
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"
|
|
|
|
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
|
|
}
|
|
|
|
deploy() {
|
|
return
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
}
|