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

Keep re-creating the root directory #1227

Conversation

praiskup
Copy link
Member

The commit 1e13b56 causes that basedir is only created once, but at appropriate time.

The bug caused by that commit was that also $basedir/root mkdir(rootdir) action was mistakenly moved into the _setup_basedir(). Because rootdir is always removed after a build (if --resultdir is specified), we have to re-create it before trying to re-mount the rootdir.

This has caused problems in Fedora Copr which switched to 'mock --spec foo.spec --sources pwd'. This action actually does two builds, SRPM and later RPMs. The second build was unable to re-mount the rootdir with:

ERROR: Command failed:
$ mount -n -t tmpfs -o mode=0755 -o nr_inodes=0 -o size=140g mock_chroot_tmpfs /var/lib/mock/fedora-37-x86_64-1694797505.326095/root

praiskup added a commit to praiskup/mock that referenced this pull request Sep 18, 2023
@praiskup praiskup force-pushed the praiskup-rootdir-creation-in-5.1 branch from 0f5f308 to 68c35fd Compare September 18, 2023 11:53
Copy link
Member

@xsuchy xsuchy left a comment

Choose a reason for hiding this comment

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

+1

@praiskup praiskup force-pushed the praiskup-rootdir-creation-in-5.1 branch from 68c35fd to 4055c98 Compare September 18, 2023 13:02
@praiskup praiskup merged commit c068147 into rpm-software-management:main Sep 18, 2023
11 of 13 checks passed
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