1 |
commit: e1c8cd6331bb559dfcee280c4c03e07d021a1afa |
2 |
Author: Austin English <wizardedit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 2 23:53:41 2016 +0000 |
4 |
Commit: Austin English <wizardedit <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 2 23:53:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1c8cd63 |
7 |
|
8 |
net-nds/389-admin: 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/389-admin/389-admin-1.1.31-r1.ebuild | 171 +++++++++++++++++++++++++++ |
15 |
net-nds/389-admin/files/389-admin.initd | 4 +- |
16 |
2 files changed, 173 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/net-nds/389-admin/389-admin-1.1.31-r1.ebuild b/net-nds/389-admin/389-admin-1.1.31-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 0000000..3f7d2b7 |
21 |
--- /dev/null |
22 |
+++ b/net-nds/389-admin/389-admin-1.1.31-r1.ebuild |
23 |
@@ -0,0 +1,171 @@ |
24 |
+# Copyright 1999-2016 Gentoo Foundation |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+# $Id$ |
27 |
+ |
28 |
+EAPI=5 |
29 |
+ |
30 |
+WANT_AUTOMAKE="1.9" |
31 |
+ |
32 |
+MY_PV=${PV/_rc/.rc} |
33 |
+MY_PV=${MY_PV/_a/.a} |
34 |
+ |
35 |
+inherit eutils multilib autotools depend.apache |
36 |
+ |
37 |
+DESCRIPTION="389 Directory Server (admin)" |
38 |
+HOMEPAGE="http://port389.org/" |
39 |
+SRC_URI="http://directory.fedoraproject.org/sources/${PN}-${MY_PV}.tar.bz2" |
40 |
+ |
41 |
+LICENSE="GPL-2 Apache-2.0" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
+IUSE="debug ipv6 selinux" |
45 |
+ |
46 |
+# TODO snmp agent init script |
47 |
+ |
48 |
+COMMON_DEPEND=">=app-admin/389-admin-console-1.1.0 |
49 |
+ >=app-admin/389-ds-console-1.1.0 |
50 |
+ app-misc/mime-types |
51 |
+ dev-libs/389-adminutil |
52 |
+ dev-libs/cyrus-sasl |
53 |
+ dev-libs/icu:= |
54 |
+ dev-libs/nss[utils] |
55 |
+ || ( <=dev-libs/nspr-4.8.3-r3[ipv6?] >=dev-libs/nspr-4.8.4 ) |
56 |
+ dev-libs/svrcore |
57 |
+ net-analyzer/net-snmp[ipv6?] |
58 |
+ net-nds/openldap |
59 |
+ selinux? ( |
60 |
+ sys-apps/checkpolicy |
61 |
+ sys-apps/policycoreutils |
62 |
+ ) |
63 |
+ >=sys-libs/db-4.2.52 |
64 |
+ sys-libs/pam |
65 |
+ sys-apps/tcp-wrappers[ipv6?] |
66 |
+ www-apache/mod_nss |
67 |
+ www-servers/apache:2[apache2_modules_actions,apache2_modules_alias,apache2_modules_auth_basic,apache2_modules_authz_default,apache2_modules_cgi,apache2_modules_mime_magic,apache2_modules_rewrite,apache2_modules_setenvif,suexec,threads]" |
68 |
+RDEPEND=" |
69 |
+ ${COMMON_DEPEND} |
70 |
+ www-client/lynx |
71 |
+ selinux? ( sec-policy/selinux-base-policy ) |
72 |
+" |
73 |
+DEPEND="sys-apps/sed ${COMMON_DEPEND}" |
74 |
+ |
75 |
+S="${WORKDIR}/${PN}-${MY_PV}" |
76 |
+ |
77 |
+need_apache2 |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ # as per 389 documentation, when 64bit, export USE_64 |
81 |
+ use amd64 && export USE_64=1 |
82 |
+ |
83 |
+ epatch "${FILESDIR}/1.1.11_rc1/0001-gentoo-apache-names.patch" |
84 |
+ epatch "${FILESDIR}/1.1.11_rc1/0003-find-mod_nss.m4.patch" |
85 |
+ epatch "${FILESDIR}/1.1.11_rc1/0004-rpath-fix.configure.ac.patch" |
86 |
+ # Configuration fixes |
87 |
+ epatch "${FILESDIR}/${PN}-cfgstuff-1.patch" |
88 |
+ |
89 |
+ sed -e "s!SUBDIRS!# SUBDIRS!g" -i Makefile.am || die "sed failed" |
90 |
+ # Setup default user/group, in this case it's dirsrv |
91 |
+ sed -e "s!nobody!dirsrv!g" -i configure.ac || die "sed failed" |
92 |
+ |
93 |
+ eautoreconf |
94 |
+} |
95 |
+ |
96 |
+src_configure() { |
97 |
+ # stub autoconf triplet :( |
98 |
+ local myconf="" |
99 |
+ use debug && myconf="--enable-debug" |
100 |
+ use selinux && myconf="${myconf} --with-selinux" |
101 |
+ |
102 |
+ econf \ |
103 |
+ --enable-threading \ |
104 |
+ --disable-rpath \ |
105 |
+ --with-adminutil=/usr \ |
106 |
+ --with-apr-config \ |
107 |
+ --with-apxs=${APXS} \ |
108 |
+ --with-fhs \ |
109 |
+ --with-httpd=${APACHE_BIN} \ |
110 |
+ --with-openldap \ |
111 |
+ ${myconf} || die "econf failed" |
112 |
+} |
113 |
+ |
114 |
+src_install () { |
115 |
+ |
116 |
+ emake DESTDIR="${D}" install || die "emake failed" |
117 |
+ keepdir /var/log/dirsrv/admin-serv |
118 |
+ |
119 |
+ # remove redhat style init script. |
120 |
+ rm -rf "${D}"/etc/rc.d |
121 |
+ rm -rf "${D}"/etc/default |
122 |
+ |
123 |
+ # install gentoo style init script. |
124 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
125 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
126 |
+ |
127 |
+ # remove redhat style wrapper scripts |
128 |
+ # and install gentoo scripts. |
129 |
+ rm -rf "${D}"/usr/sbin/*-ds-admin |
130 |
+ dosbin "${FILESDIR}"/*-ds-admin || die "cannot install gentoo start/stop scripts" |
131 |
+ |
132 |
+ # In this version build systems for modules is delete :( |
133 |
+ # manually install modules, not using apache-modules eclass |
134 |
+ # because use bindled library |
135 |
+ |
136 |
+ # install mod_admserv |
137 |
+ exeinto "${APACHE_MODULESDIR}" |
138 |
+ doexe "${S}/.libs"/mod_admserv.so || die "internal ebuild error: mod_admserv not found" |
139 |
+ |
140 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
141 |
+ newins "${FILESDIR}/1.1.11_rc1"/48_mod_admserv.conf 48_mod_admserv \ |
142 |
+ || die "internal ebuild error: 48_mod_admserv.conf not found" |
143 |
+ |
144 |
+ # install mod_restard |
145 |
+ exeinto "${APACHE_MODULESDIR}" |
146 |
+ doexe "${S}/.libs"/mod_restartd.so || die "internal ebuild error: mod_restartd not found" |
147 |
+ |
148 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
149 |
+ newins "${FILESDIR}/1.1.11_rc1"/48_mod_restartd.conf 48_mod_restartd \ |
150 |
+ || die "internal ebuild error: 48_mod_restard.conf not found" |
151 |
+ |
152 |
+ if use selinux; then |
153 |
+ local POLICY_TYPES="targeted" |
154 |
+ cd "${S}"/selinux || die |
155 |
+ cp /usr/share/selinux/${POLICY_TYPES}/include/Makefile . || die |
156 |
+ make || die "selinux policy compile failed" |
157 |
+ insinto /usr/share/selinux/${POLICY_TYPES} |
158 |
+ doins -r "${S}/selinux/"*.pp |
159 |
+ fi |
160 |
+ |
161 |
+} |
162 |
+ |
163 |
+pkg_postinst() { |
164 |
+ |
165 |
+ # show setup information |
166 |
+ elog "Once you configured www-servers/apache as written above," |
167 |
+ elog "you need to run (as root): /usr/sbin/setup-ds-admin.pl" |
168 |
+ elog |
169 |
+ |
170 |
+ # show security and sysctl info |
171 |
+ elog "It is recommended to setup net.ipv4.tcp_keep_alive_time" |
172 |
+ elog "in /etc/sysctl.conf (or via sysctl -w && sysctl -p) to a reasonable" |
173 |
+ elog "value (in milliseconds) to avoid temporary server congestions" |
174 |
+ elog "from lost client connections" |
175 |
+ elog |
176 |
+ |
177 |
+ # /etc/security/limits.conf settings |
178 |
+ elog "It is also recommended to fine tune the maximum open files" |
179 |
+ elog "settings inside /etc/security/limits.conf:" |
180 |
+ elog "* soft nofile 2048" |
181 |
+ elog "* hard nofile 4096" |
182 |
+ elog |
183 |
+ |
184 |
+ elog "To start 389 Directory Server Administration Interface at boot" |
185 |
+ elog "please add 389-admin service to the default runlevel:" |
186 |
+ elog |
187 |
+ elog " rc-update add 389-admin default" |
188 |
+ elog |
189 |
+ |
190 |
+ elog "for 389 Directory Server Admin interface to work, you need" |
191 |
+ elog "to setup a FQDN hostname and use it while running /usr/sbin/setup-ds-admin.pl" |
192 |
+ elog |
193 |
+ |
194 |
+} |
195 |
|
196 |
diff --git a/net-nds/389-admin/files/389-admin.initd b/net-nds/389-admin/files/389-admin.initd |
197 |
index 9da3c50..45420ea 100644 |
198 |
--- a/net-nds/389-admin/files/389-admin.initd |
199 |
+++ b/net-nds/389-admin/files/389-admin.initd |
200 |
@@ -1,5 +1,5 @@ |
201 |
-#!/sbin/runscript |
202 |
-# Copyright 1999-2010 Gentoo Foundation |
203 |
+#!/sbin/openrc-run |
204 |
+# Copyright 1999-2016 Gentoo Foundation |
205 |
# Distributed under the terms of the GNU General Public License v2 |
206 |
|
207 |
opts="configdump configtest fullstatus graceful gracefulstop modules reload" |