From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 65247@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>
Subject: [bug#65247] [PATCH] gnu: smartdns: Update to 43.
Date: Sat, 12 Aug 2023 21:27:35 +0800 [thread overview]
Message-ID: <928218e0956afa751b1dbf87ece58328d478cd96.1691846836.git.hako@ultrarare.space> (raw)
* gnu/packages/dns.scm (smartdns): Update to 43.
[arguments]<#:tests?>: Enable tests.
<#:test-target>: Set to "test".
<#:make-flags>: Set "VER".
<#:phases>: Add phase 'skip-unavailable-tests, 'prepare-test-dir,
'enter-test-dir, 'leave-test-dir.
[native-inputs]: Add googletest, isc-bind:utils.
---
gnu/packages/dns.scm | 35 ++++++++++++++++++++++++++++++-----
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index fdd10a6611..0fd8050286 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1340,7 +1340,7 @@ (define-public openresolv
(define-public smartdns
(package
(name "smartdns")
- (version "42")
+ (version "43")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1352,18 +1352,43 @@ (define-public smartdns
((".*SYSTEMDSYSTEMUNITDIR.*") "")))
(sha256
(base32
- "17j0h5l7gig6rzk8b9180jwrx5khpnrylacjxvnnpgsi2725k8lq"))))
+ "0s789l6i4yirmarg80mknc1pp65rz01ky9f7gidgclkfcwzz41l3"))))
(build-system gnu-build-system)
(arguments
- (list #:tests? #f ;no tests
+ (list #:test-target "test"
#:make-flags
#~(list (string-append "CC=" #$(cc-for-target))
(string-append "DESTDIR=" #$output)
- "PREFIX=''")
+ "PREFIX=''"
+ (string-append "VER=" #$version))
#:phases
#~(modify-phases %standard-phases
- (delete 'configure))))
+ (delete 'configure)
+ (add-after 'unpack 'skip-unavailable-tests
+ (lambda _
+ (with-directory-excursion "test/cases"
+ ;; Tests try to open /etc/resolv.conf
+ (substitute* "test-bind.cc"
+ ;; Bind.tls
+ (("smartdns::Server server_wrap;" all)
+ (string-append "GTEST_SKIP();" all)))
+ ;; Tests use ICMP ping.
+ (substitute* (find-files ".")
+ ((".*PING_TYPE_ICMP.*" all)
+ (string-append "GTEST_SKIP();" all)))
+ (delete-file "test-speed-check.cc"))))
+ ;; Compiled .o files in build phase can't be used for tests.
+ (add-after 'skip-unavailable-tests 'prepare-test-dir
+ (lambda _
+ (copy-recursively "." "../test")))
+ (add-before 'check 'enter-test-dir
+ (lambda _
+ (chdir "../test/test")))
+ (add-after 'check 'leave-test-dir
+ (lambda _
+ (chdir "../../source"))))))
(inputs (list openssl))
+ (native-inputs (list googletest `(,isc-bind "utils")))
(home-page "https://github.com/pymumu/smartdns")
(synopsis "Local DNS server")
(description
base-commit: 19a7a824c35eae56ce56e2a460042fb7e2129234
--
2.41.0
next reply other threads:[~2023-08-12 13:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-12 13:27 Hilton Chain via Guix-patches via [this message]
2023-08-29 12:59 ` [bug#65247] [PATCH] gnu: smartdns: Update to 43 Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=928218e0956afa751b1dbf87ece58328d478cd96.1691846836.git.hako@ultrarare.space \
--to=guix-patches@gnu.org \
--cc=65247@debbugs.gnu.org \
--cc=hako@ultrarare.space \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).