- C 82.8%
- Python 9.6%
- C++ 5.7%
- Meson 1.7%
- Nix 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
docs / build (push) Has been cancelled
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
|
||
| .forgejo | ||
| .github | ||
| bindings | ||
| cmake | ||
| cross | ||
| docs | ||
| fuzz | ||
| include/apg | ||
| 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) | Detected at configure time, not used by the current sources |
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() runs pre/post-install scripts as /bin/sh <script> in a child process.
- Linux:
unshare()with user, network, mount, UTS, and IPC namespaces. Ifunshare()fails withEPERMorEINVAL, the script runs without them. Any other error fails the call. - 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:
chroot()into the alternate install root, when one is given. No other isolation is applied.
On every platform, if chroot() to a given install root fails, the script is not executed.
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.