base-files: this now creates dirs/symlinks in the rootfs.
This now effectively replaces base-directories.
This commit is contained in:
parent
0c6d83cede
commit
4e99177cf5
|
@ -1,81 +0,0 @@
|
|||
make_system_dirs()
|
||||
{
|
||||
#
|
||||
# Install FHS system directories.
|
||||
#
|
||||
for d in boot etc etc/modprobe.d etc/skel \
|
||||
home dev proc usr mnt opt sys media var run/lock; do
|
||||
[ ! -d ${d} ] && install -d ${d}
|
||||
done
|
||||
|
||||
[ ! -d root ] && install -dm750 root
|
||||
[ ! -d var/spool/mail ] && install -dm1777 var/spool/mail
|
||||
|
||||
for d in local local/bin local/sbin local/include local/lib \
|
||||
bin include lib src; do
|
||||
[ ! -d usr/${d} ] && install -d usr/${d}
|
||||
done
|
||||
|
||||
for d in locale misc terminfo zoneinfo doc info; do
|
||||
[ ! -d usr/share/${d} ] && install -d usr/share/${d}
|
||||
[ ! -d usr/local/share/${d} ] && install -d usr/local/share/${d}
|
||||
done
|
||||
|
||||
for d in 1 2 3 4 5 6 7 8; do
|
||||
[ ! -d usr/share/man/man${d} ] && \
|
||||
install -d usr/share/man/man${d}
|
||||
[ ! -d usr/local/share/man/man${d} ] && \
|
||||
install -d usr/local/share/man/man${d}
|
||||
done
|
||||
|
||||
# Create /bin, /sbin and /lib symlinks to /usr.
|
||||
for d in bin sbin lib; do
|
||||
if [ ! -h "$d" -a -d "$d" ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
ln -sf usr/${d} .
|
||||
done
|
||||
# Create /usr/sbin symlink to /usr/bin.
|
||||
[ ! -e usr/sbin ] && ln -sf bin usr/sbin
|
||||
|
||||
for d in empty log opt cache lib; do
|
||||
[ ! -d var/${d} ] && install -d var/${d}
|
||||
done
|
||||
|
||||
if [ "${ARCH}" = "x86_64" ]; then
|
||||
ln -sf usr/lib lib64
|
||||
cd usr && ln -sf lib lib64 && cd ..
|
||||
install -d usr/lib32
|
||||
ln -sf usr/lib32 lib32
|
||||
fi
|
||||
if [ "${ARCH}" = "i686" ]; then
|
||||
ln -sf lib lib32
|
||||
ln -sf lib usr/lib32
|
||||
fi
|
||||
|
||||
# Create /var/run and /var/lock symlinks.
|
||||
for d in run lock; do
|
||||
if [ ! -h "var/$d" -a -d var/${d} ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
cd var
|
||||
ln -sf ../run .
|
||||
ln -sf ../run/lock .
|
||||
ln -sf spool/mail mail
|
||||
cd ..
|
||||
|
||||
install -dm1777 tmp
|
||||
install -dm1777 var/tmp
|
||||
|
||||
}
|
||||
|
||||
case "${ACTION}" in
|
||||
pre|post)
|
||||
echo "Creating system directories/symlinks..."
|
||||
make_system_dirs
|
||||
;;
|
||||
esac
|
|
@ -1,11 +0,0 @@
|
|||
# Template file for 'base-directories'
|
||||
pkgname=base-directories
|
||||
version=0.34
|
||||
revision=1
|
||||
noarch=yes
|
||||
bootstrap=yes
|
||||
build_style=meta
|
||||
short_desc="Void Linux base system directories/symlinks"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.voidlinux.eu"
|
||||
license="Public domain"
|
|
@ -1,6 +1,86 @@
|
|||
# This script enables shadow password and groups.
|
||||
case "$ACTION" in
|
||||
make_system_dirs() {
|
||||
#
|
||||
# Install FHS system directories.
|
||||
#
|
||||
for d in boot etc etc/modprobe.d etc/skel \
|
||||
home dev proc usr mnt opt sys media var run/lock; do
|
||||
[ ! -d ${d} ] && install -d ${d}
|
||||
done
|
||||
|
||||
[ ! -d root ] && install -dm750 root
|
||||
[ ! -d var/spool/mail ] && install -dm1777 var/spool/mail
|
||||
|
||||
for d in local local/bin local/sbin local/include local/lib \
|
||||
bin include lib src; do
|
||||
[ ! -d usr/${d} ] && install -d usr/${d}
|
||||
done
|
||||
|
||||
for d in locale misc terminfo zoneinfo doc info; do
|
||||
[ ! -d usr/share/${d} ] && install -d usr/share/${d}
|
||||
[ ! -d usr/local/share/${d} ] && install -d usr/local/share/${d}
|
||||
done
|
||||
|
||||
for d in 1 2 3 4 5 6 7 8; do
|
||||
[ ! -d usr/share/man/man${d} ] && \
|
||||
install -d usr/share/man/man${d}
|
||||
[ ! -d usr/local/share/man/man${d} ] && \
|
||||
install -d usr/local/share/man/man${d}
|
||||
done
|
||||
|
||||
# Create /bin, /sbin and /lib symlinks to /usr.
|
||||
for d in bin sbin lib; do
|
||||
if [ ! -h "$d" -a -d "$d" ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
ln -sf usr/${d} .
|
||||
done
|
||||
# Create /usr/sbin symlink to /usr/bin.
|
||||
[ ! -e usr/sbin ] && ln -sf bin usr/sbin
|
||||
|
||||
for d in empty log opt cache lib; do
|
||||
[ ! -d var/${d} ] && install -d var/${d}
|
||||
done
|
||||
|
||||
if [ "${ARCH}" = "x86_64" ]; then
|
||||
ln -sf usr/lib lib64
|
||||
cd usr && ln -sf lib lib64 && cd ..
|
||||
install -d usr/lib32
|
||||
ln -sf usr/lib32 lib32
|
||||
fi
|
||||
if [ "${ARCH}" = "i686" ]; then
|
||||
ln -sf lib lib32
|
||||
ln -sf lib usr/lib32
|
||||
fi
|
||||
|
||||
# Create /var/run and /var/lock symlinks.
|
||||
for d in run lock; do
|
||||
if [ ! -h "var/$d" -a -d var/${d} ]; then
|
||||
echo "/${d} must not be a directory, exiting!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
cd var
|
||||
ln -sf ../run .
|
||||
ln -sf ../run/lock .
|
||||
ln -sf spool/mail mail
|
||||
cd ..
|
||||
|
||||
install -dm1777 tmp
|
||||
install -dm1777 var/tmp
|
||||
|
||||
}
|
||||
|
||||
case "${ACTION}" in
|
||||
pre)
|
||||
echo "Creating system directories/symlinks..."
|
||||
make_system_dirs
|
||||
;;
|
||||
post)
|
||||
echo "Creating system directories/symlinks..."
|
||||
make_system_dirs
|
||||
# Enable shadow passwd/groups.
|
||||
if [ -x bin/pwconv && -x bin/grpconv -a "$(id -u)" -eq 0 ]; then
|
||||
pwconv && grpconv
|
||||
fi
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# Template file for 'base-files'
|
||||
pkgname=base-files
|
||||
version=0.125
|
||||
version=0.126
|
||||
revision=1
|
||||
bootstrap=yes
|
||||
depends="base-directories xbps-triggers"
|
||||
depends="xbps-triggers"
|
||||
short_desc="Void Linux base system files"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
homepage="http://www.voidlinux.eu"
|
||||
|
@ -25,6 +25,7 @@ conf_files="
|
|||
/etc/crypttab
|
||||
/etc/nsswitch.conf"
|
||||
|
||||
replaces="base-directories>=0"
|
||||
# New system groups
|
||||
system_groups="kvm:24"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'cross-vpkg-dummy'
|
||||
pkgname=cross-vpkg-dummy
|
||||
version=0.20
|
||||
version=0.21
|
||||
revision=1
|
||||
build_style=meta
|
||||
short_desc="Dummy meta-pkg for cross building packages with xbps-src"
|
||||
|
@ -8,7 +8,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|||
license="Public domain"
|
||||
homepage="http://www.voidlinux.eu"
|
||||
|
||||
depends="base-directories xbps-triggers"
|
||||
depends="base-files>=0.126"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) depends+=" musl-legacy-compat";;
|
||||
|
|
Loading…
Reference in New Issue