From 12144b850f7dbff536b84e2d327e1a35400d6ddc Mon Sep 17 00:00:00 2001 From: kj-sh604 Date: Tue, 27 May 2025 13:52:18 -0400 Subject: refactor: package rename and pkgdesc changes --- coreutils-uutils-libselinux/.SRCINFO | 28 ++++++++ coreutils-uutils-libselinux/.gitignore | 3 + .../0001-update-selinux-progs.patch | 12 ++++ coreutils-uutils-libselinux/PKGBUILD | 81 ++++++++++++++++++++++ coreutils-uutils-selinux/.SRCINFO | 28 -------- coreutils-uutils-selinux/.gitignore | 3 - .../0001-update-selinux-progs.patch | 12 ---- coreutils-uutils-selinux/PKGBUILD | 81 ---------------------- coreutils-uutils/.SRCINFO | 3 +- coreutils-uutils/PKGBUILD | 16 ++--- coreutils-uutils/build-stty.patch | 30 ++++++++ 11 files changed, 164 insertions(+), 133 deletions(-) create mode 100644 coreutils-uutils-libselinux/.SRCINFO create mode 100644 coreutils-uutils-libselinux/.gitignore create mode 100644 coreutils-uutils-libselinux/0001-update-selinux-progs.patch create mode 100644 coreutils-uutils-libselinux/PKGBUILD delete mode 100644 coreutils-uutils-selinux/.SRCINFO delete mode 100644 coreutils-uutils-selinux/.gitignore delete mode 100644 coreutils-uutils-selinux/0001-update-selinux-progs.patch delete mode 100644 coreutils-uutils-selinux/PKGBUILD create mode 100644 coreutils-uutils/build-stty.patch diff --git a/coreutils-uutils-libselinux/.SRCINFO b/coreutils-uutils-libselinux/.SRCINFO new file mode 100644 index 0000000..82dba08 --- /dev/null +++ b/coreutils-uutils-libselinux/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = coreutils-uutils-libselinux + pkgdesc = (warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils installed as system core utilities. Built with libselinux for the chcon, runcon, and stty binaries + pkgver = 0.1.0 + pkgrel = 1 + url = https://github.com/uutils/coreutils + arch = x86_64 + license = GPL3 + license = MIT + makedepends = cargo + makedepends = clang + makedepends = python-sphinx + makedepends = rust + depends = gcc-libs + depends = glibc + depends = libselinux + depends = oniguruma + provides = coreutils + provides = b3sum + provides = sha3sum + conflicts = coreutils + conflicts = b3sum + conflicts = sha3sum + 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 + sha256sums = 55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8 + sha256sums = d8290988c9c8275e2087f1a63d63c420c88ebcf7c50aed0ef53d9dcd46517b36 + +pkgname = coreutils-uutils-libselinux diff --git a/coreutils-uutils-libselinux/.gitignore b/coreutils-uutils-libselinux/.gitignore new file mode 100644 index 0000000..8d78c83 --- /dev/null +++ b/coreutils-uutils-libselinux/.gitignore @@ -0,0 +1,3 @@ +pkg/ +src/ +*.tar* diff --git a/coreutils-uutils-libselinux/0001-update-selinux-progs.patch b/coreutils-uutils-libselinux/0001-update-selinux-progs.patch new file mode 100644 index 0000000..aee086f --- /dev/null +++ b/coreutils-uutils-libselinux/0001-update-selinux-progs.patch @@ -0,0 +1,12 @@ +--- 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-libselinux/PKGBUILD b/coreutils-uutils-libselinux/PKGBUILD new file mode 100644 index 0000000..d5c7a84 --- /dev/null +++ b/coreutils-uutils-libselinux/PKGBUILD @@ -0,0 +1,81 @@ +# Maintainer: kj_sh604 <406hs_jk@proton.me> + +pkgname=coreutils-uutils-libselinux +pkgver=0.1.0 +pkgrel=1 +pkgdesc='(warning: use at own risk) Cross-platform Rust rewrite of the GNU +coreutils installed as system core utilities. Built with libselinux for the +chcon and runcon binaries' +arch=('x86_64') +license=('GPL3' 'MIT') +url='https://github.com/uutils/coreutils' +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') + + prepare() { + cd ${pkgname%-uutils-libselinux}-${pkgver} + # patch SELINUX_PROGS to include stty + patch -Np1 -i ../../0001-update-selinux-progs.patch +} + +package() { + cd ${pkgname%-uutils-libselinux}-${pkgver} + export RUSTONIG_DYNAMIC_LIBONIG=1 + make install \ + USE=selinux \ + DESTDIR="$pkgdir" \ + PREFIX=/usr \ + MANDIR=/share/man/man1 \ + PROG_PREFIX= \ + PROFILE=release \ + MULTICALL=y + # add libstdbuf.so + mkdir -p $pkgdir/usr/lib/coreutils + cd $srcdir && cd ${pkgname%-uutils-libselinux}-${pkgver}/target/release/deps + mv liblibstdbuf.so $pkgdir/usr/lib/coreutils/libstdbuf.so + # clean conflicts (archlinux 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" + ) + for bin in "${binaries[@]}"; do + ln -s coreutils "$bin" || echo "warning: failed to create symlink for $bin" + done + else + echo "coreutils binary not found, skipping symlink creation." + fi + # additional cleanup + rm $pkgdir/usr/share/bash-completion/completions/* + rm $pkgdir/usr/share/man/man1/{groups.1,hostname.1,install.1,kill.1,more.1,uptime.1} +} + +# vim: ts=2 sw=2 et: diff --git a/coreutils-uutils-selinux/.SRCINFO b/coreutils-uutils-selinux/.SRCINFO deleted file mode 100644 index d2548c8..0000000 --- a/coreutils-uutils-selinux/.SRCINFO +++ /dev/null @@ -1,28 +0,0 @@ -pkgbase = coreutils-uutils-selinux - pkgdesc = (warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils installed as system core utilities. Built with libselinux for the chcon, runcon, and stty binaries - pkgver = 0.1.0 - pkgrel = 1 - url = https://github.com/uutils/coreutils - arch = x86_64 - license = GPL3 - license = MIT - makedepends = cargo - makedepends = clang - makedepends = python-sphinx - makedepends = rust - depends = gcc-libs - depends = glibc - depends = libselinux - depends = oniguruma - provides = coreutils - provides = b3sum - provides = sha3sum - conflicts = coreutils - conflicts = b3sum - conflicts = sha3sum - 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 - sha256sums = 55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8 - sha256sums = d8290988c9c8275e2087f1a63d63c420c88ebcf7c50aed0ef53d9dcd46517b36 - -pkgname = coreutils-uutils-selinux diff --git a/coreutils-uutils-selinux/.gitignore b/coreutils-uutils-selinux/.gitignore deleted file mode 100644 index 8d78c83..0000000 --- a/coreutils-uutils-selinux/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -pkg/ -src/ -*.tar* diff --git a/coreutils-uutils-selinux/0001-update-selinux-progs.patch b/coreutils-uutils-selinux/0001-update-selinux-progs.patch deleted file mode 100644 index aee086f..0000000 --- a/coreutils-uutils-selinux/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-selinux/PKGBUILD b/coreutils-uutils-selinux/PKGBUILD deleted file mode 100644 index 31445eb..0000000 --- a/coreutils-uutils-selinux/PKGBUILD +++ /dev/null @@ -1,81 +0,0 @@ -# Maintainer: kj_sh604 <406hs_jk@proton.me> - -pkgname=coreutils-uutils-selinux -pkgver=0.1.0 -pkgrel=1 -pkgdesc='(warning: use at own risk) Cross-platform Rust rewrite of the GNU -coreutils installed as system core utilities. Built with libselinux for the -chcon, runcon, and stty binaries' -arch=('x86_64') -license=('GPL3' 'MIT') -url='https://github.com/uutils/coreutils' -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') - - prepare() { - cd ${pkgname%-uutils-selinux}-${pkgver} - # patch SELINUX_PROGS to include stty - patch -Np1 -i ../../0001-update-selinux-progs.patch -} - -package() { - cd ${pkgname%-uutils-selinux}-${pkgver} - export RUSTONIG_DYNAMIC_LIBONIG=1 - make install \ - USE=selinux \ - DESTDIR="$pkgdir" \ - PREFIX=/usr \ - MANDIR=/share/man/man1 \ - PROG_PREFIX= \ - PROFILE=release \ - MULTICALL=y - # add libstdbuf.so - mkdir -p $pkgdir/usr/lib/coreutils - cd $srcdir && cd ${pkgname%-uutils-selinux}-${pkgver}/target/release/deps - mv liblibstdbuf.so $pkgdir/usr/lib/coreutils/libstdbuf.so - # clean conflicts (archlinux 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" - ) - for bin in "${binaries[@]}"; do - ln -s coreutils "$bin" || echo "warning: failed to create symlink for $bin" - done - else - echo "coreutils binary not found, skipping symlink creation." - fi - # additional cleanup - rm $pkgdir/usr/share/bash-completion/completions/* - rm $pkgdir/usr/share/man/man1/{groups.1,hostname.1,install.1,kill.1,more.1,uptime.1} -} - -# vim: ts=2 sw=2 et: diff --git a/coreutils-uutils/.SRCINFO b/coreutils-uutils/.SRCINFO index bfe88c7..4bfe942 100644 --- a/coreutils-uutils/.SRCINFO +++ b/coreutils-uutils/.SRCINFO @@ -1,5 +1,5 @@ pkgbase = coreutils-uutils - pkgdesc = (warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils installed as system core utilities. This package does NOT build chcon, runcon, and stty + pkgdesc = (warning: use at own risk) Cross-platform Rust rewrite of the GNU coreutils installed as system core utilities. This PKGBUID does NOT build chcon and runcon pkgver = 0.1.0 pkgrel = 3 url = https://github.com/uutils/coreutils @@ -21,6 +21,7 @@ pkgbase = coreutils-uutils conflicts = sha3sum source = uutils-coreutils-0.1.0.tar.gz::https://github.com/uutils/coreutils/archive/0.1.0.tar.gz source = disable_selinux.patch + source = build-stty.patch sha256sums = 55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8 sha256sums = 302614165d99f04600627222ddad0444a0144fcad6a1ff59ad43fb0b3162060e diff --git a/coreutils-uutils/PKGBUILD b/coreutils-uutils/PKGBUILD index 7c9ef65..5456438 100644 --- a/coreutils-uutils/PKGBUILD +++ b/coreutils-uutils/PKGBUILD @@ -4,8 +4,8 @@ pkgname=coreutils-uutils pkgver=0.1.0 pkgrel=3 pkgdesc='(warning: use at own risk) Cross-platform Rust rewrite of the GNU -coreutils installed as system core utilities. This package does NOT build -chcon, runcon, and stty' +coreutils installed as system core utilities. This PKGBUID does NOT build +chcon and runcon' arch=('x86_64') license=('GPL3' 'MIT') url='https://github.com/uutils/coreutils' @@ -31,16 +31,16 @@ makedepends=( rust ) source=("uutils-coreutils-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" - disable_selinux.patch) + disable_selinux.patch + build-stty.patch) sha256sums=('55c528f2b53c1b30cb704550131a806e84721c87b3707b588a961a6c97f110d8' '302614165d99f04600627222ddad0444a0144fcad6a1ff59ad43fb0b3162060e') prepare() { - cd ${pkgname%-uutils}-${pkgver} - # 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 + cd ${pkgname%-uutils}-${pkgver} + patch -Np1 -i $srcdir/disable_selinux.patch + patch -Np1 -i $srcdir/build-stty.patch + } package() { diff --git a/coreutils-uutils/build-stty.patch b/coreutils-uutils/build-stty.patch new file mode 100644 index 0000000..b08c8fd --- /dev/null +++ b/coreutils-uutils/build-stty.patch @@ -0,0 +1,30 @@ +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -75,8 +75,8 @@ + PROGS := \ + base32 \ + base64 \ +- basenc \ + basename \ ++ basenc \ + cat \ + cksum \ + comm \ +@@ -108,8 +108,8 @@ + more \ + mv \ + nl \ +- numfmt \ + nproc \ ++ numfmt \ + od \ + paste \ + pr \ +@@ -127,6 +127,7 @@ + sleep \ + sort \ + split \ ++ stty \ + sum \ + sync \ + tac \ -- cgit v1.2.3