Date: Tuesday, February 14, 2023 @ 16:33:20
Author: svenstaro
Revision: 468813
archrelease: copy trunk to community-x86_64
Added:
389-ds-base/repos/community-x86_64/
389-ds-base/repos/community-x86_64/389-ds-base.sysusers
(from rev 468812, 389-ds-base/trunk/389-ds-base.sysusers)
389-ds-base/repos/community-x86_64/389-ds-base.tmpfiles
(from rev 468812, 389-ds-base/trunk/389-ds-base.tmpfiles)
389-ds-base/repos/community-x86_64/PKGBUILD
(from rev 468812, 389-ds-base/trunk/PKGBUILD)
389-ds-base/repos/community-x86_64/bcf5e9f.patch
(from rev 468812, 389-ds-base/trunk/bcf5e9f.patch)
389-ds-base/repos/community-x86_64/openldap-2.5.patch
(from rev 468812, 389-ds-base/trunk/openldap-2.5.patch)
----------------------+
389-ds-base.sysusers | 1
389-ds-base.tmpfiles | 3 +
PKGBUILD | 97 +++++++++++++++++++++++++++++++++++++++++++++++++
bcf5e9f.patch | 41 ++++++++++++++++++++
openldap-2.5.patch | 12 ++++++
5 files changed, 154 insertions(+)
Copied: 389-ds-base/repos/community-x86_64/389-ds-base.sysusers (from rev
468812, 389-ds-base/trunk/389-ds-base.sysusers)
===================================================================
--- community-x86_64/389-ds-base.sysusers (rev 0)
+++ community-x86_64/389-ds-base.sysusers 2023-02-14 16:33:20 UTC (rev
468813)
@@ -0,0 +1 @@
+u dirsrv 440 "389 Directory Server" /var/lib/389-ds-base
Copied: 389-ds-base/repos/community-x86_64/389-ds-base.tmpfiles (from rev
468812, 389-ds-base/trunk/389-ds-base.tmpfiles)
===================================================================
--- community-x86_64/389-ds-base.tmpfiles (rev 0)
+++ community-x86_64/389-ds-base.tmpfiles 2023-02-14 16:33:20 UTC (rev
468813)
@@ -0,0 +1,3 @@
+d /var/log/dirsrv 0700 dirsrv dirsrv -
+d /var/lib/dirsrv 0700 dirsrv dirsrv -
+d /run/lock/dirsrv 0770 dirsrv dirsrv -
Copied: 389-ds-base/repos/community-x86_64/PKGBUILD (from rev 468812,
389-ds-base/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2023-02-14 16:33:20 UTC (rev 468813)
@@ -0,0 +1,97 @@
+# Maintainer: Sven-Hendrik Haase <[email protected]>
+# Contributor: Javier Torres <javitonino [at] gmail [dot] com>
+# Contributor: Jameson Pugh <[email protected]>
+# Contributor: Xiao-Long Chen <[email protected]>
+
+pkgname=389-ds-base
+pkgver=2.3.2
+pkgdesc="389 Directory Server (base)"
+pkgrel=1
+arch=(x86_64)
+url="http://port389.org/"
+license=('GPL')
+provides=('libsvrcore.so')
+replaces=('python-lib389')
+backup=(etc/dirsrv/config/certmap.conf
+ etc/dirsrv/config/ldap-agent.conf
+ etc/dirsrv/config/slapd-collations.conf
+ etc/dirsrv/config/template-initconfig)
+depends=('cracklib' 'libevent' 'nspr' 'nss' 'net-snmp' 'pam' 'openldap' 'icu'
'db5.3'
+ 'python-argcomplete' 'python-dateutil' 'python-ldap'
'python-packaging' 'lmdb')
+makedepends=('cargo' 'rsync' 'doxygen' 'cmocka' 'python-setuptools'
'python-argparse-manpage'
+ 'npm' 'nodejs-lts-fermium' 'systemd')
+source=(https://github.com/389ds/389-ds-base/archive/389-ds-base-${pkgver}.tar.gz
+
https://github.com/vashirov/389-ds-base/commit/67adb7e3d1c3bbb0ba77d7d3fe0e9643a84af1c.patch
+ 389-ds-base.sysusers
+ 389-ds-base.tmpfiles)
+sha512sums=('9bbbc74a420f1240991adb0fdb3ea386526a6a642cae72a33c75566b08f5191c3581ad63cb245600ad117e95f8f2b373ec457832819c37ebed1b9c1d6ef7581d'
+
'7b845629e74b48f0bb951d883a849d64baf842836b64930268d85b18ff86d6e1004673086116fb2fff31c424480b8e05148886d037ef5382be7ed68f156be427'
+
'8689b60f13517e6541e1faa62e61781654a8e4678990d14a3fe0cfe4673697cdde1c46763fdc7ef6203e4026286fa004c73b2857fd7fecff69483e6d1e8e6d68'
+
'69ed8b8f3bdbf9098088b0c92c41a238f16d14ba9f86ebc2b5debe5f001b4d8e235f7cff4731d72b30b5ac70486b0f4300b99646aa3926a3fa59515a64f16402')
+
+prepare() {
+ cd "${pkgname}-${pkgname}-${pkgver}"
+
+ # Required until https://github.com/389ds/389-ds-base/issues/5043 is fixed:
+ # sed -i "/deny(warnings)/d" src/librnsslapd/src/lib.rs
+ patch -Np1 -i "$srcdir"/67adb7e3d1c3bbb0ba77d7d3fe0e9643a84af1c.patch
+
+ ./autogen.sh
+}
+
+build() {
+ cd "${pkgname}-${pkgname}-${pkgver}"
+
+ # Build 389-ds-base
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/${pkgname} \
+ --with-tmpfiles-d=/usr/lib/tmpfiles.d \
+ --with-db-inc=/usr/include/db5.3 \
+ --with-systemd \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --with-systemdsystemconfdir=/etc/systemd/system \
+ --with-journald \
+ --with-openldap \
+ --enable-autobind \
+ --enable-cmocka \
+ --enable-rust \
+ --with-libldap_r=no
+ make
+
+ # Build lib389
+ cd src/lib389
+ COLUMNS=80 python setup.py build
+
+ # Build cockpit plugin
+ cd ../cockpit/389-console
+ npm install
+ npm run build
+ mv dist cockpit_dist
+}
+
+check() {
+ cd "${pkgname}-${pkgname}-${pkgver}"
+ make check
+}
+
+package() {
+ cd "${pkgname}-${pkgname}-${pkgver}"
+ # make DESTDIR="${pkgdir}/" install
+ make -j1 DESTDIR="${pkgdir}/" install
+
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ # Upstream expects lib389 and 389-ds-base to be shipped in the same package
more or less
+ # so that's why it's not a split package.
+ cd src/lib389
+ python setup.py install --skip-build -O1 --root="${pkgdir}"
+ mv "${pkgdir}"/usr/sbin/* "${pkgdir}"/usr/bin/
+ rmdir "${pkgdir}"/usr/sbin
+
+ install -Dm644 "${srcdir}/${pkgname}.sysusers"
"${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+ install -Dm644 "${srcdir}/${pkgname}.tmpfiles"
"${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+}
Copied: 389-ds-base/repos/community-x86_64/bcf5e9f.patch (from rev 468812,
389-ds-base/trunk/bcf5e9f.patch)
===================================================================
--- community-x86_64/bcf5e9f.patch (rev 0)
+++ community-x86_64/bcf5e9f.patch 2023-02-14 16:33:20 UTC (rev 468813)
@@ -0,0 +1,41 @@
+From bcf5e9f980b3725b82e8f1ae4b4778150f67e225 Mon Sep 17 00:00:00 2001
+From: Viktor Ashirov <[email protected]>
+Date: Dec 10 2019 15:40:32 +0000
+Subject: Issue 50771 - 1.4.2.5 doesn't compile due to error
ModuleNotFoundError: No module named 'pkg_resources.extern'
+
+
+Bug Description:
+
+Arch Linux ships python-setuptools stripped of vendored packages.
+This makes lib389 fail with ModuleNotFoundError on import.
+
+Fix Description:
+
+Use a fallback to `packaging` module.
+
+Fixes: https://pagure.io/389-ds-base/issue/50771
+Relates: https://pagure.io/389-ds-base/issue/50712
+
+Reviewed by: mhonek (Thanks!)
+
+---
+
+diff --git a/src/lib389/lib389/utils.py b/src/lib389/lib389/utils.py
+index 70a3a10..36422dd 100644
+--- a/src/lib389/lib389/utils.py
++++ b/src/lib389/lib389/utils.py
+@@ -40,7 +40,12 @@ import shlex
+ import operator
+ import subprocess
+ import math
+-from pkg_resources.extern.packaging.version import LegacyVersion
++# Setuptools ships with 'packaging' module, let's use it from there
++try:
++ from pkg_resources.extern.packaging.version import LegacyVersion
++# Fallback to a normal 'packaging' module in case 'setuptools' is stripped
++except:
++ from packaging.version import LegacyVersion
+ from socket import getfqdn
+ from ldapurl import LDAPUrl
+ from contextlib import closing
+
Copied: 389-ds-base/repos/community-x86_64/openldap-2.5.patch (from rev 468812,
389-ds-base/trunk/openldap-2.5.patch)
===================================================================
--- community-x86_64/openldap-2.5.patch (rev 0)
+++ community-x86_64/openldap-2.5.patch 2023-02-14 16:33:20 UTC (rev 468813)
@@ -0,0 +1,12 @@
+diff -upr 389-ds-base-389-ds-base-2.0.10.orig/Makefile.am
389-ds-base-389-ds-base-2.0.10/Makefile.am
+--- 389-ds-base-389-ds-base-2.0.10.orig/Makefile.am 2021-09-20
16:12:55.000000000 +0300
++++ 389-ds-base-389-ds-base-2.0.10/Makefile.am 2021-11-13 23:02:18.801136472
+0200
+@@ -186,7 +186,7 @@ NSS_LINK = $(NSS_LIBS)
+ # with recent versions of openldap - if you link with both ldap_r and ldap,
the
+ # shared lib _fini for one will stomp on the other, and the program will crash
+ LDAPSDK_LINK_NOTHR = @openldap_lib@ -lldap@ol_libver@ @ldap_lib_ldif@
-llber@ol_libver@
+-LDAPSDK_LINK = @openldap_lib@ -lldap_r@ol_libver@ @ldap_lib_ldif@
-llber@ol_libver@
++LDAPSDK_LINK = @openldap_lib@ -lldap@ol_libver@ @ldap_lib_ldif@
-llber@ol_libver@
+ ldaplib = @ldaplib@
+ ldaplib_defs = @ldaplib_defs@
+