Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

3 changed files with 70 additions and 141 deletions

View File

@ -1,2 +1 @@
2e5a8bc37de3a932441898410b3a42fa1310d28b SOURCES/cockpit-310.4.tar.xz
a37e1d6ad4b1b25729682c54ab7e4dcdcfd894a7 SOURCES/cockpit.css.gz
42f3ca8e775730b67855297e4477915fb1f3930b SOURCES/cockpit-311.1.tar.xz

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/cockpit-310.4.tar.xz
SOURCES/cockpit.css.gz
SOURCES/cockpit-311.1.tar.xz

View File

@ -49,37 +49,9 @@ Summary: Web Console for Linux servers
License: LGPL-2.1-or-later
URL: https://cockpit-project.org/
Version: 310.4
Version: 311.1
Release: 1%{?dist}
Source0: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.xz
Source1: cockpit.css.gz
# in RHEL 8 the source package is duplicated: cockpit (building basic packages like cockpit-{bridge,system})
# and cockpit-appstream (building optional packages like cockpit-{pcp})
# This split does not apply to EPEL/COPR nor packit c8s builds, only to our own
# image-prepare rhel-8-Y builds (which will disable build_all).
# In Fedora ELN/RHEL 9+ there is just one source package, which ships rpms in both BaseOS and AppStream
%if 0%{?rhel} == 8 && 0%{?epel} == 0 && !0%{?build_all}
%if "%{name}" == "cockpit"
%define build_basic 1
%define build_optional 0
%else
%define build_basic 0
%define build_optional 1
%endif
%else
%define build_basic 1
%define build_optional 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
%else
%define disallow_root 1
%endif
# pcp stopped building on ix86
%define build_pcp 1
@ -89,11 +61,9 @@ Source1: cockpit.css.gz
%endif
%endif
# Ship custom SELinux policy (but not for cockpit-appstream)
%if "%{name}" == "cockpit"
# Ship custom SELinux policy
%define selinuxtype targeted
%define selinux_configure_arg --enable-selinux-policy=%{selinuxtype}
%endif
BuildRequires: gcc
BuildRequires: pkgconfig(gio-unix-2.0)
@ -104,16 +74,8 @@ BuildRequires: pam-devel
BuildRequires: autoconf automake
BuildRequires: make
BuildRequires: python3-devel
%if 0%{?rhel} && 0%{?rhel} <= 8
# RHEL 8's gettext does not yet have metainfo.its
BuildRequires: gettext >= 0.19.7
BuildRequires: libappstream-glib-devel
%else
BuildRequires: gettext >= 0.21
%endif
%if 0%{?build_basic}
BuildRequires: libssh-devel >= 0.8.5
%endif
BuildRequires: openssl-devel
BuildRequires: gnutls-devel >= 3.4.3
BuildRequires: zlib-devel
@ -174,6 +136,18 @@ Suggests: cockpit-selinux
Requires: subscription-manager-cockpit
%endif
BuildRequires: python3-devel
BuildRequires: python3-pip
%if 0%{?rhel} == 0
# 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
%setup -q -n cockpit-%{version}
@ -186,9 +160,6 @@ Requires: subscription-manager-cockpit
--docdir=%_defaultdocdir/%{name} \
%endif
--with-pamdir='%{pamdir}' \
%if 0%{?build_basic} == 0
--disable-ssh \
%endif
%if %{build_pcp} == 0
--disable-pcp \
%endif
@ -198,6 +169,10 @@ Requires: subscription-manager-cockpit
%check
make -j$(nproc) check
%if 0%{?rhel} == 0
%tox
%endif
%install
%make_install
make install-tests DESTDIR=%{buildroot}
@ -206,10 +181,6 @@ install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
rm -f %{buildroot}/%{_libdir}/cockpit/*.so
install -D -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/
# RHEL 8 specific backwards compat API
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/cockpit/base1/
ln -s cockpit.css.gz %{buildroot}%{_datadir}/cockpit/base1/patternfly.css.gz
# Build the package lists for resource packages
# cockpit-bridge is the basic dependency for all cockpit-* packages, so centrally own the page directory
echo '%dir %{_datadir}/cockpit' > base.list
@ -217,10 +188,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
%if 0%{?build_basic}
echo '%dir %{_datadir}/cockpit/ssh' >> base.list
find %{buildroot}%{_datadir}/cockpit/ssh -type f >> base.list
%endif
echo '%{_libexecdir}/cockpit-ssh' >> base.list
%if %{build_pcp}
@ -268,43 +235,6 @@ echo '%dir %{_datadir}/cockpit/static' > static.list
echo '%dir %{_datadir}/cockpit/static/fonts' >> static.list
find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list
# when not building basic packages, remove their files
%if 0%{?build_basic} == 0
for pkg in base1 branding motd kdump networkmanager selinux shell sosreport static systemd users metrics; do
rm -r %{buildroot}/%{_datadir}/cockpit/$pkg
rm -f %{buildroot}/%{_datadir}/metainfo/org.cockpit-project.cockpit-${pkg}.metainfo.xml
done
for data in doc man pixmaps polkit-1; do
rm -r %{buildroot}/%{_datadir}/$data
done
rm -r %{buildroot}/%{_prefix}/%{__lib}/tmpfiles.d
find %{buildroot}/%{_unitdir}/ -type f ! -name 'cockpit-session*' -delete
for libexec in cockpit-askpass cockpit-session cockpit-ws cockpit-tls cockpit-wsinstance-factory cockpit-client cockpit-client.ui cockpit-desktop cockpit-certificate-helper cockpit-certificate-ensure; do
rm -f %{buildroot}/%{_libexecdir}/$libexec
done
rm -r %{buildroot}/%{_sysconfdir}/pam.d %{buildroot}/%{_sysconfdir}/motd.d %{buildroot}/%{_sysconfdir}/issue.d
rm -f %{buildroot}/%{_libdir}/security/pam_*
rm -f %{buildroot}/usr/bin/cockpit-bridge
rm -f %{buildroot}%{_libexecdir}/cockpit-ssh
rm -f %{buildroot}%{_datadir}/metainfo/cockpit.appdata.xml
rm -rf %{buildroot}%{python3_sitelib}/cockpit*
%endif
# when not building optional packages, remove their files
%if 0%{?build_optional} == 0
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
sed -i "s|%{buildroot}||" *.list
%if ! 0%{?suse_version}
@ -328,9 +258,7 @@ rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png
%endif
# -------------------------------------------------------------------------------
# Basic Sub-packages
%if 0%{?build_basic}
# Sub-packages
%description
The Cockpit Web Console enables users to administer GNU/Linux servers using a
@ -368,6 +296,7 @@ system on behalf of the web based user interface.
%doc %{_mandir}/man1/cockpit-bridge.1.gz
%{_bindir}/cockpit-bridge
%{_libexecdir}/cockpit-askpass
%{python3_sitelib}/%{name}*
%package doc
Summary: Cockpit deployment and developer guide
@ -423,32 +352,34 @@ Provides: bundled(npm(@patternfly/react-styles)) = 5.1.2
Provides: bundled(npm(@patternfly/react-table)) = 5.1.2
Provides: bundled(npm(@patternfly/react-tokens)) = 5.1.2
Provides: bundled(npm(argparse)) = 1.0.10
Provides: bundled(npm(array-buffer-byte-length)) = 1.0.0
Provides: bundled(npm(array-buffer-byte-length)) = 1.0.1
Provides: bundled(npm(attr-accept)) = 2.2.2
Provides: bundled(npm(autolinker)) = 3.16.2
Provides: bundled(npm(available-typed-arrays)) = 1.0.5
Provides: bundled(npm(call-bind)) = 1.0.5
Provides: bundled(npm(date-fns)) = 3.2.0
Provides: bundled(npm(available-typed-arrays)) = 1.0.6
Provides: bundled(npm(call-bind)) = 1.0.7
Provides: bundled(npm(date-fns)) = 3.3.1
Provides: bundled(npm(deep-equal)) = 2.2.3
Provides: bundled(npm(define-data-property)) = 1.1.1
Provides: bundled(npm(define-data-property)) = 1.1.4
Provides: bundled(npm(define-properties)) = 1.2.1
Provides: bundled(npm(es-define-property)) = 1.0.0
Provides: bundled(npm(es-errors)) = 1.3.0
Provides: bundled(npm(es-get-iterator)) = 1.1.3
Provides: bundled(npm(file-selector)) = 0.6.0
Provides: bundled(npm(focus-trap)) = 7.5.2
Provides: bundled(npm(for-each)) = 0.3.3
Provides: bundled(npm(function-bind)) = 1.1.2
Provides: bundled(npm(functions-have-names)) = 1.2.3
Provides: bundled(npm(get-intrinsic)) = 1.2.2
Provides: bundled(npm(get-intrinsic)) = 1.2.4
Provides: bundled(npm(gopd)) = 1.0.1
Provides: bundled(npm(has-bigints)) = 1.0.2
Provides: bundled(npm(has-property-descriptors)) = 1.0.1
Provides: bundled(npm(has-property-descriptors)) = 1.0.2
Provides: bundled(npm(has-proto)) = 1.0.1
Provides: bundled(npm(has-symbols)) = 1.0.3
Provides: bundled(npm(has-tostringtag)) = 1.0.0
Provides: bundled(npm(hasown)) = 2.0.0
Provides: bundled(npm(internal-slot)) = 1.0.6
Provides: bundled(npm(has-tostringtag)) = 1.0.2
Provides: bundled(npm(hasown)) = 2.0.1
Provides: bundled(npm(internal-slot)) = 1.0.7
Provides: bundled(npm(is-arguments)) = 1.1.1
Provides: bundled(npm(is-array-buffer)) = 3.0.2
Provides: bundled(npm(is-array-buffer)) = 3.0.4
Provides: bundled(npm(is-bigint)) = 1.0.4
Provides: bundled(npm(is-boolean-object)) = 1.1.2
Provides: bundled(npm(is-callable)) = 1.2.7
@ -460,12 +391,11 @@ Provides: bundled(npm(is-set)) = 2.0.2
Provides: bundled(npm(is-shared-array-buffer)) = 1.0.2
Provides: bundled(npm(is-string)) = 1.0.7
Provides: bundled(npm(is-symbol)) = 1.0.4
Provides: bundled(npm(is-typed-array)) = 1.1.12
Provides: bundled(npm(is-weakmap)) = 2.0.1
Provides: bundled(npm(is-weakset)) = 2.0.2
Provides: bundled(npm(isarray)) = 2.0.5
Provides: bundled(npm(js-sha1)) = 0.6.0
Provides: bundled(npm(js-sha256)) = 0.10.1
Provides: bundled(npm(js-sha1)) = 0.7.0
Provides: bundled(npm(js-sha256)) = 0.11.0
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
@ -480,12 +410,12 @@ Provides: bundled(npm(react-dom)) = 18.2.0
Provides: bundled(npm(react-dropzone)) = 14.2.3
Provides: bundled(npm(react-is)) = 16.13.1
Provides: bundled(npm(react)) = 18.2.0
Provides: bundled(npm(regexp.prototype.flags)) = 1.5.1
Provides: bundled(npm(regexp.prototype.flags)) = 1.5.2
Provides: bundled(npm(remarkable)) = 2.0.1
Provides: bundled(npm(scheduler)) = 0.23.0
Provides: bundled(npm(set-function-length)) = 1.2.0
Provides: bundled(npm(set-function-length)) = 1.2.1
Provides: bundled(npm(set-function-name)) = 2.0.1
Provides: bundled(npm(side-channel)) = 1.0.4
Provides: bundled(npm(side-channel)) = 1.0.5
Provides: bundled(npm(sprintf-js)) = 1.0.3
Provides: bundled(npm(stop-iteration-iterator)) = 1.0.0
Provides: bundled(npm(tabbable)) = 6.2.0
@ -494,7 +424,7 @@ Provides: bundled(npm(tslib)) = 2.6.2
Provides: bundled(npm(uuid)) = 9.0.1
Provides: bundled(npm(which-boxed-primitive)) = 1.0.2
Provides: bundled(npm(which-collection)) = 1.0.1
Provides: bundled(npm(which-typed-array)) = 1.1.13
Provides: bundled(npm(which-typed-array)) = 1.1.14
Provides: bundled(npm(xterm-addon-canvas)) = 0.5.0
Provides: bundled(npm(xterm)) = 5.3.0
@ -594,9 +524,7 @@ if [ "$1" = 1 ]; then
ln -s ../../run/cockpit/motd /etc/motd.d/cockpit
ln -s ../../run/cockpit/motd /etc/issue.d/cockpit.issue
printf "# List of users which are not allowed to login to Cockpit\n" > /etc/cockpit/disallowed-users
%if 0%{?disallow_root}
printf "root\n" >> /etc/cockpit/disallowed-users
%endif
chmod 644 /etc/cockpit/disallowed-users
fi
@ -691,21 +619,6 @@ utility setroubleshoot to diagnose and resolve SELinux issues.
%endif
#/ build basic packages
%else
# RPM requires this
%description
Dummy package from building optional packages only; never install or publish me.
#/ build basic packages
%endif
# -------------------------------------------------------------------------------
# Sub-packages that are optional extensions
%if 0%{?build_optional}
%package -n cockpit-storaged
Summary: Cockpit user interface for storage, using udisks
Requires: cockpit-shell >= %{required_base}
@ -781,23 +694,32 @@ via PackageKit.
%files -n cockpit-packagekit -f packagekit.list
#/ build optional extension packages
%endif
# The changelog is automatically generated and merged
%changelog
* Tue Apr 02 2024 Martin Pitt <mpitt@redhat.com> - 310.4-1
- sosreport: Fix command injection with crafted report names [CVE-2024-2947]
(jira#RHEL-30452)
* Tue Feb 20 2024 Packit <hello@packit.dev> - 311.1-1
- Update documentation links to RHEL 9 (RHEL-3954)
- Storage: Various bug fixes
* Thu Feb 15 2024 Martin Pitt <mpitt@redhat.com> - 310.3-1
- Translation updates (jira#RHEL-16681)
Lots of bug fixes
* Wed Feb 14 2024 Packit <hello@packit.dev> - 311-1
- Bug fixes and stability improvements
* Wed Feb 07 2024 Packit <hello@packit.dev> - 310.2-1
- selinux: Cover migration to /run
- ws: Handle HEAD requests correctly, for curl 8.6.0
* Fri Feb 02 2024 Packit <hello@packit.dev> - 310.1-1
- bridge: Fix race condition/crash in file watching channels
* Wed Jan 31 2024 Packit <hello@packit.dev> - 310-1
- Storage: support for btrfs
- Storage: improved support for swap
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 309-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 309-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Packit <hello@packit.dev> - 309-1
- Storage: Introduce btrfs support
@ -814,7 +736,10 @@ via PackageKit.
- Performance and stability improvements
* Wed Nov 01 2023 Packit <hello@packit.dev> - 304-1
- Bug fixes
Storage: Support for RAID layouts with LVM2
* Thu Oct 19 2023 Adam Williamson <awilliam@redhat.com> - 303-2
- Rebuild for untagged selinux-policy (cockpit-ws dep)
* Wed Oct 18 2023 Packit <hello@packit.dev> - 303-1
- Apps: Warn if appstream data package is missing
@ -839,11 +764,17 @@ via PackageKit.
* Wed Jul 26 2023 Packit <hello@packit.dev> - 297-1
- users: allow administrators to change the user shell
- Enable Python bridge on Fedora 38 and CentOS/RHEL 9
- tools: Enable Python bridge on Fedora 38
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 296-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 Packit <hello@packit.dev> - 296-1
- Performance and stability improvements
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 295-2
- Rebuilt for Python 3.12
* Wed Jun 28 2023 Packit <hello@packit.dev> - 295-1
- Cockpit Client can now connect to servers without Cockpit installed