Commit Graph

6116 Commits (055)

Author SHA1 Message Date
Kairui Song 5a18b24a8b feat(squash): install and depmod modules seperately
Separately install the modules required for squash image setup.
These modules can be deleted after squash image setup to save
memory.

Signed-off-by: Kairui Song <kasong@redhat.com>
2021-03-09 13:40:35 +00:00
Kairui Song f9f4264d03 refactor(squash): move all setup code to init-squash.sh
Seperate of init.sh and setup-squash.sh is pointless, merge them into one.
2021-03-09 13:40:35 +00:00
Kairui Song 8c8aecdc63 fix(squash): post install should be the last step before stripping
Ensure dracut squash module doesn't effect other steps, and stripping
can cover the new binaries installed by it.
2021-03-09 13:40:35 +00:00
Kairui Song 95ea16aa60 refactor(squash): move the post install scripts into the module-setup.sh
No function change, just move the post install code to 99squash to clean
up dracut.sh.
2021-03-09 13:40:35 +00:00
Kairui Song c552c99ef8 fix(squash): this module shouldn't depend on bash
Any other shell should just work.
2021-03-09 13:40:35 +00:00
Jóhann B. Guðmundsson 28545cda45 chore(labeler): remove the needs review label
There is no longer need to have pull requests labeled with the needs
review label since reviews are now mandatory on pull request.
2021-03-03 13:23:15 +00:00
Jóhann B. Guðmundsson 9cf7b1c529 fix: always use mkdir -p
Ensuring that directory creations dont trigger error if directory
previously existed as well as create parent directories if needed.
2021-03-03 13:06:02 +01:00
Daniel Molkentin 92e6a8f879 fix(kernel-modules): optionally add /usr/lib/modules.d to initramfs
On SUSE, there is no /lib/modules.d, only /usr/lib/modules.d.

Upstream-Bug: http://bugzilla.opensuse.org/show_bug.cgi?id=1180822

Reference: bsc#1180822
2021-03-03 11:42:09 +01:00
Lennart Poettering a96900a82c fix(dracut-systemd): don't refuse root=tmpfs when systemd is used
A match for systemd PR#18847
2021-03-02 21:23:03 +00:00
Renaud Métrich d8e47e201a fix(dracut.sh): harden dracut against GZIP environment variable
When a GZIP environment variable is set, this leads to various breakage:

In case 'pigz' is installed and GZIP is defined as a path, e.g.
/usr/local/bin/gzip, then dracut will fail with the following message:

   "
   pigz: abort: cannot provide files in GZIP environment variable
   "

In case 'pigz' isn't installed and regular 'gzip' is used and GZIP is
defined as a path, e.g. /usr/local/bin/gzip, then the path will be
zipped and dracut will fail for no obvious reason.  Trying again, dracut
will then fail with following message:

   "
   gzip: /usr/local/bin/gzip.gz already exists;	not overwritten
   "

In any case, GZIP environment should be unset to avoid breakage or
unwanted behaviour. This variable is anyway obsolescent, from gzip(1)
manpage.

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
2021-03-02 11:05:52 +01:00
Harald Hoyer 630334950c feat(skipcpio): speed up and harden skipcpio
Before:
```
Benchmark #1: ./skipcpio/skipcpio test-5.10.15-200.fc33.x86_64.img >/dev/null
  Time (mean ± σ):     125.5 ms ±   0.9 ms    [User: 97.4 ms, System: 27.9 ms]
  Range (min … max):   124.8 ms … 129.4 ms    23 runs
```

After:
```
Benchmark #1: ./skipcpio/skipcpio test-5.10.15-200.fc33.x86_64.img >/dev/null
  Time (mean ± σ):      12.2 ms ±   0.3 ms    [User: 2.7 ms, System: 9.5 ms]
  Range (min … max):    11.7 ms …  13.6 ms    212 runs
```

Besides the speedup, skipcpio now parses the cpio header and is not
falsely ending when the early cpio payload contains `TRAILER!!!`.

Fixes: https://github.com/dracutdevs/dracut/issues/1123
2021-02-25 14:48:22 +01:00
Harald Hoyer c67b624637 docs: update NEWS.md and AUTHORS 2021-02-23 16:11:01 +01:00
Harald Hoyer 62f3a10d5d docs: update RELEASE.md
* clog from last tag
* push commits to kernelorg also
2021-02-23 16:11:01 +01:00
Jóhann B. Guðmundsson 1edf54e275 feat(github): adding packit support for fedora maintenance
Adding initial packit [1] support for fedora maintenance which
should automate the release process from upstream release to fedora.

1. https://packit.dev
2021-02-23 16:04:23 +01:00
Harald Hoyer c8ebb80590 fix(dracut.sh): remove unneeded variables
There is no `fstab_lines_l` variable used before.

The `--include` option was turned into `++include` and therefore the
switch option is not reachable anymore.
2021-02-23 16:03:44 +01:00
Sergei Iudin d87ae13721 fix(dracut.sh): unfreeze /boot on exit
If SIGWHATEVER will be processed after fsfreeze -f, but before fsfreeze
-u we will end up with /boot/ never unfrozen, let's try to minimize risk of this.
2021-02-23 09:25:08 +01:00
Evgeni Golov c3f241849d fix: skip empty modalias files in drm module setup
on my system (ThinkPad X201s) I have several modalias entries that are
empty:

    /sys/bus/platform/devices/dock.0/modalias
    /sys/bus/platform/devices/dock.1/modalias
    /sys/bus/platform/devices/dock.2/modalias

executing the drm module setup thus results in the following errors

    dracut-install: No SOURCE argument given

when calling dracut_instmods and hostonly mode is enabled.

Skip those entries, as there are no modules to load in this case
anyways.

Note: it is not sufficient to use [['s -s test (file size is greater
than zero), as all those files are 4096B if you stat them.
2021-02-22 14:55:44 +01:00
Lukas Nykryn c17c5b7604 fix(network-manager): run as a service if systemd module is present
In the current state, services that depend on network need to
use dracut hooks, since nothing with pull in the network
targets into the transaction.

In the future, it would be nice to provide developers on systemd-only
systems the possibility to not use dracut hooks at all, but simply put
normal systemd services into the initrd.

Also, some modules even right now depend on systemd ordering, like
cryptsetup, so let's make sure, that the ordering inside systemd work
properly as well.
2021-02-19 11:20:59 +01:00
Lukas Nykryn 34c73b339b fix(network-manager): rework how NM is started in debug mode
Instead of running directly NM with --debug, create a drop-in in
nm-config.sh. This will make sure, that we can get the debug output
regardless the way how NM will be started.
2021-02-19 11:20:59 +01:00
Lukas Nykryn 6f7823bce6 fix(fcoe): rename rd.nofcoe to rd.fcoe
The current name of this bool is kinda stupid. Based on the manpage
setting it to 0 turns off fcoe, which means that nofcoe=1 should mean
that it is on.

Let's just do the same thing as with rd.lvm=0, rd.luks=0,....
2021-02-19 09:28:57 +00:00
Lukas Nykryn 805b46c2a8 fix(fcoe): rd.nofcoe=0 should disable fcoe
8446c8f9 Changed the default behavior, but also flipped meaning of 0/1.
Right now rd.nofcoe=0 enables fcoe, which is the opposite what manpage
says.
2021-02-19 09:28:57 +00:00
Andrew J. Hesford d437970c01 fix: proper return code for inst_multiple in dracut-init.sh
A test of the form

    if ! command; then
        _ret=$?
        ...
        return _ret
    fi

does not capture the return code of `command`, but the negation of the
return code, leaving _ret == 0. The test of this form in inst_multiple
has been refactored to capture and return the right value.
2021-02-19 09:03:53 +01:00
Tomasz Paweł Gajc f8b38ecd7c chore: update authors in .mailmap 2021-02-18 14:10:23 +00:00
Harald Hoyer 5387ed24c8 fix(i18n): get rid of `eval` calls
By changing KBDSUBDIRS to a bash array, all kinds of `eval` quirks are
avoided.
2021-02-16 15:49:02 +01:00
Harald Hoyer 9e1c7f3dea fix(i18n): create the keyboard symlinks again
Invalid space broke the creation of the keyboard subdirectories,
leading to a symbolic link

usr/share/consolefonts,consoletrans,keymaps,unimaps ->
/usr/lib/kbd/consolefonts,consoletrans,keymaps,unimaps

in the created initramfs.

With this fix the correct symlinks are created again:

usr/share/consolefonts -> /usr/lib/kbd/consolefonts
usr/share/consoletrans -> /usr/lib/kbd/consoletrans
usr/share/keymaps -> /usr/lib/kbd/keymaps
usr/share/unimaps -> /usr/lib/kbd/unimaps
2021-02-16 15:49:02 +01:00
Jóhann B. Guðmundsson 2c9debec02 fix(github): exempt issues with the label bug
Let's exempt issues with the label bugs being processed by stalebot.
2021-02-16 10:16:10 +01:00
Harald Hoyer 895c2f65d4 docs: update docs/RELEASE.md 2021-02-16 10:15:39 +01:00
Harald Hoyer 3fce68bd1d docs: update NEWS.md and AUTHORS 2021-02-15 17:30:54 +01:00
Harald Hoyer 1a604e2a4a chore: add `CONTRIBUTORS` target to Makefile 2021-02-15 16:54:44 +01:00
Harald Hoyer 0b86c0607f docs: update docs/RELEASE.md 2021-02-15 16:53:51 +01:00
Harald Hoyer 095b77bee8 docs: move NEWS to NEWS.md 2021-02-15 15:33:41 +01:00
Harald Hoyer d85c71fb69 ci: force binary files for grep on disk images
Because some of the CI tests fail randomly while grepping for the
test success marker, let's be specific of the file format grep will
search to eleminate all failure sources.
2021-02-15 15:05:15 +01:00
Jóhann B. Guðmundsson ebac18baad docs: RELEASE.md
Creating the /docs directory which will contain all project related
documentation and will also host the projects github based website
in the future.

Adding RELEASE.md which is a document that outlines the release process.
2021-02-15 12:48:16 +01:00
Harald Hoyer ad64c6864c fix: shellcheck for dracut-init.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer cdb714c539 fix: shellcheck for dracut-init.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 994d003540 fix: shellcheck for dracut-init.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 63356d544b fix: shellcheck for dracut-init.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 2d4344bca9 fix: shellcheck for dracut-init.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 41cfdfc4d3 fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 510a22116b fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 2c10b29999 fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 7b59d15d96 fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer dd8ff5311f fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 6dc1cd052b fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 7310a8484e fix: shellcheck for dracut.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 3483509ef6 fix: shellcheck for dracut-functions.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer aa225ca3b0 fix: shellcheck for dracut-logger.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 6510ab3f9d fix: shellcheck for modules.d/99squash/module-setup.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 73f5cc7c37 fix: shellcheck for modules.d/99squash/clear-squash.sh 2021-02-15 11:00:37 +01:00
Harald Hoyer 119bb1b81d fix: shellcheck for modules.d/99fs-lib/module-setup.sh 2021-02-15 11:00:37 +01:00