mirror of
https://github.com/NLnetLabs/krill.git
synced 2026-09-23 09:54:55 +02:00
Various Debian packaging fixes and improvements: (note: depends on a fork of cargo deb as some cargo deb PRs are still pending) - Fix: Krill will now be restarted when the package is upgraded (also when upgrading from v0.7.0/v0.7.1/v0.7.2/v0.7.3 packages) (fixes #280). - Fix: systemd warning after apt remove (fixes #275). - Fix: Lintian error "manpage-not-compressed" (via cargo deb PR 133). - Fix: Lintian error "debian-changelog-file-missing" (via cargo deb PR 137). Note: the changelog is only a minimal pointer to the GitHub release notes, attributed to the user doing the pull requestor or merge to master. - Fix: Lintian error "copyright-without-copyright-notice". - Fix: Cargo Deb "warning: extended-description field missing" (via cargo deb PR 138). - Fix: Incorrect systemd unit "vendor preset: enabled" (via PR 276). - Fix: Remove unused /etc/krill directory created by the "ConfigurationDirectory" systemd unit key. Also: - Use debhelper dh_installsystemd style support for systemd unit installation (based on official Debian debhelper dh_installsystemd autoscripts & logic) instead of incomplete/erroneous hand crafted maintainer scripts (via cargo deb PR 135). - Uses systemd unit masking on package removal as recommended (see PR 276). - Enables bash echo output for pkg workflow run steps. - Verfies built deb packages with Lintian. - Less repetition in Cargo.toml.
133 lines
4.6 KiB
TOML
133 lines
4.6 KiB
TOML
[package]
|
|
# Note: some of these values are also used when building Debian packages below.
|
|
name = "krill"
|
|
version = "0.7.3-plus"
|
|
edition = "2018"
|
|
authors = [ "The NLnet Labs RPKI team <rpki-team@nlnetlabs.nl>" ]
|
|
description = "Resource Public Key Infrastructure (RPKI) daemon"
|
|
homepage = "https://www.nlnetlabs.nl/projects/rpki/krill/"
|
|
repository = "https://github.com/NLnetLabs/krill"
|
|
keywords = ["rpki", "routing-security", "bgp"]
|
|
readme = "README.md"
|
|
license = "MPL-2.0"
|
|
exclude = [
|
|
"test-resources/*",
|
|
"tests/*",
|
|
]
|
|
|
|
[dependencies]
|
|
base64 = "^0.10"
|
|
bcder = "0.5.0"
|
|
bytes = "^0.5"
|
|
chrono = { version = "^0.4", features = ["serde"] }
|
|
clap = "^2.32"
|
|
clokwerk = "^0.1"
|
|
derive_more = "^0.13"
|
|
fern = { version = "^0.5", features = ["syslog-4"] }
|
|
futures = "0.3.4"
|
|
futures-util = "0.3.4"
|
|
hex = "^0.3"
|
|
hyper = "^0.13"
|
|
intervaltree = "0.2.6"
|
|
libflate = "1.0.0"
|
|
log = "^0.4"
|
|
openssl = { version = "^0.10", features = ["v110"] }
|
|
pretty = "0.5.2" # for testing
|
|
rand = "^0.5"
|
|
reqwest = { version = "0.10.4", features = ["blocking", "json"] }
|
|
rpki = "0.9.0"
|
|
serde = { version = "^1.0", features = ["derive"] }
|
|
serde_json = "^1.0"
|
|
syslog = "^4.0"
|
|
tokio = { version = "=0.2.13", features = ["rt-core", "macros", "time"] }
|
|
tokio-proto = "0.1.1"
|
|
tokio-rustls = "0.13.0"
|
|
toml = "^0.4"
|
|
uuid = { version = "0.7", features = [ "v4"] }
|
|
xml-rs = "0.8.0"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = "^0.2"
|
|
syslog = "^4.0"
|
|
|
|
[build-dependencies]
|
|
ignore = "^0.4"
|
|
|
|
[features]
|
|
default = []
|
|
extra-debug = [ "rpki/extra-debug" ]
|
|
static-openssl = [ "openssl/vendored" ]
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# START DEBIAN PACKAGING
|
|
#
|
|
# Configurations for the cargo-deb cargo plugin which builds Debian packages in
|
|
# target/debian/ when invoked with: cargo deb. Tested with cargo-deb v1.23.1.
|
|
# Use `--variant` to select which section below to use. Variant sections inherit
|
|
# and override the settings in the base [package.metadata.deb] section. The
|
|
# configs vary because of differing degrees of OpenSSL and systemd support
|
|
# across operating systems.
|
|
#
|
|
# Note that as the postinst script uses the adduser command we declare a
|
|
# dependency on the adduser package to keep the lintian tool happy.
|
|
# Note: krill.conf is deliberately NOT specified as a "conf-file" because it is
|
|
# generated.
|
|
#
|
|
# The GitHub Actions pkg.yml workflow definition file uses these configurations
|
|
# to build and test Ubuntu/Debian packages for Krill.
|
|
#
|
|
# See:
|
|
# - https://github.com/mmstick/cargo-deb
|
|
# - https://lintian.debian.org/tags/systemd-service-file-outside-lib.html
|
|
# - https://www.debian.org/doc/debian-policy/ch-files.html#behavior
|
|
# - .github/workflows/pkg.yml
|
|
[package.metadata.deb]
|
|
name = "krill"
|
|
priority = "optional"
|
|
section = "net"
|
|
extended-description-file = "debian/description.txt"
|
|
license-file = ["LICENSE", "0"]
|
|
depends = "$auto, adduser, libssl1.1"
|
|
maintainer-scripts = "debian/"
|
|
changelog = "debian/changelog" # this will be generated by the pkg workflow
|
|
copyright = "Copyright (c) 2019, NLnet Labs. All rights reserved."
|
|
assets = [
|
|
["target/release/krill", "/usr/bin/krill", "755"],
|
|
["target/release/krillc", "/usr/bin/krillc", "755"],
|
|
["defaults/krill.conf", "/usr/share/doc/krill/krill.conf", "644"],
|
|
["doc/krill.1", "/usr/share/man/man1/krill.1", "644"],
|
|
["doc/krillc.1", "/usr/share/man/man1/krillc.1", "644"],
|
|
["debian/krill.service.preset", "/lib/systemd/system-preset/50-krill.preset", "644"],
|
|
]
|
|
|
|
[package.metadata.deb.systemd-units]
|
|
unit-name = "krill"
|
|
enable = false
|
|
start = true
|
|
restart-after-upgrade = false
|
|
stop-on-upgrade = true
|
|
|
|
# Variant of the Debian packaging configuration that:
|
|
# a) statically links with OpenSSL when building a Debian package because the
|
|
# newest OpenSSL available on Ubuntu 16.04 at the time of writing is 1.0.2g
|
|
# (see: https://packages.ubuntu.com/xenial/openssl) while Krill requires
|
|
# OpenSSL >= 1.1.0.
|
|
# b) uses a simpler systemd service unit file because Ubuntu 16.04 doesn't
|
|
# support newer features supported by Ubuntu 18.04 and 20.04.
|
|
[package.metadata.deb.variants.ubuntu1604]
|
|
features = [ "static-openssl" ]
|
|
depends = "$auto, adduser"
|
|
|
|
[package.metadata.deb.variants.ubuntu1804]
|
|
|
|
[package.metadata.deb.variants.ubuntu2004]
|
|
|
|
[package.metadata.deb.variants.debian9]
|
|
features = [ "static-openssl" ]
|
|
depends = "$auto, adduser"
|
|
|
|
[package.metadata.deb.variants.debian10]
|
|
|
|
# END DEBIAN PACKAGING
|
|
# ------------------------------------------------------------------------------
|