1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +01:00

cleanup: remove /usr/root setup from rootfs package

Add root home directory to basefiles, make every package that
touches /etc/skel also provide defaults for root home.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-07 08:38:16 +01:00
parent 26a9b8002f
commit 31ca494ce8
5 changed files with 8 additions and 16 deletions

View file

@ -15,6 +15,7 @@ dir etc/profile.d 0755 0 0
dir etc/skel 0755 0 0 dir etc/skel 0755 0 0
dir var/lib 0755 0 0 dir var/lib 0755 0 0
dir lib/libexec 0755 0 0 dir lib/libexec 0755 0 0
dir usr/root 0700 0 0
slink etc/mtab 0777 0 0 /proc/self/mounts slink etc/mtab 0777 0 0 /proc/self/mounts
file etc/group 0644 0 0 file etc/group 0644 0 0
file etc/hostname 0644 0 0 file etc/hostname 0644 0 0

View file

@ -1,2 +1,2 @@
name bash name bash
requires ncurses readline crt requires ncurses readline crt basefiles

View file

@ -1,9 +1,8 @@
dir bin 0755 0 0
dir etc 0755 0 0
dir etc/skel 0755 0 0
file bin/bash 0755 0 0 file bin/bash 0755 0 0
file etc/bashrc 0644 0 0 file etc/bashrc 0644 0 0
file etc/profile 0644 0 0 file etc/profile 0644 0 0
file etc/skel/.bashrc 0644 0 0 file etc/skel/.bashrc 0644 0 0
file etc/skel/.bash_profile 0644 0 0 file etc/skel/.bash_profile 0644 0 0
file usr/root/.bashrc 0644 0 0
file usr/root/.bash_profile 0644 0 0
slink bin/sh 0777 0 0 bash slink bin/sh 0777 0 0 bash

View file

@ -3,7 +3,7 @@ SRCDIR="bash-${VERSION}"
TARBALL="${SRCDIR}.tar.gz" TARBALL="${SRCDIR}.tar.gz"
URL="https://ftp.gnu.org/gnu/bash/" URL="https://ftp.gnu.org/gnu/bash/"
SHA256SUM="b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d" SHA256SUM="b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d"
DEPENDS="ncurses-dev readline-dev crt-dev" DEPENDS="ncurses-dev readline-dev crt-dev basefiles"
SUBPKG="bash bash-dev" SUBPKG="bash bash-dev"
prepare() { prepare() {
@ -19,7 +19,9 @@ build() {
deploy() { deploy() {
make DESTDIR="$PKGDEPLOYDIR" install make DESTDIR="$PKGDEPLOYDIR" install
mkdir -p "$PKGDEPLOYDIR/usr"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGDEPLOYDIR" cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGDEPLOYDIR"
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc/skel" "$PKGDEPLOYDIR/usr/root"
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR" cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
} }

View file

@ -5,18 +5,8 @@ build() {
pkg install -l -R "$REPODIR" -r "$TCDIR/$TARGET" \ pkg install -l -R "$REPODIR" -r "$TCDIR/$TARGET" \
-F sqfs $DEPENDS | sort -u > "$PKGDEPLOYDIR/pseudo" -F sqfs $DEPENDS | sort -u > "$PKGDEPLOYDIR/pseudo"
# setup root home directory
cp -r "$TCDIR/$TARGET/etc/skel" "$TCDIR/$TARGET/usr/root"
echo "usr/root m 700 0 0" >> "$PKGDEPLOYDIR/pseudo"
find "$TCDIR/$TARGET/usr/root" \
-exec stat {} --printf="%n m %a 0 0\\n" \; | \
sed 's#^$TCDIR/$TARGET/##g' | tail -n +2 >> "$PKGDEPLOYDIR/pseudo"
# move configuration to preserve directory # move configuration to preserve directory
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
mkdir -pv "$TCDIR/$TARGET/cfg/overlay"
echo <<_EOF >> "$PKGDEPLOYDIR/pseudo" echo <<_EOF >> "$PKGDEPLOYDIR/pseudo"
cfg m 755 0 0 cfg m 755 0 0