Sync from SUSE:SLFO:Main dracut revision 7a1fb3ea9b1f0a3c2e753d5e64b31260

This commit is contained in:
Adrian Schröter 2024-05-03 12:12:54 +02:00
commit 2416fdfcb7
9 changed files with 5680 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

338
README.susemaint Normal file
View File

@ -0,0 +1,338 @@
Maintaining dracut
==================
1. Adding/Submitting patches:
Patches are added as merge requests on GitHub against the respective maintenance
branch. Currently, these active maintenance branches are:
- SUSE/044 -> SLE 12 SP5
- SUSE/049 -> SLE 15 SP2, SLE 15 SP3
- SUSE/055 -> SLE 15 SP4
- SLE-15-SP5_Update -> SLE 15 SP5 (based on SUSE/055 plus some specific patches)
- SUSE/059 -> Tumbleweed
Rules:
- Follow the commit message convention [1].
- Write related Bugzilla ID in the commit message (the dracut.changes file is
updated automatically from the information of the patch).
- If the Bugzilla ID cannot be added to the commit title because the length is
greater than 80 characters (the maximum allowed), then write it into the
commit description (it must be manually added to dracut.changes prior to OBS
submission).
- To indicate backports of upstream commits use `git cherry-pick -x` (this
automatically appends "cherry picked from commit xxxxx").
- First, check if your patch can be submitted upstream, and if so, do it there
first. Once approved, it can be backported here.
Example, fix for https://bugzilla.opensuse.org/show_bug.cgi?id=1203749:
```
commit 92a6793c7d94a9a70c99ffcaf72112808164851b
Author: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Wed Sep 21 11:54:17 2022 +0200
fix(systemd): add missing modprobe@.service (bsc#1203749)
sys-kernel-config.mount needs modprobe@configfs.service since systemd v246.7
(https://github.com/systemd/systemd/commit/42cc2855), so the kernel configfs
fails to mount in the initrd.
(cherry picked from commit 928252a145ca44627ba5873e01245eabe246992f)
```
2. Updating the OBS repo:
2.1. Branch dracut
- Go to the Factory OBS repo [2] and "Branch Package".
- Checkout branch with `osc`:
$ osc checkout home:USER:branches:openSUSE:Factory/dracut
2.2. Trigger services and build the package
$ rm dracut*.xz
$ rm dracut*.obscpio
$ osc service manualrun
$ osc ar
* Verify that the new Bugzilla IDs are referenced in the dracut.changes file.
2.3. Commit the changes
$ osc commit
* Verify that the package is correctly built in the OBS branch.
* Test the built package and make sure it fixes the bug.
2.4. Create request to submit source
$ osc sr
* The request is submitted against the OBS Devel repo [3].
--
[1] Commit message convention: https://github.com/dracutdevs/dracut/blob/master/docs/HACKING.md#commit-messages
[2] Factory OBS repo: https://build.opensuse.org/package/show/openSUSE:Factory/dracut
[3] Factory OBS Devel repo: https://build.opensuse.org/package/show/Base:System/dracut
Current status of the SUSE/059 branch (Tumbleweed)
==================================================
1. Upstream commits that were already merged
The following list shows the commits merged (those marked with "MERGED") since
the upgrade to dracut-059 (0aa08f0e docs: update NEWS.md and AUTHORS), extracted
using `git log --oneline 0aa08f0e..HEAD`:
4980bad3 fix(configure): misleading error if C compiler is not installed
de8ac630 fix(github): update format of labeler
MERGED 4971f443 fix(systemd-journald): add systemd-sysusers dependency
MERGED 4d594210 fix(dracut-initramfs-restore.sh): do not set selinux labels if disabled
MERGED 1586af09 fix(systemd-repart): correct undefined $libdir
MERGED bddffeda fix(overlayfs): split overlayfs mount in two steps
MERGED 1c762c0d fix(pkcs11): delete trailing dot on libcryptsetup-token-systemd-pkcs11.so
856e7acd docs: update NEWS.md and AUTHORS
MERGED b2af8c8b fix(install.d): do not create initramfs if the supplied image is UKI
MERGED bee1c482 feat(systemd): install systemd-executor
6acfecae chore: remove unnecessary shellcheck disable for SC1087
MERGED 6c80408c fix(dracut.sh): remove microcode check based on CONFIG_MICROCODE_[AMD|INTEL]
b4e23ce4 fix(release): maintain dracut-version.sh in the source tree
23389f6d docs: set KVERSION for running test suite
0b81e8eb chore: remove unnecessary shellcheck disable for SC2154
MERGED 16645633 feat(install.d): allow using dracut in combination with ukify
6f78e5de test: support disabling KVM by setting NO_KVM
65f0ef52 test: set QEMU machine for ARM and PowerPC
f29e428b fix(test): only use QEMU machine q35 on x86
fb7d5ec4 test: support /boot/vmlinux
a1e63b18 test: log qemu calls to ease debugging
bf97572b test: introduce overridable ARCH variable in run-qemu
9a18f133 fix(test): use bash for jobs -r parameter
8e9d89d9 ci: also run integration test on Ubuntu
31c4d284 feat(Makefile): allow setting dracut version via environment variables
ddf63231 fix: codespell
028f7632 test: fix skipcpio path for installed binary
dbee4f37 test: skip test 98 if dracut-util is not available
c0321c90 test: make package libdir configurable
f9939d0e test: make dracut directory configurable
MERGED 7528d84d fix(systemd): add new systemd-tmpfiles-setup-dev-early.service
MERGED 570b9d40 fix(systemd-udevd): add missing override paths
MERGED 32f6f364 fix(dracut-install): protect against broken links pointing to themselves
MERGED b2c6b584 fix(dracut.sh): exit if resolving executable dependencies fails
fffeaded feat(dracut): add --sbat option to add sbat policy to UKI
af3076a1 ci: run all local tests on all containers (including Gentoo)
699d51c5 chore(dracut-init.sh): remove support for obsolete syntax
83eccc74 ci: change the order of lint jobs as lint_shell is more likely to fail
d55fa823 ci: migrate from systemd-boot to systemd-utils in Gentoo container
403f4e8e ci: do not run test container generation on forked repos by default
MERGED 16855765 refactor(install): log about missing firmware only once
c46513fb test: increase test VM memory from 512M to 1024M to avoid OOM killer
MERGED a804945f fix(integrity): do not require ls
e278a965 ci: match comment with code
9e1e9245 ci: automate release generation
a3758704 ci: allow the release generation script to compute the next release
5cdd4b35 refactor(Makefile): improve AUTHORS and CONTRIBUTORS targets
MERGED 6c9f403f fix(dracut-init.sh): `module_check` method ignores `forced` option
MERGED c4e6eaf9 feat(systemd-rfkill): remove module
MERGED f11e8fff fix(man): add missing initrd-root-device.target to flow chart
MERGED 1b53bb62 fix(dracut-init.sh): use the local _ret variable
273e4811 ci: install util-linux-systemd and systemd-boot into openSUSE container
dbdab2d8 fix(dracut.sh): shellcheck warning SC1004
MERGED 33a66ed0 fix(dracut.sh): use gawk for strtonum
MERGED 6af3fcfd fix(man): remove duplicate entry
81d78c4e ci: release
MERGED 52351cfa feat(livenet): add memory size check depending on live image size
MERGED 15d4f60e chore(gentoo.conf): remove examples to avoid confusion
MERGED b7ef1302 fix(modsign): load keys to correct keyring
MERGED 179e1a99 fix(dmsquash-live-autooverlay): specify filesystemtype when it is already known
MERGED a71b905e chore: remove git2spec.pl, it is no longer used
MERGED 9aa332ca fix(fs-lib): remove quoting form the first argument of the e2fsck call
MERGED f5cc202e fix(Makefile): remove leftover rpm build rules
MERGED ffc766d2 fix(Makefile): no longer upload to kernel.org
MERGED b490f6f7 feat(nvmf): add code for parsing the NBFT
MERGED f07117d6 fix(nvmf): support /etc/nvme/config.json
MERGED 902f3a8f fix(nvmf): install 8021q module unconditionally
MERGED 17b8649e fix(install.d): respect even more kernel-install vars, plus style fixes
MERGED a037634a fix(install.d): respect more kernel-install env variables
MERGED 09d3ec16 fix(dracut.sh): also prevent fsfreeze for tmpfs
4000a1ec fix(dmsquash-live): allow other fstypes
995ac6f8 test(DMSQUASH): add test for NTFS
d96754ea test(16): check for failure after each sub-test run
MERGED dfa408c9 fix(bluetooth): make bluetooth rules more strict
MERGED e84d65c5 fix(bluetooth): add missing files
MERGED 8079ceaf fix(bluetooth): include it if Appearance matches the value assigned for keyboard
0ecb0388 fix(bluetooth): warn user instead of including it by default
MERGED 765e69ce fix(systemd-timedated): correct typo in override path
MERGED 2d083021 fix(systemd-resolved): correct typo in override path
MERGED f0dc7ec9 fix(systemd-networkd): correct typos in override paths
MERGED 3e2f685e fix(dracut-init.sh): correct check in `is_qemu_virtualized` function
MERGED 7ed765dd fix(btrfs): do not require module via cmdline when --no-kernel
MERGED 2b47a2ef fix(btrfs): add missing cmdline function
2ff7b470 ci: conditionally add tgt to Gentoo container
d06153f8 ci: re-enable lvm on Gentoo container
a9ecb5e3 ci: disable initramfs generation inside Gentoo container
5803ece5 ci: add extra packages for tests to Gentoo container
6fd6b36d ci: switching the musl test to 18 (uefi)
af31df4b test(ISCSI): make test-30 use the test dracut modules
dcf4665b ci: add dependencies to Debian container
ec2c7e1a test(UEFI): add test case for UEFI boot
MERGED c1b3f88d docs: remove rd.lvm.snapsize and rd.lvm.snapshot
MERGED 4235c035 fix(Makefile): execute command -v instead of which
MERGED e2f961a2 fix(network-legacy): typo
MERGED 3f8f115a fix(network,dbus): improve dependency checking
MERGED cd6f683d fix(systemd-pcrphase): only include systemd-pcrphase-initrd.service
MERGED 1ef00735 fix(systemd-tmpfiles): do not include systemd-tmpfiles-clean.timer
MERGED eff2a939 fix(systemd-journald): do not include systemd-journal-flush.service
MERGED 925febf8 fix(systemd): do not include systemd-random-seed.service
c1588995 fix(dracut.sh): correct path for UEFI stub on split-usr systems
MERGED aa20bbb5 feat(dracut-init.sh): do not print by default if an udev rule is skipped
c5e036b1 test: move more makeroot dependencies into test-makeroot dracut module
MERGED afb5717e fix(kernel-modules): add interconnect drivers
d244b316 test(LVM-THIN): avoid thin pool size warning
739b9e1b ci: cleanup containers
ae7cd94b test: add empty default test_cleanup implementation
f1346763 test: move more common test code to test-functions
5ac581ef fix(resolve-deps): check the existing file—not the source
MERGED 07af8d58 fix(dracut-lib.sh): remove successful finished initqueue scripts
MERGED 7310a641 fix(udev-rules): remove firmware.rules
fc182ed8 docs: change ext3 to ext4
MERGED 2a26eec5 fix(dracut.sh): silence the output of hardlinking files by default
c8a703aa fix(github): exempt issues in a milestone
MERGED 07b49a3e fix(virtiofs): add virtio_pci kernel module to virtiofs
c08ae406 ci: install multipath-tools into openSuse container
d1187543 test: remove references of dhcpd3 from tests
1843c16c test: move test condition to test_check
006890a2 test: upgrade to ext4
MERGED 86c8a5a7 fix(dracut-systemd): rootfs-generator cannot write outside of generator dir
MERGED acfa793b fix(dracut-systemd): check and create generator dir outside of inner function
MERGED a7c04716 fix(dracut-systemd): do not hardcode the systemd generator directory
6cd41ab5 ci: add more packages to allow testing more dracut containers
19c54395 ci: simplify and sort
6178a9d8 fix(dracut.sh): handle imagebase for uefi
MERGED 67591e88 fix(dracut-functions): avoid calling grep with PCRE (-P)
MERGED 260883d9 fix(dracut-initramfs-restore.sh): handle /etc/machine-id empty or uninitialized
MERGED 971b302d fix(lsinitrd.sh): handle /etc/machine-id empty or uninitialized
MERGED 97fe0976 fix(dracut.sh): handle /etc/machine-id empty or uninitialized
48c2cb45 feat(systemd-creds): introducing the systemd-creds module
MERGED 71e391eb fix(systemd-networkd): add missing conf files and services
MERGED a62e895d fix(dracut-functions.sh): convert mmcblk to the real kernel module name
MERGED 297525c5 fix(multipath): remove dependency on multipathd.socket
MERGED 1300a930 feat(lsinitrd): notify user on missing compressor
MERGED a0d14d3b fix(99base): adjust to allow mksh as initrd shell
MERGED 8b951d20 fix(base): do not quote $CLINE in the `set` command
MERGED df2458a6 fix(systemd-ac-power): correct systemd-ac-power binary path
MERGED f32e95bc fix(dracut.sh): use dynamically uefi's sections offset
MERGED e9b47742 fix(lvmthinpool-monitor): activate lvm thin pool before extend its size
aca51203 chore(deps): bump luizm/action-sh-checker from 0.5.0 to 0.6.0
MERGED 0e780720 fix(dmsquash-live): restore compatibility with earlier releases
MERGED 1ddcb137 fix(dracut.sh): kmoddir does not handle trailing /
MERGED 6d554d9b fix(udev-rules): remove old eudev specific rule
MERGED d648bf80 fix(udev-rules): remove old redhat specific rule
MERGED 6a33e677 fix(udev-rules): remove old edd_id extra rules
MERGED 1edc41af fix(udev-rules): remove old debian specific rules
8f9ad068 feat(test): nfs_fetch_url test into nfs test
966b6cec fix(url-lib.sh): nfs_already_mounted() with trailing slash in nfs path
f9bcd4d2 ci: use CodeQL instead of LGTM
MERGED ae88e029 feat(dracut): use log level indicator in console output
MERGED df381b7e feat(kernel-modules): driver support for macbook keyboards
131822e2 fix(dracut-install): prevent possible infinite recursion with suppliers
MERGED f3a7172d build: remove rpm spec file and build rules
MERGED 89269d23 fix(kernel-modules): add UFS drivers
MERGED 87a76dbb fix(kernel-modules): use modalias info in get_dev_module()
MERGED c5dca3d6 fix(crypt): add missing libraries
MERGED 61ceb35f revert(network-manager): avoid restarting NetworkManager
MERGED a6dd5bfb fix(dracut.sh): handle sbsign errors for UEFI builds
MERGED 8602df70 fix(dracut.sh): handle out of space error for UEFI builds
MERGED 726d56ca fix(network): IPv6: don't wait for RA for static IPv6 assignments
MERGED b074216b fix(network-legacy): always include af_packet
MERGED 7ff255a4 fix(network): don't assume prefix length 64 by default
MERGED c3b65a49 fix(iscsi): prefix syntax for static iBFT IPv6 addresses
MERGED aa5d9526 fix(iscsi): install 8021q module unconditionally
3de4c731 feat(dracut-install): add fw_devlink suppliers as module dependencies
f0c3b683 refactor(dracut-install): add Hashmap cleanup function
8ea8cf5f refactor(dracut-install): add function to install one dependent module
88aeca2a chore(deps): bump luizm/action-sh-checker from 0.2.2 to 0.5.0
MERGED 16931f52 chore(shfmt): update to pass with shfmt v3.5.1
MERGED d777dd3d fix(fips): move fips-boot script to pre-pivot
MERGED ab26ad2c fix(fips): only unmount /boot if it was mounted by the fips module
MERGED 68d0653e feat(fips): add progress messages
MERGED 1fabbb64 fix(fips): do not blindly remove /boot
c95075e2 chore(base): remove support for <udev-176
MERGED d6cef3f2 fix(plymouth): remove /etc/system-release dependency
e3a7112b feat(resume): also consider resume= in the cmdline as enabling hibernation
MERGED d8a9a73d fix(network-manager): add "After" dependency on dbus.service
MERGED 15970768 fix(fido2): libfido2.so depends on libz.so
MERGED 9a531ca0 fix(dracut-install): continue parsing if ldd prints "cannot execute binary file"
MERGED 7b530f26 fix: make iso-scan trigger udev events
ab07f6d1 ci: enable test 60
3d7c0ffb fix(test): rename test 60
5e846cb1 fix(test): improve test 60
8f44740f fix(test): remove leftover link file from server rootfs
9fb64d96 fix(test): assign fixed address to bridge
462d9b92 fix(test): bump DHCP timeout to 30 seconds
da959483 fix(test): remove check on dhclient support for --timeout
d3993c7d fix(test): adapt multinic test for new NetworkManager versions
MERGED 70aeb4c1 fix(install): do not undef _FILE_OFFSET_BITS
18c5fb6a chore(deps): bump docker/build-push-action from 3 to 4
MERGED 6f4a5c90 fix(dracut.sh): --sysroot option broken if global variables not set in conf
MERGED 823de8fe refactor(dracut-init.sh): remove redundant "dracut" from "dracut module" prints
MERGED a10078a5 feat(dracut-init.sh): specify if a module cannot be found or cannot be installed
MERGED 1f84ff88 fix(lsinitrd.sh): handle filenames with special characters
MERGED eb75861c fix(dracut-systemd): remove unused argument
MERGED a109c612 feat(lvm): always include all drivers that LVM can use
MERGED 1aafcab9 fix(dracut-init.sh): correct typo in comment
MERGED cda6b00a fix(dracut.sh): correct --help and --version exit codes
MERGED e971c788 refactor(virtiofs): remove exit after die
3c16c76f ci: fix Gentoo container used for testing
MERGED e3e8108e fix(crypt-gpg): do not use always --card-status
f6bb4a36 docs(RELEASE.md): update release docs
b060945c ci: disable test 50
MERGED 88fe9205 fix: shellcheck 0.8.0
MERGED 93339444 fix(dmsquash-live): live:/dev/*
MERGED 10cf8e46 fix(load_fstype): avoid false positive searchs
MERGED 08b63a25 fix: shellcheck 0.8.0
94dcac7c refactor(dracut-install): strerror(errno) -> %m
efd4ca27 perf(dracut-install): don't strdup() environment block
77226cb4 perf(dracut-install): don't reallocate {src,dst}path in hmac_install()
a20556f0 perf(dracut-install): don't strdup() excessively for dracut_install()
e7ed8337 perf(dracut-install): stat() w/unused buf -> access(F_OK) in dracut-install
751a110f perf(dracut-install): multiple single-character strstr()s -> strpbrk()
1e5237dd chore: remove src/install/hashmap.lo
MERGED 9dbbebb1 feat(network-wicked): remove module
2. Commits from upstream pull requests that were already merged
PR Commit message
---- --------------
2342 fix(systemd-sysext): handle confexts and correct extensions search path
2404 fix(multipath): explicitly check if hostonly_cmdline is yes
2451 fix(base): correct handling of quiet in loginit
2524 fix(dracut.sh): abort if Bash is in POSIX mode
2527 fix(resume): add new systemd-hibernate-resume.service
2531 feat(kernel-modules): add Qualcomm IPC router to enable USB
2532 fix(dracut-systemd): use `DRACUT_VERSION` instead of `VERSION`
2533 fix(install.d): do not generate a new initrd if any INITRD_FILE is provided
2547 fix(pcsc): add opensc load module file
2547 fix(pcsc): add --disable-polkit to pcscd.service
2556 fix(90kernel-modules): add intel_lpss_pci for MacBook Pro 2017
2557 feat(kernel-modules): install SPMI modules on ARM/RISC-V
2559 feat(install.d): add sort-key field to rescue BLS entries
2560 feat(resume): do not attempt to install systemd-hibernate-resume@.service
2593 fix(dracut.sh): do not add device if find_block_device returns an error
2593 feat(dracut.sh): protect push_host_devs function
2607 fix(dracut-util): do not call strcmp if the value argument is NULL
2607 fix(dracut): correct regression with multiple `rd.break=` options
2611 fix(livenet): propagate error code
2611 fix(livenet): check also `content-length` from live image header
2611 fix(livenet): split `imgsize` calculation to avoid misleading error message
2613 fix(i18n): handle symlinked keymap
2614 fix(dracut-systemd): replace `rd.udev.log-priority` with `rd.udev.log_level`
2618 fix(i18n): handle keymap includes with `--sysroot`
2618 fix(dracut-init.sh): handle decompress with `--sysroot`
2630 fix(zfcp_rules): correct shellcheck regression when parsing ccw args

20
_service Normal file
View File

@ -0,0 +1,20 @@
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/opensuse/dracut.git</param>
<param name="revision">SUSE/059</param>
<param name="versionformat">@PARENT_TAG@+suse.@TAG_OFFSET@.g%h</param>
<param name="extract">suse/dracut.spec</param>
<param name="extract">suse/README.susemaint</param>
<param name="changesgenerate">enable</param>
</service>
<service name="set_version" mode="manual" />
<service name="tar" mode="buildtime" />
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="cargo_audit" mode="disabled">
<param name="srcdir">src/dracut-cpio</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/opensuse/dracut.git</param>
<param name="changesrevision">4d203e0423d5ae54db94788aca7c9f31240b9bbb</param></service></servicedata>

BIN
dracut-059+suse.557.g8a62bf73.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

4
dracut-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
addFilter("suse-missing-rclink")
addFilter("explicit-lib-dependency")
addFilter("systemd-service-without-service_*_*")
addFilter("devel-file-in-non-devel-package .* /usr/share/pkgconfig/dracut.pc")

4795
dracut.changes Normal file

File diff suppressed because it is too large Load Diff

4
dracut.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: dracut
version: 059+suse.557.g8a62bf73
mtime: 1709107404
commit: 8a62bf7337c9d1960daa96db64b1af92b8dfbd8e

489
dracut.spec Normal file
View File

@ -0,0 +1,489 @@
#
# spec file for package dracut
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define dracutlibdir %{_prefix}/lib/dracut
%if 0%{?suse_version} >= 1550
%define dracut_sbindir %{_sbindir}
%else
%define dracut_sbindir /sbin
%endif
Name: dracut
Version: 059+suse.557.g8a62bf73
Release: 0
Summary: Event driven initramfs infrastructure
License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
Group: System/Base
URL: https://github.com/dracutdevs/dracut/wiki
Source0: dracut-%{version}.tar.xz
Source1: dracut-rpmlintrc
Source2: README.susemaint
BuildRequires: asciidoc
BuildRequires: bash
BuildRequires: cargo
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
BuildRequires: rust
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(systemd) >= 219
Requires: %{_bindir}/get_kernel_version
Requires: bash
Requires: coreutils
Requires: gawk
Requires(post): coreutils
Requires: cpio
Requires: elfutils
Requires: file
Requires: filesystem
Requires: findutils
Requires: grep
Requires: hardlink
Requires: modutils
Requires: pigz
Requires: sed
Requires: systemd >= 219
Recommends: (tpm2.0-tools if tpm2-0-tss)
Requires: udev > 166
Requires: util-linux >= 2.21
Requires: util-linux-systemd >= 2.36.2
Recommends: xz
Requires: zstd
# We use 'btrfs fi usage' that was not present before
Conflicts: btrfsprogs < 3.18
# suse-module-tools >= 15.4.7 is prepared for the removal of mkinitrd-suse.sh
Conflicts: suse-module-tools < 15.4.7
%{?systemd_requires}
%description
Dracut contains tools to create a bootable initramfs for Linux kernels >= 2.6.
Dracut contains various modules which are driven by the event-based udev
and systemd. Having root on MD, DM, LVM2, LUKS is supported as well as
NFS, iSCSI, NBD, FCoE.
%ifnarch %ix86
%package fips
Summary: Dracut modules to build a dracut initramfs with an integrity check
Group: System/Base
Requires: %{name} = %{version}-%{release}
Requires: libkcapi-tools
%description fips
This package requires everything which is needed to build an
initramfs with dracut, which does an integrity check of the kernel
and its cryptography during startup.
%endif
%ifnarch %ix86
%package ima
Summary: Dracut modules to build a dracut initramfs with IMA
Group: System/Base
Requires: %{name} = %{version}-%{release}
Requires: evmctl
Requires: keyutils
%description ima
This package requires everything which is needed to build an
initramfs (using dracut) which tries to load an IMA policy during startup.
%endif
%package tools
Summary: Tools to build a local initramfs
Group: System/Base
Requires: %{name}
# split-provides for upgrade from SLES12 SP1 to SLES12 SP2
Provides: %{name}:%{_bindir}/dracut-catimages
%description tools
This package contains tools to assemble the local initrd and host configuration.
%package extra
Summary: Dracut modules usually not required for normal operation
Group: System/Base
Requires: %{name} = %{version}-%{release}
%description extra
This package contains all modules that are part of dracut upstream
but are not normally supported or required.
%prep
%autosetup
%build
%configure \
--systemdsystemunitdir=%{_unitdir} \
--bashcompletiondir=%{_datadir}/bash-completion/completions \
--libdir=%{_prefix}/lib \
--enable-dracut-cpio
%make_build all CFLAGS="%{optflags}" %{?_smp_mflags}
%install
%make_install
echo -e "#!/bin/bash\nDRACUT_VERSION=%{version}-%{release}" > %{buildroot}%{dracutlibdir}/dracut-version.sh
# remove architecture specific modules
%ifnarch ppc ppc64 ppc64le ppc64p7
rm -rf %{buildroot}%{dracutlibdir}/modules.d/90ppcmac
%endif
%ifnarch s390 s390x
rm -rf %{buildroot}%{dracutlibdir}/modules.d/80cms
rm -rf %{buildroot}%{dracutlibdir}/modules.d/81cio_ignore
rm -rf %{buildroot}%{dracutlibdir}/modules.d/91zipl
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95dasd
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95dasd_mod
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95dasd_rules
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95dcssblk
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95qeth_rules
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95zfcp
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95zfcp_rules
rm -rf %{buildroot}%{dracutlibdir}/modules.d/95znet
%else
rm -rf %{buildroot}%{dracutlibdir}/modules.d/00warpclock
%endif
mkdir -p %{buildroot}/boot/dracut
mkdir -p %{buildroot}%{_localstatedir}/lib/dracut/overlay
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/dracut.log
install -D -m 0644 dracut.conf.d/suse.conf.example %{buildroot}%{dracutlibdir}/dracut.conf.d/01-dist.conf
install -m 0644 suse/99-debug.conf %{buildroot}%{_sysconfdir}/dracut.conf.d/99-debug.conf
%ifnarch %ix86
install -m 0644 dracut.conf.d/fips.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/40-fips.conf
install -m 0644 dracut.conf.d/ima.conf.example %{buildroot}%{_sysconfdir}/dracut.conf.d/40-ima.conf
%endif
# bsc#915218
%ifarch s390 s390x
install -m 0644 suse/s390x_persistent_policy.conf %{buildroot}%{_sysconfdir}/dracut.conf.d/10-persistent_policy.conf
%else
install -m 0644 suse/persistent_policy.conf %{buildroot}%{_sysconfdir}/dracut.conf.d/10-persistent_policy.conf
%endif
%if 0%{?suse_version}
rm -f %{buildroot}%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-suse.sh %{buildroot}%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
%else
mv %{buildroot}%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh %{buildroot}%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh
ln -s %{dracutlibdir}/modules.d/45ifcfg/write-ifcfg-redhat.sh %{buildroot}%{dracutlibdir}/modules.d/45ifcfg/write-ifcfg.sh
%endif
# create a link to dracut-util to be able to parse kernel command line arguments at generation time
ln -s %{dracutlibdir}/dracut-util %{buildroot}%{dracutlibdir}/dracut-getarg
%post
# check whether /var/run has been converted to a symlink
if [ ! -L /var/run ]; then
grep -q '^[ ]*GRUB_CMDLINE_LINUX_DEFAULT=.*rd.convertfs' /etc/default/grub || \
sed -i '/^[ ]*GRUB_CMDLINE_LINUX_DEFAULT.*/s/"$/ rd.convertfs"/' /etc/default/grub || :
if ! grep --no-message 'add_dracutmodules+=" convertfs "' /etc/dracut.conf.d/05-convertfs.conf; then
cat >>/etc/dracut.conf.d/05-convertfs.conf<<EOF
add_dracutmodules+=" convertfs "
EOF
fi
fi
#clean up after the conversion is done
if [ -L /var/run ] && [ -f /etc/dracut.conf.d/05-convertfs.conf ]; then
sed -i '/^[ ]*GRUB_CMDLINE_LINUX_DEFAULT.*/s/rd.convertfs//' /etc/default/grub || :
[ -f /etc/dracut.conf.d/05-convertfs.conf ] && sed -i '/add_dracutmodules+="[ ]*convertfs[ ]*"/d' /etc/dracut.conf.d/05-convertfs.conf || :
[ -s /etc/dracut.conf.d/05-convertfs.conf ] || rm -f /etc/dracut.conf.d/05-convertfs.conf || :
[ -d /var/lock.lockmove~ ] && rm -rf /var/lock.lockmove~ || :
[ -d /var/run.runmove~ ] && rm -rf /var/run.runmove~ || :
fi
# remove obsolete legacy fillup template for /etc/sysconfig/kernel
[ -f /var/adm/fillup-templates/sysconfig.kernel-mkinitrd ] && rm -f /var/adm/fillup-templates/sysconfig.kernel-mkinitrd
%{?regenerate_initrd_post}
%ifnarch %ix86
%post fips
%{?regenerate_initrd_post}
%endif
%ifnarch %ix86
%post ima
%{?regenerate_initrd_post}
%endif
%postun
%{?regenerate_initrd_post}
%ifnarch %ix86
%postun fips
%{?regenerate_initrd_post}
%endif
%ifnarch %ix86
%postun ima
%{?regenerate_initrd_post}
%endif
%posttrans
%{?regenerate_initrd_posttrans}
%ifnarch %ix86
%posttrans fips
%{?regenerate_initrd_posttrans}
%endif
%ifnarch %ix86
%posttrans ima
%{?regenerate_initrd_posttrans}
%endif
%ifnarch %ix86
%files fips
%license COPYING
%config %{_sysconfdir}/dracut.conf.d/40-fips.conf
%{dracutlibdir}/modules.d/01fips
%endif
%ifnarch %ix86
%files ima
%license COPYING
%config %{_sysconfdir}/dracut.conf.d/40-ima.conf
%{dracutlibdir}/modules.d/96securityfs
%{dracutlibdir}/modules.d/97masterkey
%{dracutlibdir}/modules.d/98integrity
%endif
%files tools
%{_bindir}/dracut-catimages
%{_mandir}/man8/dracut-catimages.8*
%dir /boot/dracut
%dir %{_localstatedir}/lib/dracut
%dir %{_localstatedir}/lib/dracut/overlay
%files extra
%license COPYING
%{dracutlibdir}/modules.d/00mksh
%{dracutlibdir}/modules.d/02caps
%{dracutlibdir}/modules.d/00dash
%{dracutlibdir}/modules.d/05busybox
%ifarch ppc ppc64 ppc64le ppc64p7
%{dracutlibdir}/modules.d/90ppcmac
%endif
%ifarch s390 s390x
# RH-specific s390 modules, we take another approach
%{dracutlibdir}/modules.d/95dasd
%{dracutlibdir}/modules.d/95zfcp
%{dracutlibdir}/modules.d/95znet
%endif
%files
%license COPYING
%doc README.md NEWS.md AUTHORS dracut.html
%doc docs/README.cross docs/README.generic docs/README.kernel
%doc docs/HACKING.md docs/dracut.png docs/dracut.svg
%{_bindir}/dracut
%{_bindir}/lsinitrd
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/dracut
%{_datadir}/bash-completion/completions/lsinitrd
%{_datadir}/pkgconfig/dracut.pc
%config(noreplace) %{_sysconfdir}/dracut.conf
%dir %{_sysconfdir}/dracut.conf.d
%dir %{dracutlibdir}/dracut.conf.d
%{dracutlibdir}/dracut.conf.d/01-dist.conf
%config %{_sysconfdir}/dracut.conf.d/99-debug.conf
%config %{_sysconfdir}/dracut.conf.d/10-persistent_policy.conf
%{_mandir}/man8/dracut.8*
%{_mandir}/man1/lsinitrd.1*
%{_mandir}/man7/dracut.kernel.7*
%{_mandir}/man7/dracut.cmdline.7*
%{_mandir}/man7/dracut.bootup.7*
%{_mandir}/man7/dracut.modules.7*
%{_mandir}/man8/dracut-cmdline.service.8*
%{_mandir}/man8/dracut-initqueue.service.8*
%{_mandir}/man8/dracut-pre-pivot.service.8*
%{_mandir}/man8/dracut-pre-trigger.service.8*
%{_mandir}/man8/dracut-pre-udev.service.8*
%{_mandir}/man8/dracut-mount.service.8.*
%{_mandir}/man8/dracut-pre-mount.service.8.*
%{_mandir}/man8/dracut-shutdown.service.8.*
%{_mandir}/man5/dracut.conf.5*
%dir %{_prefix}/lib/kernel
%dir %{_prefix}/lib/kernel/install.d
%{_prefix}/lib/kernel/install.d/50-dracut.install
%{_prefix}/lib/kernel/install.d/51-dracut-rescue.install
%dir %{dracutlibdir}
%{dracutlibdir}/skipcpio
%{dracutlibdir}/dracut-functions.sh
%{dracutlibdir}/dracut-init.sh
%{dracutlibdir}/dracut-functions
%{dracutlibdir}/dracut-version.sh
%{dracutlibdir}/dracut-logger.sh
%{dracutlibdir}/dracut-initramfs-restore
%{dracutlibdir}/dracut-install
%{dracutlibdir}/dracut-util
%{dracutlibdir}/dracut-getarg
%{dracutlibdir}/dracut-cpio
%dir %{dracutlibdir}/modules.d
%{dracutlibdir}/modules.d/00bash
%{dracutlibdir}/modules.d/00systemd
%{dracutlibdir}/modules.d/00systemd-network-management
%ifnarch s390 s390x
%{dracutlibdir}/modules.d/00warpclock
%endif
%ifarch %ix86
%exclude %{dracutlibdir}/modules.d/01fips
%endif
%{dracutlibdir}/modules.d/01systemd-ac-power
%{dracutlibdir}/modules.d/01systemd-ask-password
%{dracutlibdir}/modules.d/01systemd-coredump
%{dracutlibdir}/modules.d/01systemd-hostnamed
%{dracutlibdir}/modules.d/01systemd-initrd
%{dracutlibdir}/modules.d/01systemd-integritysetup
%{dracutlibdir}/modules.d/01systemd-journald
%{dracutlibdir}/modules.d/01systemd-ldconfig
%{dracutlibdir}/modules.d/01systemd-modules-load
%{dracutlibdir}/modules.d/01systemd-networkd
%{dracutlibdir}/modules.d/01systemd-pcrphase
%{dracutlibdir}/modules.d/01systemd-portabled
%{dracutlibdir}/modules.d/01systemd-pstore
%{dracutlibdir}/modules.d/01systemd-repart
%{dracutlibdir}/modules.d/01systemd-resolved
%{dracutlibdir}/modules.d/01systemd-sysctl
%{dracutlibdir}/modules.d/01systemd-sysext
%{dracutlibdir}/modules.d/01systemd-sysusers
%{dracutlibdir}/modules.d/01systemd-timedated
%{dracutlibdir}/modules.d/01systemd-timesyncd
%{dracutlibdir}/modules.d/01systemd-tmpfiles
%{dracutlibdir}/modules.d/01systemd-udevd
%{dracutlibdir}/modules.d/01systemd-veritysetup
%{dracutlibdir}/modules.d/03modsign
%{dracutlibdir}/modules.d/03rescue
%{dracutlibdir}/modules.d/04watchdog
%{dracutlibdir}/modules.d/04watchdog-modules
%{dracutlibdir}/modules.d/06dbus-broker
%{dracutlibdir}/modules.d/06dbus-daemon
%{dracutlibdir}/modules.d/06rngd
%{dracutlibdir}/modules.d/09dbus
%{dracutlibdir}/modules.d/10i18n
%{dracutlibdir}/modules.d/30convertfs
%{dracutlibdir}/modules.d/35connman
%{dracutlibdir}/modules.d/35network-legacy
%{dracutlibdir}/modules.d/35network-manager
%{dracutlibdir}/modules.d/40network
%{dracutlibdir}/modules.d/45ifcfg
%{dracutlibdir}/modules.d/45url-lib
%{dracutlibdir}/modules.d/50drm
%{dracutlibdir}/modules.d/50plymouth
%{dracutlibdir}/modules.d/62bluetooth
%ifarch s390 s390x
%{dracutlibdir}/modules.d/80cms
%endif
%{dracutlibdir}/modules.d/80lvmmerge
%{dracutlibdir}/modules.d/80lvmthinpool-monitor
%exclude %{dracutlibdir}/modules.d/80test
%exclude %{dracutlibdir}/modules.d/80test-makeroot
%exclude %{dracutlibdir}/modules.d/80test-root
%ifarch s390 s390x
%{dracutlibdir}/modules.d/81cio_ignore
%endif
%{dracutlibdir}/modules.d/90btrfs
%{dracutlibdir}/modules.d/90crypt
%{dracutlibdir}/modules.d/90dm
%{dracutlibdir}/modules.d/90dmraid
%{dracutlibdir}/modules.d/90dmsquash-live
%{dracutlibdir}/modules.d/90dmsquash-live-autooverlay
%{dracutlibdir}/modules.d/90dmsquash-live-ntfs
%{dracutlibdir}/modules.d/90kernel-modules-extra
%{dracutlibdir}/modules.d/90kernel-modules
%{dracutlibdir}/modules.d/90kernel-network-modules
%{dracutlibdir}/modules.d/90livenet
%{dracutlibdir}/modules.d/90lvm
%{dracutlibdir}/modules.d/90mdraid
%{dracutlibdir}/modules.d/90multipath
%{dracutlibdir}/modules.d/90nvdimm
%{dracutlibdir}/modules.d/90overlayfs
%{dracutlibdir}/modules.d/90qemu
%{dracutlibdir}/modules.d/90qemu-net
%{dracutlibdir}/modules.d/91crypt-gpg
%{dracutlibdir}/modules.d/91crypt-loop
%{dracutlibdir}/modules.d/91fido2
%{dracutlibdir}/modules.d/91pcsc
%{dracutlibdir}/modules.d/91pkcs11
%{dracutlibdir}/modules.d/91tpm2-tss
%ifarch s390 s390x
%{dracutlibdir}/modules.d/91zipl
%endif
%{dracutlibdir}/modules.d/95cifs
%ifarch s390 s390x
%{dracutlibdir}/modules.d/95dasd_mod
%{dracutlibdir}/modules.d/95dasd_rules
%{dracutlibdir}/modules.d/95dcssblk
%endif
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95fcoe
%{dracutlibdir}/modules.d/95fcoe-uefi
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95iscsi
%{dracutlibdir}/modules.d/95lunmask
%{dracutlibdir}/modules.d/95nbd
%{dracutlibdir}/modules.d/95nfs
%{dracutlibdir}/modules.d/95nvmf
%ifarch s390 s390x
%{dracutlibdir}/modules.d/95qeth_rules
%endif
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
%{dracutlibdir}/modules.d/95ssh-client
%{dracutlibdir}/modules.d/95terminfo
%{dracutlibdir}/modules.d/95udev-rules
%{dracutlibdir}/modules.d/95virtfs
%{dracutlibdir}/modules.d/95virtiofs
%ifarch s390 s390x
%{dracutlibdir}/modules.d/95zfcp_rules
%endif
%{dracutlibdir}/modules.d/97biosdevname
%ifarch %ix86
%exclude %{dracutlibdir}/modules.d/96securityfs
%exclude %{dracutlibdir}/modules.d/97masterkey
%exclude %{dracutlibdir}/modules.d/98integrity
%endif
%{dracutlibdir}/modules.d/98dracut-systemd
%{dracutlibdir}/modules.d/98ecryptfs
%{dracutlibdir}/modules.d/98pollcdrom
%{dracutlibdir}/modules.d/98selinux
%{dracutlibdir}/modules.d/98syslog
%{dracutlibdir}/modules.d/98usrmount
%{dracutlibdir}/modules.d/99base
%{dracutlibdir}/modules.d/99fs-lib
%{dracutlibdir}/modules.d/99img-lib
%{dracutlibdir}/modules.d/99memstrack
%{dracutlibdir}/modules.d/99shutdown
%{dracutlibdir}/modules.d/99squash
%{dracutlibdir}/modules.d/99suse
%{dracutlibdir}/modules.d/99suse-initrd
%{dracutlibdir}/modules.d/99uefi-lib
%attr(0640,root,root) %ghost %config(missingok,noreplace) %{_localstatedir}/log/dracut.log
%dir %{_unitdir}/initrd.target.wants
%dir %{_unitdir}/sysinit.target.wants
%{_unitdir}/*.service
%{_unitdir}/*/*.service
%changelog