a3b51018a9
- Makefile: add make patch|minor|major (tag + push), dist-build, completions, and rpm/rpm-package targets. - packaging/nfpm.yaml + scripts/build-rpm.sh: package the tomswall binary with bash/zsh completions, the example config, and a systemd agent unit into an RPM. - packaging/tomswall-agent.service + agent.env: run `tomswall agent` as a systemd service (CAP_NET_ADMIN/CAP_NET_RAW), configured via /etc/tomswall/agent.env. - .woodpecker/release.yaml: on v* tag, test -> build -> package RPM -> PUT to the artifactapi rpm-internal repo. Matches node-lookup conventions.
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
---
|
|
# nfpm config for building the tomswall RPM.
|
|
# Rendered through envsubst (see scripts/build-rpm.sh) then fed to `nfpm pkg`.
|
|
|
|
name: ${PACKAGE_NAME}
|
|
version: ${PACKAGE_VERSION}
|
|
release: ${PACKAGE_RELEASE}
|
|
arch: ${PACKAGE_ARCH}
|
|
platform: ${PACKAGE_PLATFORM}
|
|
section: default
|
|
priority: extra
|
|
description: "${PACKAGE_DESCRIPTION}"
|
|
|
|
maintainer: ${PACKAGE_MAINTAINER}
|
|
homepage: ${PACKAGE_HOMEPAGE}
|
|
license: ${PACKAGE_LICENSE}
|
|
|
|
disable_globbing: false
|
|
|
|
replaces:
|
|
- tomswall
|
|
provides:
|
|
- tomswall
|
|
|
|
contents:
|
|
- src: dist/tomswall
|
|
dst: /usr/sbin/tomswall
|
|
file_info:
|
|
mode: 0755
|
|
owner: root
|
|
group: root
|
|
|
|
# Example configuration (never overwrites an existing tomswall.yaml).
|
|
- src: tomswall.example.yaml
|
|
dst: /etc/tomswall/tomswall.example.yaml
|
|
file_info:
|
|
mode: 0644
|
|
|
|
# systemd unit + environment file for the control-plane agent.
|
|
- src: packaging/tomswall-agent.service
|
|
dst: /usr/lib/systemd/system/tomswall-agent.service
|
|
file_info:
|
|
mode: 0644
|
|
- src: packaging/tomswall-agent.env
|
|
dst: /etc/tomswall/agent.env
|
|
type: config|noreplace
|
|
file_info:
|
|
mode: 0640
|
|
|
|
# Shell completions (generated by scripts/build-rpm.sh before packaging).
|
|
- src: dist/completions/tomswall.bash
|
|
dst: /usr/share/bash-completion/completions/tomswall
|
|
file_info:
|
|
mode: 0644
|
|
- src: dist/completions/_tomswall
|
|
dst: /usr/share/zsh/site-functions/_tomswall
|
|
file_info:
|
|
mode: 0644
|