Age | Commit message (Collapse) | Author |
|
The earlier GPL-3 only is implied in the new grant.
|
|
|
|
With the tar backend, there was a chdir(~/.cache/unschroot/...) that
would fail if ~ was lacking execute permission for others. Now we chdir
there before unsharing and then do relative operations to support that
use case.
|
|
|
|
|
|
os.getlogin() returns an undesired value in a runuser environment and is
not overridable with environment.
|
|
By using bindfs, we may perform id-mapped bind mounts to share e.g. a
user-owned ccache with sbuild.
|
|
|
|
While the first implementation created new namespaces for every
invocation in a similar way to sbuild's unshare mode, the second
implementation keeps a backround process with persistent user and mount
namespace around. This allows using a new tmpfs as backing device and
using fuse mounts for underlying filesystems.
Communication between the background process and the cli is implemented
using the https://github.com/helmutg/asyncvarlink varlink
implementation.
Chroots can be detected from typical locations or configured via
~/.config/unschroot.ini.
Thanks go out for fruitful discussions, feedback and testing to:
* Christian Hofstaedler
* Christoph Berg
* Enrico Zini
* Jochen Sprickerhof
* Johannes Schauer Marin Rodrigues
* Thomas Walz
|
|
populate_dev may be used before unsharing a pid namespace with the
intention of unsharing it. Then, /dev/pts should not be mounted and
instead that mount needs to happen inside the newly created pid
namespace. To allow for this usage, rename the pidns argument to pts and
turn it into a literal. It may also be desired to have a /dev without
pts, so add that option as well. It's a breaking change, but it does add
clarity.
|
|
|
|
Also turn the compressor-specific arguments into keyword-only arguments.
|
|
|
|
|
|
|
|
Suggested-by: pylint
|
|
|
|
|
|
The forked process still shares file descriptors with its parent running
asyncio code. Having two processes deal with the same epoll fd or
similar would be really bad. Hence release the event loop in the child
to prevent accidental use.
|
|
|
|
Doing so skips creating the EventFD.
|
|
Otherwise an exception handler in the caller may be invoked in
unexpected ways. If an exception occurs, exit non-zero and reraise in
the parent with less detail.
|
|
|
|
|
|
|
|
It provides part of the functionality of MountFlags.tostr.
|
|
This allows opening /proc as an O_PATH descriptor, then locking a
process up and then still writing idmaps by accessing the now
inaccessible /proc via the retained file descriptor.
|
|
They bring similarity to their pathlib.Path counterparts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes: 30a111639ce6 ("expand use of FileDescriptor and add FileDescriptorLike type alias")
|
|
Fixes: 30a111639ce6 ("expand use of FileDescriptor and add FileDescriptorLike type alias")
|
|
|
|
It's a pure Python module and flit seems to just work for those.
|
|
When accepting file descriptors, non-int objects with a fileno method
are now generally accepted. When returning a file descriptor, a
FileDescriptor instance is now returned.
|
|
|
|
When both fd and location are given, it would previously ignore the fd
component. To properly implement that, we must open and fchdir.
|
|
|
|
The "mustnegate" field was a bit strange and it was only ever set in the
default value used for the lookup. Remove it and express its semantics
in code instead.
|
|
|
|
|
|
|
|
Fixes: 426f547d5b54 ("examples/unschroot.py: support overlayfs-based directory chroots")
Reported-by: Christoph Berg <myon@debian.org>
|
|
The parent commit regressed working with "chroot:" prefixed chroots.
Directory chroots are required to emit a "Mount Location" to be
considered valid by sbuild.
|
|
Suggested-by: Christoph Berg <myon@debian.org>
|
|
Fixes: b0874c6086f1 ("lift the dbus functionality from the cgroup example")
Fixes: bb83f3fe1bec ("add examples/cgroup.py: writeable cgroup hierarchy")
|