mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
David Oberhollenzer
882ce4a8f4
- All linux packages generate "linux" and "linux-modules" - Preference mechanism is used to select the right source package - Rootfs depends on "linux-modules" to install the selected kernels modules into the squashfs image - The release pacakge depends on "linux" to install the appropriate kernel to the boot partition Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
42 lines
1.2 KiB
Text
Executable file
42 lines
1.2 KiB
Text
Executable file
DEPENDS=$(cat_file_merge "ROOTFS" | sort -u)
|
|
|
|
build() {
|
|
# generate pseudo file listing for squashfs
|
|
pkg install -l sqfs -R "$REPODIR" -r "$TCDIR/$TARGET" $DEPENDS |\
|
|
sort -u > "$PKGDEPLOYDIR/pseudo"
|
|
|
|
# move configuration to preserve directory
|
|
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
|
|
|
|
echo <<_EOF >> "$PKGDEPLOYDIR/pseudo"
|
|
cfg m 755 0 0
|
|
cfg/preserve m 755 0 0
|
|
cfg/preserve/etc m 755 0 0
|
|
cfg/preserve/usr m 755 0 0
|
|
cfg/preserve/var_lib m 755 0 0
|
|
cfg/overlay m 755 0 0
|
|
_EOF
|
|
|
|
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"
|
|
|
|
mkdir -p $TCDIR/$TARGET/{etc,var,usr}
|
|
|
|
sed -i 's#etc/#cfg/preserve/etc/#g' "$PKGDEPLOYDIR/pseudo"
|
|
sed -i 's#var/lib/#cfg/preserve/var_lib/#g' "$PKGDEPLOYDIR/pseudo"
|
|
sed -i 's#usr/#cfg/preserve/usr/#g' "$PKGDEPLOYDIR/pseudo"
|
|
}
|
|
|
|
deploy() {
|
|
mksquashfs "$TCDIR/$TARGET" "$PKGDEPLOYDIR/rootfs.img" -comp xz \
|
|
-no-progress -no-xattrs -pf "$PKGDEPLOYDIR/pseudo"
|
|
|
|
rm "$PKGDEPLOYDIR/pseudo"
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
}
|
|
|
|
check_update() {
|
|
return
|
|
}
|