From 8dfbbc21d054a9e204d35376f764a13ea3df0ac0 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Fri, 31 May 2024 21:32:51 +0200 Subject: [PATCH] Resolves: RHEL-30640 - Remove libdb requirement from 389-ds-base --- .gitignore | 1 + 389-ds-base-devel.README | 6 +- 389-ds-base-git-local.sh | 23 -- 389-ds-base-git.sh | 16 -- 389-ds-base.spec | 370 ++++++++++++++++++++------------ concread-use-2018-edition.patch | 19 -- sources | 1 + 7 files changed, 243 insertions(+), 193 deletions(-) delete mode 100644 389-ds-base-git-local.sh delete mode 100644 389-ds-base-git.sh delete mode 100644 concread-use-2018-edition.patch diff --git a/.gitignore b/.gitignore index 32ac1a0..44f31c5 100644 --- a/.gitignore +++ b/.gitignore @@ -227,3 +227,4 @@ /389-ds-base-2.4.5.tar.bz2 /389-ds-base-3.0.1.tar.bz2 /389-ds-base-3.0.3.tar.bz2 +/libdb-5.3.28-59.tar.bz2 diff --git a/389-ds-base-devel.README b/389-ds-base-devel.README index 190c874..c411a61 100644 --- a/389-ds-base-devel.README +++ b/389-ds-base-devel.README @@ -1,4 +1,4 @@ -For detailed information on developing plugins for -389 Directory Server visit. +For detailed information on developing plugins for 389 Directory Server visit -http://port389/wiki/Plugins +https://www.port389.org/docs/389ds/design/plugins.html +https://github.com/389ds/389-ds-base/blob/main/src/slapi_r_plugin/README.md diff --git a/389-ds-base-git-local.sh b/389-ds-base-git-local.sh deleted file mode 100644 index bc809cb..0000000 --- a/389-ds-base-git-local.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -DATE=`date +%Y%m%d` -# use a real tag name here -VERSION=1.3.5.14 -PKGNAME=389-ds-base -TAG=${TAG:-$PKGNAME-$VERSION} -#SRCNAME=$PKGNAME-$VERSION-$DATE -SRCNAME=$PKGNAME-$VERSION - -test -d .git || { - echo you must be in the ds git repo to use this - echo bye - exit 1 -} - -if [ -z "$1" ] ; then - dir=. -else - dir="$1" -fi - -git archive --prefix=$SRCNAME/ $TAG | bzip2 > $dir/$SRCNAME.tar.bz2 diff --git a/389-ds-base-git.sh b/389-ds-base-git.sh deleted file mode 100644 index 0043901..0000000 --- a/389-ds-base-git.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -DATE=`date +%Y%m%d` -# use a real tag name here -VERSION=1.3.5.14 -PKGNAME=389-ds-base -TAG=${TAG:-$PKGNAME-$VERSION} -URL="https://git.fedorahosted.org/git/?p=389/ds.git;a=snapshot;h=$TAG;sf=tgz" -SRCNAME=$PKGNAME-$VERSION - -wget -O $SRCNAME.tar.gz "$URL" - -echo convert tgz format to tar.bz2 format - -gunzip $PKGNAME-$VERSION.tar.gz -bzip2 $PKGNAME-$VERSION.tar diff --git a/389-ds-base.spec b/389-ds-base.spec index dcdd3c2..e516257 100644 --- a/389-ds-base.spec +++ b/389-ds-base.spec @@ -1,30 +1,47 @@ - -%global pkgname dirsrv -%global srcname 389-ds-base +%global pkgname dirsrv # Exclude i686 bit arches -ExcludeArch: i686 +ExcludeArch: i686 -# If perl-Socket-2.000 or newer is available, set 0 to use_Socket6. -%global use_Socket6 0 - -%global use_asan 0 -%global bundle_jemalloc 1 -%if %{use_asan} -%global bundle_jemalloc 0 -%endif - -%if %{bundle_jemalloc} +%bcond bundle_jemalloc 1 +%if %{with bundle_jemalloc} %global jemalloc_name jemalloc %global jemalloc_ver 5.3.0 -%global __provides_exclude ^libjemalloc\\.so.*$ +%endif + +%bcond bundle_libdb 1 +%if %{with bundle_libdb} +%global libdb_version 5.3 +%global libdb_base_version db-%{libdb_version}.28 +%global libdb_full_version lib%{libdb_base_version}-59 +%global libdb_bundle_name libdb-%{libdb_version}-389ds.so +%endif + +# This is used in certain builds to help us know if it has extra features. +%global variant base +# This enables a sanitized build. +%bcond asan 0 +%bcond msan 0 +%bcond tsan 0 +%bcond ubsan 0 + +%if %{with asan} || %{with msan} || %{with tsan} || %{with ubsan} +%global variant base-xsan %endif # Use Clang instead of GCC -%global use_clang 0 +%bcond clang 0 +%if %{with msan} +%bcond clang 1 +%endif + +%if %{with clang} +%global toolchain clang +%global _missing_build_ids_terminate_build 0 +%endif # Build cockpit plugin -%global use_cockpit 1 +%bcond cockpit 0 # fedora 15 and later uses tmpfiles.d # otherwise, comment this out @@ -33,9 +50,6 @@ ExcludeArch: i686 # systemd support %global groupname %{pkgname}.target -# set PIE flag -%global _hardened_build 1 - # Filter argparse-manpage from autogenerated package Requires %global __requires_exclude ^python.*argparse-manpage @@ -43,15 +57,15 @@ ExcludeArch: i686 # See bz1986327 %define dirsrv_requires_ge() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") -Summary: 389 Directory Server (base) +Summary: 389 Directory Server (%{variant}) Name: 389-ds-base Version: 3.0.3 -Release: %autorelease +Release: %{autorelease -n %{?with_asan:-e asan}}%{?dist} License: GPL-3.0-or-later AND (0BSD OR Apache-2.0 OR MIT) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT) AND (CC-BY-4.0 AND MIT) AND (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND (MIT OR CC0-1.0) AND (MIT OR Unlicense) AND 0BSD AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MIT AND ISC AND MPL-2.0 AND PSF-2.0 -URL: https://www.port389.org Conflicts: selinux-policy-base < 3.9.8 Conflicts: freeipa-server < 4.0.3 Obsoletes: %{name} <= 1.4.4 +URL: https://www.port389.org/ Obsoletes: %{name}-legacy-tools < 1.4.4.6 Obsoletes: %{name}-legacy-tools-debuginfo < 1.4.4.6 Provides: ldif2ldbm >= 0 @@ -338,30 +352,43 @@ Provides: bundled(npm(wrappy)) = 1.0.2 Provides: bundled(npm(yocto-queue)) = 0.1.0 ##### Bundled cargo crates list - END ##### - -BuildRequires: nspr-devel >= 4.32 -BuildRequires: nss-devel >= 3.67.0-7 +# Attach the buildrequires to the top level package: +BuildRequires: nspr-devel +BuildRequires: nss-devel >= 3.34 +BuildRequires: openldap-clients BuildRequires: openldap-devel BuildRequires: lmdb-devel -BuildRequires: libdb-devel BuildRequires: cyrus-sasl-devel BuildRequires: icu BuildRequires: libicu-devel BuildRequires: pcre2-devel BuildRequires: cracklib-devel BuildRequires: json-c-devel -%if %{use_clang} +%if %{with clang} BuildRequires: libatomic BuildRequires: clang +BuildRequires: compiler-rt +BuildRequires: lld %else BuildRequires: gcc BuildRequires: gcc-c++ +%if %{with asan} +BuildRequires: libasan %endif +%if %{with tsan} +BuildRequires: libtsan +%endif +%if %{with ubsan} +BuildRequires: libubsan +%endif +%endif +%if %{without bundle_libdb} +BuildRequires: libdb-devel +%endif + # The following are needed to build the snmp ldap-agent BuildRequires: net-snmp-devel -BuildRequires: lm_sensors-devel BuildRequires: bzip2-devel -BuildRequires: zlib-devel BuildRequires: openssl-devel # the following is for the pam passthru auth plug-in BuildRequires: pam-devel @@ -369,16 +396,12 @@ BuildRequires: systemd-units BuildRequires: systemd-devel BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} -%if %{use_asan} -BuildRequires: libasan -%endif BuildRequires: cargo BuildRequires: rust BuildRequires: pkgconfig BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(libpcre2-8) - # Needed to support regeneration of the autotool artifacts. BuildRequires: autoconf BuildRequires: automake @@ -387,112 +410,119 @@ BuildRequires: libtool BuildRequires: doxygen # For tests! BuildRequires: libcmocka-devel -BuildRequires: libevent-devel -# For lib389 and related components +# For lib389 and related components. +BuildRequires: python%{python3_pkgversion} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-ldap -BuildRequires: python%{python3_pkgversion}-six BuildRequires: python%{python3_pkgversion}-pyasn1 BuildRequires: python%{python3_pkgversion}-pyasn1-modules BuildRequires: python%{python3_pkgversion}-dateutil BuildRequires: python%{python3_pkgversion}-argcomplete BuildRequires: python%{python3_pkgversion}-argparse-manpage -BuildRequires: python%{python3_pkgversion}-libselinux BuildRequires: python%{python3_pkgversion}-policycoreutils +BuildRequires: python%{python3_pkgversion}-libselinux BuildRequires: python%{python3_pkgversion}-cryptography # For cockpit -%if %{use_cockpit} +%if %{with cockpit} BuildRequires: rsync +BuildRequires: npm +BuildRequires: nodejs %endif Requires: %{name}-libs = %{version}-%{release} Requires: python%{python3_pkgversion}-lib389 = %{version}-%{release} -Requires: lmdb-libs # this is needed for using semanage from our setup scripts Requires: policycoreutils-python-utils -Requires: /usr/sbin/semanage Requires: libsemanage-python%{python3_pkgversion} -Requires: selinux-policy >= 3.14.1-29 - # the following are needed for some of our scripts Requires: openldap-clients -Requires: /usr/bin/c_rehash -Requires: python%{python3_pkgversion}-ldap Requires: acl -Requires: zlib -Requires: json-c - # this is needed to setup SSL if you are not using the # administration server package Requires: nss-tools -Requires: nss >= 3.67.0-7 -Requires: nspr >= 4.32 - +%dirsrv_requires_ge nss # these are not found by the auto-dependency method # they are required to support the mandatory LDAP SASL mechs Requires: cyrus-sasl-gssapi Requires: cyrus-sasl-md5 +# This is optionally supported by us, as we use it in our tests Requires: cyrus-sasl-plain - -# this is needed for verify-db.pl -Requires: libdb-utils - -# Needed for password dictionary checks -Requires: cracklib-dicts - +# this is needed for backldbm +%if %{without bundle_libdb} +Requires: libdb +%endif +Requires: lmdb +# This picks up libperl.so as a Requires, so we add this versioned one +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) # Needed by logconv.pl +%if %{without bundle_libdb} Requires: perl-DB_File +%endif Requires: perl-Archive-Tar %if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 Requires: perl-debugger Requires: perl-sigtrap %endif - +# Needed for password dictionary checks +Requires: cracklib-dicts +Requires: json-c +# Log compression +Requires: zlib-devel # Picks up our systemd deps. %{?systemd_requires} Obsoletes: %{name} <= 1.4.4 -Source0: https://releases.pagure.org/389-ds-base/%{name}-%{version}.tar.bz2 -# 389-ds-git.sh should be used to generate the source tarball from git -Source1: %{name}-git.sh +Source0: %{name}-%{version}.tar.bz2 Source2: %{name}-devel.README -%if %{bundle_jemalloc} +%if %{with bundle_jemalloc} Source3: https://github.com/jemalloc/%{jemalloc_name}/releases/download/%{jemalloc_ver}/%{jemalloc_name}-%{jemalloc_ver}.tar.bz2 %endif Source4: 389-ds-base.sysusers +%if %{with bundle_libdb} +Source5: https://fedorapeople.org/groups/389ds/libdb-5.3.28-59.tar.bz2 +%endif %description 389 Directory Server is an LDAPv3 compliant server. The base package includes the LDAP server and command line utilities for server administration. -%if %{use_asan} +%if %{with asan} WARNING! This build is linked to Address Sanitisation libraries. This probably isn't what you want. Please contact support immediately. Please see http://seclists.org/oss-sec/2016/q1/363 for more information. %endif + %package libs -Summary: Core libraries for 389 Directory Server -BuildRequires: nspr-devel -BuildRequires: nss-devel >= 3.34 -BuildRequires: openldap-devel -BuildRequires: libdb-devel -BuildRequires: cyrus-sasl-devel -BuildRequires: libicu-devel -BuildRequires: pcre2-devel -BuildRequires: libtalloc-devel -BuildRequires: libevent-devel -BuildRequires: libtevent-devel -Requires: krb5-libs -Requires: libevent -BuildRequires: systemd-devel -BuildRequires: make +Summary: Core libraries for 389 Directory Server (%{variant}) Provides: svrcore = 4.1.4 -Conflicts: svrcore Obsoletes: svrcore <= 4.1.3 +Conflicts: svrcore +%dirsrv_requires_ge nss +Requires: nspr +Requires: openldap +Requires: systemd-libs +# Pull in sasl +Requires: cyrus-sasl-lib +# KRB +Requires: krb5-libs +%if %{with clang} +Requires: llvm +Requires: compiler-rt +%else +%if %{with asan} +Requires: libasan +%endif +%if %{with tsan} +Requires: libtsan +%endif +%if %{with ubsan} +Requires: libubsan +%endif +%endif %description libs Core libraries for the 389 Directory Server base package. These libraries @@ -500,19 +530,17 @@ are used by the main package and the -devel package. This allows the -devel package to be installed with just the -libs package and without the main package. %package devel -Summary: Development libraries for 389 Directory Server +Summary: Development libraries for 389 Directory Server (%{variant}) +Provides: svrcore-devel = 4.1.4 +Obsoletes: svrcore-devel <= 4.1.3 +Conflicts: svrcore-devel Requires: %{name}-libs = %{version}-%{release} Requires: pkgconfig Requires: nspr-devel Requires: nss-devel >= 3.34 Requires: openldap-devel -Requires: libtalloc -Requires: libevent -Requires: libtevent +# systemd-libs contains the headers iirc. Requires: systemd-libs -Provides: svrcore-devel = 4.1.4 -Conflicts: svrcore-devel -Obsoletes: svrcore-devel <= 4.1.3 %description devel Development Libraries and headers for the 389 Directory Server base package. @@ -526,16 +554,35 @@ Obsoletes: %{name} <= 1.4.0.0 %description snmp SNMP Agent for the 389 Directory Server base package. +%if %{with bundle_libdb} +%package bdb +Summary: Berkeley Database backend for 389 Directory Server +%description bdb +Berkeley Database backend for 389 Directory Server +Warning! This backend is deprecated in favor of lmdb and its support +may be removed in future versions. + +Requires: %{name} = %{version}-%{release} +# Berkeley DB database libdb was marked as deprecated since F40: +# https://fedoraproject.org/wiki/Changes/389_Directory_Server_3.0.0 +# because libdb was marked as deprecated since F33 +# https://fedoraproject.org/wiki/Changes/Libdb_deprecated +Provides: deprecated() +%endif + + %package -n python%{python3_pkgversion}-lib389 Summary: A library for accessing, testing, and configuring the 389 Directory Server BuildArch: noarch +Requires: %{name} = %{version}-%{release} Requires: openssl +# This is for /usr/bin/c_rehash tool, only needed for openssl < 1.1.0 +Requires: openssl-perl Requires: iproute -Recommends: bash-completion Requires: python%{python3_pkgversion} Requires: python%{python3_pkgversion}-distro +Requires: python%{python3_pkgversion}-pytest Requires: python%{python3_pkgversion}-ldap -Requires: python%{python3_pkgversion}-six Requires: python%{python3_pkgversion}-pyasn1 Requires: python%{python3_pkgversion}-pyasn1-modules Requires: python%{python3_pkgversion}-dateutil @@ -543,20 +590,21 @@ Requires: python%{python3_pkgversion}-argcomplete Requires: python%{python3_pkgversion}-libselinux Requires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-cryptography +Recommends: bash-completion %{?python_provide:%python_provide python%{python3_pkgversion}-lib389} %description -n python%{python3_pkgversion}-lib389 This module contains tools and libraries for accessing, testing, and configuring the 389 Directory Server. -%if %{use_cockpit} +%if %{with cockpit} %package -n cockpit-389-ds Summary: Cockpit UI Plugin for configuring and administering the 389 Directory Server BuildArch: noarch Requires: cockpit -Requires: 389-ds-base +Requires: %{name} = %{version}-%{release} Requires: python%{python3_pkgversion} -Requires: python%{python3_pkgversion}-lib389 +Requires: python%{python3_pkgversion}-lib389 = %{version}-%{release} %description -n cockpit-389-ds A cockpit UI Plugin for configuring and administering the 389 Directory Server @@ -565,34 +613,47 @@ A cockpit UI Plugin for configuring and administering the 389 Directory Server %prep %autosetup -p1 -v -n %{name}-%{version} -%if %{bundle_jemalloc} +%if %{with bundle_jemalloc} %setup -q -n %{name}-%{version} -T -D -b 3 %endif +%if %{with bundle_libdb} +%setup -q -n %{name}-%{version} -T -D -b 5 +%endif + cp %{SOURCE2} README.devel %build -OPENLDAP_FLAG="--with-openldap" -%{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"} - -%if %{use_asan} -ASAN_FLAGS="--enable-asan --enable-debug" -%endif - -RUST_FLAGS="--enable-rust-offline" - -%if !%{use_cockpit} -COCKPIT_FLAGS="--disable-cockpit" -%endif - -%if %{use_clang} -export CC=clang -export CXX=clang++ +%if %{with clang} CLANG_FLAGS="--enable-clang" %endif -%if %{bundle_jemalloc} +%{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"} + +%if %{with asan} +ASAN_FLAGS="--enable-asan --enable-debug" +%endif + +%if %{with msan} +MSAN_FLAGS="--enable-msan --enable-debug" +%endif + +%if %{with tsan} +TSAN_FLAGS="--enable-tsan --enable-debug" +%endif + +%if %{with ubsan} +UBSAN_FLAGS="--enable-ubsan --enable-debug" +%endif + +RUST_FLAGS="--enable-rust --enable-rust-offline" + +%if %{without cockpit} +COCKPIT_FLAGS="--disable-cockpit" +%endif + +%if %{with bundle_jemalloc} # Override page size, bz #1545539 # 4K %ifarch %ix86 %arm x86_64 s390x @@ -615,26 +676,44 @@ pushd ../%{jemalloc_name}-%{jemalloc_ver} %configure \ --libdir=%{_libdir}/%{pkgname}/lib \ --bindir=%{_libdir}/%{pkgname}/bin \ - --enable-prof + --enable-prof %{lg_page} %{lg_hugepage} make %{?_smp_mflags} popd %endif -# Enforce strict linking -%define _ld_strict_symbol_defs 1 +# Build custom libdb package +%if %{with bundle_libdb} +mkdir -p ../%{libdb_base_version} +pushd ../%{libdb_base_version} +tar -xjf ../../SOURCES/%{libdb_full_version}.tar.bz2 +mv %{libdb_full_version} SOURCES +rpmbuild --define "_topdir $PWD" -bc %{_builddir}/%{name}-%{version}/rpm/bundle-libdb.spec +popd +%endif # Rebuild the autotool artifacts now. autoreconf -fiv -%configure --enable-autobind --with-selinux $TMPFILES_FLAG \ +%configure \ +%if %{with bundle_libdb} + --with-bundle-libdb=%{_builddir}/%{libdb_base_version}/BUILD/%{libdb_base_version}/dist/dist-tls \ +%endif + --with-selinux $TMPFILES_FLAG \ --with-systemd \ --with-systemdsystemunitdir=%{_unitdir} \ --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \ - --with-systemdgroupname=%{groupname} \ + --with-systemdgroupname=%{groupname} \ --libexecdir=%{_libexecdir}/%{pkgname} \ - $ASAN_FLAGS $RUST_FLAGS $CLANG_FLAGS $COCKPIT_FLAGS \ - --enable-cmocka \ - --with-libldap-r=no + $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $CLANG_FLAGS $COCKPIT_FLAGS \ +%if 0%{?fedora} >= 34 || 0%{?rhel} >= 9 + --with-libldap-r=no \ +%endif + --enable-cmocka + +# Avoid "Unknown key name 'XXX' in section 'Service', ignoring." warnings from systemd on older releases +%if 0%{?rhel} && 0%{?rhel} < 9 + sed -r -i '/^(Protect(Home|Hostname|KernelLogs)|PrivateMounts)=/d' %{_builddir}/%{name}-%{version}/wrappers/*.service.in +%endif # lib389 make src/lib389/setup.py @@ -651,22 +730,26 @@ sed -i "1s/\"1\"/\"8\"/" %{_builddir}/%{name}-%{version}/src/lib389/man/dscreat # Generate symbolic info for debuggers export XCFLAGS=$RPM_OPT_FLAGS -#make %{?_smp_mflags} -make +make %{?_smp_mflags} %install mkdir -p %{buildroot}%{_datadir}/gdb/auto-load%{_sbindir} -%if %{use_cockpit} +%if %{with cockpit} mkdir -p %{buildroot}%{_datadir}/cockpit %endif make DESTDIR="$RPM_BUILD_ROOT" install -%if %{use_cockpit} +%if %{with cockpit} find %{buildroot}%{_datadir}/cockpit/389-console -type d | sed -e "s@%{buildroot}@@" | sed -e 's/^/\%dir /' > cockpit.list find %{buildroot}%{_datadir}/cockpit/389-console -type f | sed -e "s@%{buildroot}@@" >> cockpit.list %endif +find %{buildroot}%{_libdir}/%{pkgname}/plugins/ -type f -iname 'lib*.so' | sed -e "s@%{buildroot}@@" > plugins.list +%if %{with bundle_libdb} +sed -i -e "/libback-bdb/d" plugins.list +%endif + # Copy in our docs from doxygen. cp -r %{_builddir}/%{name}-%{version}/man/man3 $RPM_BUILD_ROOT/%{_mandir}/man3 @@ -684,13 +767,14 @@ done mkdir -p $RPM_BUILD_ROOT/var/log/%{pkgname} mkdir -p $RPM_BUILD_ROOT/var/lib/%{pkgname} -mkdir -p $RPM_BUILD_ROOT/var/lock/%{pkgname} +mkdir -p $RPM_BUILD_ROOT/var/lock/%{pkgname} \ + && chmod 770 $RPM_BUILD_ROOT/var/lock/%{pkgname} # for systemd mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/systemd/system/%{groupname}.wants install -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/389-ds-base.conf -# remove libtool archives and static libs +#remove libtool and static libs rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.a @@ -698,7 +782,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/plugins/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.a rm -f $RPM_BUILD_ROOT%{_libdir}/libsvrcore.la -%if %{bundle_jemalloc} +%if %{with bundle_jemalloc} pushd ../%{jemalloc_name}-%{jemalloc_ver} make DESTDIR="$RPM_BUILD_ROOT" install_lib install_bin cp -pa COPYING ../%{name}-%{version}/COPYING.jemalloc @@ -706,9 +790,26 @@ cp -pa README ../%{name}-%{version}/README.jemalloc popd %endif +%if %{with bundle_libdb} +pushd ../%{libdb_base_version} +libdbbuilddir=$PWD/BUILD/%{libdb_base_version} +libdbdestdir=$PWD/../%{name}-%{version} +cp -pa $libdbbuilddir/LICENSE $libdbdestdir/LICENSE.libdb +cp -pa $libdbbuilddir/README $libdbdestdir/README.libdb +cp -pa $libdbbuilddir/lgpl-2.1.txt $libdbdestdir/lgpl-2.1.txt.libdb +cp -pa $libdbbuilddir/dist/dist-tls/.libs/%{libdb_bundle_name} $RPM_BUILD_ROOT%{_libdir}/%{pkgname}/%{libdb_bundle_name} +popd +%endif + + %check # This checks the code, if it fails it prints why, then re-raises the fail to shortcircuit the rpm build. +%if %{with tsan} +export TSAN_OPTIONS=print_stacktrace=1:second_deadlock_stack=1:history_size=7 +%endif +%if %{without asan} && %{without msan} if ! make DESTDIR="$RPM_BUILD_ROOT" check; then cat ./test-suite.log && false; fi +%endif %post if [ -n "$DEBUGPOSTTRANS" ] ; then @@ -787,8 +888,8 @@ fi exit 0 -%files -%if %{bundle_jemalloc} +%files -f plugins.list +%if %{with bundle_jemalloc} %doc LICENSE LICENSE.GPLv3+ LICENSE.openssl README.jemalloc %license COPYING.jemalloc %else @@ -818,7 +919,6 @@ exit 0 %{_mandir}/man1/logconv.pl.1.gz %{_bindir}/pwdhash %{_mandir}/man1/pwdhash.1.gz -#%caps(CAP_NET_BIND_SERVICE=pe) {_sbindir}/ns-slapd %{_sbindir}/ns-slapd %{_mandir}/man8/ns-slapd.8.gz %{_sbindir}/openldap_to_ds @@ -832,7 +932,6 @@ exit 0 %{_mandir}/man5/dirsrv.systemd.5.gz %{_libdir}/%{pkgname}/python %dir %{_libdir}/%{pkgname}/plugins -%{_libdir}/%{pkgname}/plugins/*.so # This has to be hardcoded to /lib - $libdir changes between lib/lib64, but # sysctl.d is always in /lib. %{_prefix}/lib/sysctl.d/* @@ -842,7 +941,7 @@ exit 0 %exclude %{_sbindir}/ldap-agent* %exclude %{_mandir}/man1/ldap-agent.1.gz %exclude %{_unitdir}/%{pkgname}-snmp.service -%if %{bundle_jemalloc} +%if %{with bundle_jemalloc} %{_libdir}/%{pkgname}/lib/ %{_libdir}/%{pkgname}/bin/ %exclude %{_libdir}/%{pkgname}/bin/jemalloc-config @@ -873,7 +972,7 @@ exit 0 %{_libdir}/%{pkgname}/libns-dshttpd.so.* %{_libdir}/%{pkgname}/libldaputil.so.* %{_libdir}/%{pkgname}/librewriters.so* -%if %{bundle_jemalloc} +%if %{with bundle_jemalloc} %{_libdir}/%{pkgname}/lib/libjemalloc.so.2 %endif @@ -884,6 +983,13 @@ exit 0 %{_mandir}/man1/ldap-agent.1.gz %{_unitdir}/%{pkgname}-snmp.service +%if %{with bundle_libdb} +%files bdb +%doc LICENSE LICENSE.GPLv3+ README.devel LICENSE.libdb README.libdb lgpl-2.1.txt.libdb +%{_libdir}/%{pkgname}/%{libdb_bundle_name} +%{_libdir}/%{pkgname}/plugins/libback-bdb.so +%endif + %files -n python%{python3_pkgversion}-lib389 %doc LICENSE LICENSE.GPLv3+ %{python3_sitelib}/lib389* @@ -901,7 +1007,7 @@ exit 0 %{bash_completions_dir}/dscreate %{bash_completions_dir}/dsidm -%if %{use_cockpit} +%if %{with cockpit} %files -n cockpit-389-ds -f cockpit.list %{_datarootdir}/metainfo/389-console/org.port389.cockpit_console.metainfo.xml %doc README.md diff --git a/concread-use-2018-edition.patch b/concread-use-2018-edition.patch deleted file mode 100644 index c09bf22..0000000 --- a/concread-use-2018-edition.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff '--color=auto' -Nur 389-ds-base-2.0.13.orig/vendor/concread/.cargo-checksum.json 389-ds-base-2.0.13/vendor/concread/.cargo-checksum.json ---- 389-ds-base-2.0.13.orig/vendor/concread/.cargo-checksum.json 2022-01-25 14:30:32.886759088 +0100 -+++ 389-ds-base-2.0.13/vendor/concread/.cargo-checksum.json 2022-01-25 14:30:59.144053695 +0100 -@@ -1 +1 @@ --{"files":{"CACHE.md":"258e585db81ee9582e1f7e7246026b49b3f617dae4459ec52437024b00ba5dff","CODE_OF_CONDUCT.md":"f32933e0090f012d336e8b2f2301967e8a27cbc896aa3860811a944d05b58964","CONTRIBUTORS.md":"1edff6e840fc50412ac698cd7e5ebe660574760b492d4febe94feb0c066b062f","Cargo.toml":"088f1aa3051cfc8b7861c3eed146e9a5d936e68edaaa85d04054475a8d24224e","LICENSE.md":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"de35f7df990b5c047785da63ad560ecadac746bf19d2ab8457fc2ba0224ad46a","README.md":"f70aafccb01764a1aa4d83e3f7fbeab245f7bfa3d3bafecea9614439ff97b487","asan_test.sh":"7355f359e34a6198e895c18fbb616fa45a44666c0a82787f704454e83687be4c","benches/arccache.rs":"6f1f23abb2b577c21aa7ee3d4bd7413fcb49a60d59b1220e1afaeda99f4e6b0e","benches/hashmap_benchmark.rs":"306d085f88f7ce40b8709aff37375482f8edb3c891cbb3da5d9d70a95c2d6cca","src/arcache/ll.rs":"2bd7eb2e73f80112765a0e1792edc27b58269dfc419498ef02ad68fb63141abc","src/arcache/mod.rs":"5911e162123373e241a6bf2b6355cda5480f9ff2f3fa2901c08a7010ad82c00a","src/arcache/traits.rs":"09ea380ea38efe3e35c2036a2ae233388a5367706d155c4aa3c9234d03eef8ea","src/bptree/asynch.rs":"69eff00e05b7b85a12468304374422b2ce1d8598b50918b0efe6eb77036249a4","src/bptree/impl.rs":"b54a7d53e23bf0ff23ebd43ea7ab19708cc383766706051f207bfb62f5e64793","src/bptree/mod.rs":"5e8d2004865dd2064a550070ca3b49a1975ac877cd6749f035806335f3a393a1","src/cowcell/asynch.rs":"04a1c424c083625f92524547bd21d20aadec4d20e2eedfff4db90f2aef920d6c","src/cowcell/mod.rs":"621c243c301f80ebcf65a636489c9450e22940bc5bc9cfb1e5db7943f4e3543f","src/ebrcell/mod.rs":"cf2a2042ac41039ca5fb4212f1fec58bfa1695b88f9c7f7864e01dafa84ccf35","src/hashmap/asynch.rs":"f8418906a23cf06e73fb1330988da4ab0f53ae58c4d5fd58ab5105f8fcbcc414","src/hashmap/impl.rs":"9695dcfde2fd6b27766adddd225d6390a44cc757ebf9b2f5879f6f1b9a7f29dc","src/hashmap/mod.rs":"bbd33d7f50a28b9a1254d4aaed72f5122e9f01e68e0c43331f90582a17056657","src/internals/bptree/cursor.rs":"83b250db73eb09e1cf7367e8c33700e9b9659695fd565e813549b7f20f9ba777","src/internals/bptree/iter.rs":"dfcf50a3ff5b052dc719b2c68b0bafcfdd0c0c8d8173f3e227a7dd6c8f1be773","src/internals/bptree/macros.rs":"568826a43238474d1f92f7dbf1671690790b35a3b8c88d0d6c5dd35aca54857a","src/internals/bptree/mod.rs":"67ba38e16d96c0d239b72cf0b7be5f27a7a82a29e3a31afc5477175f92b4c57f","src/internals/bptree/node.rs":"afe7217f187d5d7a086dab3bc6fadbae0456e4f8518aa12153f877590380d585","src/internals/bptree/states.rs":"da1ce34cbe6bc449e9e5172ed1fd2a296f2ac197b17ca855f2d40aada7d32a63","src/internals/hashmap/cursor.rs":"7d9c47d7e31e984670cd2161be54475dc468df5b00df26dc89f9848eb1a587ea","src/internals/hashmap/iter.rs":"f02f372e34d2af685eebbcc4db71cc5985c904c1bbd14dd13f48921ea58e5c5f","src/internals/hashmap/macros.rs":"f1236cd794e0e8d7ee2e89428b60c1c3437f34e6be32217de2d61dddce7c6b90","src/internals/hashmap/mod.rs":"ffa693b755ef92da14b001e08a1154e263bd9540ae993d4f79ddf5979e2dcbd6","src/internals/hashmap/node.rs":"7d86f28969185f28de91b2c816990f231adb2c5985c4cbf0efcfdd07ae94ef9a","src/internals/hashmap/simd.rs":"4ef1fd5a0b6218823eafd727b7ff1a738dfc0c59d1e3afbb2ace8f0513967bf3","src/internals/hashmap/states.rs":"9366f29bdfaeb3ee9744268b5b2283209f791a260045312e8489515f8bd3900a","src/internals/lincowcell/mod.rs":"9caa826c9b6758e79d90c10c5dad4bfeaf46a8773784537750814f700fa13428","src/internals/lincowcell_async/mod.rs":"c38ec2efbd02219ebec68aa0b31e824262941093d1cfb3e441e6c98b375df6ab","src/internals/mod.rs":"18db9c4cb457fd06a85d668a69bd290ad13a7fae971a926015daf148424e19cc","src/lib.rs":"ce9ba3daaa0f8e9ee2e61a61e8134cf4d241522ca30909d6933f37075bd3e549","src/threadcache/mod.rs":"43328459ade4c1abb8174ded0f77f264a3931dbae82991e70765747d519882c6","src/unsound.rs":"60ed0cad28434083fe7cccd17af4995381cdd9e4dfb685da5b14e802150074fb","src/unsound2.rs":"02b72de153d9f5fac901ea59a9ef3d1ce9b8e3e18bc80d9d19b2d6aa8c7b5022","src/unsound3.rs":"019ba913656558f91e9a160cbc05fe78b1e4a44acc1bb74d38281ebea71edd77","src/utils.rs":"d07e962bab8936d5396bc7542af7ce2812504358c4e68dd2322f521c066476cd","static/arc_1.png":"94ff0d24a15d5feda27f0316f8a1ca82291f816d8705b1d0743e03e39791bbe2","static/arc_2.png":"9932b1b8e7f44a833f4ffdb710af984199711d6c9c3349a51ab122a22d0ebbe7","static/cow_1.png":"f340e6d143589efdbbfb8c62c4fdddc97dcb213e0cff2c04f7f93bf380fd36f3","static/cow_2.png":"20f550b67109cd042170da95ff6faecda043d333c55f48ec19ced8bb9dce1eee","static/cow_3.png":"137a24e70196bd628522733b55ed1d92cf3f9936be39d9f0864201424a25bd88","static/cow_arc_1.png":"97a45ad9b55721381aff07e921fedc863209629a4ae4f8c160cad7059ecad795","static/cow_arc_2.png":"178e681ba6e2e0a33a7b6a08b9895b628dad74cda56e9e25b59288376e9f01ce","static/cow_arc_3.png":"37dac32e173b14faf37b502a110ab1e4f47f30710cfc65714b9fef0b79f64307","static/cow_arc_4.png":"f4b962b9ccd9b765523f50b752b9bb85525cbf8a4e6cdc15048f9363579e6719","static/cow_arc_5.png":"d6b122ec844d0d19312cc57667769f2955bc7b8667449b1c13a7359a4debc8a2","static/cow_arc_6.png":"847018f7f5e0813b26c2b636a2ca8549f475339de24a21dd2e0e21d90dbd77f1","static/cow_arc_7.png":"3df9b3d1153c7b1de52a30a46e9bdba75e2412ad51ef158437a356f16b3bd1be","static/cow_arc_8.png":"68f405191ef400b8f854102e98fac92ddd31c274bcff7739e47483a39dba9612","static/cow_arc_9.png":"eb60637be4fb951ac54a1e3de0fd33e0bb2f5a4d19c3519bd8f23c02b8fc240d"},"package":"dcc9816f5ac93ebd51c37f7f9a6bf2b40dfcd42978ad2aea5d542016e9244cf6"} -\ No newline at end of file -+{"files":{"CACHE.md":"258e585db81ee9582e1f7e7246026b49b3f617dae4459ec52437024b00ba5dff","CODE_OF_CONDUCT.md":"f32933e0090f012d336e8b2f2301967e8a27cbc896aa3860811a944d05b58964","CONTRIBUTORS.md":"1edff6e840fc50412ac698cd7e5ebe660574760b492d4febe94feb0c066b062f","Cargo.toml":"188257f3b5f5cba5f526fd3647ce8c5a4c75a70dc95fbedf665a2cf2755aee6d","LICENSE.md":"32ee9dbf6196874fc9d406c54a888a6c4cbb9aa4a7f35b46befeaff43a78fe85","Makefile":"de35f7df990b5c047785da63ad560ecadac746bf19d2ab8457fc2ba0224ad46a","README.md":"f70aafccb01764a1aa4d83e3f7fbeab245f7bfa3d3bafecea9614439ff97b487","asan_test.sh":"7355f359e34a6198e895c18fbb616fa45a44666c0a82787f704454e83687be4c","benches/arccache.rs":"6f1f23abb2b577c21aa7ee3d4bd7413fcb49a60d59b1220e1afaeda99f4e6b0e","benches/hashmap_benchmark.rs":"306d085f88f7ce40b8709aff37375482f8edb3c891cbb3da5d9d70a95c2d6cca","src/arcache/ll.rs":"2bd7eb2e73f80112765a0e1792edc27b58269dfc419498ef02ad68fb63141abc","src/arcache/mod.rs":"5911e162123373e241a6bf2b6355cda5480f9ff2f3fa2901c08a7010ad82c00a","src/arcache/traits.rs":"09ea380ea38efe3e35c2036a2ae233388a5367706d155c4aa3c9234d03eef8ea","src/bptree/asynch.rs":"69eff00e05b7b85a12468304374422b2ce1d8598b50918b0efe6eb77036249a4","src/bptree/impl.rs":"b54a7d53e23bf0ff23ebd43ea7ab19708cc383766706051f207bfb62f5e64793","src/bptree/mod.rs":"5e8d2004865dd2064a550070ca3b49a1975ac877cd6749f035806335f3a393a1","src/cowcell/asynch.rs":"04a1c424c083625f92524547bd21d20aadec4d20e2eedfff4db90f2aef920d6c","src/cowcell/mod.rs":"621c243c301f80ebcf65a636489c9450e22940bc5bc9cfb1e5db7943f4e3543f","src/ebrcell/mod.rs":"cf2a2042ac41039ca5fb4212f1fec58bfa1695b88f9c7f7864e01dafa84ccf35","src/hashmap/asynch.rs":"f8418906a23cf06e73fb1330988da4ab0f53ae58c4d5fd58ab5105f8fcbcc414","src/hashmap/impl.rs":"9695dcfde2fd6b27766adddd225d6390a44cc757ebf9b2f5879f6f1b9a7f29dc","src/hashmap/mod.rs":"bbd33d7f50a28b9a1254d4aaed72f5122e9f01e68e0c43331f90582a17056657","src/internals/bptree/cursor.rs":"83b250db73eb09e1cf7367e8c33700e9b9659695fd565e813549b7f20f9ba777","src/internals/bptree/iter.rs":"dfcf50a3ff5b052dc719b2c68b0bafcfdd0c0c8d8173f3e227a7dd6c8f1be773","src/internals/bptree/macros.rs":"568826a43238474d1f92f7dbf1671690790b35a3b8c88d0d6c5dd35aca54857a","src/internals/bptree/mod.rs":"67ba38e16d96c0d239b72cf0b7be5f27a7a82a29e3a31afc5477175f92b4c57f","src/internals/bptree/node.rs":"afe7217f187d5d7a086dab3bc6fadbae0456e4f8518aa12153f877590380d585","src/internals/bptree/states.rs":"da1ce34cbe6bc449e9e5172ed1fd2a296f2ac197b17ca855f2d40aada7d32a63","src/internals/hashmap/cursor.rs":"7d9c47d7e31e984670cd2161be54475dc468df5b00df26dc89f9848eb1a587ea","src/internals/hashmap/iter.rs":"f02f372e34d2af685eebbcc4db71cc5985c904c1bbd14dd13f48921ea58e5c5f","src/internals/hashmap/macros.rs":"f1236cd794e0e8d7ee2e89428b60c1c3437f34e6be32217de2d61dddce7c6b90","src/internals/hashmap/mod.rs":"ffa693b755ef92da14b001e08a1154e263bd9540ae993d4f79ddf5979e2dcbd6","src/internals/hashmap/node.rs":"7d86f28969185f28de91b2c816990f231adb2c5985c4cbf0efcfdd07ae94ef9a","src/internals/hashmap/simd.rs":"4ef1fd5a0b6218823eafd727b7ff1a738dfc0c59d1e3afbb2ace8f0513967bf3","src/internals/hashmap/states.rs":"9366f29bdfaeb3ee9744268b5b2283209f791a260045312e8489515f8bd3900a","src/internals/lincowcell/mod.rs":"9caa826c9b6758e79d90c10c5dad4bfeaf46a8773784537750814f700fa13428","src/internals/lincowcell_async/mod.rs":"c38ec2efbd02219ebec68aa0b31e824262941093d1cfb3e441e6c98b375df6ab","src/internals/mod.rs":"18db9c4cb457fd06a85d668a69bd290ad13a7fae971a926015daf148424e19cc","src/lib.rs":"ce9ba3daaa0f8e9ee2e61a61e8134cf4d241522ca30909d6933f37075bd3e549","src/threadcache/mod.rs":"43328459ade4c1abb8174ded0f77f264a3931dbae82991e70765747d519882c6","src/unsound.rs":"60ed0cad28434083fe7cccd17af4995381cdd9e4dfb685da5b14e802150074fb","src/unsound2.rs":"02b72de153d9f5fac901ea59a9ef3d1ce9b8e3e18bc80d9d19b2d6aa8c7b5022","src/unsound3.rs":"019ba913656558f91e9a160cbc05fe78b1e4a44acc1bb74d38281ebea71edd77","src/utils.rs":"d07e962bab8936d5396bc7542af7ce2812504358c4e68dd2322f521c066476cd","static/arc_1.png":"94ff0d24a15d5feda27f0316f8a1ca82291f816d8705b1d0743e03e39791bbe2","static/arc_2.png":"9932b1b8e7f44a833f4ffdb710af984199711d6c9c3349a51ab122a22d0ebbe7","static/cow_1.png":"f340e6d143589efdbbfb8c62c4fdddc97dcb213e0cff2c04f7f93bf380fd36f3","static/cow_2.png":"20f550b67109cd042170da95ff6faecda043d333c55f48ec19ced8bb9dce1eee","static/cow_3.png":"137a24e70196bd628522733b55ed1d92cf3f9936be39d9f0864201424a25bd88","static/cow_arc_1.png":"97a45ad9b55721381aff07e921fedc863209629a4ae4f8c160cad7059ecad795","static/cow_arc_2.png":"178e681ba6e2e0a33a7b6a08b9895b628dad74cda56e9e25b59288376e9f01ce","static/cow_arc_3.png":"37dac32e173b14faf37b502a110ab1e4f47f30710cfc65714b9fef0b79f64307","static/cow_arc_4.png":"f4b962b9ccd9b765523f50b752b9bb85525cbf8a4e6cdc15048f9363579e6719","static/cow_arc_5.png":"d6b122ec844d0d19312cc57667769f2955bc7b8667449b1c13a7359a4debc8a2","static/cow_arc_6.png":"847018f7f5e0813b26c2b636a2ca8549f475339de24a21dd2e0e21d90dbd77f1","static/cow_arc_7.png":"3df9b3d1153c7b1de52a30a46e9bdba75e2412ad51ef158437a356f16b3bd1be","static/cow_arc_8.png":"68f405191ef400b8f854102e98fac92ddd31c274bcff7739e47483a39dba9612","static/cow_arc_9.png":"eb60637be4fb951ac54a1e3de0fd33e0bb2f5a4d19c3519bd8f23c02b8fc240d"},"package":"dcc9816f5ac93ebd51c37f7f9a6bf2b40dfcd42978ad2aea5d542016e9244cf6"} -diff '--color=auto' -Nur 389-ds-base-2.0.13.orig/vendor/concread/Cargo.toml 389-ds-base-2.0.13/vendor/concread/Cargo.toml ---- 389-ds-base-2.0.13.orig/vendor/concread/Cargo.toml 2022-01-25 14:30:32.883759169 +0100 -+++ 389-ds-base-2.0.13/vendor/concread/Cargo.toml 2022-01-25 14:30:44.786439411 +0100 -@@ -10,7 +10,7 @@ - # See Cargo.toml.orig for the original contents. - - [package] --edition = "2021" -+edition = "2018" - name = "concread" - version = "0.2.21" - authors = ["William Brown "] diff --git a/sources b/sources index 4d91fb5..608341b 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ SHA512 (jemalloc-5.3.0.tar.bz2) = 22907bb052096e2caffb6e4e23548aecc5cc9283dce476896a2b1127eee64170e3562fa2e7db9571298814a7a2c7df6e8d1fbe152bd3f3b0c1abec22a2de34b1 SHA512 (389-ds-base-3.0.3.tar.bz2) = f9e5432d8acc7701c9455cb7b561ff6dd67a8e2f9d0340f47cf17b8a3558aa02dab7319d139a23e8f89682c2521c9c6852a097b702228785dda37cb03d2c9310 +SHA512 (libdb-5.3.28-59.tar.bz2) = 731a434fa2e6487ebb05c458b0437456eb9f7991284beb08cb3e21931e23bdeddddbc95bfabe3a2f9f029fe69cd33a2d4f0f5ce6a9811e9c3b940cb6fde4bf79