1 |
commit: b1bab70c44f772993901189cfe8eab4324db544e |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 9 20:54:39 2018 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 9 20:56:35 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1bab70c |
7 |
|
8 |
net-analyzer/arpwatch: new revision to fix the upgrade path. |
9 |
|
10 |
All revisions before -r10 install /var/lib/arpwatch with the wrong |
11 |
ownership. The -r10 revision fixes that for new installs, but doesn't |
12 |
modify ${ROOT}/var/lib/arpwatch for upgraders. This new -r11 adds a |
13 |
pkg_postinst function to correct the issue for upgraders. |
14 |
|
15 |
The revision also changes one "dodir" back to "keepdir", fixing a |
16 |
mistake that I made in -r10. |
17 |
|
18 |
Closes: https://bugs.gentoo.org/554222 |
19 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
20 |
|
21 |
...2.1.15-r10.ebuild => arpwatch-2.1.15-r11.ebuild} | 21 +++++++++++++++++++-- |
22 |
1 file changed, 19 insertions(+), 2 deletions(-) |
23 |
|
24 |
diff --git a/net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild |
25 |
similarity index 69% |
26 |
rename from net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild |
27 |
rename to net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild |
28 |
index 986da0386f7..758ebf7b054 100644 |
29 |
--- a/net-analyzer/arpwatch/arpwatch-2.1.15-r10.ebuild |
30 |
+++ b/net-analyzer/arpwatch/arpwatch-2.1.15-r11.ebuild |
31 |
@@ -1,4 +1,4 @@ |
32 |
-# Copyright 1999-2017 Gentoo Foundation |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
# Distributed under the terms of the GNU General Public License v2 |
35 |
|
36 |
EAPI=6 |
37 |
@@ -61,9 +61,26 @@ src_install () { |
38 |
doins duplicates.awk euppertolower.awk p.awk e.awk d.awk |
39 |
|
40 |
diropts --group=arpwatch --mode=770 |
41 |
- dodir /var/lib/arpwatch |
42 |
+ keepdir /var/lib/arpwatch |
43 |
dodoc README CHANGES |
44 |
|
45 |
newinitd "${FILESDIR}"/arpwatch.initd-r1 arpwatch |
46 |
newconfd "${FILESDIR}"/arpwatch.confd-r1 arpwatch |
47 |
} |
48 |
+ |
49 |
+pkg_postinst() { |
50 |
+ # Previous revisions installed /var/lib/arpwatch with the wrong |
51 |
+ # ownership. Instead of the intended arpwatch:root, it was left as |
52 |
+ # root:root. If we find any such mis-owned directories, we fix them, |
53 |
+ # and then set the permission bits how we want them in *this* |
54 |
+ # revision. |
55 |
+ # |
56 |
+ # The "--from" flag ensures that we only fix directories that need |
57 |
+ # fixing, and the "&& chmod" ensures that we only adjust the |
58 |
+ # permissions if the owner also needed fixing. |
59 |
+ chown --from=root:root \ |
60 |
+ --no-dereference \ |
61 |
+ :arpwatch \ |
62 |
+ "${ROOT}"/var/lib/arpwatch && \ |
63 |
+ chmod 770 "${ROOT}"/var/lib/arpwatch |
64 |
+} |