Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initoverlayfs-install: generic improvements #10

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

dougsland
Copy link
Collaborator

@dougsland dougsland commented Oct 30, 2023

  • split extract_initrd_into_initoverlayfs()
  • add exec_cmd() to validate commands
  • remove unneeded |--* in case statement
  • use less verbose removing the requirement set -ex
  • replace initoverlayfs_conf with constant
  • remove unused no_kern
  • fix some shellcheck warnings

Fixes: #11
Fixes: #12

@dougsland
Copy link
Collaborator Author

Just spend some time on the weekend reading and testing the bin/initoverlayfs-install. This is a generic improvements, nothing fancy or rocket science. Hope it make sense and make the code easier for maintenance.

@dougsland
Copy link
Collaborator Author

The CI/CD still failing, need to address some others scripts this week.

@dougsland
Copy link
Collaborator Author

All good:

# ./bin/initoverlayfs-install
<snip>
dracut: *** Creating image file '/boot/initramfs-6.5.5-300.fc39.x86_64.img' ***
dracut: Using auto-determined compression method 'pigz'
dracut: *** Creating initramfs image file '/boot/initramfs-6.5.5-300.fc39.x86_64.img' done ***
initoverlayfs]# du -sh /boot/init*
149M	/boot/initoverlayfs-123.img
27M	/boot/initoverlayfs-6.5.5-300.fc39.img
149M	/boot/initoverlayfs-6.5.5-300.fc39.x86_64.img
149M	/boot/initoverlayfs-6.5.5-300.img
28M	/boot/initoverlayfs-foo.img
81M	/boot/initramfs-0-rescue-285b2edb8ad94c7381215fd5720afd54.img
34M	/boot/initramfs-6.4.12-200.fc38.x86_64.img
34M	/boot/initramfs-6.5.5-200.fc38.x86_64.img
13M	/boot/initramfs-6.5.5-300.fc39.x86_64.img

@ericcurtin
Copy link
Collaborator

Only gave a skip as I'm off, but looks cleaner

Copy link
Collaborator

@ericcurtin ericcurtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add back in the fail in ext4 thing (it's untested, I'm almost sure it doesn't work, although it wouldn't be too much effort to make it work, it's not the focus), this should be good to go. Note ASCII colors and is nice to have, but when we have a more complete initoverlayfs solution, users will not manually call initoverlayfs-install at all, it will just run in the background automatically when appropriate (like dracut -f does).

- split extract_initrd_into_initoverlayfs()
- remove unneeded |--* in case statement
- replace initoverlayfs_conf with constant
- remove unused no_kern
- fix some shellcheck warnings

Signed-off-by: Douglas Schilling Landgraf <[email protected]>
@ericcurtin ericcurtin merged commit 60bab0a into containers:main Oct 31, 2023
1 of 2 checks passed
@ericcurtin
Copy link
Collaborator

shellcheck failed, but it's failing everywhere at present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

initoverlayfs-install: make sure mkfs.erofs is optional initoverlayfs-install: ext4 flow seems not be called
2 participants