oddjob/oddjob.spec

136 lines
4.7 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 11:10:27 -04:00
Name: oddjob
2021-01-28 16:07:20 +08:00
Version: 0.34.7
2024-07-08 02:59:14 +00:00
Release: 4
2019-09-30 11:10:27 -04:00
URL: https://pagure.io/oddjob
Source0: https://releases.pagure.org/oddjob/oddjob-%{version}.tar.gz
Summary: A D-Bus service which runs odd jobs on behalf of client applications
License: BSD
2022-08-12 09:22:42 +08:00
2022-11-25 16:12:39 +08:00
Patch0: 0000-add-expected_stdout-for-test-018.patch
2024-07-08 02:59:14 +00:00
Patch1: backport-build-Replace-SELinux-deprecated-functions.patch
Patch2: backport-Replace-deprecated-libxml2-calls.patch
Patch3: backport-Fix-implicit-cast-from-const-to-non-const.patch
2022-08-12 09:22:42 +08:00
2019-09-30 11:10:27 -04:00
BuildRequires: gcc dbus-devel >= 0.22, dbus-x11, libselinux-devel, libxml2-devel docbook-dtds, xmlto
2020-10-30 10:17:59 +08:00
BuildRequires: pam-devel, python3-devel, pkgconfig cyrus-sasl-devel, krb5-devel, openldap-devel
2019-09-30 11:10:27 -04:00
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun):systemd-units
Requires(post): systemd-sysv /usr/bin/dbus-send grep sed psmisc
Requires: dbus
Obsoletes: oddjob-devel < 0.30, oddjob-libs < 0.30, oddjob-python < 0.30
Provides: %{name}-mkhomedir = %{version}-%{release}
Obsoletes: %{name}-mkhomedir < %{version}-%{release}
Provides: config(oddjob-mkhomedir) = %{version}-%{release}
%description
The oddjobd service receives requests to do things over the D-Bus system bus.
Depending on whether or not the requesting user is authorized to have oddjobd
do what it asked, the daemon will spawn a helper process to actually do the work.
When the helper exits, oddjobd collects its output and exit status and sends them
back to the original requester.
It's kind of like CGI, except it's for D-Bus instead of a web server.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%configure --disable-static --enable-pie --enable-now --with-selinux-acls --with-selinux-labels \
--without-python --enable-xml-docs --enable-compat-dtd --enable-systemd --disable-sysvinit
make %{_smp_mflags}
%install
rm -rf %{buildroot}
%make_install
%delete_la_and_a
mkdir -p sample-install-root/sample/{%{_sysconfdir}/{dbus-1/system.d,%{name}d.conf.d},%{_libdir}/%{name}}
install -m644 sample/oddjobd-sample.conf sample-install-root/sample/%{_sysconfdir}/%{name}d.conf.d/
install -m644 sample/oddjob-sample.conf sample-install-root/sample/%{_sysconfdir}/dbus-1/system.d/
install -m755 sample/oddjob-sample.sh sample-install-root/sample/%{_libdir}/%{name}/
chmod -x src/reload src/mkhomedirfor src/mkmyhomedir
touch -r src/oddjobd-mkhomedir.conf.in %{buildroot}/%{_sysconfdir}/oddjobd.conf.d/oddjobd-mkhomedir.conf
touch -r src/oddjob-mkhomedir.conf.in %{buildroot}/%{_sysconfdir}/dbus-1/system.d/oddjob-mkhomedir.conf
2020-02-14 15:42:44 +08:00
%check
make check
2019-09-30 11:10:27 -04:00
%post
if test $1 -eq 1 ; then
killall -HUP dbus-daemon 2>&1 > /dev/null
fi
%systemd_post oddjobd.service
cfg=%{_sysconfdir}/oddjobd.conf.d/oddjobd-mkhomedir.conf
if grep -q %{_libdir}/%{name}/mkhomedir $cfg ; then
sed -i 's^%{_libdir}/%{name}/mkhomedir^%{_libexecdir}/%{name}/mkhomedir^g' $cfg
fi
if test $1 -eq 1 ; then
killall -HUP dbus-daemon 2>&1 > /dev/null
fi
exit 0
%postun
%systemd_postun_with_restart oddjobd.service
exit 0
%preun
%systemd_preun oddjobd.service
exit 0
%triggerun -- oddjobd < 0.31.3
%{_bindir}/systemd-sysv-convert --save oddjobd >/dev/null 2>&1 ||:
/sbin/chkconfig --del oddjobd >/dev/null 2>&1 || :
/bin/systemctl try-restart oddjobd.service >/dev/null 2>&1 || :
exit 0
%files
%doc *.dtd COPYING src/reload sample-install-root/sample src/mkhomedirfor src/mkmyhomedir
%{_unitdir}/oddjobd.service
%{_bindir}/*
%{_sbindir}/*
%config(noreplace) %{_sysconfdir}/dbus-*/system.d/oddjob.conf
%config(noreplace) %{_sysconfdir}/oddjobd.conf
%dir %{_sysconfdir}/oddjobd.conf.d
%config(noreplace) %{_sysconfdir}/oddjobd.conf.d/*
%config(noreplace) %{_sysconfdir}/dbus-*/system.d/oddjob-mkhomedir.conf
%dir %{_sysconfdir}/%{name}
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/*
%{_libdir}/security/pam_oddjob_mkhomedir.so
%files help
%doc NEWS QUICKSTART doc/oddjob.html
%{_mandir}/*/*
%changelog
2024-07-08 02:59:14 +00:00
* Wed Jul 31 2024 yanglongkang <yanglongkang@h-partners.com> - 0.34.7-4
- Replace SELinux deprecated functions
- Replace deprecated libxml2 calls
- Fix implicit cast from const to non const
2022-11-25 16:12:39 +08:00
* Fri Nov 25 2022 yanglongkang <yanglongkang@h-partners.com> - 0.34.7-3
- rename the patch
2022-08-12 09:22:42 +08:00
* Fri Aug 12 2022 shixuantong <shixuantong@h-partners.com> - 0.34.7-2
- add expected_stdout for test 018
2021-01-28 16:07:20 +08:00
* Thu Jan 28 2021 yuanxin <yuanxin24@huawei.com> - 0.34.7-1
- upgread version to 0.34.7
2020-10-30 10:17:59 +08:00
2020-07-22 09:23:40 +08:00
* Wed Jul 22 2020 shixuantong <shixuantong@huawei.com> - 0.34.6-1
- update to 0.34.6-1
2020-04-08 10:24:53 +08:00
* Wed Apr 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.34.4-9
- Delete redundant scripts and file
2020-02-14 15:42:44 +08:00
* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.34.4-8
- Enable check
2019-09-30 11:10:27 -04:00
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.34.4-7
- Package init