Hello community,

here is the log from the commit of package 389-ds for openSUSE:Factory checked 
in at 2020-03-14 09:56:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/389-ds (Old)
 and      /work/SRC/openSUSE:Factory/.389-ds.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "389-ds"

Sat Mar 14 09:56:43 2020 rev:30 rq:784733 version:1.4.3.3~git0.776c6edf5

Changes:
--------
--- /work/SRC/openSUSE:Factory/389-ds/389-ds.changes    2020-02-24 
15:56:08.479964583 +0100
+++ /work/SRC/openSUSE:Factory/.389-ds.new.3160/389-ds.changes  2020-03-14 
09:56:44.543171886 +0100
@@ -1,0 +2,8 @@
+Mon Mar  9 03:48:34 UTC 2020 - William Brown <[email protected]>
+
+- Change systemd_requires to systemd_ordering based on packaging
+  advice.
+- Change 389-ds to use sysusers.d for user/group addition of dirsrv
+  instead of manual calls to useradd/groupadd.
+
+-------------------------------------------------------------------

New:
----
  dirsrv-user.conf

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ 389-ds.spec ++++++
--- /var/tmp/diff_new_pack.egd6hN/_old  2020-03-14 09:56:45.815172819 +0100
+++ /var/tmp/diff_new_pack.egd6hN/_new  2020-03-14 09:56:45.819172822 +0100
@@ -64,6 +64,7 @@
 Source3:        vendor.tar.gz
 %endif
 Source9:        %{name}-rpmlintrc
+Source10:       %{user_group}-user.conf
 %if %{with rust}
 Patch1:         0001-fix-cargo-build.patch
 %endif
@@ -84,6 +85,7 @@
 BuildRequires:  libtalloc-devel
 BuildRequires:  libtevent-devel
 BuildRequires:  libtool
+BuildRequires:  sysuser-tools
 # net-snmp-devel is needed to build the snmp ldap-agent
 BuildRequires:  net-snmp-devel >= 5.1.2
 BuildRequires:  openldap2-devel
@@ -141,6 +143,7 @@
 %endif
 # Needed for creating the ccache and some GSSAPI steps in sasl
 Requires:       krb5
+%sysusers_requires
 # 389-ds does not directly require gssapi, but it is needed for
 # ldap gssapi auth, so we recommend it.
 # This used to be a requirement, but it's actually optional.
@@ -155,7 +158,7 @@
 PreReq:         permissions
 Obsoletes:      389-ds-base < %{version}-%{release}
 Provides:       389-ds-base = %{version}-%{release}
-%{?systemd_requires}
+%{?systemd_ordering}
 
 %description
 389 Directory Server is a full-featured LDAPv3 compliant server. In
@@ -257,6 +260,7 @@
 %patch1 -p1
 
 %build
+%sysusers_generate_pre %{SOURCE10} %{user_group}
 # Make sure python3 is used in shebangs
 # FIX ME!!  This should be fixed in the source code !!!
 sed -r -i '1s|^#!\s*%{_bindir}.*python.*|#!%{_bindir}/%{use_python}|' 
ldap/admin/src/scripts/{*.py,ds-replcheck} src/lib389/cli/ds*
@@ -322,6 +326,7 @@
 mkdir -p %{buildroot}%{logdir}
 mkdir -p %{buildroot}%{homedir}
 mkdir -p %{buildroot}%{lockdir}
+mkdir -p %{buildroot}%{_sysusersdir}
 
 #remove libtool archives and static libs
 find %{buildroot} -type f -name "*.la" -delete -print
@@ -341,14 +346,9 @@
 rm -rv %{buildroot}/usr/share/metainfo/389-console/
 mv src/svrcore/README{,.svrcore}
 mv src/svrcore/LICENSE{,.svrcore}
+install -m 0644 %{SOURCE10} %{buildroot}%{_sysusersdir}/
 
-%pre
-if ! getent group %{user_group} >/dev/null; then
-  %{_sbindir}/groupadd -f -r %{user_group}
-fi
-if ! getent passwd %{user_group} >/dev/null; then
-  %{_sbindir}/useradd  -r -g %{user_group} -s /sbin/nologin -r -d %{homedir} 
-c "User for 389 directory server" %{user_group}
-fi
+%pre -f %{user_group}.pre
 
 %post
 %fillup_only -n dirsrv
@@ -389,6 +389,7 @@
 %defattr(-,root,root)
 %doc README*
 %license LICENSE LICENSE.openldap
+%{_sysusersdir}/%{user_group}-user.conf
 %dir %attr(-,%{user_group},%{user_group}) %{homedir}
 %dir %attr(-,%{user_group},%{user_group}) %{logdir}
 %config(noreplace) %{_sysconfdir}/dirsrv/config/*

++++++ dirsrv-user.conf ++++++
#Type Name       ID  GECOS                            Home directory  Shell
g     dirsrv     -   -
u     dirsrv     -   "User for 389 directory server"  /var/lib/dirsrv 
/sbin/nologin

Reply via email to