From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2CF601581FB for ; Sun, 1 Dec 2024 12:12:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E5E93E082F; Sun, 1 Dec 2024 12:12:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D8475E0833 for ; Sun, 1 Dec 2024 12:12:45 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1E009341939 for ; Sun, 1 Dec 2024 12:12:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7EA761E75 for ; Sun, 1 Dec 2024 12:12:43 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1733054942.df7eb9bcfa9ef003b6145b781a759cfad4739fcd.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/getdns/, net-dns/getdns/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-dns/getdns/Manifest net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch net-dns/getdns/files/stubby-0.4.3-install-dir.patch net-dns/getdns/getdns-1.7.3.ebuild net-dns/getdns/metadata.xml X-VCS-Directories: net-dns/getdns/ net-dns/getdns/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: df7eb9bcfa9ef003b6145b781a759cfad4739fcd X-VCS-Branch: master Date: Sun, 1 Dec 2024 12:12:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2bd6983d-c4a2-4a6e-996d-868ba10f804b X-Archives-Hash: 5ee2aa437349a6bee744460f359456d4 commit: df7eb9bcfa9ef003b6145b781a759cfad4739fcd Author: Han Mertens outlook com> AuthorDate: Thu Oct 17 19:09:28 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Dec 1 12:09:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df7eb9bc net-dns/getdns: add 1.7.3 Apart from the version bump, this - introduces the `minimal` USE flag to build in stub resolution mode only, removing the dependency on `net-dns/unbound` (bug 803497) - fixes installation paths of stubby (bugs 828724 and 857582) - fixes linking to `dev-libs/gmp` when linking to `net-libs/gnutls`; see https://github.com/gentoo/gentoo/pull/29459#pullrequestreview-1314483307 Bug: https://bugs.gentoo.org/803497 Closes: https://bugs.gentoo.org/828724 Closes: https://bugs.gentoo.org/857582 Signed-off-by: Han Mertens outlook.com> Closes: https://github.com/gentoo/gentoo/pull/39022 Signed-off-by: Sam James gentoo.org> net-dns/getdns/Manifest | 1 + .../getdns/files/getdns-1.7.3-cmake-linking.patch | 40 +++++++++ .../getdns/files/stubby-0.4.3-install-dir.patch | 28 +++++++ net-dns/getdns/getdns-1.7.3.ebuild | 97 ++++++++++++++++++++++ net-dns/getdns/metadata.xml | 1 + 5 files changed, 167 insertions(+) diff --git a/net-dns/getdns/Manifest b/net-dns/getdns/Manifest index 77ae018e7a78..3f17d16169e1 100644 --- a/net-dns/getdns/Manifest +++ b/net-dns/getdns/Manifest @@ -1 +1,2 @@ DIST getdns-1.7.2.tar.gz 702969 BLAKE2B 668a754200b816790f39a772d89c28e14bc5dbd041e07d9e53605ad44d63d6637078b66881c35dda62ed61622142797cc8f0041522e076cf551651fca688053a SHA512 6c4a75a4696c46ec8bd9e9659a93fd81f3490b43da28a4c95f99a766027c7588fc493a8ac51563afb8f975c0e5b77d5ea67014d80e78ee2bb17fba1d1073d19f +DIST getdns-1.7.3.tar.gz 703262 BLAKE2B 830063fc6f882a624fb7a6bb36fcb4f049a83ddd4515a906152a76d0247f4397b1e12ace7ce07053e7a42432c4f3683fe999ff36d8ede13a005ebecd14a78326 SHA512 d5725a24378b6fe0018daefdaba5565d2d4d51109ef66609fc34270a0a69accb95f5f895d0cdfc5caca51d2ec586db126f367439f05aed12507395af26739e2f diff --git a/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch b/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch new file mode 100644 index 000000000000..18e9e51d3285 --- /dev/null +++ b/net-dns/getdns/files/getdns-1.7.3-cmake-linking.patch @@ -0,0 +1,40 @@ +diff -ur a/cmake/modules/FindGnuTLS.cmake b/cmake/modules/FindGnuTLS.cmake +--- a/cmake/modules/FindGnuTLS.cmake 2024-10-16 21:33:11.113665484 +0200 ++++ b/cmake/modules/FindGnuTLS.cmake 2024-10-16 21:33:40.923835214 +0200 +@@ -38,8 +38,8 @@ + + if (PkgGnuTLS_FOUND AND PkgGnuTLSDane_FOUND) + set(GNUTLS_INCLUDE_DIR ${PkgGnuTLS_INCLUDE_DIRS} $PkgGnuTLSDane_INCLUDE_DIRS} CACHE FILEPATH "GnuTLS include path") +- set(NETTLE_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES} CACHE STRING "GnuTLS libraries") +- set(NETTLE_VERSION ${PkgGnuTLS_VERSION}) ++ set(GNUTLS_LIBRARIES ${PkgGnuTLS_LIBRARIES} ${PkgGnuTLSDane_LIBRARIES} CACHE STRING "GnuTLS libraries") ++ set(GNUTLS_VERSION ${PkgGnuTLS_VERSION}) + add_library(GnuTLS::GnuTLS ALIAS PkgConfig::PkgGnuTLS) + add_library(GnuTLS::Dane ALIAS PkgConfig::PkgGnuTLSDane) + set(GnuTLS_FOUND ON) +diff -ur a/cmake/modules/FindNettle.cmake b/cmake/modules/FindNettle.cmake +--- a/cmake/modules/FindNettle.cmake 2024-10-16 21:05:17.521591723 +0200 ++++ b/cmake/modules/FindNettle.cmake 2024-10-16 21:50:42.414650647 +0200 +@@ -34,12 +34,20 @@ + if(PKG_CONFIG_FOUND) + pkg_check_modules(PkgNettle IMPORTED_TARGET GLOBAL nettle) + pkg_check_modules(PkgHogweed IMPORTED_TARGET GLOBAL QUIET hogweed) ++ if (UNIX) ++ pkg_check_modules(PkgGmp IMPORTED_TARGET GLOBAL QUIET gmp) ++ endif () + endif() + +-if(PkgNettle_FOUND AND PkHogweed_FOUND) ++if(PkgNettle_FOUND AND PkgHogweed_FOUND) + set(NETTLE_INCLUDE_DIR ${PkgNettle_INCLUDE_DIRS} ${PkgHogweed_INCLUDE_DIRS} CACHE FILEPATH "Nettle include path") +- set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} CACHE STRING "Nettle libraries") ++ if (PkgGmp_FOUND) ++ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} ${PkgGmp_LIBRARIES} CACHE STRING "Nettle libraries") ++ else () ++ set(NETTLE_LIBRARIES ${PkgNettle_LIBRARIES} ${PkgHogweed_LIBRARIES} CACHE STRING "Nettle libraries") ++ endif () + set(NETTLE_VERSION ${PkgNettle_VERSION}) ++ set_target_properties(PkgConfig::PkgNettle PROPERTIES INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}") + add_library(Nettle::Nettle ALIAS PkgConfig::PkgNettle) + add_library(Nettle::Hogweed ALIAS PkgConfig::PkgHogweed) + set(Nettle_FOUND ON) diff --git a/net-dns/getdns/files/stubby-0.4.3-install-dir.patch b/net-dns/getdns/files/stubby-0.4.3-install-dir.patch new file mode 100644 index 000000000000..51f846e3aa95 --- /dev/null +++ b/net-dns/getdns/files/stubby-0.4.3-install-dir.patch @@ -0,0 +1,28 @@ +diff -ur a/stubby/CMakeLists.txt b/stubby/CMakeLists.txt +--- a/stubby/CMakeLists.txt 2024-10-14 20:08:06.950985143 +0200 ++++ b/stubby/CMakeLists.txt 2024-10-14 20:09:29.408454887 +0200 +@@ -58,13 +58,6 @@ + else () + set(RUNSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run") + endif () +-install(DIRECTORY +- DESTINATION ${RUNSTATEDIR} +- DIRECTORY_PERMISSIONS +- OWNER_READ OWNER_WRITE OWNER_EXECUTE +- GROUP_READ GROUP_EXECUTE +- WORLD_READ WORLD_EXECUTE +- ) + set(STUBBYCONFDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/stubby") + + find_package(Libyaml REQUIRED) +@@ -187,8 +180,8 @@ + if (ENABLE_WINDOWS_SERVICE) + install(TARGETS stubres LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif () +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/stubby.1 DESTINATION share/man/man1) +-install(FILES AUTHORS COPYING ChangeLog NEWS README.md DESTINATION share/doc/stubby) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/stubby.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) ++install(FILES AUTHORS COPYING ChangeLog NEWS README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}/stubby) + + # Ensure the file gets CRLF line endings on Windows. + file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/stubby.yml INPUT ${CMAKE_CURRENT_SOURCE_DIR}/stubby.yml.example) diff --git a/net-dns/getdns/getdns-1.7.3.ebuild b/net-dns/getdns/getdns-1.7.3.ebuild new file mode 100644 index 000000000000..e86d32e2ef54 --- /dev/null +++ b/net-dns/getdns/getdns-1.7.3.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +_SRCURI_P="${P/%_beta1/-beta.1}" + +inherit cmake fcaps systemd tmpfiles + +DESCRIPTION="Modern asynchronous DNS API" +HOMEPAGE="https://getdnsapi.net/" +SRC_URI="https://getdnsapi.net/releases/${_SRCURI_P//./-}/${_SRCURI_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples +getdns-query +getdns-server-mon gnutls +idn libev libevent libuv minimal static-libs stubby test +unbound" + +S="${WORKDIR}/${_SRCURI_P}" + +# https://bugs.gentoo.org/661760 +# https://github.com/getdnsapi/getdns/issues/407 +# (As of 1.7.0, seems to need network) +RESTRICT="test" +#RESTRICT="!test? ( test )" + +DEPEND=" + dev-libs/libbsd + dev-libs/libyaml + dev-libs/openssl:= + idn? ( net-dns/libidn2:= ) + gnutls? ( + net-libs/gnutls:0=[dane,openssl] + dev-libs/nettle:0= + ) + libev? ( dev-libs/libev:= ) + libevent? ( dev-libs/libevent:= ) + libuv? ( dev-libs/libuv:= ) + test? ( dev-libs/check ) + !minimal? ( >=net-dns/unbound-1.5.9:= ) +" +RDEPEND=" + ${DEPEND} + stubby? ( + acct-group/stubby + acct-user/stubby + sys-libs/libcap + ) +" +BDEPEND=" + doc? ( app-text/doxygen ) +" + +PATCHES=( + "${FILESDIR}/${PN}-1.4.2-stubby.service.patch" + "${FILESDIR}/${PN}-1.7.3-cmake-linking.patch" + "${FILESDIR}/stubby-0.4.3-install-dir.patch" +) + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_RUNSTATEDIR=/var/run/stubby + -DBUILD_DOXYGEN=$(usex doc) + -DBUILD_GETDNS_QUERY=$(usex getdns-query) + -DBUILD_GETDNS_SERVER_MON=$(usex getdns-server-mon) + -DBUILD_STUBBY=$(usex stubby) + -DENABLE_STATIC=$(usex static-libs) + -DBUILD_TESTING:BOOL=$(usex test) + -DENABLE_UNBOUND_EVENT_API=$(usex unbound) + -DENABLE_STUB_ONLY=$(usex minimal) + -DUSE_GNUTLS=$(usex gnutls) + -DUSE_LIBEV=$(usex libev) + -DUSE_LIBEVENT2=$(usex libevent) + -DUSE_LIBIDN2=$(usex idn) + -DUSE_LIBUV=$(usex libuv) + ) + cmake_src_configure +} + +src_install() { + cmake_src_install + if use stubby; then + newinitd "${FILESDIR}"/stubby.initd-r2 stubby + newconfd "${FILESDIR}"/stubby.confd-r1 stubby + insinto /etc/logrotate.d + newins "${FILESDIR}"/stubby.logrotate stubby + systemd_dounit "${S}"/stubby/systemd/stubby.service + dotmpfiles "${S}"/stubby/systemd/stubby.conf + fi +} + +pkg_postinst() { + if use stubby; then + fcaps cap_net_bind_service=ei usr/bin/stubby + tmpfiles_process stubby.conf + fi +} diff --git a/net-dns/getdns/metadata.xml b/net-dns/getdns/metadata.xml index 115e5fa205a5..9e9856efb041 100644 --- a/net-dns/getdns/metadata.xml +++ b/net-dns/getdns/metadata.xml @@ -10,5 +10,6 @@ Enable dev-libs/libevent support Enable dev-libs/libev support Enable dev-libs/libuv support + Only build stub resolution mode