Initial commit

This commit is contained in:
2026-03-21 12:43:00 -05:00
commit 83bf16823c
438 changed files with 33617 additions and 0 deletions
+271
View File
@@ -0,0 +1,271 @@
#!/bin/sh
# Base filesystem package build script - creates merged-/usr directory structure
set -eu
: "${DESTDIR:?DESTDIR is not set}"
# Canonical merged-/usr directories
mkdir -p \
"$DESTDIR/usr/bin" \
"$DESTDIR/usr/lib" \
"$DESTDIR/usr/lib32" \
"$DESTDIR/usr/include" \
"$DESTDIR/usr/share/man" \
"$DESTDIR/usr/share/info" \
"$DESTDIR/etc" \
"$DESTDIR/var" \
"$DESTDIR/tmp" \
"$DESTDIR/home" \
"$DESTDIR/root" \
"$DESTDIR/run" \
"$DESTDIR/dev" \
"$DESTDIR/mnt" \
"$DESTDIR/proc" \
"$DESTDIR/sys" \
"$DESTDIR/opt" \
"$DESTDIR/srv" \
"$DESTDIR/boot"
# Common optional dirs (safe to have even if empty)
mkdir -p \
"$DESTDIR/usr/share" \
"$DESTDIR/usr/libexec" \
"$DESTDIR/usr/local" \
"$DESTDIR/etc/profile.d" \
"$DESTDIR/etc/skel" \
"$DESTDIR/var/cache" \
"$DESTDIR/var/lib/misc" \
"$DESTDIR/var/log/old" \
"$DESTDIR/var/empty" \
"$DESTDIR/var/local" \
"$DESTDIR/var/opt" \
"$DESTDIR/var/tmp" \
"$DESTDIR/var/spool/mail" \
"$DESTDIR/usr/src" \
"$DESTDIR/usr/share/misc" \
"$DESTDIR/usr/share/pixmaps" \
"$DESTDIR/usr/share/factory/etc"
chown 0:0 \
"$DESTDIR/boot" \
"$DESTDIR/dev" \
"$DESTDIR/etc" \
"$DESTDIR/etc/profile.d" \
"$DESTDIR/etc/skel" \
"$DESTDIR/home" \
"$DESTDIR/mnt" \
"$DESTDIR/opt" \
"$DESTDIR/proc" \
"$DESTDIR/root" \
"$DESTDIR/run" \
"$DESTDIR/srv" \
"$DESTDIR/sys" \
"$DESTDIR/tmp" \
"$DESTDIR/usr" \
"$DESTDIR/usr/bin" \
"$DESTDIR/usr/include" \
"$DESTDIR/usr/lib" \
"$DESTDIR/usr/lib32" \
"$DESTDIR/usr/libexec" \
"$DESTDIR/usr/local" \
"$DESTDIR/usr/share" \
"$DESTDIR/usr/share/man" \
"$DESTDIR/usr/share/info" \
"$DESTDIR/usr/share/misc" \
"$DESTDIR/usr/share/pixmaps" \
"$DESTDIR/usr/share/factory/etc" \
"$DESTDIR/usr/src" \
"$DESTDIR/var" \
"$DESTDIR/var/cache" \
"$DESTDIR/var/empty" \
"$DESTDIR/var/lib/misc" \
"$DESTDIR/var/local" \
"$DESTDIR/var/log/old" \
"$DESTDIR/var/opt" \
"$DESTDIR/var/spool/mail" \
"$DESTDIR/var/tmp"
chmod 0755 \
"$DESTDIR/boot" \
"$DESTDIR/dev" \
"$DESTDIR/etc" \
"$DESTDIR/etc/profile.d" \
"$DESTDIR/etc/skel" \
"$DESTDIR/home" \
"$DESTDIR/mnt" \
"$DESTDIR/opt" \
"$DESTDIR/run" \
"$DESTDIR/srv" \
"$DESTDIR/usr" \
"$DESTDIR/usr/bin" \
"$DESTDIR/usr/include" \
"$DESTDIR/usr/lib" \
"$DESTDIR/usr/libexec" \
"$DESTDIR/usr/local" \
"$DESTDIR/usr/share" \
"$DESTDIR/usr/share/man" \
"$DESTDIR/usr/share/info" \
"$DESTDIR/usr/share/misc" \
"$DESTDIR/usr/share/pixmaps" \
"$DESTDIR/usr/share/factory/etc" \
"$DESTDIR/usr/src" \
"$DESTDIR/var" \
"$DESTDIR/var/cache" \
"$DESTDIR/var/empty" \
"$DESTDIR/var/lib/misc" \
"$DESTDIR/var/local" \
"$DESTDIR/var/log/old" \
"$DESTDIR/var/opt"
chmod 0555 "$DESTDIR/proc" "$DESTDIR/sys"
chmod 0750 "$DESTDIR/root"
chmod 1777 "$DESTDIR/tmp" "$DESTDIR/var/tmp" "$DESTDIR/var/spool/mail"
# Compatibility: make legacy top-level dirs point into /usr
# /bin -> /usr/bin
# /sbin -> /usr/bin (merged "one thing" behavior)
# /lib -> /usr/lib
if [ ! -e "$DESTDIR/bin" ]; then
ln -s usr/bin "$DESTDIR/bin"
fi
if [ ! -e "$DESTDIR/sbin" ]; then
ln -s usr/bin "$DESTDIR/sbin"
fi
if [ ! -e "$DESTDIR/lib" ]; then
ln -s usr/lib "$DESTDIR/lib"
fi
if [ ! -e "$DESTDIR/lib64" ]; then
ln -s usr/lib "$DESTDIR/lib64"
fi
if [ ! -e "$DESTDIR/usr/sbin" ]; then
ln -s bin "$DESTDIR/usr/sbin"
fi
# Default PATH for login shells
cat > "$DESTDIR/etc/profile.d/00-path.sh" <<'EOF'
# Default PATH for interactive shells
export PATH=/usr/bin:/usr/sbin:$PATH
EOF
# /etc/profile entrypoint to load profile.d snippets
cat > "$DESTDIR/etc/profile" <<'EOF'
# System-wide profile
for f in /etc/profile.d/*.sh; do
[ -r "$f" ] && . "$f"
done
EOF
# Non-login interactive shells (bash reads this if enabled by the distro)
cat > "$DESTDIR/etc/bash.bashrc" <<'EOF'
# System-wide bashrc
for f in /etc/profile.d/*.sh; do
[ -r "$f" ] && . "$f"
done
EOF
cat > "$DESTDIR/etc/os-release" <<'EOF'
NAME="Vertex Linux"
ID=vertex
PRETTY_NAME="Vertex Linux 1.0 (Parallel Panther)"
VERSION="1.0 (Parallel Panther)"
VERSION_ID="1.0"
VERSION_CODENAME=parallel_panther
BUILD_ID=1.0
HOME_URL="https://www.vertexlinux.net"
SUPPORT_URL="https://www.vertexlinux.net"
BUG_REPORT_URL="https://www.vertexlinux.net"
ANSI_COLOR="1;35"
EOF
cat > "$DESTDIR/etc/lsb-release" <<'EOF'
DISTRIB_ID=VertexLinux
DISTRIB_RELEASE=1.0
DISTRIB_CODENAME=parallel_panther
DISTRIB_DESCRIPTION="Vertex Linux 1.0 (Parallel Panther)"
DISTRIB_URL="https://vertexlinux.net"
EOF
cat > "$DESTDIR/etc/passwd" << 'EOF'
root:x:0:0:root:/root:/bin/zsh
bin:x:1:1:bin:/dev/null:/usr/bin/false
daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false
messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false
uucp:x:14:14:UUCP User:/dev/null:/usr/bin/false
uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false
nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false
EOF
cat > "$DESTDIR/etc/shadow" << 'EOF'
root:*:14871::::::
EOF
cat > "$DESTDIR/etc/shells" << 'EOF'
# Pathnames of valid login shells.
# See shells(5) for details.
/bin/sh
/bin/dash
/usr/bin/sh
/usr/bin/dash
EOF
cat > "$DESTDIR/etc/group" << 'EOF'
root:x:0:
bin:x:1:daemon
sys:x:2:
kmem:x:3:
tape:x:4:
tty:x:5:
daemon:x:6:
floppy:x:7:
disk:x:8:
lp:x:9:
dialout:x:10:
audio:x:11:
video:x:12:
utmp:x:13:
clock:x:14:
cdrom:x:15:
adm:x:16:
messagebus:x:18:
uucp:x:19:
input:x:24:
mail:x:34:
kvm:x:61:
uuidd:x:80:
wheel:x:97:
users:x:999:
nogroup:x:65534:
EOF
cat > "$DESTDIR/etc/hosts" << 'EOF'
# Static table lookup for hostnames.
# See hosts(5) for details.
127.0.0.1 localhost
::1 localhost
EOF
cat > "$DESTDIR/etc/issue" << 'EOF'
\S{PRETTY_NAME} \r (\l)
EOF
cat > "$DESTDIR/etc/fstab" << 'EOF'
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
EOF
cat > "$DESTDIR/etc/resolv.conf" << 'EOF'
# Resolver configuration file.
# See resolv.conf(5) for details.
EOF
ln -sv usr/lib32 "$DESTDIR/lib32"
echo "Merged-/usr filesystem directory structure created."
+16
View File
@@ -0,0 +1,16 @@
[package]
name = "filesystem"
version = "1.0.1"
description = "FHS-compliant base directory structure for Vertex Linux"
homepage = "https://gitlab.com/vertex-linux"
license = "Unlicense"
revision = 3
[[manual_sources]]
file = "build.sh"
[build]
type = "custom"
[build.flags]
keep = [ "etc/**" ]