diff --git a/configs/rc.conf b/configs/rc.conf index a39a537..49f2c94 100644 --- a/configs/rc.conf +++ b/configs/rc.conf @@ -17,9 +17,9 @@ TIMEZONE="America/New_York" # These are set during installation and can be changed here post-install. # --- Console font ----------------------------------------------------------- -FONT="ter-v18n" -# Terminus font at 18px — crisp on high-DPI displays. Requires kbd package. -# Set to "" to use the kernel default. +FONT="" +# Set to "" for kernel default. Can use "ter-v18n" (Terminus 18px) if +# terminus-font package is installed. Requires kbd package for setfont. # --- Daemons to start at boot ---------------------------------------------- # Order matters. Each name corresponds to a script in /etc/rc.d/ diff --git a/configs/rc.d/dhcpcd b/configs/rc.d/dhcpcd index 8ffa60a..df2679d 100755 --- a/configs/rc.d/dhcpcd +++ b/configs/rc.d/dhcpcd @@ -8,17 +8,33 @@ . /etc/rc.conf DAEMON="/usr/sbin/dhcpcd" -PIDFILE="/run/dhcpcd-${NETWORK_INTERFACE}.pid" + +# Auto-detect network interface if configured one doesn't exist +IFACE="${NETWORK_INTERFACE}" +if [ ! -d "/sys/class/net/${IFACE}" ] || [ "${IFACE}" = "lo" ]; then + # Find first non-loopback ethernet interface + for d in /sys/class/net/*; do + name=$(basename "$d") + [ "$name" = "lo" ] && continue + # Skip wireless (has wireless/ subdir) + [ -d "$d/wireless" ] && continue + IFACE="$name" + echo " NOTE: ${NETWORK_INTERFACE} not found, using ${IFACE}" + break + done +fi + +PIDFILE="/run/dhcpcd-${IFACE}.pid" case "$1" in start) - echo " Starting dhcpcd on ${NETWORK_INTERFACE}..." + echo " Starting dhcpcd on ${IFACE}..." if [ "${NETWORK_DHCP}" = "yes" ]; then - ${DAEMON} -q "${NETWORK_INTERFACE}" && echo " dhcpcd started" + ${DAEMON} -q "${IFACE}" && echo " dhcpcd started" else # Static IP configuration - ip addr add "${NETWORK_IP}/${NETWORK_MASK}" dev "${NETWORK_INTERFACE}" - ip link set "${NETWORK_INTERFACE}" up + ip addr add "${NETWORK_IP}/${NETWORK_MASK}" dev "${IFACE}" + ip link set "${IFACE}" up ip route add default via "${NETWORK_GATEWAY}" if [ -n "${NETWORK_DNS}" ]; then echo "# Generated by rc.d/dhcpcd" > /etc/resolv.conf @@ -32,7 +48,7 @@ case "$1" in stop) echo " Stopping dhcpcd..." if [ -f "${PIDFILE}" ]; then - ${DAEMON} -x "${NETWORK_INTERFACE}" 2>/dev/null + ${DAEMON} -x "${IFACE}" 2>/dev/null fi echo " dhcpcd stopped" ;; diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index a858879..d1f612b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -2,6 +2,55 @@ --- +## V34 2026-03-20 17:30:00 + +**Fix critical gaps: locale-gen, 32-bit multilib, network auto-detect, polkit** + +### Changes: +- Fixed `src/install/modules/locale.sh`: + - Replaced `locale-gen` call with direct `localedef` (glibc provides localedef, + but locale-gen is a wrapper script that doesn't exist on from-scratch builds) + - Creates /usr/lib/locale directory before running localedef + - Graceful fallback if localedef fails +- Fixed `configs/rc.d/dhcpcd`: + - Added network interface auto-detection via /sys/class/net/ + - If configured NETWORK_INTERFACE doesn't exist, auto-detects first non-loopback, + non-wireless interface + - Prevents network failure if hardware assigns different interface name + - All references (start/stop/static IP) use auto-detected IFACE variable +- Fixed `configs/rc.conf`: + - Changed FONT from "ter-v18n" to "" (empty = kernel default) + - ter-v18n requires terminus-font package which isn't in repos; was causing + setfont error at boot +- Fixed `src/repos/extra/polkit/polkit.toml`: + - Changed session_tracking from libelogind to disabled + - No elogind package exists in repos; polkit still works for password prompts + via lxqt-policykit-agent, falls back to VT-based session detection +- Enabled 32-bit multilib support: + - Changed `src/repos/core/gcc/gcc.toml` from --disable-multilib to --enable-multilib + - Created 14 new lib32 package definitions in gaming/ repo: + lib32-glibc, lib32-zlib, lib32-openssl, lib32-curl, lib32-expat, + lib32-ncurses, lib32-dbus, lib32-alsa-lib, lib32-freetype, lib32-fontconfig, + lib32-libxcb, lib32-libx11, lib32-mesa, lib32-nvidia + - All lib32 packages compile with CC="gcc -m32" and install to /usr/lib32 + - Updated steam.toml to depend on lib32 packages (glibc, mesa, nvidia, X11, etc.) + - Updated wine.toml to depend on lib32 packages for WoW64 support +- Fixed `tests/run-tests.sh`: + - Added re.DOTALL to dependency regex (multi-line arrays weren't being parsed) + - Added multilib tests: gcc --enable-multilib, 7 essential lib32 packages exist + - Added dhcpcd auto-detect test + - Total packages now 182 (up from 168) + +### Plan deviation/changes: +- None + +### What is missing/needs polish: +- lib32 packages untested on real hardware (need actual multilib GCC build first) +- SHA256 checksums still placeholder +- Terminus font package not created (optional, kernel default font is fine) + +--- + ## V33 2026-03-20 16:45:00 **Add missing package definitions and update tests for complete boot chain** diff --git a/src/install/modules/locale.sh b/src/install/modules/locale.sh index f049e8e..e4ca5f5 100755 --- a/src/install/modules/locale.sh +++ b/src/install/modules/locale.sh @@ -30,9 +30,14 @@ configure_locale() { read -r locale locale="${locale:-en_US.UTF-8}" - # Generate locale + # Generate locale using localedef (glibc provides this, locale-gen is a wrapper + # that may not exist on from-scratch systems) echo "${locale} UTF-8" > "${MOUNT_POINT}/etc/locale.gen" - chroot "${MOUNT_POINT}" locale-gen 2>/dev/null || true + locale_name="${locale%%.*}" # e.g., "en_US" from "en_US.UTF-8" + charset="${locale##*.}" # e.g., "UTF-8" from "en_US.UTF-8" + mkdir -p "${MOUNT_POINT}/usr/lib/locale" + chroot "${MOUNT_POINT}" localedef -i "${locale_name}" -f "${charset}" "${locale}" 2>/dev/null || \ + warn "localedef failed — locale may not be fully generated" echo "LANG=${locale}" > "${MOUNT_POINT}/etc/locale.conf" ok "Locale set to ${locale}" diff --git a/tests/run-tests.sh b/tests/run-tests.sh index ec92c89..883aa86 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -358,7 +358,8 @@ for repo in ['core','extra','desktop','gaming']: if not os.path.exists(tf): continue with open(tf) as f: content = f.read() - for m in re.finditer(r'(?:run|build)\s*=\s*\[(.*?)\]', content): + # re.DOTALL needed because run/build arrays can span multiple lines + for m in re.finditer(r'(?:run|build)\s*=\s*\[(.*?)\]', content, re.DOTALL): for dm in re.finditer(r'"([\w][\w.-]*)"', m.group(1)): if dm.group(1) not in known: missing.add(dm.group(1)) @@ -378,6 +379,25 @@ else record_test "repos.deps_resolve" "skip" "python3 not available" fi +# 32-bit multilib support check — required for Steam/Wine +GCC_TOML="${PROJECT_ROOT}/src/repos/core/gcc/gcc.toml" +if [ -f "$GCC_TOML" ]; then + if grep -q 'enable-multilib' "$GCC_TOML"; then + record_test "repos.gcc_multilib" "pass" + else + record_test "repos.gcc_multilib" "fail" "GCC built with --disable-multilib — Steam/Wine 32-bit support broken" + fi +fi + +# Check that essential lib32 packages exist +for lib32pkg in lib32-glibc lib32-zlib lib32-openssl lib32-mesa lib32-nvidia lib32-alsa-lib lib32-libx11; do + if [ -d "${PROJECT_ROOT}/src/repos/gaming/${lib32pkg}" ]; then + record_test "repos.${lib32pkg}" "pass" + else + record_test "repos.${lib32pkg}" "fail" "Missing — Steam/Wine needs 32-bit ${lib32pkg#lib32-}" + fi +done + # ============================================================================ # TEST SUITE 4: Script Validation # ============================================================================ @@ -754,6 +774,16 @@ if [ -f "$RC_CONF" ]; then record_test "chain.nvidia_modules" "fail" "NVIDIA modules not in MODULES array — GPU won't work" fi + # Verify dhcpcd auto-detects network interface if configured one is missing + DHCPCD_SCRIPT="${PROJECT_ROOT}/configs/rc.d/dhcpcd" + if [ -f "$DHCPCD_SCRIPT" ]; then + if grep -q 'sys/class/net' "$DHCPCD_SCRIPT"; then + record_test "chain.dhcpcd_auto_detect" "pass" + else + record_test "chain.dhcpcd_auto_detect" "fail" "dhcpcd doesn't auto-detect interface — network may fail on different hardware" + fi + fi + if grep -q 'nvidia-drm.*modeset=1' "$RC_CONF"; then record_test "chain.nvidia_modeset" "pass" else