From e9324402f3117e19dd2750c6991c6b9a23e9ad4d Mon Sep 17 00:00:00 2001 From: Alexander Hill Date: Fri, 6 Feb 2026 22:16:32 -0500 Subject: [PATCH] Built util-linux --- README.md | 2 +- docs/SOFTWARE.md | 1 + docs/STATUS.md | 1 + sources/util-linux/util-linux-byacc.patch | 20 +++++++++++++ sources/util-linux/util-linux.spec | 34 +++++++++++++++++++++++ 5 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 sources/util-linux/util-linux-byacc.patch create mode 100644 sources/util-linux/util-linux.spec diff --git a/README.md b/README.md index ce349d8..4cb49d0 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,4 @@ Maple Linux uses a slightly different filesystem hierarchy compared to most Linu - `/boot` - This is the mount point for the EFI System Partition - `/lib` - This is the canonical location for all system-level libraries. Paths such as `/usr/lib` and `/usr/libexec` should be considered legacy. -Many of alternative paths are symlinked for compatibility's sake. +Many alternate/deprecated paths are symlinked for compatibility's sake. diff --git a/docs/SOFTWARE.md b/docs/SOFTWARE.md index a1f14cf..5e0dd98 100644 --- a/docs/SOFTWARE.md +++ b/docs/SOFTWARE.md @@ -54,6 +54,7 @@ | GNU tar | Free Software Foundation, Inc. | GNU General Public License version 3 | Copyleft | | tinyramfs | illiliti | GNU General Public License version 3 | Copyleft | | tinytoml | Fourier Transformer | MIT License | Free | +| util-linux | Various | GNU General Public License version 2 | Copyleft | | xz | Various | Mostly BSD 0-Clause License | Slightly Copyleft | | Zlib | Jean-loup Gailly and Mark Adler | Zlib License | Free | | Zsh | The Zsh development group | Mostly MIT License (Modern Variant) | Slightly Copyleft | diff --git a/docs/STATUS.md b/docs/STATUS.md index a2a314b..e3b4e04 100644 --- a/docs/STATUS.md +++ b/docs/STATUS.md @@ -73,6 +73,7 @@ Definitions: | `tar` | Yes | Yes | | `tinyramfs` | Yes | Yes | | `tinytoml` | Yes | Yes | +| `util-linux` | Yes | Yes | | `xlibre-xserver` | | `xz` | Yes | Yes | | `zlib` | Yes | Yes | diff --git a/sources/util-linux/util-linux-byacc.patch b/sources/util-linux/util-linux-byacc.patch new file mode 100644 index 0000000..f461542 --- /dev/null +++ b/sources/util-linux/util-linux-byacc.patch @@ -0,0 +1,20 @@ +--- vanilla/meson.build 2025-12-15 07:50:01.000000000 -0500 ++++ maple/meson.build 2026-02-06 21:58:53.463319033 -0500 +@@ -952,7 +952,7 @@ + have = get_option('use-tty-group') + conf.set('USE_TTY_GROUP', have ? 1 : false) + +-bison = find_program('bison') ++bison = find_program('byacc') + flex = find_program('flex') + sed = find_program('sed') + +@@ -960,7 +960,7 @@ + bison_gen = generator( + bison, + output : ['@BASENAME@.tab.c', '@BASENAME@.tab.h'], +- arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@']) ++ arguments : ['--defines', '@OUTPUT1@', '--output', '@OUTPUT0@', '@INPUT@']) + + python_program = find_program('python3', 'python', native : true) + diff --git a/sources/util-linux/util-linux.spec b/sources/util-linux/util-linux.spec new file mode 100644 index 0000000..6eb3df3 --- /dev/null +++ b/sources/util-linux/util-linux.spec @@ -0,0 +1,34 @@ +# Maintainer: Alexander Hill +SRC_HASH="25dc2fd70c6b6bec1c0c97cb11636edd2d5b2645df2324eef4820db3677bd412" +SRC_NAME="util-linux" +SRC_URL="https://github.com/util-linux/util-linux/archive/refs/tags/v2.41.3.tar.gz" +SRC_VERSION="2.41.3" + +SRC_FILENAME="util-linux-$SRC_VERSION.tar.gz" +SRC_PATCHES=" +64867fc3cd34263137f8db91839fad44f0096f76602a4281b3e542e344ae97cc util-linux-byacc.patch +" + +build() { + tar xf ../$SRC_FILENAME + cd util-linux-$SRC_VERSION/ + # NOTE: util-linux is hard-coded to use bison, so we need to patch the build + # script to use byacc. In addition to the difference in name, byacc + # has slightly different arguments, resulting in an error later on in + # the build. Because of this, the command line arguments are patched + # as well. ~ahill + patch -p1 < ../util-linux-byacc.patch + # NOTE: I'm not sure why, but muon doesn't seem to be able to build libfdisk + # and libmount, so they are disabled for now. ~ahill + # NOTE: libsmartcols appears to rely on some bison-specific behavior that + # byacc seems to lack, so we aren't able to build the software at this + # time. ~ahill + muon setup $TT_MESON_COMMON \ + -Dbuild-libfdisk=disabled \ + -Dbuild-libmount=disabled \ + -Dbuild-libsmartcols=disabled \ + -Dbuild-python=disabled \ + build + muon samu -C build + muon -C build install -d $TT_INSTALLDIR +}