-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing support for OpenSUSE Tumbleweed #21335
base: main
Are you sure you want to change the base?
Changes from 1 commit
e0f2280
ab4302e
4cc003e
eecfb6a
0a8d287
ec698d4
0924383
5c1232f
d1dcb7f
575f84b
d1089ae
8523738
bf240b5
8b21fe4
4d8c106
9be58b2
2517341
796b087
36eee2b
d7ec9fd
8bd5ad4
6e78bd5
e71a3e2
ec0b8ef
8797635
3a04ac5
b1f4327
d4fcabb
adc139a
e531951
89abe03
37ed3bd
d43386d
fd91467
bc781e4
78beade
a55f6f4
1cee618
e8408c3
7c04921
e57f1fb
dba53de
6703137
d722fbc
6b79abd
fa069fa
916efb9
cd30555
c878e1e
4ed8264
80e8852
6b8f564
4c242ee
832c835
20bb19e
17c5595
58e6d98
64ec395
05fc7c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,16 +155,21 @@ BuildRequires: python3-pytest-timeout | |
%check | ||
make -j$(nproc) check | ||
|
||
%if 0%{?rhel} == 0 | ||
%if 0%{?rhel} == 0 && 0%{?suse_version} == 0 | ||
export NO_QUNIT=1 | ||
%pytest | ||
%endif | ||
|
||
%install | ||
%make_install | ||
make install-tests DESTDIR=%{buildroot} | ||
%if 0%{?suse_version} > 1500 | ||
mkdir -p $RPM_BUILD_ROOT%{_pam_vendordir} | ||
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_pam_vendordir}/cockpit | ||
%else | ||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d | ||
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit | ||
%endif | ||
rm -f %{buildroot}/%{_libdir}/cockpit/*.so | ||
install -D -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/ | ||
|
||
|
@@ -218,7 +223,22 @@ find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list | |
|
||
sed -i "s|%{buildroot}||" *.list | ||
|
||
%if ! 0%{?suse_version} | ||
%if 0%{?suse_version} | ||
# remove brandings with stale symlinks. Means they don't match | ||
# the distro. | ||
pushd %{buildroot}/%{_datadir}/cockpit/branding | ||
ls --hide={default,kubernetes,opensuse,registry,sle-micro,suse} | xargs rm -rv | ||
popd | ||
# need this in SUSE as post build checks dislike stale symlinks | ||
install -m 644 -D /dev/null %{buildroot}/run/cockpit/motd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh 😁 |
||
test -e %{buildroot}/usr/share/cockpit/branding/opensuse/default-1920x1200.jpg || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/opensuse/default-1920x1200.jpg | ||
test -e %{buildroot}/usr/share/cockpit/branding/sle-micro/apple-touch-icon.png || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/sle-micro/apple-touch-icon.png | ||
test -e %{buildroot}/usr/share/cockpit/branding/sle-micro/default-1920x1200.png || install -m 644 -D /dev/null %{buildroot}/usr/share/cockpit/branding/sle-micro/default-1920x1200.png | ||
# remove files of not installable packages | ||
rm -r %{buildroot}%{_datadir}/cockpit/sosreport | ||
rm -f %{buildroot}/%{_prefix}/share/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml | ||
rm -f %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png | ||
%else | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This "else" is weird. It combines two completely unrelated things, fixing symlinks and disabling the debug package. Please drop this else and keep the existing |
||
%global _debugsource_packages 1 | ||
%global _debuginfo_subpackages 0 | ||
|
||
|
@@ -348,6 +368,12 @@ Recommends: system-logos | |
Suggests: sssd-dbus >= 2.6.2 | ||
# for cockpit-desktop | ||
Suggests: python3 | ||
%if 0%{?suse_version} | ||
Provides: group(cockpit-ws) | ||
Provides: group(cockpit-wsinstance) | ||
Provides: user(cockpit-ws) | ||
Provides: user(cockpit-wsinstance) | ||
%endif | ||
Comment on lines
+371
to
+376
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is all obsolete, current main doesn't use any static or even sysusers.d users any more. It's just |
||
|
||
# prevent hard python3 dependency for cockpit-desktop, it falls back to other browsers | ||
%global __requires_exclude_from ^%{_libexecdir}/cockpit-client$ | ||
|
@@ -366,11 +392,18 @@ authentication via sssd/FreeIPA. | |
%doc %{_mandir}/man8/pam_ssh_add.8.gz | ||
%dir %{_sysconfdir}/cockpit | ||
%config(noreplace) %{_sysconfdir}/cockpit/ws-certs.d | ||
%if 0%{?suse_version} > 1500 | ||
%{_pam_vendordir}/cockpit | ||
%else | ||
%config(noreplace) %{_sysconfdir}/pam.d/cockpit | ||
%endif | ||
# created in %post, so that users can rm the files | ||
%ghost %{_sysconfdir}/issue.d/cockpit.issue | ||
%ghost %{_sysconfdir}/motd.d/cockpit | ||
%ghost %attr(0644, root, root) %{_sysconfdir}/cockpit/disallowed-users | ||
%if 0%{?suse_version} | ||
%ghost /run/cockpit/motd | ||
%endif | ||
%dir %{_datadir}/cockpit/motd | ||
%{_datadir}/cockpit/motd/update-motd | ||
%{_datadir}/cockpit/motd/inactive.motd | ||
|
@@ -465,7 +498,11 @@ fi | |
Summary: Cockpit user interface for kernel crash dumping | ||
Requires: cockpit-bridge >= %{required_base} | ||
Requires: cockpit-shell >= %{required_base} | ||
%if 0%{?suse_version} | ||
Requires: kexec-tools | ||
%else | ||
Requires: /usr/bin/kdumpctl | ||
%endif | ||
BuildArch: noarch | ||
|
||
%description kdump | ||
|
@@ -474,6 +511,8 @@ The Cockpit component for configuring kernel crash dumping. | |
%files kdump -f kdump.list | ||
%{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml | ||
|
||
# sosreport is not supported on opensuse yet | ||
%if !0%{?suse_version} | ||
%package sosreport | ||
Summary: Cockpit user interface for diagnostic reports | ||
Requires: cockpit-bridge >= %{required_base} | ||
|
@@ -488,6 +527,7 @@ sosreport tool. | |
%files sosreport -f sosreport.list | ||
%{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml | ||
%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png | ||
%endif | ||
|
||
%package networkmanager | ||
Summary: Cockpit user interface for networking, using NetworkManager | ||
|
@@ -512,7 +552,10 @@ The Cockpit component for managing networking. This package uses NetworkManager | |
Summary: Cockpit SELinux package | ||
Requires: cockpit-bridge >= %{required_base} | ||
Requires: cockpit-shell >= %{required_base} | ||
Requires: setroubleshoot-server >= 3.3.3 | ||
# setroubleshoot is available on SLE Micro starting with 5.5 | ||
%if !0%{?is_smo} || ( 0%{?is_smo} && 0%{?sle_version} >= 150500 ) | ||
Requires: setroubleshoot-server >= 3.3.3 | ||
%endif | ||
Comment on lines
+555
to
+558
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It IMHO doesn't make sense to build cockpit-selinux without setroubleshoot. Perhaps just skip the entire |
||
BuildArch: noarch | ||
|
||
%description selinux | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOI, Is that /usr/lib/pam.d/ ? Indeed I've wanted that for Fedora/RHEL as well, we just need a transition to remove an unmodified file in /etc.