2020-05-15 13:24:14 +02:00
|
|
|
#
|
2024-06-04 15:45:12 +02:00
|
|
|
# Copyright (C) 2014-2020 Red Hat, Inc.
|
2024-06-03 14:54:49 +02:00
|
|
|
#
|
2024-06-04 15:46:35 +02:00
|
|
|
# Cockpit is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Cockpit is distributed in the hope that it will be useful, but
|
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with Cockpit; If not, see <http://www.gnu.org/licenses/>.
|
2020-05-15 13:24:14 +02:00
|
|
|
#
|
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
#
|
|
|
|
# This file is maintained at the following location:
|
|
|
|
# https://github.com/cockpit-project/cockpit/blob/main/tools/cockpit.spec
|
|
|
|
#
|
|
|
|
# If you are editing this file in another location, changes will likely
|
|
|
|
# be clobbered the next time an automated release is done.
|
|
|
|
#
|
|
|
|
# Check first cockpit-devel@lists.fedorahosted.org
|
|
|
|
#
|
2019-06-25 14:44:15 +02:00
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
# earliest base that the subpackages work on; this is still required as long as
|
|
|
|
# we maintain the basic/optional split, then it can be replaced with just %{version}.
|
2022-09-20 11:33:51 +02:00
|
|
|
%define required_base 266
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
# we generally want CentOS packages to be like RHEL; special cases need to check %{centos} explicitly
|
|
|
|
%if 0%{?centos}
|
|
|
|
%define rhel %{centos}
|
2015-10-13 13:42:40 +02:00
|
|
|
%endif
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%define _hardened_build 1
|
|
|
|
|
|
|
|
%define __lib lib
|
|
|
|
|
2021-05-27 12:58:24 +02:00
|
|
|
%if %{defined _pamdir}
|
|
|
|
%define pamdir %{_pamdir}
|
2019-06-25 14:44:15 +02:00
|
|
|
%else
|
2020-04-15 10:21:19 +02:00
|
|
|
%define pamdir %{_libdir}/security
|
2015-10-13 13:42:40 +02:00
|
|
|
%endif
|
2015-02-07 14:28:40 +01:00
|
|
|
|
|
|
|
Name: cockpit
|
2019-06-25 14:44:15 +02:00
|
|
|
Summary: Web Console for Linux servers
|
2021-01-29 15:35:16 +01:00
|
|
|
|
2021-02-03 18:06:18 +01:00
|
|
|
License: LGPL-2.1-or-later
|
2019-06-25 14:44:15 +02:00
|
|
|
URL: https://cockpit-project.org/
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2024-07-31 10:50:16 +02:00
|
|
|
Version: 321
|
2021-02-03 18:06:18 +01:00
|
|
|
Release: 0
|
2021-04-30 18:57:37 +02:00
|
|
|
Source0: cockpit-%{version}.tar
|
2021-02-23 14:01:12 +01:00
|
|
|
Source1: cockpit.pam
|
|
|
|
Source2: cockpit-rpmlintrc
|
2022-09-14 14:13:34 +02:00
|
|
|
Source3: cockpit-suse-theme.tar
|
2024-07-31 10:50:16 +02:00
|
|
|
Source10: update_version.sh
|
2021-02-23 14:01:12 +01:00
|
|
|
Source99: README.packaging
|
2021-02-25 14:24:23 +01:00
|
|
|
Source98: package-lock.json
|
|
|
|
Source97: node_modules.spec.inc
|
2021-02-23 14:01:12 +01:00
|
|
|
%include %{_sourcedir}/node_modules.spec.inc
|
2021-08-10 11:08:23 +02:00
|
|
|
Patch1: 0001-selinux-allow-login-to-read-motd-file.patch
|
2024-01-25 11:03:58 +01:00
|
|
|
Patch2: suse_docs.patch
|
2022-03-18 15:45:12 +01:00
|
|
|
Patch3: suse-microos-branding.patch
|
2022-06-20 10:15:26 +02:00
|
|
|
Patch4: css-overrides.patch
|
2022-07-28 15:45:38 +02:00
|
|
|
Patch5: storage-btrfs.patch
|
2022-03-18 14:56:13 +01:00
|
|
|
# SLE Micro specific patches
|
|
|
|
Patch101: hide-pcp.patch
|
2023-01-09 19:40:38 +01:00
|
|
|
Patch102: 0002-selinux-temporary-remove-setroubleshoot-section.patch
|
2023-07-21 15:23:35 +02:00
|
|
|
# For anything based on SLES 15 codebase (including Leap, SLE Micro)
|
|
|
|
Patch103: 0004-leap-gnu18-removal.patch
|
2023-09-21 12:14:15 +02:00
|
|
|
Patch104: selinux_libdir.patch
|
2023-07-21 15:23:35 +02:00
|
|
|
|
2024-05-23 11:19:23 +02:00
|
|
|
%define build_all 1
|
|
|
|
%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
|
|
|
|
|
|
|
|
%if 0%{?build_optional} && 0%{?suse_version} == 0
|
|
|
|
%define build_tests 1
|
|
|
|
%endif
|
2024-07-31 10:50:16 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
%if 0%{?fedora} >= 41 || 0%{?rhel}
|
|
|
|
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
|
2023-12-29 11:04:26 +01:00
|
|
|
%define build_pcp 1
|
|
|
|
%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 || 0%{?suse_version} > 1500
|
|
|
|
%ifarch %ix86
|
|
|
|
%define build_pcp 0
|
|
|
|
%endif
|
|
|
|
%endif
|
2024-07-31 10:50:16 +02:00
|
|
|
|
2024-06-13 13:30:17 +02:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1500
|
2024-04-17 13:30:28 +02:00
|
|
|
# Ship custom SELinux policy
|
2021-04-30 18:57:37 +02:00
|
|
|
%define selinuxtype targeted
|
2022-06-10 13:54:30 +02:00
|
|
|
%define selinux_configure_arg --enable-selinux-policy=%{selinuxtype}
|
2024-05-23 11:19:23 +02:00
|
|
|
%define with_selinux 1
|
2024-06-13 13:30:17 +02:00
|
|
|
%else
|
|
|
|
%define selinux_configure_arg --enable-selinux-policy=no
|
|
|
|
%endif
|
2021-04-30 18:57:37 +02:00
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
|
|
|
BuildRequires: pkgconfig(json-glib-1.0)
|
|
|
|
BuildRequires: pkgconfig(polkit-agent-1) >= 0.105
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
|
|
|
|
BuildRequires: autoconf automake
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: /usr/bin/python3
|
|
|
|
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
|
|
|
|
BuildRequires: pkgconfig(krb5) >= 1.11
|
|
|
|
BuildRequires: libxslt-devel
|
|
|
|
BuildRequires: glib-networking
|
|
|
|
BuildRequires: sed
|
|
|
|
|
|
|
|
BuildRequires: glib2-devel >= 2.50.0
|
2020-04-15 10:21:19 +02:00
|
|
|
# this is for runtimedir in the tls proxy ace21c8879
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: pkgconfig(libsystemd) >= 235
|
2020-04-15 10:21:19 +02:00
|
|
|
%if 0%{?suse_version}
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: distribution-release
|
2023-12-29 11:04:26 +01:00
|
|
|
%if %{build_pcp}
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: libpcp-devel
|
|
|
|
BuildRequires: pcp-devel
|
|
|
|
BuildRequires: libpcp3
|
|
|
|
BuildRequires: libpcp_import1
|
|
|
|
%endif
|
|
|
|
BuildRequires: openssh
|
|
|
|
BuildRequires: distribution-logos
|
|
|
|
BuildRequires: wallpaper-branding
|
2021-08-10 11:08:23 +02:00
|
|
|
# needed for /var/lib/pcp directory ownership
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: pcp
|
2020-04-15 10:21:19 +02:00
|
|
|
%else
|
2023-12-29 11:04:26 +01:00
|
|
|
%if %{build_pcp}
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: pcp-libs-devel
|
2023-12-29 11:04:26 +01:00
|
|
|
%endif
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: openssh-clients
|
|
|
|
BuildRequires: docbook-style-xsl
|
2015-02-07 14:28:40 +01:00
|
|
|
%endif
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: krb5-server
|
|
|
|
BuildRequires: gdb
|
2020-04-15 10:21:19 +02:00
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
# For documentation
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: xmlto
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2023-07-21 15:23:35 +02:00
|
|
|
%if 0%{?with_selinux}
|
2021-04-30 18:57:37 +02:00
|
|
|
BuildRequires: selinux-policy
|
2021-05-27 12:58:24 +02:00
|
|
|
BuildRequires: selinux-policy-%{selinuxtype}
|
2021-04-30 18:57:37 +02:00
|
|
|
BuildRequires: selinux-policy-devel
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2021-04-30 18:57:37 +02:00
|
|
|
|
2021-02-17 16:44:07 +01:00
|
|
|
# for rebuilding nodejs bits
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildRequires: npm
|
|
|
|
BuildRequires: sassc
|
|
|
|
BuildRequires: local-npm-registry
|
2021-02-17 16:44:07 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
# This is the "cockpit" metapackage. It should only
|
|
|
|
# Require, Suggest or Recommend other cockpit-xxx subpackages
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: cockpit-bridge
|
|
|
|
Requires: cockpit-ws
|
|
|
|
Requires: cockpit-system
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
# Optional components
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: (cockpit-storaged if udisks2)
|
|
|
|
Recommends: (cockpit-packagekit if dnf)
|
|
|
|
Suggests: cockpit-pcp
|
2020-04-15 10:21:19 +02:00
|
|
|
|
|
|
|
%if 0%{?rhel} == 0
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: (cockpit-networkmanager if NetworkManager)
|
2023-06-02 16:08:12 +02:00
|
|
|
# c-ostree is not in RHEL 8/9
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: (cockpit-ostree if rpm-ostree)
|
|
|
|
Suggests: cockpit-selinux
|
2015-10-14 12:03:39 +02:00
|
|
|
%endif
|
2020-04-15 10:21:19 +02:00
|
|
|
%if 0%{?rhel} && 0%{?centos} == 0
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: subscription-manager-cockpit
|
2020-04-15 10:21:19 +02:00
|
|
|
%endif
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2023-06-02 16:08:12 +02:00
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-pip
|
2024-04-17 13:30:28 +02:00
|
|
|
%if 0%{?rhel} == 0 && !0%{?suse_version}
|
2023-06-02 16:08:12 +02:00
|
|
|
# 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
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%prep
|
2022-09-13 18:16:08 +02:00
|
|
|
%setup -q -n cockpit-%{version} -a 3
|
2024-03-04 15:56:57 +01:00
|
|
|
%patch -P 1 -p1
|
|
|
|
%patch -P 2 -p1
|
|
|
|
%patch -P 3 -p1
|
|
|
|
%patch -P 4 -p1
|
|
|
|
%patch -P 5 -p1
|
2022-06-20 10:15:26 +02:00
|
|
|
|
2023-01-09 19:40:38 +01:00
|
|
|
# SLE Micro specific patches
|
|
|
|
%if 0%{?is_smo}
|
2024-03-04 15:56:57 +01:00
|
|
|
%patch -P 101 -p1
|
2023-08-18 14:07:29 +02:00
|
|
|
# Patches for versions lower then SLE Micro 5.5
|
|
|
|
%if 0%{?sle_version} < 150500
|
2024-03-04 15:56:57 +01:00
|
|
|
%patch -P 102 -p1
|
2022-06-20 10:15:26 +02:00
|
|
|
%endif
|
2023-08-18 14:07:29 +02:00
|
|
|
%endif
|
2023-07-21 15:23:35 +02:00
|
|
|
# For anything based on SLES 15 codebase (including Leap, SLEM)
|
|
|
|
%if 0%{?suse_version} == 1500
|
2024-03-04 15:56:57 +01:00
|
|
|
%patch -P 103 -p1
|
|
|
|
%patch -P 104 -p0
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2022-03-18 14:56:13 +01:00
|
|
|
|
2020-04-15 10:21:19 +02:00
|
|
|
cp %SOURCE1 tools/cockpit.pam
|
2021-02-17 16:44:07 +01:00
|
|
|
#
|
2023-07-21 15:23:35 +02:00
|
|
|
rm -rf node_modules package-lock.json
|
2021-08-19 16:54:56 +02:00
|
|
|
local-npm-registry %{_sourcedir} install --also=dev --legacy-peer-deps
|
2019-06-25 14:44:15 +02:00
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%build
|
2021-02-25 14:24:23 +01:00
|
|
|
find node_modules -name \*.node -print -delete
|
|
|
|
touch node_modules/.stamp
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
exec 2>&1
|
2021-02-17 16:44:07 +01:00
|
|
|
PKG_NAME="Cockpit"
|
2022-06-10 13:54:30 +02:00
|
|
|
echo "m4_define(VERSION_NUMBER, %version)" > version.m4
|
2021-02-17 16:44:07 +01:00
|
|
|
autoreconf -fvi -I tools
|
|
|
|
#
|
2019-06-25 14:44:15 +02:00
|
|
|
%configure \
|
2022-06-10 13:54:30 +02:00
|
|
|
%{?selinux_configure_arg} \
|
2019-06-25 14:44:15 +02:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
--docdir=%_defaultdocdir/%{name} \
|
2024-06-13 13:30:17 +02:00
|
|
|
--libexecdir=%_libexecdir \
|
2015-02-07 14:28:40 +01:00
|
|
|
%endif
|
2020-04-15 10:21:19 +02:00
|
|
|
--with-pamdir='%{pamdir}' \
|
2023-12-29 11:04:26 +01:00
|
|
|
%if %{build_pcp} == 0
|
|
|
|
--disable-pcp \
|
|
|
|
%endif
|
|
|
|
|
2023-07-21 15:23:35 +02:00
|
|
|
%if 0%{?with_selinux}
|
2023-01-09 19:40:38 +01:00
|
|
|
make -f /usr/share/selinux/devel/Makefile cockpit.pp
|
|
|
|
bzip2 -9 cockpit.pp
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2023-01-09 19:40:38 +01:00
|
|
|
|
2022-06-10 13:54:30 +02:00
|
|
|
%make_build
|
2021-04-30 18:57:37 +02:00
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%check
|
2022-06-10 13:54:30 +02:00
|
|
|
make -j$(nproc) check
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2024-05-23 11:19:23 +02:00
|
|
|
%if 0%{?rhel} == 0 && 0%{?suse_version} == 0
|
2023-06-02 16:08:12 +02:00
|
|
|
%tox
|
|
|
|
%endif
|
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%install
|
2021-02-17 16:44:07 +01:00
|
|
|
# In obs we get write error: stdout
|
|
|
|
%make_install | tee make_install.log
|
2019-06-25 14:44:15 +02:00
|
|
|
make install-tests DESTDIR=%{buildroot}
|
2023-02-10 14:08:12 +01:00
|
|
|
%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
|
2015-02-07 14:28:40 +01:00
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
|
2020-04-15 10:21:19 +02:00
|
|
|
install -p -m 644 tools/cockpit.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/cockpit
|
2023-02-10 14:08:12 +01:00
|
|
|
%endif
|
2015-02-07 14:28:40 +01:00
|
|
|
rm -f %{buildroot}/%{_libdir}/cockpit/*.so
|
2020-04-15 10:21:19 +02:00
|
|
|
install -D -p -m 644 AUTHORS COPYING README.md %{buildroot}%{_docdir}/cockpit/
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2023-01-09 19:40:38 +01:00
|
|
|
# selinux
|
2023-07-21 15:23:35 +02:00
|
|
|
%if 0%{?with_selinux}
|
2023-01-09 19:40:38 +01:00
|
|
|
install -D -m 644 %{name}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
|
|
|
install -D -m 644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_session_selinux.8cockpit
|
|
|
|
install -D -m 644 -t %{buildroot}%{_mandir}/man8 selinux/%{name}_ws_selinux.8cockpit
|
|
|
|
# create this directory in the build root so that %ghost sees the desired mode
|
|
|
|
install -d -m 700 %{buildroot}%{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2023-01-09 19:40:38 +01:00
|
|
|
|
|
|
|
# SUSE branding
|
2022-09-13 18:16:08 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/cockpit/branding/suse
|
2022-09-14 14:13:34 +02:00
|
|
|
pushd cockpit-suse-theme
|
2022-09-13 18:16:08 +02:00
|
|
|
cp src/css-overrides.css %{buildroot}%{_datadir}/cockpit/branding/suse
|
|
|
|
cp src/fonts.css %{buildroot}%{_datadir}/cockpit/branding/suse
|
|
|
|
cp -a src/fonts %{buildroot}%{_datadir}/cockpit/branding/suse
|
|
|
|
popd
|
|
|
|
|
2015-10-13 13:42:40 +02:00
|
|
|
# Build the package lists for resource packages
|
2022-06-10 13:54:30 +02:00
|
|
|
# cockpit-bridge is the basic dependency for all cockpit-* packages, so centrally own the page directory
|
|
|
|
echo '%dir %{_datadir}/cockpit' > base.list
|
|
|
|
echo '%dir %{_datadir}/cockpit/base1' >> base.list
|
2021-01-22 14:56:54 +01:00
|
|
|
find %{buildroot}%{_datadir}/cockpit/base1 -type f -o -type l >> base.list
|
2019-06-25 14:44:15 +02:00
|
|
|
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
|
|
|
|
|
2023-12-29 11:04:26 +01:00
|
|
|
%if %{build_pcp}
|
2022-06-10 13:54:30 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/pcp' > pcp.list
|
2019-06-25 14:44:15 +02:00
|
|
|
find %{buildroot}%{_datadir}/cockpit/pcp -type f >> pcp.list
|
2023-12-29 11:04:26 +01:00
|
|
|
%endif
|
2019-06-25 14:44:15 +02:00
|
|
|
|
2024-05-23 11:19:23 +02:00
|
|
|
# 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 -rf %{buildroot}/%{_sysconfdir}/pam.d %{buildroot}/%{_sysconfdir}/motd.d %{buildroot}/%{_sysconfdir}/issue.d
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
rm -rf %{buildroot}/%{_pam_vendordir}
|
|
|
|
%else
|
|
|
|
rm -rf %{buildroot}/%{_sysconfdir}/pam.d
|
|
|
|
%endif
|
|
|
|
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 -pcp
|
|
|
|
rm -rf %{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
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/shell' >> system.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/shell -type f >> system.list
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/systemd' >> system.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/systemd -type f >> system.list
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/users' >> system.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/users -type f >> system.list
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2020-11-27 18:05:16 +01:00
|
|
|
echo '%dir %{_datadir}/cockpit/metrics' >> system.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/metrics -type f >> system.list
|
|
|
|
|
2022-06-10 13:54:30 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/kdump' > kdump.list
|
2019-06-25 14:44:15 +02:00
|
|
|
find %{buildroot}%{_datadir}/cockpit/kdump -type f >> kdump.list
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/sosreport' > sosreport.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/sosreport -type f >> sosreport.list
|
|
|
|
|
|
|
|
echo '%dir %{_datadir}/cockpit/storaged' > storaged.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/storaged -type f >> storaged.list
|
|
|
|
|
|
|
|
echo '%dir %{_datadir}/cockpit/networkmanager' > networkmanager.list
|
|
|
|
find %{buildroot}%{_datadir}/cockpit/networkmanager -type f >> networkmanager.list
|
|
|
|
|
2022-06-10 13:54:30 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/packagekit' > packagekit.list
|
2019-06-25 14:44:15 +02:00
|
|
|
find %{buildroot}%{_datadir}/cockpit/packagekit -type f >> packagekit.list
|
|
|
|
|
|
|
|
echo '%dir %{_datadir}/cockpit/apps' >> packagekit.list
|
|
|
|
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
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2024-05-23 11:19:23 +02:00
|
|
|
# echo '%dir %{_datadir}/cockpit/playground' > tests.list
|
|
|
|
# find %{buildroot}%{_datadir}/cockpit/playground -type f >> tests.list
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2021-01-22 14:56:54 +01:00
|
|
|
echo '%dir %{_datadir}/cockpit/static' > static.list
|
2021-04-30 18:57:37 +02:00
|
|
|
echo '%dir %{_datadir}/cockpit/static/fonts' >> static.list
|
2021-01-22 14:56:54 +01:00
|
|
|
find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list
|
|
|
|
|
2015-10-13 13:42:40 +02:00
|
|
|
sed -i "s|%{buildroot}||" *.list
|
|
|
|
|
2020-04-15 10:21:19 +02:00
|
|
|
%if 0%{?suse_version}
|
2020-04-29 15:31:10 +02:00
|
|
|
# remove brandings with stale symlinks. Means they don't match
|
|
|
|
# the distro.
|
2020-04-15 10:21:19 +02:00
|
|
|
pushd %{buildroot}/%{_datadir}/cockpit/branding
|
2022-09-13 18:18:37 +02:00
|
|
|
ls --hide={default,kubernetes,opensuse,registry,sle-micro,suse} | xargs rm -rv
|
2020-04-15 10:21:19 +02:00
|
|
|
popd
|
|
|
|
# need this in SUSE as post build checks dislike stale symlinks
|
|
|
|
install -m 644 -D /dev/null %{buildroot}/run/cockpit/motd
|
2024-02-15 15:32:01 +01:00
|
|
|
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
|
2020-06-09 11:10:46 +02:00
|
|
|
# remove files of not installable packages
|
2021-05-27 12:58:24 +02:00
|
|
|
rm -r %{buildroot}%{_datadir}/cockpit/sosreport
|
|
|
|
rm -f %{buildroot}/%{_prefix}/share/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml
|
2020-06-09 11:10:46 +02:00
|
|
|
rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png
|
2020-04-15 10:21:19 +02:00
|
|
|
%else
|
|
|
|
%global _debugsource_packages 1
|
|
|
|
%global _debuginfo_subpackages 0
|
|
|
|
|
|
|
|
%define find_debug_info %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_include_minidebuginfo:-m} %{?_find_debuginfo_dwz_opts} %{?_find_debuginfo_opts} %{?_debugsource_packages:-S debugsourcefiles.list} "%{_builddir}/%{?buildsubdir}"
|
|
|
|
|
|
|
|
%endif
|
|
|
|
# /suse_version
|
2015-10-13 13:42:40 +02:00
|
|
|
rm -rf %{buildroot}/usr/src/debug
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
# On RHEL kdump, networkmanager, selinux, and sosreport are part of the system package
|
2015-10-13 13:42:40 +02:00
|
|
|
%if 0%{?rhel}
|
2019-06-25 14:44:15 +02:00
|
|
|
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
|
2023-06-02 16:08:12 +02:00
|
|
|
rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml
|
2020-04-15 10:21:19 +02:00
|
|
|
rm -f %{buildroot}%{_datadir}/pixmaps/cockpit-sosreport.png
|
2015-10-13 13:42:40 +02:00
|
|
|
%endif
|
|
|
|
|
2021-05-04 09:46:50 +02:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/cockpit/devel
|
|
|
|
cp -a pkg/lib %{buildroot}%{_datadir}/cockpit/devel
|
2021-02-17 16:44:07 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
# -------------------------------------------------------------------------------
|
2024-04-17 13:30:28 +02:00
|
|
|
# Sub-packages
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The Cockpit Web Console enables users to administer GNU/Linux servers using a
|
|
|
|
web browser.
|
|
|
|
|
|
|
|
It offers network configuration, log inspection, diagnostic reports, SELinux
|
|
|
|
troubleshooting, interactive command-line sessions, and more.
|
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%files
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_docdir}/cockpit/AUTHORS
|
|
|
|
%{_docdir}/cockpit/COPYING
|
|
|
|
%{_docdir}/cockpit/README.md
|
|
|
|
%{_datadir}/metainfo/cockpit.appdata.xml
|
|
|
|
%{_datadir}/pixmaps/cockpit.png
|
|
|
|
%doc %{_mandir}/man1/cockpit.1.gz
|
2020-04-15 10:21:19 +02:00
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package bridge
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit bridge server-side component
|
|
|
|
Requires: glib-networking
|
|
|
|
Provides: cockpit-ssh = %{version}-%{release}
|
2021-01-22 14:56:54 +01:00
|
|
|
# 233 dropped jquery.js, pages started to bundle it (commit 049e8b8dce)
|
2024-06-04 15:46:35 +02:00
|
|
|
Conflicts: cockpit-dashboard < 233
|
|
|
|
Conflicts: cockpit-networkmanager < 233
|
|
|
|
Conflicts: cockpit-storaged < 233
|
|
|
|
Conflicts: cockpit-system < 233
|
|
|
|
Conflicts: cockpit-tests < 233
|
|
|
|
Conflicts: cockpit-docker < 233
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description bridge
|
|
|
|
The Cockpit bridge component installed server side and runs commands on the
|
|
|
|
system on behalf of the web based user interface.
|
|
|
|
|
|
|
|
%files bridge -f base.list
|
2015-02-07 14:28:40 +01:00
|
|
|
%doc %{_mandir}/man1/cockpit-bridge.1.gz
|
|
|
|
%{_bindir}/cockpit-bridge
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_libexecdir}/cockpit-askpass
|
2023-07-21 15:23:35 +02:00
|
|
|
%{python3_sitelib}/%{name}*
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%package doc
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit deployment and developer guide
|
|
|
|
BuildArch: noarch
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description doc
|
|
|
|
The Cockpit Deployment and Developer Guide shows sysadmins how to
|
|
|
|
deploy Cockpit on their machines as well as helps developers who want to
|
|
|
|
embed or extend Cockpit.
|
2015-02-07 14:28:40 +01:00
|
|
|
|
|
|
|
%files doc
|
2019-06-25 14:44:15 +02:00
|
|
|
%exclude %{_docdir}/cockpit/AUTHORS
|
|
|
|
%exclude %{_docdir}/cockpit/COPYING
|
|
|
|
%exclude %{_docdir}/cockpit/README.md
|
|
|
|
%{_docdir}/cockpit
|
|
|
|
|
|
|
|
%package system
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit admin interface package for configuring and troubleshooting a system
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: cockpit-bridge >= %{version}-%{release}
|
2021-02-23 14:01:12 +01:00
|
|
|
%if !0%{?suse_version}
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: shadow-utils
|
|
|
|
%endif
|
|
|
|
Requires: grep
|
|
|
|
Requires: /usr/bin/pwscore
|
|
|
|
Requires: /usr/bin/date
|
|
|
|
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}
|
2019-06-25 14:44:15 +02:00
|
|
|
%if 0%{?rhel}
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: NetworkManager >= 1.6
|
|
|
|
Requires: kexec-tools
|
|
|
|
Requires: sos
|
|
|
|
Requires: sudo
|
|
|
|
Recommends: PackageKit
|
|
|
|
Recommends: setroubleshoot-server >= 3.3.3
|
2024-07-31 10:50:16 +02:00
|
|
|
Recommends: /usr/bin/kdumpctl
|
2024-06-04 15:46:35 +02:00
|
|
|
Suggests: NetworkManager-team
|
|
|
|
Provides: cockpit-kdump = %{version}-%{release}
|
|
|
|
Provides: cockpit-networkmanager = %{version}-%{release}
|
|
|
|
Provides: cockpit-selinux = %{version}-%{release}
|
|
|
|
Provides: cockpit-sosreport = %{version}-%{release}
|
2019-06-25 14:44:15 +02:00
|
|
|
%endif
|
2022-06-10 13:54:30 +02:00
|
|
|
%if 0%{?fedora}
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: (reportd if abrt)
|
2019-06-25 14:44:15 +02:00
|
|
|
%endif
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2023-06-02 16:08:12 +02:00
|
|
|
#NPM_PROVIDES
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%description system
|
|
|
|
This package contains the Cockpit shell and system configuration interfaces.
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files system -f system.list
|
|
|
|
%dir %{_datadir}/cockpit/shell/images
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package ws
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit Web Service
|
|
|
|
Requires: glib-networking
|
|
|
|
Requires: openssl
|
|
|
|
Requires: glib2 >= 2.50.0
|
2023-07-21 15:23:35 +02:00
|
|
|
%if 0%{?with_selinux}
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: (selinux-policy >= %{_selinux_policy_version} if selinux-policy-%{selinuxtype})
|
2021-04-30 18:57:37 +02:00
|
|
|
Requires(post): (policycoreutils if selinux-policy-%{selinuxtype})
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2024-06-04 15:46:35 +02:00
|
|
|
Conflicts: firewalld < 0.6.0-1
|
|
|
|
Recommends: sscg >= 2.3
|
|
|
|
Recommends: system-logos
|
|
|
|
Suggests: sssd-dbus >= 2.6.2
|
2020-09-10 14:49:32 +02:00
|
|
|
%if 0%{?suse_version}
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires(pre): permissions
|
|
|
|
Requires: distribution-logos
|
|
|
|
Requires: wallpaper-branding
|
2020-09-07 09:51:41 +02:00
|
|
|
%endif
|
2022-06-10 13:54:30 +02:00
|
|
|
# for cockpit-desktop
|
2024-06-04 15:46:35 +02:00
|
|
|
Suggests: python3
|
2024-01-25 11:03:58 +01:00
|
|
|
Provides: group(cockpit-ws)
|
|
|
|
Provides: group(cockpit-wsinstance)
|
|
|
|
Provides: user(cockpit-ws)
|
|
|
|
Provides: user(cockpit-wsinstance)
|
2022-06-10 13:54:30 +02:00
|
|
|
|
|
|
|
# prevent hard python3 dependency for cockpit-desktop, it falls back to other browsers
|
|
|
|
%global __requires_exclude_from ^%{_libexecdir}/cockpit-client$
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description ws
|
|
|
|
The Cockpit Web Service listens on the network, and authenticates users.
|
|
|
|
|
2020-04-15 10:21:19 +02:00
|
|
|
If sssd-dbus is installed, you can enable client certificate/smart card
|
|
|
|
authentication via sssd/FreeIPA.
|
|
|
|
|
2022-06-10 13:54:30 +02:00
|
|
|
%files ws -f static.list
|
2019-06-25 14:44:15 +02:00
|
|
|
%doc %{_mandir}/man1/cockpit-desktop.1.gz
|
2015-02-07 14:28:40 +01:00
|
|
|
%doc %{_mandir}/man5/cockpit.conf.5.gz
|
|
|
|
%doc %{_mandir}/man8/cockpit-ws.8.gz
|
2020-04-15 10:21:19 +02:00
|
|
|
%doc %{_mandir}/man8/cockpit-tls.8.gz
|
2015-10-13 13:42:40 +02:00
|
|
|
%doc %{_mandir}/man8/pam_ssh_add.8.gz
|
2020-04-15 10:21:19 +02:00
|
|
|
%dir %{_sysconfdir}/cockpit
|
2019-06-25 14:44:15 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/cockpit/ws-certs.d
|
2023-02-10 14:08:12 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%{_pam_vendordir}/cockpit
|
|
|
|
%else
|
2015-02-07 14:28:40 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/pam.d/cockpit
|
2023-02-10 14:08:12 +01:00
|
|
|
%endif
|
2020-04-15 10:21:19 +02:00
|
|
|
# dir is not owned by pam in openSUSE
|
|
|
|
%dir %{_sysconfdir}/motd.d
|
2021-05-27 12:58:24 +02:00
|
|
|
# created in %post, so that users can rm the files
|
|
|
|
%ghost %{_sysconfdir}/issue.d/cockpit.issue
|
|
|
|
%ghost %{_sysconfdir}/motd.d/cockpit
|
2023-06-02 16:08:12 +02:00
|
|
|
%ghost %attr(0644, root, root) %{_sysconfdir}/cockpit/disallowed-users
|
2020-04-15 10:21:19 +02:00
|
|
|
%ghost %dir /run/cockpit
|
2021-05-27 12:58:24 +02:00
|
|
|
%ghost /run/cockpit/motd
|
2020-04-15 10:21:19 +02:00
|
|
|
%dir %{_datadir}/cockpit/motd
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_datadir}/cockpit/motd/update-motd
|
|
|
|
%{_datadir}/cockpit/motd/inactive.motd
|
2015-02-07 14:28:40 +01:00
|
|
|
%{_unitdir}/cockpit.service
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_unitdir}/cockpit-motd.service
|
2015-02-07 14:28:40 +01:00
|
|
|
%{_unitdir}/cockpit.socket
|
2024-07-03 17:00:29 +02:00
|
|
|
%{_unitdir}/cockpit-ws-user.service
|
2020-04-15 10:21:19 +02:00
|
|
|
%{_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}/system-cockpithttps.slice
|
2024-07-03 17:00:29 +02:00
|
|
|
%{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf
|
2024-07-31 10:50:16 +02:00
|
|
|
%{_sysusersdir}/cockpit-wsinstance.conf
|
2020-04-15 10:21:19 +02:00
|
|
|
%{pamdir}/pam_ssh_add.so
|
|
|
|
%{pamdir}/pam_cockpit_cert.so
|
2015-02-07 14:28:40 +01:00
|
|
|
%{_libexecdir}/cockpit-ws
|
2020-04-15 10:21:19 +02:00
|
|
|
%{_libexecdir}/cockpit-wsinstance-factory
|
|
|
|
%{_libexecdir}/cockpit-tls
|
2022-06-10 13:54:30 +02:00
|
|
|
%{_libexecdir}/cockpit-client
|
|
|
|
%{_libexecdir}/cockpit-client.ui
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_libexecdir}/cockpit-desktop
|
2021-04-30 18:57:37 +02:00
|
|
|
%{_libexecdir}/cockpit-certificate-ensure
|
|
|
|
%{_libexecdir}/cockpit-certificate-helper
|
2020-09-10 14:49:32 +02:00
|
|
|
%{?suse_version:%verify(not mode) }%attr(4750, root, cockpit-wsinstance) %{_libexecdir}/cockpit-session
|
2019-06-25 14:44:15 +02:00
|
|
|
%{_datadir}/cockpit/branding
|
2023-07-21 15:23:35 +02:00
|
|
|
%if 0%{?with_selinux}
|
2022-06-10 13:54:30 +02:00
|
|
|
%{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
|
|
|
%{_mandir}/man8/%{name}_session_selinux.8cockpit.*
|
|
|
|
%{_mandir}/man8/%{name}_ws_selinux.8cockpit.*
|
|
|
|
%ghost %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{name}
|
2023-07-21 15:23:35 +02:00
|
|
|
%endif
|
2021-04-30 18:57:37 +02:00
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%pre ws
|
2024-07-31 10:50:16 +02:00
|
|
|
# HACK: old RPM and even Fedora's current RPM don't properly support sysusers
|
|
|
|
# https://github.com/rpm-software-management/rpm/issues/3073
|
2020-04-15 10:21:19 +02:00
|
|
|
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
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2021-04-30 18:57:37 +02:00
|
|
|
if %{_sbindir}/selinuxenabled 2>/dev/null; then
|
|
|
|
%selinux_relabel_pre -s %{selinuxtype}
|
|
|
|
fi
|
2023-02-10 14:08:12 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
# Prepare for migration to /usr/lib; save any old .rpmsave
|
|
|
|
for i in pam.d/cockpit ; do
|
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
|
|
|
done
|
|
|
|
%endif
|
2021-04-30 18:57:37 +02:00
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%post ws
|
2022-06-10 13:54:30 +02:00
|
|
|
if [ -x %{_sbindir}/selinuxenabled ]; then
|
2021-04-30 18:57:37 +02:00
|
|
|
%selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
|
|
|
|
%selinux_relabel_post -s %{selinuxtype}
|
|
|
|
fi
|
2021-05-27 12:58:24 +02:00
|
|
|
|
|
|
|
# set up dynamic motd/issue symlinks on first-time install; don't bring them back on upgrades if admin removed them
|
2023-06-02 16:08:12 +02:00
|
|
|
# disable root login on first-time install; so existing installations aren't changed
|
2021-05-27 12:58:24 +02:00
|
|
|
if [ "$1" = 1 ]; then
|
|
|
|
mkdir -p /etc/motd.d /etc/issue.d
|
2022-06-10 13:54:30 +02:00
|
|
|
ln -s ../../run/cockpit/motd /etc/motd.d/cockpit
|
|
|
|
ln -s ../../run/cockpit/motd /etc/issue.d/cockpit.issue
|
2023-06-02 16:08:12 +02:00
|
|
|
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
|
2021-05-27 12:58:24 +02:00
|
|
|
fi
|
2022-03-15 15:35:49 +01:00
|
|
|
# switch old self-signed cert group from cockpit-wsintance to cockpit-ws on upgrade
|
|
|
|
if [ "$1" = 2 ]; then
|
|
|
|
certfile=/etc/cockpit/ws-certs.d/0-self-signed.cert
|
|
|
|
test -f $certfile && stat -c '%G' $certfile | grep -q cockpit-wsinstance && chgrp cockpit-ws $certfile
|
|
|
|
fi
|
|
|
|
|
2020-09-10 14:49:32 +02:00
|
|
|
%if 0%{?suse_version}
|
2020-08-13 09:17:34 +02:00
|
|
|
%set_permissions %{_libexecdir}/cockpit-session
|
2020-09-10 14:49:32 +02:00
|
|
|
%endif
|
2024-07-31 10:50:16 +02:00
|
|
|
%tmpfiles_create cockpit-tempfiles.conf
|
2021-04-30 18:57:37 +02:00
|
|
|
%systemd_post cockpit.socket cockpit.service
|
2015-02-07 14:28:40 +01:00
|
|
|
# firewalld only partially picks up changes to its services files without this
|
|
|
|
test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
|
|
|
|
|
2021-08-10 11:08:23 +02:00
|
|
|
# check for deprecated PAM config
|
2023-06-02 16:08:12 +02:00
|
|
|
if test -f %{_sysconfdir}/pam.d/cockpit && grep -q pam_cockpit_cert %{_sysconfdir}/pam.d/cockpit; then
|
2021-08-10 11:08:23 +02:00
|
|
|
echo '**** WARNING:'
|
|
|
|
echo '**** WARNING: pam_cockpit_cert is a no-op and will be removed in a'
|
|
|
|
echo '**** WARNING: future release; remove it from your /etc/pam.d/cockpit.'
|
|
|
|
echo '**** WARNING:'
|
|
|
|
fi
|
|
|
|
|
2015-02-07 14:28:40 +01:00
|
|
|
%preun ws
|
2021-04-30 18:57:37 +02:00
|
|
|
%systemd_preun cockpit.socket cockpit.service
|
2015-02-07 14:28:40 +01:00
|
|
|
|
|
|
|
%postun ws
|
2022-06-10 13:54:30 +02:00
|
|
|
if [ -x %{_sbindir}/selinuxenabled ]; then
|
2021-04-30 18:57:37 +02:00
|
|
|
%selinux_modules_uninstall -s %{selinuxtype} %{name}
|
|
|
|
%selinux_relabel_post -s %{selinuxtype}
|
|
|
|
fi
|
|
|
|
%systemd_postun_with_restart cockpit.socket cockpit.service
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2020-09-10 14:49:32 +02:00
|
|
|
%if 0%{?suse_version}
|
2020-08-13 09:17:34 +02:00
|
|
|
%verifyscript ws
|
|
|
|
%verify_permissions -e %{_libexecdir}/cockpit-session
|
2020-09-10 14:49:32 +02:00
|
|
|
%endif
|
2020-08-13 09:17:34 +02:00
|
|
|
|
2023-02-10 14:08:12 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%posttrans ws
|
|
|
|
# Migration to /usr/lib, restore just created .rpmsave
|
|
|
|
for i in pam.d/cockpit ; do
|
|
|
|
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
|
|
|
done
|
|
|
|
%endif
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
# -------------------------------------------------------------------------------
|
|
|
|
# Sub-packages that are part of cockpit-system in RHEL/CentOS, but separate in Fedora
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%if 0%{?rhel} == 0
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package kdump
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit user interface for kernel crash dumping
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: cockpit-shell >= %{required_base}
|
|
|
|
Requires: kexec-tools
|
|
|
|
BuildArch: noarch
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%description kdump
|
|
|
|
The Cockpit component for configuring kernel crash dumping.
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files kdump -f kdump.list
|
|
|
|
%{_datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2020-06-09 10:47:15 +02:00
|
|
|
%if !0%{?suse_version}
|
2019-06-25 14:44:15 +02:00
|
|
|
%package sosreport
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit user interface for diagnostic reports
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: cockpit-shell >= %{required_base}
|
|
|
|
Requires: sos
|
|
|
|
BuildArch: noarch
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%description sosreport
|
|
|
|
The Cockpit component for creating diagnostic reports with the
|
|
|
|
sosreport tool.
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files sosreport -f sosreport.list
|
|
|
|
%{_datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml
|
|
|
|
%{_datadir}/pixmaps/cockpit-sosreport.png
|
2020-06-09 10:47:15 +02:00
|
|
|
%endif
|
2015-10-13 13:42:40 +02:00
|
|
|
|
|
|
|
%package networkmanager
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit user interface for networking, using NetworkManager
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: cockpit-shell >= %{required_base}
|
|
|
|
Requires: NetworkManager >= 1.6
|
|
|
|
Conflicts: cockpit-wicked
|
2020-04-15 10:21:19 +02:00
|
|
|
# Optional components
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: NetworkManager-team
|
|
|
|
BuildArch: noarch
|
2015-10-13 13:42:40 +02:00
|
|
|
|
|
|
|
%description networkmanager
|
|
|
|
The Cockpit component for managing networking. This package uses NetworkManager.
|
|
|
|
|
|
|
|
%files networkmanager -f networkmanager.list
|
2023-06-02 16:08:12 +02:00
|
|
|
%{_datadir}/metainfo/org.cockpit-project.cockpit-networkmanager.metainfo.xml
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%endif
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2023-01-09 19:40:38 +01:00
|
|
|
%if 0%{?rhel} == 0 && ( 0%{?suse_version} >= 1500 || 0%{?is_smo} )
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package selinux
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit SELinux package
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: cockpit-shell >= %{required_base}
|
2023-01-09 19:40:38 +01:00
|
|
|
Requires: policycoreutils-python-utils >= 3.1
|
2023-08-18 14:07:29 +02:00
|
|
|
# setroubleshoot is available on SLE Micro starting with 5.5)
|
2024-04-16 14:11:58 +02:00
|
|
|
%if !0%{?suse_version} || ( 0%{?is_smo} && 0%{?sle_version} >= 150500 ) || 0%{?suse_version} >= 1600
|
2023-01-09 19:40:38 +01:00
|
|
|
Requires: setroubleshoot-server >= 3.3.3
|
|
|
|
%endif
|
|
|
|
BuildArch: noarch
|
2015-10-13 13:42:40 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%description selinux
|
|
|
|
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
|
2015-10-13 13:42:40 +02:00
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package -n cockpit-storaged
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit user interface for storage, using udisks
|
|
|
|
Requires: cockpit-shell >= %{required_base}
|
|
|
|
Requires: udisks2 >= 2.9
|
|
|
|
Requires: %{__python3}
|
2020-04-15 10:21:19 +02:00
|
|
|
%if 0%{?suse_version}
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: libudisks2-0_lvm2 >= 2.9
|
|
|
|
Requires: libudisks2-0_btrfs >= 2.9
|
|
|
|
Recommends: multipath-tools
|
|
|
|
Requires: python3-dbus-python
|
2020-04-15 10:21:19 +02:00
|
|
|
%else
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: udisks2-lvm2 >= 2.9
|
|
|
|
Recommends: udisks2-iscsi >= 2.9
|
2024-01-31 12:04:22 +01:00
|
|
|
%if ! 0%{?rhel}
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: udisks2-btrfs >= 2.9
|
2024-01-31 12:04:22 +01:00
|
|
|
%endif
|
2024-06-04 15:46:35 +02:00
|
|
|
Recommends: device-mapper-multipath
|
|
|
|
Recommends: clevis-luks
|
|
|
|
Requires: python3-dbus
|
2015-02-07 14:28:40 +01:00
|
|
|
%endif
|
2024-06-04 15:46:35 +02:00
|
|
|
BuildArch: noarch
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description -n cockpit-storaged
|
|
|
|
The Cockpit component for managing storage. This package uses udisks.
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files -n cockpit-storaged -f storaged.list
|
|
|
|
%{_datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2023-06-14 12:16:36 +02:00
|
|
|
%if 0%{?build_tests}
|
2019-06-25 14:44:15 +02:00
|
|
|
%package -n cockpit-tests
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Tests for Cockpit
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: cockpit-system >= %{required_base}
|
|
|
|
Requires: openssh-clients
|
|
|
|
Provides: cockpit-test-assets = %{version}-%{release}
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%description -n cockpit-tests
|
|
|
|
This package contains tests and files used while testing Cockpit.
|
|
|
|
These files are not required for running Cockpit.
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files -n cockpit-tests -f tests.list
|
2023-06-02 16:08:12 +02:00
|
|
|
%{pamdir}/mock-pam-conv-mod.so
|
|
|
|
%{_unitdir}/cockpit-session.socket
|
|
|
|
%{_unitdir}/cockpit-session@.service
|
2019-06-25 14:44:15 +02:00
|
|
|
|
2023-06-14 12:16:36 +02:00
|
|
|
# /build_tests
|
|
|
|
%endif
|
|
|
|
|
2021-02-17 16:44:07 +01:00
|
|
|
%package devel
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Development files for for Cockpit
|
2021-02-17 16:44:07 +01:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files used to develop cockpit modules
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_datadir}/cockpit/devel
|
|
|
|
|
2023-12-29 11:04:26 +01:00
|
|
|
%if %{build_pcp}
|
2019-06-25 14:44:15 +02:00
|
|
|
%package -n cockpit-pcp
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit PCP integration
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: pcp
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description -n cockpit-pcp
|
|
|
|
Cockpit support for reading PCP metrics and loading PCP archives.
|
2015-02-07 14:28:40 +01:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%files -n cockpit-pcp -f pcp.list
|
|
|
|
%{_libexecdir}/cockpit-pcp
|
|
|
|
%{_localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit
|
2020-04-15 10:21:19 +02:00
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%post -n cockpit-pcp
|
2020-10-02 18:06:56 +02:00
|
|
|
systemctl reload-or-try-restart pmlogger
|
2019-06-25 14:44:15 +02:00
|
|
|
|
2023-12-29 11:04:26 +01:00
|
|
|
%endif
|
|
|
|
|
2019-06-25 14:44:15 +02:00
|
|
|
%package -n cockpit-packagekit
|
2024-06-04 15:46:35 +02:00
|
|
|
Summary: Cockpit user interface for packages
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: cockpit-bridge >= %{required_base}
|
|
|
|
Requires: PackageKit
|
|
|
|
Recommends: python3-tracer
|
2021-08-10 11:08:23 +02:00
|
|
|
# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468
|
2024-06-04 15:46:35 +02:00
|
|
|
Requires: polkit
|
2019-06-25 14:44:15 +02:00
|
|
|
|
|
|
|
%description -n cockpit-packagekit
|
|
|
|
The Cockpit components for installing OS updates and Cockpit add-ons,
|
|
|
|
via PackageKit.
|
|
|
|
|
|
|
|
%files -n cockpit-packagekit -f packagekit.list
|
|
|
|
|
2024-06-04 15:46:35 +02:00
|
|
|
# The changelog is automatically generated and merged
|
2015-02-07 14:28:40 +01:00
|
|
|
%changelog
|