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 OKYANUafuV6KWAAA0tVLHw (envelope-from ) for ; Mon, 11 May 2020 18:53:58 +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 +Ep7N1SfuV7IFgAAbx9fmQ (envelope-from ) for ; Mon, 11 May 2020 18:54:12 +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 7EFA5940BFF for ; Mon, 11 May 2020 18:54:10 +0000 (UTC) Received: from localhost ([::1]:56426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYDZ5-0004BZ-Bq for larch@yhetil.org; Mon, 11 May 2020 14:54:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYDYw-00042T-Jc for guix-patches@gnu.org; Mon, 11 May 2020 14:54:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYDYw-0003My-Aj for guix-patches@gnu.org; Mon, 11 May 2020 14:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYDYw-00048b-9w for guix-patches@gnu.org; Mon, 11 May 2020 14:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41192] [PATCH 1/2] gnu: Add openresolv. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 May 2020 18:54: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 X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158922321615859 (code B ref -1); Mon, 11 May 2020 18:54:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 May 2020 18:53:36 +0000 Received: from localhost ([127.0.0.1]:53274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYDYQ-00047e-Iq for submit@debbugs.gnu.org; Mon, 11 May 2020 14:53:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:33238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYDYF-00047D-V0 for submit@debbugs.gnu.org; Mon, 11 May 2020 14:53:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYDYF-0003Zd-NN for guix-patches@gnu.org; Mon, 11 May 2020 14:53:19 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:45983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYDYC-0003FU-Li for guix-patches@gnu.org; Mon, 11 May 2020 14:53:19 -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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 1B9F960005 for ; Mon, 11 May 2020 18:53:13 +0000 (UTC) From: Brice Waegeneire Date: Mon, 11 May 2020 20:53:09 +0200 Message-Id: <20200511185310.24537-1-brice@waegenei.re> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200511184312.21587-1-brice@waegenei.re> References: <20200511184312.21587-1-brice@waegenei.re> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.195; envelope-from=brice@waegenei.re; helo=relay3-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/11 14:53:14 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 X-Spam-Score: -2.6 (--) 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.54006104328997]; 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.07), country: US(-0.00), ip: 209.51.188.17(-0.54)]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; 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)[waegenei.re:email,famulari.name:email,interia.pl:email,systemreboot.net:email,resolvconf.in:url,protonmail.com:email,posteo.net:email,marples.name:url,gmx.com:email]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[waegenei.re]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; 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)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: EtgZqN7fIWAS * gnu/packages/dns.scm (openresolv): New variable. --- gnu/local.mk | 2 ++ gnu/packages/dns.scm | 34 +++++++++++++++++++ .../patches/openresolv-restartcmd-guix.patch | 30 ++++++++++++++++ 3 files changed, 66 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..c33f690b15 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,36 @@ 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 git-fetch) + (uri (git-reference + (url "git://roy.marples.name/openresolv.git") + (commit (string-append name "-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gh7d0lczpxcap4fsxlvy2jxk9km4dg0chidlmgfvxbq61xpagbl")) + (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..2fd0e87590 --- /dev/null +++ b/gnu/packages/patches/openresolv-restartcmd-guix.patch @@ -0,0 +1,30 @@ +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. + +--- + 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