aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZetok Zalbavar <zetok@openmailbox.org>2016-12-08 03:56:12 +0000
committerZetok Zalbavar <zetok@openmailbox.org>2016-12-08 04:08:42 +0000
commitefa2f0944e549f41ef9f94a70282e79c261813dd (patch)
tree2702fce4b63939c1434c90d126be3fe414828db8 /net-misc
parentmedia-video/ffmpeg: Bump to 3.2.2 (diff)
downloadlibressl-efa2f0944e549f41ef9f94a70282e79c261813dd.tar.gz
libressl-efa2f0944e549f41ef9f94a70282e79c261813dd.tar.bz2
libressl-efa2f0944e549f41ef9f94a70282e79c261813dd.zip
net-misc/tlsdate: add patch for libressl and bump to EAPI 6
Patch found in FreeBSD ports. Package-Manager: portage-2.3.0
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/tlsdate/Manifest1
-rw-r--r--net-misc/tlsdate/files/tlsdate-0.0.13-libressl-no-sslv3-support.patch15
-rw-r--r--net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch22
-rw-r--r--net-misc/tlsdate/files/tlsdate.confd8
-rw-r--r--net-misc/tlsdate/files/tlsdate.rc17
-rw-r--r--net-misc/tlsdate/files/tlsdated.confd15
-rw-r--r--net-misc/tlsdate/files/tlsdated.default4
-rw-r--r--net-misc/tlsdate/files/tlsdated.rc19
-rw-r--r--net-misc/tlsdate/files/tlsdated.tmpfiles.conf1
-rw-r--r--net-misc/tlsdate/metadata.xml11
-rw-r--r--net-misc/tlsdate/tlsdate-0.0.13-r1.ebuild78
11 files changed, 191 insertions, 0 deletions
diff --git a/net-misc/tlsdate/Manifest b/net-misc/tlsdate/Manifest
new file mode 100644
index 0000000..f7c4156
--- /dev/null
+++ b/net-misc/tlsdate/Manifest
@@ -0,0 +1 @@
+DIST tlsdate-0.0.13.tar.gz 264228 SHA256 482640a5efb8489f287da1018176fb1196adf7cb1b81ac0c7f2b419b43d44258 SHA512 9c4fd51439976a8541fdf1bb70afa5333b43b2e43b801a65b3b1ac3e4a437fd3021ef2aaeeb13fc1ba63ccd119f6eff4c10e3a5a28cf0cfd96bbc7a174dbb789 WHIRLPOOL db91755d4751e64ca6285c9f1492d1b82a06f97921a47168398377818407efe6a0fcb901ef93272f0ff66121893873bb360868207998d054c5a550734b05db06
diff --git a/net-misc/tlsdate/files/tlsdate-0.0.13-libressl-no-sslv3-support.patch b/net-misc/tlsdate/files/tlsdate-0.0.13-libressl-no-sslv3-support.patch
new file mode 100644
index 0000000..b83ba7c
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate-0.0.13-libressl-no-sslv3-support.patch
@@ -0,0 +1,15 @@
+--- a/src/tlsdate-helper.c
++++ b/src/tlsdate-helper.c
+@@ -1133,10 +1133,12 @@ run_ssl (uint32_t *time_map, int time_is
+ {
+ verb ("V: using SSLv23_client_method()");
+ ctx = SSL_CTX_new(SSLv23_client_method());
++#ifndef OPENSSL_NO_SSL3
+ } else if (0 == strcmp("sslv3", protocol))
+ {
+ verb ("V: using SSLv3_client_method()");
+ ctx = SSL_CTX_new(SSLv3_client_method());
++#endif
+ } else if (0 == strcmp("tlsv1", protocol))
+ {
+ verb ("V: using TLSv1_client_method()");
diff --git a/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch b/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch
new file mode 100644
index 0000000..df03833
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate-0.0.13-tlsdated-service.patch
@@ -0,0 +1,22 @@
+From: Dominik Kriegner <dominik.kriegner@gmail.com>
+Date: Tue, 26 Jan 2016 12:12:26 +0000
+Subject: [PATCH] Fix systemd unit file
+
+Project-Bug-URL: https://github.com/ioerror/tlsdate/pull/162
+Gentoo-Bug-URL: https://bugs.gentoo.org/533380
+
+--- a/systemd/tlsdated.service
++++ b/systemd/tlsdated.service
+@@ -5,6 +5,9 @@ After=network.target
+ [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/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 100644
index 0000000..8207cec
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.rc
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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.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 100644
index 0000000..1496474
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdated.rc
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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/metadata.xml b/net-misc/tlsdate/metadata.xml
new file mode 100644
index 0000000..82f0444
--- /dev/null
+++ b/net-misc/tlsdate/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>vapier@gentoo.org</email>
+ <description>feel free to fix things</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ioerror/tlsdate</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-misc/tlsdate/tlsdate-0.0.13-r1.ebuild b/net-misc/tlsdate/tlsdate-0.0.13-r1.ebuild
new file mode 100644
index 0000000..9d1fff2
--- /dev/null
+++ b/net-misc/tlsdate/tlsdate-0.0.13-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit autotools eutils systemd vcs-snapshot user
+
+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 ~arm64 ~hppa ~ia64 ~m68k ~mips ~s390 ~sh ~sparc ~x86"
+IUSE="dbus libressl +seccomp static-libs"
+
+DEPEND="
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:0= )
+ 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}"/${P}-tlsdated-service.patch
+
+ # support libressl
+ use libressl && epatch "${FILESDIR}"/${P}-libressl-no-sslv3-support.patch
+
+ eapply_user
+ 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 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
+}