Debian Codegraph @

tools/cockpit.spec

raw
1 #
2 # Copyright (C) 2014-2020 Red Hat, Inc.
3 # SPDX-License-Identifier: LGPL-2.1-or-later
4 #
5
6 # This file is maintained at the following location:
7 # https://github.com/cockpit-project/cockpit/blob/main/tools/cockpit.spec
8 #
9 # If you are editing this file in another location, changes will likely
10 # be clobbered the next time an automated release is done.
11 #
12 # Check first [email protected]
13 #
14
15 # earliest base that the subpackages work on; this is still required as long as
16 # we maintain the basic/optional split, then it can be replaced with just %{version}.
17 %define required_base 266
18
19 # we generally want CentOS packages to be like RHEL; special cases need to check %{centos} explicitly
20 %if 0%{?centos}
21 %define rhel %{centos}
22 %endif
23
24 %define _hardened_build 1
25
26 %define __lib lib
27
28 %if 0%{?suse_version} > 1500
29 %define pamconfdir %{_pam_vendordir}
30 %define pamconfig tools/cockpit.suse.pam
31 %else
32 %define pamconfdir %{_sysconfdir}/pam.d
33 %define pamconfig tools/cockpit.pam
34 %endif
35
36 %if %{defined _pamdir}
37 %define pamdir %{_pamdir}
38 %else
39 %define pamdir %{_libdir}/security
40 %endif
41
42 # distributions which ship nodejs-esbuild can rebuild the bundle during package build
43 # allow override from command line (e.g. for development builds)
44 %if 0%{?fedora} >= 42
45 %{!?rebuild_bundle: %define rebuild_bundle 1}
46 %endif
47
48 # to avoid using asciidoc-py in RHEL and CentOS we use the prebuilt docs
49 %if 0%{?rhel}
50 %define bundle_docs 1
51 %endif
52
53 Name: cockpit
54 Summary: Web Console for Linux servers
55 License: LGPL-2.1-or-later AND GPL-3.0-or-later AND MIT AND CC-BY-SA-3.0 AND BSD-3-Clause
56 URL: https://cockpit-project.org/
57
58 Version: 368
59 Release: 1%{?dist}
60 Source0: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-%{version}.tar.xz
61 Source1: https://github.com/cockpit-project/cockpit/releases/download/%{version}/cockpit-node-%{version}.tar.xz
62
63 %if 0%{?fedora} >= 41 || 0%{?rhel}
64 ExcludeArch: %{ix86}
65 %endif
66
67 %define enable_multihost 1
68 %if 0%{?fedora} >= 41 || 0%{?rhel} >= 10
69 %define enable_multihost 0
70 %endif
71
72 # Ship custom SELinux policy
73 %define selinuxtype targeted
74 %define selinux_configure_arg --enable-selinux-policy=%{selinuxtype}
75
76 BuildRequires: gcc
77 BuildRequires: pkgconfig(gio-unix-2.0)
78 BuildRequires: pkgconfig(json-glib-1.0)
79 BuildRequires: pkgconfig(polkit-agent-1) >= 0.105
80 BuildRequires: pam-devel
81
82 BuildRequires: autoconf automake
83 BuildRequires: make
84 BuildRequires: python3-devel
85 BuildRequires: gettext >= 0.21
86 BuildRequires: openssl-devel
87 BuildRequires: gnutls-devel >= 3.4.3
88 BuildRequires: zlib-devel
89 BuildRequires: krb5-devel >= 1.11
90 BuildRequires: glib-networking
91 BuildRequires: sed
92
93 BuildRequires: glib2-devel >= 2.68.0
94 # this is for runtimedir in the tls proxy ace21c8879
95 BuildRequires: systemd-devel >= 235
96 %if 0%{?suse_version}
97 BuildRequires: distribution-release
98 BuildRequires: openssh
99 BuildRequires: distribution-logos
100 BuildRequires: wallpaper-branding
101 %else
102 BuildRequires: openssh-clients
103 %endif
104 BuildRequires: krb5-server
105 BuildRequires: gdb
106
107 %if 0%{?rebuild_bundle}
108 BuildRequires: nodejs
109 BuildRequires: %{_bindir}/node
110 BuildRequires: nodejs-esbuild
111 %endif
112
113 %if !%{defined bundle_docs}
114 %if 0%{?suse_version}
115 BuildRequires: rubygem(asciidoctor)
116 %else
117 BuildRequires: asciidoctor
118 %endif
119 %endif
120
121 BuildRequires: selinux-policy
122 BuildRequires: selinux-policy-devel
123
124 # This is the "cockpit" metapackage. It should only
125 # Require, Suggest or Recommend other cockpit-xxx subpackages
126
127 Requires: cockpit-bridge
128 Requires: cockpit-ws
129 Requires: cockpit-system
130
131 # Optional components
132 Recommends: (cockpit-storaged if udisks2)
133 Recommends: (cockpit-packagekit if dnf)
134 %if 0%{?suse_version} == 0
135 Recommends: (dnf5daemon-server if dnf5)
136 %endif
137 Suggests: python3-pcp
138
139 %if 0%{?rhel} == 0
140 Recommends: (cockpit-networkmanager if NetworkManager)
141 # c-ostree is not in RHEL 8/9
142 Recommends: (cockpit-ostree if rpm-ostree)
143 Suggests: cockpit-selinux
144 %endif
145 %if 0%{?rhel} && 0%{?centos} == 0
146 Recommends: subscription-manager-cockpit
147 %endif
148
149 BuildRequires: python3-devel
150 BuildRequires: python3-pip
151 %if 0%{?rhel} == 0 && !0%{?suse_version}
152 # All of these are only required for running pytest (which we only do on Fedora)
153 BuildRequires: procps-ng
154 BuildRequires: python3-pytest-asyncio
155 BuildRequires: python3-pytest-timeout
156 %endif
157
158 %prep
159 %setup -q -n cockpit-%{version}
160 %if 0%{?rebuild_bundle}
161 %setup -q -D -T -a 1 -n cockpit-%{version}
162 %endif
163
164 %build
165 %if 0%{?rebuild_bundle}
166 rm -rf dist
167 # HACK: node module packaging is currently broken in Fedora ≤ 43, should be in
168 # common location, not major version specific one
169 NODE_ENV=production NODE_PATH=/usr/lib/node_modules:$(echo /usr/lib/node_modules_*) ./build.js
170 %else
171 # Use pre-built bundle on distributions without nodejs-esbuild
172 %endif
173
174 %configure \
175 %{?selinux_configure_arg} \
176 %if 0%{?suse_version}
177 --docdir=%_defaultdocdir/%{name} \
178 %endif
179 --with-pamdir='%{pamdir}' \
180 %if %{enable_multihost}
181 --enable-multihost \
182 %endif
183 %if %{defined bundle_docs}
184 --disable-doc \
185 %endif
186
187 %make_build
188
189 %check
190 make -j$(nproc) check
191
192 %if 0%{?rhel} == 0 && 0%{?suse_version} == 0
193 export NO_QUNIT=1
194 %pytest
195 %endif
196
197 %install
198 %if 0%{?suse_version}
199 export NO_BRP_STALE_LINK_ERROR="yes"
200 %endif
201 %make_install
202
203 mkdir -p $RPM_BUILD_ROOT%{pamconfdir}
204 install -p -m 644 %{pamconfig} $RPM_BUILD_ROOT%{pamconfdir}/cockpit
205
206 rm -f %{buildroot}/%{_libdir}/cockpit/*.so
207 install -D -p -m 644 AUTHORS README.md %{buildroot}%{_docdir}/cockpit/
208
209 # We install the upstream pre-built docs as we can't build them
210 %if %{defined bundle_docs}
211 %define docbundledir %{_builddir}/%{name}-%{version}/doc/output/html
212 install -d %{buildroot}%{_docdir}/cockpit/guide
213 cp -rp %{docbundledir}/* %{buildroot}%{_docdir}/cockpit/guide/
214 # Install pre-built man pages
215 %define manbundledir %{_builddir}/%{name}-%{version}/doc/output/man
216 for section in 1 5 8; do
217 for manpage in %{manbundledir}/*.${section}; do
218 install -D -p -m 644 "$manpage" %{buildroot}%{_mandir}/man${section}/$(basename "$manpage")
219 done
220 done
221 %endif
222
223 # Build the package lists for resource packages
224 # cockpit-bridge is the basic dependency for all cockpit-* packages, so centrally own the page directory
225 echo '%dir %{_datadir}/cockpit' > base.list
226 echo '%dir %{_datadir}/cockpit/base1' >> base.list
227 find %{buildroot}%{_datadir}/cockpit/base1 -type f -o -type l >> base.list
228 echo '%{_sysconfdir}/cockpit/machines.d' >> base.list
229 echo %{buildroot}%{_datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy >> base.list
230
231 echo '%dir %{_datadir}/cockpit/shell' >> system.list
232 find %{buildroot}%{_datadir}/cockpit/shell -type f >> system.list
233
234 echo '%dir %{_datadir}/cockpit/systemd' >> system.list
235 find %{buildroot}%{_datadir}/cockpit/systemd -type f >> system.list
236
237 echo '%dir %{_datadir}/cockpit/users' >> system.list
238 find %{buildroot}%{_datadir}/cockpit/users -type f >> system.list
239
240 echo '%dir %{_datadir}/cockpit/metrics' >> system.list
241 find %{buildroot}%{_datadir}/cockpit/metrics -type f >> system.list
242
243 echo '%dir %{_datadir}/cockpit/kdump' > kdump.list
244 find %{buildroot}%{_datadir}/cockpit/kdump -type f >> kdump.list
245
246 echo '%dir %{_datadir}/cockpit/sosreport' > sosreport.list
247 find %{buildroot}%{_datadir}/cockpit/sosreport -type f >> sosreport.list
248
249 echo '%dir %{_datadir}/cockpit/storaged' > storaged.list
250 find %{buildroot}%{_datadir}/cockpit/storaged -type f >> storaged.list
251
252 echo '%dir %{_datadir}/cockpit/networkmanager' > networkmanager.list
253 find %{buildroot}%{_datadir}/cockpit/networkmanager -type f >> networkmanager.list
254
255 echo '%dir %{_datadir}/cockpit/packagekit' > packagekit.list
256 find %{buildroot}%{_datadir}/cockpit/packagekit -type f >> packagekit.list
257
258 echo '%dir %{_datadir}/cockpit/apps' >> packagekit.list
259 find %{buildroot}%{_datadir}/cockpit/apps -type f >> packagekit.list
260
261 echo '%dir %{_datadir}/cockpit/selinux' > selinux.list
262 find %{buildroot}%{_datadir}/cockpit/selinux -type f >> selinux.list
263
264 echo '%dir %{_datadir}/cockpit/static' > static.list
265 echo '%dir %{_datadir}/cockpit/static/fonts' >> static.list
266 find %{buildroot}%{_datadir}/cockpit/static -type f >> static.list
267
268 sed -i "s|%{buildroot}||" *.list
269
270 %if 0%{?suse_version}
271 # remove files of not installable packages
272 rm -r %{buildroot}%{_datadir}/cockpit/sosreport
273 rm -f %{buildroot}/%{_prefix}/share/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml
274 rm -f %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png
275 %else
276 %global _debugsource_packages 1
277 %global _debuginfo_subpackages 0
278
279 %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}"
280
281 %endif
282 # /suse_version
283 rm -rf %{buildroot}/usr/src/debug
284
285 # On RHEL kdump, networkmanager, selinux, and sosreport are part of the system package
286 %if 0%{?rhel}
287 cat kdump.list sosreport.list networkmanager.list selinux.list >> system.list
288 rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml
289 rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml
290 rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_selinux.metainfo.xml
291 rm -f %{buildroot}%{_datadir}/metainfo/org.cockpit_project.cockpit_networkmanager.metainfo.xml
292 rm -f %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png
293 %endif
294
295 # -------------------------------------------------------------------------------
296 # Sub-packages
297
298 %description
299 The Cockpit Web Console enables users to administer GNU/Linux servers using a
300 web browser.
301
302 It offers network configuration, log inspection, diagnostic reports, SELinux
303 troubleshooting, interactive command-line sessions, and more.
304
305 %files
306 %license LICENSES/LGPL-2.1.txt
307 %{_docdir}/cockpit/AUTHORS
308 %{_docdir}/cockpit/README.md
309 %{_datadir}/metainfo/org.cockpit_project.cockpit.appdata.xml
310 %{_datadir}/icons/hicolor/128x128/apps/cockpit.png
311 %doc %{_mandir}/man1/cockpit.1.gz
312
313
314 %package bridge
315 Summary: Cockpit bridge server-side component
316 BuildArch: noarch
317
318 %description bridge
319 The Cockpit bridge component installed server side and runs commands on the
320 system on behalf of the web based user interface.
321
322 %files bridge -f base.list
323 %license LICENSES/GPL-3.0.txt
324 %doc %{_mandir}/man1/cockpit-bridge.1.gz
325 %{_bindir}/cockpit-bridge
326 %{_libexecdir}/cockpit-askpass
327 %{python3_sitelib}/%{name}*
328
329 %package doc
330 Summary: Cockpit deployment and developer guide
331 BuildArch: noarch
332
333 %description doc
334 The Cockpit Deployment and Developer Guide shows sysadmins how to
335 deploy Cockpit on their machines as well as helps developers who want to
336 embed or extend Cockpit.
337
338 %files doc
339 %license LICENSES/LGPL-2.1.txt
340 %exclude %{_docdir}/cockpit/AUTHORS
341 %exclude %{_docdir}/cockpit/README.md
342 %{_docdir}/cockpit
343
344 %package system
345 Summary: Cockpit admin interface package for configuring and troubleshooting a system
346 BuildArch: noarch
347 Requires: cockpit-bridge >= %{version}-%{release}
348 %if !0%{?suse_version}
349 Requires: shadow-utils
350 %endif
351 Requires: grep
352 Requires: /usr/bin/pwscore
353 Requires: /usr/bin/date
354 Provides: cockpit-shell = %{version}-%{release}
355 Provides: cockpit-systemd = %{version}-%{release}
356 Provides: cockpit-tuned = %{version}-%{release}
357 Provides: cockpit-users = %{version}-%{release}
358 %if 0%{?rhel}
359 Requires: NetworkManager >= 1.6
360 Requires: sos
361 Requires: sudo
362 Recommends: setroubleshoot-server >= 3.3.3
363 Recommends: /usr/bin/kdumpctl
364 Suggests: NetworkManager-team
365 Suggests: python3-pcp
366 Provides: cockpit-kdump = %{version}-%{release}
367 Provides: cockpit-networkmanager = %{version}-%{release}
368 Provides: cockpit-selinux = %{version}-%{release}
369 Provides: cockpit-sosreport = %{version}-%{release}
370 %endif
371
372 Provides: bundled(npm(@patternfly/patternfly)) = 6.6.1
373 Provides: bundled(npm(@patternfly/react-core)) = 6.6.1
374 Provides: bundled(npm(@patternfly/react-icons)) = 6.6.1
375 Provides: bundled(npm(@patternfly/react-styles)) = 6.6.1
376 Provides: bundled(npm(@patternfly/react-table)) = 6.6.1
377 Provides: bundled(npm(@patternfly/react-tokens)) = 6.6.1
378 Provides: bundled(npm(@xterm/addon-webgl)) = 0.19.0
379 Provides: bundled(npm(@xterm/xterm)) = 6.0.0
380 Provides: bundled(npm(dequal)) = 2.0.3
381 Provides: bundled(npm(focus-trap)) = 7.6.6
382 Provides: bundled(npm(ipaddr.js)) = 2.5.0
383 Provides: bundled(npm(json-stable-stringify-without-jsonify)) = 1.0.1
384 Provides: bundled(npm(lodash)) = 4.18.1
385 Provides: bundled(npm(prop-types)) = 15.8.1
386 Provides: bundled(npm(react)) = 18.3.1
387 Provides: bundled(npm(react-dom)) = 18.3.1
388 Provides: bundled(npm(remarkable)) = 2.0.1
389 Provides: bundled(npm(scheduler)) = 0.23.2
390 Provides: bundled(npm(tabbable)) = 6.5.0
391 Provides: bundled(npm(throttle-debounce)) = 5.0.2
392 Provides: bundled(npm(tslib)) = 2.8.1
393 Provides: bundled(npm(uuid)) = 14.0.2
394
395 %description system
396 This package contains the Cockpit shell and system configuration interfaces.
397
398 %files system -f system.list
399 %license LICENSES/LGPL-2.1.txt
400 %dir %{_datadir}/cockpit/shell/images
401
402 %package ws
403 Summary: Cockpit Web Service
404 Requires: openssl
405 Requires: glib2 >= 2.68.0
406 Requires: (%{name}-ws-selinux = %{version}-%{release} if selinux-policy-base)
407 Recommends: sscg >= 2.3
408 Recommends: system-logos
409 Suggests: sssd-dbus >= 2.6.2
410 # for cockpit-desktop
411 Suggests: python3
412 Obsoletes: cockpit-tests < 331
413
414 # prevent hard python3 dependency for cockpit-desktop, it falls back to other browsers
415 %global __requires_exclude_from ^%{_libexecdir}/cockpit-client$
416
417 %description ws
418 The Cockpit Web Service listens on the network, and authenticates users.
419
420 If sssd-dbus is installed, you can enable client certificate/smart card
421 authentication via sssd/FreeIPA.
422
423 %files ws -f static.list
424 %license LICENSES/LGPL-2.1.txt
425 %doc %{_mandir}/man1/cockpit-desktop.1.gz
426 %doc %{_mandir}/man5/cockpit.conf.5.gz
427 %doc %{_mandir}/man8/cockpit-ws.8.gz
428 %doc %{_mandir}/man8/cockpit-tls.8.gz
429 %doc %{_mandir}/man8/pam_ssh_add.8.gz
430 %dir %{_sysconfdir}/cockpit
431 %config(noreplace) %{_sysconfdir}/cockpit/ws-certs.d
432 %config(noreplace) %{pamconfdir}/cockpit
433
434 # created in %post, so that users can rm the files
435 %ghost %{_sysconfdir}/issue.d/cockpit.issue
436 %ghost %{_sysconfdir}/motd.d/cockpit
437 %ghost %attr(0644, root, root) %{_sysconfdir}/cockpit/disallowed-users
438 %dir %{_datadir}/cockpit/issue
439 %{_datadir}/cockpit/issue/update-issue
440 %{_datadir}/cockpit/issue/inactive.issue
441 %{_unitdir}/cockpit.service
442 %{_unitdir}/cockpit-issue.service
443 %{_unitdir}/cockpit.socket
444 %{_unitdir}/cockpit-session-socket-user.service
445 %{_unitdir}/cockpit-session.socket
446 %{_unitdir}/[email protected]
447 %{_unitdir}/cockpit-wsinstance-http.socket
448 %{_unitdir}/cockpit-wsinstance-http.service
449 %{_unitdir}/cockpit-wsinstance-https-factory.socket
450 %{_unitdir}/[email protected]
451 %{_unitdir}/[email protected]
452 %{_unitdir}/[email protected]
453 %{_unitdir}/cockpit-wsinstance-socket-user.service
454 %{_unitdir}/system-cockpithttps.slice
455 %{_prefix}/%{__lib}/tmpfiles.d/cockpit-ws.conf
456 %{pamdir}/pam_ssh_add.so
457 %{_libexecdir}/cockpit-ws
458 %{_libexecdir}/cockpit-wsinstance-factory
459 %{_libexecdir}/cockpit-tls
460 %{_libexecdir}/cockpit-client
461 %{_libexecdir}/cockpit-client.ui
462 %{_libexecdir}/cockpit-desktop
463 %{_libexecdir}/cockpit-certificate-ensure
464 %{_libexecdir}/cockpit-certificate-helper
465 %{_libexecdir}/cockpit-session
466 %{_datadir}/cockpit/branding
467
468 %post ws
469 # set up dynamic motd/issue symlinks on first-time install; don't bring them back on upgrades if admin removed them
470 # disable root login on first-time install; so existing installations aren't changed
471 if [ "$1" = 1 ]; then
472 mkdir -p /etc/motd.d /etc/issue.d
473 ln -s ../../run/cockpit/issue /etc/motd.d/cockpit
474 ln -s ../../run/cockpit/issue /etc/issue.d/cockpit.issue
475 printf "# List of users which are not allowed to login to Cockpit\n" > /etc/cockpit/disallowed-users
476 printf "root\n" >> /etc/cockpit/disallowed-users
477 chmod 644 /etc/cockpit/disallowed-users
478 fi
479
480 # on upgrades, adjust motd/issue links to changed target if they still exist (changed in 331)
481 if [ "$1" = 2 ]; then
482 if [ "$(readlink /etc/motd.d/cockpit 2>/dev/null)" = "../../run/cockpit/motd" ]; then
483 ln -sfn ../../run/cockpit/issue /etc/motd.d/cockpit
484 fi
485 if [ "$(readlink /etc/issue.d/cockpit.issue 2>/dev/null)" = "../../run/cockpit/motd" ]; then
486 ln -sfn ../../run/cockpit/issue /etc/issue.d/cockpit.issue
487 fi
488 fi
489
490 %tmpfiles_create cockpit-ws.conf
491 %systemd_post cockpit.socket cockpit.service
492 # firewalld only partially picks up changes to its services files without this
493 test -f %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || true
494
495 # remove obsolete system user on upgrade (replaced with DynamicUser in version 330)
496 if getent passwd cockpit-wsinstance >/dev/null; then
497 userdel cockpit-wsinstance
498 fi
499
500 %preun ws
501 %systemd_preun cockpit.socket cockpit.service
502
503 %postun ws
504 %systemd_postun_with_restart cockpit.socket cockpit.service
505
506 %package ws-selinux
507 Summary: SELinux security policy for cockpit-ws
508 # older -ws contained the SELinux policy, now split out
509 Conflicts: %{name}-ws < 337-1.2025
510 Requires(post): selinux-policy-%{selinuxtype} >= %{_selinux_policy_version}
511 Requires(post): libselinux-utils
512 Requires(post): policycoreutils
513
514 %description ws-selinux
515 SELinux policy module for the cockpit-ws package.
516
517 %files ws-selinux
518 %license LICENSES/LGPL-2.1.txt
519 %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
520 %{_mandir}/man8/%{name}_session_selinux.8cockpit.*
521 %{_mandir}/man8/%{name}_ws_selinux.8cockpit.*
522 %ghost %{_selinux_store_path}/%{selinuxtype}/active/modules/200/%{name}
523
524 %pre ws-selinux
525 %selinux_relabel_pre -s %{selinuxtype}
526
527 %post ws-selinux
528 %selinux_modules_install -s %{selinuxtype} %{_datadir}/selinux/packages/%{selinuxtype}/%{name}.pp.bz2
529 %selinux_relabel_post -s %{selinuxtype}
530
531 %postun ws-selinux
532 %selinux_modules_uninstall -s %{selinuxtype} %{name}
533 %selinux_relabel_post -s %{selinuxtype}
534
535 # -------------------------------------------------------------------------------
536 # Sub-packages that are part of cockpit-system in RHEL/CentOS, but separate in Fedora
537
538 %if 0%{?rhel} == 0
539
540 %package kdump
541 Summary: Cockpit user interface for kernel crash dumping
542 Requires: cockpit-bridge >= %{required_base}
543 Requires: cockpit-shell >= %{required_base}
544 %if 0%{?suse_version}
545 Requires: kexec-tools
546 %else
547 Requires: /usr/bin/kdumpctl
548 %endif
549 BuildArch: noarch
550
551 %description kdump
552 The Cockpit component for configuring kernel crash dumping.
553
554 %files kdump -f kdump.list
555 %license LICENSES/LGPL-2.1.txt
556 %{_datadir}/metainfo/org.cockpit_project.cockpit_kdump.metainfo.xml
557
558 # sosreport is not supported on opensuse yet
559 %if !0%{?suse_version}
560 %package sosreport
561 Summary: Cockpit user interface for diagnostic reports
562 Requires: cockpit-bridge >= %{required_base}
563 Requires: cockpit-shell >= %{required_base}
564 Requires: sos
565 BuildArch: noarch
566
567 %description sosreport
568 The Cockpit component for creating diagnostic reports with the
569 sosreport tool.
570
571 %files sosreport -f sosreport.list
572 %license LICENSES/LGPL-2.1.txt
573 %{_datadir}/metainfo/org.cockpit_project.cockpit_sosreport.metainfo.xml
574 %{_datadir}/icons/hicolor/64x64/apps/cockpit-sosreport.png
575 %endif
576
577 %package networkmanager
578 Summary: Cockpit user interface for networking, using NetworkManager
579 Requires: cockpit-bridge >= %{required_base}
580 Requires: cockpit-shell >= %{required_base}
581 Requires: NetworkManager >= 1.6
582 # Optional components
583 Recommends: NetworkManager-team
584 BuildArch: noarch
585
586 %description networkmanager
587 The Cockpit component for managing networking. This package uses
588 NetworkManager.
589
590 %files networkmanager -f networkmanager.list
591 %license LICENSES/LGPL-2.1.txt
592 %{_datadir}/metainfo/org.cockpit_project.cockpit_networkmanager.metainfo.xml
593
594 %endif
595
596 %if 0%{?rhel} == 0
597
598 %package selinux
599 Summary: Cockpit SELinux package
600 Requires: cockpit-bridge >= %{required_base}
601 Requires: cockpit-shell >= %{required_base}
602 # setroubleshoot is available on SLE Micro starting with 5.5
603 %if !0%{?is_smo} || ( 0%{?is_smo} && 0%{?sle_version} >= 150500 )
604 Requires: setroubleshoot-server >= 3.3.3
605 %endif
606 BuildArch: noarch
607
608 %description selinux
609 This package contains the Cockpit user interface integration with the
610 utility setroubleshoot to diagnose and resolve SELinux issues.
611
612 %files selinux -f selinux.list
613 %license LICENSES/LGPL-2.1.txt
614 %{_datadir}/metainfo/org.cockpit_project.cockpit_selinux.metainfo.xml
615
616 %endif
617
618 %package -n cockpit-storaged
619 Summary: Cockpit user interface for storage, using udisks
620 Requires: cockpit-shell >= %{required_base}
621 Requires: udisks2 >= 2.9
622 Recommends: udisks2-lvm2 >= 2.9
623 Recommends: udisks2-iscsi >= 2.9
624 %if ! 0%{?rhel}
625 Recommends: (udisks2-btrfs >= 2.9 if btrfs-progs)
626 %endif
627 Recommends: device-mapper-multipath
628 Recommends: clevis-luks
629 Requires: %{__python3}
630 %if 0%{?suse_version}
631 Requires: python3-dbus-python
632 %else
633 Requires: python3-dbus
634 %endif
635 BuildArch: noarch
636
637 %description -n cockpit-storaged
638 The Cockpit component for managing storage. This package uses udisks.
639
640 %files -n cockpit-storaged -f storaged.list
641 %license LICENSES/LGPL-2.1.txt
642 %{_datadir}/metainfo/org.cockpit_project.cockpit_storaged.metainfo.xml
643
644 %post storaged
645
646 # version 332 moved the btrfs temp mounts db to /run
647 if [ "$1" = 2 ] && [ -d /var/lib/cockpit/btrfs ]; then
648 rm -rf --one-file-system /var/lib/cockpit/btrfs || true
649 fi
650
651 %package -n cockpit-packagekit
652 Summary: Cockpit user interface for packages
653 BuildArch: noarch
654 Requires: cockpit-bridge >= %{required_base}
655 Requires: PackageKit
656 Recommends: python3-tracer
657 # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=1800468
658 Requires: polkit
659
660 %description -n cockpit-packagekit
661 The Cockpit components for installing OS updates and Cockpit add-ons,
662 via PackageKit.
663
664 %files -n cockpit-packagekit -f packagekit.list
665 %license LICENSES/LGPL-2.1.txt
666
667 # The changelog is automatically generated and merged
668 %changelog