Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

251 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:

  • Linuxunshare() with isolated network, mount, UTS, and IPC namespaces, plus optional libseccomp syscall 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.

About

Read-only mirror. Package management library for NurOS.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages