diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-11 13:16:23 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-06-11 13:16:23 +0000 |
commit | 1d9fbe66c6f7e5f3517ea61e1e252a6fb94dfbb1 (patch) | |
tree | a38d4c320fe55d5ccb3f573f36f121f10c50f387 /main/tlsdate | |
parent | 69ea0b70bc7a777fd1be47cfb34d8437d62b1efe (diff) | |
download | aports-1d9fbe66c6f7e5f3517ea61e1e252a6fb94dfbb1.tar.bz2 aports-1d9fbe66c6f7e5f3517ea61e1e252a6fb94dfbb1.tar.xz |
main/tlsdate: add init.d scripts
Diffstat (limited to 'main/tlsdate')
-rw-r--r-- | main/tlsdate/APKBUILD | 39 | ||||
-rw-r--r-- | main/tlsdate/tlsdate.confd | 8 | ||||
-rw-r--r-- | main/tlsdate/tlsdate.initd | 17 | ||||
-rw-r--r-- | main/tlsdate/tlsdated.confd | 15 | ||||
-rw-r--r-- | main/tlsdate/tlsdated.initd | 19 |
5 files changed, 94 insertions, 4 deletions
diff --git a/main/tlsdate/APKBUILD b/main/tlsdate/APKBUILD index 28f0611dd1..82ed472c60 100644 --- a/main/tlsdate/APKBUILD +++ b/main/tlsdate/APKBUILD @@ -1,17 +1,24 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=tlsdate pkgver=0.0.4 -pkgrel=0 +pkgrel=1 pkgdesc="secure parasitic rdate replacement" url="https://github.com/ioerror/tlsdate" arch="all" license="BSD" depends="" depends_dev="" +pkgusers="tlsdate" +pkggroups="tlsdate" makedepends="autoconf automake libtool openssl-dev linux-headers" install="" subpackages="$pkgname-doc" -source="saveas-https://github.com/ioerror/tlsdate/tarball/tlsdate-${pkgver}/tlsdate-${pkgver}.tar.gz" +source="saveas-https://github.com/ioerror/tlsdate/tarball/tlsdate-${pkgver}/tlsdate-${pkgver}.tar.gz + tlsdate.confd + tlsdate.initd + tlsdated.confd + tlsdated.initd + " _builddir="$srcdir/tlsdate-${pkgver}" prepare() { @@ -34,14 +41,38 @@ build() { --prefix=/usr \ --disable-static \ --sysconfdir=/etc \ + --with-unpriv-user=tlsdate \ + --with-unpriv-group=tlsdate \ || return 1 - make CFLAGS+="-DUNPRIV_GROUP='\"nobody\"'" || return 1 + make || return 1 } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 rm "$pkgdir"/usr/lib/*.la + for i in $source; do + case "$i" in + *.initd) install -Dm755 "$srcdir"/$i "$pkgdir"/etc/init.d/$i \ + || return 1;; + *.confd) install -Dm644 "$srcdir"/$i "$pkgdir"/etc/conf.d/$i \ + || return 1;; + esac + done } -md5sums="af45899b7ee5eaf1676d5a478481e6f9 tlsdate-0.0.4.tar.gz" +md5sums="af45899b7ee5eaf1676d5a478481e6f9 tlsdate-0.0.4.tar.gz +18b3d4a8153a7d61fbd499a1d3a97231 tlsdate.confd +ee0e2f5ba3d5aa1ed12995c9af61022f tlsdate.initd +53e956dbaf6b67c408c080e6b9f2f3a5 tlsdated.confd +e636192886e247c9144df9a747902a59 tlsdated.initd" +sha256sums="46d6caf123240aff7fd9e162582578b961a556dba2fc6cc3f6dede5c7cd48e0d tlsdate-0.0.4.tar.gz +d3e4f1ca2941813cdee93ef039a5156db410cea2dc4b0e1a738a9bae89835d63 tlsdate.confd +4652276edc4c4cec8b26735c81ee34c35aa887e8a5ddcfe78170360092c7f5fe tlsdate.initd +1c52ff7bc7ce0fbd876a4f594948a70e30e6197bae2b9bc1b55cc6d398091131 tlsdated.confd +2a39cde73cf628ff168a156cd1ce14c324be5bcd0384f9979a89d79ef1d60325 tlsdated.initd" +sha512sums="a84e599a823a00d667f9025ffc1c3bd15cdb5a55a95fcec0634da4d2f1bb9ad9de7f6ea64475ab14179a281b797ecd9854b5e40f9890a59a6f56154e7dcd2830 tlsdate-0.0.4.tar.gz +62149e3a9f26a71624bd851780f92a41c9aaf138793b5da762aa3002bcc5a409686d1bbe687b4abf1fc2e12205720a3825d9603cab0b0d978c2d0fd41422efe7 tlsdate.confd +c54d11ead7ee5035e4829df92b23cd54a71535199844b4f64ecfa715d9838ef954e7c2434df0767bb32c8226448d2fa080180be76ed8e417d5fa6dfc9c08dce6 tlsdate.initd +38bd7d64473ab487eea2539b11a7acadfc3fa5a627fb12e78931b62c46d3ebedab4c75d56839b0dee9fd8f42d4b7ae9ace08ea3f58941b8e2d183828c6a4fef2 tlsdated.confd +9601ab4f9bd8870ed0c8e4f9dcbc32df902a5998ea6eeb8c40b8a8286515f35bf2d755784d267f78d53ac9baaf2d20051e99c35ceabe9d846d9a2a40cf135760 tlsdated.initd" diff --git a/main/tlsdate/tlsdate.confd b/main/tlsdate/tlsdate.confd new file mode 100644 index 0000000000..2d7ed030de --- /dev/null +++ b/main/tlsdate/tlsdate.confd @@ -0,0 +1,8 @@ +# config file for /etc/init.d/tlsdate + +# Command to execute to set the time. +# This are some common tlsdate options: +# -l: leap (set time regardless of difference) +# -H: hostname to sync with +# -x: proxy URL +TLSDATE_OPTS="-l -H www.google.com" diff --git a/main/tlsdate/tlsdate.initd b/main/tlsdate/tlsdate.initd new file mode 100644 index 0000000000..9f4b0c2af8 --- /dev/null +++ b/main/tlsdate/tlsdate.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tlsdate/files/tlsdate.rc,v 1.1 2012/12/11 01:49:23 vapier Exp $ + +description="set time once when started" + +depend() { + use net +} + +start() { + : ${TLSDATE_CMD:=tlsdate} + ebegin "Setting clock via tlsdate '${TLSDATE_CMD}'" + "${TLSDATE_CMD}" ${TLSDATE_OPTS} + eend $? "Failed to set clock" +} diff --git a/main/tlsdate/tlsdated.confd b/main/tlsdate/tlsdated.confd new file mode 100644 index 0000000000..d257289cc5 --- /dev/null +++ b/main/tlsdate/tlsdated.confd @@ -0,0 +1,15 @@ +# config file for /etc/init.d/tlsdated + +# Command to execute to set the time. +# This are some common tlsdate options: +# -l: leap (set time regardless of difference) +# -H: hostname to sync with +# -x: proxy URL +TLSDATED_CMD="/usr/bin/tlsdate -l -H www.google.com" + +# Additional options; see `man tlsdated` for reference. +TLSDATED_OPTS="" + +# Cache dir. Probably don't need to change this. +# It matches the compiled-in default. +TLSDATED_CACHE_DIR="/var/cache/tlsdated" diff --git a/main/tlsdate/tlsdated.initd b/main/tlsdate/tlsdated.initd new file mode 100644 index 0000000000..32936875ac --- /dev/null +++ b/main/tlsdate/tlsdated.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/tlsdate/files/tlsdated.rc,v 1.2 2014/11/06 16:00:28 vapier Exp $ + +description="start a daemon to continuously set time via a helper" + +command="tlsdated" +command_args="${TLSDATED_OPTS} -- ${TLSDATED_CMD}" +command_background="true" +pidfile="/var/run/${SVCNAME}.pid" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0700 -o tlsdate:tlsdate "${TLSDATED_CACHE_DIR}" +} |