summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kriegner <dominik.kriegner@gmail.com>2015-04-28 23:35:31 +0200
committerDominik Kriegner <dominik.kriegner@gmail.com>2015-04-28 23:35:31 +0200
commit9716e7acc91bba514f207c6c9beb7f266ec06124 (patch)
tree1054db424dcdcd419f13d4d68d479dd3fdc3857f
parentbump xrayutilities to 1.1.2 (diff)
downloadanaximander-9716e7acc91bba514f207c6c9beb7f266ec06124.tar.gz
anaximander-9716e7acc91bba514f207c6c9beb7f266ec06124.tar.bz2
anaximander-9716e7acc91bba514f207c6c9beb7f266ec06124.zip
add tlsdate from bug #533380
-rw-r--r--net-misc/tlsdate/Manifest9
-rw-r--r--net-misc/tlsdate/files/tlsdate.confd8
-rwxr-xr-xnet-misc/tlsdate/files/tlsdate.rc17
-rw-r--r--net-misc/tlsdate/files/tlsdated-service.patch16
-rw-r--r--net-misc/tlsdate/files/tlsdated.confd15
-rw-r--r--net-misc/tlsdate/files/tlsdated.default4
-rwxr-xr-xnet-misc/tlsdate/files/tlsdated.rc19
-rw-r--r--net-misc/tlsdate/files/tlsdated.tmpfiles.conf1
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.12-r3.ebuild78
9 files changed, 167 insertions, 0 deletions
diff --git a/net-misc/tlsdate/Manifest b/net-misc/tlsdate/Manifest
new file mode 100644
index 0000000..298f08c
--- /dev/null
+++ b/net-misc/tlsdate/Manifest
@@ -0,0 +1,9 @@
+AUX tlsdate.confd 247 SHA256 d3e4f1ca2941813cdee93ef039a5156db410cea2dc4b0e1a738a9bae89835d63 SHA512 62149e3a9f26a71624bd851780f92a41c9aaf138793b5da762aa3002bcc5a409686d1bbe687b4abf1fc2e12205720a3825d9603cab0b0d978c2d0fd41422efe7 WHIRLPOOL b7c99243741e31cebf30550ec410dffbf0bcee5f47213cdc6f6daeb5e2764feba95e16706f575c493a6d1b23a2e9d49ac5f9285db204205f79d6f582afd4599f
+AUX tlsdate.rc 456 SHA256 711dab323727cf95b87dfe5793dd31d42d3291b5a5022c2a1f4f456d8ee4a985 SHA512 26f6900a781c9f7111b3b33277ded35bd5904305bcc5149e9189da43169ef021df4a6c27a2b8b053674a127b23b47fdd9e2087f320c3e0a74f540e3a2143f5df WHIRLPOOL 56df270b769d635f66cc700a90729d8ca2af46a16e58b0597acfaf2d4e3319ce836ceff668b1ea473e9db3724771bccf681a47686ec31bd6292ce70ffc6d3bfc
+AUX tlsdated-service.patch 550 SHA256 6cd9544d40d7f1666e3c163254ef05aa9737eb9a47676ecc8b6c2cf36bd2513a SHA512 d87cd35b7d8ebf8d74d80c27b803059b9b61fa184ed4864ec2819b5d0e613a9c3f5c1a06658aed7efe3b43db318b6a3daa0f3a96234d792e6aab3a114ad9e6f9 WHIRLPOOL 6a7f5414a77b9f58a6e95b5991b5353a5cd5a0283aac74a909c4eaf214368b90dcb7bfac38724555b518ea357f26eb73b550512fb2330b964e2d05b90760f25b
+AUX tlsdated.confd 469 SHA256 1c52ff7bc7ce0fbd876a4f594948a70e30e6197bae2b9bc1b55cc6d398091131 SHA512 38bd7d64473ab487eea2539b11a7acadfc3fa5a627fb12e78931b62c46d3ebedab4c75d56839b0dee9fd8f42d4b7ae9ace08ea3f58941b8e2d183828c6a4fef2 WHIRLPOOL 07a8bec2ccf63bacb141b51ca9050eb656fe7b8b03f63e4f06ac3d5b0958345388b23a200080180e6cf8e43ad0c71d9db8c5db2700aeb050157d5a29f8df6c77
+AUX tlsdated.default 114 SHA256 6deea41ebc0aa8c4340c2ffe5e1ede787042bac0ce0964a88c6f388d6b31469c SHA512 f18138f0980f2c02405597eccb03d3031129ca622ebccf80d6090697857853823ae69e06afff65275304d25f6cb31121b93c21575990e5008f0646b28d37bfcd WHIRLPOOL 9781010b39d48bd1c1a261d9569e6b6a5fd1c8f3813a5a64dbc422777cfcb4a7d184dfc5a102d5fd7fa3787df101f159d0ce534d84dce160f055bdd096daf244
+AUX tlsdated.rc 538 SHA256 d33b504d3d2c03cbb5bccfccf269b997a7506fae5bf187a760d59ab851eaae8e SHA512 9056b927ccdf3c79f3f5880bee1cea623bdf943ec76eec0117be23f1807b0394d77bd8f682509b7b060084cbc9a0fcdcb41eb8f941ee182bb941682981998410 WHIRLPOOL c187f71ca1cb3a1ee027168924afb18b18104e718041959c26d9b60c235887e583f62a8f0e0dd6f81220d8f641fffff04aa7f6b61ab462ae2e88c0c6cdb8c796
+AUX tlsdated.tmpfiles.conf 45 SHA256 40ac6b68d24e9c5e91393ed53a974e16cb2b63a30f17a5f145b92330d6edf8fe SHA512 c9b5c682032efb16e8b182aafa5a768a210f04c598ab313fe66fceda9f8d496720d5d9e614a165c90fe82aed8c1327bee2a2706c2185fbe70b348349f9ea7ede WHIRLPOOL 04c415aff92f393bf47da1dd210af22e30ac344091e559760a1be75e8073465aea69a62cca8c43a82c642f035eeb0d2bd738b999165216836fcb2bfcac41472e
+DIST tlsdate-0.0.12.tar.gz 264156 SHA256 15cf5a86258fa17afe15cc6ea0c87d94caeafe3d77827fea0f358bac734f13e9 SHA512 c16ab3c86514f905841c14ec7b6544ecd6b94af26f4468a7ab923fae8971b77e5c2995fff66979c9c5ada117bb546df7c44378790b8a7b854b028d8769cf4e66 WHIRLPOOL 30e8bdaf89cd1cc0ef225ab5cc5e18322948b929d16495d3dd2af10558fd9e472d1703a6152349d51804e4143d580fc5bdf80e7272cfe11b003999493a5683f8
+EBUILD tlsdate-0.0.12-r3.ebuild 2226 SHA256 6ed5bb5d23aaa37c3eab822d198d11e17e2299c5b686925a0192b90698ec3626 SHA512 f5b631a547c6cf4787cebbbe519a31aa72546604441a80e079d173c16619d1a408993da88a944f921d710d084e9d9ba058afbf05f9b397b51ee35f07e7ad7323 WHIRLPOOL 1b2dd5078745d946de2c499a8905b5531a92ba694f032d47526834d46181fa6425fe6b21574b700f22c2cbaec2955f5d56c033fc06dd8c9ed68aae2a940cd8bb
diff --git a/net-misc/tlsdate/files/tlsdate.confd b/net-misc/tlsdate/files/tlsdate.confd
new file mode 100644
index 0000000..2d7ed03
--- /dev/null
+++ b/net-misc/tlsdate/files/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/net-misc/tlsdate/files/tlsdate.rc b/net-misc/tlsdate/files/tlsdate.rc
new file mode 100755
index 0000000..b4d6f97
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.rc
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# 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/net-misc/tlsdate/files/tlsdated-service.patch b/net-misc/tlsdate/files/tlsdated-service.patch
new file mode 100644
index 0000000..8e72506
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated-service.patch
@@ -0,0 +1,16 @@
+diff -urN a/systemd/tlsdated.service b/systemd/tlsdated.service
+--- a/systemd/tlsdated.service 2014-10-26 16:03:23.000000000 +0100
++++ b/systemd/tlsdated.service 2015-04-17 09:34:12.722988776 +0200
+@@ -5,6 +5,9 @@
+ [Service]
+ Type=simple
+ EnvironmentFile=/etc/default/tlsdated
+-ExecStart=/usr/sbin/tlsdated ${DAEMON_OPTS}
+-ExecReload=/bin/kill -HUP ${MAINPID}
+-ExecStop=/bin/kill -INT ${MAINPID}
++ExecStart=/usr/sbin/tlsdated $DAEMON_OPTS
++ExecReload=/bin/kill -HUP $MAINPID
++ExecStop=/bin/kill -INT $MAINPID
++
++[Install]
++WantedBy=multi-user.target
diff --git a/net-misc/tlsdate/files/tlsdated.confd b/net-misc/tlsdate/files/tlsdated.confd
new file mode 100644
index 0000000..d257289
--- /dev/null
+++ b/net-misc/tlsdate/files/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/net-misc/tlsdate/files/tlsdated.default b/net-misc/tlsdate/files/tlsdated.default
new file mode 100644
index 0000000..08186f7
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.default
@@ -0,0 +1,4 @@
+# defaults file for /etc/default/tlsdated
+
+# Additional options; see `man tlsdated` for reference.
+DEAMON_OPTS=""
diff --git a/net-misc/tlsdate/files/tlsdated.rc b/net-misc/tlsdate/files/tlsdated.rc
new file mode 100755
index 0000000..4d1781c
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.rc
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# 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}"
+}
diff --git a/net-misc/tlsdate/files/tlsdated.tmpfiles.conf b/net-misc/tlsdate/files/tlsdated.tmpfiles.conf
new file mode 100644
index 0000000..07a7966
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.tmpfiles.conf
@@ -0,0 +1 @@
+d /var/cache/tlsdated 0700 tlsdate tlsdate -
diff --git a/net-misc/tlsdate/tlsdate-0.0.12-r3.ebuild b/net-misc/tlsdate/tlsdate-0.0.12-r3.ebuild
new file mode 100644
index 0000000..3b9b96e
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.12-r3.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/tlsdate/tlsdate-0.0.12-r2.ebuild,v 1.5 2015/03/06 18:48:11 vapier Exp $
+
+EAPI="5"
+
+inherit autotools eutils vcs-snapshot user systemd
+
+DESCRIPTION="Update local time over HTTPS"
+HOMEPAGE="https://github.com/ioerror/tlsdate"
+SRC_URI="https://github.com/ioerror/tlsdate/tarball/${P} -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~mips ~x86"
+IUSE="dbus +seccomp static-libs"
+
+DEPEND="dev-libs/openssl:*
+ dev-libs/libevent
+ dbus? ( sys-apps/dbus )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Use the system cert store rather than a custom one specific
+ # to the tlsdate package. #534394
+ sed -i \
+ -e 's:/tlsdate/ca-roots/tlsdate-ca-roots.conf:/ssl/certs/ca-certificates.crt:' \
+ Makefile.am || die
+ epatch "${FILESDIR}/tlsdated-service.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-silent-rules \
+ $(use_enable dbus) \
+ $(use_enable seccomp seccomp-filter) \
+ --disable-hardened-checks \
+ --without-polarssl \
+ --with-unpriv-user=tlsdate \
+ --with-unpriv-group=tlsdate
+}
+
+src_install() {
+ default
+
+ # Use Google servers by default rather than a random German site.
+ # They provide round robin DNS and local servers automatically.
+ sed -i \
+ -e 's:www.ptb.de:www.google.com:' \
+ "${ED}"/etc/tlsdate/tlsdated.conf || die
+
+ # Use the system cert store; see src_prepare. #446426 #534394
+ rm "${ED}"/etc/tlsdate/ca-roots/tlsdate-ca-roots.conf || die
+ rmdir "${ED}"/etc/tlsdate/ca-roots || die
+
+ newinitd "${FILESDIR}"/tlsdated.rc tlsdated
+ newconfd "${FILESDIR}"/tlsdated.confd tlsdated
+ newinitd "${FILESDIR}"/tlsdate.rc tlsdate
+ newconfd "${FILESDIR}"/tlsdate.confd tlsdate
+
+ systemd_newunit "${S}"/systemd/tlsdated.service tlsdated.service
+ systemd_newtmpfilesd "${FILESDIR}"/tlsdated.tmpfiles.conf tlsdated.conf
+ insinto /etc/default
+ newins "${FILESDIR}"/tlsdated.default tlsdated
+
+ insinto /etc/dbus-1/system.d/
+ doins dbus/org.torproject.tlsdate.conf
+
+ use static-libs || \
+ find "${ED}"/usr '(' -name '*.la' -o -name '*.a' ')' -delete
+}
+
+pkg_preinst() {
+ enewgroup tlsdate 124
+ enewuser tlsdate 124 -1 /dev/null tlsdate
+}