summaryrefslogtreecommitdiff
path: root/app-admin/tmpreaper
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/tmpreaper
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/tmpreaper')
-rw-r--r--app-admin/tmpreaper/Manifest7
-rw-r--r--app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch46
-rw-r--r--app-admin/tmpreaper/files/tmpreaper-1.6.13-gentoo.patch47
-rw-r--r--app-admin/tmpreaper/metadata.xml24
-rw-r--r--app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild44
5 files changed, 168 insertions, 0 deletions
diff --git a/app-admin/tmpreaper/Manifest b/app-admin/tmpreaper/Manifest
new file mode 100644
index 000000000000..0fdd9a6e3253
--- /dev/null
+++ b/app-admin/tmpreaper/Manifest
@@ -0,0 +1,7 @@
+AUX tmpreaper-1.6.13-fix-protect.patch 1204 SHA256 d85b1b288d324f3a20cbeb96585645adca845e7ba5dca6c2d85aa204959f8447 SHA512 7b7f386d8f685e6b38ff3a96030e69a5134016e0a0b30b6841ddc4ae02ae3f90c47388426be98ec35a920e40360aa0cd8662e29d03a765c6ae0209f9907c53c0 WHIRLPOOL 38568c02f104f4f218f2841dff40c74a247afd1b2681044bd5098a059c65a05b34a1443a74c06a7436eebdc493a7fecb430ccb1782abb0c0952b6d20f0ab2cc8
+AUX tmpreaper-1.6.13-gentoo.patch 1766 SHA256 264076a9774aea0f419e7fa217469daa53fbb0443ecf2a0ff84ad8a51493971f SHA512 0086ac04a352bd35ce9e95576816fc324011bfff78cfa089828bf3befb8b183ae2213be9759422ce1f9ddd1cb26dcdf292b429ffe2d0873a1f6f6577e34c5fc9 WHIRLPOOL ed6b9f0b22c653394c44aa8def729c05763280d56eb8e1615280202821e5c4d882f6e90c83ec77199c383ae2f3fe5db96e65c74ac6faa376cc9103b382e31865
+DIST tmpreaper_1.6.13+nmu1.tar.gz 141080 SHA256 c88f05b5d995b9544edb7aaf36ac5ce55c6fac2a4c21444e5dba655ad310b738 SHA512 c868d421a7757a47b81c8932743981ded2b415c83377f8781fdfd4dfda48c701991da17fa262dfa0680b2a315d6b46ee4c9035ba4c06f5a0c1bc32efa717f19f WHIRLPOOL 65a6717a19620ef85f301c38fab9fa6b5b82a2a43acace48a7c3578231b6a378a1c6dcbd6d716395f235c0184bf3cc171bc3326790c2241606a1a8f244165253
+EBUILD tmpreaper-1.6.13-r1.ebuild 1115 SHA256 db0b4210e5f2fe3928bf78c861c617b2c8f2ee4bbfbe2ac3443b81198673f098 SHA512 0e6e094cdfbb941d08cdaa4f7302eb6dc61ac4c20d9dd0948e9f8c38ba4d0fda1b5d8b283c2736ed75cf170fa37ff8dfa6de2ef35ca120c6d2246e86ce56fe9a WHIRLPOOL 3376aee692fe6c9c7b461b64c2196ff2b60c5847ef2972fb1a6b5a0305cfd7bd28b32d51b43b96507880c86881a3dce3eef4c9fadaf202ccd1b793ffc0b91c81
+MISC ChangeLog 2421 SHA256 27fdc8f6cd0dbe4ea10e93bc450eaefe0abd79121bac0ed0bd881c86ea0badd7 SHA512 ff69c24b16216aace52a4e2f72f331c1edcafcd8135ccf47c23057734fc4cc1eff813b203970f6a438344639a03d2798ea206877ac93fa2c0db66a769566ceae WHIRLPOOL 41ebf4b478a24e60a81afd9f704b1a606113e1b1114a9a96ab62971bbed140ddd397e92235ef04413fbdb377029ef0ff1b15fbcfd02b7a55ec4e0110c1f55839
+MISC ChangeLog-2015 6077 SHA256 b46f9bc6da15568a8c846d8bd5db3e33e7364039d950065007211fb44a4ea2e6 SHA512 7ae3a33102ab7b67e71c9774895eb5cb5d3535d5b1f5792de6b8ad21368fd45bf0144f9e1e823fd10f6dac3094241d2ae8581d0428ca1751d3af115a7d79e60a WHIRLPOOL 60eb0e51c0386f2f6a538c54bc9a5707ee851ef8df734680c6c99efb85250eeac893d337b1e8eaeeeca8759ce938e95e6c3898b30e8babf9d5740f10c2896c1e
+MISC metadata.xml 1186 SHA256 1fd9f29262cd7aa994fe83765e0b78b258ab65f3faaf516aa997a1c4505919cf SHA512 721eec5cb0ce1acf32c7d009fd2fed8bd8d29cfa225e41eab3626d8b7a50f6da666c24f9995d6e6f2ceb9b6e71ad0efe5c25107ba6e2bca25fe7b2d1ff1f9d8c WHIRLPOOL 167933bf6b5fbd3dda09c1d54656d94e38cab72d25616f8e4d2656685172bc4904a68ea180732f0cf9e70938a690a407de557d8c935510315cd3d4db405f676e
diff --git a/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch b/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
new file mode 100644
index 000000000000..9c07a4471e18
--- /dev/null
+++ b/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch
@@ -0,0 +1,46 @@
+--- tmpreaper-1.6.13+nmu1/tmpreaper.c.orig 2006-12-05 10:55:58.000000000 -0800
++++ tmpreaper-1.6.13+nmu1/tmpreaper.c 2006-12-05 10:56:46.000000000 -0800
+@@ -467,6 +467,21 @@
+ continue;
+ }
+
++ if (FLAGS_PROTECT_P (flags)) {
++ skip = i = 0;
++ do {
++ if (sb.st_ino == protect_table[i].inode) {
++ message (LOG_VERBOSE,
++ "Entry matching `--protect' pattern skipped. `%s'\n",
++ protect_table[i].name);
++ skip = 1;
++ break;
++ }
++ } while (protect_table[i++].name);
++ if (skip)
++ continue;
++ }
++
+ if (S_ISDIR (sb.st_mode)) {
+ char *dst;
+
+@@ -489,21 +504,6 @@
+ (u_int) getpid(), ent->d_name);
+ }
+
+- if (FLAGS_PROTECT_P (flags)) {
+- skip = i = 0;
+- do {
+- if (sb.st_ino == protect_table[i].inode) {
+- message (LOG_VERBOSE,
+- "Entry matching `--protect' pattern skipped. `%s'\n",
+- protect_table[i].name);
+- skip = 1;
+- break;
+- }
+- } while (protect_table[i++].name);
+- if (skip)
+- continue;
+- }
+-
+ /* Decide whether to remove the file or not */
+ /* check for mtime on directory instead of atime if requested */
+ if ( FLAGS_MTIME_P(flags) ||
diff --git a/app-admin/tmpreaper/files/tmpreaper-1.6.13-gentoo.patch b/app-admin/tmpreaper/files/tmpreaper-1.6.13-gentoo.patch
new file mode 100644
index 000000000000..afd5f60f3a1c
--- /dev/null
+++ b/app-admin/tmpreaper/files/tmpreaper-1.6.13-gentoo.patch
@@ -0,0 +1,47 @@
+diff -ur tmpreaper-1.6.13+nmu1.orig//debian/cron.daily tmpreaper-1.6.13+nmu1/debian/cron.daily
+--- tmpreaper-1.6.13+nmu1.orig//debian/cron.daily 2008-05-19 10:10:16.000000000 -0700
++++ tmpreaper-1.6.13+nmu1/debian/cron.daily 2010-10-10 19:44:14.563252064 -0700
+@@ -32,28 +32,7 @@
+
+ # Set config defaults
+ SHOWWARNING=''
+-
+-# get the TMPREAPER_TIME value from /etc/default/rcS
+-
+-if grep '^TMPTIME=' /etc/default/rcS >/dev/null 2>&1; then
+- eval $(grep '^TMPTIME=' /etc/default/rcS)
+- if [ -n "$TMPTIME" ]; then
+- # Don't clean files if TMPTIME is negative or 'infinite'
+- # to mimic the way /lib/init/bootclean.sh works.
+- case "$TMPTIME" in
+- -*|infinite|infinity)
+- # don't use this as default
+- ;;
+- *)
+- if [ "$TMPTIME" -gt 0 ]; then
+- TMPREAPER_TIME=${TMPTIME}d
+- else
+- TMPREAPER_TIME=7d
+- fi
+- ;;
+- esac
+- fi
+-fi
++TMPREAPER_TIME=''
+
+ # ! Important ! The "set -f" below prevents the shell from expanding
+ # file paths, which is vital for the configuration below to work.
+diff -ur tmpreaper-1.6.13+nmu1.orig//debian/tmpreaper.conf tmpreaper-1.6.13+nmu1/debian/tmpreaper.conf
+--- tmpreaper-1.6.13+nmu1.orig//debian/tmpreaper.conf 2006-12-08 04:24:03.000000000 -0800
++++ tmpreaper-1.6.13+nmu1/debian/tmpreaper.conf 2010-10-10 19:45:53.251119766 -0700
+@@ -40,9 +40,7 @@
+ # TMPREAPER_ADDITIONALOPTIONS
+ # extra options that are passed to tmpreaper, e.g. --all
+
+-# uncomment and change the next line to overrule the /etc/default/rcS value
+-# TMPREAPER_TIME=7d
+-
++TMPREAPER_TIME=7d
+ TMPREAPER_PROTECT_EXTRA=''
+ TMPREAPER_DIRS='/tmp/.'
+ TMPREAPER_DELAY='256'
diff --git a/app-admin/tmpreaper/metadata.xml b/app-admin/tmpreaper/metadata.xml
new file mode 100644
index 000000000000..3d217fb65213
--- /dev/null
+++ b/app-admin/tmpreaper/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+ tmpreaper is a program that can be used to clean out temporary-file
+ directories. It recursively searches the directory, refusing to chdir()
+ across symlinks, and removes files that haven't been accessed in a
+ user-specified amount of time. You can specify a set of files to protect
+ from deletion with a shell pattern. It will not remove files owned by the
+ process EUID that have the `w' bit clear, unless you ask it to, much like
+ `rm -f'. `tmpreaper' will not remove symlinks, sockets, fifos, or special
+ files unless given a command line option enabling it to.
+
+ WARNING: Please do not run `tmpreaper' on `/'. There are no protections
+ against this written into the program, as that would prevent it from
+ functioning the way you'd expect it to in a `chroot(8)' environment.
+
+ The daily tmpreaper run can be configured through /etc/tmpreaper.conf .
+ </longdescription>
+</pkgmetadata>
diff --git a/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild
new file mode 100644
index 000000000000..d13fc5593381
--- /dev/null
+++ b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit eutils
+
+MY_P="${PN}_${PV}+nmu1"
+DESCRIPTION="A utility for removing files based on when they were last accessed"
+HOMEPAGE="http://packages.debian.org/sid/tmpreaper"
+SRC_URI="mirror://debian/pool/main/t/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86"
+IUSE=""
+
+DEPEND="sys-fs/e2fsprogs"
+RDEPEND=""
+
+S=${WORKDIR}/${MY_P/_/-}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-protect.patch
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_install() {
+ emake DESTDIR="${D}" install
+ insinto /etc
+ doins debian/tmpreaper.conf
+
+ exeinto /etc/cron.daily
+ newexe debian/cron.daily tmpreaper
+ doman debian/tmpreaper.conf.5
+ dodoc README ChangeLog debian/README*
+}
+
+pkg_postinst() {
+ elog "This package installs a cron script under /etc/cron.daily"
+ elog "You can configure it using /etc/tmpreaper.conf"
+ elog "Consult tmpreaper.conf man page for more information"
+ elog "Read /usr/share/doc/${P}/README.security and"
+ elog "remove SHOWWARNING from /etc/tmpreaper.conf afterwards"
+}