summaryrefslogtreecommitdiff
path: root/app-admin/tmpwatch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/tmpwatch
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/tmpwatch')
-rw-r--r--app-admin/tmpwatch/Manifest8
-rw-r--r--app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch30
-rw-r--r--app-admin/tmpwatch/files/tmpwatch.cron47
-rw-r--r--app-admin/tmpwatch/metadata.xml5
-rw-r--r--app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild36
-rw-r--r--app-admin/tmpwatch/tmpwatch-2.11.ebuild31
6 files changed, 157 insertions, 0 deletions
diff --git a/app-admin/tmpwatch/Manifest b/app-admin/tmpwatch/Manifest
new file mode 100644
index 000000000000..51d94906d6bd
--- /dev/null
+++ b/app-admin/tmpwatch/Manifest
@@ -0,0 +1,8 @@
+AUX tmpwatch-2.11-boottime.patch 1034 SHA256 5150b5d350213a6d3d4c5d747520077e5a1d7558c5f7174bacc138e72ec92d0a SHA512 6ad3cfe0dcd1a14d071ac64ca09279aae853c3b5a47604d99c2ff24319145d5c599ed6e780ac7eb9a2e2d185495e9d7e2133c905490b647f6b639a4bcd0def92 WHIRLPOOL 553353bb72b312aaebec9aa04b2211ec1e9340c41b08cde52caeb316861b39dc260bff3548d631e94a3c6c88fd5dff463ef3618994b6dd1c6865c01685daec22
+AUX tmpwatch.cron 1533 SHA256 ece4417d5ce022d647753e2005a11ee3b905d9f25e8f559a361c59a7760057f0 SHA512 9c96eaccc70d6eadac1233b6cd6772c61dbe8fed348fbe45d729bba8d8434f32bb4ba800cf92f151d7576763f7fde7c5c25b55293ecdac5f5254ce387da8b016 WHIRLPOOL 5ec5ef4f7ea2ad491c39656ae6cd84884cf5dab28bc36e5b7e890a818715185307b3a422a840ac35a12056fe6364ad09c336256e860e4ce05cc78c315f4b802b
+DIST tmpwatch-2.11.tar.bz2 145609 SHA256 93168112b2515bc4c7117e8113b8d91e06b79550d2194d62a0c174fe6c2aa8d4 SHA512 9242c5e1812c2ffc756cfc4cdc3023d0c0515e7c180e58ca3a838aa075d09fe4dc08dbc9afbc87ce3382e8aa8cb80a70e406deeab4ce10b39b6845d667989d97 WHIRLPOOL 94d83c4a2b1c1a19ab88632c61de37903b709bc7fa88aff9f8ac4f4b71a26b8e6fbcb1564b3bce08ed5d1d0a78511c3470978a13211356f5fdf10b4d40f2de1c
+EBUILD tmpwatch-2.11-r2.ebuild 722 SHA256 000e6d20aed139b7ac3fcf4663ca45d206dfe8efb323b64d0ade2583fc94239a SHA512 91a43b7cf57e996674560d685b49d7e2fcbdf005782d787e129da6a13d1a784997ba2c0ec030073b73034575a71687e1bc31b1ee4b9e08401d65fa6b51b62973 WHIRLPOOL df164934639bae18f14992619536ee469f1d1304c4b6375159ec039dfa993e011d33a4989d6ee5e6d6f2aa28569d86fb8eaaef67546fdfbb9bf7e1aa71135fd8
+EBUILD tmpwatch-2.11.ebuild 722 SHA256 12e154c3f0197ebf62c68c338273b519d6b213f37c7357e116c2ebc75cc026b5 SHA512 a7543348e40cca314a89a04ab8d1d6e2c226172cd1b819cc26516cc92d81bbe0f71e8ff6673b16ec6e88e57aa34c9e55a69cc33badd1b7844a1c0e4dd14ff11a WHIRLPOOL a71956b225a739226885c667575f44f8a2da4d374c5c840ff301cccadd3742740dbcf7442273311b912ec126fdeac981b8943fccdee4240c2339c3b09f6fd39a
+MISC ChangeLog 3011 SHA256 98b53b719c552a79f897a1b602b768a8ead92f8217d62c8b35128c760c3e3cb2 SHA512 cf128f51a822d6f80c36fa89237a13b893d5765f4c7d1bf001935fa784c725f46057bf467408f6be9e520dd1ca81e03580a3831d5e1db7205043c26512b515de WHIRLPOOL c663c0bc940b186591ee5380299a36acc79316ad80841cf1eb0f0aa9107b2b6f58b433401cfe20376bcc27d7b47c27714152777985d4e99e45677dd2ade7d4f6
+MISC ChangeLog-2015 13646 SHA256 241cb43ec00ffaffefbf3c8a0f4c0ffa7cbaa293a0e257bd6f3f7b056d80f653 SHA512 288f1be301627114bbbf8135b7631d715eedc037f99b32b053fc915f123678835deaa59625b3f4a82cf2e98fcfcdd422afb8c28b1bc5dbafeadbfc30fc628a88 WHIRLPOOL e6cb093b566e4de6675d912aaac8b0f4f9581b1d947414487689df0050d0a588a219e42fd716bf94b7c7455966b7d9b14eae19905ae38c667617f88c4516a1d7
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch b/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
new file mode 100644
index 000000000000..b622c8d70e70
--- /dev/null
+++ b/app-admin/tmpwatch/files/tmpwatch-2.11-boottime.patch
@@ -0,0 +1,30 @@
+Make boot time detection failures non-fatal. Taken from PLD Linux
+
+Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=468444
+PLD bug: https://bugs.launchpad.net/pld-linux/+bug/1034364
+Patch: https://github.com/pld-linux/tmpwatch/blob/master/tmpwatch-boottime.patch
+
+--- tmpwatch-2.11/tmpwatch.c~
++++ tmpwatch-2.11/tmpwatch.c
+@@ -666,9 +666,11 @@
+ time_t boot_time;
+
+ if (clock_gettime(CLOCK_REALTIME, &real_clock) != 0
+- || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0)
+- message(LOG_FATAL, "Error determining boot time: %s\n",
++ || clock_gettime(CLOCK_BOOTTIME, &boot_clock) != 0) {
++ message(LOG_DEBUG, "Error determining boot time: %s\n",
+ strerror(errno));
++ socket_kill_time = 0; /* Never remove sockets */
++ } else {
+ boot_time = real_clock.tv_sec - boot_clock.tv_sec;
+ if (real_clock.tv_nsec < boot_clock.tv_nsec)
+ boot_time--;
+@@ -677,6 +679,7 @@
+ boot_time -= 2;
+
+ socket_kill_time = boot_time - grace_seconds;
++ }
+ #else
+ socket_kill_time = 0; /* Never remove sockets */
+ #endif
diff --git a/app-admin/tmpwatch/files/tmpwatch.cron b/app-admin/tmpwatch/files/tmpwatch.cron
new file mode 100644
index 000000000000..806b1453e552
--- /dev/null
+++ b/app-admin/tmpwatch/files/tmpwatch.cron
@@ -0,0 +1,47 @@
+#!/bin/sh
+# vim: ft=sh
+
+# This cron script contains several (commented out) examples. You may use
+# them as is, by uncommenting them, or modify them to suit your needs. Read
+# tmpwatch(8) for more information on tmpwatch parameters.
+
+### Variables ###
+
+TMPWATCH="/usr/sbin/tmpwatch"
+#PORTAGE_TMPDIR="$(portageq envvar PORTAGE_TMPDIR)/portage"
+#PORTAGE_LOGDIR="$(portageq envvar PORT_LOGDIR)"
+#DISTDIR="$(portageq distdir)"
+
+### EXAMPLES ###
+
+# NOTE: if you have noatime in /etc/fstab for any partitions you plan on
+# running tmpwatch on, you should obviously change any of the examples that
+# use atime (-u|--atime). Those that don't specify anything, default to
+# atime.
+
+# NOTE2: the time value is in HOURS!
+
+# Delete everything in /tmp that haven't been accessed in a week (>=168 hrs).
+#
+# if [[ -d /tmp ]]; then
+# ${TMPWATCH} --atime 168 /tmp
+# fi
+
+# Delete everything in PORTAGE_TMPDIR that hasn't been modified in 2 weeks.
+#
+# if [[ -d ${PORTAGE_TMPDIR:-/var/tmp/portage} && -z $(/usr/bin/pgrep emerge) ]]; then
+# ${TMPWATCH} --mtime --all 336 ${PORTAGE_TMPDIR:-/var/tmp/portage}
+# fi
+
+# Delete everything in DISTDIR that hasn't been accessed in 6 months (going
+# by 30 day months)
+#
+# if [[ -d ${DISTDIR:-/usr/portage/distfiles} ]]; then
+# ${TMPWATCH} --atime --fuser 4320 ${DISTDIR:-/usr/portage/distfiles}
+# fi
+
+# Delete everything in PORTAGE_LOGDIR that hasn't been accessed in 4 weeks
+#
+# if [[ -d ${PORTAGE_LOGDIR:-/var/log/portage} ]]; then
+# ${TMPWATCH} --atime 772 ${PORTAGE_LOGDIR:-/var/log/portage}
+# fi
diff --git a/app-admin/tmpwatch/metadata.xml b/app-admin/tmpwatch/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/app-admin/tmpwatch/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild b/app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild
new file mode 100644
index 000000000000..b1028a59fbb6
--- /dev/null
+++ b/app-admin/tmpwatch/tmpwatch-2.11-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Files which haven't been accessed are removed from specified directories"
+HOMEPAGE="https://fedorahosted.org/tmpwatch/"
+SRC_URI="https://fedorahosted.org/releases/t/m/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-tmpreaper )"
+DEPEND=""
+
+PATCHES=(
+ "${FILESDIR}/${P}-boottime.patch"
+)
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ dosbin tmpwatch
+ doman tmpwatch.8
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/${PN}.cron" "${PN}"
+}
diff --git a/app-admin/tmpwatch/tmpwatch-2.11.ebuild b/app-admin/tmpwatch/tmpwatch-2.11.ebuild
new file mode 100644
index 000000000000..5e251f8628b1
--- /dev/null
+++ b/app-admin/tmpwatch/tmpwatch-2.11.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Files which haven't been accessed are removed from specified directories"
+HOMEPAGE="https://fedorahosted.org/tmpwatch/"
+SRC_URI="https://fedorahosted.org/releases/t/m/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-tmpreaper )"
+DEPEND=""
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ dosbin tmpwatch || die
+ doman tmpwatch.8 || die
+ dodoc ChangeLog NEWS README AUTHORS || die
+
+ exeinto /etc/cron.daily
+ newexe "${FILESDIR}/${PN}.cron" "${PN}" || die
+}