mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Filesystem skeleton cleanup
- move all bash related files to bash package - don't clutter files in package directory, structure in directory hierarchy Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
dd394b0970
commit
63fc33657d
12 changed files with 8 additions and 19 deletions
|
@ -39,7 +39,5 @@ deploy() {
|
|||
mv "$DEPLOY/lib" "$DEVDEPLOY"
|
||||
mv "$DEPLOY/include" "$DEVDEPLOY"
|
||||
|
||||
mkdir -p "$DEPLOY/etc/"
|
||||
cp "$SCRIPTDIR/pkg/bash/bashrc" "$DEPLOY/etc/"
|
||||
cp "$SCRIPTDIR/pkg/bash/profile" "$DEPLOY/etc/"
|
||||
cp -r "$SCRIPTDIR/$PKGDIR/$PKGNAME/etc" "$DEPLOY"
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ build() {
|
|||
|
||||
# setup skeleton
|
||||
mkdir -pv ${BUILD}/{bin,lib,etc,dev,sys,proc,tmp,var,run}
|
||||
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt,root}
|
||||
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt}
|
||||
mkdir -pv ${BUILD}/cfg/{preserve,overlay}
|
||||
|
||||
echo "/lib" > "$BUILD/etc/ld-musl-${MUSL_CPU}.path"
|
||||
|
@ -16,21 +16,7 @@ build() {
|
|||
cat "$SCRIPTDIR/cfg/$CFG/LDPATH" >> "$BUILD/etc/ld-musl-${MUSL_CPU}.path"
|
||||
fi
|
||||
|
||||
chmod 750 "$BUILD/root"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/bash_profile" "$BUILD/root/.bash_profile"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/bashrc" "$BUILD/root/.bashrc"
|
||||
|
||||
mkdir -pv ${BUILD}/etc/skel
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/bash_profile" "$BUILD/etc/skel/.bash_profile"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/bashrc" "$BUILD/etc/skel/.bashrc"
|
||||
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/hostname" "$BUILD/etc/hostname"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/hosts" "$BUILD/etc/hosts"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/passwd" "$BUILD/etc/passwd"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/shadow" "$BUILD/etc/shadow"
|
||||
cp "$SCRIPTDIR/pkg/$PKGNAME/group" "$BUILD/etc/group"
|
||||
|
||||
ln -s /proc/self/mounts "$BUILD/etc/mtab"
|
||||
cp -r "$SCRIPTDIR/$PKGDIR/$PKGNAME/etc" "$BUILD"
|
||||
|
||||
# install packages to rootfs
|
||||
dependencies | tsort | tac | grep -v "$PKGNAME" > "$BUILD/etc/packages"
|
||||
|
@ -44,6 +30,10 @@ build() {
|
|||
cp -ru --remove-destination ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD"
|
||||
done < "$BUILD/etc/packages"
|
||||
|
||||
# setup root home directory
|
||||
cp -r "$BUILD/etc/skel" "$BUILD/root"
|
||||
chmod 750 "$BUILD/root"
|
||||
|
||||
# move configuration to preserve directory
|
||||
mv ${BUILD}/etc ${BUILD}/cfg/preserve
|
||||
mkdir -p ${BUILD}/etc
|
||||
|
|
1
pkg/rootfs/etc/mtab
Symbolic link
1
pkg/rootfs/etc/mtab
Symbolic link
|
@ -0,0 +1 @@
|
|||
/proc/self/mounts
|
Loading…
Reference in a new issue