Comments (4)
Thank you for the report. Mock Indeed pre-creates some device files in chroots.
Running mock in an unprivileged container is probably going to fail for multiple
reasons. You at least need to do podman run --privileged
as a non-root user
(IOW, running in a separate user namespace).
We at least need more info; what device files shouldn't be created, and what to do
instead to actually make the RPM build work.
This breaks nspawn isolation in the Podman executor for Qubes OS’s builderv2.
This is weird. --isolation=nspawn
isn't used in containers (i.e. mock doesn't spawn
containers in containers).
from mock.
Thank you for the report. Mock Indeed pre-creates some device files in chroots.
Running mock in an unprivileged container is probably going to fail for multiple reasons. You at least need to do
podman run --privileged
as a non-root user (IOW, running in a separate user namespace).
Unprivileged users cannot use mknod()
, whether it be in a user namespace or otherwise. They can, however, bind-mount the inodes that exist in the host /dev
, and I believe this is what Podman actually does.
We at least need more info; what device files shouldn't be created, and what to do instead to actually make the RPM build work.
Mock should bind-mount the device nodes.
This breaks nspawn isolation in the Podman executor for Qubes OS’s builderv2.
This is weird.
--isolation=nspawn
isn't used in containers (i.e. mock doesn't spawn containers in containers).
Why is this? --isolation=nspawn
is necessary to ensure that builds do not access the network, so not supporting it is rather annoying.
from mock.
Why is this? --isolation=nspawn is necessary to ensure that builds do not access the network, so not supporting it is rather annoying.
Because starting containers in containers is rather a hard topic to
implement, debug, and maintain (especially for us in Mock, we aren't the
upstream for Podman, Systemd, Docker, etc.). Even Mock builds with a
single level of containerization is pretty hard thing to take care of.
Patches are welcome of course, if you are ready to help us with this.
Otherwise, Mock does "unshare" for a separate network namespace and does
other mitigations related to disabling the network. So networking is not
enough motivating us... also, Mock explicitly claims that it doesn't
fully "isolate", see "Scope" section in our docs.
from mock.
There's been no activity recently, closing. Feel free to continue with the discussion (we can reopen the issue).
from mock.
Related Issues (20)
- Cannot use config_opts[f"{config_opts.package_manager}.conf"] HOT 10
- Calculate spec/srpm (dynamic) build requires as a separate build mode HOT 1
- Document Dynamic BuildRequires feature HOT 3
- Allow users specify the user-specific config via an environmental variable HOT 7
- Home directory in not writable, why? HOT 3
- Release Mock v5.6 HOT 4
- Add c10s compose to the centos-stream-10 config
- selinux error in lxd/lxc: Could not create dir /var/lib/mock/rocky+epel-9-x86_64-bootstrap/root/sys/fs/selinux. Error: [Errno 30] Read-only file system HOT 2
- Unknown argument "builddep" for command "dnf5" HOT 6
- crun fails to build on copr centos-stream-9-aarch64 with 403 on dbus-libs HOT 2
- centos-stream-8-x86_64: Error: Failed to download metadata for repo 'baseos'
- Provide a lists of RPMs installed by the PackageManager abstraction
- Mock in Fedora 41+ Container seems to be missing fuse-overlayfs HOT 1
- Add some enviroment variables to /builddir/.bashrc in mock os but doesn't work when build rpm.
- CentOS 10 is now available, RHEL and AlmaLinux and Oracle Linux 10 need configs HOT 4
- Install packages using --no-docs HOT 1
- Building mock on CentOS 10 has missing python RPMS HOT 3
- RFE: better support for multiple parallel mock builds HOT 2
- RFE: improve ccache plugin usability by enabling cache hits across package NEVRs HOT 2
- --dnf-cmd doesn't work with dnf5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mock.