diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/Manifest b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/Manifest new file mode 100644 index 0000000000..3735d4d858 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/Manifest @@ -0,0 +1 @@ +DIST tlsdate-0.0.6.1.tar.gz 237594 SHA256 882ba80c61ca010862e2a8e1de45f2031a6861ddb4085e9d18754be50b369cd0 SHA512 d5739237e632d2039e311e632e68e8233bb274863473b43e772101f19679c0d3848f33261956a0fcacf990eea2256f031de32995cfabc105b8ebdf7d0c9f5b06 WHIRLPOOL 72419f166c0193e54761fdaead5403de56066fb465934e0afec601a0184a3f5b04891d99681deb9d003a9e4548234afe0dedafaffa4bc92d141cf64f2ba7ffdc diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/chromeos-version.sh b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/chromeos-version.sh new file mode 100755 index 0000000000..86ac8dff69 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/chromeos-version.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec gawk -F, '{print gensub(/[[\]]/, "", "g", $2); exit}' "$1"/configure.ac diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/org.torproject.tlsdate.conf b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/org.torproject.tlsdate.conf new file mode 100644 index 0000000000..0611af43ad --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/org.torproject.tlsdate.conf @@ -0,0 +1,8 @@ + + + + + + + diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdate.confd b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdate.confd new file mode 100644 index 0000000000..2d7ed030de --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdate.rc b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdate.rc new file mode 100755 index 0000000000..b4d6f97ecc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.conf b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.conf new file mode 100644 index 0000000000..800a315885 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.conf @@ -0,0 +1,22 @@ +base-path /var/cache/tlsdated +dry-run no +jitter 0 +max-tries 10 +min-steady-state-interval 86400 +should-load-disk yes +should-netlink yes +should-save-disk yes +should-sync-hwclock yes +steady-state-interval 86400 +subprocess-tries 10 +subprocess-wait-between-tries 3 +verbose yes +wait-between-tries 10 + +# Host configuration. +source + host clients3.google.com + port 443 + proxy none +end + diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.confd b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.confd new file mode 100644 index 0000000000..d257289cc5 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.rc b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.rc new file mode 100755 index 0000000000..e055a03a99 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/files/tlsdated.rc @@ -0,0 +1,19 @@ +#!/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/tlsdated.rc,v 1.1 2012/12/11 01:49:23 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 "${TLSDATED_CACHE_DIR}" +} diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/metadata.xml b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/metadata.xml new file mode 100644 index 0000000000..2be9152ce0 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/metadata.xml @@ -0,0 +1,8 @@ + + + + + vapier@gentoo.org + feel free to fix things + + diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-0.0.5-r23.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-0.0.5-r23.ebuild new file mode 100644 index 0000000000..1cacf542d7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-0.0.5-r23.ebuild @@ -0,0 +1,48 @@ +# Copyright 2012 The Chromium OS Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" +CROS_WORKON_COMMIT="8dbe89e0e08d5e5adeb4f414e8f284dbf0c17b80" +CROS_WORKON_TREE="3d6b0d529e066591245a40e40731b7e2b20d3b5c" +CROS_WORKON_PROJECT="chromiumos/third_party/tlsdate" + +inherit autotools flag-o-matic toolchain-funcs cros-workon + +DESCRIPTION="Update local time over HTTPS" +HOMEPAGE="https://github.com/ioerror/tlsdate" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="+dbus" + +DEPEND="dev-libs/openssl + dbus? ( sys-apps/dbus )" +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf +} + +src_configure() { + # Our unprivileged group is called "nobody" + econf \ + $(use_enable dbus) \ + --with-unpriv-user=tlsdate \ + --with-unpriv-group=tlsdate \ + --with-dbus-user=tlsdate-dbus \ + --with-dbus-group=tlsdate-dbus +} + +src_compile() { + tc-export CC + emake CFLAGS="-Wall ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" +} + +src_install() { + default + insinto /etc/tlsdate + doins "${FILESDIR}/tlsdated.conf" + insinto /etc/dbus-1/system.d + doins "${FILESDIR}/org.torproject.tlsdate.conf" +} diff --git a/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-9999.ebuild new file mode 100644 index 0000000000..686a558fbc --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/net-misc/tlsdate/tlsdate-9999.ebuild @@ -0,0 +1,46 @@ +# Copyright 2012 The Chromium OS Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="4" +CROS_WORKON_PROJECT="chromiumos/third_party/tlsdate" + +inherit autotools flag-o-matic toolchain-funcs cros-workon + +DESCRIPTION="Update local time over HTTPS" +HOMEPAGE="https://github.com/ioerror/tlsdate" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="+dbus" + +DEPEND="dev-libs/openssl + dbus? ( sys-apps/dbus )" +RDEPEND="${DEPEND}" + +src_prepare() { + eautoreconf +} + +src_configure() { + # Our unprivileged group is called "nobody" + cros-workon_src_configure \ + $(use_enable dbus) \ + --with-unpriv-user=tlsdate \ + --with-unpriv-group=tlsdate \ + --with-dbus-user=tlsdate-dbus \ + --with-dbus-group=tlsdate-dbus +} + +src_compile() { + tc-export CC + emake CFLAGS="-Wall ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" +} + +src_install() { + default + insinto /etc/tlsdate + doins "${FILESDIR}/tlsdated.conf" + insinto /etc/dbus-1/system.d + doins "${FILESDIR}/org.torproject.tlsdate.conf" +} diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask index 1cb3b14ac7..8062c72550 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.mask @@ -10,3 +10,4 @@ # Use the 3.* series of syslinux, seems to work correctly with the # chromeos build system for now >=sys-boot/syslinux-3.90 +>=net-misc/tlsdate-0.0.6