Package Details: dnscontrol 4.36.1-1

Git Clone URL: https://aur.archlinux.org/dnscontrol.git (read-only, click to copy)
Package Base: dnscontrol
Description: Synchronize your DNS to multiple providers from a simple DSL
Upstream URL: https://stackexchange.github.io/dnscontrol/
Keywords: dns
Licenses: MIT
Provides: dnscontrol
Submitter: AdmiringWorm
Maintainer: AdmiringWorm (mshaugh, nirnakinho, androw)
Last Packager: androw
Votes: 8
Popularity: 0.067649
First Submitted: 2019-04-13 18:39 (UTC)
Last Updated: 2026-03-08 21:56 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

aorth commented on 2026-02-03 04:54 (UTC) (edited on 2026-02-03 04:55 (UTC) by aorth)

Does anyone know why this package fails when building in a container?

--- FAIL: TestFlatten (15.64s)
    flatten_test.go:27: lookup sendgrid.net on 127.0.0.53:53: no such host
--- FAIL: TestParse (10.00s)
    parse_test.go:57: lookup sendgrid.net on 127.0.0.53:53: no such host

I'm building with pkgctl build. Building without a container using makepkg -s works, but is not optimal. Thanks!

aorth commented on 2025-10-12 12:24 (UTC)

This currently fails to build in a chroot because git is not available. Please add git to makedepends. The only packages which should be assumed to be available are those provided by the base-devel.

See: https://wiki.archlinux.org/title/PKGBUILD#makedepends

androw commented on 2025-10-06 19:50 (UTC)

Thanks for this patch! Imho, I'll remove the two optdepends because they do not enable features in the dnscontrol app. I haven't tried the rest of the patch but it looks fine to me.

nirnakinho commented on 2025-10-06 15:33 (UTC)

Hello fuero. Thank You for this patch. Apart from the optdepend on bash, I quite like it. Bash is part of the 'base' package group expected to be installed on any arch system. An optdepend on a 'base' package seems a bit redundant. Yes, one could remove bash in favour of other shells, but then one could make a case for explicitly including ALL packages in the base group as depend and/or optdepend,...

What do the other packagers think of this?

fuero commented on 2025-10-06 14:21 (UTC)

Here's a proposed patch. It - adds syntax completion + optdepends - runs checks - sets the version correctly for dnscontrol version output - introduces the latest recommendations from the Arch Golang guidelines wiki page

diff --git a/PKGBUILD b/PKGBUILD
index 972d658..d44a320 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,29 +10,66 @@ url="https://stackexchange.github.io/${pkgname}/"
 license=('MIT')
 depends=('glibc')
 makedepends=('go')
+optdepends=(
+  'bash: for bash completion'
+  'zsh: for zsh completion'
+)
 provides=("${pkgname}=${pkgver}")
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/StackExchange/${pkgname}/archive/v${pkgver}.tar.gz")
 b2sums=('a3722e8106cdd372e2c5a6c6a4d4adf602be3b40df3aeed9a7fc6e4a3ab2140843b8eea607221106dc601fc7347953a6337d2a4219a32105d796de295106a409')

 prepare(){
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
   mkdir -p build/
 #  mkdir -p gopath/src/github.com/StackExchange
 #  ln -rTsf $pkgname-$pkgver gopath/src/github.com/StackExchange/dnscontrol
 }

 build() {
-  cd "$pkgname-$pkgver"
-  export CGO_CPPFLAGS="${CPPFLAGS}"
+  local _x _commit
+  _commit=$(bsdcat "${pkgname}-${pkgver}.tar.gz" | git get-tar-commit-id)
+  _x=(
+    version="${pkgver}"
+    commit="${_commit:?}"
+  )
+
+  export CGO_ENABLED=1
+  export CGO_LDFLAGS="${LDFLAGS}"
   export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CPPFLAGS="${CPPFLAGS}"
   export CGO_CXXFLAGS="${CXXFLAGS}"
-  export CGO_LDFLAGS="${LDFLAGS}"
-  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
-  go build -o build -ldflags="-X main.version=$pkgver"
+  export GOFLAGS="${GOFLAGS} -buildmode=pie -trimpath -modcacherw -mod=readonly"
+  export GO111MODULE=on
+  
+  # Support -debug package
+  if [[ " ${OPTIONS[*]} " =~ " debug " ]]
+  then
+    export GOFLAGS="${GOFLAGS//-trimpath/}"
+    export GOPATH="${srcdir}"
+  fi
+
+  set | grep GO_
+  
+  cd "${pkgname}-${pkgver}"
+  go build -v \
+    -ldflags="${_x[*]/#/-X=github.com/StackExchange/dnscontrol/v4/pkg/version.} -linkmode=external" \
+    -o build/ \
+    .
+}
+
+check() {
+  cd "${pkgname}-${pkgver}"
+  go test -short ./...
 }

 package() {
-  cd "$pkgname-$pkgver"
+  cd "${pkgname}-${pkgver}"
+
   install -Dm755 build/${pkgname} "${pkgdir}/usr/bin/${pkgname}"
   install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  "build/${pkgname}" shell-completion bash \
+    | install -Dpm0644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
+  "build/${pkgname}" shell-completion zsh \
+    | install -Dpm0644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
 }

androw commented on 2024-12-19 12:40 (UTC)

@darkphoenix would that works? If you need arm, what's the CARCH?

case $CARCH in
    x86_64) GOARCH=amd64 ;;
    aarch64) GOARCH=arm64 ;;
    riscv64) GOARCH=riscv64 ;;
esac

darkphoenix commented on 2024-01-18 21:27 (UTC)

Would it be possible to add support for armv7h? I've been manually editing the PKGBUILD on each update, but since the build script already supports ARM all it takes is setting GOARCH=arm when calling go run build/build.go.

nirnakinho commented on 2024-01-15 16:25 (UTC)

@AdmiringWorm: if you wanna add androw as contributor, fine with me. thx & regards.

HLFH commented on 2023-08-29 16:05 (UTC)

4.2.0 released.