summaryrefslogtreecommitdiff
path: root/app-misc/uptimed
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-misc/uptimed
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-misc/uptimed')
-rw-r--r--app-misc/uptimed/Manifest7
-rw-r--r--app-misc/uptimed/files/uptimed.init-r118
-rw-r--r--app-misc/uptimed/files/uptimed.service10
-rw-r--r--app-misc/uptimed/metadata.xml11
-rw-r--r--app-misc/uptimed/uptimed-0.4.0-r1.ebuild53
-rw-r--r--app-misc/uptimed/uptimed-0.4.1.ebuild51
6 files changed, 150 insertions, 0 deletions
diff --git a/app-misc/uptimed/Manifest b/app-misc/uptimed/Manifest
new file mode 100644
index 000000000000..5703d06c92ed
--- /dev/null
+++ b/app-misc/uptimed/Manifest
@@ -0,0 +1,7 @@
+AUX uptimed.init-r1 730 BLAKE2B 21d7b8f5fa4daee5a3807d35f749a467731b5e2ebc0e2b741cbe20ad9af32aefa52566fe99dedc31abf30c3f74d74ced97ce094f07203b1473bc79d9ee2546e2 SHA512 8a9e054b2ae3f5479504b0d466a96687f5be2c5d1d8fda740597ca21d8854b4ba4bc8576f8f903392e1b3c7564e3e9e80eb39f30f5a8df0b228d1bdae04725f0
+AUX uptimed.service 209 BLAKE2B 9f763df7f903aa9a2563041acad553906e0a69faf93280bceee3bb7856e67c1010d067c06ae699f4dd0389228392d5828e1bf75636c69171e2d21509330f6baf SHA512 949baf12782d4b8a976d29ec44bd31323500de763b82601634eea3721ce9035bb9b7ca906384e2b8ebd57371a1116a95dd78c3610c27fa1d93e36b9f897bcd98
+DIST uptimed-0.4.0.tar.gz 55026 BLAKE2B 9f66f3cda4181c01e686896a8560ecab7bb7f3ed9cdaeaee840a589137188d8629ba414e436a99b212d386b8d3319ce88ccb8867c78335b015ed65a179154621 SHA512 918cd9e065d5005daf5062f14dffb725cb6d6764aa571fd45d63de3f7349b910cbae0dedc832f9bfb52a42caea90e8aec8390685baaf0718fec827240e517900
+DIST uptimed-0.4.1.tar.gz 55162 BLAKE2B c281f922ed4fcf4f55571f1f1177451bf9f2e0fecfc87566610e1d24055969cd61543fcb0fdae4d0e6dc7a082c1b9013a08b72641d572a2475e9c7f5fd56deae SHA512 5dfe79aebab8c8daca3a3ec88d54e312446fc7cf8b54ef1414cbfcb3fb25053ef31235de4b42cb14fc7352965b77ca2875c753b97b4d61178792a5484715e23a
+EBUILD uptimed-0.4.0-r1.ebuild 1476 BLAKE2B f402e24dc3b229c10007464807ecc8427aeb078745dfd82e333884455a333a81a4bef074cb4c723d52f280a0f82f7de8edaa706cf04cbda1e070a2e9444cbeeb SHA512 cd97c3611a7e5d9f87364c703f811fb2b790239f5c4db0998ab7468d218de6c16a33c5ce0ad8529cc50f00b8efa354c194e1bcfca1daa842a7110402024f328b
+EBUILD uptimed-0.4.1.ebuild 1421 BLAKE2B 363b45ddcb148a2e56c6629be1f0eca7c2a8e28964a5422ec1de992eea1823bf786508b80f82e587111811b11e6b4daebd43ca61d2d1444756e9e6a3ef9c6a27 SHA512 51401b8ed326a61d1bb2bb7acf22666ecc901a675c7756120bfce1091d058d280fbf66c891bb2da1082b54405a3b257de677e7f14942f0e96098e81b1daff266
+MISC metadata.xml 343 BLAKE2B c84e06dd0bdd9ae4d3b36bf4795c51e9037c38401f8d3fadeb9853190e8291f82f370ac45afab0f79326c89dcfb359d139a08a490ca4f7418738f61d8d0d1f02 SHA512 59bdf10b3845f10cfbb9441ccd3ac6d8a7a85791f57acc2148ad334d0b9883d4d98b388bc93eacdec8a77ac885339e2aea368a9755bbda483132ec69c68a430f
diff --git a/app-misc/uptimed/files/uptimed.init-r1 b/app-misc/uptimed/files/uptimed.init-r1
new file mode 100644
index 000000000000..96564d8ee541
--- /dev/null
+++ b/app-misc/uptimed/files/uptimed.init-r1
@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="uptimed - a daemon to record uptime records"
+pidfile="/run/uptimed.pid"
+command="/usr/sbin/uptimed"
+command_user="uptimed"
+
+# The uptimed daemon can create its own PID file, but it doesn't know
+# how to drop privileges. On the other hand, if we run it as a
+# restricted user under start-stop-daemon, the PID file it creates
+# will therefore be owned by a non-root user, and that poses a
+# security risk. To avoid the issue entirely, we run the daemon in the
+# foreground, and then use command_background=true to let OpenRC
+# handle the PID file.
+command_args="-f"
+command_background="true"
diff --git a/app-misc/uptimed/files/uptimed.service b/app-misc/uptimed/files/uptimed.service
new file mode 100644
index 000000000000..531c41570216
--- /dev/null
+++ b/app-misc/uptimed/files/uptimed.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Uptime record tracking daemon
+Documentation=man:uptimed(8) man:uprecords(1)
+
+[Service]
+ExecStartPre=/usr/sbin/uptimed -b
+ExecStart=/usr/sbin/uptimed -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/uptimed/metadata.xml b/app-misc/uptimed/metadata.xml
new file mode 100644
index 000000000000..bb0ec8b1e524
--- /dev/null
+++ b/app-misc/uptimed/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>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rpodgorny/uptimed</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/app-misc/uptimed/uptimed-0.4.0-r1.ebuild b/app-misc/uptimed/uptimed-0.4.0-r1.ebuild
new file mode 100644
index 000000000000..2fbdfafd16b3
--- /dev/null
+++ b/app-misc/uptimed/uptimed-0.4.0-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils user systemd
+
+DESCRIPTION="System uptime record daemon that keeps track of your highest uptimes"
+HOMEPAGE="https://github.com/rpodgorny/uptimed/"
+SRC_URI="https://github.com/rpodgorny/uptimed/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="static-libs"
+
+pkg_setup() {
+ enewgroup uptimed
+ enewuser uptimed -1 -1 -1 uptimed
+}
+
+src_prepare() {
+ default
+ # respect DESTDIR
+ sed -i -e 's|-d \(/var/spool.*\)$|-d $(DESTDIR)\1|' Makefile.am || die
+ # fix configure.ac for >=automake-1.13 (bug #467582)
+ sed 's@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@' -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ local DOCS=( ChangeLog README.md TODO AUTHORS CREDITS INSTALL.cgi sample-cgi/* )
+ default
+ prune_libtool_files --all
+ keepdir /var/spool/uptimed
+ fowners uptimed:uptimed /var/spool/uptimed
+ newinitd "${FILESDIR}"/${PN}.init-r1 uptimed
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ einfo "Fixing permissions in /var/spool/${PN}"
+ chown -R uptimed:uptimed /var/spool/${PN}
+ echo
+ elog "Start uptimed with '/etc/init.d/uptimed start' (for openRC)"
+ elog "or systemctl start uptimed (for systemd)"
+ elog "To view your uptime records, use the command 'uprecords'."
+ echo
+}
diff --git a/app-misc/uptimed/uptimed-0.4.1.ebuild b/app-misc/uptimed/uptimed-0.4.1.ebuild
new file mode 100644
index 000000000000..498d1fc64756
--- /dev/null
+++ b/app-misc/uptimed/uptimed-0.4.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools user systemd
+
+DESCRIPTION="System uptime record daemon that keeps track of your highest uptimes"
+HOMEPAGE="https://github.com/rpodgorny/uptimed/"
+SRC_URI="https://github.com/rpodgorny/uptimed/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="static-libs"
+
+pkg_setup() {
+ enewgroup uptimed
+ enewuser uptimed -1 -1 -1 uptimed
+}
+
+src_prepare() {
+ default
+ # fix configure.ac for >=automake-1.13 (bug #467582)
+ sed 's@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@' -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ local DOCS=( ChangeLog README.md TODO AUTHORS CREDITS INSTALL.cgi sample-cgi/* )
+ default
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
+ keepdir /var/spool/uptimed
+ fowners uptimed:uptimed /var/spool/uptimed
+ newinitd "${FILESDIR}"/${PN}.init-r1 uptimed
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ einfo "Fixing permissions in /var/spool/${PN}"
+ chown -R uptimed:uptimed /var/spool/${PN}
+ echo
+ elog "Start uptimed with '/etc/init.d/uptimed start' (for openRC)"
+ elog "or systemctl start uptimed (for systemd)"
+ elog "To view your uptime records, use the command 'uprecords'."
+ echo
+}