| Summary: | Doesn't build with config_opts['basedir'] != '/var/lib/mock/' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Nils Philippsen <nphilipp> | ||||
| Component: | mock | Assignee: | Clark Williams <williams> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 19 | CC: | mebrown, nphilipp, williams | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2013-11-06 14:23:48 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
|
Description
Nils Philippsen
2013-09-20 13:34:59 UTC
Hmmm, I created /home/tmp/mock on my system and then set basedir of a fedora-19-x86_64.cfg to point there. I got all kinds of weird errors until I set the gid bit of /home/tmp/mock to be setgid mock: $ sudo chgrp mock /home/tmp/mock $ sudo chmod g+s /home/tmp/mock Then I could build packages with selinux turned on or off. I can't tell from your 'ls -lZa' whether the /data/mock directory is setgid mock. If it is then we need to dig deeper. On a different tack, our SELinux guru said that an easier way would be to bind-mount your /data/mock directory over /var/lib/mock: $ sudo mount -bind /data/mock /var/lib/mock (In reply to Clark Williams from comment #1) > Hmmm, I created /home/tmp/mock on my system and then set basedir of a > fedora-19-x86_64.cfg to point there. I got all kinds of weird errors until I > set the gid bit of /home/tmp/mock to be setgid mock: > > $ sudo chgrp mock /home/tmp/mock > $ sudo chmod g+s /home/tmp/mock > > Then I could build packages with selinux turned on or off. > > I can't tell from your 'ls -lZa' whether the /data/mock directory is setgid > mock. If it is then we need to dig deeper. It is setgid mock: nils@gibraltar:~> ls /data/mock/ -lZa drwxr-xr-x. root root unconfined_u:object_r:default_t:s0 . drwxrwxrwt. nils nils system_u:object_r:file_t:s0 .. drwxrwsr-x. root mock unconfined_u:object_r:default_t:s0 cache drwxrwsr-x. root mock system_u:object_r:default_t:s0 lib (In reply to Clark Williams from comment #2) > On a different tack, our SELinux guru said that an easier way would be to > bind-mount your /data/mock directory over /var/lib/mock: > > $ sudo mount -bind /data/mock /var/lib/mock I'd like to do that, but /data is on an external disk and that would triple the number of mount operations: mount /data mount --bind /data/mock/lib /var/lib/mock mount --bind /data/mock/cache /var/cache/mock I've looked into mock's bind_mount options but they apparently only work for bind mounts into the build root, but not for the rest. (In reply to Nils Philippsen from comment #3) > (In reply to Clark Williams from comment #2) > > On a different tack, our SELinux guru said that an easier way would be to > > bind-mount your /data/mock directory over /var/lib/mock: > > > > $ sudo mount -bind /data/mock /var/lib/mock > > I'd like to do that, but /data is on an external disk and that would triple > the number of mount operations: > > mount /data > mount --bind /data/mock/lib /var/lib/mock > mount --bind /data/mock/cache /var/cache/mock > This is on a USB drive? Or eSATA? You should be able to script those bind mounts rather easily. > I've looked into mock's bind_mount options but they apparently only work for > bind mounts into the build root, but not for the rest. Correct, mock's main concern is getting the organization and contents of the chroot correct. From what I see in your root log, you're running on f19 and kicked off a package build for a rawhide/f21 package. It looks like most of the %post sections failed during the installation and then rpm decides that the rpmdb is corrupt. What type of filesystem is on this external drive? If you point to a local filesystem, say something in /var/tmp does it still error out as before? I just grabbed one of my external USB drives and tried to build an SRPM with the basedir set to that drive. Got the same sort of results as you did from rpm. This looks like an issue with NTFS (or HPFS or exFAT, whichever the drive filesystem is using). I think I've found the issue: because the FS (ext4 BTW) is mounted by me ("user"), it was mounted with "noexec,nosuid,nodev" which breaks mock/rpm in interesting ways (found this when I tried to run "make" in the kernel source tree that's on the same volume) -- not sure if mock could check for this situation.
Sorry for the hassle.
|