From unknown Sun Jun 22 11:43:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41752] [PATCH] gnu: Add bash-hosts. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Jun 2020 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41752@debbugs.gnu.org Cc: Oleg Pykhalov X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159155428220335 (code B ref -1); Sun, 07 Jun 2020 18:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 18:24:42 +0000 Received: from localhost ([127.0.0.1]:54857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzy9-0005Hg-Cr for submit@debbugs.gnu.org; Sun, 07 Jun 2020 14:24:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:39194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzy7-0005HY-6B for submit@debbugs.gnu.org; Sun, 07 Jun 2020 14:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhzy6-0006IO-V9 for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:26 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:36199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhzy6-0007TV-5Y for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:26 -0400 Received: by mail-lj1-x244.google.com with SMTP id a25so17708336ljp.3 for ; Sun, 07 Jun 2020 11:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D+xxJeXiaEXlxNmIIr32vL8T0oOPh6+8KJTNbYdxbFI=; b=BOLaftroxs6Vu51f1IdeP4DjXzQMlcW/dJJYzApyl+HEf/pw6bLyRZX+alvzb7b4Hm 8aGwFvmz2Lp16BrUNoaEREYNJe6knKTts3Y3sVU8yMGWP+zLoyxshPTK0cffwI3j+p40 mfjlZ5lE6llp7aeH2of8ZfyZfSoxU6yLF+RL+LBmtS/Iqq8nQs6aHLfhhc4B41ulv3Lk U3gmnuZzrHxfZxba0fnHREBTmJOOG+yUM5+VIrxnhOrUzemOJ/Hv+rMSVS7KpqgfsVhR C2ftemc2Yc03oLa6hIXFFRniCwSZ43xo/XXwjE4vbU/GeqReQIfon+vrnoGZk1tw+M7r //VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D+xxJeXiaEXlxNmIIr32vL8T0oOPh6+8KJTNbYdxbFI=; b=hstCK50iaG23C84CWfkWqV9nB5SI0lBAsqgWhKsgaNV7Pdk0bYS47zf+gOYkk4UPsM YkUdcUBaazlq6Kax4KMZfwLoqU7OIxLnN4G+exmaxjvcscekHoHOHHSs9+14tFVsl1yH Tp+G9dE75LOh2ip2Ccbw2589blPwmn9OHiEMQlVkgNalpA91g+v3V+73h8mxRpmdSShu NrVZFEXpNJ7gSFJd3ZUtrNOawxIG0QlypcHyvD9nDM1hiI7LP5a26uNba0mw/THy+Jr3 AIwwxaYIa5RbJlux9Cz3SuoXgMyeuy0x13IkND9HOJVg9kyZBipNb76QckXvM+uCTkD4 EMbQ== X-Gm-Message-State: AOAM5313g6tmvYxnPk2x5dXFh9ZcyxA9hv9fU9baOZcW4kZJ23qEZxAH bHHBsViHh62Vjvp9rbgpmHtW6xcy X-Google-Smtp-Source: ABdhPJwRhZ4w6Vjo7vid3jkbpIQwGl8/BBccbT+u6is7mursOGoQFqVF7f1PBIAIU/6+rjUqvXd3CA== X-Received: by 2002:a2e:7f10:: with SMTP id a16mr5109832ljd.69.1591554264366; Sun, 07 Jun 2020 11:24:24 -0700 (PDT) Received: from localhost.localdomain (92-100-136-169.dynamic.avangarddsl.ru. [92.100.136.169]) by smtp.gmail.com with ESMTPSA id l14sm258267lja.2.2020.06.07.11.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 11:24:23 -0700 (PDT) From: Oleg Pykhalov Date: Sun, 7 Jun 2020 21:24:10 +0300 Message-Id: <20200607182410.4594-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=go.wigust@gmail.com; helo=mail-lj1-x244.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/admin.scm (bash-hosts): New variable. --- gnu/packages/admin.scm | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index bb93f7efb1..dd0ada0422 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -3841,3 +3841,46 @@ It supports mounting local filesystems of any kind the normal mount utility supports. It can also mount encrypted LUKS volumes using the password supplied by the user when logging in.") (license (list license:gpl2+ license:lgpl2.1+)))) + +(define-public bash-hosts + (package + (name "bash-hosts") + (version "3.5.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xwmx/hosts.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q02n28sng0757cgkkc7r45krs07j993k6sgyyp27n8v0l8q6fv4")))) + (build-system trivial-build-system) + (inputs + `(("bash" ,bash))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (copy-recursively (assoc-ref %build-inputs "source") ".") + (substitute* "hosts" + (("/usr/bin/env bash") + (string-append (assoc-ref %build-inputs "bash") + "/bin/bash"))) + (install-file "hosts" (string-append %output "/bin")) + (let ((bash-completion (string-append %output + "/etc/bash_completion.d"))) + (mkdir-p bash-completion) + (copy-file "etc/hosts-completion.bash" + (string-append bash-completion "/hosts"))) + #t))) + (home-page "https://github.com/xwmx/hosts/") + (synopsis "Command line hosts file editor in a single portable script") + (description "@code{hosts} is a command line program for managing hosts +file entries. @code{hosts} works with existing hosts files and entries, +making it easier to add, remove, comment, and search hosts file entries using +simple, memorable commands. @code{hosts} is designed to be lightweight, easy +to use, and contained in a single, portable script that can be curled into any +environment.") + (license license:expat))) -- 2.26.2 From unknown Sun Jun 22 11:43:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41752] [PATCH] gnu: Add bash-hosts. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Jun 2020 19:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 41752@debbugs.gnu.org Received: via spool by 41752-submit@debbugs.gnu.org id=B41752.15915579252032 (code B ref 41752); Sun, 07 Jun 2020 19:26:03 +0000 Received: (at 41752) by debbugs.gnu.org; 7 Jun 2020 19:25:25 +0000 Received: from localhost ([127.0.0.1]:54930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji0v6-0000Wi-Tb for submit@debbugs.gnu.org; Sun, 07 Jun 2020 15:25:25 -0400 Received: from tobias.gr ([80.241.217.52]:36112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji0v4-0000WP-7o for 41752@debbugs.gnu.org; Sun, 07 Jun 2020 15:25:23 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 83531a76; Sun, 7 Jun 2020 19:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=nSFSDUE+a+YR7qkCUi4bAz xTWd9CVt2g61+0eSSIaRA=; b=cL3FXWnJyF+aLdsYGwxmeDlho0F1ECXFbYy6nC CLW7xRKgnl5Zl17MksgfcJS9wC0uembRiSfI/mybWRq61U778PDkUOS1khl+cLAH WegMs8fj3TwF0/zoPZ8Y5x95mr/KLjOaJbbi0WqkIlgN4g+6haWj9pc+F2/ORzo+ 1tezCgJqRNkQT24KjrUoN1dDXNA9RGHPZN54zF2XKi9Eoswlu3QecPj7LoV4VaF/ QR3E1Vgd6mzTPf4O1hnrchTveaxYPmNArcL7ycDItR95h2y8AT8DMBLrwxf/e3gu 9C2QGDQ3RNXZ40PVu8fOgKB4tVPMlcweKE7N2EnQu8f8ZbJg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 310c8234 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 7 Jun 2020 19:25:27 +0000 (UTC) From: Tobias Geerinckx-Rice References: <20200607182410.4594-1-go.wigust@gmail.com> In-reply-to: <20200607182410.4594-1-go.wigust@gmail.com> Date: Sun, 07 Jun 2020 21:25:18 +0200 Message-ID: <87d06a8yqp.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Oleg, Oleg Pykhalov =E5=86=99=E9=81=93=EF=BC=9A > * gnu/packages/admin.scm (bash-hosts): New variable. Thanks! The package should be called just =E2=80=98hosts=E2=80=99. > +(define-public bash-hosts > + (package > + (name "bash-hosts") > + (version "3.5.1") > + (source (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/xwmx/hosts.git") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > +=20 > "0q02n28sng0757cgkkc7r45krs07j993k6sgyyp27n8v0l8q6fv4")))) > + (build-system trivial-build-system) > + (inputs > + `(("bash" ,bash))) Like all non-trivial shell scripts it assumes coreutils are=20 present. It also hard-depends on ncurses (for tput), gawk, sed, &=20 grep. You can substitute* these as well, or use wrap-script=20 (which requires adding guile-3.0) since =E2=80=98performance=E2=80=99 proba= bly=20 doesn't matter here. But read on. Keeping optional dependencies (like sudo) up to the user is good. > + (arguments > + `(#:modules ((guix build utils)) > + #:builder > + (begin > + (use-modules (guix build utils)) > + (copy-recursively (assoc-ref %build-inputs "source")=20 > ".") > + (substitute* "hosts" > + (("/usr/bin/env bash") > + (string-append (assoc-ref %build-inputs "bash") > + "/bin/bash"))) > + (install-file "hosts" (string-append %output "/bin")) We should copy LICENSE and README to /share/doc/,name-,version=20 too. > + (let ((bash-completion (string-append %output > +=20 > "/etc/bash_completion.d"))) > + (mkdir-p bash-completion) > + (copy-file "etc/hosts-completion.bash" > + (string-append bash-completion=20 > "/hosts"))) > + #t))) > + (home-page "https://github.com/xwmx/hosts/") > + (synopsis "Command line hosts file editor in a single=20 > portable script") I don't think =E2=80=98in a single portable script=E2=80=99 (like =E2=80=98= Free=E2=80=99 or=20 =E2=80=98cross-platform=E2=80=99 or =E2=80=98now contains Rust!=E2=80=99) a= dds value here. Write=20 @file{hosts} for clarity. > + (description "@code{hosts} is a command line program @code{hosts} should be either @command{hosts} or simply =E2=80=98Hosts=E2= =80=99.=20 I favour the latter, at least for this occurrence. > for managing hosts file entries. You can use @file{/etc/hosts} mark-up here too to make up for it. > @code{hosts} works with existing hosts files and entries, Nitpick: every sentence starting with =E2=80=98Hosts=E2=80=99 sounds odd to= me.=20 This could start with =E2=80=98It=E2=80=99. > +making it easier to add, remove, comment, and search hosts file=20 > entries using > +simple, memorable commands. @code{hosts} is designed to be=20 > lightweight, easy > +to use, and contained in a single, portable script that can be=20 > curled into any > +environment.") Users will have to invoke it as =E2=80=98sh ./hosts=E2=80=99 to skip the pa= tched=20 shebang, but it would work. If we patch or wrap it to include=20 store patch for all dependencies it won't be true at all. If this feature matters to you, I think you could do something=20 like (substitute* "hosts" (("#!/usr/bin/env bash") (string-append "#! "(assoc-ref %build-inputs "bash") "/bin/bash\n" ;; Just a rough example. "PATH=3D\"" (getenv "PATH") ":$PATH\""))) To avoid a separate .hosts-real file and keep the script working=20 both in pure environments and when scp'd to random hosts. But Guix packages in general don't care about being self-contained=20 like this. Maybe it's not worth supporting; one can always curl=20 the unguixed original instead? > + (license license:expat))) I've opened a bug report about the unclear licencing:=20 . Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXt0/HgAKCRANsP+IT1Vt eYOxAPwK4G1Bn7K0qA5dvaoReEuj/pmhSwizpnGzToFx+unzwQEAlzPfO03h2rhg yiHjRPSyA8q9EZ2qbqZ+8eVIdUen0gM= =VGJw -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 11:43:10 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41752] [PATCH] gnu: Add bash-hosts. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Jun 2020 23:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41752 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov , 41752@debbugs.gnu.org Received: via spool by 41752-submit@debbugs.gnu.org id=B41752.159157352810602 (code B ref 41752); Sun, 07 Jun 2020 23:46:01 +0000 Received: (at 41752) by debbugs.gnu.org; 7 Jun 2020 23:45:28 +0000 Received: from localhost ([127.0.0.1]:55220 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji4ym-0002kv-MS for submit@debbugs.gnu.org; Sun, 07 Jun 2020 19:45:28 -0400 Received: from tobias.gr ([80.241.217.52]:42122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ji4yk-0002km-8N for 41752@debbugs.gnu.org; Sun, 07 Jun 2020 19:45:27 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id d39607b9; Sun, 7 Jun 2020 23:45:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=cPDHb7AsY5gBl2TMmLFrP/ h0MWlwy1D6JR7I23iKlvY=; b=W8IkwoIz+Mk/kA+pXS/sVi9ehcbwGixGeYSKj7 LHENFLSDz8xBFeUgtM1Ov2owU21zKHzlh43+7p1QTlwTVf3vbTYKZtsmsQhZDX2T vgV0Pi5am4X5KA9Lilo+agMg3znO6wMkaIFmaSGrGX1PIIHCrYlCJE2fYoRCzhMW izp66KVHGMDDIvIZFrcicyDPi2SCxaCqD5kGIWAPTKZ9boYMdUsvbcdZG0b4N3oT MsE2hwTEb1WRRIsXt+jVFxYgM+kRXeGNmDpOddvkv6rN5EqI2h3uRn9L0KvUGNBV pNJkkehFn7udxLzC2MRGzWC5WrK7tDZhjSs6trCSpmPLNNog== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 92962069 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Sun, 7 Jun 2020 23:45:31 +0000 (UTC) From: Tobias Geerinckx-Rice References: <20200607182410.4594-1-go.wigust@gmail.com> <87d06a8yqp.fsf@nckx> In-reply-to: <87d06a8yqp.fsf@nckx> Date: Mon, 08 Jun 2020 01:45:22 +0200 Message-ID: <877dwi8mp9.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Oleg Pykhalov =E5=86=99=E9=81=93=EF=BC=9A > + (name "bash-hosts") > + (version "3.5.1") There's now a 3.6.1 release that includes a licence header in the=20 script. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXt18EwAKCRANsP+IT1Vt ebcSAP42ioVJvAbJAnV2oQyMsF+SkuEx/RW6IXMjjh9wGtMTzQD+JDKV+nRg/IQy ZmzcWJAI1ozFX0OSQMz/fC9GWjOVAgU= =Cg9e -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 11:43:10 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Oleg Pykhalov Subject: bug#41752: closed (Re: [bug#41752] [PATCH] gnu: Add bash-hosts.) Message-ID: References: <87366cwikr.fsf@gmail.com> <20200607182410.4594-1-go.wigust@gmail.com> X-Gnu-PR-Message: they-closed 41752 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 41752@debbugs.gnu.org Date: Tue, 30 Jun 2020 17:49:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1593539342-6470-1" This is a multi-part message in MIME format... ------------=_1593539342-6470-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41752: [PATCH] gnu: Add bash-hosts. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41752@debbugs.gnu.org. --=20 41752: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41752 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1593539342-6470-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41752-done) by debbugs.gnu.org; 30 Jun 2020 17:48:49 +0000 Received: from localhost ([127.0.0.1]:51632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqKNE-0001fx-V8 for submit@debbugs.gnu.org; Tue, 30 Jun 2020 13:48:49 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:34921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqKND-0001fi-0j for 41752-done@debbugs.gnu.org; Tue, 30 Jun 2020 13:48:47 -0400 Received: by mail-lj1-f175.google.com with SMTP id f8so11340630ljc.2 for <41752-done@debbugs.gnu.org>; Tue, 30 Jun 2020 10:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KeCpG42gIQATQ4bPKofCtDmJ9qcqtcWQ0uUOWdv15VY=; b=qXq94cjLBbc0c5xEhDxIEUHzvBOCDpNb/QZWv4LhSxmm2AEUY0cdc6EPlj7zecTnJ3 ff8j907h3o4r+rdnDZxgxvwitGLUosCqyQwqQ3d8Gkw1bB4rzXSIeLmYqeb+825LJVwL b3O9KJ84/ibTt7GSaA3BWMy3OCWL1W99MxsLY7W4FiKTCjAFMYy7/OoI3HKGRPiY+Gc6 a8uAXuYWbfcCcF1n/1eXjCUqFGzL2r/2wXLJo/jfYIidxIDt63DJFW/WhlLwPfc0X47z 0CaeUJu7Hphko4mtpyZ4vV5z4Xjqo/lO4DyPV590LBOvUO+5fpIkF3q/RZ4BrjTkeFmw mwnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KeCpG42gIQATQ4bPKofCtDmJ9qcqtcWQ0uUOWdv15VY=; b=axma+EzGFZdUHwmasw4120oMCZLtkBGhMNlwfhQE3k/Aob6Iz34PtI3AW7DQPnEmt8 VMdeYA6jX+6BM88Vkc+mK+OqcHHe3h02hL5ojOKAJn1wI1daArI/axB7+98ediDsITUu ci5dcKnSQCP6jlRqEX44nl35ON1GRGX5wm2YrYq4zvaxrgBlF7paZmwITf5589ESJ6il AGjsSrmpaz13AOw69KMbeok3+BcnMJpBX7dKol0F6MNRezKaiTAPHZzSQToNAjMX8dfJ zjRlNxl9kpbR+8KF4X3q9tHGGdsx7+vQ2q2w7uXhz/D0XI9Us1CcdCBf00zpZldvp/JX ctkQ== X-Gm-Message-State: AOAM532Kjf3kH45K5hiIMsrGn0z+psDgTuVn6XPtKIzyHD0i/UJ0o89U YuxM7MW1S0QT1nlmHreho0zwhX1bD5c= X-Google-Smtp-Source: ABdhPJz2q2ODT9BdJK0XE5i+aPeub6IMiTuAFe77RUAcPIwRyRbLK+5LNZWz1I0fFsCqTuowDV9qnQ== X-Received: by 2002:a2e:858e:: with SMTP id b14mr11560814lji.301.1593539320479; Tue, 30 Jun 2020 10:48:40 -0700 (PDT) Received: from guixsd (ppp91-122-98-213.pppoe.avangarddsl.ru. [91.122.98.213]) by smtp.gmail.com with ESMTPSA id 25sm933652ljh.139.2020.06.30.10.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jun 2020 10:48:39 -0700 (PDT) From: Oleg Pykhalov To: Tobias Geerinckx-Rice Subject: Re: [bug#41752] [PATCH] gnu: Add bash-hosts. References: <20200607182410.4594-1-go.wigust@gmail.com> <87d06a8yqp.fsf@nckx> <877dwi8mp9.fsf@nckx> Date: Tue, 30 Jun 2020 20:48:36 +0300 In-Reply-To: <877dwi8mp9.fsf@nckx> (Tobias Geerinckx-Rice's message of "Mon, 08 Jun 2020 01:45:22 +0200") Message-ID: <87366cwikr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41752-done Cc: 41752-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello, Thank you for review! I applied all your suggestions, added ZSH completion and tests. Pushed as ceb233bb7642b2a7efec57073bf205b62ebd8f97. Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl77evQACgkQFn+OpQAa +pyQiw//R97OrohvVxSeH48CtDwPuqueAfD+UG0KEIclyWu1gv9YMu0RKcjuhix1 c6ajwPPdQ2TjFrpfaSkuv/UTGJMqXZCNCeOTVrIjWUH/tWZl8BJEixiwGgq0c7Rt W+b5H/31sUhELsuxArstfdpdfLRu0ckm5isu4mjCkcUUPLh1PFYzpITPpyZTQenp 8XggcqE3Z0FeDGyR5IZ1WPm2zFPlmHqInHivXpoNslohj9nz9SPjNNesm8UVkpC7 YtUTkDi6Z0b66HDiGWLbQ3utd6PL6FQ3AiWfKsjGnM+RGRG75yzXvy1VQfBP1hGF PJsR/OceN6PbpsfjwO1Ffc6S6kxhCgdxfoHyKB1X+5QYICEKUG8LekAp+ty4kSok lHSce9YGz7NhqKuVdaELMMRaNBabTB6+o+r2TNe/msj32rsMR/WfDw9DJg1Up2/8 NRrxYEreICY8oAewQuuaAVJY+PJWKVXqlnj0lw8lF9wYZCPXwXzufC69vNlSC+m4 b6Q5JN+EcoC3nLIUkfRy1a1B1tQMGKJSk0+gChqOltbFzVl0iFYJwL4zQnRRp6dG l4CZSE87Fz/js/U09nTy01hKHCVJuwcRR0jQ6F/WKtt1oLXnT0xbmtjv2Cu23zEY rE+uu78xzuz3tfod3kBGeYG5z7R6pi3nlM7qjhfvHqHDTrvT75o= =St33 -----END PGP SIGNATURE----- --=-=-=-- ------------=_1593539342-6470-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 18:24:42 +0000 Received: from localhost ([127.0.0.1]:54857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzy9-0005Hg-Cr for submit@debbugs.gnu.org; Sun, 07 Jun 2020 14:24:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:39194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzy7-0005HY-6B for submit@debbugs.gnu.org; Sun, 07 Jun 2020 14:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52942) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhzy6-0006IO-V9 for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:26 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:36199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhzy6-0007TV-5Y for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:26 -0400 Received: by mail-lj1-x244.google.com with SMTP id a25so17708336ljp.3 for ; Sun, 07 Jun 2020 11:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D+xxJeXiaEXlxNmIIr32vL8T0oOPh6+8KJTNbYdxbFI=; b=BOLaftroxs6Vu51f1IdeP4DjXzQMlcW/dJJYzApyl+HEf/pw6bLyRZX+alvzb7b4Hm 8aGwFvmz2Lp16BrUNoaEREYNJe6knKTts3Y3sVU8yMGWP+zLoyxshPTK0cffwI3j+p40 mfjlZ5lE6llp7aeH2of8ZfyZfSoxU6yLF+RL+LBmtS/Iqq8nQs6aHLfhhc4B41ulv3Lk U3gmnuZzrHxfZxba0fnHREBTmJOOG+yUM5+VIrxnhOrUzemOJ/Hv+rMSVS7KpqgfsVhR C2ftemc2Yc03oLa6hIXFFRniCwSZ43xo/XXwjE4vbU/GeqReQIfon+vrnoGZk1tw+M7r //VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=D+xxJeXiaEXlxNmIIr32vL8T0oOPh6+8KJTNbYdxbFI=; b=hstCK50iaG23C84CWfkWqV9nB5SI0lBAsqgWhKsgaNV7Pdk0bYS47zf+gOYkk4UPsM YkUdcUBaazlq6Kax4KMZfwLoqU7OIxLnN4G+exmaxjvcscekHoHOHHSs9+14tFVsl1yH Tp+G9dE75LOh2ip2Ccbw2589blPwmn9OHiEMQlVkgNalpA91g+v3V+73h8mxRpmdSShu NrVZFEXpNJ7gSFJd3ZUtrNOawxIG0QlypcHyvD9nDM1hiI7LP5a26uNba0mw/THy+Jr3 AIwwxaYIa5RbJlux9Cz3SuoXgMyeuy0x13IkND9HOJVg9kyZBipNb76QckXvM+uCTkD4 EMbQ== X-Gm-Message-State: AOAM5313g6tmvYxnPk2x5dXFh9ZcyxA9hv9fU9baOZcW4kZJ23qEZxAH bHHBsViHh62Vjvp9rbgpmHtW6xcy X-Google-Smtp-Source: ABdhPJwRhZ4w6Vjo7vid3jkbpIQwGl8/BBccbT+u6is7mursOGoQFqVF7f1PBIAIU/6+rjUqvXd3CA== X-Received: by 2002:a2e:7f10:: with SMTP id a16mr5109832ljd.69.1591554264366; Sun, 07 Jun 2020 11:24:24 -0700 (PDT) Received: from localhost.localdomain (92-100-136-169.dynamic.avangarddsl.ru. [92.100.136.169]) by smtp.gmail.com with ESMTPSA id l14sm258267lja.2.2020.06.07.11.24.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2020 11:24:23 -0700 (PDT) From: Oleg Pykhalov To: guix-patches@gnu.org Subject: [PATCH] gnu: Add bash-hosts. Date: Sun, 7 Jun 2020 21:24:10 +0300 Message-Id: <20200607182410.4594-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::244; envelope-from=go.wigust@gmail.com; helo=mail-lj1-x244.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit Cc: Oleg Pykhalov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * gnu/packages/admin.scm (bash-hosts): New variable. --- gnu/packages/admin.scm | 43 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index bb93f7efb1..dd0ada0422 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -3841,3 +3841,46 @@ It supports mounting local filesystems of any kind the normal mount utility supports. It can also mount encrypted LUKS volumes using the password supplied by the user when logging in.") (license (list license:gpl2+ license:lgpl2.1+)))) + +(define-public bash-hosts + (package + (name "bash-hosts") + (version "3.5.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xwmx/hosts.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q02n28sng0757cgkkc7r45krs07j993k6sgyyp27n8v0l8q6fv4")))) + (build-system trivial-build-system) + (inputs + `(("bash" ,bash))) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (copy-recursively (assoc-ref %build-inputs "source") ".") + (substitute* "hosts" + (("/usr/bin/env bash") + (string-append (assoc-ref %build-inputs "bash") + "/bin/bash"))) + (install-file "hosts" (string-append %output "/bin")) + (let ((bash-completion (string-append %output + "/etc/bash_completion.d"))) + (mkdir-p bash-completion) + (copy-file "etc/hosts-completion.bash" + (string-append bash-completion "/hosts"))) + #t))) + (home-page "https://github.com/xwmx/hosts/") + (synopsis "Command line hosts file editor in a single portable script") + (description "@code{hosts} is a command line program for managing hosts +file entries. @code{hosts} works with existing hosts files and entries, +making it easier to add, remove, comment, and search hosts file entries using +simple, memorable commands. @code{hosts} is designed to be lightweight, easy +to use, and contained in a single, portable script that can be curled into any +environment.") + (license license:expat))) -- 2.26.2 ------------=_1593539342-6470-1--