-
-
Notifications
You must be signed in to change notification settings - Fork 5
Separate ldns replacement package #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
c19fe25
Update Cargo.lock
mozzieongit 5b16801
Move ldns obsoletion to separate package
mozzieongit d0f3d09
Fix pkg syntax error
mozzieongit b3dcf4c
Bump MSRV to that of domain
mozzieongit 67ea978
Set version to rc1
mozzieongit 8663270
Use MSRV available in docker
mozzieongit e8cdbf9
Fix package rule file name
mozzieongit 30ba612
Add testing repo for the ldnsutils test
mozzieongit 738e731
TESTING: disable many images to save minutes
mozzieongit 7735a23
Remove explicit changelog path, ploutos should pick the right one
mozzieongit e2a9a17
TESTING: disable dnst build to save minutes
mozzieongit 90a7e0f
Add extended description
mozzieongit 528b218
Try fixed scriptlets ploutos
mozzieongit 1170c00
Filter out rpm no-binary lint
mozzieongit dc98ca6
Only the specified one
mozzieongit cc7c0dc
It's rocky
mozzieongit bc00e42
Revert "TESTING: disable dnst build to save minutes"
mozzieongit 6d3c363
Re-enable all build and test targets and change rockylinux to almalinux
mozzieongit 7d01d6d
Cannot have an empty if
mozzieongit 04e99f8
Maybe this helps having a binary
mozzieongit 81458d1
Try with few builds
mozzieongit 97c970e
Revert "Try with few builds"
mozzieongit a3ac98b
Revert "Maybe this helps having a binary"
mozzieongit 24aa6ef
Add differentiator for uploaded artifacts for the ldnsutils pkg
mozzieongit 75d49a2
Remove openssl deps from ldnsutils pkg
mozzieongit c64d3f6
Update ploutos to v9
mozzieongit ea00274
Fix using the force
mozzieongit 6a2457c
Remove debian:buster
mozzieongit 89ed2b4
Remove proposed channel from pkg-test
mozzieongit 1e69733
Merge branch 'main' into separate-ldns-package
mozzieongit 6e26260
Remove EOL versions from build targets
mozzieongit 9134475
Cargo update and bump dnst minor version
mozzieongit 650c4c1
Try out the ploutos fix
mozzieongit f7efea4
Update Dockerfile base image to alpine 2.23
mozzieongit b6b712f
Revert "Try out the ploutos fix"
mozzieongit efe9953
Lower MSRV to 1.85 as available in Debian stable
mozzieongit b89eb1f
Revert "Lower MSRV to 1.85 as available in Debian stable"
mozzieongit 7e268c3
Merge branch 'main' into separate-ldns-package
mozzieongit e9ae13c
Remove systemd macros from scriptlets
mozzieongit 2e659c1
Change version to 0.2.0-alpha1
mozzieongit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,5 @@ | |
|
|
||
| # case "$1" in | ||
| # upgrade|remove) | ||
| # # Remove symbolic links | ||
| # rm -f /usr/bin/ldns-nsec3-hash | ||
| # ;; | ||
| # esac | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| - image: 'almalinux:9' | ||
| rpm_rpmlint_check_filters: no-binary | ||
| - image: 'almalinux:10' | ||
| rpm_rpmlint_check_filters: no-binary | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
21
pkg/dnst-ldnsutils/pkg/test-scripts/test-dnst-ldnsutils.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
|
ximon18 marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| fn main() {} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.