summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Hill <ahill@breadpudding.dev>2025-11-27 18:46:03 -0500
committerAlexander Hill <ahill@breadpudding.dev>2025-11-27 18:46:03 -0500
commit679f263c2ffaf2891abd03d29a9af511c620e852 (patch)
treeb8570fbb3e4ab5cbc58a71ae1fee237cacd4738f
parent38329ef5fd8096b8b41859a802c491df6db9748c (diff)
Added autoconf, automake, bsdutils, libtool, musl-fts, perl, and pkgconf, and replaced m4
-rw-r--r--STATUS.md6
-rwxr-xr-xbootstrap.sh28
-rwxr-xr-xmaple-chroot25
-rwxr-xr-xrootbuild.sh5
-rw-r--r--sources/autoconf/autoconf.spec21
-rw-r--r--sources/automake/automake.spec21
-rw-r--r--sources/bsdutils/bsdutils.spec121
-rw-r--r--sources/libtool/libtool.spec27
-rw-r--r--sources/m4/m4.spec11
-rw-r--r--sources/musl-fts/musl-fts.spec24
-rw-r--r--sources/perl/perl.spec21
-rw-r--r--sources/pkgconf/pkgconf.spec24
12 files changed, 327 insertions, 7 deletions
diff --git a/STATUS.md b/STATUS.md
index 2108466..fc11319 100644
--- a/STATUS.md
+++ b/STATUS.md
@@ -2,6 +2,9 @@ This document tracks which packages can be built and packaged within the chroot.
| Package | Can Build? | Can Package? |
| ------------ | ---------- | ------------ |
+| `autoconf` | Yes | Yes |
+| `automake` | Yes | Yes |
+| `bsdutils` | Yes | Yes |
| `busybox` | No | No |
| `byacc` | Yes | Yes |
| `bzip2` | Yes | Yes |
@@ -17,6 +20,9 @@ This document tracks which packages can be built and packaged within the chroot.
| `mold` | Yes | Yes |
| `muon` | Yes | Yes |
| `musl` | Yes | Yes |
+| `musl-fts` | Yes | Yes |
| `ncurses` | Yes | Yes |
+| `perl` | Yes | Yes |
+| `pkgconf` | Yes | Yes |
| `xz` | Yes | Yes |
| `zlib` | Yes | Yes | \ No newline at end of file
diff --git a/bootstrap.sh b/bootstrap.sh
index 41feb22..868f3c4 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -241,7 +241,33 @@ cp $TREETAP $BOOTSTRAP/root/bin/
mkdir -p $BOOTSTRAP/root/maple/
cp rootbuild.sh $BOOTSTRAP/root/maple/
export TT_DIR=$BOOTSTRAP/root/maple/.treetap
-SOURCES=(busybox byacc bzip2 cmake editline flex libarchive libressl linux llvm m4 make mold muon musl ncurses xz zlib)
+SOURCES=(
+ autoconf
+ automake
+ bsdutils
+ busybox
+ byacc
+ bzip2
+ cmake
+ editline
+ flex
+ libarchive
+ libressl
+ libtool
+ linux
+ llvm
+ m4
+ make
+ mold
+ muon
+ musl
+ musl-fts
+ ncurses
+ perl
+ pkgconf
+ xz
+ zlib
+)
for name in $SOURCES; do
$TREETAP fetch $SPEC/$name/$name.spec
done
diff --git a/maple-chroot b/maple-chroot
new file mode 100755
index 0000000..5d7d52d
--- /dev/null
+++ b/maple-chroot
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+if [ -z "$1" ] && [ ! -d "$1" ]; then
+ echo "Usage: $0 <root>"
+ exit 1
+fi
+
+if mount --rbind /dev $1/dev && mount --make-rslave $1/dev; then
+ if mount -t proc /proc $1/proc; then
+ if mount --bind /run $1/run; then
+ if mount --rbind /sys $1/sys && mount --make-rslave $1/sys; then
+ if mount --rbind /tmp $1/tmp; then
+ SHELL=$2
+ [ -z "$SHELL" ] && SHELL=/bin/sh
+ chroot $1 $SHELL
+ umount -R $1/tmp
+ fi
+ umount -R $1/sys
+ fi
+ umount -R $1/run
+ fi
+ umount -R $1/proc
+ fi
+ umount -R $1/dev
+fi \ No newline at end of file
diff --git a/rootbuild.sh b/rootbuild.sh
index 32a4cec..d76f486 100755
--- a/rootbuild.sh
+++ b/rootbuild.sh
@@ -25,8 +25,11 @@ make -j $(nproc) install DESTDIR=/
# NOTE: mold requires CMake to build. ~ahill
# NOTE: flex requires byacc and m4 to build. ~ahill
# NOTE: editline requires ncurses to build. ~ahill
+# NOTE: autoconf requires GNU m4 and perl to build. ~ahill
+# NOTE: automake requires m4 to build. ~ahill
+# NOTE: musl-fts requires autoconf, automake, and libtool to build. ~ahill
cd /maple
-PACKAGES="byacc bzip2 libressl m4 make muon musl ncurses xz zlib editline flex libarchive cmake mold"
+PACKAGES="byacc bzip2 libressl m4 make muon musl ncurses perl pkgconf xz zlib autoconf automake editline flex libarchive libtool musl-fts cmake mold"
for pkg in $PACKAGES; do
treetap fetch sources/$pkg/$pkg.spec
treetap build sources/$pkg/$pkg.spec
diff --git a/sources/autoconf/autoconf.spec b/sources/autoconf/autoconf.spec
new file mode 100644
index 0000000..317d458
--- /dev/null
+++ b/sources/autoconf/autoconf.spec
@@ -0,0 +1,21 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_HASH="ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a"
+SRC_NAME="autoconf"
+SRC_URL="https://ftp.gnu.org/gnu/autoconf/autoconf-2.72.tar.xz"
+SRC_VERSION="2.72"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd autoconf-*/
+ ./configure $TT_AUTOCONF_COMMON
+ make -O -j $TT_PROCS
+}
+
+clean() {
+ rm -rf autoconf-*/
+}
+
+package() {
+ cd autoconf-*/
+ make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/automake/automake.spec b/sources/automake/automake.spec
new file mode 100644
index 0000000..5ba1f74
--- /dev/null
+++ b/sources/automake/automake.spec
@@ -0,0 +1,21 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_HASH="168aa363278351b89af56684448f525a5bce5079d0b6842bd910fdd3f1646887"
+SRC_NAME="automake"
+SRC_URL="https://ftp.gnu.org/gnu/automake/automake-1.18.1.tar.xz"
+SRC_VERSION="1.18.1"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd automake-*/
+ ./configure $TT_AUTOCONF_COMMON
+ make -j $TT_PROCS
+}
+
+clean() {
+ rm -rf automake-*/
+}
+
+package() {
+ cd automake-*/
+ make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/bsdutils/bsdutils.spec b/sources/bsdutils/bsdutils.spec
new file mode 100644
index 0000000..487558d
--- /dev/null
+++ b/sources/bsdutils/bsdutils.spec
@@ -0,0 +1,121 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_FILENAME="bsdutils-13.2.tar.gz"
+SRC_HASH="4547990309afe686c6f36c2a4f7ac5806e0064b182dd1f93f52dda7661979a3c"
+SRC_NAME="bsdutils"
+SRC_URL="https://codeberg.org/dcantrell/bsdutils/archive/v13.2.tar.gz"
+SRC_VERSION="13.2"
+
+# TODO: Determine which utilities should be moved to bsdutils and which should
+# stick with Busybox. ~ahill
+# [
+# bc
+# cat
+# chgrp
+# chmod
+# chown
+# chroot
+# cksum
+# comm
+# cp
+# csplit
+# cut
+# date
+# dc
+# dd
+# dirname
+# du
+# echo
+# env
+# expand
+# expr
+# factor
+# false
+# fmt
+# fold
+# groups
+# head
+# hexdump
+# hostname
+# id
+# install
+# join
+# kill
+# ln
+# logname
+# ls
+# mkdir
+# mkfifo
+# mknod
+# mktemp
+# mv
+# nice
+# nl
+# nohup
+# paste
+# pathchk
+# pr
+# printenv
+# printf
+# pwd
+# readlink
+# realpath
+# rm
+# rmdir
+# sed
+# seq
+# sleep
+# split
+# stat
+# stdbuf
+# stty
+# sync
+# tail
+# tee
+# test
+# timeout
+# touch
+# tr
+# true
+# truncate
+# tsort
+# tty
+# uname
+# unexpand
+# uniq
+# unlink
+# users
+# which
+# who
+# whoami
+# xargs
+# yes
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd bsdutils/
+ # NOTE: Before we start building bsdutils, we tell it *not* to build df/wc,
+ # since that requires an additional dependency (libxo) and we already
+ # have BusyBox's version of df and wc to replace it. ~ahill
+ sed -i "/libxo/d" meson.build
+ sed -i "/'df'/d" src/meson.build
+ sed -i "/'wc'/d" src/meson.build
+ # NOTE: Apparently, rpmatch is REQUIRED, despite meson.build stating that it
+ # is optional. Disabling find in favor of BusyBox to prevent another
+ # dependency from being introduced. ~ahill
+ sed -i "/'find'/d" src/meson.build
+ # NOTE: Finally, we have a *lot* of duplicate commands between bsdutils and
+ # Busybox. Busybox takes priority unless the bsdutils version has more
+ # functionality. ~ahill
+ # ...
+ muon setup $TT_MESON_COMMON build
+ muon samu -C build
+}
+
+clean() {
+ rm -rf bsdutils/
+}
+
+package() {
+ cd bsdutils/
+ muon -C build install -d $TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/libtool/libtool.spec b/sources/libtool/libtool.spec
new file mode 100644
index 0000000..a5eb3b3
--- /dev/null
+++ b/sources/libtool/libtool.spec
@@ -0,0 +1,27 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_HASH="f81f5860666b0bc7d84baddefa60d1cb9fa6fceb2398cc3baca6afaa60266675"
+SRC_NAME="libtool"
+SRC_URL="https://ftp.gnu.org/gnu/libtool/libtool-2.5.4.tar.xz"
+SRC_VERSION="2.5.4"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd libtool-*/
+ ./configure $TT_AUTOCONF_COMMON --disable-static
+ make -j $TT_PROCS
+ # NOTE: For some reason, libtoolize uses the env command to locate sh, but
+ # we don't have the env command yet, because env is part of bsdutils,
+ # which requires musl-fts to function, which we can't build without
+ # libtoolize. Strangely enough, libtool is hard-coded to /bin/sh, so
+ # I don't know why libtoolize uses /usr/bin/env. ~ahill
+ sed -i "s|/usr/bin/env sh|/bin/sh" libtoolize
+}
+
+clean() {
+ rm -rf libtool-*/
+}
+
+package() {
+ cd libtool-*/
+ make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/m4/m4.spec b/sources/m4/m4.spec
index 8894ded..0697fec 100644
--- a/sources/m4/m4.spec
+++ b/sources/m4/m4.spec
@@ -1,13 +1,14 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
-SRC_HASH="e4315fef49b08912b1d1db3774dd98f971397b2751c648512b6c8d852590dc50"
+SRC_HASH="e236ea3a1ccf5f6c270b1c4bb60726f371fa49459a8eaaebc90b216b328daf2b"
SRC_NAME="m4"
-SRC_URL="http://haddonthethird.net/m4/m4-2.tar.bz2"
-SRC_VERSION="2"
+SRC_URL="https://ftp.gnu.org/gnu/m4/m4-1.4.20.tar.xz"
+SRC_VERSION="1.4.20"
build() {
tar xf ../$SRC_FILENAME
cd m4-*/
- make -O -j $TT_PROCS
+ ./configure $TT_AUTOCONF_COMMON --enable-year2038
+ make -j $TT_PROCS
}
clean() {
@@ -16,5 +17,5 @@ clean() {
package() {
cd m4-*/
- make -O -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+ make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
} \ No newline at end of file
diff --git a/sources/musl-fts/musl-fts.spec b/sources/musl-fts/musl-fts.spec
new file mode 100644
index 0000000..35f9df7
--- /dev/null
+++ b/sources/musl-fts/musl-fts.spec
@@ -0,0 +1,24 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_FILENAME="musl_fts-1.2.7.tar.gz"
+SRC_HASH="49ae567a96dbab22823d045ffebe0d6b14b9b799925e9ca9274d47d26ff482a6"
+SRC_NAME="musl-fts"
+SRC_URL="https://github.com/void-linux/musl-fts/archive/refs/tags/v1.2.7.tar.gz"
+SRC_VERSION="1.2.7"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd musl-fts-*/
+ # TODO: Can we rewrite this to not rely on libtool going forward? ~ahill
+ ./bootstrap.sh
+ ./configure $TT_AUTOCONF_COMMON --disable-static
+ make -j $TT_PROCS
+}
+
+clean() {
+ rm -rf musl-fts-*/
+}
+
+package() {
+ cd musl-fts-*/
+ make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/perl/perl.spec b/sources/perl/perl.spec
new file mode 100644
index 0000000..4a5fa8a
--- /dev/null
+++ b/sources/perl/perl.spec
@@ -0,0 +1,21 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_HASH="e093ef184d7f9a1b9797e2465296f55510adb6dab8842b0c3ed53329663096dc"
+SRC_NAME="perl"
+SRC_URL="https://www.cpan.org/src/5.0/perl-5.42.0.tar.gz"
+SRC_VERSION="5.42.0"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd perl-*/
+ ./Configure -des
+ make -O -j $TT_PROCS
+}
+
+clean() {
+ rm -rf perl-*/
+}
+
+package() {
+ cd perl-*/
+ make -O -j $TT_PROCS DESTDIR=$TT_INSTALLDIR
+} \ No newline at end of file
diff --git a/sources/pkgconf/pkgconf.spec b/sources/pkgconf/pkgconf.spec
new file mode 100644
index 0000000..470921e
--- /dev/null
+++ b/sources/pkgconf/pkgconf.spec
@@ -0,0 +1,24 @@
+# Maintainer: Alexander Hill <ahill@breadpudding.dev>
+SRC_HASH="cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243"
+SRC_NAME="pkgconf"
+SRC_URL="https://distfiles.dereferenced.org/pkgconf/pkgconf-2.5.1.tar.xz"
+SRC_VERSION="2.5.1"
+
+build() {
+ tar xf ../$SRC_FILENAME
+ cd pkgconf-*/
+ ./configure $TT_AUTOCONF_COMMON --disable-static --enable-year2038
+ make -j $TT_PROCS
+}
+
+clean() {
+ rm -rf pkgconf-*/
+}
+
+package() {
+ cd pkgconf-*/
+ make -j $TT_PROCS install DESTDIR=$TT_INSTALLDIR
+ # NOTE: Symlink for compatibility's sake. Currently being used by Muon.
+ # ~ahill
+ ln -sf pkgconf $TT_INSTALLDIR/bin/pkg-config
+} \ No newline at end of file