29 |
|
|
30 |
Summary: 389 Directory Server (base) |
Summary: 389 Directory Server (base) |
31 |
Name: 389-ds-base |
Name: 389-ds-base |
32 |
Version: 1.3.3.6 |
Version: 1.3.3.9 |
33 |
Release: %mkrel 2 |
Release: %mkrel 1 |
34 |
License: GPLv2 with exceptions |
License: GPLv2 with exceptions |
35 |
URL: http://port389.org/ |
URL: http://port389.org/ |
36 |
Group: System/Servers |
Group: System/Servers |
113 |
Source1: %{name}-git.sh |
Source1: %{name}-git.sh |
114 |
Source2: %{name}-devel.README |
Source2: %{name}-devel.README |
115 |
Patch0: mageia-nogroup.patch |
Patch0: mageia-nogroup.patch |
|
Patch1: 389-ds-base-1.3.2.0-build-module.patch |
|
116 |
|
|
117 |
%description |
%description |
118 |
389 Directory Server is an LDAPv3 compliant server. The base package includes |
389 Directory Server is an LDAPv3 compliant server. The base package includes |
164 |
%setup -q -n %{name}-%{version}%{?prerel} |
%setup -q -n %{name}-%{version}%{?prerel} |
165 |
cp %{SOURCE2} README.devel |
cp %{SOURCE2} README.devel |
166 |
%patch0 -p1 -b .mageia-nogroup |
%patch0 -p1 -b .mageia-nogroup |
|
%patch1 -p1 -b .module |
|
167 |
|
|
168 |
|
|
169 |
|
|
176 |
%{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"} |
%{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"} |
177 |
# hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529 |
# hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529 |
178 |
NSSARGS="--with-svrcore-inc=%{_includedir} --with-svrcore-lib=%{_libdir} --with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss" |
NSSARGS="--with-svrcore-inc=%{_includedir} --with-svrcore-lib=%{_libdir} --with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss" |
179 |
%configure2_5x --enable-autobind \ |
%configure2_5x --enable-autobind $OPENLDAP_FLAG $TMPFILES_FLAG \ |
|
$OPENLDAP_FLAG $TMPFILES_FLAG \ |
|
180 |
--with-systemdsystemunitdir=%{_unitdir} \ |
--with-systemdsystemunitdir=%{_unitdir} \ |
181 |
--with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \ |
--with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \ |
182 |
--with-systemdgroupname=%{groupname} $NSSARGS |
--with-systemdgroupname=%{groupname} $NSSARGS |
184 |
# Generate symbolic info for debuggers |
# Generate symbolic info for debuggers |
185 |
export XCFLAGS=$RPM_OPT_FLAGS |
export XCFLAGS=$RPM_OPT_FLAGS |
186 |
|
|
|
%ifarch x86_64 |
|
|
export USE_64=1 |
|
|
%endif |
|
|
|
|
187 |
|
|
188 |
%make |
%make |
189 |
|
|
222 |
if [ -n "$DEBUGPOSTTRANS" ] ; then |
if [ -n "$DEBUGPOSTTRANS" ] ; then |
223 |
output=$DEBUGPOSTTRANS |
output=$DEBUGPOSTTRANS |
224 |
fi |
fi |
225 |
echo looking for services in %{_sysconfdir}/systemd/system/%{groupname}.wants/* > $output 2>&1 || : |
echo looking for services in %{_sysconfdir}/systemd/system/%{groupname}.wants/* >> $output 2>&1 || : |
226 |
for service in %{_sysconfdir}/systemd/system/%{groupname}.wants/* ; do |
for service in %{_sysconfdir}/systemd/system/%{groupname}.wants/* ; do |
227 |
if [ ! -f "$service" ] ; then continue ; fi # in case nothing matches |
if [ ! -f "$service" ] ; then continue ; fi # in case nothing matches |
228 |
inst=`echo $service | sed -e 's,%{_sysconfdir}/systemd/system/%{groupname}.wants/,,'` |
inst=`echo $service | sed -e 's,%{_sysconfdir}/systemd/system/%{groupname}.wants/,,'` |
229 |
echo found instance $inst - getting status > $output 2>&1 || : |
echo found instance $inst - getting status >> $output 2>&1 || : |
230 |
if %{_bindir}/systemctl -q is-active $inst ; then |
if %{_bindir}/systemctl -q is-active $inst ; then |
231 |
echo instance $inst is running > $output 2>&1 || : |
echo instance $inst is running >> $output 2>&1 || : |
232 |
instances="$instances $inst" |
instances="$instances $inst" |
233 |
else |
else |
234 |
echo instance $inst is not running > $output 2>&1 || : |
echo instance $inst is not running >> $output 2>&1 || : |
235 |
fi |
fi |
236 |
ninst=`expr $ninst + 1` |
ninst=`expr $ninst + 1` |
237 |
done |
done |
238 |
if [ $ninst -eq 0 ] ; then |
if [ $ninst -eq 0 ] ; then |
239 |
echo no instances to upgrade > $output 2>&1 || : |
echo no instances to upgrade >> $output 2>&1 || : |
240 |
exit 0 # have no instances to upgrade - just skip the rest |
exit 0 # have no instances to upgrade - just skip the rest |
241 |
fi |
fi |
242 |
# shutdown all instances |
# shutdown all instances |
243 |
echo shutting down all instances . . . > $output 2>&1 || : |
echo shutting down all instances . . . >> $output 2>&1 || : |
244 |
%{_bindir}/systemctl stop %{groupname} > $output 2>&1 || : |
for inst in $instances ; do |
245 |
echo remove pid files . . . > $output 2>&1 || : |
echo stopping instance $inst >> $output 2>&1 || : |
246 |
|
/bin/systemctl stop $inst >> $output 2>&1 || : |
247 |
|
done |
248 |
|
echo remove pid files . . . >> $output 2>&1 || : |
249 |
%{_bindir}/rm -f /var/run/%{pkgname}*.pid /var/run/%{pkgname}*.startpid |
%{_bindir}/rm -f /var/run/%{pkgname}*.pid /var/run/%{pkgname}*.startpid |
250 |
|
|
251 |
|
|
252 |
# do the upgrade |
# do the upgrade |
253 |
echo upgrading instances . . . > $output 2>&1 || : |
echo upgrading instances . . . >> $output 2>&1 || : |
254 |
%{_sbindir}/setup-ds.pl -l $output -u -s General.UpdateMode=offline > $output 2>&1 || : |
DEBUGPOSTSETUPOPT=`/usr/bin/echo $DEBUGPOSTSETUP | /usr/bin/sed -e "s/[^d]//g"` |
255 |
|
if [ -n "$DEBUGPOSTSETUPOPT" ] ; then |
256 |
|
%{_sbindir}/setup-ds.pl -l $output -$DEBUGPOSTSETUPOPT -u -s General.UpdateMode=offline >> $output 2>&1 || : |
257 |
|
else |
258 |
|
%{_sbindir}/setup-ds.pl -l $output -u -s General.UpdateMode=offline >> $output 2>&1 || : |
259 |
|
fi |
260 |
|
|
261 |
# restart instances that require it |
# restart instances that require it |
262 |
for inst in $instances ; do |
for inst in $instances ; do |
263 |
echo restarting instance $inst > $output 2>&1 || : |
echo restarting instance $inst >> $output 2>&1 || : |
264 |
%{_bindir}/systemctl start $inst > $output 2>&1 || : |
%{_bindir}/systemctl start $inst >> $output 2>&1 || : |
265 |
done |
done |
266 |
|
|
267 |
%preun |
%preun |