From c496159c2693c5470624d61f42986d05b21b1b59 Mon Sep 17 00:00:00 2001 From: Alexander Hill Date: Sun, 4 Jan 2026 23:20:23 -0500 Subject: [PATCH] Started shifting to a GNU userspace --- LICENSE | 2 +- STATUS.md | 4 ++++ bootstrap.sh | 19 +++++++++++++----- rootbuild.sh | 2 +- sources/coreutils/coreutils.spec | 21 ++++++++++++++++++++ sources/dash/dash.spec | 23 +++++++++++++++++++++ sources/findutils/findutils.spec | 21 ++++++++++++++++++++ sources/grep/grep.spec | 17 ++++++++++++++++ sources/gzip/gzip.spec | 17 ++++++++++++++++ sources/libarchive/libarchive.spec | 2 -- sources/linux/linux.spec | 6 +++--- sources/mawk/mawk.spec | 17 ++++++++++++++++ sources/sed/sed.spec | 17 ++++++++++++++++ sources/tar/tar.spec | 17 ++++++++++++++++ sources/xz/xz.spec | 8 ++++++-- treetap | 32 ++++++++++-------------------- 16 files changed, 190 insertions(+), 35 deletions(-) create mode 100644 sources/coreutils/coreutils.spec create mode 100644 sources/dash/dash.spec create mode 100644 sources/findutils/findutils.spec create mode 100644 sources/grep/grep.spec create mode 100644 sources/gzip/gzip.spec create mode 100644 sources/mawk/mawk.spec create mode 100644 sources/sed/sed.spec create mode 100644 sources/tar/tar.spec diff --git a/LICENSE b/LICENSE index fe784d2..49eea0d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ 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 purpose with or without fee is hereby granted, provided that the above diff --git a/STATUS.md b/STATUS.md index ebf326b..a9aac9a 100644 --- a/STATUS.md +++ b/STATUS.md @@ -14,10 +14,12 @@ Definitions: | `chrony` | | `cmake` | Yes | Yes | | `coreutils` | +| `dash` | | `dhcpcd` | | `diffutils` | | `findutils` | | `flex` | Yes | Yes | +| `fortune-mod` | | `gettext` | | `grep` | | `groff` | Yes | Yes | @@ -53,6 +55,8 @@ Definitions: | `sed` | | `shadow` | | `tar` | +| `texinfo` | +| `xlibre-xserver` | | `xz` | Yes | Yes | | `zlib` | Yes | Yes | | `zsh` | \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh index 97ca85c..3c98326 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -35,10 +35,8 @@ $TREETAP fetch sources/llvm/llvm.spec $TREETAP fetch sources/musl/musl.spec # Make sure both clang-tblgen and llvm-tblgen are in the PATH. ~ahill -which clang-tblgen > /dev/null -[ ! "$?" = "0" ] && (echo "Unable to find clang-tblgen"; exit 1) -which llvm-tblgen > /dev/null -[ ! "$?" = "0" ] && (echo "Unable to find llvm-tblgen"; exit 1) +[ -z "$(which clang-tblgen)" ] && (echo "Unable to find clang-tblgen"; exit 1) +[ -z "$(which llvm-tblgen)" ] && (echo "Unable to find llvm-tblgen"; exit 1) # 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}} @@ -226,7 +224,7 @@ ln -s clang++ $BOOTSTRAP/root/bin/c++ cd .. # Build remaining software with treetap -SOURCES=(make) +SOURCES=(coreutils dash grep findutils gzip make mawk sed tar xz) for name in $SOURCES; do $TREETAP fetch $SPEC/$name/$name.spec $TREETAP build $SPEC/$name/$name.spec @@ -247,18 +245,29 @@ SOURCES=( byacc bzip2 cmake + coreutils + dash + findutils flex + grep + groff + gzip libarchive + libelf libressl libtool linux llvm m4 make + mawk muon musl + nasm perl pkgconf + sed + tar xz zlib ) diff --git a/rootbuild.sh b/rootbuild.sh index 77a4436..6bf40a0 100755 --- a/rootbuild.sh +++ b/rootbuild.sh @@ -34,7 +34,7 @@ echo "Done!" # NOTE: groff requires Perl to build. ~ahill # NOTE: nasm requires autoconf and automake to build. ~ahill 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 treetap fetch /maple/sources/$pkg/$pkg.spec treetap build /maple/sources/$pkg/$pkg.spec diff --git a/sources/coreutils/coreutils.spec b/sources/coreutils/coreutils.spec new file mode 100644 index 0000000..b597a62 --- /dev/null +++ b/sources/coreutils/coreutils.spec @@ -0,0 +1,21 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/dash/dash.spec b/sources/dash/dash.spec new file mode 100644 index 0000000..02b57f5 --- /dev/null +++ b/sources/dash/dash.spec @@ -0,0 +1,23 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/findutils/findutils.spec b/sources/findutils/findutils.spec new file mode 100644 index 0000000..0bde17e --- /dev/null +++ b/sources/findutils/findutils.spec @@ -0,0 +1,21 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/grep/grep.spec b/sources/grep/grep.spec new file mode 100644 index 0000000..62ace69 --- /dev/null +++ b/sources/grep/grep.spec @@ -0,0 +1,17 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/gzip/gzip.spec b/sources/gzip/gzip.spec new file mode 100644 index 0000000..0b95edc --- /dev/null +++ b/sources/gzip/gzip.spec @@ -0,0 +1,17 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/libarchive/libarchive.spec b/sources/libarchive/libarchive.spec index 05db5f0..9711617 100644 --- a/sources/libarchive/libarchive.spec +++ b/sources/libarchive/libarchive.spec @@ -7,8 +7,6 @@ SRC_VERSION="3.8.4" build() { tar xf ../$SRC_FILENAME 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 make -j $TT_PROCS } diff --git a/sources/linux/linux.spec b/sources/linux/linux.spec index e4276b4..d6ac1bd 100755 --- a/sources/linux/linux.spec +++ b/sources/linux/linux.spec @@ -1,8 +1,8 @@ # Maintainer: Alexander Hill -SRC_HASH="558c6bbab749492b34f99827fe807b0039a744693c21d3a7e03b3a48edaab96a" +SRC_HASH="7a8879167b89c4bae077d6f39c4f2130769f05dbdad2aad914adab9afb7d7f9a" SRC_NAME="linux" -SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.2.tar.xz" -SRC_VERSION="6.18.2" +SRC_URL="https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.3.tar.xz" +SRC_VERSION="6.18.3" build() { tar xf ../$SRC_FILENAME diff --git a/sources/mawk/mawk.spec b/sources/mawk/mawk.spec new file mode 100644 index 0000000..ae0ab09 --- /dev/null +++ b/sources/mawk/mawk.spec @@ -0,0 +1,17 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/sed/sed.spec b/sources/sed/sed.spec new file mode 100644 index 0000000..5f417a9 --- /dev/null +++ b/sources/sed/sed.spec @@ -0,0 +1,17 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/tar/tar.spec b/sources/tar/tar.spec new file mode 100644 index 0000000..4ff8017 --- /dev/null +++ b/sources/tar/tar.spec @@ -0,0 +1,17 @@ +# Maintainer: Alexander Hill +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 +} \ No newline at end of file diff --git a/sources/xz/xz.spec b/sources/xz/xz.spec index 268449a..05a10f6 100644 --- a/sources/xz/xz.spec +++ b/sources/xz/xz.spec @@ -1,9 +1,13 @@ # Maintainer: Alexander Hill -SRC_HASH="0b54f79df85912504de0b14aec7971e3f964491af1812d83447005807513cd9e" +SRC_HASH="ce09c50a5962786b83e5da389c90dd2c15ecd0980a258dd01f70f9e7ce58a8f1" 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" +# 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() { tar xf ../$SRC_FILENAME cd xz-*/ diff --git a/treetap b/treetap index 4fc2657..6c76371 100755 --- a/treetap +++ b/treetap @@ -1,6 +1,6 @@ #!/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 # purpose with or without fee is hereby granted, provided that the above @@ -18,6 +18,11 @@ # 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) # + Added sane defaults for the environment if they are not defined [ahill] # + Added SRC_REVISION and SRC_FULLVERSION to prevent issues related to @@ -75,7 +80,6 @@ # Specification Functions: # build - Builds the package -# clean - Cleans $TT_BUILDDIR for the next build # package - Installs the package contents to $TT_INSTALLDIR # Specification Variables: @@ -87,9 +91,9 @@ # (required) # SRC_NAME - The name of the package being built (required) # 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 -# made for Maple Linux (optional) +# made for Maple Linux (optional) # SRC_URL - The URL of the tarball to be downloaded (required) # SRC_VERSION - The version of the package being built (required) @@ -146,7 +150,7 @@ [ -z "$TT_DIR" ] && TT_DIR="$(pwd)/.treetap" [ -z "$TT_PKGDIR" ] && TT_PKGDIR="$TT_DIR/packages" [ -z "$TT_SYSROOT" ] && TT_SYSROOT=/ -TT_VERSION="1.4.0" +TT_VERSION="1.4.1" ######################### # Environment Variables # @@ -156,7 +160,7 @@ TT_VERSION="1.4.0" [ -z "$AS" ] && export AS=nasm [ -z "$CC" ] && export CC=clang [ -z "$CXX" ] && export CXX=clang++ -[ -z "$LD" ] && export LD=mold +[ -z "$LD" ] && export LD=ld.lld [ -z "$NM" ] && export NM=nm [ -z "$OBJCOPY" ] && export OBJCOPY=objcopy [ -z "$OBJDUMP" ] && export OBJDUMP=objdump @@ -388,20 +392,6 @@ source_build() { 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 source_fetch() { source_spec $1 @@ -456,7 +446,7 @@ source_purge() { case "$1" in "build") source_build $2 ;; -"clean") source_clean $2 ;; +"clean") source_purge $2 ;; "fetch") source_fetch $2 ;; "install") package_install $2 $3 ;; "package") source_package $2 ;;