- C 76.2%
- Python 13.5%
- C++ 7.8%
- Meson 2.2%
- Nix 0.2%
- Other 0.1%
|
Some checks failed
CI / Code quality (push) Has been cancelled
CI / Build and test (push) Has been cancelled
CI / Sanitizers (ASan + UBSan) (push) Has been cancelled
CI / Fuzzing (smoke test) (push) Has been cancelled
CI / ABI regression check (push) Has been cancelled
CI / Cross-compile (aarch64) (push) Has been cancelled
CI / Cross-compile (riscv64) (push) Has been cancelled
CI / Cross-compile (mips64el) (push) Has been cancelled
CI / Cross-compile (armhf) (push) Has been cancelled
docs / build (push) Has been cancelled
|
||
|---|---|---|
| .forgejo | ||
| .github | ||
| bindings | ||
| cmake | ||
| cross | ||
| docs | ||
| fuzz | ||
| include | ||
| pkg | ||
| scripts | ||
| src | ||
| subprojects | ||
| test | ||
| .clang-format | ||
| .clang-tidy | ||
| .clocignore | ||
| .editorconfig | ||
| .gitignore | ||
| abi-suppressions.txt | ||
| CHANGELOG.md | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| Doxyfile | ||
| flake.nix | ||
| LICENSE | ||
| meson.build | ||
| meson_options.txt | ||
| README.md | ||
| ROADMAP.md | ||
| SECURITY.md | ||
libapg
Package management library for NurOS.
Note
Repository Mirrors
- git.nuros.org (core/libapg): primary, self-hosted Forgejo instance, accounts restricted to the core team.
- GitHub (NurOS-Linux/libapg): mirror for external contributors. Issues and Pull Requests opened here are welcome and are reviewed and processed by the core team.
Dependencies
| Dependency | Description |
|---|---|
| Meson | Build system |
| Ninja | Build tool |
| pkg-config | Helper tool for compiling |
| libarchive | Archive and compression library |
| lmdb | Embedded key-value database |
| yyjson | JSON library |
| libsodium | Package signing |
| libseccomp (optional, Linux only) | Syscall filtering for install script sandbox |
Signing
Packages are signed and verified with libsodium (sign_verify, sign_file, keyring_load, ...): Ed25519 signing, keys are read from /etc/apg/keys/.
Install-script sandbox
run_script() isolates pre/post-install scripts using the strongest primitive available on the host:
- Linux —
unshare()with isolated network, mount, UTS, and IPC namespaces, plus optionallibseccompsyscall filtering. - FreeBSD:
chroot()into the alternate install root, when one is given. Capsicum capability mode is not used here, since it forbids the kernel from resolving an interpreter path, which any#!-script exec requires. - Other POSIX platforms — no sandbox primitive is available; scripts run without isolation.
On Linux and FreeBSD, if the sandbox cannot be established the script is not executed (fail closed).
Building
With Nix
nix build
Without Nix
Arch Linux
sudo pacman -S meson ninja pkgconf libarchive lmdb yyjson libsodium
Ubuntu / Debian
sudo apt install meson ninja-build pkg-config libarchive-dev liblmdb-dev libyyjson-dev libsodium-dev
Fedora / RHEL / CentOS
sudo dnf install meson ninja-build pkgconf libarchive-devel lmdb-devel yyjson-devel libsodium-devel
openSUSE
sudo zypper install meson ninja pkgconf libarchive-devel lmdb-devel yyjson-devel libsodium-devel
Alpine Linux
sudo apk add meson ninja pkgconf libarchive-dev lmdb-dev yyjson-dev libsodium-dev
Gentoo
sudo emerge dev-build/meson dev-build/ninja dev-util/pkgconf app-arch/libarchive dev-db/lmdb dev-libs/yyjson dev-libs/libsodium
Void Linux
sudo xbps-install meson ninja pkgconf libarchive-devel lmdb-devel libsodium-devel
FreeBSD
sudo pkg install meson pkgconf ninja lmdb libarchive yyjson libsodium
libseccomp is not available on FreeBSD; the install-script sandbox falls back to chroot() only there (see Install-script sandbox). Default configuration paths follow FreeBSD's hier(7) and resolve under /usr/local/etc/apg/ instead of /etc/apg/.
Build
meson setup build --buildtype=release
meson compile -C build
Install
sudo meson install -C build
Using libapg
Installing libapg also installs a libapg.pc pkg-config file and a CMake package config module, so it can be picked up either way:
pkg-config --cflags --libs libapg
find_package(libapg REQUIRED)
target_link_libraries(your_target PRIVATE libapg::libapg)
The CMake module resolves through pkg-config, so pkg-config must be installed and discoverable on the consuming system.
License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for details.