From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mFZNI152EGFPNQEAgWs5BA (envelope-from ) for ; Mon, 09 Aug 2021 02:27:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QKUAH152EGHnWQAA1q6Kng (envelope-from ) for ; Mon, 09 Aug 2021 00:27:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0E9E7115BB for ; Mon, 9 Aug 2021 02:27:10 +0200 (CEST) Received: from localhost ([::1]:56088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mCt8G-0003nJ-Ve for larch@yhetil.org; Sun, 08 Aug 2021 20:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mCt8A-0003nA-Q1 for guix-patches@gnu.org; Sun, 08 Aug 2021 20:27:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43536) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mCt8A-0006vJ-I9 for guix-patches@gnu.org; Sun, 08 Aug 2021 20:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mCt8A-0002Eh-Ck for guix-patches@gnu.org; Sun, 08 Aug 2021 20:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48369] [PATCH] gnu: Add rset. In-Reply-To: <20210511205831.165732-1-stefan@xsteve.at> Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 09 Aug 2021 00:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48369 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Stefan =?UTF-8?Q?Reich=C3=B6r?= Cc: 48369@debbugs.gnu.org Received: via spool by 48369-submit@debbugs.gnu.org id=B48369.16284687988564 (code B ref 48369); Mon, 09 Aug 2021 00:27:02 +0000 Received: (at 48369) by debbugs.gnu.org; 9 Aug 2021 00:26:38 +0000 Received: from localhost ([127.0.0.1]:55082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCt7m-0002E2-7X for submit@debbugs.gnu.org; Sun, 08 Aug 2021 20:26:38 -0400 Received: from out0.migadu.com ([94.23.1.103]:14618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCt7e-0002Do-Tm for 48369@debbugs.gnu.org; Sun, 08 Aug 2021 20:26:36 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1628468788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=DXNp6zKl1yBwGuWua8Hns1mPVpZOr0sjCd0Mej1tQL0=; b=DKZ1oPjOZgp+eXmJE4lUwWnlT1ifNzHLzEPBAytaBx0Rex4/7tHTIfYXjibW2BV0GyXMON bPS6Un7VzeYaAglAp+4pIVmooO3apNWn/jh2okt/LrL3LtvRqD7okKKw+lZSUp9Nhr5DNH NTQTctjbaBvHo/hWPJYGMY/wVeSVoHQ= From: Sarah Morgensen References: <20210511205831.165732-1-stefan@xsteve.at> Date: Sun, 08 Aug 2021 17:26:26 -0700 Message-ID: <867dgvlaz1.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Auth-User: iskarian@mgsn.dev 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628468830; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=DXNp6zKl1yBwGuWua8Hns1mPVpZOr0sjCd0Mej1tQL0=; b=ji8PqtHSEe4kJ+80p/Eb4nS8ruu3rbOAdIFwBanwFN3lkyOW2QeVWAql9OiRkNwwalFsZI 5sBPMRo5aT65EL1zPD9yi4I6fj7OMmeQbvKTxddEYeWeRTd7ipzIhjgChm4adF1Lm743oJ dCn5NBjeTTv4v8KxITSuWFTuXKAuvEBAaLnrDuA1vMSfkguo1rlZbH9p6AstfoSMUCEjr6 r3ugmMHirffHTJafN/UPDrKVg+SttaQSCkYClChByzsBuRMpMX42yNpkboPb6bWukpD3C3 +PHlpzkVGgAd6oLTo47F29taKrDjTJHutEOTe+MhFzHfgSoAGWEb8M4x27ZtDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628468830; a=rsa-sha256; cv=none; b=bCfAUi5KFDOT5XRCdoxiy6bNdB86jveu7hGPU/s44apRdFOsD2SrxOAHzV8nTnetGKtHrE YysImb4id4sIrMjVG7kDgLj/nn12nDHT6C6IQG2BOwFcVWvTKmMQIbd5ez/Humv0yy6bpn RAAIG1gmDbI+b3HBh3Uxnj2Q91Fg+A/dZwSX6aRS6q8AbRVwP4eCGaQyk2+80JrRJuqIWY hZj6ZYqQoExZ5+y/tHpRe+ch+fsuMmnnMkZ8xPTZUtvBb8qFk4SaN/dWvh4ILq+U/lwKHR u/s64uWoJiZqNF98nXMezgfF4nwBrVzzNdGv4gqqRYtZFF8CL97tLib/LOAP3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=DKZ1oPjO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=DKZ1oPjO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0E9E7115BB X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: QiTUrd9Eh8P4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Stefan, Thanks for the patch. Sorry it's taken so long for someone to take a look at this! This utility certainly looks interesting. I'm not a committer, but I tested out this patch. It doesn't apply on master anymore, so I manually applied it and was able to build it. However, it looks like it expects a number of utilities to be in specific places, such as /usr/bin/install (which caused rinstall to just... do nothing). It could also be problematic if it's attempting to invoke such absolute paths on a remote machine. I'm not sure exactly how rset works, though. I was able to enable and pass tests with the modifications in the patch attached below. I don't know rset itself though, so I don't know if there might be other hardcoded things that need to be substituted. I also bumped it to 2.2 and made a few minor tweaks to the description. I noticed you didn't add a copyright line, but I wasn't sure whether the omission was intentional, so I didn't add one for you. Go ahead and send an updated patch to this bug number (48369@debbugs.gnu.org) if you'd like to add one, or make any other changes :) The following is after the modifications I've made: * Package review checklist (WIP - comments welcome!) A check indicates that I've verified the item. 1. [X] Package builds (guix build package) [X] x86_64 [ ] aarch64 [ ] armhf [ ] powerpc64le [ ] i686 [ ] i586 [ ] mips64le 2. [X] Build is reproducible (guix build --rounds=3Dn package) 3. [X] Tests enabled (if available) or disabled with in-source comment 4. [X] No extraneous dependencies (guix size package) 5. [X] No unnecessary pre-built binaries/blobs 6. [X] Dependencies unvendored when available in Guix 7. [X] Cross-compile friendly (cc-for-target, patches with inputs) 8. [X] License matches source 9. [X] No problematic lints (guix lint package) 10. [X] Formatting follows guidelines - [X] Lines wrap at 80 characters - [X] Indentation passes etc/indent-code.el - [X] Two spaces used between sentences New packages: 11. [X] Source url is robust * mirror:// used with url-fetch when possible * No auto-generated archives from source repo (prefer cloning) 12. [X] Synopsis is short, descriptive, and meaningful to a wide audience 13. [X] Description is objective, takes 5-10 lines, uses full sentences, and provides the information users need to decide whether the software fits their needs. Stefan Reich=C3=B6r writes: > * gnu/packages/admin.scm (rset): New variable. > --- > gnu/packages/admin.scm | 35 +++++++++++++++++++++++++++++++++++ > 1 file changed, 35 insertions(+) > > diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm > index fdcbf28a6a..c17609c442 100644 > --- a/gnu/packages/admin.scm > +++ b/gnu/packages/admin.scm > @@ -3371,6 +3371,41 @@ Intel DRM Driver.") > (supported-systems '("i686-linux" "x86_64-linux")) > (license license:expat))) >=20=20 > +(define-public rset > + (package > + (name "rset") > + (version "2.1") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/eradman/rset/") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "150my3lvql3m6jn1c12x81jx990nqh5g02v6r9a5j51ds39shr39"))= )) > + (build-system gnu-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (replace 'configure > + (lambda* (#:key outputs #:allow-other-keys) > + (invoke "./configure")))) > + #:make-flags > + (list (string-append "PREFIX=3D" (assoc-ref %outputs "out")) > + ,(string-append "CC=3D" (cc-for-target))) > + #:tests? #f)) ; TODO: test target requires ruby, curl, uname > + (home-page "http://scriptedconfiguration.org") > + (synopsis "Configure systems using any scripting language") > + (description > + "rset(1) operates by staging files on a remote system, then executi= ng > +instructions embedded in the pln(5) files. Any interpreter capable of r= unning > +scripts read over a pipe may be specified. The bundled utilities rinsta= ll(1) > +and rsub(1) provide an easy means of installing and modifying configurat= ion > +files, and capabilities are added by writing utility scripts which are s= ent > +along with configuration data.") > + (license license:isc))) > + > (define-public fabric > (package > (name "fabric") --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-gnu-Add-rset.patch Content-Description: 0001-gnu-Add-rset.patch Subject: [PATCH] gnu: Add rset. * gnu/packages/admin.scm (rset): New variable. --- gnu/packages/admin.scm | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index eda269f148..4bf17d57e5 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -142,6 +142,7 @@ #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages web) + #:use-module (gnu packages wget) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -3425,6 +3426,84 @@ Intel DRM Driver.") (supported-systems '("i686-linux" "x86_64-linux")) (license license:expat))) +(define-public rset + (package + (name "rset") + (version "2.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/eradman/rset/") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0dk75an8axf4480lirwj1vyq1nd18kq5lwz6gdg6hgk3a4rwpv8j")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags (list (string-append "PREFIX=" %output) + (string-append "CC=" ,(cc-for-target))) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "rutils.c" + (("/usr/bin/install") + (string-append (assoc-ref inputs "coreutils") "/bin/install"))) + (substitute* "config.h" + (("(LOCAL_INTERPRETER \")/bin/sh" _ start) + (string-append start (assoc-ref inputs "bash") "/bin/sh"))) + ;; Paths on Guix tend to be much longer, so increase buffer size. + (substitute* "input.h" + (("#define PLN_OPTION_SIZE 64") + "#define PLN_OPTION_SIZE 128")))) + (add-after 'patch-paths 'patch-tests + (lambda _ + ;; Input files must be writable for pipe tests. + (for-each make-file-writable (find-files "tests/input")) + (substitute* (find-files "tests") + (("(#!|local_interpreter=)/bin/sh" _ start) + (string-append start (which "sh")))) + (substitute* '("tests/stubs/ssh" "tests/stubs/tar") + (("/bin/echo") (which "echo"))) + (substitute* "tests/test_miniquark.rb" + ;; Make sure the test can see PATH. + ((":unsetenv_others=>true") ":unsetenv_others=>false")) + (substitute* '("tests/cmd_pipe_stdin.c" "tests/test_rset.rb") + (("/bin/cat") (which "cat")) + ;; /bin/cat is in a fixed-size buffer, so increase the size. + (("char \\*cmd_argv\\[16\\];") "char *cmd_argv[256];")) + (substitute* "tests/test_rset.rb" + (("output_size: 20") "output_size: 66") + (("strlen: 20") "strlen: 66") + (("/usr/bin/env ruby") (which "ruby")) + (("\"/bin/sh") (string-append "\"" (which "sh"))) + ;; Make the sure the test can see our PATH. + (("\\{\"PATH\"=>\"/bin:/usr/bin\"\\}, ") "")))) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; ./configure must be called with no arguments, or it fails. + (invoke "./configure")))))) + (inputs + `(("coreutils" ,coreutils) + ("bash" ,bash-minimal))) + (native-inputs + `(("ruby" ,ruby) + ("wget" ,wget) + ("inetutils" ,inetutils))) + (home-page "http://scriptedconfiguration.org") + (synopsis "Configure systems using any scripting language") + (description + "@command{rset} operates by staging files on a remote system, then +executing instructions embedded in the @code{pln(5)} (Progressive Language +Notation) files. Any interpreter capable of running scripts read over a pipe +may be specified. The bundled utilities @command{rinstall} and @command{rsub} +provide a means of installing and modifying configuration files, and +capabilities are added by writing utility scripts which are sent along +with configuration data.") + (license license:isc))) + (define-public neofetch (package (name "neofetch") base-commit: c8e2be3b32fe784a9db52d8a1a12902ab12ae7cb -- 2.31.1 --=-=-= Content-Type: text/plain -- Sarah --=-=-=--