Started shifting to a GNU userspace

This commit is contained in:
Alexander Hill 2026-01-04 23:20:23 -05:00
parent 389fdcc5ec
commit c496159c26
16 changed files with 190 additions and 35 deletions

View File

@ -1,6 +1,6 @@
ISC License ISC License
Copyright (c) 2024-2025 Alexander Hill, Nicholas McDaniel, and Maple Linux Contributors Copyright (c) 2024-2026 Alexander Hill, Nicholas McDaniel, and Maple Linux Contributors
Permission to use, copy, modify, and/or distribute this software for any Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above purpose with or without fee is hereby granted, provided that the above

View File

@ -14,10 +14,12 @@ Definitions:
| `chrony` | | `chrony` |
| `cmake` | Yes | Yes | | `cmake` | Yes | Yes |
| `coreutils` | | `coreutils` |
| `dash` |
| `dhcpcd` | | `dhcpcd` |
| `diffutils` | | `diffutils` |
| `findutils` | | `findutils` |
| `flex` | Yes | Yes | | `flex` | Yes | Yes |
| `fortune-mod` |
| `gettext` | | `gettext` |
| `grep` | | `grep` |
| `groff` | Yes | Yes | | `groff` | Yes | Yes |
@ -53,6 +55,8 @@ Definitions:
| `sed` | | `sed` |
| `shadow` | | `shadow` |
| `tar` | | `tar` |
| `texinfo` |
| `xlibre-xserver` |
| `xz` | Yes | Yes | | `xz` | Yes | Yes |
| `zlib` | Yes | Yes | | `zlib` | Yes | Yes |
| `zsh` | | `zsh` |

View File

@ -35,10 +35,8 @@ $TREETAP fetch sources/llvm/llvm.spec
$TREETAP fetch sources/musl/musl.spec $TREETAP fetch sources/musl/musl.spec
# Make sure both clang-tblgen and llvm-tblgen are in the PATH. ~ahill # Make sure both clang-tblgen and llvm-tblgen are in the PATH. ~ahill
which clang-tblgen > /dev/null [ -z "$(which clang-tblgen)" ] && (echo "Unable to find clang-tblgen"; exit 1)
[ ! "$?" = "0" ] && (echo "Unable to find clang-tblgen"; exit 1) [ -z "$(which llvm-tblgen)" ] && (echo "Unable to find llvm-tblgen"; exit 1)
which llvm-tblgen > /dev/null
[ ! "$?" = "0" ] && (echo "Unable to find llvm-tblgen"; exit 1)
# Simplified filesystem heirarchy with symlinks for compatibility # Simplified filesystem heirarchy with symlinks for compatibility
mkdir -p $BOOTSTRAP/root/{bin,boot/EFI/BOOT,dev,etc,home,lib,proc,run,sys,tmp,usr/{include,share},var/{cache,lib,log,spool,tmp}} mkdir -p $BOOTSTRAP/root/{bin,boot/EFI/BOOT,dev,etc,home,lib,proc,run,sys,tmp,usr/{include,share},var/{cache,lib,log,spool,tmp}}
@ -226,7 +224,7 @@ ln -s clang++ $BOOTSTRAP/root/bin/c++
cd .. cd ..
# Build remaining software with treetap # Build remaining software with treetap
SOURCES=(make) SOURCES=(coreutils dash grep findutils gzip make mawk sed tar xz)
for name in $SOURCES; do for name in $SOURCES; do
$TREETAP fetch $SPEC/$name/$name.spec $TREETAP fetch $SPEC/$name/$name.spec
$TREETAP build $SPEC/$name/$name.spec $TREETAP build $SPEC/$name/$name.spec
@ -247,18 +245,29 @@ SOURCES=(
byacc byacc
bzip2 bzip2
cmake cmake
coreutils
dash
findutils
flex flex
grep
groff
gzip
libarchive libarchive
libelf
libressl libressl
libtool libtool
linux linux
llvm llvm
m4 m4
make make
mawk
muon muon
musl musl
nasm
perl perl
pkgconf pkgconf
sed
tar
xz xz
zlib zlib
) )

View File

@ -34,7 +34,7 @@ echo "Done!"
# NOTE: groff requires Perl to build. ~ahill # NOTE: groff requires Perl to build. ~ahill
# NOTE: nasm requires autoconf and automake to build. ~ahill # NOTE: nasm requires autoconf and automake to build. ~ahill
cd /maple cd /maple
PACKAGES="byacc bzip2 libelf libressl m4 make muon musl perl pkgconf xz zlib autoconf automake flex groff libarchive libtool nasm cmake" PACKAGES="byacc bzip2 coreutils dash findutils grep gzip libelf libressl m4 make mawk muon musl perl pkgconf sed tar xz zlib autoconf automake flex groff libarchive libtool nasm cmake"
for pkg in $PACKAGES; do for pkg in $PACKAGES; do
treetap fetch /maple/sources/$pkg/$pkg.spec treetap fetch /maple/sources/$pkg/$pkg.spec
treetap build /maple/sources/$pkg/$pkg.spec treetap build /maple/sources/$pkg/$pkg.spec

View File

@ -0,0 +1,21 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="19bcb6ca867183c57d77155eae946c5eced88183143b45ca51ad7d26c628ca75"
SRC_NAME="coreutils"
SRC_URL="https://ftp.gnu.org/gnu/coreutils/coreutils-9.9.tar.xz"
SRC_VERSION="9.9"
build() {
tar xf ../$SRC_FILENAME
cd coreutils-*/
./configure $TT_AUTOCONF_COMMON --disable-year2038
make -j $TT_PROCS
}
clean() {
rm -rf coreutils-*/
}
package() {
cd coreutils-*/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

23
sources/dash/dash.spec Normal file
View File

@ -0,0 +1,23 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_FILENAME="dash-0.5.12-12.tar.gz"
SRC_HASH="845fd61702ae5e53e09664faa450da82805958924b109b8c5b4777bd8551af00"
SRC_NAME="dash"
SRC_URL="https://salsa.debian.org/debian/dash/-/archive/debian/0.5.12-12/dash-debian-0.5.12-12.tar.gz"
SRC_VERSION="0.5.12-12"
build() {
tar xf ../$SRC_FILENAME
cd dash-*/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
clean() {
rm -rf dash-*/
}
package() {
cd dash-*/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
ln -s dash $TT_INSTALLDIR/bin/sh
}

View File

@ -0,0 +1,21 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="1387e0b67ff247d2abde998f90dfbf70c1491391a59ddfecb8ae698789f0a4f5"
SRC_NAME="findutils"
SRC_URL="https://ftp.gnu.org/gnu/findutils/findutils-4.10.0.tar.xz"
SRC_VERSION="4.10.0"
build() {
tar xf ../$SRC_FILENAME
cd findutils-*/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
clean() {
rm -rf findutils-*/
}
package() {
cd findutils-*/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

17
sources/grep/grep.spec Normal file
View File

@ -0,0 +1,17 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9"
SRC_NAME="grep"
SRC_URL="https://ftp.gnu.org/gnu/grep/grep-3.12.tar.xz"
SRC_VERSION="3.12"
build() {
tar xf ../$SRC_FILENAME
cd grep-$SRC_VERSION/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
package() {
cd grep-$SRC_VERSION/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

17
sources/gzip/gzip.spec Normal file
View File

@ -0,0 +1,17 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="01a7b881bd220bfdf615f97b8718f80bdfd3f6add385b993dcf6efd14e8c0ac6"
SRC_NAME="gzip"
SRC_URL="https://ftp.gnu.org/gnu/gzip/gzip-1.14.tar.xz"
SRC_VERSION="1.14"
build() {
tar xf ../$SRC_FILENAME
cd gzip-$SRC_VERSION/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
package() {
cd gzip-$SRC_VERSION/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

View File

@ -7,8 +7,6 @@ SRC_VERSION="3.8.4"
build() { build() {
tar xf ../$SRC_FILENAME tar xf ../$SRC_FILENAME
cd libarchive-*/ cd libarchive-*/
# NOTE: bsdtar is disabled here because Busybox's implementation is complete
# enough to be useful and bootstrapping libarchive is a pain. ~ahill
./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038 ./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
make -j $TT_PROCS make -j $TT_PROCS
} }

View File

@ -1,8 +1,8 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev> # Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="558c6bbab749492b34f99827fe807b0039a744693c21d3a7e03b3a48edaab96a" SRC_HASH="7a8879167b89c4bae077d6f39c4f2130769f05dbdad2aad914adab9afb7d7f9a"
SRC_NAME="linux" SRC_NAME="linux"
SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.2.tar.xz" SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.3.tar.xz"
SRC_VERSION="6.18.2" SRC_VERSION="6.18.3"
build() { build() {
tar xf ../$SRC_FILENAME tar xf ../$SRC_FILENAME

17
sources/mawk/mawk.spec Normal file
View File

@ -0,0 +1,17 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="51bcb82d577b141d896d9d9c3077d7aaa209490132e9f2b9573ba8511b3835be"
SRC_NAME="mawk"
SRC_URL="https://invisible-island.net/archives/mawk/mawk-1.3.4-20250131.tgz"
SRC_VERSION="1.3.4-20250131"
build() {
tar xf ../$SRC_FILENAME
cd mawk-$SRC_VERSION/
./configure $TT_AUTOCONF_COMMON
make -O -j $TT_PROCS
}
package() {
cd mawk-$SRC_VERSION/
make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

17
sources/sed/sed.spec Normal file
View File

@ -0,0 +1,17 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181"
SRC_NAME="sed"
SRC_URL="https://ftp.gnu.org/gnu/sed/sed-4.9.tar.xz"
SRC_VERSION="4.9"
build() {
tar xf ../$SRC_FILENAME
cd sed-$SRC_VERSION/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
package() {
cd sed-$SRC_VERSION/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

17
sources/tar/tar.spec Normal file
View File

@ -0,0 +1,17 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="4d62ff37342ec7aed748535323930c7cf94acf71c3591882b26a7ea50f3edc16"
SRC_NAME="tar"
SRC_URL="https://ftp.gnu.org/gnu/tar/tar-1.35.tar.xz"
SRC_VERSION="1.35"
build() {
tar xf ../$SRC_FILENAME
cd tar-$SRC_VERSION/
./configure $TT_AUTOCONF_COMMON
make -j $TT_PROCS
}
package() {
cd tar-$SRC_VERSION/
make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
}

View File

@ -1,9 +1,13 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev> # Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="0b54f79df85912504de0b14aec7971e3f964491af1812d83447005807513cd9e" SRC_HASH="ce09c50a5962786b83e5da389c90dd2c15ecd0980a258dd01f70f9e7ce58a8f1"
SRC_NAME="xz" SRC_NAME="xz"
SRC_URL="https://github.com/tukaani-project/xz/releases/download/v5.8.2/xz-5.8.2.tar.xz" SRC_URL="https://github.com/tukaani-project/xz/releases/download/v5.8.2/xz-5.8.2.tar.gz"
SRC_VERSION="5.8.2" SRC_VERSION="5.8.2"
# NOTE: It is important that the source tarball should remain gzip-compressed
# rather than xz-compressed, because we are unable to extract
# xz-compressed archives until this software is built. ~ahill
build() { build() {
tar xf ../$SRC_FILENAME tar xf ../$SRC_FILENAME
cd xz-*/ cd xz-*/

32
treetap
View File

@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# Copyright (c) 2025 Alexander Hill # Copyright (c) 2025-2026 Alexander Hill
# Permission to use, copy, modify, and/or distribute this software for any # Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@ -18,6 +18,11 @@
# Changelog # # Changelog #
############# #############
# January 4, 2026 (1.4.1)
# * Set LD to ld.lld after mold was removed from Maple Linux. [ahill]
# - Replaced clean with purge, since the current implementation of clean isn't
# effective. [ahill]
# December 6, 2025 (1.4.0) # December 6, 2025 (1.4.0)
# + Added sane defaults for the environment if they are not defined [ahill] # + Added sane defaults for the environment if they are not defined [ahill]
# + Added SRC_REVISION and SRC_FULLVERSION to prevent issues related to # + Added SRC_REVISION and SRC_FULLVERSION to prevent issues related to
@ -75,7 +80,6 @@
# Specification Functions: # Specification Functions:
# build - Builds the package # build - Builds the package
# clean - Cleans $TT_BUILDDIR for the next build
# package - Installs the package contents to $TT_INSTALLDIR # package - Installs the package contents to $TT_INSTALLDIR
# Specification Variables: # Specification Variables:
@ -87,9 +91,9 @@
# (required) # (required)
# SRC_NAME - The name of the package being built (required) # SRC_NAME - The name of the package being built (required)
# SRC_PATCHES - A list of SHA256 hashes followed by their filenames to be # SRC_PATCHES - A list of SHA256 hashes followed by their filenames to be
# copied to the build directory (optional) # copied to the build directory (optional)
# SRC_REVISION - The package revision number to denote changes specifically # SRC_REVISION - The package revision number to denote changes specifically
# made for Maple Linux (optional) # made for Maple Linux (optional)
# SRC_URL - The URL of the tarball to be downloaded (required) # SRC_URL - The URL of the tarball to be downloaded (required)
# SRC_VERSION - The version of the package being built (required) # SRC_VERSION - The version of the package being built (required)
@ -146,7 +150,7 @@
[ -z "$TT_DIR" ] && TT_DIR="$(pwd)/.treetap" [ -z "$TT_DIR" ] && TT_DIR="$(pwd)/.treetap"
[ -z "$TT_PKGDIR" ] && TT_PKGDIR="$TT_DIR/packages" [ -z "$TT_PKGDIR" ] && TT_PKGDIR="$TT_DIR/packages"
[ -z "$TT_SYSROOT" ] && TT_SYSROOT=/ [ -z "$TT_SYSROOT" ] && TT_SYSROOT=/
TT_VERSION="1.4.0" TT_VERSION="1.4.1"
######################### #########################
# Environment Variables # # Environment Variables #
@ -156,7 +160,7 @@ TT_VERSION="1.4.0"
[ -z "$AS" ] && export AS=nasm [ -z "$AS" ] && export AS=nasm
[ -z "$CC" ] && export CC=clang [ -z "$CC" ] && export CC=clang
[ -z "$CXX" ] && export CXX=clang++ [ -z "$CXX" ] && export CXX=clang++
[ -z "$LD" ] && export LD=mold [ -z "$LD" ] && export LD=ld.lld
[ -z "$NM" ] && export NM=nm [ -z "$NM" ] && export NM=nm
[ -z "$OBJCOPY" ] && export OBJCOPY=objcopy [ -z "$OBJCOPY" ] && export OBJCOPY=objcopy
[ -z "$OBJDUMP" ] && export OBJDUMP=objdump [ -z "$OBJDUMP" ] && export OBJDUMP=objdump
@ -388,20 +392,6 @@ source_build() {
exit 0 exit 0
} }
# Cleans the source from the previous build
source_clean() {
source_spec $1
mkdir -p $TT_BUILDDIR
PUSHD=$(pwd)
cd $TT_BUILDDIR
echo -n "Cleaning $SRC_NAME $SRC_FULLVERSION for $TT_MICROARCH... "
clean
rm -rf $TT_INSTALLDIR
cd $PUSHD
echo "Done!"
exit 0
}
# Fetches and verifies the integrity of the source tarball # Fetches and verifies the integrity of the source tarball
source_fetch() { source_fetch() {
source_spec $1 source_spec $1
@ -456,7 +446,7 @@ source_purge() {
case "$1" in case "$1" in
"build") source_build $2 ;; "build") source_build $2 ;;
"clean") source_clean $2 ;; "clean") source_purge $2 ;;
"fetch") source_fetch $2 ;; "fetch") source_fetch $2 ;;
"install") package_install $2 $3 ;; "install") package_install $2 $3 ;;
"package") source_package $2 ;; "package") source_package $2 ;;