-
Notifications
You must be signed in to change notification settings - Fork 189
install: Add --karg-delete
#2105
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
Open
hone
wants to merge
5
commits into
bootc-dev:main
Choose a base branch
from
hone:install-karg-delete
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
be58444
install: Add `--karg-delete`
hone d44cb30
fix: support verity on fs for composefs tests
hone 417551c
fix: remove bootloader from test when using to-filesystem
hone ddbbb3f
set bootloader to none
hone 87f13a7
ignore composefs tmt for now since --karg and --karg-delete aren't im…
hone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # number: 40 | ||
| # tmt: | ||
| # summary: Test bootc install --karg-delete | ||
| # duration: 30m | ||
| # extra: | ||
| # fixme_skip_if_composefs: true | ||
| # | ||
| use std assert | ||
| use tap.nu | ||
| # | ||
| # Use an OS-matched target image to avoid version mismatches | ||
| let target_image = (tap get_target_image) | ||
|
|
||
| # setup filesystem | ||
| mkdir /var/mnt | ||
| truncate -s 10G disk.img | ||
| mkfs.ext4 disk.img | ||
| mount -o loop disk.img /var/mnt | ||
|
|
||
| # Mask off the bootupd state to reproduce https://github.com/bootc-dev/bootc/issues/1778 | ||
| # Also it turns out that installation outside of containers dies due to `error: Multiple commit objects found` | ||
| # so we mask off /sysroot/ostree | ||
| # And using systemd-run here breaks our install_t so we disable SELinux enforcement | ||
| setenforce 0 | ||
|
|
||
| mkdir /etc/bootc/install | ||
| { install: { kargs: ["foo=bar"] } } | to toml | save /etc/bootc/install/99-test.toml | ||
|
|
||
| tap run_install $"bootc install to-filesystem --disable-selinux --bootloader none --source-imgref ($target_image) --karg-delete localtestkarg --karg-delete foo /var/mnt" | ||
|
|
||
|
|
||
| # Verify the karg is gone from the bootloader entries | ||
| let entries = (glob /var/mnt/boot/loader/entries/*.conf | ||
| | each { open $in | lines } | ||
| | flatten) | ||
|
|
||
| let localtestkarg_found = ($entries | find "localtestkarg" | is-empty) | ||
| assert $localtestkarg_found "Found localtestkarg in bootloader entries, but it should have been deleted" | ||
|
|
||
| let foo_found = ($entries | find "foo" | is-empty) | ||
| assert $foo_found "Found foo in bootloader entries, but it should have been deleted" | ||
|
|
||
| # Clean up | ||
| umount /var/mnt | ||
| rm -rf disk.img | ||
|
|
||
| tap ok | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work for composefs backend as well since the config gathering in the install path is pretty much the same for ostree and composefs. Were you getting some sort of error when testing this for composefs backend?