From 3c96f35f47110ca6502d3ef3fb341f1311966254 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Thu, 24 Aug 2023 13:25:55 +0200 Subject: [PATCH] New package: ntpd-rs-1.0.0 --- srcpkgs/ntpd-rs/INSTALL | 5 +++++ srcpkgs/ntpd-rs/files/ntpd-rs/run | 4 ++++ srcpkgs/ntpd-rs/template | 37 +++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 srcpkgs/ntpd-rs/INSTALL create mode 100644 srcpkgs/ntpd-rs/files/ntpd-rs/run create mode 100644 srcpkgs/ntpd-rs/template diff --git a/srcpkgs/ntpd-rs/INSTALL b/srcpkgs/ntpd-rs/INSTALL new file mode 100644 index 0000000000000..bb7e53afa9362 --- /dev/null +++ b/srcpkgs/ntpd-rs/INSTALL @@ -0,0 +1,5 @@ +case "${ACTION}" in +post) + setcap CAP_SYS_TIME=+ep usr/bin/ntp-daemon + ;; +esac diff --git a/srcpkgs/ntpd-rs/files/ntpd-rs/run b/srcpkgs/ntpd-rs/files/ntpd-rs/run new file mode 100644 index 0000000000000..d9b5fdbb6423f --- /dev/null +++ b/srcpkgs/ntpd-rs/files/ntpd-rs/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +[ ! -d /run/ntpd-rs ] && mkdir /run/ntpd-rs && chown _ntpd_rs:_ntpd_rs /run/ntpd-rs +exec chpst -u _ntpd_rs:_ntpd_rs ntp-daemon diff --git a/srcpkgs/ntpd-rs/template b/srcpkgs/ntpd-rs/template new file mode 100644 index 0000000000000..46e4a444b2a74 --- /dev/null +++ b/srcpkgs/ntpd-rs/template @@ -0,0 +1,37 @@ +# Template file for 'ntpd-rs' +pkgname=ntpd-rs +version=1.0.0 +revision=1 +build_style=cargo +make_check_args="-- + --skip algorithm::kalman::peer::tests::test_offset_steering_and_measurements + --skip keyexchange::tests::client_connection_refused + --skip interface_name::tests::find_interface_ipv6 + --skip socket::tests::test_client_basic_ipv6 + --skip socket::tests::test_server_basic_ipv6" +make_install_args="--path ntpd" +depends="libcap-progs" +short_desc="Full-featured implementation of the Network Time Protocol" +maintainer="Marcin Puc " +license="Apache-2.0, MIT" +homepage="https://github.com/pendulum-project/ntpd-rs" +changelog="https://raw.githubusercontent.com/pendulum-project/ntpd-rs/main/CHANGELOG.md" +distfiles="https://github.com/pendulum-project/ntpd-rs/archive/refs/tags/v${version}.tar.gz" +checksum=044b65c22154464f89cd5429645b3da6dfee94d3e02bc05576e7d569fd6ca82f + +system_accounts="_ntpd_rs" +conf_files="/etc/ntpd-rs/ntp.toml" +provides="ntp-daemon-0_1" +alternatives=" + ntpd:ntpd:/usr/bin/ntp-daemon + ntpd:ntpd:/etc/sv/ntpd-rs" + +post_install() { + vinstall ntp.toml 644 etc/ntpd-rs + vlicense LICENSE-MIT + vsv ntpd-rs + + for manpage in docs/precompiled/man/*; do + vman ${manpage} + done +}