diff --git a/.cockpit.metadata b/.cockpit.metadata index a911134..2ee1446 100644 --- a/.cockpit.metadata +++ b/.cockpit.metadata @@ -1 +1 @@ -f6ef6cb2c7e67bee98efc3e6dd0cbede1ebde6dd SOURCES/cockpit-323.tar.xz +9ca68a08a8534148bfc3372ea1a5670c2d5da6db SOURCES/cockpit-333.tar.xz diff --git a/.gitignore b/.gitignore index 89a9b25..5ee7e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/cockpit-323.tar.xz +SOURCES/cockpit-333.tar.xz diff --git a/SPECS/cockpit.spec b/SPECS/cockpit.spec index fe053b2..de880ee 100644 --- a/SPECS/cockpit.spec +++ b/SPECS/cockpit.spec @@ -49,7 +49,7 @@ Summary: Web Console for Linux servers License: LGPL-2.1-or-later URL: https://cockpit-project.org/ -Version: 323 +Version: 333 Release: 1%{?dist} Source0: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.xz @@ -57,14 +57,6 @@ Source0: https://github.com/cockpit-project/cockpit/releases/download/%{v ExcludeArch: %{ix86} %endif -# pcp stopped building on ix86 in Fedora 40+, and broke hard on 39: https://bugzilla.redhat.com/show_bug.cgi?id=2284431 -%define build_pcp 1 -%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10 -%ifarch %ix86 -%define build_pcp 0 -%endif -%endif - %define enable_multihost 1 %if 0%{?fedora} >= 41 || 0%{?rhel} >= 10 %define enable_multihost 0 @@ -84,7 +76,6 @@ BuildRequires: autoconf automake BuildRequires: make BuildRequires: python3-devel BuildRequires: gettext >= 0.21 -BuildRequires: libssh-devel >= 0.8.5 BuildRequires: openssl-devel BuildRequires: gnutls-devel >= 3.4.3 BuildRequires: zlib-devel @@ -98,19 +89,10 @@ BuildRequires: glib2-devel >= 2.50.0 BuildRequires: systemd-devel >= 235 %if 0%{?suse_version} BuildRequires: distribution-release -%if %{build_pcp} -BuildRequires: libpcp-devel -BuildRequires: pcp-devel -BuildRequires: libpcp3 -BuildRequires: libpcp_import1 -%endif BuildRequires: openssh BuildRequires: distribution-logos BuildRequires: wallpaper-branding %else -%if %{build_pcp} -BuildRequires: pcp-libs-devel -%endif BuildRequires: openssh-clients BuildRequires: docbook-style-xsl %endif @@ -133,7 +115,7 @@ Requires: cockpit-system # Optional components Recommends: (cockpit-storaged if udisks2) Recommends: (cockpit-packagekit if dnf) -Suggests: cockpit-pcp +Suggests: python3-pcp %if 0%{?rhel} == 0 Recommends: (cockpit-networkmanager if NetworkManager) @@ -150,11 +132,8 @@ BuildRequires: python3-pip %if 0%{?rhel} == 0 && !0%{?suse_version} # All of these are only required for running pytest (which we only do on Fedora) BuildRequires: procps-ng -BuildRequires: pyproject-rpm-macros BuildRequires: python3-pytest-asyncio -BuildRequires: python3-pytest-cov BuildRequires: python3-pytest-timeout -BuildRequires: python3-tox-current-env %endif %prep @@ -167,9 +146,6 @@ BuildRequires: python3-tox-current-env --docdir=%_defaultdocdir/%{name} \ %endif --with-pamdir='%{pamdir}' \ -%if %{build_pcp} == 0 - --disable-pcp \ -%endif %if %{enable_multihost} --enable-multihost \ %endif @@ -180,12 +156,12 @@ BuildRequires: python3-tox-current-env make -j$(nproc) check %if 0%{?rhel} == 0 -%tox +export NO_QUNIT=1 +%pytest %endif %install %make_install -make install-tests DESTDIR=%{buildroot} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit rm -f %{buildroot}/%{_libdir}/cockpit/*.so @@ -198,12 +174,6 @@ echo '%dir %{_datadir}/cockpit/base1' >> base.list find %{buildroot}%{_datadir}/cockpit/base1 -type f -o -type l >> base.list echo '%{_sysconfdir}/cockpit/machines.d' >> base.list echo %{buildroot}%{_datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy >> base.list -echo '%{_libexecdir}/cockpit-ssh' >> base.list - -%if %{build_pcp} -echo '%dir %{_datadir}/cockpit/pcp' > pcp.list -find %{buildroot}%{_datadir}/cockpit/pcp -type f >> pcp.list -%endif echo '%dir %{_datadir}/cockpit/shell' >> system.list find %{buildroot}%{_datadir}/cockpit/shell -type f >> system.list @@ -238,9 +208,6 @@ find %{buildroot}%{_datadir}/cockpit/apps -type f >> packagekit.list echo '%dir %{_datadir}/cockpit/selinux' > selinux.list find %{buildroot}%{_datadir}/cockpit/selinux -type f >> selinux.list -echo '%dir %{_datadir}/cockpit/playground' > tests.list -find %{buildroot}%{_datadir}/cockpit/playground -type f >> tests.list - echo '%dir %{_datadir}/cockpit/static' > static.list echo '%dir %{_datadir}/cockpit/static/fonts' >> static.list find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list @@ -260,11 +227,11 @@ rm -rf %{buildroot}/usr/src/debug # On RHEL kdump, networkmanager, selinux, and sosreport are part of the system package %if 0%{?rhel} cat kdump.list sosreport.list networkmanager.list selinux.list >> system.list -rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml -rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml -rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml -rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml -rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png +rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml +rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml +rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_selinux.metainfo.xml +rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_networkmanager.metainfo.xml +rm -f %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png %endif # ------------------------------------------------------------------------------- @@ -281,22 +248,13 @@ troubleshooting, interactive command-line sessions, and more. %{_docdir}/cockpit/AUTHORS %{_docdir}/cockpit/COPYING %{_docdir}/cockpit/README.md -%{_datadir}/metainfo/cockpit.appdata.xml -%{_datadir}/pixmaps/cockpit.png +%{_datadir}/metainfo/org.cockpit_project.cockpit.appdata.xml +%{_datadir}/icons/hicolor/128x128/apps/cockpit.png %doc %{_mandir}/man1/cockpit.1.gz %package bridge Summary: Cockpit bridge server-side component -Requires: glib-networking -Provides: cockpit-ssh = %{version}-%{release} -# 233 dropped jquery.js, pages started to bundle it (commit 049e8b8dce) -Conflicts: cockpit-dashboard < 233 -Conflicts: cockpit-networkmanager < 233 -Conflicts: cockpit-storaged < 233 -Conflicts: cockpit-system < 233 -Conflicts: cockpit-tests < 233 -Conflicts: cockpit-docker < 233 %description bridge The Cockpit bridge component installed server side and runs commands on the @@ -337,7 +295,6 @@ Provides: cockpit-shell = %{version}-%{release} Provides: cockpit-systemd = %{version}-%{release} Provides: cockpit-tuned = %{version}-%{release} Provides: cockpit-users = %{version}-%{release} -Obsoletes: cockpit-dashboard < %{version}-%{release} %if 0%{?rhel} Requires: NetworkManager >= 1.6 Requires: sos @@ -346,6 +303,7 @@ Recommends: PackageKit Recommends: setroubleshoot-server >= 3.3.3 Recommends: /usr/bin/kdumpctl Suggests: NetworkManager-team +Suggests: python3-pcp Provides: cockpit-kdump = %{version}-%{release} Provides: cockpit-networkmanager = %{version}-%{release} Provides: cockpit-selinux = %{version}-%{release} @@ -355,22 +313,20 @@ Provides: cockpit-sosreport = %{version}-%{release} Recommends: (reportd if abrt) %endif -Provides: bundled(npm(@patternfly/patternfly)) = 5.3.1 -Provides: bundled(npm(@patternfly/react-core)) = 5.3.4 -Provides: bundled(npm(@patternfly/react-icons)) = 5.3.2 -Provides: bundled(npm(@patternfly/react-styles)) = 5.3.1 -Provides: bundled(npm(@patternfly/react-table)) = 5.3.4 -Provides: bundled(npm(@patternfly/react-tokens)) = 5.3.1 +Provides: bundled(npm(@patternfly/patternfly)) = 5.4.2 +Provides: bundled(npm(@patternfly/react-core)) = 5.4.12 +Provides: bundled(npm(@patternfly/react-icons)) = 5.4.2 +Provides: bundled(npm(@patternfly/react-styles)) = 5.4.1 +Provides: bundled(npm(@patternfly/react-table)) = 5.4.14 +Provides: bundled(npm(@patternfly/react-tokens)) = 5.4.1 Provides: bundled(npm(@xterm/addon-canvas)) = 0.7.0 Provides: bundled(npm(@xterm/xterm)) = 5.5.0 Provides: bundled(npm(argparse)) = 1.0.10 -Provides: bundled(npm(attr-accept)) = 2.2.2 +Provides: bundled(npm(attr-accept)) = 2.2.5 Provides: bundled(npm(autolinker)) = 3.16.2 Provides: bundled(npm(dequal)) = 2.0.3 -Provides: bundled(npm(file-selector)) = 0.6.0 -Provides: bundled(npm(focus-trap)) = 7.5.2 -Provides: bundled(npm(js-sha1)) = 0.7.0 -Provides: bundled(npm(js-sha256)) = 0.11.0 +Provides: bundled(npm(file-selector)) = 2.1.2 +Provides: bundled(npm(focus-trap)) = 7.6.2 Provides: bundled(npm(js-tokens)) = 4.0.0 Provides: bundled(npm(json-stable-stringify-without-jsonify)) = 1.0.1 Provides: bundled(npm(lodash)) = 4.17.21 @@ -378,7 +334,7 @@ Provides: bundled(npm(loose-envify)) = 1.4.0 Provides: bundled(npm(object-assign)) = 4.1.1 Provides: bundled(npm(prop-types)) = 15.8.1 Provides: bundled(npm(react-dom)) = 18.3.1 -Provides: bundled(npm(react-dropzone)) = 14.2.3 +Provides: bundled(npm(react-dropzone)) = 14.3.5 Provides: bundled(npm(react-is)) = 16.13.1 Provides: bundled(npm(react)) = 18.3.1 Provides: bundled(npm(remarkable)) = 2.0.1 @@ -386,8 +342,8 @@ Provides: bundled(npm(scheduler)) = 0.23.2 Provides: bundled(npm(sprintf-js)) = 1.0.3 Provides: bundled(npm(tabbable)) = 6.2.0 Provides: bundled(npm(throttle-debounce)) = 5.0.2 -Provides: bundled(npm(tslib)) = 2.6.3 -Provides: bundled(npm(uuid)) = 10.0.0 +Provides: bundled(npm(tslib)) = 2.8.1 +Provides: bundled(npm(uuid)) = 11.0.5 %description system This package contains the Cockpit shell and system configuration interfaces. @@ -402,12 +358,12 @@ Requires: openssl Requires: glib2 >= 2.50.0 Requires: (selinux-policy >= %{_selinux_policy_version} if selinux-policy-%{selinuxtype}) Requires(post): (policycoreutils if selinux-policy-%{selinuxtype}) -Conflicts: firewalld < 0.6.0-1 Recommends: sscg >= 2.3 Recommends: system-logos Suggests: sssd-dbus >= 2.6.2 # for cockpit-desktop Suggests: python3 +Obsoletes: cockpit-tests < 331 # prevent hard python3 dependency for cockpit-desktop, it falls back to other browsers %global __requires_exclude_from ^%{_libexecdir}/cockpit-client$ @@ -431,22 +387,24 @@ authentication via sssd/FreeIPA. %ghost %{_sysconfdir}/issue.d/cockpit.issue %ghost %{_sysconfdir}/motd.d/cockpit %ghost %attr(0644, root, root) %{_sysconfdir}/cockpit/disallowed-users -%dir %{_datadir}/cockpit/motd -%{_datadir}/cockpit/motd/update-motd -%{_datadir}/cockpit/motd/inactive.motd +%dir %{_datadir}/cockpit/issue +%{_datadir}/cockpit/issue/update-issue +%{_datadir}/cockpit/issue/inactive.issue %{_unitdir}/cockpit.service -%{_unitdir}/cockpit-motd.service +%{_unitdir}/cockpit-issue.service %{_unitdir}/cockpit.socket -%{_unitdir}/cockpit-ws-user.service +%{_unitdir}/cockpit-session-socket-user.service +%{_unitdir}/cockpit-session.socket +%{_unitdir}/cockpit-session@.service %{_unitdir}/cockpit-wsinstance-http.socket %{_unitdir}/cockpit-wsinstance-http.service %{_unitdir}/cockpit-wsinstance-https-factory.socket %{_unitdir}/cockpit-wsinstance-https-factory@.service %{_unitdir}/cockpit-wsinstance-https@.socket %{_unitdir}/cockpit-wsinstance-https@.service +%{_unitdir}/cockpit-wsinstance-socket-user.service %{_unitdir}/system-cockpithttps.slice %{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf -%{_sysusersdir}/cockpit-wsinstance.conf %{pamdir}/pam_ssh_add.so %{pamdir}/pam_cockpit_cert.so %{_libexecdir}/cockpit-ws @@ -457,7 +415,7 @@ authentication via sssd/FreeIPA. %{_libexecdir}/cockpit-desktop %{_libexecdir}/cockpit-certificate-ensure %{_libexecdir}/cockpit-certificate-helper -%attr(4750, root, cockpit-wsinstance) %{_libexecdir}/cockpit-session +%{_libexecdir}/cockpit-session %{_datadir}/cockpit/branding %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2 %{_mandir}/man8/%{name}_session_selinux.8cockpit.* @@ -465,11 +423,6 @@ authentication via sssd/FreeIPA. %ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name} %pre ws -# HACK: old RPM and even Fedora's current RPM don't properly support sysusers -# https://github.com/rpm-software-management/rpm/issues/3073 -getent group cockpit-wsinstance >/dev/null || groupadd -r cockpit-wsinstance -getent passwd cockpit-wsinstance >/dev/null || useradd -r -g cockpit-wsinstance -d /nonexisting -s /sbin/nologin -c "User for cockpit-ws instances" cockpit-wsinstance - if %{_sbindir}/selinuxenabled 2>/dev/null; then %selinux_relabel_pre -s %{selinuxtype} fi @@ -484,13 +437,23 @@ fi # disable root login on first-time install; so existing installations aren't changed if [ "$1" = 1 ]; then mkdir -p /etc/motd.d /etc/issue.d - ln -s ../../run/cockpit/motd /etc/motd.d/cockpit - ln -s ../../run/cockpit/motd /etc/issue.d/cockpit.issue + ln -s ../../run/cockpit/issue /etc/motd.d/cockpit + ln -s ../../run/cockpit/issue /etc/issue.d/cockpit.issue printf "# List of users which are not allowed to login to Cockpit\n" > /etc/cockpit/disallowed-users printf "root\n" >> /etc/cockpit/disallowed-users chmod 644 /etc/cockpit/disallowed-users fi +# on upgrades, adjust motd/issue links to changed target if they still exist (changed in 331) +if [ "$1" = 2 ]; then + if [ "$(readlink /etc/motd.d/cockpit 2>/dev/null)" = "../../run/cockpit/motd" ]; then + ln -sfn ../../run/cockpit/issue /etc/motd.d/cockpit + fi + if [ "$(readlink /etc/issue.d/cockpit.issue 2>/dev/null)" = "../../run/cockpit/motd" ]; then + ln -sfn ../../run/cockpit/issue /etc/issue.d/cockpit.issue + fi +fi + %tmpfiles_create cockpit-ws.conf %systemd_post cockpit.socket cockpit.service # firewalld only partially picks up changes to its services files without this @@ -504,6 +467,11 @@ if test -f %{_sysconfdir}/pam.d/cockpit && grep -q pam_cockpit_cert %{_sysconfd echo '**** WARNING:' fi +# remove obsolete system user on upgrade (replaced with DynamicUser in version 330) +if getent passwd cockpit-wsinstance >/dev/null; then + userdel cockpit-wsinstance +fi + %preun ws %systemd_preun cockpit.socket cockpit.service @@ -530,7 +498,7 @@ BuildArch: noarch The Cockpit component for configuring kernel crash dumping. %files kdump -f kdump.list -%{_datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml +%{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml %package sosreport Summary: Cockpit user interface for diagnostic reports @@ -544,8 +512,8 @@ The Cockpit component for creating diagnostic reports with the sosreport tool. %files sosreport -f sosreport.list -%{_datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml -%{_datadir}/pixmaps/cockpit-sosreport.png +%{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml +%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png %package networkmanager Summary: Cockpit user interface for networking, using NetworkManager @@ -560,7 +528,7 @@ BuildArch: noarch The Cockpit component for managing networking. This package uses NetworkManager. %files networkmanager -f networkmanager.list -%{_datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml +%{_datadir}/metainfo/org.cockpit_project.cockpit_networkmanager.metainfo.xml %endif @@ -578,7 +546,7 @@ This package contains the Cockpit user interface integration with the utility setroubleshoot to diagnose and resolve SELinux issues. %files selinux -f selinux.list -%{_datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml +%{_datadir}/metainfo/org.cockpit_project.cockpit_selinux.metainfo.xml %endif @@ -605,42 +573,14 @@ BuildArch: noarch The Cockpit component for managing storage. This package uses udisks. %files -n cockpit-storaged -f storaged.list -%{_datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml +%{_datadir}/metainfo/org.cockpit_project.cockpit_storaged.metainfo.xml -%package -n cockpit-tests -Summary: Tests for Cockpit -Requires: cockpit-bridge >= %{required_base} -Requires: cockpit-system >= %{required_base} -Requires: openssh-clients -Provides: cockpit-test-assets = %{version}-%{release} +%post storaged -%description -n cockpit-tests -This package contains tests and files used while testing Cockpit. -These files are not required for running Cockpit. - -%files -n cockpit-tests -f tests.list -%{pamdir}/mock-pam-conv-mod.so -%{_unitdir}/cockpit-session.socket -%{_unitdir}/cockpit-session@.service - -%if %{build_pcp} - -%package -n cockpit-pcp -Summary: Cockpit PCP integration -Requires: cockpit-bridge >= %{required_base} -Requires: pcp - -%description -n cockpit-pcp -Cockpit support for reading PCP metrics and loading PCP archives. - -%files -n cockpit-pcp -f pcp.list -%{_libexecdir}/cockpit-pcp -%{_localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit - -%post -n cockpit-pcp -systemctl reload-or-try-restart pmlogger - -%endif +# version 332 moved the btrfs temp mounts db to /run +if [ "$1" = 2 ] && [ -d /var/lib/cockpit/btrfs ]; then + rm -rf --one-file-system /var/lib/cockpit/btrfs || true +fi %package -n cockpit-packagekit Summary: Cockpit user interface for packages @@ -659,6 +599,54 @@ via PackageKit. # The changelog is automatically generated and merged %changelog +* Thu Feb 13 2025 Packit - 333-1 +- various bug fixes and improvements + +* Sat Feb 01 2025 Björn Esser - 332-2 +- Add explicit BR: libxcrypt-devel + +* Wed Jan 29 2025 Packit - 332-1 +- containers/ws: Include cockpit-files +- login: Beibooting to all supported OSes +- metrics: Show system boots in metrics + +* Thu Jan 16 2025 Fedora Release Engineering - 331-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Dec 18 2024 Packit - 331-1 +- ws: Prevent search engine indexing with robots.txt +- container/ws: Support using an external SSH agent + +* Wed Dec 04 2024 Packit - 330-1 +- Web server: Increased sandboxing, setuid removal, bootc support +- Development: New install mode using systemd-sysext +- ws container: Move to Fedora 41 + +* Mon Nov 25 2024 Packit - 329.1-1 +- cockpit.js: Put back cockpit.{resolve,reject}() to fix subscription-manager-cockpit + +* Wed Nov 20 2024 Packit - 329-1 +- Shell: Extra warnings when connecting to remote hosts + +* Wed Nov 06 2024 Packit - 328-1 +- Bug fixes and performance improvements + +* Wed Oct 23 2024 Packit - 327-1 +- Connect to similar servers without Cockpit installed + +* Wed Oct 09 2024 Packit - 326-1 +- cockpit-pcp package is now obsolete +- cockpit/ws container: Connect to servers without installed Cockpit +- cockpit/ws container: Support host specific SSH keys +- Storage: Support for Stratis filesystem sizes and limits + +* Wed Sep 25 2024 Packit - 325-1 +- storage: Expose Stratis virtual filesystem sizes +- client: Properly handle unknown SSH host keys + +* Wed Sep 04 2024 Packit - 324-1 +- Bug fixes and performance improvements + * Tue Aug 20 2024 Packit - 323-1 - metrics: Install valkey instead of redis on RHEL/CentOS 10 - login: Prevent multiple logins in a single browser session