summaryrefslogtreecommitdiffstats
path: root/coreutils-uutils
diff options
context:
space:
mode:
authorkj-sh6042025-05-27 00:56:45 -0400
committerkj-sh6042025-05-27 00:56:45 -0400
commit20dd9649c35b09401fb511ad33892be6d25b9c9c (patch)
treec66365313a9cc96e2ccbec9a90ef95e37389d32b /coreutils-uutils
parent784c5bdad0a12a31f933b6a405359170c7e5a618 (diff)
refactor: re-organize files
Diffstat (limited to 'coreutils-uutils')
-rw-r--r--coreutils-uutils/.SRCINFO20
-rw-r--r--coreutils-uutils/0001-update-selinux-progs.patch12
-rw-r--r--coreutils-uutils/PKGBUILD72
-rw-r--r--coreutils-uutils/disable_selinux.patch13
4 files changed, 67 insertions, 50 deletions
diff --git a/coreutils-uutils/.SRCINFO b/coreutils-uutils/.SRCINFO
index 2ab1045..502e0ee 100644
--- a/coreutils-uutils/.SRCINFO
+++ b/coreutils-uutils/.SRCINFO
@@ -1,18 +1,22 @@
pkgbase = coreutils-uutils
pkgdesc = (warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils being used as actual system coreutils
pkgver = 0.1.0
- pkgrel = 2
+ pkgrel = 1
url = https://github.com/uutils/coreutils
arch = x86_64
license = GPL3
license = MIT
+ makedepends = rust
makedepends = cargo
- makedepends = clang
makedepends = python-sphinx
- makedepends = rust
- depends = gcc-libs
depends = glibc
- depends = libselinux
+ depends = acl
+ depends = attr
+ depends = gmp
+ depends = libcap
+ depends = openssl
+ depends = gcc-libs
+ depends = libkeccak
depends = oniguruma
provides = coreutils
provides = b3sum
@@ -20,9 +24,11 @@ pkgbase = coreutils-uutils
conflicts = coreutils
conflicts = b3sum
conflicts = sha3sum
+ source = https://ftp.gnu.org/gnu/coreutils/coreutils-9.7.tar.xz
source = uutils-coreutils-0.1.0.tar.gz::https://github.com/uutils/coreutils/archive/0.1.0.tar.gz
- source = 0001-update-selinux-progs.patch
+ source = disable_selinux.patch
+ sha256sums = e8bb26ad0293f9b5a1fc43fb42ba970e312c66ce92c1b0b16713d7500db251bf
sha256sums = 55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8
- sha256sums = d8290988c9c8275e2087f1a63d63c420c88ebcf7c50aed0ef53d9dcd46517b36
+ sha256sums = 302614165d99f04600627222ddad0444a0144fcad6a1ff59ad43fb0b3162060e
pkgname = coreutils-uutils
diff --git a/coreutils-uutils/0001-update-selinux-progs.patch b/coreutils-uutils/0001-update-selinux-progs.patch
deleted file mode 100644
index aee086f..0000000
--- a/coreutils-uutils/0001-update-selinux-progs.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/GNUmakefile
-+++ b/GNUmakefile
-@@ -177,7 +177,8 @@
-
- SELINUX_PROGS := \
- chcon \
-- runcon
-+ runcon \
-+ stty
-
- ifneq ($(OS),Windows_NT)
- PROGS := $(PROGS) $(UNIX_PROGS)
diff --git a/coreutils-uutils/PKGBUILD b/coreutils-uutils/PKGBUILD
index 9722984..35f08e5 100644
--- a/coreutils-uutils/PKGBUILD
+++ b/coreutils-uutils/PKGBUILD
@@ -1,61 +1,71 @@
# Maintainer: kj_sh604 <406hs_jk@proton.me>
pkgname=coreutils-uutils
-pkgver=0.1.0
-pkgrel=2
+_gnuver=9.7
+_uuver=0.1.0
+pkgver=${_uuver}
+pkgrel=1
pkgdesc='(warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils being used as actual system coreutils'
arch=('x86_64')
license=('GPL3' 'MIT')
url='https://github.com/uutils/coreutils'
+_url='https://www.gnu.org/software/coreutils/'
+depends=('glibc' 'acl' 'attr' 'gmp' 'libcap' 'openssl' 'gcc-libs' 'libkeccak' 'oniguruma')
conflicts=('coreutils' 'b3sum' 'sha3sum')
provides=('coreutils' 'b3sum' 'sha3sum')
-depends=(
- gcc-libs
- glibc
- libselinux
- oniguruma
-)
-makedepends=(
- cargo
- clang
- python-sphinx
- rust
-)
-source=("uutils-coreutils-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
- 0001-update-selinux-progs.patch)
-sha256sums=('55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8'
- 'd8290988c9c8275e2087f1a63d63c420c88ebcf7c50aed0ef53d9dcd46517b36')
+makedepends=('rust' 'cargo' 'python-sphinx')
+source=("https://ftp.gnu.org/gnu/coreutils/coreutils-$_gnuver.tar.xz"
+ "uutils-coreutils-$_uuver.tar.gz::$url/archive/$_uuver.tar.gz"
+ disable_selinux.patch)
+sha256sums=('e8bb26ad0293f9b5a1fc43fb42ba970e312c66ce92c1b0b16713d7500db251bf'
+ '55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8'
+ '302614165d99f04600627222ddad0444a0144fcad6a1ff59ad43fb0b3162060e')
- prepare() {
- cd ${pkgname%-uutils}-${pkgver}
- # patch SELINUX_PROGS to include stty
- patch -Np1 -i ../../0001-update-selinux-progs.patch
+prepare() {
+ cd coreutils-$_uuver
+ # the following is derived from the latest uutils-coreutils changes from Tobias Powalowski:
+ # disable selinux in Makefile, upstream seems broken in parameter parsing
+ # SELINUX_ENABLE=0 should not enable SELINUX but fails
+ patch -Np1 -i ../../disable_selinux.patch
+}
+
+build() {
+ # build gnu coreutils that are not implemented in the MULTICALL rust uutils
+ cd coreutils-$_gnuver
+ ./configure \
+ --prefix=/usr \
+ --libexecdir=/usr/lib \
+ --with-openssl \
+ --enable-no-install-program="[, arch, b2sum, b3sum, base32, base64, basename, basenc, cat, chgrp, chmod, chown, chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, hashsum, head, hostid, hostname, id, install, join, kill, link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mktemp, more, mv, nice, nl, nohup, nproc, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha3-224sum, sha3-256sum, sha3-384sum, sha3-512sum, sha384sum, sha3sum, sha512sum, shake128sum, shake256sum, shred, shuf, sleep, sort, split, stat, stdbuf, sum, sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who, whoami, yes"
}
package() {
- cd ${pkgname%-uutils}-${pkgver}
export RUSTONIG_DYNAMIC_LIBONIG=1
- make install \
- USE=selinux \
+ cd coreutils-$_uuver
+ make \
DESTDIR="$pkgdir" \
PREFIX=/usr \
MANDIR=/share/man/man1 \
PROG_PREFIX= \
PROFILE=release \
- MULTICALL=y
+ MULTICALL=y \
+ install
+ # merge specified gnu coreutils with the rust uutils
+ cd $srcdir && cd coreutils-$_gnuver
+ make DESTDIR="$pkgdir" install
# add libstdbuf.so
mkdir -p $pkgdir/usr/lib/coreutils
- cd $srcdir && cd ${pkgname%-uutils}-${pkgver}/target/release/deps
+ cd $srcdir && cd coreutils-$_uuver/target/release/deps
mv liblibstdbuf.so $pkgdir/usr/lib/coreutils/libstdbuf.so
- # clean conflicts (archlinux ships these in other apps)
+ # clean conflicts, arch ships these in other apps
cd $pkgdir/usr/bin
rm groups hostname install kill more uptime
# symlink missing binaries
if [ -f "coreutils" ]; then
local binaries=(
- "b2sum" "b3sum" "install" "md5sum" "sha1sum" "sha224sum" "sha256sum"
- "sha3-224sum" "sha3-256sum" "sha3-384sum" "sha3-512sum" "sha384sum"
- "sha3sum" "sha512sum" "shake128sum" "shake256sum"
+ "b2sum" "b3sum" "install" "md5sum" "sha1sum" "sha224sum"
+ "sha256sum" "sha3-224sum" "sha3-256sum" "sha3-384sum" "sha3-512sum"
+ "sha384sum" "sha3sum" "sha512sum" "shake128sum" "shake256sum"
)
for bin in "${binaries[@]}"; do
ln -s coreutils "$bin" || echo "warning: failed to create symlink for $bin"
diff --git a/coreutils-uutils/disable_selinux.patch b/coreutils-uutils/disable_selinux.patch
new file mode 100644
index 0000000..f6a5bff
--- /dev/null
+++ b/coreutils-uutils/disable_selinux.patch
@@ -0,0 +1,13 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index f46126a82..58bf7fbdd 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -181,8 +181,6 @@ SELINUX_PROGS := \
+
+ ifneq ($(OS),Windows_NT)
+ PROGS := $(PROGS) $(UNIX_PROGS)
+-# Build the selinux command even if not on the system
+- PROGS := $(PROGS) $(SELINUX_PROGS)
+ endif
+
+ UTILS ?= $(PROGS)