-
Notifications
You must be signed in to change notification settings - Fork 371
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
Mktree tweaks, volume II #2618
Merged
dmnks
merged 9 commits into
rpm-software-management:master
from
dmnks:mktree-tweaks-vol-2
Aug 17, 2023
Merged
Mktree tweaks, volume II #2618
dmnks
merged 9 commits into
rpm-software-management:master
from
dmnks:mktree-tweaks-vol-2
Aug 17, 2023
+52
−26
Conversation
This file contains 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
Use /root instead of / (in runroot) or $PWD (in atlocal). We already do this in "make shell" so that the root user's dotfiles (e.g. ~/.bashrc) are loaded from the base image, this commit extends that to "make env" and fixes the following: - Calling "runroot rpm -qa" interactively now works as expected since the rpmdb from the base image built by mktree.fedora (which overrides %_dbpath in /root/.rpmmacros) is used - The user's native prompt is now used, instead of the shell's default This commit has no effect on the tests themselves since we initialize an empty rpmdb before use anyway. There was no technical reason for HOME being set to /, really, other than it being a historical artifact from the fakechroot era.
This just mirrors what mktree.fedora does already, and is only relevant in "make shell" when using the mktree.podman backend, no other functional change here.
dmnks
force-pushed
the
mktree-tweaks-vol-2
branch
from
August 17, 2023 12:10
9d56557
to
f387fe5
Compare
When managing the test tree with DNF, it's actually desirable to use the same options that were used during the tree construction (especially the cachedir), so just do that.
Networking is currently enabled in test containers (we don't use --unshare-net) but for domain names to be resolvable, we need an /etc/resolv.conf, too, so add it from the host, similar to how e.g. Podman does it. We don't need network access in the test-suite but it can be handy for interactive testing in "make shell", e.g. to allow gdb to fetch debuginfo data through debuginfod automatically.
dmnks
force-pushed
the
mktree-tweaks-vol-2
branch
from
August 17, 2023 13:49
f387fe5
to
c4917c1
Compare
This is more flexible as we can now add more commands to the trap, see the next commit. No functional changes.
With OverlayFS and unshare(1) being used in the test-suite, some of the directories in the test tree, sandbox and rpmtests.dir/ end up missing read/write or execute (for directories) permissions which means removing them requires excessive force in the form of "unshare -r rm -rf". CMake is clever enough to adjust the permissions behind the scenes on "make clean" but manual removal should just work too, so fix that with chmod(1) in the clean_up() trap.
Newer versions of Bubblewrap emit a warning for some select options (--chdir included) about only the last occurrence having effect, which is what happens in "make check" due to the --chdir override. Instead, just cd to the /srv directory in a shell and then run rpmtests from there, sigh. It's not the prettiest but it's better than always printing the spurious warning.
dmnks
force-pushed
the
mktree-tweaks-vol-2
branch
from
August 17, 2023 16:08
c4917c1
to
89399a7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mostly quality of life fixes and improvements to
make env
and a few other small bug fixes.