mirror of
https://github.com/pygos/build.git
synced 2024-12-23 23:50:51 +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:
parent
26a9b8002f
commit
31ca494ce8
5 changed files with 8 additions and 16 deletions
|
@ -15,6 +15,7 @@ dir etc/profile.d 0755 0 0
|
|||
dir etc/skel 0755 0 0
|
||||
dir var/lib 0755 0 0
|
||||
dir lib/libexec 0755 0 0
|
||||
dir usr/root 0700 0 0
|
||||
slink etc/mtab 0777 0 0 /proc/self/mounts
|
||||
file etc/group 0644 0 0
|
||||
file etc/hostname 0644 0 0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
name bash
|
||||
requires ncurses readline crt
|
||||
requires ncurses readline crt basefiles
|
||||
|
|
|
@ -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 etc/bashrc 0644 0 0
|
||||
file etc/profile 0644 0 0
|
||||
file etc/skel/.bashrc 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
|
||||
|
|
|
@ -3,7 +3,7 @@ SRCDIR="bash-${VERSION}"
|
|||
TARBALL="${SRCDIR}.tar.gz"
|
||||
URL="https://ftp.gnu.org/gnu/bash/"
|
||||
SHA256SUM="b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d"
|
||||
DEPENDS="ncurses-dev readline-dev crt-dev"
|
||||
DEPENDS="ncurses-dev readline-dev crt-dev basefiles"
|
||||
SUBPKG="bash bash-dev"
|
||||
|
||||
prepare() {
|
||||
|
@ -19,7 +19,9 @@ build() {
|
|||
deploy() {
|
||||
make DESTDIR="$PKGDEPLOYDIR" install
|
||||
|
||||
mkdir -p "$PKGDEPLOYDIR/usr"
|
||||
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc" "$PKGDEPLOYDIR"
|
||||
cp -r "$SCRIPTDIR/pkg/$PKGNAME/etc/skel" "$PKGDEPLOYDIR/usr/root"
|
||||
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
||||
}
|
||||
|
||||
|
|
|
@ -5,18 +5,8 @@ build() {
|
|||
pkg install -l -R "$REPODIR" -r "$TCDIR/$TARGET" \
|
||||
-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
|
||||
mkdir -pv "$TCDIR/$TARGET/cfg/preserve"
|
||||
mkdir -pv "$TCDIR/$TARGET/cfg/overlay"
|
||||
mkdir -pv "$TCDIR/$TARGET/cfg/preserve" "$TCDIR/$TARGET/cfg/overlay"
|
||||
|
||||
echo <<_EOF >> "$PKGDEPLOYDIR/pseudo"
|
||||
cfg m 755 0 0
|
||||
|
|
Loading…
Reference in a new issue