summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Rüger <mrueg@gentoo.org>2017-02-06 20:02:55 +0100
committerManuel Rüger <mrueg@gentoo.org>2017-02-06 20:02:55 +0100
commit12721e716241afe74e5083a8d5c2ae50bb3bc7b4 (patch)
tree38d1e869757d3965752f381512b89c9b33cf75b0 /app-admin/tmpreaper
parentdev-python/passlib: Version bump to 1.7.1 (diff)
downloadgentoo-12721e716241afe74e5083a8d5c2ae50bb3bc7b4.tar.gz
gentoo-12721e716241afe74e5083a8d5c2ae50bb3bc7b4.tar.bz2
gentoo-12721e716241afe74e5083a8d5c2ae50bb3bc7b4.zip
app-admin/tmpreaper: Update to EAPI6
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-admin/tmpreaper')
-rw-r--r--app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch46
-rw-r--r--app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild45
2 files changed, 91 insertions, 0 deletions
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/tmpreaper-1.6.13-r1.ebuild b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild
new file mode 100644
index 000000000000..0ff02dddddb9
--- /dev/null
+++ b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~ppc ~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"
+}