Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c19fe25
Update Cargo.lock
mozzieongit Nov 28, 2025
5b16801
Move ldns obsoletion to separate package
mozzieongit Nov 28, 2025
d0f3d09
Fix pkg syntax error
mozzieongit Nov 28, 2025
b3dcf4c
Bump MSRV to that of domain
mozzieongit Nov 28, 2025
67ea978
Set version to rc1
mozzieongit Nov 28, 2025
8663270
Use MSRV available in docker
mozzieongit Nov 28, 2025
e8cdbf9
Fix package rule file name
mozzieongit Nov 28, 2025
30ba612
Add testing repo for the ldnsutils test
mozzieongit Nov 28, 2025
738e731
TESTING: disable many images to save minutes
mozzieongit Nov 28, 2025
7735a23
Remove explicit changelog path, ploutos should pick the right one
mozzieongit Nov 28, 2025
e2a9a17
TESTING: disable dnst build to save minutes
mozzieongit Nov 28, 2025
90a7e0f
Add extended description
mozzieongit Nov 28, 2025
528b218
Try fixed scriptlets ploutos
mozzieongit Nov 28, 2025
1170c00
Filter out rpm no-binary lint
mozzieongit Nov 28, 2025
dc98ca6
Only the specified one
mozzieongit Nov 28, 2025
cc7c0dc
It's rocky
mozzieongit Nov 28, 2025
bc00e42
Revert "TESTING: disable dnst build to save minutes"
mozzieongit Nov 28, 2025
6d3c363
Re-enable all build and test targets and change rockylinux to almalinux
mozzieongit Nov 28, 2025
7d01d6d
Cannot have an empty if
mozzieongit Nov 28, 2025
04e99f8
Maybe this helps having a binary
mozzieongit Nov 28, 2025
81458d1
Try with few builds
mozzieongit Nov 28, 2025
97c970e
Revert "Try with few builds"
mozzieongit Nov 28, 2025
a3ac98b
Revert "Maybe this helps having a binary"
mozzieongit Nov 28, 2025
24aa6ef
Add differentiator for uploaded artifacts for the ldnsutils pkg
mozzieongit Nov 28, 2025
75d49a2
Remove openssl deps from ldnsutils pkg
mozzieongit Nov 28, 2025
c64d3f6
Update ploutos to v9
mozzieongit Nov 28, 2025
ea00274
Fix using the force
mozzieongit Nov 28, 2025
6a2457c
Remove debian:buster
mozzieongit Nov 28, 2025
89ed2b4
Remove proposed channel from pkg-test
mozzieongit Nov 28, 2025
1e69733
Merge branch 'main' into separate-ldns-package
mozzieongit Jan 23, 2026
6e26260
Remove EOL versions from build targets
mozzieongit Jan 23, 2026
9134475
Cargo update and bump dnst minor version
mozzieongit Jan 23, 2026
650c4c1
Try out the ploutos fix
mozzieongit Jan 23, 2026
f7efea4
Update Dockerfile base image to alpine 2.23
mozzieongit Jan 23, 2026
b6b712f
Revert "Try out the ploutos fix"
mozzieongit Jan 23, 2026
efe9953
Lower MSRV to 1.85 as available in Debian stable
mozzieongit Jan 23, 2026
b89eb1f
Revert "Lower MSRV to 1.85 as available in Debian stable"
mozzieongit Jan 23, 2026
7e268c3
Merge branch 'main' into separate-ldns-package
mozzieongit Feb 16, 2026
e9ae13c
Remove systemd macros from scriptlets
mozzieongit Feb 16, 2026
2e659c1
Change version to 0.2.0-alpha1
mozzieongit Mar 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
workflow_dispatch:

jobs:
package:
package-dnst:
uses: NLnetLabs/ploutos/.github/workflows/pkg-rust.yml@v9
secrets:
DOCKER_HUB_ID: ${{ vars.DOCKER_HUB_ID }}
Expand All @@ -31,3 +31,16 @@ jobs:
deb_extra_build_packages: libssl-dev
rpm_extra_build_packages: make openssl-devel
rpm_scriptlets_path: pkg/rpm/scriptlets.toml

package-dnst-ldnsutils:
# Package empty dnst-ldnsutils package to create symlinks
uses: NLnetLabs/ploutos/.github/workflows/pkg-rust.yml@v9
with:
package_build_rules: pkg/dnst-ldnsutils/pkg/rules/packages-to-build.yml
package_test_rules: pkg/dnst-ldnsutils/pkg/rules/packages-to-test.yml
package_test_scripts_path: pkg/dnst-ldnsutils/pkg/test-scripts/test-<package>.sh

rpm_scriptlets_path: pkg/dnst-ldnsutils/pkg/rpm/scriptlets.toml

manifest_dir: pkg/dnst-ldnsutils
artifact_prefix: dnst-ldnsutils
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 1 addition & 24 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dnst"
version = "0.1.1-dev"
version = "0.2.0-alpha1"
edition = "2021"
default-run = "dnst"
readme = "README.md"
Expand Down Expand Up @@ -97,19 +97,10 @@
["doc/manual/build/man/dnst-nsec3-hash.1", "/usr/share/man/man1/dnst-nsec3-hash.1", "644"],
["doc/manual/build/man/dnst-signzone.1", "/usr/share/man/man1/dnst-signzone.1", "644"],
["doc/manual/build/man/dnst-update.1", "/usr/share/man/man1/dnst-update.1", "644"],
["doc/manual/build/man/ldns-key2ds.1", "/usr/share/man/man1/ldns-key2ds.1", "644"],
["doc/manual/build/man/ldns-keygen.1", "/usr/share/man/man1/ldns-keygen.1", "644"],
["doc/manual/build/man/ldns-notify.1", "/usr/share/man/man1/ldns-notify.1", "644"],
["doc/manual/build/man/ldns-nsec3-hash.1", "/usr/share/man/man1/ldns-nsec3-hash.1", "644"],
["doc/manual/build/man/ldns-signzone.1", "/usr/share/man/man1/ldns-signzone.1", "644"],
["doc/manual/build/man/ldns-update.1", "/usr/share/man/man1/ldns-update.1", "644"],
]
changelog = "target/debian/changelog" # this will be generated by the pkg workflow
copyright = "Copyright (c) 2024, NLnet Labs. All rights reserved."
maintainer-scripts = "pkg/debian"
# See: https://www.debian.org/doc/debian-policy/ch-relationships.html#replacing-whole-packages-forcing-their-removal
conflicts = "ldnsutils"
replaces = "ldnsutils"

# Related reading: https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/
[package.metadata.generate-rpm]
Expand All @@ -124,18 +115,4 @@
{ source = "doc/manual/build/man/dnst-nsec3-hash.1", dest = "/usr/share/man/man1/dnst-nsec3-hash.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/dnst-signzone.1", dest = "/usr/share/man/man1/dnst-signzone.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/dnst-update.1", dest = "/usr/share/man/man1/dnst-update.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-key2ds.1", dest = "/usr/share/man/man1/ldns-key2ds.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-keygen.1", dest = "/usr/share/man/man1/ldns-keygen.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-notify.1", dest = "/usr/share/man/man1/ldns-notify.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-nsec3-hash.1", dest = "/usr/share/man/man1/ldns-nsec3-hash.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-signzone.1", dest = "/usr/share/man/man1/ldns-signzone.1", mode = "644", doc = true },
{ source = "doc/manual/build/man/ldns-update.1", dest = "/usr/share/man/man1/ldns-update.1", mode = "644", doc = true },
]

# These get set using cargo-generate-rpm --set-metadata at package build time.
#post_trans_script = ...
#post_uninstall_script = ...

# Set Obsoletes per https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages.
[package.metadata.generate-rpm.obsoletes]
ldns-utils = "< 0:1.8.4-2"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ARG MODE=build
# ========
#
# Only used when MODE=build.
ARG BASE_IMG=alpine:3.21
ARG BASE_IMG=alpine:3.23


# CARGO_ARGS
Expand Down
7 changes: 0 additions & 7 deletions pkg/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,5 @@

# case "$1" in
# configure)
# # Create symbolic links
# ln -f -s /usr/bin/dnst /usr/bin/ldns-keygen
# ln -f -s /usr/bin/dnst /usr/bin/ldns-key2ds
# ln -f -s /usr/bin/dnst /usr/bin/ldns-nsec3-hash
# ln -f -s /usr/bin/dnst /usr/bin/ldns-notify
# ln -f -s /usr/bin/dnst /usr/bin/ldns-signzone
# ln -f -s /usr/bin/dnst /usr/bin/ldns-update
# ;;
# esac
2 changes: 0 additions & 2 deletions pkg/debian/prerm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@

# case "$1" in
# upgrade|remove)
# # Remove symbolic links
# rm -f /usr/bin/ldns-nsec3-hash
# ;;
# esac
7 changes: 7 additions & 0 deletions pkg/dnst-ldnsutils/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions pkg/dnst-ldnsutils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[package]
# This is a dummy program to build a separate package with ploutos
name = "dnst-ldnsutils"
version = "0.2.0-alpha1"
edition = "2021"
repository = "https://github.com/nlnetlabs/dnst/"
authors = ["NLnet Labs <dns-team@nlnetlabs.nl>"]
description = "Package for dnst's ldns symlinks and man pages"
license = "BSD-3-Clause"

[dependencies]

# Related reading: https://wiki.debian.org/Teams/RustPackaging/Policy
[package.metadata.deb]
depends = "$auto, dnst"
section = "net"
priority = "optional"
assets = [
# TODO: Extend Ploutos to generate the man pages from sources.
["../../doc/manual/build/man/ldns-key2ds.1", "/usr/share/man/man1/ldns-key2ds.1", "644"],
["../../doc/manual/build/man/ldns-keygen.1", "/usr/share/man/man1/ldns-keygen.1", "644"],
["../../doc/manual/build/man/ldns-notify.1", "/usr/share/man/man1/ldns-notify.1", "644"],
["../../doc/manual/build/man/ldns-nsec3-hash.1", "/usr/share/man/man1/ldns-nsec3-hash.1", "644"],
["../../doc/manual/build/man/ldns-signzone.1", "/usr/share/man/man1/ldns-signzone.1", "644"],
["../../doc/manual/build/man/ldns-update.1", "/usr/share/man/man1/ldns-update.1", "644"],
]
copyright = "Copyright (c) 2024, NLnet Labs. All rights reserved."
extended-description = """\
This is a meta package that replaces the original ldnsutils with their dnst
counterparts (where implemented).
"""
maintainer-scripts = "pkg/debian"
# See: https://www.debian.org/doc/debian-policy/ch-relationships.html#replacing-whole-packages-forcing-their-removal
conflicts = "ldnsutils"
replaces = "ldnsutils"

# Related reading: https://docs.fedoraproject.org/en-US/packaging-guidelines/Rust/
[package.metadata.generate-rpm]
assets = [
# TODO: Extend Ploutos to generate the man pages from sources.
{ source = "../../doc/manual/build/man/ldns-key2ds.1", dest = "/usr/share/man/man1/ldns-key2ds.1", mode = "644", doc = true },
{ source = "../../doc/manual/build/man/ldns-keygen.1", dest = "/usr/share/man/man1/ldns-keygen.1", mode = "644", doc = true },
{ source = "../../doc/manual/build/man/ldns-notify.1", dest = "/usr/share/man/man1/ldns-notify.1", mode = "644", doc = true },
{ source = "../../doc/manual/build/man/ldns-nsec3-hash.1", dest = "/usr/share/man/man1/ldns-nsec3-hash.1", mode = "644", doc = true },
{ source = "../../doc/manual/build/man/ldns-signzone.1", dest = "/usr/share/man/man1/ldns-signzone.1", mode = "644", doc = true },
{ source = "../../doc/manual/build/man/ldns-update.1", dest = "/usr/share/man/man1/ldns-update.1", mode = "644", doc = true },
]

[package.metadata.generate-rpm.requires]
dnst = "*"

# Set Obsoletes per https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages.
[package.metadata.generate-rpm.obsoletes]
ldns-utils = "< 0:1.8.4-2"
13 changes: 13 additions & 0 deletions pkg/dnst-ldnsutils/pkg/debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e

case "$1" in
configure)
# Create symbolic links
ln -f -s /usr/bin/dnst /usr/bin/ldns-keygen
ln -f -s /usr/bin/dnst /usr/bin/ldns-key2ds
ln -f -s /usr/bin/dnst /usr/bin/ldns-nsec3-hash
ln -f -s /usr/bin/dnst /usr/bin/ldns-notify
ln -f -s /usr/bin/dnst /usr/bin/ldns-signzone
ln -f -s /usr/bin/dnst /usr/bin/ldns-update
;;
esac
13 changes: 13 additions & 0 deletions pkg/dnst-ldnsutils/pkg/debian/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh -e

case "$1" in
upgrade|remove)
# Remove symbolic links
rm -f /usr/bin/ldns-keygen
rm -f /usr/bin/ldns-key2ds
rm -f /usr/bin/ldns-nsec3-hash
rm -f /usr/bin/ldns-notify
rm -f /usr/bin/ldns-signzone
rm -f /usr/bin/ldns-update
;;
esac
39 changes: 39 additions & 0 deletions pkg/dnst-ldnsutils/pkg/rpm/scriptlets.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
post_trans_script = '''
#!/bin/bash -e

# This script will be run _after_ upgrade in the presence of an obsoleted ldns-utils
# package. This is useful because the ldns-utils uninstall script will have been run
# _after_ installation of dnst and so the symbolic links that we create will be
# removed, and we have to make sure here that they get put back

FORCE=
# See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
if [ $1 -eq 2 ]; then
# Upgrade
FORCE=-f
fi

# Create symbolic links
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-keygen
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-key2ds
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-nsec3-hash
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-notify
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-signzone
ln -s ${FORCE} /usr/bin/dnst /usr/bin/ldns-update
'''

post_uninstall_script = '''
#!/bin/bash -e

# See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax
if [ $1 -eq 0 ] ; then
# Uninstallation
# Remove symbolic links
rm -f /usr/bin/ldns-keygen
rm -f /usr/bin/ldns-key2ds
rm -f /usr/bin/ldns-nsec3-hash
rm -f /usr/bin/ldns-notify
rm -f /usr/bin/ldns-signzone
rm -f /usr/bin/ldns-update
fi
'''
41 changes: 41 additions & 0 deletions pkg/dnst-ldnsutils/pkg/rules/packages-to-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This matrix definition is used as both the package_build_rules and the package_test_rules Ploutos packaging
# workflow inputs.
---
pkg:
- 'dnst-ldnsutils'
image:
- "ubuntu:jammy" # ubuntu/22.04
- "ubuntu:noble" # ubuntu/24.04
- "debian:bullseye" # debian/11
- "debian:bookworm" # debian/12
- "debian:trixie" # debian/13
- 'almalinux:8' # compatible with EOL centos:8
- 'almalinux:9'
- 'almalinux:10'
target:
- 'x86_64'
include:
# package for the Raspberry Pi 4b as an ARMv7 cross compiled variant of the Debian Bullseye upon which
# Raspbian 11 is based.
- pkg: 'dnst-ldnsutils'
image: 'debian:bullseye'
target: 'armv7-unknown-linux-musleabihf'

# package for the Raspberry Pi 1b as an ARMv6 cross compiled variant of the Debian Buster upon which
# Raspbian 10 is based.
- pkg: 'dnst-ldnsutils'
image: 'debian:buster'
target: 'arm-unknown-linux-musleabihf'

# package for the ROCK64 as an AARCH64 cross compiled variant of Debian Buster upon which Armbian 21 is based.
- pkg: 'dnst-ldnsutils'
image: 'debian:buster'
target: 'aarch64-unknown-linux-musl'

# Set rpmlint filters for RHEL rpmlint
- image: 'almalinux:8'
rpm_rpmlint_check_filters: no-binary
Comment thread
mozzieongit marked this conversation as resolved.
- image: 'almalinux:9'
rpm_rpmlint_check_filters: no-binary
- image: 'almalinux:10'
rpm_rpmlint_check_filters: no-binary
63 changes: 63 additions & 0 deletions pkg/dnst-ldnsutils/pkg/rules/packages-to-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This matrix definition is used as both the package_build_rules and the package_test_rules Ploutos packaging
# workflow inputs.
---
pkg:
- 'dnst-ldnsutils'
image:
- "ubuntu:jammy" # ubuntu/22.04
- "ubuntu:noble" # ubuntu/24.04
- "debian:bullseye" # debian/11
- "debian:bookworm" # debian/12
- "debian:trixie" # debian/13
published_pkg:
- 'ldnsutils' # correct for Ubuntu/Debian
target:
- 'x86_64'
test-image:
# Set 'test-image' to the empty string for all matrix permutations so that the default ('image') will be used
# to launch an LXC container to test the created packages in. Why explicitly set what is already the default?
# If this isn't present, later entries in the include set below will overwrite earlier entries that differ
# only by their 'test-image' value. If however 'test-image' is present in the original matrix by defining it
# here, then 'included' entries will no longer overwrite each other because they alter a key that is present
# in the original matrix. This is just how GitHub Actions matrix include rules work.
- ""
test-mode:
- 'fresh-install'
- 'upgrade-from-published'
include:
- pkg: 'dnst-ldnsutils'
image: 'almalinux:8'
target: 'x86_64'
test-mode: 'fresh-install'

- pkg: 'dnst-ldnsutils'
image: 'almalinux:8'
target: 'x86_64'
test-mode: 'upgrade-from-published'
published_pkg: 'ldns-utils'
rpm_yum_extra_args: --enablerepo powertools

- pkg: 'dnst-ldnsutils'
image: 'almalinux:9'
target: 'x86_64'
test-mode: 'fresh-install'

- pkg: 'dnst-ldnsutils'
image: 'almalinux:9'
target: 'x86_64'
test-mode: 'upgrade-from-published'
published_pkg: 'ldns-utils'
rpm_yum_extra_args: --enablerepo crb

- pkg: 'dnst-ldnsutils'
image: 'almalinux:10'
target: 'x86_64'
test-mode: 'fresh-install'

- pkg: 'dnst-ldnsutils'
image: 'almalinux:10'
target: 'x86_64'
test-mode: 'upgrade-from-published'
published_pkg: 'ldns-utils'
# --enablerepo crb is no longer needed since alma10 (https://almalinux.org/blog/2025-09-08-enabling-crb-by-default-for-almalinux10/)
# rpm_yum_extra_args: --enablerepo crb
21 changes: 21 additions & 0 deletions pkg/dnst-ldnsutils/pkg/test-scripts/test-dnst-ldnsutils.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -eo pipefail
set -x

case $1 in
post-install)
# Run some sanity checks
ldns-keygen -v
ldns-nsec3-hash nlnetlabs.nl
man ldns-keygen
;;

post-upgrade)
# Nothing to do.
# Run some sanity checks
ldns-keygen -v
ldns-nsec3-hash nlnetlabs.nl
man ldns-keygen
;;
esac
1 change: 1 addition & 0 deletions pkg/dnst-ldnsutils/src/main.rs
Comment thread
ximon18 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fn main() {}
Loading
Loading