From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qDBqCBIPu15CZgAA0tVLHw (envelope-from ) for ; Tue, 12 May 2020 21:03:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WPXUIyAPu14OMgAAbx9fmQ (envelope-from ) for ; Tue, 12 May 2020 21:03:28 +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 000D5940058 for ; Tue, 12 May 2020 21:03:25 +0000 (UTC) Received: from localhost ([::1]:38060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYc3i-0005Z9-U5 for larch@yhetil.org; Tue, 12 May 2020 17:03:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYc3N-0005EM-7D for guix-patches@gnu.org; Tue, 12 May 2020 17:03:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45093) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYc3K-0000w3-Gz for guix-patches@gnu.org; Tue, 12 May 2020 17:03:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYc3K-0007gp-D7 for guix-patches@gnu.org; Tue, 12 May 2020 17:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41192] [PATCH v2 1/2] gnu: Add openresolv. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 May 2020 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41192 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41192@debbugs.gnu.org Cc: leo@famulari.name Received: via spool by 41192-submit@debbugs.gnu.org id=B41192.158931734029488 (code B ref 41192); Tue, 12 May 2020 21:03:02 +0000 Received: (at 41192) by debbugs.gnu.org; 12 May 2020 21:02:20 +0000 Received: from localhost ([127.0.0.1]:56636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYc2V-0007fO-TL for submit@debbugs.gnu.org; Tue, 12 May 2020 17:02:20 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:57715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYc2Q-0007eW-Ku for 41192@debbugs.gnu.org; Tue, 12 May 2020 17:02:09 -0400 X-Originating-IP: 78.237.113.178 Received: from localhost (luy13-1-78-237-113-178.fbx.proxad.net [78.237.113.178]) (Authenticated sender: brice@waegenei.re) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 9178A1BF203; Tue, 12 May 2020 21:01:59 +0000 (UTC) From: Brice Waegeneire Date: Tue, 12 May 2020 23:01:51 +0200 Message-Id: <20200512210152.11991-2-brice@waegenei.re> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512210152.11991-1-brice@waegenei.re> References: <20200512210152.11991-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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-Scanner: scn0 X-Spam-Score: -0.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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-Scan-Result: default: False [-0.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.53966291901778]; HAS_XOIP(0.00)[]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.06), country: US(-0.00), ip: 209.51.188.17(-0.54)]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; RCPT_COUNT_TWO(0.00)[2]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[brice@waegenei.re,guix-patches-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; URIBL_BLOCKED(0.00)[interia.pl:email,protonmail.com:email,marples.name:url,waegenei.re:email,famulari.name:email,gmx.com:email,resolvconf.in:url,posteo.net:email,systemreboot.net:email]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[waegenei.re]; HAS_LIST_UNSUB(-0.01)[]; DNSWL_BLOCKED(0.00)[209.51.188.17:from]; MID_CONTAINS_FROM(1.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: FSJqk2Dyajf8 * gnu/packages/dns.scm (openresolv): New variable. --- gnu/local.mk | 2 ++ gnu/packages/dns.scm | 32 +++++++++++++++++ .../patches/openresolv-restartcmd-guix.patch | 34 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/openresolv-restartcmd-guix.patch diff --git a/gnu/local.mk b/gnu/local.mk index 90c1c64888..48169fcdb6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -34,6 +34,7 @@ # Copyright © 2020 Felix Gruber # Copyright © 2020 Ryan Prior # Copyright © 2020 Jan Wielkiewicz +# Copyright © 2020 Brice Waegeneire # # This file is part of GNU Guix. # @@ -1323,6 +1324,7 @@ dist_patch_DATA = \ %D%/packages/patches/openmpi-mtl-priorities.patch \ %D%/packages/patches/openocd-nrf52.patch \ %D%/packages/patches/openssh-hurd.patch \ + %D%/packages/patches/openresolv-restartcmd-guix.patch \ %D%/packages/patches/openssl-runpath.patch \ %D%/packages/patches/openssl-1.1-c-rehash-in.patch \ %D%/packages/patches/openssl-c-rehash-in.patch \ diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 7ac1611cbf..2ab512f8ac 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Pierre Langlois ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Leo Famulari +;;; Copyright © 2020 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -1001,3 +1002,34 @@ known public suffixes.") consists of a UDP-only authoritative DNS server for hosting domains, and a UDP and TCP-capable recursive DNS server for finding domains on the internet.") (license license:bsd-2))) + +(define-public openresolv + (package + (name "openresolv") + (version "3.10.0") + (source (origin + (method url-fetch) + (uri (string-append "https://roy.marples.name/downloads/openresolv/" + "openresolv-" version ".tar.xz")) + (sha256 + (base32 + "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20")) + (patches + (search-patches "openresolv-restartcmd-guix.patch")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; No test suite + #:configure-flags + (list (string-append "--sysconfdir=/etc")) + #:make-flags + (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc")))) + (home-page "https://roy.marples.name/projects/openresolv/") + (synopsis "A POSIX resolvconf implementation, a middleman for resolv.conf") + (description "openresolv is an implementation of @command{resolvconf}, the +the middleman between the network configuration services and +@file{/etc/resolv.conf}. @command{resolvconf} itself is just a script that +stores, removes and lists a full @file{resolv.conf} generated for the +interface. It then calls all the helper scripts it knows about so it can +configure the real @file{/etc/resolv.conf} and optionally any local +nameservers other than libc.") + (license license:bsd-2))) diff --git a/gnu/packages/patches/openresolv-restartcmd-guix.patch b/gnu/packages/patches/openresolv-restartcmd-guix.patch new file mode 100644 index 0000000000..ad70ebd6f2 --- /dev/null +++ b/gnu/packages/patches/openresolv-restartcmd-guix.patch @@ -0,0 +1,34 @@ +From 7f0ce36828ec1e130bee857b8236ca091e4d8a2c Mon Sep 17 00:00:00 2001 +From: Brice Waegeneire +Date: Sat, 9 May 2020 15:52:06 +0200 +Subject: [PATCH] Add RESTARTCMD for Guix System. + +--- + +openresolv need to know how to restart the nscd service, this patch teach it +to do it on Guix System by using shepherd. + + resolvconf.in | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/resolvconf.in b/resolvconf.in +index 3cad04d..5ef5294 100644 +--- a/resolvconf.in ++++ b/resolvconf.in +@@ -369,6 +369,13 @@ detect_init() + then + /etc/rc.d/$1 restart + fi' ++ elif [ -e /gnu/store ] && [ -e /run/current-system/profile ]; then ++ # Guix System ++ RESTARTCMD=' ++ if /run/current-system/profile/bin/herd status $1 2>&1 ++ then ++ /run/current-system/profile/bin/herd restart $1 ++ fi' + else + for x in /etc/init.d/rc.d /etc/rc.d /etc/init.d; do + [ -d $x ] || continue +-- +2.26.0 + -- 2.26.2