-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
anaconda.spec.in
553 lines (488 loc) · 17.6 KB
/
anaconda.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
Summary: Graphical system installer
Name: anaconda
Version: @VERSION@
Release: @REL@%{?dist}
License: GPLv2+ and MIT
Epoch: 1000
URL: http://fedoraproject.org/wiki/Anaconda
# This should should only be set for development purposes for the time
%global use_cockpit 0
# To generate Source0 do:
# git clone https://github.com/rhinstaller/anaconda
# git checkout -b archive-branch anaconda-%%{version}-%%{release}
# ./autogen.sh
# make dist
Source0: %{name}-%{version}.tar.bz2
Source1: qubesos.conf
Source2: anaconda-gui.json
Source3: anaconda-tui.json
Source4: QubesPlaceholder.html
Source5: QubesPlaceholderWithLinks.html
Source6: 30-qubes-templates.ks
Source7: 40-set-hostname.ks
Source8: 50-qubes.ks
Source9: 60-systemd-preset.ks
Patch0001: 0001-profile-add-Qubes-OS.patch
Patch0002: 0002-Allow-to-specify-default-thin-pool-name-and-size.patch
Patch0003: 0003-Allow-to-provide-default_partitionning-based-on-sche.patch
Patch0004: 0004-Support-for-adding-bootloader-options-in-configurati.patch
Patch0005: 0005-Support-for-setting-encryption-from-configuration-fi.patch
Patch0006: 0006-Support-for-setting-hostname-from-configuration-file.patch
Patch0007: 0007-Use-grub-name-spaced-for-its-options.patch
Patch0008: 0008-Ignore-empty-values-when-parsing-additional_default_.patch
Patch0009: 0009-Fix-grub-config-setup-by-removing-non-xen-options.patch
Patch0010: 0010-Add-skip_grub-parameter-and-allow-boot-encryption-an.patch
Patch0011: 0011-Abort-installation-on-X-startup-fail.patch
Patch0012: 0012-Mark-qubes-user-name-as-reserved.patch
Patch0013: 0013-Check-add-user-to-wheel-and-qubes-groups.patch
Patch0014: 0014-Make-sure-that-a-user-is-created-at-installation-tim.patch
Patch0015: 0015-Drop-useless-on-Qubes-dependencies-on-network-filesy.patch
Patch0016: 0016-Use-installer-kernel-parameters-as-default-for-insta.patch
Patch0017: 0017-Generate-proper-extlinux.conf.patch
Patch0018: 0018-root_password-remove-ssh-options.patch
Patch0019: 0019-Do-not-mount-pre-existing-partitions-and-do-not-dete.patch
Patch0020: 0020-Setup-grubx64.efi-directly-as-a-bootloader.patch
Patch0021: 0021-enable-discard-option-for-dom0-filesystems-by-defaul.patch
Patch0022: 0022-lvm-ensure-qubes-prefix-in-lvgroup-name.patch
Patch0023: 0023-Resolve-filename-into-associated-loop-device.patch
Patch0024: 0024-utils-avoid-adding-duplicated-kernel-entries.patch
Patch0025: 0025-Use-kernel-install-instead-of-grubby-to-regenerate.patch
Patch0026: 0026-Compute-template-RPMs-needed-spaces.patch
Patch0027: 0027-dnfpayload-make-available-repos-for-post-scripts.patch
Patch0028: 0028-Allow-to-skip-enabling-network-in-configuration-file.patch
Patch0029: 0029-Drop-NTP-configuration-spoke.patch
Patch0030: 0030-Simplify-USER-configuration-spoke.patch
Patch0031: 0031-Setting-root-is-not-mandatory.patch
Patch0032: 0032-Set-default-encryption-for-custom-partitioning-too.patch
Patch0033: 0033-Apply-hidden_spokes-setting-to-standalone-spokes-too.patch
Patch0034: 0034-Do-not-add-resume-to-the-kernel-cmdline.patch
Patch0035: 0035-Add-support-for-fstype-in-default-partitioning-confi.patch
Patch0036: 0036-Set-512-LUKS-sector-size-under-LVM.patch
Patch0037: 0037-Restore-support-for-detection-of-unsupported-hardwar.patch
Patch0038: 0038-check-for-Qubes-OS-hardware-required-features.patch
Patch0039: 0039-Install-kernel-latest-package-via-requirements-inste.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
%if ! 0%{?rhel}
%bcond_without glade
%bcond_without live
%define blivetguiver 2.4.2-3
%else
%bcond_with glade
%bcond_with live
%endif
%define dasbusver 1.3
%define dbusver 1.2.3
%define dnfver 3.6.0
%define dracutver 034-7
%define fcoeutilsver 1.0.12-3.20100323git
%define gettextver 0.19.8
%define gtk3ver 3.22.17
%define isomd5sumver 1.0.10
%define langtablever 0.0.60
%define libarchivever 3.0.4
%define libblockdevver 2.1
%define libreportanacondaver 2.0.21-1
%define libxklavierver 5.4
%define mehver 0.23-1
%define nmver 1.0
%define pykickstartver 3.52-1
%define pypartedver 2.5-2
%define pythonblivetver 1:3.9.0-1
%define rpmver 4.15.0
%define simplelinever 1.9.0-1
%define subscriptionmanagerver 1.26
%define utillinuxver 2.15.1
%define rpmostreever 2023.2
BuildRequires: libtool
BuildRequires: gettext-devel >= %{gettextver}
BuildRequires: gtk3-devel >= %{gtk3ver}
BuildRequires: gtk-doc
BuildRequires: gtk3-devel-docs >= %{gtk3ver}
BuildRequires: glib2-doc
BuildRequires: gobject-introspection-devel
%if %{with glade}
BuildRequires: glade-devel
%endif
BuildRequires: libxklavier-devel >= %{libxklavierver}
BuildRequires: make
BuildRequires: pango-devel
BuildRequires: python3-devel
BuildRequires: systemd
# rpm and libarchive are needed for driver disk handling
BuildRequires: rpm-devel >= %{rpmver}
BuildRequires: libarchive-devel >= %{libarchivever}
%ifarch s390 s390x
BuildRequires: s390utils-devel
%endif
# Tools used by the widgets resource bundle generation
BuildRequires: gdk-pixbuf2-devel
BuildRequires: libxml2
Requires: anaconda-gui = %{epoch}:%{version}-%{release}
Requires: anaconda-tui = %{epoch}:%{version}-%{release}
%description
The anaconda package is a metapackage for the Anaconda installer.
%package core
Summary: Core of the Anaconda installer
# core/signal.py is under MIT
License: GPL-2.0-or-later AND MIT
Requires: python3-libs
%if 0%{?rhel} > 10 || 0%{?fedora} > 40
Requires: python3-crypt-r
%endif
Requires: python3-dnf >= %{dnfver}
Requires: python3-blivet >= %{pythonblivetver}
Requires: python3-blockdev >= %{libblockdevver}
Requires: python3-meh >= %{mehver}
%if 0%{?rhel} < 10 || 0%{?fedora}
Requires: libreport-anaconda >= %{libreportanacondaver}
%endif
Requires: libselinux-python3
Requires: python3-rpm >= %{rpmver}
Requires: python3-pyparted >= %{pypartedver}
Requires: python3-requests
Requires: python3-requests-file
Requires: python3-requests-ftp
Requires: python3-kickstart >= %{pykickstartver}
Requires: python3-langtable >= %{langtablever}
Requires: util-linux >= %{utillinuxver}
Requires: python3-gobject-base
Requires: python3-pwquality
Requires: python3-systemd
Requires: python3-productmd
Requires: python3-dasbus >= %{dasbusver}
Requires: flatpak-libs
%if %{defined rhel} && %{undefined centos}
Requires: subscription-manager >= %{subscriptionmanagerver}
%endif
# pwquality only "recommends" the dictionaries it needs to do anything useful,
# which is apparently great for containers but unhelpful for the rest of us
Requires: cracklib-dicts
# do not pull NetworkManager and friends into dom0, install it in the installer
# via lorax only
%if 0%{?rhel} < 10 || 0%{?fedora}
#Requires: teamd
#Requires: NetworkManager-team
%endif
%ifarch s390 s390x
Requires: openssh
%endif
#Requires: NetworkManager >= %{nmver}
# NetworkManager-libnm is just a client part, doesn't pull extra deps
Requires: NetworkManager-libnm >= %{nmver}
Requires: kbd
#Requires: chrony
Requires: systemd
%if 0%{?rhel} > 10 || 0%{?fedora}
#Requires: systemd-resolved
%endif
Requires: python3-pid
# Required by the systemd service anaconda-fips.
#Requires: crypto-policies
#Requires: /usr/bin/update-crypto-policies
# required because of the rescue mode and VNC question
Requires: anaconda-tui = %{epoch}:%{version}-%{release}
# Make sure we get the en locale one way or another
Requires: (glibc-langpack-en or glibc-all-langpacks)
# anaconda literally runs its own dbus-daemon, so it needs this,
# even though the distro default is dbus-broker in F30+
Requires: dbus-daemon
# setting time from time spoke
Requires: /usr/bin/date
# Ensure it's not possible for a version of grubby to be installed
# that doesn't work with btrfs subvolumes correctly...
Conflicts: grubby < 8.40-10
# check for supported hardware on Qubes OS require xl binary
Requires: xen-runtime
Obsoletes: anaconda-images <= 10
Provides: anaconda-images = %{epoch}:%{version}-%{release}
Obsoletes: anaconda-runtime < %{epoch}:%{version}-%{release}
Provides: anaconda-runtime = %{epoch}:%{version}-%{release}
Obsoletes: booty <= 0.107-1
%description core
The anaconda-core package contains the program which was used to install your
system.
%if %{with live}
# do not provide the live subpackage on RHEL
%package live
Summary: Live installation specific files and dependencies
BuildArchitectures: noarch
BuildRequires: desktop-file-utils
# live installation currently implies a graphical installation
Requires: anaconda-gui = %{epoch}:%{version}-%{release}
Requires: zenity
Requires: xisxwayland
Recommends: xhost
%description live
The anaconda-live package contains scripts, data and dependencies required
for live installations.
%endif
%package install-env-deps
Summary: Installation environment specific dependencies
Requires: udisks2-iscsi
Requires: libblockdev-plugins-all >= %{libblockdevver}
%if ! 0%{?rhel}
Requires: libblockdev-lvm-dbus
%endif
# active directory/freeipa join support
Requires: realmd
Requires: isomd5sum >= %{isomd5sumver}
%ifarch %{ix86} x86_64
Recommends: fcoe-utils >= %{fcoeutilsver}
%endif
# likely HFS+ resize support
%ifarch %{ix86} x86_64
%if ! 0%{?rhel}
Requires: hfsplus-tools
%endif
%endif
# kexec support except riscv64
%ifnarch riscv64
Requires: kexec-tools
%endif
# run's on TTY1 in install env
Requires: tmux
# install time crash handling
Requires: gdb
# support for installation from image and live & live image installations
Requires: rsync
# An addon that allows enabling kdump at install time
Recommends: kdump-anaconda-addon
# basic filesystem tools
%if ! 0%{?rhel}
Requires: btrfs-progs
Requires: ntfs-3g
Requires: ntfsprogs
Requires: f2fs-tools
%endif
Requires: xfsprogs
Requires: dosfstools
Requires: e2fsprogs
# External tooling for managing NVMe-FC devices in the installation environment
Recommends: nvme-cli
%description install-env-deps
The anaconda-install-env-deps metapackage lists all installation environment
dependencies. This makes it possible for packages (such as Initial Setup) to
depend on the main Anaconda package without pulling in all the install time
dependencies as well.
%package install-img-deps
Summary: Installation image specific dependencies
# This package must have no weak dependencies.
# Pull in most stuff with the -env- metapackage
Requires: anaconda-install-env-deps = %{epoch}:%{version}-%{release}
# Require storage things that are only recommended in -env-
%ifarch %{ix86} x86_64
Requires: fcoe-utils >= %{fcoeutilsver}
%endif
# only WeakRequires elsewhere and not guaranteed to be present
Requires: device-mapper-multipath
# only WeakRequires in -env-
Requires: kdump-anaconda-addon
%if ! 0%{?rhel}
Requires: zram-generator-defaults
%else
Requires: zram-generator
%endif
# needed for proper driver disk support - if RPMs must be installed, a repo is needed
Requires: createrepo_c
# Display stuff moved from lorax templates
Requires: xorg-x11-drivers
Requires: xorg-x11-server-Xorg
Requires: xrandr
Requires: xrdb
Requires: dbus-x11
Requires: gsettings-desktop-schemas
#Requires: nm-connection-editor
Requires: librsvg2
Requires: gnome-kiosk
Requires: brltty
# dependencies for rpm-ostree payload module
Requires: rpm-ostree >= %{rpmostreever}
Requires: ostree
# used by ostree command for native containers
Requires: skopeo
# External tooling for managing NVMe-FC devices in the installation environment
Requires: nvme-cli
# Needed for bootc
Requires: podman
%description install-img-deps
The anaconda-install-img-deps metapackage lists all boot.iso installation
image dependencies. Add this package to an image build (eg. with lorax) to
ensure all Anaconda capabilities are supported in the resulting image.
%package gui
Summary: Graphical user interface for the Anaconda installer
Requires: anaconda-core = %{epoch}:%{version}-%{release}
Requires: anaconda-widgets = %{epoch}:%{version}-%{release}
Requires: python3-iso639
Requires: python3-meh-gui >= %{mehver}
Requires: python3-xkbregistry
Requires: adwaita-icon-theme
Requires: tecla
Requires: tigervnc-server-minimal
Requires: libxklavier >= %{libxklavierver}
#Requires: nm-connection-editor
#%ifnarch s390 s390x
#Requires: NetworkManager-wifi
#%endif
%if ! 0%{?rhel}
Requires: blivet-gui-runtime >= %{blivetguiver}
%endif
Requires: system-logos
# Needed to compile the gsettings files
BuildRequires: gsettings-desktop-schemas
%description gui
This package contains graphical user interface for the Anaconda installer.
%package tui
Summary: Textual user interface for the Anaconda installer
Requires: anaconda-core = %{epoch}:%{version}-%{release}
Requires: python3-simpleline >= %{simplelinever}
%description tui
This package contains textual user interface for the Anaconda installer.
%package widgets
Summary: A set of custom GTK+ widgets for use with anaconda
Requires: %{__python3}
%description widgets
This package contains a set of custom GTK+ widgets used by the anaconda
installer.
%package widgets-devel
Summary: Development files for anaconda-widgets
%if %{with glade}
Requires: glade
%endif
Requires: %{name}-widgets%{?_isa} = %{epoch}:%{version}-%{release}
%description widgets-devel
This package contains libraries and header files needed for writing the
anaconda installer. It also contains Python and Glade support files,
as well as documentation for working with this library.
%package dracut
Summary: The anaconda dracut module
Requires: dracut >= %{dracutver}
Requires: dracut-network
Requires: dracut-live
Requires: xz
Requires: python3-kickstart
Requires: iputils
%description dracut
The 'anaconda' dracut module handles installer-specific boot tasks and
options. This includes driver disks, kickstarts, and finding the anaconda
runtime on NFS/HTTP/FTP servers or local disks.
%prep
%autosetup -p 1
%build
# use actual build-time release number, not tarball creation time release number
%configure ANACONDA_RELEASE=%{release} %{!?with_glade:--disable-glade}
%{__make} %{?_smp_mflags}
%install
%{make_install}
find %{buildroot} -type f -name "*.la" | xargs %{__rm}
# Create an empty directory for addons
mkdir %{buildroot}%{_datadir}/anaconda/addons
# Create an empty directory for post-scripts
mkdir %{buildroot}%{_datadir}/anaconda/post-scripts
# Copy Qubes OS post-install scripts
cp -r %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} %{buildroot}%{_datadir}/anaconda/post-scripts
# Inject Qubes OS documentation directly
mkdir -p %{buildroot}%{_datadir}/anaconda/help/qubesos/en-US
cp -r %{SOURCE2} %{SOURCE3} %{buildroot}%{_datadir}/anaconda/help/qubesos/
cp -r %{SOURCE4} %{SOURCE5} %{buildroot}%{_datadir}/anaconda/help/qubesos/en-US/
# Copy QubesOS product file
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/profile.d/
%if %{with live}
# required for live installations
desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/liveinst.desktop
%else
# Remove all live-installer files from the buildroot
rm -rf \
%{buildroot}/%{_sysconfdir}/xdg/autostart/liveinst-setup.desktop \
%{buildroot}/%{_bindir}/liveinst \
%{buildroot}/%{_libexecdir}/liveinst-setup.sh \
%{buildroot}/%{_datadir}/anaconda/gnome \
%{buildroot}/%{_datadir}/anaconda/gnome/fedora-welcome \
%{buildroot}/%{_datadir}/anaconda/gnome/org.fedoraproject.welcome-screen.desktop \
%{buildroot}/%{_datadir}/polkit-1/actions/* \
%{buildroot}/%{_datadir}/applications/liveinst.desktop
%endif
# Add localization files
%find_lang %{name}
# main package and install-env-deps are metapackages
%files
%files install-env-deps
# Allow the lang file to be empty
%define _empty_manifest_terminate_build 0
%files install-img-deps
# Allow the lang file to be empty here too
%define _empty_manifest_terminate_build 0
%files core -f %{name}.lang
%license COPYING
%{_unitdir}/*
%{_prefix}/lib/systemd/system-generators/*
%{_bindir}/instperf
%{_bindir}/anaconda-disable-nm-ibft-plugin
%{_bindir}/anaconda-nm-disable-autocons
%{_sbindir}/anaconda
%{_sbindir}/handle-sshpw
%{_datadir}/anaconda
%{_prefix}/libexec/anaconda
%exclude %{_datadir}/anaconda/gnome
%exclude %{_datadir}/anaconda/pixmaps
%exclude %{_datadir}/anaconda/ui
%exclude %{_datadir}/anaconda/window-manager
%exclude %{_datadir}/anaconda/anaconda-gtk.css
%dir %{_datadir}/anaconda/post-scripts
%exclude %{_prefix}/libexec/anaconda/dd_*
%{python3_sitearch}/pyanaconda
%exclude %{python3_sitearch}/pyanaconda/rescue.py*
%exclude %{python3_sitearch}/pyanaconda/__pycache__/rescue.*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/*
%exclude %{python3_sitearch}/pyanaconda/ui/tui/*
%{_bindir}/anaconda-cleanup
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/*
%dir %{_sysconfdir}/%{name}/conf.d
%config %{_sysconfdir}/%{name}/conf.d/*
%dir %{_sysconfdir}/%{name}/profile.d
%config %{_sysconfdir}/%{name}/profile.d/*
%if %{with live}
# do not provide the live subpackage on RHEL
%files live
%{_bindir}/liveinst
%{_datadir}/polkit-1/actions/*
%{_libexecdir}/liveinst-setup.sh
%{_datadir}/applications/*.desktop
%{_datadir}/anaconda/gnome
%{_sysconfdir}/xdg/autostart/*.desktop
%endif
%files gui
%{python3_sitearch}/pyanaconda/ui/gui/*
%{_datadir}/anaconda/pixmaps
%{_datadir}/anaconda/ui
%if 0%{?rhel}
# Remove blivet-gui
%exclude %{_datadir}/anaconda/ui/spokes/blivet_gui.*
%exclude %{python3_sitearch}/pyanaconda/ui/gui/spokes/blivet_gui.*
%endif
%{_datadir}/anaconda/window-manager
%{_datadir}/anaconda/anaconda-gtk.css
%{_datadir}/anaconda/gtk-4.0/settings.ini
%files tui
%{python3_sitearch}/pyanaconda/rescue.py
%{python3_sitearch}/pyanaconda/__pycache__/rescue.*
%{python3_sitearch}/pyanaconda/ui/tui/*
%files widgets
%{_libdir}/libAnacondaWidgets.so.*
%{_libdir}/girepository*/AnacondaWidgets*typelib
%{python3_sitearch}/gi/overrides/*
%files widgets-devel
%{_includedir}/*
%{_libdir}/libAnacondaWidgets.so
%if %{with glade}
%{_libdir}/glade/modules/libAnacondaWidgets.so
%{_datadir}/glade/catalogs/AnacondaWidgets.xml
%endif
%{_datadir}/gtk-doc
%files dracut
%dir %{_prefix}/lib/dracut/modules.d/80%{name}
%{_prefix}/lib/dracut/modules.d/80%{name}/*
%{_prefix}/libexec/anaconda/dd_*
%changelog
@CHANGELOG@