1 |
commit: 81234734845a8e902980fcfef6ed04d20aa5cdeb |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 00:01:38 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 00:01:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81234734 |
7 |
|
8 |
net-nds/ypserv: use #!/sbin/openrc-run instead of #!/sbin/runscript |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/573846 |
11 |
|
12 |
Package-Manager: portage-2.2.26 |
13 |
|
14 |
net-nds/ypserv/files/rpc.yppasswdd-r1 | 4 +- |
15 |
net-nds/ypserv/files/rpc.ypxfrd-2.23 | 4 +- |
16 |
net-nds/ypserv/files/ypserv | 4 +- |
17 |
net-nds/ypserv/ypserv-2.26-r1.ebuild | 79 +++++++++++++++++++++++++++++++++++ |
18 |
4 files changed, 85 insertions(+), 6 deletions(-) |
19 |
|
20 |
diff --git a/net-nds/ypserv/files/rpc.yppasswdd-r1 b/net-nds/ypserv/files/rpc.yppasswdd-r1 |
21 |
index 7e7c36a..2ed1736 100644 |
22 |
--- a/net-nds/ypserv/files/rpc.yppasswdd-r1 |
23 |
+++ b/net-nds/ypserv/files/rpc.yppasswdd-r1 |
24 |
@@ -1,5 +1,5 @@ |
25 |
-#!/sbin/runscript |
26 |
-# Copyright 1999-2004 Gentoo Foundation |
27 |
+#!/sbin/openrc-run |
28 |
+# Copyright 1999-2016 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
# $Id$ |
31 |
|
32 |
|
33 |
diff --git a/net-nds/ypserv/files/rpc.ypxfrd-2.23 b/net-nds/ypserv/files/rpc.ypxfrd-2.23 |
34 |
index ae1f92e..4778a14 100644 |
35 |
--- a/net-nds/ypserv/files/rpc.ypxfrd-2.23 |
36 |
+++ b/net-nds/ypserv/files/rpc.ypxfrd-2.23 |
37 |
@@ -1,5 +1,5 @@ |
38 |
-#!/sbin/runscript |
39 |
-# Copyright 1999-2011 Gentoo Foundation |
40 |
+#!/sbin/openrc-run |
41 |
+# Copyright 1999-2016 Gentoo Foundation |
42 |
# Distributed under the terms of the GNU General Public License v2 |
43 |
# $Id$ |
44 |
|
45 |
|
46 |
diff --git a/net-nds/ypserv/files/ypserv b/net-nds/ypserv/files/ypserv |
47 |
index a0dd95c..3a4c6c0 100644 |
48 |
--- a/net-nds/ypserv/files/ypserv |
49 |
+++ b/net-nds/ypserv/files/ypserv |
50 |
@@ -1,5 +1,5 @@ |
51 |
-#!/sbin/runscript |
52 |
-# Copyright 1999-2004 Gentoo Foundation |
53 |
+#!/sbin/openrc-run |
54 |
+# Copyright 1999-2016 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
# $Id$ |
57 |
|
58 |
|
59 |
diff --git a/net-nds/ypserv/ypserv-2.26-r1.ebuild b/net-nds/ypserv/ypserv-2.26-r1.ebuild |
60 |
new file mode 100644 |
61 |
index 0000000..d315581 |
62 |
--- /dev/null |
63 |
+++ b/net-nds/ypserv/ypserv-2.26-r1.ebuild |
64 |
@@ -0,0 +1,79 @@ |
65 |
+# Copyright 1999-2016 Gentoo Foundation |
66 |
+# Distributed under the terms of the GNU General Public License v2 |
67 |
+# $Id$ |
68 |
+ |
69 |
+EAPI="6" |
70 |
+ |
71 |
+inherit autotools |
72 |
+ |
73 |
+DESCRIPTION="Network Information Service server" |
74 |
+HOMEPAGE="http://www.linux-nis.org/nis/" |
75 |
+SRC_URI="mirror://kernel/linux/utils/net/NIS/${P}.tar.bz2" |
76 |
+ |
77 |
+LICENSE="GPL-2" |
78 |
+SLOT="0" |
79 |
+KEYWORDS="amd64 ppc ppc64 x86" |
80 |
+IUSE="slp" |
81 |
+ |
82 |
+DEPEND=">=sys-libs/gdbm-1.8.0 |
83 |
+ slp? ( net-libs/openslp )" |
84 |
+RDEPEND="${DEPEND} |
85 |
+ || ( net-nds/rpcbind net-nds/portmap )" |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ # The configure script does not provide a command-line flag to control usage |
89 |
+ # of slp. Use a brutal method in case we need to disable it. |
90 |
+ if ! use slp; then |
91 |
+ sed -i -e 's/USE_SLP=1/USE_SLP=0/g' configure.in || die |
92 |
+ eautoreconf |
93 |
+ fi |
94 |
+ |
95 |
+ default |
96 |
+} |
97 |
+ |
98 |
+src_install() { |
99 |
+ default |
100 |
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO |
101 |
+ |
102 |
+ insinto /etc |
103 |
+ doins etc/ypserv.conf etc/netgroup etc/netmasks |
104 |
+ insinto /var/yp |
105 |
+ newins etc/securenets securenets.default |
106 |
+ |
107 |
+ newconfd "${FILESDIR}/ypserv.confd" ypserv |
108 |
+ newconfd "${FILESDIR}/rpc.yppasswdd.confd" rpc.yppasswdd |
109 |
+ newconfd "${FILESDIR}/rpc.ypxfrd.confd" rpc.ypxfrd |
110 |
+ |
111 |
+ newinitd "${FILESDIR}/ypserv" ypserv |
112 |
+ newinitd "${FILESDIR}/rpc.yppasswdd-r1" rpc.yppasswdd |
113 |
+ newinitd "${FILESDIR}/rpc.ypxfrd-2.23" rpc.ypxfrd |
114 |
+ |
115 |
+ echo "CONFIG_PROTECT=\"/var/yp/Makefile\"" > "${T}"/10ypserv |
116 |
+ doenvd "${T}"/10ypserv |
117 |
+} |
118 |
+ |
119 |
+pkg_preinst() { |
120 |
+ # This ebuilds installs an env file which CONFIG_PROTECTs /var/yp/Makefile, |
121 |
+ # but if the user is migrating from older ypserv, this won't take effect |
122 |
+ # immediately. Keep the older setup with Makefile.dist file and ask the user |
123 |
+ # to migrate. |
124 |
+ if [ -f "${ROOT}/var/yp/Makefile.dist" ]; then |
125 |
+ mv "${D}/var/yp/Makefile" "${D}/var/yp/Makefile.dist" \ |
126 |
+ || die "mv failed" |
127 |
+ cp "${ROOT}/var/yp/Makefile" "${D}/var/yp/Makefile" \ |
128 |
+ || die "cp failed" |
129 |
+ elog "Please remove ${ROOT}/var/yp/Makefile.dist after making sure that" |
130 |
+ elog "${ROOT}/var/yp/Makefile looks fine to you. It is now" |
131 |
+ elog "CONFIG_PROTECTed, so further changes should be managed with" |
132 |
+ elog "usual config management tools like etc-update or dispatch-conf." |
133 |
+ fi |
134 |
+} |
135 |
+ |
136 |
+pkg_postinst() { |
137 |
+ einfo "To complete setup, you will need to edit /var/yp/securenets," |
138 |
+ einfo "/etc/conf.d/ypserv, /etc/ypserv.conf, /etc/conf.d/rpc.yppasswdd" |
139 |
+ einfo "and possibly /var/yp/Makefile." |
140 |
+ |
141 |
+ einfo "To start the services at boot, you need to enable ypserv and optionally" |
142 |
+ einfo "the rpc.yppasswdd and/or rpc.ypxfrd services" |
143 |
+} |