Add support for Image Mode

Resolves: RHEL-114454
This commit is contained in:
Vitezslav Crhonek 2025-09-29 10:29:02 +02:00
parent 9b49a9ad15
commit 59cd5120d5
2 changed files with 29 additions and 7 deletions

View File

@ -8,7 +8,7 @@ Name: sblim-sfcb
Summary: Small Footprint CIM Broker
URL: http://sblim.wiki.sourceforge.net/
Version: 1.4.9
Release: 35%{?dist}
Release: 36%{?dist}
License: EPL-1.0
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
Source1: sfcb.service
@ -16,6 +16,8 @@ Source1: sfcb.service
Source2: sfcbdump.1.gz
Source3: sfcbinst2mof.1.gz
Source4: sfcbtrace.1.gz
# /etc/tmpfiles.d configuration file
Source5: sblim-sfcb.tmpfiles
# Patch0: changes schema location to the path we use
Patch0: sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch
# Patch1: Fix provider debugging - variable for stopping wait-for-debugger
@ -87,6 +89,12 @@ Programming Interface (CMPI).
%patch -P10 -p1 -b .docdir-license
%patch -P11 -p1 -b .post-quantum
# Create a sysusers.d config file
cat >sblim-sfcb.sysusers.conf <<EOF
g sfcb -
m root sfcb
EOF
%build
%configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 \
--enable-slp --enable-large_volume_support --enable-optimized-enumeration --enable-relax-mofsyntax \
@ -121,29 +129,41 @@ echo "%{_libdir}/sfcb/*.so" >> _pkg_list
cat _pkg_list
%pre
/usr/bin/getent group sfcb >/dev/null || /usr/sbin/groupadd -r sfcb
/usr/sbin/usermod -a -G sfcb root > /dev/null 2>&1 || :
install -m0644 -D sblim-sfcb.sysusers.conf %{buildroot}%{_sysusersdir}/sblim-sfcb.conf
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
install -p -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/%{_tmpfilesdir}/sblim-sfcb.conf
%post
%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb &>/dev/null || :
/sbin/ldconfig
%{_bindir}/sfcbrepos -f > /dev/null 2>&1
%systemd_post sblim-sfcb.service
# copy content of /var/lib/sfcb to temporary place for Image Mode
(mkdir -p /usr/share/factory/var/lib && cp -a /var/lib/sfcb /usr/share/factory/var/lib/sfcb) >/dev/null 2>&1 || :;
%preun
%systemd_preun sblim-sfcb.service
if [ $1 -eq 0 ]; then
# Package removal, not upgrade
rm -rf /usr/share/factory/var/lib/sfcb
fi
%postun
/sbin/ldconfig
%systemd_postun_with_restart sblim-sfcb.service
if [ $1 -eq 0 ]; then
/usr/sbin/groupdel sfcb > /dev/null 2>&1 || :;
fi;
%files -f _pkg_list
%{_sysusersdir}/sblim-sfcb.conf
%{_tmpfilesdir}/sblim-sfcb.conf
%changelog
* Mon Sep 29 2025 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.9-36
- Add sysusers.d config file to allow rpm to create users/groups automatically
and drop attempt to delete group
Related: RHEL-114454
- Add support for Image Mode
Resolves: RHEL-114454
* Thu Aug 07 2025 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.4.9-35
- Support added for post-quantum cryptography
Resolves: RHEL-93092

2
sblim-sfcb.tmpfiles Normal file
View File

@ -0,0 +1,2 @@
# populate /var/lib/sfcb with content from /usr/share/factory/var/lib/sfcb
C /var/lib/sfcb - - - -