From patchwork Sun Jan 12 09:19:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=B6ren_Tempel?= X-Patchwork-Id: 36989 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A66D727BBE9; Sun, 12 Jan 2025 09:20:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CFF3627BBE2 for ; Sun, 12 Jan 2025 09:20:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWu8a-0000FV-3e; Sun, 12 Jan 2025 04:20:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWu8Z-0000Ea-2c for guix-patches@gnu.org; Sun, 12 Jan 2025 04:20:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWu8Y-0006pP-Pa for guix-patches@gnu.org; Sun, 12 Jan 2025 04:20:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=8ZNFNu8QaiesfLjr4173lOBCBPdEm1ByBYiM24/EuL4=; b=WI3sxrLdpvAOrP3qnjWrIMybn11tWWfUYIHDfvrfna5Dqjppx0dsfrmZwxZH6Eq+47ot0hGR8sdDpA1Uf0QUyf95YTzbcVUCszMESMTX0dv2Xdz+7F/4PEJJuaUEUmX8YinwHq+JqFYK+ycoIj55TdrITtdgsBdoXwi/X9jRvMql4MUP+iCTKtMEXvySe/0EvehVXrd7knsnpxRdma1R1SfDVlFpH0hMwEAQZyuPh2v5SuHICzzNVOrwLpAt6DAdSjlomsUoKRyVPxgGc3UpEd+i78qDvM/CAggb328KGFF6ASTe1n+A+RQdtBM8Ci4nMJ8r/5h5YOV84fliFDkh8g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tWu8Y-0007nf-Jx; Sun, 12 Jan 2025 04:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75508] [PATCH 2/2] gnu: Add chimerautils. Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: sharlatanus@gmail.com, guix-patches@gnu.org Resent-Date: Sun, 12 Jan 2025 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75508 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75508@debbugs.gnu.org Cc: Sharlatan Hellseher X-Debbugs-Original-Xcc: Sharlatan Hellseher Received: via spool by 75508-submit@debbugs.gnu.org id=B75508.173667358029939 (code B ref 75508); Sun, 12 Jan 2025 09:20:02 +0000 Received: (at 75508) by debbugs.gnu.org; 12 Jan 2025 09:19:40 +0000 Received: from localhost ([127.0.0.1]:46093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tWu8B-0007mo-SU for submit@debbugs.gnu.org; Sun, 12 Jan 2025 04:19:40 -0500 Received: from magnesium.8pit.net ([45.76.88.171]:37750) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tWu86-0007mQ-W2; Sun, 12 Jan 2025 04:19:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=8ZNFNu8Q aiesfLjr4173lOBCBPdEm1ByBYiM24/EuL4=; h=references:in-reply-to:date: subject:to:from; d=soeren-tempel.net; b=Pu2/+Ws6G4BLiqt81AOI2SYmk3TnD8 dZoZitZnFm7yUYeoworxlllpgw6WyLOY7yS8e3Kiyvo0qWLkd/l7P80iFDWDrTHwNJTUZV wrNkNphtWVtZu0NF8XOdOY/EBD8MUQ6KN3TIOkUoY8SL5rjFFY8l38gJtjlMl6uW4gn/xE M= Received: from localhost ( [2a02:560:4d3d:df00:a0e3:3d9b:43c1:9542]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 7e95a2c5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Sun, 12 Jan 2025 10:19:33 +0100 (CET) From: soeren@soeren-tempel.net Date: Sun, 12 Jan 2025 10:19:26 +0100 Message-ID: <957ea4efbeb380dc25cfe177d94eb54f3dd06d50.1736672673.git.soeren@soeren-tempel.net> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Sören Tempel * 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 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;