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

Fix spec file to require parted in dracut modules #2384

Closed
wants to merge 1 commit into from

Conversation

davidcassany
Copy link
Collaborator

This commit fixes a regression introduced in commit 0947fce. Parted package must be required to all dracut modules using 'parted' tool and/or using 'partprobe' tool. Regardless if 'parted' is used as the partitioning tool, if 'partprobe' is called 'parted' package is still required.

Fixes bsc#1216465

This commit fixes a regression introduced in commit 0947fce.
Parted package must be required to all dracut modules using 'parted'
tool and/or using 'partprobe' tool. Regardless if 'parted' is used as
the partitioning tool, if 'partprobe' is called 'parted' package is
still required.

Fixes bsc#1216465

Signed-off-by: David Cassany <[email protected]>
@davidcassany
Copy link
Collaborator Author

My bad when I updated the spec to align with s390 arch use of parted I did not realize partprobe is also provided by parted.

@schaefi
Copy link
Collaborator

schaefi commented Oct 23, 2023

Hmm, yes partprobe is provided by parted, my bad that I overlooked it at the time of the review, but it's not easy to spot, so don't worry too much.

Actually not having the parted(and tools) requirement was a good move. With the change here we sort of revert that and get dependent on parted again. I was looking into the code and maybe there is a way to keep us free from the parted requirement. parted and partprobe use is found in

./90kiwi-live/kiwi-live-lib.sh
./99kiwi-lib/kiwi-partitions-lib.sh

In the partitions lib we already have

if type partprobe &> /dev/null;then
    partprobe "${disk_device}"
else
    blockdev --rereadpt "${disk_device}"
fi

The only place in code which is not covered with an alternative to partprobe is ./90kiwi-live/kiwi-live-lib.sh

if ! partprobe "${isodiskdev}"; then
    return 1
fi

We could consider to change this code path and leave the spec untouched ?

partprobe is still mentioned as a tool to include in the module-setup.sh, but dracut does not fail if the tool is not there for inclusion, which we probably can live with

Thoughts ?

@davidcassany
Copy link
Collaborator Author

The only place in code which is not covered with an alternative to partprobe is ./90kiwi-live/kiwi-live-lib.sh

if ! partprobe "${isodiskdev}"; then
    return 1
fi

We could consider to change this code path and leave the spec untouched ?

partprobe is still mentioned as a tool to include in the module-setup.sh, but dracut does not fail if the tool is not there for inclusion, which we probably can live with

Thoughts ?

I see your point and I think you are right, probably we should just make this partitions check in live module not dependent on partprobe and it should be enough. Gonna try to prepare a patch and run a test case.

@davidcassany
Copy link
Collaborator Author

Closing in favor of #2385

@davidcassany davidcassany deleted the fix_spec_file branch October 25, 2023 15:57
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.

2 participants