[PATCH 0/2] gnu: Add chimerautils.

  • Open
  • quality assurance status badge
Details
One participant
  • soeren
Owner
unassigned
Submitted by
soeren
Severity
normal
S
S
soeren wrote 2 days ago
(address . guix-patches@gnu.org)
cover.1736672673.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

This patchseries adds a package for chimerautils, the FreeBSD-based
Linux userland from Chimera Linux [1]. This userland can be used as
an alternative to coreutils/util-linux/findutils/... within a user's
profile. In that sense, it is similar to existing packages such as
sbase or BusyBox.

It requires packaging libxo, which is not packaged so far. Further,
I backported a patch which fixes compatibility of Chimera's find(1)
implementation with GNU getopt(3).


Sören Tempel (2):
gnu: Add libxo.
gnu: Add chimerautils.

gnu/local.mk | 1 +
gnu/packages/admin.scm | 36 +++++++++++++++++++
.../chimerautils-find-getopt-fix.patch | 25 +++++++++++++
gnu/packages/textutils.scm | 25 +++++++++++++
4 files changed, 87 insertions(+)
create mode 100644 gnu/packages/patches/chimerautils-find-getopt-fix.patch


base-commit: 5d6c8767f67885bc9b2c8f18ab1f667d0065346b
S
S
soeren wrote 2 days ago
[PATCH 1/2] gnu: Add libxo.
(address . 75508@debbugs.gnu.org)
5a1ed57719c244d292b02447f869232b45abd08c.1736672673.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/textutils.scm (libxo): New procedure.
---
gnu/packages/textutils.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 6091d1ea6d4..d33dcb6f093 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -334,6 +334,31 @@ (define-public libgtextutils
the Hannon Lab.")
(license license:agpl3+)))
+(define-public libxo
+ (package
+ (name "libxo")
+ (version "1.7.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Juniper/libxo")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "115jv067msym0lsxkiz95ddvspd6smvww37248xkqyin0rxb2m0j"))))
+ (build-system gnu-build-system)
+ (native-inputs (list autoconf automake libtool))
+ (home-page "http://juniper.github.io/libxo/libxo-manual.html")
+ (synopsis "Library for Generating Text, XML, JSON, and HTML Output")
+ (description
+ "This library allows an application to generate text, XML,
+JSON, and HTML output using a common set of function calls. The application
+decides at run time which output style should be produced. The application
+calls a function @code{xo_emit} to product output that is described in a format
+string. A \"field descriptor\" tells libxo what the field is and what it means.")
+ (license license:bsd-2)))
+
(define-public cityhash
(let ((commit "8af9b8c"))
(package
S
S
soeren wrote 2 days ago
[PATCH 2/2] gnu: Add chimerautils.
(address . 75508@debbugs.gnu.org)
957ea4efbeb380dc25cfe177d94eb54f3dd06d50.1736672673.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/admin.scm (chimerautils): New procedure.
* gnu/packages/patches/chimerautils-find-getopt-fix.patch: New file.
* gnu/local.mk: Add new patch.
---
gnu/local.mk | 1 +
gnu/packages/admin.scm | 36 +++++++++++++++++++
.../chimerautils-find-getopt-fix.patch | 25 +++++++++++++
3 files changed, 62 insertions(+)
create mode 100644 gnu/packages/patches/chimerautils-find-getopt-fix.patch

Toggle diff (97 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 9201230f35f..54789bf62cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1075,6 +1075,7 @@ dist_patch_DATA = \
%D%/packages/patches/ceph-disable-cpu-optimizations.patch \
%D%/packages/patches/ceph-fix-for-newer-boost.patch \
%D%/packages/patches/cf-tool-add-languages.patch \
+ %D%/packages/patches/chimerautils-find-getopt-fix.patch \
%D%/packages/patches/chmlib-inttypes.patch \
%D%/packages/patches/cl-asdf-config-directories.patch \
%D%/packages/patches/clamav-config-llvm-libs.patch \
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 7fd05341993..a5383682720 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -154,6 +154,7 @@ (define-module (gnu packages admin)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages inkscape)
#:use-module (gnu packages kerberos)
+ #:use-module (gnu packages libedit)
#:use-module (gnu packages libbsd)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages libusb)
@@ -669,6 +670,41 @@ (define-public daemontools
(license license:public-domain)
(home-page "https://cr.yp.to/daemontools.html")))
+(define-public chimerautils
+ (package
+ (name "chimerautils")
+ (version "14.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/chimera-linux/chimerautils")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (patches (search-patches "chimerautils-find-getopt-fix.patch"))
+ (sha256
+ (base32 "1z23ii57r9li4ffk9fg8q5k6n74rkzvmj2v5bcwb7dgkjanmhrn5"))))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:tests? #f)) ;no test suite
+ (inputs (list (list zstd "lib")
+ zlib
+ ncurses
+ acl
+ libedit
+ libxo
+ openssl))
+ (native-inputs (list flex bison pkg-config))
+ (home-page "https://github.com/chimera-linux/chimerautils")
+ (synopsis "The FreeBSD-based core Linux userland from Chimera Linux")
+ (description
+ "This is a port of the FreeBSD userland for Linux provided by
+the Chimera Linux distribution. Essentially, it is a collection of UNIX tools
+such as @command{grep}, @command{cp}, @command{vi}, etc. and can be used as an
+alternative to the corresponding implementations from the GNU project.")
+ (license license:bsd-2)))
+
(define-public daemonize
(package
(name "daemonize")
diff --git a/gnu/packages/patches/chimerautils-find-getopt-fix.patch b/gnu/packages/patches/chimerautils-find-getopt-fix.patch
new file mode 100644
index 00000000000..8748b877a86
--- /dev/null
+++ b/gnu/packages/patches/chimerautils-find-getopt-fix.patch
@@ -0,0 +1,25 @@
+Patch-Source: https://github.com/chimera-linux/chimerautils/commit/b82903e6fbe37eb4feeeec259600611d46a71282
+
+By default, GNU getopt(3) will continue parsing options after the
+first nonoption. This behavior is incompatible with this find(1)
+implementation, causing parts of the expression to be parsed as
+(invalid) options.
+
+The behavior can be disabled by prefixing the option string with
+a `+` character. Other applets, such as flock or mcookie do it
+already so it would be cool to do this here too to make find(1)
+compatible with glibc.
+
+diff --git a/src.freebsd/findutils/find/main.c b/src.freebsd/findutils/find/main.c
+index 931d811..876d532 100644
+--- a/src.freebsd/findutils/find/main.c
++++ b/src.freebsd/findutils/find/main.c
+@@ -90,7 +90,7 @@ main(int argc, char *argv[])
+ p = start = argv;
+ Hflag = Lflag = 0;
+ ftsoptions = FTS_NOSTAT | FTS_PHYSICAL;
+- while ((ch = getopt(argc, argv, "EHLPXdf:sx")) != -1)
++ while ((ch = getopt(argc, argv, "+EHLPXdf:sx")) != -1)
+ switch (ch) {
+ case 'E':
+ regexp_flags |= REG_EXTENDED;
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75508@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75508
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch