- Remove tests package so we don't have to ship a test PAM module

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=126
This commit is contained in:
Adam Majer 2023-06-14 10:16:36 +00:00 committed by Git OBS Bridge
parent 135547e985
commit 2940c85d64
2 changed files with 16 additions and 4 deletions

View File

@ -3,6 +3,7 @@ Tue Jun 13 12:39:20 UTC 2023 - Adam Majer <adam.majer@suse.de>
- Add fake openSUSE branding target when building on non-openSUSE
builds so branding does not need to be removed
- Remove tests package so we don't have to ship a test PAM module
-------------------------------------------------------------------
Fri Jun 2 13:26:45 UTC 2023 - Adam Majer <adam.majer@suse.de>

View File

@ -85,6 +85,10 @@ Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
%define build_optional 1
%endif
%if 0%{?build_optional} && 0%{?suse_version} == 0
%define build_tests 1
%endif
# Allow root login in Cockpit on RHEL 8 and lower as it also allows password login over SSH.
%if 0%{?rhel} && 0%{?rhel} <= 8
%define disallow_root 0
@ -368,16 +372,19 @@ rm -rf %{buildroot}%{python3_sitelib}/cockpit-%{version}.dist-info/
for pkg in apps packagekit pcp playground storaged; do
rm -rf %{buildroot}/%{_datadir}/cockpit/$pkg
done
# files from -tests
rm -f %{buildroot}/%{pamdir}/mock-pam-conv-mod.so
rm -f %{buildroot}/%{_unitdir}/cockpit-session.socket
rm -f %{buildroot}/%{_unitdir}/cockpit-session@.service
# files from -pcp
rm -r %{buildroot}/%{_libexecdir}/cockpit-pcp %{buildroot}/%{_localstatedir}/lib/pcp/
# files from -storaged
rm -f %{buildroot}/%{_prefix}/share/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml
%endif
%if 0%{?build_tests} == 0
rm -rf %{buildroot}%{_datadir}/cockpit/playground
rm -f %{buildroot}/%{pamdir}/mock-pam-conv-mod.so
rm -f %{buildroot}/%{_unitdir}/cockpit-session.socket
rm -f %{buildroot}/%{_unitdir}/cockpit-session@.service
%endif
sed -i "s|%{buildroot}||" *.list
%if 0%{?suse_version}
@ -792,6 +799,7 @@ The Cockpit component for managing storage. This package uses udisks.
%dir %{_datadir}/cockpit/storaged/images
%{_datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml
%if 0%{?build_tests}
%package -n cockpit-tests
Summary: Tests for Cockpit
Requires: cockpit-bridge >= %{required_base}
@ -808,6 +816,9 @@ These files are not required for running Cockpit.
%{_unitdir}/cockpit-session.socket
%{_unitdir}/cockpit-session@.service
# /build_tests
%endif
%package devel
Summary: Development files for for Cockpit