From 27c8428b41b7ce37109503292309c6b570194d44 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 5 May 2026 17:40:52 -0300 Subject: gnu: Merge (gnu packages avahi) with (gnu packages dns). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dns.scm: Move to here... * gnu/packages/avahi.scm (avahi, nss-mdns): ...from here. New deprecated variables. Change-Id: I504e6d306d43b0642c8ad2cf91e048fdc401398f Merges: https://codeberg.org/guix/guix/pulls/8572 Reviewed-by: Maxim Cournoyer Reviewed-by: Ludovic Courtès Signed-off-by: Nguyễn Gia Phong --- gnu/packages/avahi.scm | 138 +++---------------------------------------------- gnu/packages/dns.scm | 119 ++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 133 deletions(-) diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index 79e1866b657..e7c597a49ef 100644 --- a/gnu/packages/avahi.scm +++ b/gnu/packages/avahi.scm @@ -1,10 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès -;;; Copyright © 2014 Mark H Weaver -;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2020 Marius Bakke -;;; Copyright © 2021 Maxime Devos -;;; Copyright © 2023 Janneke Nieuwenhuizen +;;; Copyright © 2026 Anderson Torres ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,129 +17,12 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages avahi) - #:use-module ((guix licenses) #:select (lgpl2.1+)) - #:use-module (guix packages) - #:use-module (guix gexp) - #:use-module (guix download) - #:use-module (guix utils) - #:use-module (guix build-system gnu) - #:use-module (gnu packages) - #:use-module (gnu packages bash) - #:use-module (gnu packages dbm) - #:use-module (gnu packages gettext) - #:use-module (gnu packages glib) - #:use-module (gnu packages libdaemon) - #:use-module (gnu packages libevent) - #:use-module (gnu packages linux) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages xml)) + #:use-module (guix deprecation)) -(define-public avahi - (package - (name "avahi") - (version "0.8") - (home-page "https://avahi.org") - (source (origin - (method url-fetch) - (uri (string-append home-page "/download/avahi-" - version ".tar.gz")) - (sha256 - (base32 - "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6")) - (patches (search-patches "avahi-localstatedir.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Fix version constraint in the avahi-libevent pkg-config file. - ;; This can be removed for Avahi versions > 0.8. - (substitute* "avahi-libevent.pc.in" - (("libevent-2\\.1\\.5") - "libevent >= 2.1.5")))))) - (build-system gnu-build-system) - (arguments - `(#:configure-flags '("--with-distro=none" - "--disable-static" - "--localstatedir=/var" ; for the DBus socket - "--disable-python" - "--disable-mono" - "--disable-doxygen-doc" - "--disable-xmltoman" - "--enable-tests" - "--disable-qt4" "--disable-qt5" - "--disable-gtk" "--disable-gtk3" - "--enable-compat-libdns_sd" - ,@(if (%current-target-system) - '("ac_cv_prog_have_pkg_config=yes") - '()) - ,@(if (or (%current-target-system) - (not (member (%current-system) - (package-supported-systems - libcap)))) - '("--disable-autoipd") - '()) - ,@(if (target-hurd?) - '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types") - '())) - #:modules ((srfi srfi-26) - (guix build utils) - (guix build gnu-build-system)) - #:phases - ,#~(modify-phases %standard-phases - (add-after 'patch-shebangs 'patch-more-shebangs - (lambda* (#:key inputs #:allow-other-keys) - (define path - `(,(dirname (search-input-file inputs "bin/sh")))) - (for-each - (cut patch-shebang <> path) - (find-files (string-append #$output "/etc/avahi")))))))) - (inputs - `(("bash-minimal" ,bash-minimal) - ("dbus" ,dbus) - ("expat" ,expat) - ("gdbm" ,gdbm) - ("glib" ,glib) - ;; Do not use libcap when cross-compiling since it's not quite - ;; cross-compilable; and use it only for supported systems. - ,@(if (and (not (%current-target-system)) - (member (%current-system) - (package-supported-systems libcap))) - `(("libcap" ,libcap)) ;to enable chroot support in avahi-daemon - '()) - ("libdaemon" ,libdaemon) - ("libevent" ,libevent))) - (native-inputs - `(("gettext" ,gettext-minimal) - ("glib" ,glib "bin") - ("pkg-config" ,pkg-config))) - (synopsis "Implementation of mDNS/DNS-SD protocols") - (description - "Avahi is a system which facilitates service discovery on a local -network. It is an implementation of the mDNS (for \"Multicast DNS\") and -DNS-SD (for \"DNS-Based Service Discovery\") protocols.") - (license lgpl2.1+))) +;; XXX: Deprecated on 2026-06-04. +(define-deprecated/public-alias avahi + (@ (gnu packages dns) avahi)) -(define-public nss-mdns - (package - (name "nss-mdns") - (version "0.14.1") - (home-page "https://github.com/lathiat/nss-mdns") - (source (origin - (method url-fetch) - (uri (string-append home-page "/releases/download/v" version "/" - name "-" version ".tar.gz")) - (sha256 - (base32 - "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2")))) - (build-system gnu-build-system) - (arguments - ;; The Avahi daemon socket is expected by 'configure.ac' to be at - ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in - ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit. - '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket"))) - (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in") - (description - "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch -(@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is -most often used in home and other small networks without a local name server, -to resolve host names in the @samp{.local} top-level domain.") - (license lgpl2.1+))) +;; XXX: Deprecated on 2026-06-04. +(define-deprecated/public-alias nss-mdns + (@ (gnu packages dns) nss-mdns)) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 883fab36cdf..d23bc290a65 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014 Ludovic Courtès +;;; Copyright © 2013-2015, 2017, 2018 Ludovic Courtès ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer -;;; Copyright © 2016 Mark H Weaver +;;; Copyright © 2014, 2016 Mark H Weaver ;;; Copyright © 2016, 2018 Ricardo Wurmus ;;; Copyright © 2015-2018, 2020 Efraim Flashner ;;; Copyright © 2016 John Darrington @@ -19,6 +19,7 @@ ;;; Copyright © 2020 Leo Famulari ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020 Simon South +;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021, 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Bruno Victal ;;; Copyright © 2023 Hilton Chain @@ -54,15 +55,17 @@ #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages datastructures) + #:use-module (gnu packages dbm) #:use-module (gnu packages documentation) #:use-module (gnu packages elf) #:use-module (gnu packages compiler-tools) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gcc) + #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages groff) - #:use-module (gnu packages groff) #:use-module (gnu packages gtk) + #:use-module (gnu packages libdaemon) #:use-module (gnu packages libedit) #:use-module (gnu packages libevent) #:use-module (gnu packages libidn) @@ -141,6 +144,90 @@ several concurrent calls. The package also includes several command-line utilities for use in scripts.") (license license:gpl3+))) +(define-public avahi + (package + (name "avahi") + (version "0.8") + (home-page "https://avahi.org") + (source (origin + (method url-fetch) + (uri (string-append home-page "/download/avahi-" + version ".tar.gz")) + (sha256 + (base32 + "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6")) + (patches (search-patches "avahi-localstatedir.patch")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fix version constraint in the avahi-libevent pkg-config file. + ;; This can be removed for Avahi versions > 0.8. + (substitute* "avahi-libevent.pc.in" + (("libevent-2\\.1\\.5") + "libevent >= 2.1.5")))))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags '("--with-distro=none" + "--disable-static" + "--localstatedir=/var" ; for the DBus socket + "--disable-python" + "--disable-mono" + "--disable-doxygen-doc" + "--disable-xmltoman" + "--enable-tests" + "--disable-qt4" "--disable-qt5" + "--disable-gtk" "--disable-gtk3" + "--enable-compat-libdns_sd" + ,@(if (%current-target-system) + '("ac_cv_prog_have_pkg_config=yes") + '()) + ,@(if (or (%current-target-system) + (not (member (%current-system) + (package-supported-systems + libcap)))) + '("--disable-autoipd") + '()) + ,@(if (target-hurd?) + '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types") + '())) + #:modules ((srfi srfi-26) + (guix build utils) + (guix build gnu-build-system)) + #:phases + ,#~(modify-phases %standard-phases + (add-after 'patch-shebangs 'patch-more-shebangs + (lambda* (#:key inputs #:allow-other-keys) + (define path + `(,(dirname (search-input-file inputs "bin/sh")))) + (for-each + (cut patch-shebang <> path) + (find-files (string-append #$output "/etc/avahi")))))))) + (inputs + `(("bash-minimal" ,bash-minimal) + ("dbus" ,dbus) + ("expat" ,expat) + ("gdbm" ,gdbm) + ("glib" ,glib) + ;; Do not use libcap when cross-compiling since it's not quite + ;; cross-compilable; and use it only for supported systems. + ,@(if (and (not (%current-target-system)) + (member (%current-system) + (package-supported-systems libcap))) + `(("libcap" ,libcap)) ;to enable chroot support in avahi-daemon + '()) + ("libdaemon" ,libdaemon) + ("libevent" ,libevent))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib" ,glib "bin") + ("pkg-config" ,pkg-config))) + (synopsis "Implementation of mDNS/DNS-SD protocols") + (description + "Avahi is a system which facilitates service discovery on a local +network. It is an implementation of the mDNS (for \"Multicast DNS\") and +DNS-SD (for \"DNS-Based Service Discovery\") protocols.") + (license license:lgpl2.1+))) + (define-public c-ares (package (name "c-ares") @@ -423,6 +510,32 @@ C it should be a lot faster than Perl.") (home-page "https://nlnetlabs.nl/projects/ldns/about/") (license license:bsd-3))) +(define-public nss-mdns + (package + (name "nss-mdns") + (version "0.14.1") + (home-page "https://github.com/lathiat/nss-mdns") + (source (origin + (method url-fetch) + (uri (string-append home-page "/releases/download/v" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2")))) + (build-system gnu-build-system) + (arguments + ;; The Avahi daemon socket is expected by 'configure.ac' to be at + ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in + ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit. + '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket"))) + (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in") + (description + "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch +(@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is +most often used in home and other small networks without a local name server, +to resolve host names in the @samp{.local} top-level domain.") + (license license:lgpl2.1+))) + (define-public dnssec-trigger (package (name "dnssec-trigger") -- cgit v1.2.3