Crates.io | genpac |
lib.rs | genpac |
version | 0.1.0 |
source | src |
created_at | 2023-12-29 11:52:57.939707 |
updated_at | 2023-12-29 11:52:57.939707 |
description | Sandbox for Gentoo ebuild development using bubblewrap |
homepage | |
repository | https://git.sr.ht/~gokuldas/genpac |
max_upload_size | |
id | 1083233 |
size | 150,759 |
Genpac is a development tool for managing unprivileged and sandboxed Gentoo chroots for testing Ebuild packages.
Use case: Gentoo ebuilds have to be tested in a clean, minimal Gentoo chroot to ensure that any required dependencies are not masked or hidden by packages already installed in the system. This requires a clean test environment. While there are many ways to do this, most recommended methods require either a full container/VM manager or chroots with superuser privileges.
Genpac takes an approach that utilizes an ordinary chroot (unlike VMs or container tools), but with the restricted privileges of a regular non-admin user account. Genpac achieves this using bubblewrap (a sandboxing tool) and Linux user namespaces with UID/GID mapping. More details of this is given in the configuration documentation.
Genpac is capable of the following:
Genpac supports the following chroot backends:
This has several advantages over the traditional methods:
/etc/profile
is provided, that displays the active chroot in the promptAn ebuild will eventually be provided to install the application. It may require useflags to be set to install documentation and optional features. The rest of this section deals with how to install genpac from source.
Build-time dependencies:
Older toolchains (>=1.56) may work. But this isn't verified. The recommended way to install the toolchain is using rustup. Refer rustup documentation for more details.
Runtime dependencies:
The application can be built by running the following inside the source tree:
cargo build --release
Add the --features=rempap
flag if you need the remap feature. It's alright to avoid this feature
for regular use.
The application may then be copied from target/release/genpac
to any directory included in the
PATH
variable. Alternatively, run the following to build and install genpac into the cargo
binaries directory:
cargo install --locked --path .
Make sure that the cargo binaries directory (usually ~/.cargo/bin/
) is included in the PATH
variable.
Genpac requires two simple types of configuration:
/etc/subuid
and /etc/subgid
files)~/.config/genpac/config.toml
)Refer configuration documentation for more details.
The following documentation is made available in the doc directory:
These are provided as AsciiDoc files. It may be converted to and viewed as HTML, PDF or man pages.
The application is ready for regular use and may be considered as beta quality. However, the 1.0 release is delayed for further testing and any meaningful feature requests.
Contributions are welcome. Modifications may be sent to my sourcehut projects mailing list as:
You are required to sign-off your commits - which means that you certify your contributions under Developer Certificate of Origin. Your contributions will be added with the same license as the rest of the project, except under explicitly specified circumstances. Please refer the detailed contributor guidelines if you need more information.
Copyright (C) 2023 Gokul Das B
The contents of repository are covered by GNU General Public License version 3 or later (GNU GPLv3 or later). You may use, modify or distribute the code under the terms of this license. For more details, please refer the LICENSE or visit FSF website.