1 |
commit: c0460891560e8bece9305c0e0596e0dba1974400 |
2 |
Author: Wes Cilldhaire <wes <AT> sol1 <DOT> com <DOT> au> |
3 |
AuthorDate: Tue Mar 1 03:08:51 2016 +0000 |
4 |
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 1 03:08:51 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0460891 |
7 |
|
8 |
net-nds/389-ds-base: Remove 1.3.4.7 and superfluous files |
9 |
|
10 |
1.3.4.7 is vulnerable to CVE-2016-0741 and upstream has advised users |
11 |
to upgrade to 1.3.4.8 |
12 |
|
13 |
Acked-by wibrown <AT> redhat.com |
14 |
|
15 |
Package-Manager: portage-2.2.27 |
16 |
|
17 |
net-nds/389-ds-base/389-ds-base-1.3.4.7-r2.ebuild | 151 -------- |
18 |
net-nds/389-ds-base/Manifest | 1 - |
19 |
.../files/389-ds-base-1.2.11-fix-mozldap.patch | 28 -- |
20 |
.../389-ds-base-1.3.4.7-no-instance-script.patch | 396 --------------------- |
21 |
.../389-ds-base-1.3.4.7-shell-corrections.patch | 242 ------------- |
22 |
net-nds/389-ds-base/files/389-ds.initd | 78 ---- |
23 |
6 files changed, 896 deletions(-) |
24 |
|
25 |
diff --git a/net-nds/389-ds-base/389-ds-base-1.3.4.7-r2.ebuild b/net-nds/389-ds-base/389-ds-base-1.3.4.7-r2.ebuild |
26 |
deleted file mode 100644 |
27 |
index 0166bf8..0000000 |
28 |
--- a/net-nds/389-ds-base/389-ds-base-1.3.4.7-r2.ebuild |
29 |
+++ /dev/null |
30 |
@@ -1,151 +0,0 @@ |
31 |
-# Copyright 1999-2016 Gentoo Foundation |
32 |
-# Distributed under the terms of the GNU General Public License v2 |
33 |
-# $Id$ |
34 |
- |
35 |
-EAPI=5 |
36 |
- |
37 |
-WANT_AUTOMAKE="1.9" |
38 |
-MY_P=${P/_alpha/.a} |
39 |
-MY_P=${MY_P/_rc/.rc} |
40 |
- |
41 |
-inherit user eutils multilib flag-o-matic autotools |
42 |
- |
43 |
-DESCRIPTION="389 Directory Server (core librares and daemons )" |
44 |
-HOMEPAGE="http://port389.org/" |
45 |
-SRC_URI="http://directory.fedoraproject.org/sources/${MY_P}.tar.bz2" |
46 |
- |
47 |
-LICENSE="GPL-3" |
48 |
-SLOT="0" |
49 |
-KEYWORDS="~amd64 ~x86" |
50 |
-IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise +presence kerberos selinux" |
51 |
- |
52 |
-COMMON_DEPEND=" |
53 |
- sys-libs/db:5.3 |
54 |
- >=dev-libs/cyrus-sasl-2.1.19 |
55 |
- >=net-analyzer/net-snmp-5.1.2 |
56 |
- >=dev-libs/icu-3.4:= |
57 |
- dev-libs/nss[utils] |
58 |
- dev-libs/nspr |
59 |
- dev-libs/svrcore |
60 |
- dev-libs/openssl:0= |
61 |
- dev-libs/libpcre:3 |
62 |
- >=dev-perl/perl-mozldap-1.5.3 |
63 |
- dev-perl/NetAddr-IP |
64 |
- net-nds/openldap |
65 |
- sys-libs/pam |
66 |
- sys-libs/zlib |
67 |
- kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )" |
68 |
- |
69 |
-DEPEND="${COMMON_DEPEND} |
70 |
- virtual/pkgconfig |
71 |
- sys-devel/libtool |
72 |
- doc? ( app-doc/doxygen ) |
73 |
- sys-apps/sed" |
74 |
-RDEPEND="${COMMON_DEPEND} |
75 |
- selinux? ( sec-policy/selinux-dirsrv ) |
76 |
- virtual/perl-Time-Local |
77 |
- virtual/perl-MIME-Base64" |
78 |
- |
79 |
-S="${WORKDIR}/${MY_P}" |
80 |
- |
81 |
-pkg_setup() { |
82 |
- enewgroup dirsrv |
83 |
- enewuser dirsrv -1 -1 -1 dirsrv |
84 |
-} |
85 |
- |
86 |
-src_prepare() { |
87 |
- #0001-Ticket-47840-add-configure-option-to-disable-instanc.patch |
88 |
- epatch "${FILESDIR}/${P}-no-instance-script.patch" |
89 |
- |
90 |
- #0001-Ticket-48448-dirsrv-start-stop-fail-in-certain-shell.patch |
91 |
- epatch "${FILESDIR}/${P}-shell-corrections.patch" |
92 |
- |
93 |
- # as per 389 documentation, when 64bit, export USE_64 |
94 |
- use amd64 && export USE_64=1 |
95 |
- |
96 |
- # This will be changed in 1.3.5.X |
97 |
- sed -i -e 's/nobody/dirsrv/g' configure.ac || die "sed failed on configure.ac" |
98 |
- eautoreconf |
99 |
- |
100 |
- append-lfs-flags |
101 |
-} |
102 |
- |
103 |
-src_configure() { |
104 |
- local myconf="" |
105 |
- |
106 |
- use auto-dn-suffix && myconf="${myconf} --enable-auto-dn-suffix" |
107 |
- |
108 |
- # for 1.3.5.X, will add --enable-gcc-security |
109 |
- econf \ |
110 |
- $(use_enable debug) \ |
111 |
- $(use_enable pam-passthru) \ |
112 |
- $(use_enable ldapi) \ |
113 |
- $(use_enable autobind) \ |
114 |
- $(use_enable dna) \ |
115 |
- $(use_enable bitwise) \ |
116 |
- $(use_enable presence) \ |
117 |
- $(use_with kerberos) \ |
118 |
- $(use_enable debug) \ |
119 |
- --enable-maintainer-mode \ |
120 |
- --enable-autobind \ |
121 |
- --with-fhs \ |
122 |
- --with-openldap \ |
123 |
- --with-db-inc=/usr/include/${CHOST}/db5.3/ \ |
124 |
- --sbindir=/usr/sbin \ |
125 |
- --bindir=/usr/bin \ |
126 |
- $myconf |
127 |
- |
128 |
- # This relies on bug https://fedorahosted.org/389/ticket/48447 |
129 |
- #--without-initddir \ |
130 |
-} |
131 |
- |
132 |
-src_compile() { |
133 |
- default |
134 |
- if use doc; then |
135 |
- doxygen slapi.doxy || die "cannot run doxygen" |
136 |
- fi |
137 |
-} |
138 |
- |
139 |
-src_install () { |
140 |
- emake DESTDIR="${D}" install |
141 |
- |
142 |
- # remove redhat style init script |
143 |
- rm -rf "${D}"/etc/rc.d || die |
144 |
- # Needs a config option to remove this. |
145 |
- rm -rf "${D}"/etc/default || die |
146 |
- |
147 |
- # and install gentoo style init script |
148 |
- # Get these merged upstream |
149 |
- newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds |
150 |
- newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp |
151 |
- |
152 |
- # cope with libraries being in /usr/lib/dirsrv |
153 |
- dodir /etc/env.d |
154 |
- echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv |
155 |
- |
156 |
- if use doc; then |
157 |
- cd "${S}" || die |
158 |
- docinto html/ |
159 |
- dodoc -r docs/html/. |
160 |
- fi |
161 |
-} |
162 |
- |
163 |
-pkg_postinst() { |
164 |
- echo |
165 |
- elog "If you are planning to use 389-ds-snmp (ldap-agent)," |
166 |
- elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf" |
167 |
- elog "adding proper 'server' entries, and adding the lines below to" |
168 |
- elog " => /etc/snmp/snmpd.conf" |
169 |
- elog |
170 |
- elog "master agentx" |
171 |
- elog "agentXSocket /var/agentx/master" |
172 |
- elog |
173 |
- elog "To start 389 Directory Server (LDAP service) at boot:" |
174 |
- elog |
175 |
- elog " rc-update add 389-ds default" |
176 |
- elog |
177 |
- elog "If you are upgrading from previous 1.2.6 release candidates" |
178 |
- elog "please see:" |
179 |
- elog "http://directory.fedoraproject.org/wiki/Subtree_Rename#warning:_upgrade_from_389_v1.2.6_.28a.3F.2C_rc1_.7E_rc6.29_to_v1.2.6_rc6_or_newer" |
180 |
- echo |
181 |
-} |
182 |
|
183 |
diff --git a/net-nds/389-ds-base/Manifest b/net-nds/389-ds-base/Manifest |
184 |
index 1d77e26..4e427cc 100644 |
185 |
--- a/net-nds/389-ds-base/Manifest |
186 |
+++ b/net-nds/389-ds-base/Manifest |
187 |
@@ -1,2 +1 @@ |
188 |
-DIST 389-ds-base-1.3.4.7.tar.bz2 3397520 SHA256 08dae55ed0732e8d316bb65910c74ee913fc215c3436299239e362a3670e76e6 SHA512 02159ce8e9d1e5797d6d6952202b430429bf750179279348430333f7a4b557e305a2041a1e4e7ffe652d34825c9678d3fbf8a3eaea401f257bd922034dbce875 WHIRLPOOL 97af90f6b3f01a2a11e236f1141d1851016711f69b618f2e3122715e8575541040aa09c03f66f7a20cca9e2136bb2d3612c8fcec16b616f981dba39c4f449453 |
189 |
DIST 389-ds-base-1.3.4.8.tar.bz2 3396105 SHA256 a00468afcfa50de375f921a827a04dd53b6a11b632982bb0db98cafca509e701 SHA512 ac85223cb38d4cebb3ff61b23e3c0312b0cd30a0c6bf0d9644842c6ecfbc9379ea4a639c80b3e78a13a67f273342fec78e9ecf4672cc72e289d72d74c2fa0d8f WHIRLPOOL 4c7645be5b70c108ef437aaf6d50293a99fa6a552c859f649904c6974c8830e5bf96286a0f998c5d187c1f66f3e0922bbe1e756889e6b0a33e8d9db56f0aa005 |
190 |
|
191 |
diff --git a/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch b/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch |
192 |
deleted file mode 100644 |
193 |
index 7c99085..0000000 |
194 |
--- a/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch |
195 |
+++ /dev/null |
196 |
@@ -1,28 +0,0 @@ |
197 |
-commit f5bd0ed47523b39aedb6bcc1f9c0754371159a77 |
198 |
-Author: Rich Megginson <rmeggins at redhat.com> |
199 |
-Date: Fri Sep 14 09:20:18 2012 -0600 |
200 |
- |
201 |
- Ticket #461 - fix build problem with mozldap c sdk |
202 |
- |
203 |
- https://fedorahosted.org/389/ticket/461 |
204 |
- Reviewed by: rmeggins |
205 |
- Fixed by: cgrzemba |
206 |
- Branch: master |
207 |
- Fix Description: mozldap does not define LDAP_MOD_OP so define it |
208 |
- Platforms tested: RHEL6 x86_64 |
209 |
- Flag Day: no |
210 |
- Doc impact: no |
211 |
- |
212 |
-diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c |
213 |
-index bfd48b1..4736e82 100644 |
214 |
---- a/ldap/servers/slapd/pw.c |
215 |
-+++ b/ldap/servers/slapd/pw.c |
216 |
-@@ -61,6 +61,9 @@ |
217 |
- #if defined( _WIN32 ) |
218 |
- #undef LDAPDebug |
219 |
- #endif /* _WIN32 */ |
220 |
-+#if defined( USE_MOZLDAP ) |
221 |
-+#define LDAP_MOD_OP (0x0007) |
222 |
-+#endif /* USE_MOZLDAP */ |
223 |
- |
224 |
- #include "slap.h" |
225 |
|
226 |
diff --git a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch |
227 |
deleted file mode 100644 |
228 |
index 8af7ad2..0000000 |
229 |
--- a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-no-instance-script.patch |
230 |
+++ /dev/null |
231 |
@@ -1,396 +0,0 @@ |
232 |
-From 7b75e7a4c60637a86acf6c757f207550294279ef Mon Sep 17 00:00:00 2001 |
233 |
-From: William Brown <wibrown@××××××.com> |
234 |
-Date: Wed, 28 Oct 2015 14:25:26 +1000 |
235 |
-Subject: [PATCH] Ticket 47840 - add configure option to disable instance |
236 |
- specific scripts https://fedorahosted.org/389/ticket/47840 |
237 |
-MIME-Version: 1.0 |
238 |
-Content-Type: text/plain; charset=UTF-8 |
239 |
-Content-Transfer-Encoding: 8bit |
240 |
- |
241 |
-Bug Description: Now that ​https://fedorahosted.org/389/ticket/528 is |
242 |
-fixed, the next step is to allow building the server with the instance specific |
243 |
-scripts disabled. |
244 |
- |
245 |
-Fix Description: Instead of defining a configure option, we provide a new |
246 |
-option in setup-ds.pl, slapd.InstScriptsEnabled, which defaults to false. All |
247 |
-new installs of 389 will NOT install with a inst_dir nor the scripts that are in |
248 |
-that directory. |
249 |
- |
250 |
-Additionally, this change fixes setup-ds.pl to correctly use the sbindir scripts |
251 |
-to start/stop the server instance during installation. |
252 |
- |
253 |
-Finally, we add support for setup-ds.pl so that in --update if the inst_dir |
254 |
-exists, scripts will be updated, but if it does not exist, no action is taken. |
255 |
- |
256 |
-In time, we will alter --update to *remove* the scripts within inst_dir during |
257 |
-the update (We have no way of knowing if a customer has put custom scripts in |
258 |
-inst_dir) |
259 |
- |
260 |
-Example: |
261 |
-/opt/dirsrv/sbin/setup-ds.pl slapd.InstScriptsEnabled=false |
262 |
- |
263 |
-Author: wibrown |
264 |
- |
265 |
-Review by: nhosoi (Thanks!) |
266 |
---- |
267 |
- ldap/admin/src/scripts/DSCreate.pm.in | 204 +++++++++++++++++++-------------- |
268 |
- ldap/admin/src/scripts/DSUpdate.pm.in | 12 +- |
269 |
- ldap/admin/src/scripts/setup-ds.res.in | 1 + |
270 |
- 3 files changed, 124 insertions(+), 93 deletions(-) |
271 |
- |
272 |
-diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in |
273 |
-index 3ce5a73..6425be4 100644 |
274 |
---- a/ldap/admin/src/scripts/DSCreate.pm.in |
275 |
-+++ b/ldap/admin/src/scripts/DSCreate.pm.in |
276 |
-@@ -130,6 +130,15 @@ sub sanityCheckParams { |
277 |
- return @errs; |
278 |
- } |
279 |
- |
280 |
-+ # We need to make sure this value is lowercase |
281 |
-+ $inf->{slapd}->{InstScriptsEnabled} = lc $inf->{slapd}->{InstScriptsEnabled}; |
282 |
-+ |
283 |
-+ if ("true" ne $inf->{slapd}->{InstScriptsEnabled} && "false" ne $inf->{slapd}->{InstScriptsEnabled}) { |
284 |
-+ debug(1, "InstScriptsEnabled is not a valid boolean"); |
285 |
-+ return ('error_invalid_boolean', $inf->{slapd}->{InstScriptsEnabled}); |
286 |
-+ } |
287 |
-+ |
288 |
-+ |
289 |
- return (); |
290 |
- } |
291 |
- |
292 |
-@@ -204,13 +213,17 @@ sub makeDSDirs { |
293 |
- my $mode = getMode($inf, 7); |
294 |
- my @errs; |
295 |
- |
296 |
-+ my @dsdirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir); |
297 |
-+ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") { |
298 |
-+ @dsdirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir); |
299 |
-+ } |
300 |
-+ |
301 |
- # These paths are owned by the SuiteSpotGroup |
302 |
- # This allows the admin server to run as a different, |
303 |
- # more privileged user than the directory server, but |
304 |
- # still allows the admin server to manage directory |
305 |
- # server files/dirs without being root |
306 |
-- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir |
307 |
-- cert_dir db_dir ldif_dir bak_dir)) { |
308 |
-+ for my $kw (@dsdirs) { |
309 |
- my $dir = $inf->{slapd}->{$kw}; |
310 |
- @errs = makePaths($dir, $mode, $inf->{General}->{SuiteSpotUserID}, |
311 |
- $inf->{General}->{SuiteSpotGroup}); |
312 |
-@@ -262,56 +275,66 @@ sub createInstanceScripts { |
313 |
- my $myperl = "!$perlexec"; |
314 |
- my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL "); |
315 |
- |
316 |
-- # determine initconfig_dir |
317 |
-- my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix}); |
318 |
-- |
319 |
-- my %maptable = ( |
320 |
-- "DS-ROOT" => $inf->{General}->{prefix}, |
321 |
-- "SEP" => "/", # works on all platforms |
322 |
-- "SERVER-NAME" => $inf->{General}->{FullMachineName}, |
323 |
-- "SERVER-PORT" => $inf->{slapd}->{ServerPort}, |
324 |
-- "PERL-EXEC" => $myperl, |
325 |
-- "DEV-NULL" => $mydevnull, |
326 |
-- "ROOT-DN" => $inf->{slapd}->{RootDN}, |
327 |
-- "LDIF-DIR" => $inf->{slapd}->{ldif_dir}, |
328 |
-- "SERV-ID" => $inf->{slapd}->{ServerIdentifier}, |
329 |
-- "BAK-DIR" => $inf->{slapd}->{bak_dir}, |
330 |
-- "SERVER-DIR" => $inf->{General}->{ServerRoot}, |
331 |
-- "CONFIG-DIR" => $inf->{slapd}->{config_dir}, |
332 |
-- "INITCONFIG-DIR" => $initconfig_dir, |
333 |
-- "INST-DIR" => $inf->{slapd}->{inst_dir}, |
334 |
-- "RUN-DIR" => $inf->{slapd}->{run_dir}, |
335 |
-- "PRODUCT-NAME" => "slapd", |
336 |
-- "SERVERBIN-DIR" => $inf->{slapd}->{sbindir}, |
337 |
-- "DB-DIR" => $inf->{slapd}->{db_dir} |
338 |
-- ); |
339 |
-- |
340 |
-- my $dir = "$inf->{General}->{prefix}@taskdir@"; |
341 |
-- for my $file (glob("$dir/template-*")) { |
342 |
-- my $basename = $file; |
343 |
-- $basename =~ s/^.*template-//; |
344 |
-- my $destfile = "$inf->{slapd}->{inst_dir}/$basename"; |
345 |
-- |
346 |
-- next if ($skip and -f $destfile); # in skip mode, skip files that already exist |
347 |
-- |
348 |
-- if (!open(SRC, "< $file")) { |
349 |
-- return ("error_opening_scripttmpl", $file, $!); |
350 |
-- } |
351 |
-- if (!open(DEST, "> $destfile")) { |
352 |
-- return ("error_opening_scripttmpl", $destfile, $!); |
353 |
-- } |
354 |
-- my $contents; # slurp entire file into memory |
355 |
-- read SRC, $contents, int(-s $file); |
356 |
-- close(SRC); |
357 |
-- while (my ($key, $val) = each %maptable) { |
358 |
-- $contents =~ s/\{\{$key\}\}/$val/g; |
359 |
-- } |
360 |
-- print DEST $contents; |
361 |
-- close(DEST); |
362 |
-- my @errs = changeOwnerMode($inf, 5, $destfile); |
363 |
-- if (@errs) { |
364 |
-- return @errs; |
365 |
-+ # If we have InstScriptsEnabled, we likely have setup.inf or the argument. |
366 |
-+ # However, during an upgrade, we need to know if we should upgrade the template files or not. |
367 |
-+ # For now, the easiest way is to check to if the directory exists, and if is does, we assume we want to upgrade / create the updated scripts. |
368 |
-+ if ($inf->{slapd}->{InstScriptsEnabled} eq "true" || -d $inf->{slapd}->{inst_dir} ) { |
369 |
-+ debug(1, "Creating or updating instance directory scripts\n"); |
370 |
-+ # determine initconfig_dir |
371 |
-+ my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix}); |
372 |
-+ |
373 |
-+ my %maptable = ( |
374 |
-+ "DS-ROOT" => $inf->{General}->{prefix}, |
375 |
-+ "SEP" => "/", # works on all platforms |
376 |
-+ "SERVER-NAME" => $inf->{General}->{FullMachineName}, |
377 |
-+ "SERVER-PORT" => $inf->{slapd}->{ServerPort}, |
378 |
-+ "PERL-EXEC" => $myperl, |
379 |
-+ "DEV-NULL" => $mydevnull, |
380 |
-+ "ROOT-DN" => $inf->{slapd}->{RootDN}, |
381 |
-+ "LDIF-DIR" => $inf->{slapd}->{ldif_dir}, |
382 |
-+ "SERV-ID" => $inf->{slapd}->{ServerIdentifier}, |
383 |
-+ "BAK-DIR" => $inf->{slapd}->{bak_dir}, |
384 |
-+ "SERVER-DIR" => $inf->{General}->{ServerRoot}, |
385 |
-+ "CONFIG-DIR" => $inf->{slapd}->{config_dir}, |
386 |
-+ "INITCONFIG-DIR" => $initconfig_dir, |
387 |
-+ "INST-DIR" => $inf->{slapd}->{inst_dir}, |
388 |
-+ "RUN-DIR" => $inf->{slapd}->{run_dir}, |
389 |
-+ "PRODUCT-NAME" => "slapd", |
390 |
-+ "SERVERBIN-DIR" => $inf->{slapd}->{sbindir}, |
391 |
-+ "DB-DIR" => $inf->{slapd}->{db_dir} |
392 |
-+ ); |
393 |
-+ |
394 |
-+ |
395 |
-+ my $dir = "$inf->{General}->{prefix}@taskdir@"; |
396 |
-+ for my $file (glob("$dir/template-*")) { |
397 |
-+ my $basename = $file; |
398 |
-+ $basename =~ s/^.*template-//; |
399 |
-+ my $destfile = "$inf->{slapd}->{inst_dir}/$basename"; |
400 |
-+ debug(1, "$destfile\n"); |
401 |
-+ |
402 |
-+ next if ($skip and -f $destfile); # in skip mode, skip files that already exist |
403 |
-+ |
404 |
-+ if (!open(SRC, "< $file")) { |
405 |
-+ return ("error_opening_scripttmpl", $file, $!); |
406 |
-+ } |
407 |
-+ if (!open(DEST, "> $destfile")) { |
408 |
-+ return ("error_opening_scripttmpl", $destfile, $!); |
409 |
-+ } |
410 |
-+ my $contents; # slurp entire file into memory |
411 |
-+ read SRC, $contents, int(-s $file); |
412 |
-+ close(SRC); |
413 |
-+ while (my ($key, $val) = each %maptable) { |
414 |
-+ $contents =~ s/\{\{$key\}\}/$val/g; |
415 |
-+ } |
416 |
-+ print DEST $contents; |
417 |
-+ close(DEST); |
418 |
-+ my @errs = changeOwnerMode($inf, 5, $destfile); |
419 |
-+ if (@errs) { |
420 |
-+ return @errs; |
421 |
-+ } |
422 |
- } |
423 |
-+ } else { |
424 |
-+ debug(1, "No instance directory scripts will be updated or created\n"); |
425 |
- } |
426 |
- |
427 |
- return (); |
428 |
-@@ -639,7 +662,7 @@ sub initDatabase { |
429 |
- return (); |
430 |
- } |
431 |
- |
432 |
-- my $cmd = "$inf->{slapd}->{inst_dir}/ldif2db -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'"; |
433 |
-+ my $cmd = "$inf->{slapd}->{sbindir}/ldif2db -Z $inf->{slapd}->{ServerIdentifier} -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'"; |
434 |
- $? = 0; # clear error condition |
435 |
- my $output = `$cmd 2>&1`; |
436 |
- my $result = $?; |
437 |
-@@ -662,7 +685,7 @@ sub startServer { |
438 |
- my @errs; |
439 |
- # get error log |
440 |
- my $errLog = "$inf->{slapd}->{log_dir}/errors"; |
441 |
-- my $startcmd = "$inf->{slapd}->{inst_dir}/start-slapd"; |
442 |
-+ my $startcmd = "$inf->{slapd}->{sbindir}/start-dirsrv $inf->{slapd}->{ServerIdentifier}"; |
443 |
- if ("@systemdsystemunitdir@" and (getLogin() eq 'root')) { |
444 |
- $startcmd = "/bin/systemctl start @package_name@\@$inf->{slapd}->{ServerIdentifier}.service"; |
445 |
- } |
446 |
-@@ -875,6 +898,10 @@ sub setDefaults { |
447 |
- "@datadir@", |
448 |
- $inf->{General}->{prefix}); |
449 |
- |
450 |
-+ if (!defined($inf->{slapd}->{InstScriptsEnabled})) { |
451 |
-+ $inf->{slapd}->{InstScriptsEnabled} = "false"; |
452 |
-+ } |
453 |
-+ |
454 |
- if (!defined($inf->{slapd}->{inst_dir})) { |
455 |
- $inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid"; |
456 |
- } |
457 |
-@@ -975,9 +1002,12 @@ sub updateSelinuxPolicy { |
458 |
- system("restorecon -R $localstatedir/lib/@PACKAGE_NAME@"); |
459 |
- } |
460 |
- |
461 |
-+ my @inst_dirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir); |
462 |
-+ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") { |
463 |
-+ @inst_dirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir); |
464 |
-+ } |
465 |
- # run restorecon on all instance directories we created |
466 |
-- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir |
467 |
-- cert_dir db_dir ldif_dir bak_dir)) { |
468 |
-+ for my $kw (@inst_dirs) { |
469 |
- my $dir = $inf->{slapd}->{$kw}; |
470 |
- system("restorecon -R $dir"); |
471 |
- } |
472 |
-@@ -1231,14 +1261,14 @@ sub createDSInstance { |
473 |
- } |
474 |
- |
475 |
- sub stopServer { |
476 |
-- my $instancedir = shift; |
477 |
-- my $prog = $instancedir . "/stop-slapd"; |
478 |
-+ my $instance = shift; |
479 |
-+ my $prog = "@sbindir@/stop-dirsrv"; |
480 |
- if (-x $prog) { |
481 |
- $? = 0; |
482 |
- # run the stop command |
483 |
-- my $output = `$prog 2>&1`; |
484 |
-+ my $output = `$prog $instance 2>&1`; |
485 |
- my $status = $?; |
486 |
-- debug(3, "stopping server $instancedir returns status $status: output $output\n"); |
487 |
-+ debug(3, "stopping server $instance returns status $status: output $output\n"); |
488 |
- if ($status) { |
489 |
- debug(1,"Warning: Could not stop directory server: status $status: output $output\n"); |
490 |
- # if the server is not running, that's ok |
491 |
-@@ -1254,7 +1284,7 @@ sub stopServer { |
492 |
- return; |
493 |
- } |
494 |
- |
495 |
-- debug(1, "Successfully stopped server $instancedir\n"); |
496 |
-+ debug(1, "Successfully stopped server $instance\n"); |
497 |
- return 1; |
498 |
- } |
499 |
- |
500 |
-@@ -1331,23 +1361,16 @@ sub removeDSInstance { |
501 |
- $conn->close(); |
502 |
- |
503 |
- # stop the server |
504 |
-- my $instdir = ""; |
505 |
-- if ($entry) { |
506 |
-- foreach my $path ( @{$entry->{"nsslapd-instancedir"}} ) |
507 |
-- { |
508 |
-- if (!stopServer($path)) { |
509 |
-- if ($force) { |
510 |
-- debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n"); |
511 |
-- } elsif ($! == ENOENT) { # stop script not found or server not running |
512 |
-- debug(1, "Warning: Could not stop directory server: already removed or not running\n"); |
513 |
-- push @errs, [ 'error_stopping_server', $path, $! ]; |
514 |
-- } else { # real error |
515 |
-- debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n"); |
516 |
-- push @errs, [ 'error_stopping_server', $path, $! ]; |
517 |
-- return @errs; |
518 |
-- } |
519 |
-- } |
520 |
-- $instdir = $path; |
521 |
-+ if (!stopServer($inst)) { |
522 |
-+ if ($force) { |
523 |
-+ debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n"); |
524 |
-+ } elsif ($! == ENOENT) { # stop script not found or server not running |
525 |
-+ debug(1, "Warning: Could not stop directory server: already removed or not running\n"); |
526 |
-+ push @errs, [ 'error_stopping_server', $inst, $! ]; |
527 |
-+ } else { # real error |
528 |
-+ debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n"); |
529 |
-+ push @errs, [ 'error_stopping_server', $inst, $! ]; |
530 |
-+ return @errs; |
531 |
- } |
532 |
- } |
533 |
- |
534 |
-@@ -1363,18 +1386,25 @@ sub removeDSInstance { |
535 |
- push @errs, remove_tree($entry, "nsslapd-errorlog", $instname, 1); |
536 |
- } |
537 |
- |
538 |
-- # instance dir |
539 |
-- if ( -d $instdir && $instdir =~ /$instname/ ) |
540 |
-- { |
541 |
-- # clean up pid files (if any) |
542 |
-- remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name); |
543 |
-- remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name); |
544 |
- |
545 |
-- my $rc = rmtree($instdir); |
546 |
-- if ( 0 == $rc ) |
547 |
-+ # instance dir |
548 |
-+ my $instdir = ""; |
549 |
-+ if ($entry) { |
550 |
-+ foreach my $instdir ( @{$entry->{"nsslapd-instancedir"}} ) |
551 |
- { |
552 |
-- push @errs, [ 'error_removing_path', $instdir, $! ]; |
553 |
-- debug(1, "Warning: $instdir was not removed. Error: $!\n"); |
554 |
-+ if ( -d $instdir && $instdir =~ /$instname/ ) |
555 |
-+ { |
556 |
-+ # clean up pid files (if any) |
557 |
-+ remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name); |
558 |
-+ remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name); |
559 |
-+ |
560 |
-+ my $rc = rmtree($instdir); |
561 |
-+ if ( 0 == $rc ) |
562 |
-+ { |
563 |
-+ push @errs, [ 'error_removing_path', $instdir, $! ]; |
564 |
-+ debug(1, "Warning: $instdir was not removed. Error: $!\n"); |
565 |
-+ } |
566 |
-+ } |
567 |
- } |
568 |
- } |
569 |
- # Finally, config dir |
570 |
-diff --git a/ldap/admin/src/scripts/DSUpdate.pm.in b/ldap/admin/src/scripts/DSUpdate.pm.in |
571 |
-index be1e67c..e84a9a9 100644 |
572 |
---- a/ldap/admin/src/scripts/DSUpdate.pm.in |
573 |
-+++ b/ldap/admin/src/scripts/DSUpdate.pm.in |
574 |
-@@ -226,10 +226,10 @@ sub updateDS { |
575 |
- for my $upd (@updates) { |
576 |
- my @localerrs; |
577 |
- if ($upd->{$PRE_STAGE}) { |
578 |
-- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n"); |
579 |
-+ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n"); |
580 |
- @localerrs = &{$upd->{$PRE_STAGE}}($inf, $setup->{configdir}); |
581 |
- } elsif ($upd->{file}) { |
582 |
-- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n"); |
583 |
-+ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n"); |
584 |
- @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $PRE_STAGE); |
585 |
- } |
586 |
- if (@localerrs) { |
587 |
-@@ -276,10 +276,10 @@ sub updateDS { |
588 |
- for my $upd (@updates) { |
589 |
- my @localerrs; |
590 |
- if ($upd->{$POST_STAGE}) { |
591 |
-- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n"); |
592 |
-+ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n"); |
593 |
- @localerrs = &{$upd->{$POST_STAGE}}($inf, $setup->{configdir}); |
594 |
- } elsif ($upd->{file}) { |
595 |
-- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n"); |
596 |
-+ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n"); |
597 |
- @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $POST_STAGE); |
598 |
- } |
599 |
- if (@localerrs) { |
600 |
-@@ -385,10 +385,10 @@ sub updateDSInstance { |
601 |
- for my $upd (@{$updates}) { |
602 |
- my @localerrs; |
603 |
- if ($upd->{$stage}) { |
604 |
-- debug(1, "Running stage $stage update ", $upd->{path}, "\n"); |
605 |
-+ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n"); |
606 |
- @localerrs = &{$upd->{$stage}}($inf, $inst, $dseldif, $conn); |
607 |
- } elsif ($upd->{file}) { |
608 |
-- debug(1, "Running stage $stage update ", $upd->{path}, "\n"); |
609 |
-+ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n"); |
610 |
- @localerrs = processUpdate($upd, $inf, $configdir, $stage, |
611 |
- $inst, $dseldif, $conn); |
612 |
- } |
613 |
-diff --git a/ldap/admin/src/scripts/setup-ds.res.in b/ldap/admin/src/scripts/setup-ds.res.in |
614 |
-index 7134e25..fa37567 100644 |
615 |
---- a/ldap/admin/src/scripts/setup-ds.res.in |
616 |
-+++ b/ldap/admin/src/scripts/setup-ds.res.in |
617 |
-@@ -116,6 +116,7 @@ error_creating_file = Could not create file '%s'. Error: %s\n |
618 |
- error_copying_file = Could not copy file '%s' to '%s'. Error: %s\n |
619 |
- error_enabling_feature = Could not enable the directory server feature '%s'. Error: %s\n |
620 |
- error_importing_ldif = Could not import LDIF file '%s'. Error: %s. Output: %s\n |
621 |
-+error_invalid_boolean = Could not convert value '%s' to boolean. Valid values are true or false.\n |
622 |
- error_starting_server = Could not start the directory server using command '%s'. The last line from the error log was '%s'. Error: %s\n |
623 |
- error_stopping_server = Could not stop the directory server '%s'. Error: %s\n |
624 |
- error_missing_userid = The SuiteSpotUserID is missing. This must be set to valid user\n |
625 |
--- |
626 |
-2.4.3 |
627 |
- |
628 |
|
629 |
diff --git a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch b/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch |
630 |
deleted file mode 100644 |
631 |
index 0842382..0000000 |
632 |
--- a/net-nds/389-ds-base/files/389-ds-base-1.3.4.7-shell-corrections.patch |
633 |
+++ /dev/null |
634 |
@@ -1,242 +0,0 @@ |
635 |
-From 340cdd3c9648c4b35ef95cc0498413b763e71859 Mon Sep 17 00:00:00 2001 |
636 |
-From: William Brown <firstyear@××××××.com> |
637 |
-Date: Sun, 31 Jan 2016 14:27:13 +1000 |
638 |
-Subject: [PATCH] Ticket 48448 - dirsrv start-stop fail in certain shell |
639 |
- environments. |
640 |
- |
641 |
-Bug Description: Dirsrv fails to start and stop with certain shell environments |
642 |
-. This is due to the usage of the pattern |
643 |
- |
644 |
- cd $SERVERBIN_DIR |
645 |
- ./ns-slapd ... |
646 |
- |
647 |
-Fix Description: Change all invocations of commands to use explicit paths: |
648 |
- |
649 |
- $SERVERBIN_DIR/ns-slapd |
650 |
- |
651 |
-https://fedorahosted.org/389/ticket/48448 |
652 |
- |
653 |
-Author: wibrown |
654 |
- |
655 |
-Review by: ??? |
656 |
---- |
657 |
- ldap/admin/src/scripts/start-dirsrv.in | 2 +- |
658 |
- ldap/admin/src/scripts/template-bak2db.in | 3 +-- |
659 |
- ldap/admin/src/scripts/template-db2bak.in | 5 ++--- |
660 |
- ldap/admin/src/scripts/template-db2index.in | 5 ++--- |
661 |
- ldap/admin/src/scripts/template-db2ldif.in | 3 +-- |
662 |
- ldap/admin/src/scripts/template-dbverify.in | 5 ++--- |
663 |
- ldap/admin/src/scripts/template-dn2rdn.in | 5 ++--- |
664 |
- ldap/admin/src/scripts/template-ldif2db.in | 3 +-- |
665 |
- ldap/admin/src/scripts/template-ldif2ldap.in | 5 ++--- |
666 |
- ldap/admin/src/scripts/template-monitor.in | 5 ++--- |
667 |
- ldap/admin/src/scripts/template-restoreconfig.in | 5 ++--- |
668 |
- ldap/admin/src/scripts/template-saveconfig.in | 5 ++--- |
669 |
- ldap/admin/src/scripts/template-suffix2instance.in | 5 ++--- |
670 |
- ldap/admin/src/scripts/template-upgradedb.in | 3 +-- |
671 |
- ldap/admin/src/scripts/template-upgradednformat.in | 5 ++--- |
672 |
- ldap/admin/src/scripts/template-vlvindex.in | 3 +-- |
673 |
- 16 files changed, 26 insertions(+), 41 deletions(-) |
674 |
- |
675 |
-diff --git a/ldap/admin/src/scripts/start-dirsrv.in b/ldap/admin/src/scripts/start-dirsrv.in |
676 |
-index 458f0e8..513addb 100755 |
677 |
---- a/ldap/admin/src/scripts/start-dirsrv.in |
678 |
-+++ b/ldap/admin/src/scripts/start-dirsrv.in |
679 |
-@@ -70,7 +70,7 @@ start_instance() { |
680 |
- return 1 |
681 |
- fi |
682 |
- else |
683 |
-- cd $SERVERBIN_DIR; ./ns-slapd -D $CONFIG_DIR -i $PIDFILE -w $STARTPIDFILE "$@" |
684 |
-+ $SERVERBIN_DIR/ns-slapd -D $CONFIG_DIR -i $PIDFILE -w $STARTPIDFILE "$@" |
685 |
- if [ $? -ne 0 ]; then |
686 |
- return 1 |
687 |
- fi |
688 |
-diff --git a/ldap/admin/src/scripts/template-bak2db.in b/ldap/admin/src/scripts/template-bak2db.in |
689 |
-index 1725aba..01a12fa 100755 |
690 |
---- a/ldap/admin/src/scripts/template-bak2db.in |
691 |
-+++ b/ldap/admin/src/scripts/template-bak2db.in |
692 |
-@@ -1,5 +1,4 @@ |
693 |
- #!/bin/sh |
694 |
- |
695 |
--cd {{SERVERBIN-DIR}} |
696 |
--./bak2db "$@" -Z {{SERV-ID}} |
697 |
-+{{SERVERBIN-DIR}}/bak2db "$@" -Z {{SERV-ID}} |
698 |
- exit $? |
699 |
-diff --git a/ldap/admin/src/scripts/template-db2bak.in b/ldap/admin/src/scripts/template-db2bak.in |
700 |
-index 50fd5ed..70a4a2b 100755 |
701 |
---- a/ldap/admin/src/scripts/template-db2bak.in |
702 |
-+++ b/ldap/admin/src/scripts/template-db2bak.in |
703 |
-@@ -1,5 +1,4 @@ |
704 |
- #!/bin/sh |
705 |
- |
706 |
--cd {{SERVERBIN-DIR}} |
707 |
--./db2bak "$@" -Z {{SERV-ID}} |
708 |
--exit $? |
709 |
-\ No newline at end of file |
710 |
-+{{SERVERBIN-DIR}}/db2bak "$@" -Z {{SERV-ID}} |
711 |
-+exit $? |
712 |
-diff --git a/ldap/admin/src/scripts/template-db2index.in b/ldap/admin/src/scripts/template-db2index.in |
713 |
-index a7a633d..9c7c5ec 100755 |
714 |
---- a/ldap/admin/src/scripts/template-db2index.in |
715 |
-+++ b/ldap/admin/src/scripts/template-db2index.in |
716 |
-@@ -1,5 +1,4 @@ |
717 |
- #!/bin/sh |
718 |
- |
719 |
--cd {{SERVERBIN-DIR}} |
720 |
--./db2index "$@" -Z {{SERV-ID}} |
721 |
--exit $? |
722 |
-\ No newline at end of file |
723 |
-+{{SERVERBIN-DIR}}/db2index "$@" -Z {{SERV-ID}} |
724 |
-+exit $? |
725 |
-diff --git a/ldap/admin/src/scripts/template-db2ldif.in b/ldap/admin/src/scripts/template-db2ldif.in |
726 |
-index b85ffdc..3881911 100755 |
727 |
---- a/ldap/admin/src/scripts/template-db2ldif.in |
728 |
-+++ b/ldap/admin/src/scripts/template-db2ldif.in |
729 |
-@@ -1,6 +1,5 @@ |
730 |
- #!/bin/sh |
731 |
- |
732 |
- cwd=`pwd` |
733 |
--cd {{SERVERBIN-DIR}} |
734 |
--./db2ldif "$@" -Z {{SERV-ID}} -c $cwd |
735 |
-+{{SERVERBIN-DIR}}/db2ldif "$@" -Z {{SERV-ID}} -c $cwd |
736 |
- exit $? |
737 |
-diff --git a/ldap/admin/src/scripts/template-dbverify.in b/ldap/admin/src/scripts/template-dbverify.in |
738 |
-index 71e3e4e..abcc58e 100755 |
739 |
---- a/ldap/admin/src/scripts/template-dbverify.in |
740 |
-+++ b/ldap/admin/src/scripts/template-dbverify.in |
741 |
-@@ -1,5 +1,4 @@ |
742 |
- #!/bin/sh |
743 |
- |
744 |
--cd {{SERVERBIN-DIR}} |
745 |
--./dbverify "$@" -Z {{SERV-ID}} |
746 |
--exit $? |
747 |
-\ No newline at end of file |
748 |
-+{{SERVERBIN-DIR}}/dbverify "$@" -Z {{SERV-ID}} |
749 |
-+exit $? |
750 |
-diff --git a/ldap/admin/src/scripts/template-dn2rdn.in b/ldap/admin/src/scripts/template-dn2rdn.in |
751 |
-index b3d8e82..9ecae08 100755 |
752 |
---- a/ldap/admin/src/scripts/template-dn2rdn.in |
753 |
-+++ b/ldap/admin/src/scripts/template-dn2rdn.in |
754 |
-@@ -1,5 +1,4 @@ |
755 |
- #!/bin/sh |
756 |
- |
757 |
--cd {{SERVERBIN-DIR}} |
758 |
--./dn2rdn "$@" -Z {{SERV-ID}} |
759 |
--exit $? |
760 |
-\ No newline at end of file |
761 |
-+{{SERVERBIN-DIR}}/dn2rdn "$@" -Z {{SERV-ID}} |
762 |
-+exit $? |
763 |
-diff --git a/ldap/admin/src/scripts/template-ldif2db.in b/ldap/admin/src/scripts/template-ldif2db.in |
764 |
-index f3fa58e..f38fce3 100755 |
765 |
---- a/ldap/admin/src/scripts/template-ldif2db.in |
766 |
-+++ b/ldap/admin/src/scripts/template-ldif2db.in |
767 |
-@@ -1,5 +1,4 @@ |
768 |
- #!/bin/sh |
769 |
- |
770 |
--cd {{SERVERBIN-DIR}} |
771 |
--./ldif2db "$@" -Z {{SERV-ID}} |
772 |
-+{{SERVERBIN-DIR}}/ldif2db "$@" -Z {{SERV-ID}} |
773 |
- exit $? |
774 |
-diff --git a/ldap/admin/src/scripts/template-ldif2ldap.in b/ldap/admin/src/scripts/template-ldif2ldap.in |
775 |
-index 806ddcc..c785742 100755 |
776 |
---- a/ldap/admin/src/scripts/template-ldif2ldap.in |
777 |
-+++ b/ldap/admin/src/scripts/template-ldif2ldap.in |
778 |
-@@ -1,5 +1,4 @@ |
779 |
- #!/bin/sh |
780 |
- |
781 |
--cd {{SERVERBIN-DIR}} |
782 |
--./ldif2ldap "$@" -Z {{SERV-ID}} |
783 |
--exit $? |
784 |
-\ No newline at end of file |
785 |
-+{{SERVERBIN-DIR}}/ldif2ldap "$@" -Z {{SERV-ID}} |
786 |
-+exit $? |
787 |
-diff --git a/ldap/admin/src/scripts/template-monitor.in b/ldap/admin/src/scripts/template-monitor.in |
788 |
-index 2f93337..c89bb8a 100755 |
789 |
---- a/ldap/admin/src/scripts/template-monitor.in |
790 |
-+++ b/ldap/admin/src/scripts/template-monitor.in |
791 |
-@@ -1,5 +1,4 @@ |
792 |
- #!/bin/sh |
793 |
- |
794 |
--cd {{SERVERBIN-DIR}} |
795 |
--./monitor "$@" -Z {{SERV-ID}} |
796 |
--exit $? |
797 |
-\ No newline at end of file |
798 |
-+{{SERVERBIN-DIR}}/monitor "$@" -Z {{SERV-ID}} |
799 |
-+exit $? |
800 |
-diff --git a/ldap/admin/src/scripts/template-restoreconfig.in b/ldap/admin/src/scripts/template-restoreconfig.in |
801 |
-index f4b2d06..5109561 100755 |
802 |
---- a/ldap/admin/src/scripts/template-restoreconfig.in |
803 |
-+++ b/ldap/admin/src/scripts/template-restoreconfig.in |
804 |
-@@ -1,5 +1,4 @@ |
805 |
- #!/bin/sh |
806 |
- |
807 |
--cd {{SERVERBIN-DIR}} |
808 |
--./restoreconfig "$@" -Z {{SERV-ID}} |
809 |
--exit $? |
810 |
-\ No newline at end of file |
811 |
-+{{SERVERBIN-DIR}}/restoreconfig "$@" -Z {{SERV-ID}} |
812 |
-+exit $? |
813 |
-diff --git a/ldap/admin/src/scripts/template-saveconfig.in b/ldap/admin/src/scripts/template-saveconfig.in |
814 |
-index c77cce1..7784e83 100755 |
815 |
---- a/ldap/admin/src/scripts/template-saveconfig.in |
816 |
-+++ b/ldap/admin/src/scripts/template-saveconfig.in |
817 |
-@@ -1,5 +1,4 @@ |
818 |
- #!/bin/sh |
819 |
- |
820 |
--cd {{SERVERBIN-DIR}} |
821 |
--./saveconfig "$@" -Z {{SERV-ID}} |
822 |
--exit $? |
823 |
-\ No newline at end of file |
824 |
-+{{SERVERBIN-DIR}}/saveconfig "$@" -Z {{SERV-ID}} |
825 |
-+exit $? |
826 |
-diff --git a/ldap/admin/src/scripts/template-suffix2instance.in b/ldap/admin/src/scripts/template-suffix2instance.in |
827 |
-index 03bcba8..e29408d 100755 |
828 |
---- a/ldap/admin/src/scripts/template-suffix2instance.in |
829 |
-+++ b/ldap/admin/src/scripts/template-suffix2instance.in |
830 |
-@@ -1,5 +1,4 @@ |
831 |
- #!/bin/sh |
832 |
- |
833 |
--cd {{SERVERBIN-DIR}} |
834 |
--./suffix2instance "$@" -Z {{SERV-ID}} |
835 |
--exit $? |
836 |
-\ No newline at end of file |
837 |
-+{{SERVERBIN-DIR}}/suffix2instance "$@" -Z {{SERV-ID}} |
838 |
-+exit $? |
839 |
-diff --git a/ldap/admin/src/scripts/template-upgradedb.in b/ldap/admin/src/scripts/template-upgradedb.in |
840 |
-index ce879bb..ae28ac2 100755 |
841 |
---- a/ldap/admin/src/scripts/template-upgradedb.in |
842 |
-+++ b/ldap/admin/src/scripts/template-upgradedb.in |
843 |
-@@ -1,5 +1,4 @@ |
844 |
- #!/bin/sh |
845 |
- |
846 |
--cd {{SERVERBIN-DIR}} |
847 |
--./upgradedb "$@" -Z {{SERV-ID}} |
848 |
-+{{SERVERBIN-DIR}}/upgradedb "$@" -Z {{SERV-ID}} |
849 |
- exit $? |
850 |
-diff --git a/ldap/admin/src/scripts/template-upgradednformat.in b/ldap/admin/src/scripts/template-upgradednformat.in |
851 |
-index 5fd8ef9..74c18e8 100755 |
852 |
---- a/ldap/admin/src/scripts/template-upgradednformat.in |
853 |
-+++ b/ldap/admin/src/scripts/template-upgradednformat.in |
854 |
-@@ -1,5 +1,4 @@ |
855 |
- #!/bin/sh |
856 |
- |
857 |
--cd {{SERVERBIN-DIR}} |
858 |
--./upgradednformat "$@" -Z {{SERV-ID}} |
859 |
--exit $? |
860 |
-\ No newline at end of file |
861 |
-+{{SERVERBIN-DIR}}/upgradednformat "$@" -Z {{SERV-ID}} |
862 |
-+exit $? |
863 |
-diff --git a/ldap/admin/src/scripts/template-vlvindex.in b/ldap/admin/src/scripts/template-vlvindex.in |
864 |
-index 0249696..a7ffb40 100755 |
865 |
---- a/ldap/admin/src/scripts/template-vlvindex.in |
866 |
-+++ b/ldap/admin/src/scripts/template-vlvindex.in |
867 |
-@@ -1,5 +1,4 @@ |
868 |
- #!/bin/sh |
869 |
- |
870 |
--cd {{SERVERBIN-DIR}} |
871 |
--./vlvindex "$@" -Z {{SERV-ID}} |
872 |
-+{{SERVERBIN-DIR}}/vlvindex "$@" -Z {{SERV-ID}} |
873 |
- exit $? |
874 |
--- |
875 |
-2.5.0 |
876 |
- |
877 |
|
878 |
diff --git a/net-nds/389-ds-base/files/389-ds.initd b/net-nds/389-ds-base/files/389-ds.initd |
879 |
deleted file mode 100644 |
880 |
index 5afe506..0000000 |
881 |
--- a/net-nds/389-ds-base/files/389-ds.initd |
882 |
+++ /dev/null |
883 |
@@ -1,78 +0,0 @@ |
884 |
-#!/sbin/runscript |
885 |
-# Copyright 1999-2010 Gentoo Foundation |
886 |
-# Distributed under the terms of the GNU General Public License v2 |
887 |
-# $Id$ |
888 |
- |
889 |
-DIRSRV_EXEC="/usr/sbin/ns-slapd" |
890 |
-PID_DIRECTORY="/var/run/dirsrv" |
891 |
-DIRSRV_CONF_DIR="/etc/dirsrv" |
892 |
-DS_INSTANCES=${DIRSRV_CONF_DIR}/slapd-* |
893 |
-F389DS_INSTANCES="" |
894 |
- |
895 |
-depend() { |
896 |
- need net logger |
897 |
- use dns |
898 |
- provide dirsvr ldap |
899 |
-} |
900 |
- |
901 |
-checkconfig() { |
902 |
- if [ -z "${DS_INSTANCES}" ]; then |
903 |
- eerror "389 Directory Server has not been configured." |
904 |
- eend 1 |
905 |
- return 1 |
906 |
- fi |
907 |
-} |
908 |
- |
909 |
-start() { |
910 |
- checkconfig || return 1 |
911 |
- |
912 |
- for instance in ${DS_INSTANCES}; do |
913 |
- instance=$(basename ${instance}) |
914 |
- # skip .removed instances, bug #338133 |
915 |
- if [ "${instance%%.removed}" != "${instance}" ]; then |
916 |
- continue |
917 |
- fi |
918 |
- ebegin "Starting 389 Directory Server: instance ${instance}" |
919 |
- start-stop-daemon --start --quiet -m \ |
920 |
- --pidfile ${PID_DIRECTORY}/${instance}.startpid \ |
921 |
- --exec ${DIRSRV_EXEC} -- -D ${DIRSRV_CONF_DIR}/${instance} \ |
922 |
- -i ${PID_DIRECTORY}/${instance}.pid \ |
923 |
- -w ${PID_DIRECTORY}/${instance}.startpid |
924 |
- sts=${?} |
925 |
- eend ${sts} |
926 |
- if [ "${sts}" != "0" ]; then |
927 |
- return 1 |
928 |
- fi |
929 |
- done |
930 |
-} |
931 |
- |
932 |
- |
933 |
- |
934 |
-stop() { |
935 |
- checkconfig || return 1 |
936 |
- |
937 |
- for instance in ${DS_INSTANCES}; do |
938 |
- instance=$(basename ${instance}) |
939 |
- ebegin "Stopping 389 Directory Server: instance ${instance}" |
940 |
- start-stop-daemon --stop --quiet \ |
941 |
- --pidfile ${PID_DIRECTORY}/${instance}.pid \ |
942 |
- --exec ${DIRSRV_EXEC} |
943 |
- eend ${?} |
944 |
- done |
945 |
-} |
946 |
- |
947 |
-status() { |
948 |
- for instance in ${DS_INSTANCES}; do |
949 |
- instance=$(basename ${instance}) |
950 |
- if [ -e ${PID_DIRECTORY}/${instance}.pid ]; then |
951 |
- pid=$(cat ${PID_DIRECTORY}/${instance}.pid) |
952 |
- if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then |
953 |
- einfo "389 Directory Server: instance ${instance} (pid $pid) running." |
954 |
- else |
955 |
- ewarn "389 Directory Server: instance ${instance} (pid $pid) NOT running." |
956 |
- fi |
957 |
- else |
958 |
- eerror "389 Directory Server: instance ${instance} is NOT running." |
959 |
- fi |
960 |
- done |
961 |
-} |