setroubleshoot/setroubleshoot.spec

198 lines
7.2 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 11:16:54 -04:00
Name: setroubleshoot
2023-07-19 10:28:17 +08:00
Version: 3.3.32
Release: 2
2019-09-30 11:16:54 -04:00
Summary: SELinux Trouble Shooting Tool
License: GPLv2+
2023-07-19 10:28:17 +08:00
URL: https://gitlab.com/setroubleshoot/setroubleshoot
2019-09-30 11:16:54 -04:00
2023-07-19 10:28:17 +08:00
Source0: https://gitlab.com/setroubleshoot/setroubleshoot/-/archive/%{version}/%{name}-%{version}.tar.gz
2019-09-30 11:16:54 -04:00
Source1: %{name}.tmpfiles
Patch9000: Fix-config-file-to-deny-noraml-user-to-stop-Setroubleshootd.patch
BuildRequires: gcc libcap-ng-devel intltool gettext python3 python3-devel python3-setuptools python3-wheel
2019-09-30 11:16:54 -04:00
BuildRequires: desktop-file-utils dbus-glib-devel gtk2-devel libnotify-devel audit-libs-devel libselinux-devel polkit-devel
2023-07-19 10:28:17 +08:00
BuildRequires: python3-libselinux python3-dasbus python3-gobject gtk3-devel xdg-utils python3-pip
2019-09-30 11:16:54 -04:00
Requires: %{name}-server = %{version}-%{release}
Requires: gtk3, libnotify libreport python3-libreport python3-gobject python3-dasbus xdg-utils
2019-09-30 11:16:54 -04:00
Requires(post): desktop-file-utils
Requires(post): dbus
Requires(postun): desktop-file-utils
Requires(postun): dbus
%description
SELinux Trouble Shooting Tool
%package server
Summary: SELinux troubleshoot server
Requires: %{name}-plugins >= 3.3.8
Requires: audit >= 2.8.5
2019-09-30 11:16:54 -04:00
Requires: python3-audit
Requires: python3-libxml2
Requires: python3-rpm
Requires: python3-libselinux
Requires: policycoreutils-python-utils
BuildRequires: intltool gettext python3
BuildRequires: python3-devel
Requires: python3-slip python3-systemd
Requires: python3-gobject >= 3.11
Requires: dbus
Requires: python3-dbus python3-dasbus
2019-09-30 11:16:54 -04:00
Requires: polkit
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
%description server
Provides tools to help diagnose SELinux problems. When AVC messages
are generated an alert can be generated that will give information
about the problem and help track its resolution. Alerts can be configured
to user preference. The same tools can be run on existing log files.
%package legacy
Summary: SELinux troubleshoot legacy applet
Requires: gtk2
Requires: %{name} = %{version}-%{release}
%description legacy
SELinux troubleshoot legacy applet
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
2019-09-30 11:16:54 -04:00
%build
2023-07-19 10:28:17 +08:00
./autogen.sh
2019-09-30 11:16:54 -04:00
%global _python_bytecompile_extra 0
%configure PYTHON=%{__python3} --enable-seappletlegacy=yes --with-auditpluginsdir=/etc/audit/plugins.d
%make_build V=1
%install
%make_install PREFIX=%{_prefix}
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications %{buildroot}/%{_datadir}/applications/%{name}.desktop
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}
mkdir -p %{buildroot}%{_rundir}/setroubleshoot
touch %{buildroot}%{_localstatedir}/lib/%{name}/setroubleshoot_database.xml
touch %{buildroot}%{_localstatedir}/lib/%{name}/email_alert_recipients
# create /run/setroubleshoot on boot
install -m644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
%find_lang %{name}
%post
dbus-send --system /com/redhat/setroubleshootd com.redhat.SEtroubleshootdIface.restart string:'rpm install' >/dev/null 2>&1 || :
/sbin/service auditd reload >/dev/null 2>&1 || :
2019-09-30 11:16:54 -04:00
%postun
/sbin/service auditd reload >/dev/null 2>&1 || :
2019-09-30 11:16:54 -04:00
%pre server
getent passwd setroubleshoot >/dev/null || useradd -r -U -s /sbin/nologin -d %{_localstatedir}/lib/%{name} setroubleshoot
%post server
/sbin/service auditd reload >/dev/null 2>&1 || :
2019-09-30 11:16:54 -04:00
%postun server
/sbin/service auditd reload >/dev/null 2>&1 || :
2019-09-30 11:16:54 -04:00
%triggerun server -- %{name}-server < 3.2.24-4
chown -R setroubleshoot:setroubleshoot %{_localstatedir}/lib/%{name}
%files
2019-11-06 19:52:17 +08:00
%license COPYING
2019-09-30 11:16:54 -04:00
%{_bindir}/seapplet
%config(noreplace) %{_sysconfdir}/xdg/autostart/*
%{_datadir}/%{name}/gui
%{_datadir}/applications/*.desktop
2023-07-19 10:28:17 +08:00
%{_datadir}/metainfo/*.appdata.xml
%{_datadir}/dbus-1/services/org.fedoraproject.sealert.service
2019-09-30 11:16:54 -04:00
%{_datadir}/icons/hicolor/*/*/*
%dir %attr(0755,root,root) %{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}/browser.py
%{python3_sitelib}/%{name}/gui_utils.py
%{python3_sitelib}/%{name}/__pycache__/browser.cpython*
%{python3_sitelib}/%{name}/__pycache__/gui_utils.cpython*
%files server -f %{name}.lang
%{_bindir}/sealert
%{_sbindir}/sedispatch
%{_sbindir}/setroubleshootd
2023-07-19 10:28:17 +08:00
%{python3_sitelib}/setroubleshoot*.dist-info
2019-09-30 11:16:54 -04:00
%dir %attr(0755,root,root) %{_sysconfdir}/%{name}
%dir %{python3_sitelib}/%{name}
%dir %{python3_sitelib}/%{name}/__pycache__
%{python3_sitelib}/%{name}/*.py
%exclude %{python3_sitelib}/%{name}/browser.py
%exclude %{python3_sitelib}/%{name}/gui_utils.py
%{python3_sitelib}/%{name}/__pycache__/*.cpython*
%exclude %{python3_sitelib}/%{name}/__pycache__/browser.cpython*
%exclude %{python3_sitelib}/%{name}/__pycache__/gui_utils.cpython*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/SetroubleshootFixit.py
2021-01-22 14:07:58 +08:00
%{_datadir}/%{name}/SetroubleshootPrivileged.py
2019-09-30 11:16:54 -04:00
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.fedoraproject.Setroubleshootd.conf
2021-01-22 14:07:58 +08:00
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.fedoraproject.SetroubleshootPrivileged.conf
2019-09-30 11:16:54 -04:00
%attr(0700,setroubleshoot,setroubleshoot) %dir %{_localstatedir}/lib/%{name}
%ghost %attr(0600,setroubleshoot,setroubleshoot) %{_localstatedir}/lib/%{name}/setroubleshoot_database.xml
%ghost %attr(0644,setroubleshoot,setroubleshoot) %{_localstatedir}/lib/%{name}/email_alert_recipients
%config /etc/audit/plugins.d/sedispatch.conf
2023-07-19 10:28:17 +08:00
%{_unitdir}/setroubleshootd.service
2019-09-30 11:16:54 -04:00
%{_datadir}/dbus-1/system-services/org.fedoraproject.Setroubleshootd.service
2021-01-22 14:07:58 +08:00
%{_datadir}/dbus-1/system-services/org.fedoraproject.SetroubleshootPrivileged.service
2019-09-30 11:16:54 -04:00
%{_datadir}/polkit-1/actions/org.fedoraproject.setroubleshootfixit.policy
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.fedoraproject.SetroubleshootFixit.conf
%{_datadir}/dbus-1/system-services/org.fedoraproject.SetroubleshootFixit.service
%attr(0644,root,root) %{_tmpfilesdir}/%{name}.conf
%attr(0711,setroubleshoot,setroubleshoot) %dir %{_rundir}/setroubleshoot
%doc AUTHORS COPYING ChangeLog DBUS.md NEWS README TODO
%files legacy
%{_bindir}/seappletlegacy
%files help
%{_docdir}/%{name}*
%{_mandir}/man8/sealert.8.gz
%{_mandir}/man8/sedispatch.8.gz
%{_mandir}/man8/setroubleshootd.8.gz
%{_mandir}/man1/seapplet.1.gz
%changelog
* Wed Dec 4 2024 xuce <xuce10@h-partners.com> - 3.3.32-2
- add BuildRequires: python3-setuptools and python3-wheel
2023-07-19 10:28:17 +08:00
* Thu Jul 20 2023 zhangguangzhi <zhangguangzhi3@huawei.com> - 3.3.32-1
- update version to 3.3.32
* Mon Jan 30 2023 wangyunjia <yunjia.wang@huawei.com> - 3.3.26-1
- update version to 3.3.26
* Thu Nov 17 2022 shenxiangwei <shenxiangwei1@huawei.com> - 3.3.24-5
- Fix the dependency on the formatter class of python-3.10.
* Mon Dec 27 2021 Hugel <gengqihu1@huawei.com> - 3.3.24-4
- Fix the problem when setroubleshoot is installed, or updated.
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 3.3.24-3
- DESC: delete -S git from %autosetup, and delete BuildRequires git
* Tue Mar 16 2021 yixiangzhike <zhangxingliang3@huawei.com> - 3.3.24-2
- add "Requires: python3-pydbus" for subpackage setroubleshoot-server
2021-01-22 14:07:58 +08:00
* Fri Jan 22 2021 yixiangzhike <zhangxingliang3@huawei.com> - 3.3.24-1
- update to 3.3.24
* Tue Dec 15 2020 panxiaohe <panxiaohe@huawei.com> - 3.3.20-4
- Fix config file to deny noraml user to stop Setroubleshootd.
* Thu Aug 20 2020 wangchen <wangchen137@huawei.com> - 3.3.20-3
- fix the failure of building for audit downgrade
2019-11-06 19:52:17 +08:00
* Thu Oct 10 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.3.20-2
- add COPYING to license directory
2019-09-30 11:16:54 -04:00
* Tue Aug 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.3.20-1
- Package init