af32fff
b767ad9
%global pkgname   dirsrv
0322ebf
%global srcname   389-ds-base
482fad4
0852ce9
# Exclude i686 bit arches
0852ce9
ExcludeArch: i686 
482fad4
fd7f020
# for a pre-release, define the prerel field e.g. .a1 .rc2 - comment out for official release
5fd2662
# also remove the space between % and global - this space is needed because
5fd2662
# fedpkg verrel stupidly ignores comment lines
Noriko Hosoi 196b017
#% global prerel .rc3
fd7f020
# also need the relprefix field for a pre-release e.g. .0 - also comment out for official release
Noriko Hosoi 196b017
#% global relprefix 0.
088940d
Noriko Hosoi d970bf2
# If perl-Socket-2.000 or newer is available, set 0 to use_Socket6.
Noriko Hosoi d970bf2
%global use_Socket6 0
58a8b17
09fb13d
%global use_asan 0
a7312c5
%global use_rust 0
c458a61
%global bundle_jemalloc 1
09fb13d
%if %{use_asan}
34cc859
%global bundle_jemalloc 0
58a8b17
%endif
c458a61
c458a61
%if %{bundle_jemalloc}
c458a61
%global jemalloc_name jemalloc
6f9c53b
%global jemalloc_ver 5.2.1
a108692
%global __provides_exclude ^libjemalloc\\.so.*$
09fb13d
%endif
af32fff
2c0caed
# Use Clang instead of GCC
2c0caed
%global use_clang 0
2c0caed
75facac
# Build cockpit plugin
75facac
%global use_cockpit 1
75facac
df3a6cc
# fedora 15 and later uses tmpfiles.d
df3a6cc
# otherwise, comment this out
df3a6cc
%{!?with_tmpfiles_d: %global with_tmpfiles_d %{_sysconfdir}/tmpfiles.d}
df3a6cc
96d52cc
# systemd support
96d52cc
%global groupname %{pkgname}.target
96d52cc
f5b17ab
# set PIE flag
f5b17ab
%global _hardened_build 1
f5b17ab
af32fff
Summary:          389 Directory Server (base)
af32fff
Name:             389-ds-base
ded5ac3
Version:          2.0.1
aa29d08
Release:          %{?relprefix}1%{?prerel}%{?dist}
Noriko Hosoi dc711d1
License:          GPLv3+
a1ed3b7
URL:              https://www.port389.org
Nathan Kinder a2c95ac
Conflicts:        selinux-policy-base < 3.9.8
Noriko Hosoi 29e8ae0
Conflicts:        freeipa-server < 4.0.3
c458a61
Obsoletes:        %{name} <= 1.4.0.9
1aab708
Obsoletes:        %{name}-legacy-tools < 1.4.4.6
1aab708
Obsoletes:        %{name}-legacy-tools-debuginfo < 1.4.4.6
0322ebf
Provides:         ldif2ldbm >= 0
af32fff
af32fff
BuildRequires:    nspr-devel
a7312c5
BuildRequires:    nss-devel >= 3.34
a0ed453
BuildRequires:    openldap-devel
Noriko Hosoi 61d1908
BuildRequires:    libdb-devel
af32fff
BuildRequires:    cyrus-sasl-devel
af32fff
BuildRequires:    icu
af32fff
BuildRequires:    libicu-devel
9d46490
BuildRequires:    pcre-devel
a108692
BuildRequires:    cracklib-devel
2c0caed
%if %{use_clang}
482fad4
BuildRequires:    libatomic
2c0caed
BuildRequires:    clang
2c0caed
%else
a7312c5
BuildRequires:    gcc
Noriko Hosoi d970bf2
BuildRequires:    gcc-c++
2c0caed
%endif
af32fff
# The following are needed to build the snmp ldap-agent
af32fff
BuildRequires:    net-snmp-devel
af32fff
BuildRequires:    lm_sensors-devel
af32fff
BuildRequires:    bzip2-devel
af32fff
BuildRequires:    zlib-devel
af32fff
BuildRequires:    openssl-devel
af32fff
# the following is for the pam passthru auth plug-in
af32fff
BuildRequires:    pam-devel
96d52cc
BuildRequires:    systemd-units
Noriko Hosoi 16ea67f
BuildRequires:    systemd-devel
a7312c5
%if %{use_asan}
a7312c5
BuildRequires:    libasan
a7312c5
%endif
a7312c5
# If rust is enabled
a7312c5
%if %{use_rust}
a7312c5
BuildRequires: cargo
a7312c5
BuildRequires: rust
a7312c5
%endif
a880a76
BuildRequires:    pkgconfig
a880a76
BuildRequires:    pkgconfig(systemd)
c086e06
BuildRequires:    pkgconfig(krb5)
a880a76
ac1f6b4
# Needed to support regeneration of the autotool artifacts.
ac1f6b4
BuildRequires:    autoconf
ac1f6b4
BuildRequires:    automake
ac1f6b4
BuildRequires:    libtool
0322ebf
# For our documentation
0322ebf
BuildRequires:    doxygen
0322ebf
# For tests!
0322ebf
BuildRequires:    libcmocka-devel
0322ebf
BuildRequires:    libevent-devel
e77ad85
# For lib389 and related components
4e7c5c2
BuildRequires:    python%{python3_pkgversion}-devel
4e7c5c2
BuildRequires:    python%{python3_pkgversion}-setuptools
e77ad85
BuildRequires:    python%{python3_pkgversion}-ldap
e77ad85
BuildRequires:    python%{python3_pkgversion}-six
e77ad85
BuildRequires:    python%{python3_pkgversion}-pyasn1
e77ad85
BuildRequires:    python%{python3_pkgversion}-pyasn1-modules
e77ad85
BuildRequires:    python%{python3_pkgversion}-dateutil
e77ad85
BuildRequires:    python%{python3_pkgversion}-argcomplete
e77ad85
BuildRequires:    python%{python3_pkgversion}-argparse-manpage
a85ad4c
BuildRequires:    python%{python3_pkgversion}-libselinux
a85ad4c
BuildRequires:    python%{python3_pkgversion}-policycoreutils
e77ad85
c458a61
# For cockpit
75facac
%if %{use_cockpit}
c458a61
BuildRequires:    rsync
75facac
%endif
0322ebf
38eed59
Requires:         %{name}-libs = %{version}-%{release}
38eed59
Requires:         python%{python3_pkgversion}-lib389 = %{version}-%{release}
38eed59
83e7c49
# this is needed for using semanage from our setup scripts
cd23285
Requires:         policycoreutils-python-utils
Noriko Hosoi 2db9b3e
Requires:         /usr/sbin/semanage
7a4f749
Requires:         libsemanage-python%{python3_pkgversion}
83e7c49
c458a61
Requires:         selinux-policy >= 3.14.1-29
839f3f3
af32fff
# the following are needed for some of our scripts
a0ed453
Requires:         openldap-clients
5b3e513
Requires:         /usr/bin/c_rehash
7a4f749
Requires:         python%{python3_pkgversion}-ldap
17bfc6a
af32fff
# this is needed to setup SSL if you are not using the
af32fff
# administration server package
af32fff
Requires:         nss-tools
e77ad85
Requires:         nss >= 3.34
af32fff
af32fff
# these are not found by the auto-dependency method
af32fff
# they are required to support the mandatory LDAP SASL mechs
af32fff
Requires:         cyrus-sasl-gssapi
af32fff
Requires:         cyrus-sasl-md5
0118736
Requires:         cyrus-sasl-plain
af32fff
af32fff
# this is needed for verify-db.pl
Noriko Hosoi 61d1908
Requires:         libdb-utils
af32fff
c086e06
# Needed for password dictionary checks
c086e06
Requires:         cracklib-dicts
c086e06
c458a61
# Needed by logconv.pl
c458a61
Requires:         perl-DB_File
c458a61
Requires:         perl-Archive-Tar
af32fff
c458a61
# Picks up our systemd deps.
c458a61
%{?systemd_requires}
Noriko Hosoi 12a64b8
Noriko Hosoi 36aef54
Obsoletes:        %{name} <= 1.3.5.4
a7312c5
7028097
Source0:          https://releases.pagure.org/389-ds-base/%{name}-%{version}%{?prerel}.tar.bz2
af32fff
# 389-ds-git.sh should be used to generate the source tarball from git
af32fff
Source1:          %{name}-git.sh
af32fff
Source2:          %{name}-devel.README
c458a61
%if %{bundle_jemalloc}
c458a61
Source3:          https://github.com/jemalloc/%{jemalloc_name}/releases/download/%{jemalloc_ver}/%{jemalloc_name}-%{jemalloc_ver}.tar.bz2
c458a61
%endif
af32fff
af32fff
%description
af32fff
389 Directory Server is an LDAPv3 compliant server.  The base package includes
af32fff
the LDAP server and command line utilities for server administration.
a7312c5
%if %{use_asan}
a7312c5
WARNING! This build is linked to Address Sanitisation libraries. This probably
a7312c5
isn't what you want. Please contact support immediately.
a7312c5
Please see http://seclists.org/oss-sec/2016/q1/363 for more information.
a7312c5
%endif
af32fff
5142ec0
%package          libs
5142ec0
Summary:          Core libraries for 389 Directory Server
5142ec0
BuildRequires:    nspr-devel
482fad4
BuildRequires:    nss-devel >= 3.34
5142ec0
BuildRequires:    openldap-devel
Noriko Hosoi 61d1908
BuildRequires:    libdb-devel
5142ec0
BuildRequires:    cyrus-sasl-devel
5142ec0
BuildRequires:    libicu-devel
5142ec0
BuildRequires:    pcre-devel
Noriko Hosoi d02e06a
BuildRequires:    libtalloc-devel
Noriko Hosoi d02e06a
BuildRequires:    libevent-devel
Noriko Hosoi d02e06a
BuildRequires:    libtevent-devel
c458a61
Requires:         krb5-libs
0322ebf
Requires:         libevent
Noriko Hosoi 16ea67f
BuildRequires:    systemd-devel
e0d848b
BuildRequires: make
a880a76
Provides:         svrcore = 4.1.4
a880a76
Conflicts:        svrcore
a880a76
Obsoletes:        svrcore <= 4.1.3
5142ec0
5142ec0
%description      libs
5142ec0
Core libraries for the 389 Directory Server base package.  These libraries
5142ec0
are used by the main package and the -devel package.  This allows the -devel
5142ec0
package to be installed with just the -libs package and without the main package.
5142ec0
af32fff
%package          devel
af32fff
Summary:          Development libraries for 389 Directory Server
5142ec0
Requires:         %{name}-libs = %{version}-%{release}
Nathan Kinder 50e6b48
Requires:         pkgconfig
5142ec0
Requires:         nspr-devel
a7312c5
Requires:         nss-devel >= 3.34
a0ed453
Requires:         openldap-devel
Noriko Hosoi d02e06a
Requires:         libtalloc
Noriko Hosoi d02e06a
Requires:         libevent
Noriko Hosoi d02e06a
Requires:         libtevent
Noriko Hosoi 16ea67f
Requires:         systemd-libs
94780b6
Provides:         svrcore-devel = 4.1.4
94780b6
Conflicts:        svrcore-devel
94780b6
Obsoletes:        svrcore-devel <= 4.1.3
af32fff
af32fff
%description      devel
af32fff
Development Libraries and headers for the 389 Directory Server base package.
af32fff
Noriko Hosoi d10e9af
%package          snmp
Noriko Hosoi d10e9af
Summary:          SNMP Agent for 389 Directory Server
Noriko Hosoi d10e9af
Requires:         %{name} = %{version}-%{release}
Noriko Hosoi d10e9af
f536eab
Obsoletes:        %{name} <= 1.4.0.0
Noriko Hosoi d10e9af
Noriko Hosoi 36aef54
%description      snmp
Noriko Hosoi 36aef54
SNMP Agent for the 389 Directory Server base package.
Noriko Hosoi 36aef54
09fb13d
%package -n python%{python3_pkgversion}-lib389
09fb13d
Summary:  A library for accessing, testing, and configuring the 389 Directory Server
09fb13d
BuildArch:        noarch
09fb13d
Requires: openssl
09fb13d
Requires: iproute
a253fc7
Recommends: bash-completion
762e206
Requires: python%{python3_pkgversion}
903ed99
Requires: python%{python3_pkgversion}-distro
09fb13d
Requires: python%{python3_pkgversion}-pytest
d2303c9
Requires: python%{python3_pkgversion}-ldap
09fb13d
Requires: python%{python3_pkgversion}-six
09fb13d
Requires: python%{python3_pkgversion}-pyasn1
09fb13d
Requires: python%{python3_pkgversion}-pyasn1-modules
09fb13d
Requires: python%{python3_pkgversion}-dateutil
e77ad85
Requires: python%{python3_pkgversion}-argcomplete
a85ad4c
Requires: python%{python3_pkgversion}-libselinux
7d09a11
Requires: python%{python3_pkgversion}-setuptools
09fb13d
%{?python_provide:%python_provide python%{python3_pkgversion}-lib389}
e77ad85
09fb13d
%description -n python%{python3_pkgversion}-lib389
09fb13d
This module contains tools and libraries for accessing, testing,
09fb13d
 and configuring the 389 Directory Server.
09fb13d
75facac
%if %{use_cockpit}
c458a61
%package -n cockpit-389-ds
c458a61
Summary:          Cockpit UI Plugin for configuring and administering the 389 Directory Server
c458a61
BuildArch:        noarch
a0a8d33
Requires:         cockpit
a0a8d33
Requires:         389-ds-base
c458a61
Requires:         python%{python3_pkgversion}
c458a61
Requires:         python%{python3_pkgversion}-lib389
c458a61
c458a61
%description -n cockpit-389-ds
c458a61
A cockpit UI Plugin for configuring and administering the 389 Directory Server
75facac
%endif
c458a61
af32fff
%prep
b767ad9
%setup -q -n %{name}-%{version}%{?prerel}
c458a61
c458a61
%if %{bundle_jemalloc}
c458a61
%setup -q -n %{name}-%{version}%{?prerel} -T -D -b 3
c458a61
%endif
c458a61
af32fff
cp %{SOURCE2} README.devel
af32fff
af32fff
%build
Noriko Hosoi d02e06a
a0ed453
OPENLDAP_FLAG="--with-openldap"
df3a6cc
%{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"}
9a4ab77
# hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529
a880a76
NSSARGS="--with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss3"
3ca61b7
09fb13d
%if %{use_asan}
09fb13d
ASAN_FLAGS="--enable-asan --enable-debug"
09fb13d
%endif
09fb13d
a7312c5
%if %{use_rust}
a7312c5
RUST_FLAGS="--enable-rust"
a7312c5
%endif
a7312c5
75facac
%if !%{use_cockpit}
75facac
COCKPIT_FLAGS="--disable-cockpit"
75facac
%endif 
75facac
482fad4
%if %{use_clang}
482fad4
export CC=clang
482fad4
export CXX=clang++
482fad4
CLANG_FLAGS="--enable-clang"
482fad4
%endif
482fad4
c458a61
%if %{bundle_jemalloc}
bfdd824
# Override page size, bz #1545539
bfdd824
# 4K
bfdd824
%ifarch %ix86 %arm x86_64 s390x
bfdd824
%define lg_page --with-lg-page=12
bfdd824
%endif
bfdd824
bfdd824
# 64K
bfdd824
%ifarch ppc64 ppc64le aarch64
bfdd824
%define lg_page --with-lg-page=16
bfdd824
%endif
bfdd824
bfdd824
# Override huge page size on aarch64
bfdd824
# 2M instead of 512M
bfdd824
%ifarch aarch64
bfdd824
%define lg_hugepage --with-lg-hugepage=21
bfdd824
%endif
bfdd824
c458a61
# Build jemalloc
c458a61
pushd ../%{jemalloc_name}-%{jemalloc_ver}
c458a61
%configure \
c458a61
        --libdir=%{_libdir}/%{pkgname}/lib \
bfdd824
        --bindir=%{_libdir}/%{pkgname}/bin \
bfdd824
        --enable-prof
bfdd824
make %{?_smp_mflags}
c458a61
popd
c458a61
%endif
c458a61
a880a76
# Enforce strict linking
a880a76
%define _strict_symbol_defs_build 1
a880a76
ac1f6b4
# Rebuild the autotool artifacts now.
ac1f6b4
autoreconf -fiv
ac1f6b4
c086e06
%configure --enable-autobind --with-selinux $TMPFILES_FLAG \
c458a61
           --with-systemd \
96d52cc
           --with-systemdsystemunitdir=%{_unitdir} \
96d52cc
           --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \
c458a61
           --with-systemdgroupname=%{groupname}  \
c458a61
           --libexecdir=%{_libexecdir}/%{pkgname} \
1aab708
           $NSSARGS $ASAN_FLAGS $RUST_FLAGS $CLANG_FLAGS $COCKPIT_FLAGS \
9a0edfc
           --enable-cmocka \
9a0edfc
           --enable-perl
9a0edfc
af32fff
09fb13d
# lib389
09fb13d
pushd ./src/lib389
0322ebf
%py3_build
09fb13d
popd
a108692
# argparse-manpage dynamic man pages have hardcoded man v1 in header,
a108692
# need to change it to v8
a108692
sed -i  "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsconf.8
a108692
sed -i  "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsctl.8
a108692
sed -i  "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dsidm.8
a108692
sed -i  "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}%{?prerel}/src/lib389/man/dscreate.8
09fb13d
09fb13d
# Generate symbolic info for debuggers
09fb13d
export XCFLAGS=$RPM_OPT_FLAGS
09fb13d
a880a76
#make %{?_smp_mflags}
a880a76
make
088940d
af32fff
%install
Noriko Hosoi d02e06a
ca673ec
mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_sbindir}
75facac
%if %{use_cockpit}
c458a61
mkdir -p %{buildroot}%{_datadir}/cockpit
75facac
%endif
c458a61
make DESTDIR="$RPM_BUILD_ROOT" install
c458a61
75facac
%if %{use_cockpit}
c458a61
find %{buildroot}%{_datadir}/cockpit/389-console -type d | sed -e "s@%{buildroot}@@" | sed -e 's/^/\%dir /' > cockpit.list
c458a61
find %{buildroot}%{_datadir}/cockpit/389-console -type f | sed -e "s@%{buildroot}@@" >> cockpit.list
75facac
%endif
af32fff
0322ebf
# Copy in our docs from doxygen.
0322ebf
cp -r %{_builddir}/%{name}-%{version}%{?prerel}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3
0322ebf
09fb13d
# lib389
09fb13d
pushd src/lib389
09fb13d
%py3_install
09fb13d
popd
09fb13d
af32fff
mkdir -p $RPM_BUILD_ROOT/var/log/%{pkgname}
af32fff
mkdir -p $RPM_BUILD_ROOT/var/lib/%{pkgname}
af32fff
mkdir -p $RPM_BUILD_ROOT/var/lock/%{pkgname}
af32fff
96d52cc
# for systemd
96d52cc
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/%{groupname}.wants
96d52cc
1aab708
# remove libtool archives and static libs
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.a
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.la
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.a
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.la
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.a
1aab708
rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.la
a7312c5
c458a61
%if %{bundle_jemalloc}
c458a61
pushd ../%{jemalloc_name}-%{jemalloc_ver}
c458a61
make DESTDIR="$RPM_BUILD_ROOT" install_lib install_bin
c458a61
cp -pa COPYING ../%{name}-%{version}%{?prerel}/COPYING.jemalloc
c458a61
cp -pa README ../%{name}-%{version}%{?prerel}/README.jemalloc
c458a61
popd
c458a61
%endif
c458a61
c458a61
%check
a7312c5
# This checks the code, if it fails it prints why, then re-raises the fail to shortcircuit the rpm build.
c458a61
if ! make DESTDIR="$RPM_BUILD_ROOT" check; then cat ./test-suite.log && false; fi
c458a61
31909e6
%post
c458a61
if [ -n "$DEBUGPOSTTRANS" ] ; then
c458a61
    output=$DEBUGPOSTTRANS
c458a61
    output2=${DEBUGPOSTTRANS}.upgrade
c458a61
else
c458a61
    output=/dev/null
c458a61
    output2=/dev/null
c458a61
fi
5e3fefb
# reload to pick up any changes to systemd files
77ca004
/bin/systemctl daemon-reload >$output 2>&1 || :
Noriko Hosoi dc711d1
7317215
# https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Soft_static_allocation
7317215
# Soft static allocation for UID and GID
7317215
USERNAME="dirsrv"
7317215
ALLOCATED_UID=389
7317215
GROUPNAME="dirsrv"
7317215
ALLOCATED_GID=389
7317215
HOMEDIR="/usr/share/dirsrv"
7317215
7317215
getent group $GROUPNAME >/dev/null || /usr/sbin/groupadd -f -g $ALLOCATED_GID -r $GROUPNAME
7317215
if ! getent passwd $USERNAME >/dev/null ; then
7317215
    if ! getent passwd $ALLOCATED_UID >/dev/null ; then
7317215
      /usr/sbin/useradd -r -u $ALLOCATED_UID -g $GROUPNAME -d $HOMEDIR -s /sbin/nologin -c "user for 389-ds-base" $USERNAME
7317215
    else
7317215
      /usr/sbin/useradd -r -g $GROUPNAME -d $HOMEDIR -s /sbin/nologin -c "user for 389-ds-base" $USERNAME
7317215
    fi
Noriko Hosoi dc711d1
fi
Noriko Hosoi dc711d1
a7312c5
# Reload our sysctl before we restart (if we can)
a7312c5
sysctl --system &> $output; true
a7312c5
1aab708
# Gather the running instances so we can restart them
fde90d9
instbase="%{_sysconfdir}/%{pkgname}"
1aab708
ninst=0
fde90d9
for dir in $instbase/slapd-* ; do
fde90d9
    echo dir = $dir >> $output 2>&1 || :
fde90d9
    if [ ! -d "$dir" ] ; then continue ; fi
fde90d9
    case "$dir" in *.removed) continue ;; esac
fde90d9
    basename=`basename $dir`
fde90d9
    inst="%{pkgname}@`echo $basename | sed -e 's/slapd-//g'`"
fde90d9
    echo found instance $inst - getting status  >> $output 2>&1 || :
96d52cc
    if /bin/systemctl -q is-active $inst ; then
Noriko Hosoi 392f7da
       echo instance $inst is running >> $output 2>&1 || :
31909e6
       instances="$instances $inst"
31909e6
    else
Noriko Hosoi 392f7da
       echo instance $inst is not running >> $output 2>&1 || :
31909e6
    fi
31909e6
    ninst=`expr $ninst + 1`
31909e6
done
31909e6
if [ $ninst -eq 0 ] ; then
Noriko Hosoi 392f7da
    echo no instances to upgrade >> $output 2>&1 || :
31909e6
    exit 0 # have no instances to upgrade - just skip the rest
Noriko Hosoi 392f7da
else
1aab708
    # restart running instances
1aab708
    echo shutting down all instances . . . >> $output 2>&1 || :
1aab708
    for inst in $instances ; do
1aab708
        echo stopping instance $inst >> $output 2>&1 || :
1aab708
        /bin/systemctl stop $inst >> $output 2>&1 || :
1aab708
    done
1aab708
    for inst in $instances ; do
1aab708
        echo starting instance $inst >> $output 2>&1 || :
1aab708
        /bin/systemctl start $inst >> $output 2>&1 || :
1aab708
    done
Noriko Hosoi 392f7da
fi
Noriko Hosoi 392f7da
a7312c5
1aab708
%preun
1aab708
if [ $1 -eq 0 ]; then # Final removal
1aab708
    # remove instance specific service files/links
1aab708
    rm -rf %{_sysconfdir}/systemd/system/%{groupname}.wants/* > /dev/null 2>&1 || :
1aab708
fi
256eebf
1aab708
%postun
1aab708
if [ $1 = 0 ]; then # Final removal
1aab708
    rm -rf /var/run/%{pkgname}
1aab708
fi
1aab708
1aab708
%post snmp
1aab708
%systemd_post %{pkgname}-snmp.service
1aab708
1aab708
%preun snmp
1aab708
%systemd_preun %{pkgname}-snmp.service %{groupname}
1aab708
1aab708
%postun snmp
1aab708
%systemd_postun_with_restart %{pkgname}-snmp.service
1aab708
1aab708
exit 0
Noriko Hosoi d10e9af
af32fff
%files
c458a61
%if %{bundle_jemalloc}
e77ad85
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.jemalloc
e77ad85
%license COPYING.jemalloc
c458a61
%else
Noriko Hosoi d02e06a
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl
c458a61
%endif
af32fff
%dir %{_sysconfdir}/%{pkgname}
af32fff
%dir %{_sysconfdir}/%{pkgname}/schema
af32fff
%config(noreplace)%{_sysconfdir}/%{pkgname}/schema/*.ldif
af32fff
%dir %{_sysconfdir}/%{pkgname}/config
96d52cc
%dir %{_sysconfdir}/systemd/system/%{groupname}.wants
af32fff
%config(noreplace)%{_sysconfdir}/%{pkgname}/config/slapd-collations.conf
af32fff
%config(noreplace)%{_sysconfdir}/%{pkgname}/config/certmap.conf
af32fff
%{_datadir}/%{pkgname}
ca673ec
%{_datadir}/gdb/auto-load/*
96d52cc
%{_unitdir}
c458a61
%{_bindir}/dbscan
c458a61
%{_mandir}/man1/dbscan.1.gz
c458a61
%{_bindir}/ds-replcheck
c458a61
%{_mandir}/man1/ds-replcheck.1.gz
c458a61
%{_bindir}/ds-logpipe.py
c458a61
%{_mandir}/man1/ds-logpipe.py.1.gz
c458a61
%{_bindir}/ldclt
c458a61
%{_mandir}/man1/ldclt.1.gz
c458a61
%{_bindir}/logconv.pl
c458a61
%{_mandir}/man1/logconv.pl.1.gz
c458a61
%{_bindir}/pwdhash
c458a61
%{_mandir}/man1/pwdhash.1.gz
a85ad4c
#%caps(CAP_NET_BIND_SERVICE=pe) {_sbindir}/ns-slapd
a85ad4c
%{_sbindir}/ns-slapd
79a8179
%{_mandir}/man8/ns-slapd.8.gz
1aab708
%{_sbindir}/openldap_to_ds
1aab708
%{_mandir}/man8/openldap_to_ds.8.gz
c458a61
%{_libexecdir}/%{pkgname}/ds_systemd_ask_password_acl
e77ad85
%{_mandir}/man5/99user.ldif.5.gz
e77ad85
%{_mandir}/man5/certmap.conf.5.gz
e77ad85
%{_mandir}/man5/slapd-collations.conf.5.gz
e77ad85
%{_mandir}/man5/dirsrv.5.gz
e77ad85
%{_mandir}/man5/dirsrv.systemd.5.gz
Noriko Hosoi 66d6780
%{_libdir}/%{pkgname}/python
af32fff
%dir %{_libdir}/%{pkgname}/plugins
af32fff
%{_libdir}/%{pkgname}/plugins/*.so
c458a61
# This has to be hardcoded to /lib - $libdir changes between lib/lib64, but
c458a61
# sysctl.d is always in /lib.
c458a61
%{_prefix}/lib/sysctl.d/*
af32fff
%dir %{_localstatedir}/lib/%{pkgname}
af32fff
%dir %{_localstatedir}/log/%{pkgname}
09ca048
%ghost %dir %{_localstatedir}/lock/%{pkgname}
Noriko Hosoi d10e9af
%exclude %{_sbindir}/ldap-agent*
Noriko Hosoi d10e9af
%exclude %{_mandir}/man1/ldap-agent.1.gz
a7312c5
%exclude %{_unitdir}/%{pkgname}-snmp.service
c458a61
%if %{bundle_jemalloc}
c458a61
%{_libdir}/%{pkgname}/lib/
c458a61
%{_libdir}/%{pkgname}/bin/
d2303c9
%exclude %{_libdir}/%{pkgname}/bin/jemalloc-config
d2303c9
%exclude %{_libdir}/%{pkgname}/bin/jemalloc.sh
d2303c9
%exclude %{_libdir}/%{pkgname}/lib/libjemalloc.a
d2303c9
%exclude %{_libdir}/%{pkgname}/lib/libjemalloc.so
d2303c9
%exclude %{_libdir}/%{pkgname}/lib/libjemalloc_pic.a
868bfa1
%exclude %{_libdir}/%{pkgname}/lib/pkgconfig
c458a61
%endif
af32fff
af32fff
%files devel
Noriko Hosoi d02e06a
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.devel
a7312c5
%{_mandir}/man3/*
a880a76
%{_includedir}/svrcore.h
af32fff
%{_includedir}/%{pkgname}
a880a76
%{_libdir}/libsvrcore.so
5142ec0
%{_libdir}/%{pkgname}/libslapd.so
Noriko Hosoi d10e9af
%{_libdir}/%{pkgname}/libns-dshttpd.so
0322ebf
%{_libdir}/%{pkgname}/libsds.so
ca673ec
%{_libdir}/%{pkgname}/libldaputil.so
a880a76
%{_libdir}/pkgconfig/svrcore.pc
a880a76
%{_libdir}/pkgconfig/dirsrv.pc
a880a76
%{_libdir}/pkgconfig/libsds.pc
af32fff
5142ec0
%files libs
Noriko Hosoi d02e06a
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.devel
5142ec0
%dir %{_libdir}/%{pkgname}
a880a76
%{_libdir}/libsvrcore.so.*
5142ec0
%{_libdir}/%{pkgname}/libslapd.so.*
0322ebf
%{_libdir}/%{pkgname}/libns-dshttpd-*.so
0322ebf
%{_libdir}/%{pkgname}/libsds.so.*
ca673ec
%{_libdir}/%{pkgname}/libldaputil.so.*
bfdd824
%{_libdir}/%{pkgname}/librewriters.so*
c458a61
%if %{bundle_jemalloc}
868bfa1
%{_libdir}/%{pkgname}/lib/libjemalloc.so.2
c458a61
%endif
a7312c5
%if %{use_rust}
a7312c5
%{_libdir}/%{pkgname}/librsds.so
a7312c5
%endif
5142ec0
Noriko Hosoi d10e9af
%files snmp
Noriko Hosoi d10e9af
%doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.devel
Noriko Hosoi d10e9af
%config(noreplace)%{_sysconfdir}/%{pkgname}/config/ldap-agent.conf
Noriko Hosoi d10e9af
%{_sbindir}/ldap-agent*
Noriko Hosoi d10e9af
%{_mandir}/man1/ldap-agent.1.gz
ca673ec
%{_unitdir}/%{pkgname}-snmp.service
Noriko Hosoi d10e9af
09fb13d
%files -n python%{python3_pkgversion}-lib389
09fb13d
%doc LICENSE LICENSE.GPLv3+
09fb13d
%{python3_sitelib}/lib389*
e77ad85
%{_sbindir}/dsconf
e77ad85
%{_mandir}/man8/dsconf.8.gz
e77ad85
%{_sbindir}/dscreate
e77ad85
%{_mandir}/man8/dscreate.8.gz
e77ad85
%{_sbindir}/dsctl
e77ad85
%{_mandir}/man8/dsctl.8.gz
e77ad85
%{_sbindir}/dsidm
e77ad85
%{_mandir}/man8/dsidm.8.gz
00c5c5c
%{_libexecdir}/%{pkgname}/dscontainer
09fb13d
75facac
%if %{use_cockpit}
c458a61
%files -n cockpit-389-ds -f cockpit.list
c086e06
%{_datarootdir}/metainfo/389-console/org.port389.cockpit_console.metainfo.xml
c458a61
%doc README.md
75facac
%endif
c458a61
af32fff
%changelog
ded5ac3
* Thu Oct 29 2020 Mark Reynolds <mreynolds@redhat.com> - 2.0.1-1
ded5ac3
- Bump version to 2.0.1
ded5ac3
- Issue 4420 - change NVR to use X.X.X instead of X.X.X.X
ded5ac3
- Issue 4391 - DSE config modify does not call be_postop (#4394)
ded5ac3
- Issue 4218 - Verify the new wtime and optime access log keywords (#4397)
ded5ac3
- Issue 4176 - CL trimming causes high CPU
ded5ac3
- Issue 2058 - Add keep alive entry after on-line initialization - second version (#4399)
ded5ac3
- Issue 4403 - RFE - OpenLDAP pw hash migration tests (#4408)
ded5ac3
aa29d08
* Wed Oct 28 2020 Mark Reynolds <mreynolds@redhat.com> - 1.4.5.0-1
aa29d08
- Bump version to 1.4.5.0
aa29d08
- Issue 4262 - more perl removal cleanup
aa29d08
- Issue 2526 - retrocl backend created out of order
6c4e197
1aab708
* Mon Oct 26 2020 Mark Reynolds <mreynolds@redhat.com> - 1.4.4.6-1
1aab708
- Bump version to 1.4.4.6
1aab708
- Issue 4262 - Remove legacy tools subpackage (final cleanup)
1aab708
- Issue 4262 - Remove legacy tools subpackage (restart instances after rpm install)
1aab708
- Issue 4262 - Remove legacy tools subpackage
1aab708
- Issue 2526 - revert API change in slapi_be_getsuffix()
1aab708
- Issue 4363 - Sync repl: per thread structure was incorrectly initialized (#4395)
1aab708
- Issue 4392 - Update create_test.py
1aab708
- Issue 2820 - Fix CI tests (#4365)
1aab708
- Issue 2526 - suffix management in backends incorrect
1aab708
- Issue 4389 - errors log with incorrectly formatted message parent_update_on_childchange
1aab708
- Issue 4295 - Fix a closing quote issue (#4386)
1aab708
- Issue 1199 - Misleading message in access log for idle timeout (#4385)
1aab708
- Issue 3600 - RFE - openldap migration tooling (#4318)
1aab708
- Issue 4176 - import ldif2cl task should not close all changelogs
1aab708
- Issue 4159 - Healthcheck code DSBLE0002 not returned on disabled suffix
1aab708
- Issue 4379 - allow more than 1 empty AttributeDescription for ldapsearch, without the risk of denial of service (#4380)
1aab708
- Issue 4329 - Sync repl - if a serie of updates target the same entry then the cookie get wrong changenumber (#4356)
1aab708
- Issue 3555 - Fix npm audit issues (#4370)
1aab708
- Issue 4372 - BUG - Chaining DB did not validate bind mech parameters (#4374)
1aab708
- Issue 4334 - RFE - Task timeout may cause larger dataset imports to fail (#4359)
1aab708
- Issue 4361 - RFE - add - dscreate --advanced flag to avoid user confusion
1aab708
- Issue 4368 - ds-replcheck crashes when processing glue entries
1aab708
- Issue 4366 - lib389 - Fix account status inactivity checks
1aab708
- Issue 4265 - UI - Make the secondary plugins read-only (#4364)
1aab708
- Issue 4360 - password policy max sequence sets is not working as expected
1aab708
- Issue 4348 - Add tests for dsidm
1aab708
- Issue 4350 - One line, fix invalid type error in tls_cacertdir check (#4358)
1aab708