Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4efd523
FIX: Asset file not found: target/rpm/cascaded.service
ximon18 Sep 1, 2025
bcacf16
Various fixes.
ximon18 Sep 2, 2025
516392f
Try the WIP new version of Ploutos.
ximon18 Sep 2, 2025
0abc52f
Reformat asset lines to be readable.
ximon18 Sep 2, 2025
f1fca91
Make rpmlint happy.
ximon18 Sep 2, 2025
1fefcbb
Try and use the testing repos.
ximon18 Sep 2, 2025
f8900f5
Not ready for DEB testing repo yet.
ximon18 Sep 2, 2025
584c99b
Typo correction.
ximon18 Sep 2, 2025
3a517be
Try installing dnst from a local test repo.
ximon18 Sep 2, 2025
e31a83e
Update repo URL.
ximon18 Sep 2, 2025
4c9162c
Use right O/S version and architecture strings.
ximon18 Sep 2, 2025
8d83c3d
Fix bash syntax error.
ximon18 Sep 2, 2025
9408878
Fix incorrect path in test script.
ximon18 Sep 2, 2025
198aac1
Check the dnst version too.
ximon18 Sep 2, 2025
18ed60b
See what happens when the kmip2pkcs11 RPM is available too.
ximon18 Sep 2, 2025
11cc599
Use dnst and kmip2pkcs11 from packages.nlnetlabs.nl proposed channel …
ximon18 Sep 3, 2025
28cb0b9
Use the packages.nlnetlabs.nl proposed DEB repositories to install dn…
ximon18 Sep 3, 2025
1f583e2
Typo fix.
ximon18 Sep 3, 2025
9638740
Is the ARCH var not being substituted?
ximon18 Sep 3, 2025
a15c65f
Add a comment about the use of a custom repository.
ximon18 Sep 4, 2025
133eae5
Remove the contained RPM repo, the packages we need are now on packag…
ximon18 Sep 4, 2025
f4665a6
Use new Ploutos setting.
ximon18 Sep 4, 2025
a20607b
Use the new Ploutos v9 release.
ximon18 Sep 4, 2025
46d04b0
Add more O/S variants to package.
ximon18 Sep 4, 2025
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
21 changes: 20 additions & 1 deletion .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,30 @@ on:

jobs:
package:
uses: NLnetLabs/ploutos/.github/workflows/pkg-rust.yml@v8
uses: NLnetLabs/ploutos/.github/workflows/pkg-rust.yml@v9
with:
package_build_rules: pkg/rules/packages-to-build.yml
package_test_scripts_path: pkg/test-scripts/test-<package>.sh

# About the use of deb_apt_source and rpm_yum_repo:
# ----------------------------------------------------------------------
# These settings are used below to direct Ploutos to add an alternate
# package repository than the default (also packages.nlnetlabs.nl but
# normal channel rather than the "-proposed" channel). This repository
# is used during the package testing phase and is needed so that when
# the newly built Cascade package is installed that its dependencies,
# dnst and kmip2pkcs11, can be resolved. This is because those
# dependencies are at the time of writing not yet published in the main
# channel but only in the "-proposed" channel.
package_test_always_add_repo: true

deb_extra_build_packages: libssl-dev
deb_apt_source: 'deb [arch=amd64] https://packages.nlnetlabs.nl/linux/${OS_NAME} ${OS_REL}-proposed main'

rpm_extra_build_packages: make openssl-devel
rpm_scriptlets_path: pkg/rpm/scriptlets.toml
rpm_yum_repo: |
[nlnetlabs]
name=NLnet Labs Testing
baseurl=https://packages.nlnetlabs.nl/linux/centos/$releasever/proposed/$basearch
enabled=1
49 changes: 21 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[package]
name = "cascade"
default-run = "cascaded"
Expand Down Expand Up @@ -114,39 +114,17 @@

[package.metadata.deb]
assets = [
[
"target/release/cascade",
"usr/bin/",
"755",
],
[
"target/release/cascaded",
"usr/bin/",
"755",
],
[
"README.md",
"usr/share/doc/cascade/",
"644",
],
["target/release/cascade", "usr/bin/", "755"],
["target/release/cascaded", "usr/bin/", "755"],
["README.md", "usr/share/doc/cascade/", "644"],
#["doc/cascade.1", "usr/share/man/man1/cascade.1", "644"],
#["doc/cascaded.1", "usr/share/man/man1/cascaded.1", "644"],
[
"config.toml",
"etc/cascade/config.toml",
"644",
],
[
"pkg/common/service.preset",
"usr/lib/systemd/service-preset/50-cascaded.preset",
"644",
],
["config.toml", "etc/cascade/config.toml", "644"],
["pkg/common/service.preset", "usr/lib/systemd/service-preset/50-cascaded.preset", "644"],
]
name = "cascade"
# TODO: create email alias
maintainer = "NLnet Labs <[email protected]>"
license-file = ["LICENSE", "0"]
# TODO: come up with a description (also for the git repo)
extended-description = """\
Cascade is a friendly DNSSEC signing solution, offering sensible defaults,
controllability, observability and flexibility.
Expand All @@ -159,9 +137,24 @@
changelog = "target/debian/changelog" # this will be generated by the pkg workflow
copyright = "Copyright (c) 2025, NLnet Labs. All rights reserved."
conf-files = ["/etc/cascade/config.toml"]
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false }
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false, usr-merge = true } # usr-merge is needed for Bookworm/Noble and later

[package.metadata.deb.variants.debian-buster]
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false, usr-merge = false }

[package.metadata.deb.variants.debian-bullseye]
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false, usr-merge = false }

[package.metadata.deb.variants.ubuntu-focal]
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false, usr-merge = false }

[package.metadata.deb.variants.ubuntu-jammy]
systemd-units = { unit-name = "cascaded", unit-scripts = "pkg/common", enable = false, usr-merge = false }

[package.metadata.generate-rpm]
# Use a shorter summary as rpmlint complains with E: summary-too-long.
# Use an initial capital letter to satisfy rpmlinlt which complains with W: summary-not-capitalized
summary = "Friendly DNSSEC signing solution"
assets = [
{ source = "target/release/cascade", dest = "/usr/bin/cascade", mode = "755" },
{ source = "target/release/cascaded", dest = "/usr/bin/cascaded", mode = "755" },
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/cascaded.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Documentation=man:cascade(1)
After=network.target

[Service]
ExecStart=/usr/bin/cascade --config=/etc/cascade/config.toml
ExecStart=/usr/bin/cascaded --config=/etc/cascade/config.toml
Type=exec
Restart=on-failure
User=cascade
Expand Down
2 changes: 1 addition & 1 deletion pkg/debian/postrm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -e

CONFIG_FILE_PATH="/etc/cascade/cascade.conf"
CONFIG_FILE_PATH="/etc/cascade/config.toml"

case "$1" in
purge)
Expand Down
6 changes: 3 additions & 3 deletions pkg/rpm/scriptlets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ $1 -eq 1 ] ; then
fi

# Run commands equivalent to what the RPM systemd macros would do
systemd_post cascade.service
systemd_post cascaded.service
systemd_triggers
fi
'''
Expand All @@ -30,7 +30,7 @@ pre_uninstall_script = '''
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
# Run commands equivalent to what the RPM systemd macros would do
systemd_preun cascade.service
systemd_preun cascaded.service
systemd_triggers
fi
'''
Expand All @@ -41,7 +41,7 @@ post_uninstall_script = '''

if [ $1 -ge 1 ] ; then
# Run commands equivalent to what the RPM systemd macros would do
systemd_postun_with_restart cascade.service
systemd_postun_with_restart cascaded.service
systemd_triggers

# TODO: Remove the user account?
Expand Down
17 changes: 15 additions & 2 deletions pkg/rules/packages-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
pkg:
- 'cascade'
image:
- "debian:trixie" # debian/13
- "ubuntu:jammy" # ubuntu/22.04
- "ubuntu:noble" # ubuntu/24.04
- "debian:buster" # debian/10
- "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'
Expand All @@ -17,8 +24,14 @@ test-image:
# in the original matrix. This is just how GitHub Actions matrix include rules work.
- ""
include:
- image: 'almalinux:9'
systemd_service_unit_file: pkg/common/cascaded.service

- image: 'almalinux:8'
systemd_service_unit_file: pkg/common/cascaded.service

- image: 'almalinux:10'
systemd_service_unit_file: pkg/common/cascade.service
systemd_service_unit_file: pkg/common/cascaded.service

# 'mode' is not used by the package building workflow job, but is used by the package testing workflow job.
# Ploutos will not include this key when using this matrix definition to generate package building matrix
Expand Down
36 changes: 15 additions & 21 deletions pkg/test-scripts/test-cascade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,26 @@ set -eo pipefail
set -x

case $1 in
post-install)
#echo -e "\nCASCADE VERSION:"
#VER=$(cascade --version)
#echo $VER
post-install|post-upgrade)
echo -e "\nCASCADE VERSION:"
cascade --version

echo -e "\nCASCADE CONF:"
cat /etc/cascade/cascade.conf
echo -e "\nCASCADED VERSION:"
cascaded --version

echo -e "\nCASCADE SERVICE STATUS:"
systemctl status cascade || true
echo -e "\nDNST VERSION:"
dnst --version

echo -e "\nCASCADED CONF:"
cat /etc/cascade/config.toml

echo -e "\nCASCADED SERVICE STATUS:"
systemctl status cascaded || true

#echo -e "\nCASCADE MAN PAGE (first 20 lines only):"
#man -P cat cascade | head -n 20 || true
;;

post-upgrade)
#echo -e "\nCASCADE VERSION:"
#cascade --version

echo -e "\nCASCADE CONF:"
cat /etc/cascade/cascade.conf

echo -e "\nCASCADE SERVICE STATUS:"
systemctl status cascade || true

#echo -e "\nCASCADE MAN PAGE:"
#man -P cat cascade
#echo -e "\nCASCADED MAN PAGE (first 20 lines only):"
#man -P cat cascaded | head -n 20 || true
;;
esac
Loading