[FEATURE] Tracking issue for porting libapg to FreeBSD. #20

Closed
opened 2026-06-19 12:43:10 +00:00 by AnmiTaliDev · 2 comments
AnmiTaliDev commented 2026-06-19 12:43:10 +00:00 (Migrated from github.com)

Tracking issue for porting libapg to FreeBSD.

Tracking issue for porting libapg to FreeBSD.
meigoc commented 2026-07-18 11:21:36 +00:00 (Migrated from github.com)

Reopening this issue — #26 added a FreeBSD CI job, but that is not a complete port.

PR #26 only added a CI job that builds and runs tests on FreeBSD 14.3 (x86_64). The library compiles because the code silently falls back to degraded #else paths, not because FreeBSD is actually supported. Remaining work:

  • Install-script sandbox is a no-op on FreeBSD. In src/install/scripts.c, exec_script() isolates scripts via unshare(CLONE_NEWNET | CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC) only under #ifdef __linux__. The #else branch is a plain fork() + execl() with no isolation at all, so on FreeBSD package scripts run with full network/filesystem/IPC access. This is a silent security downgrade. Needs a FreeBSD equivalent (Capsicum / cap_enter(), or jail-based isolation).
  • No seccomp equivalent. APG_HAVE_SECCOMP syscall filtering is Linux-only (libseccomp doesn't exist on FreeBSD), so that protection layer is simply absent with no replacement.
  • gpgme signing backend is untested on FreeBSD. The CI job installs only libsodium, so the preferred PGP backend is never built or tested there.
  • Default paths violate hier(7). /etc/apg/trusted.d, /etc/apg/keys (meson_options.txt) should default to /usr/local/etc/apg/... on FreeBSD.
  • Global -D_GNU_SOURCE in meson.build is a glibc-ism; the code hasn't been audited for GNU extensions it may rely on.
  • No FreeBSD docs: README lists dependency install commands for 7 Linux distros but has no pkg install instructions or notes on FreeBSD limitations.
**Reopening this issue — #26 added a FreeBSD CI job, but that is not a complete port.** PR #26 only added a CI job that builds and runs tests on FreeBSD 14.3 (x86_64). The library compiles because the code silently falls back to degraded `#else` paths, not because FreeBSD is actually supported. Remaining work: - [ ] **Install-script sandbox is a no-op on FreeBSD.** In `src/install/scripts.c`, `exec_script()` isolates scripts via `unshare(CLONE_NEWNET | CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC)` only under `#ifdef __linux__`. The `#else` branch is a plain `fork()` + `execl()` with **no isolation at all**, so on FreeBSD package scripts run with full network/filesystem/IPC access. This is a silent security downgrade. Needs a FreeBSD equivalent (Capsicum / `cap_enter()`, or jail-based isolation). - [ ] **No seccomp equivalent.** `APG_HAVE_SECCOMP` syscall filtering is Linux-only (libseccomp doesn't exist on FreeBSD), so that protection layer is simply absent with no replacement. - [ ] **gpgme signing backend is untested on FreeBSD.** The CI job installs only `libsodium`, so the preferred PGP backend is never built or tested there. - [ ] **Default paths violate hier(7).** `/etc/apg/trusted.d`, `/etc/apg/keys` (`meson_options.txt`) should default to `/usr/local/etc/apg/...` on FreeBSD. - [ ] **Global `-D_GNU_SOURCE`** in `meson.build` is a glibc-ism; the code hasn't been audited for GNU extensions it may rely on. - [ ] **No FreeBSD docs**: README lists dependency install commands for 7 Linux distros but has no `pkg install` instructions or notes on FreeBSD limitations.
AnmiTaliDev commented 2026-07-18 12:31:24 +00:00 (Migrated from github.com)

Сам сделаешь или мне?

Сам сделаешь или мне?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
core/libAPG#20
No description provided.