1 |
commit: 12721e716241afe74e5083a8d5c2ae50bb3bc7b4 |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 6 19:02:55 2017 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 6 19:02:55 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12721e71 |
7 |
|
8 |
app-admin/tmpreaper: Update to EAPI6 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
.../files/tmpreaper-1.6.13-fix-protect.patch | 46 ++++++++++++++++++++++ |
13 |
app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild | 45 +++++++++++++++++++++ |
14 |
2 files changed, 91 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 00000000..9c07a44 |
19 |
--- /dev/null |
20 |
+++ b/app-admin/tmpreaper/files/tmpreaper-1.6.13-fix-protect.patch |
21 |
@@ -0,0 +1,46 @@ |
22 |
+--- tmpreaper-1.6.13+nmu1/tmpreaper.c.orig 2006-12-05 10:55:58.000000000 -0800 |
23 |
++++ tmpreaper-1.6.13+nmu1/tmpreaper.c 2006-12-05 10:56:46.000000000 -0800 |
24 |
+@@ -467,6 +467,21 @@ |
25 |
+ continue; |
26 |
+ } |
27 |
+ |
28 |
++ if (FLAGS_PROTECT_P (flags)) { |
29 |
++ skip = i = 0; |
30 |
++ do { |
31 |
++ if (sb.st_ino == protect_table[i].inode) { |
32 |
++ message (LOG_VERBOSE, |
33 |
++ "Entry matching `--protect' pattern skipped. `%s'\n", |
34 |
++ protect_table[i].name); |
35 |
++ skip = 1; |
36 |
++ break; |
37 |
++ } |
38 |
++ } while (protect_table[i++].name); |
39 |
++ if (skip) |
40 |
++ continue; |
41 |
++ } |
42 |
++ |
43 |
+ if (S_ISDIR (sb.st_mode)) { |
44 |
+ char *dst; |
45 |
+ |
46 |
+@@ -489,21 +504,6 @@ |
47 |
+ (u_int) getpid(), ent->d_name); |
48 |
+ } |
49 |
+ |
50 |
+- if (FLAGS_PROTECT_P (flags)) { |
51 |
+- skip = i = 0; |
52 |
+- do { |
53 |
+- if (sb.st_ino == protect_table[i].inode) { |
54 |
+- message (LOG_VERBOSE, |
55 |
+- "Entry matching `--protect' pattern skipped. `%s'\n", |
56 |
+- protect_table[i].name); |
57 |
+- skip = 1; |
58 |
+- break; |
59 |
+- } |
60 |
+- } while (protect_table[i++].name); |
61 |
+- if (skip) |
62 |
+- continue; |
63 |
+- } |
64 |
+- |
65 |
+ /* Decide whether to remove the file or not */ |
66 |
+ /* check for mtime on directory instead of atime if requested */ |
67 |
+ if ( FLAGS_MTIME_P(flags) || |
68 |
|
69 |
diff --git a/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild |
70 |
new file mode 100644 |
71 |
index 00000000..0ff02dd |
72 |
--- /dev/null |
73 |
+++ b/app-admin/tmpreaper/tmpreaper-1.6.13-r1.ebuild |
74 |
@@ -0,0 +1,45 @@ |
75 |
+# Copyright 1999-2017 Gentoo Foundation |
76 |
+# Distributed under the terms of the GNU General Public License v2 |
77 |
+# $Id$ |
78 |
+ |
79 |
+EAPI=6 |
80 |
+inherit eutils |
81 |
+ |
82 |
+MY_P="${PN}_${PV}+nmu1" |
83 |
+DESCRIPTION="A utility for removing files based on when they were last accessed" |
84 |
+HOMEPAGE="http://packages.debian.org/sid/tmpreaper" |
85 |
+SRC_URI="mirror://debian/pool/main/t/${PN}/${MY_P}.tar.gz" |
86 |
+ |
87 |
+LICENSE="GPL-2" |
88 |
+SLOT="0" |
89 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86" |
90 |
+IUSE="" |
91 |
+ |
92 |
+DEPEND="sys-fs/e2fsprogs" |
93 |
+RDEPEND="" |
94 |
+ |
95 |
+S=${WORKDIR}/${MY_P/_/-} |
96 |
+ |
97 |
+PATCHES=( |
98 |
+ "${FILESDIR}"/${P}-fix-protect.patch |
99 |
+ "${FILESDIR}"/${P}-gentoo.patch |
100 |
+) |
101 |
+ |
102 |
+src_install() { |
103 |
+ emake DESTDIR="${D}" install |
104 |
+ insinto /etc |
105 |
+ doins debian/tmpreaper.conf |
106 |
+ |
107 |
+ exeinto /etc/cron.daily |
108 |
+ newexe debian/cron.daily tmpreaper |
109 |
+ doman debian/tmpreaper.conf.5 |
110 |
+ dodoc README ChangeLog debian/README* |
111 |
+} |
112 |
+ |
113 |
+pkg_postinst() { |
114 |
+ elog "This package installs a cron script under /etc/cron.daily" |
115 |
+ elog "You can configure it using /etc/tmpreaper.conf" |
116 |
+ elog "Consult tmpreaper.conf man page for more information" |
117 |
+ elog "Read /usr/share/doc/${P}/README.security and" |
118 |
+ elog "remove SHOWWARNING from /etc/tmpreaper.conf afterwards" |
119 |
+} |