Skip to content

Conversation

@pfeifferj
Copy link
Contributor

The pacman-git API has been simplified, removing functions. This commit updates alpm.rs to work with the current pacman-git master.

Changes:

  • Remove dl_timeout_disabled() getter (alpm_option_get_disable_dl_timeout no longer exists in pacman-git, only the setter remains)
  • Remove sandbox_disabled() getter (alpm_option_get_disable_sandbox no longer exists in pacman-git, only the setter remains)
  • Unify sandbox_setup_child() implementation by removing the git-specific 4-parameter version. The restrict_syscalls parameter was removed from the C API, so both stable and git now use the same 3-parameter signature (handle, user, path)
  • Update ffi_git.rs bindings to match the current C API by removing the restrict_syscalls parameter and the deprecated getter functions
  • Update test expectations to reflect unified behavior across stable and git versions

Tested on:

  • Arch Linux with pacman-git 7.0.0.r6.gc685ae6-6

@pfeifferj pfeifferj changed the title Fix compilation with pacman-git by removing deprecated API calls fix: compilation errors with pacman-git by removing deprecated API calls Oct 17, 2025
@pfeifferj pfeifferj force-pushed the fix-pacman-git-api-compatibility branch 2 times, most recently from b571a2f to f1baaa3 Compare October 17, 2025 13:06
@Morganamilo
Copy link
Member

I think this misses some new stuff. You can diff the header file to see what's new and unreleased git diff v7.0.0 -- lib/libalpm/alpm.h

Regenerated ffi_git.rs bindings from current pacman git master and
added support for new sandbox options. The pacman-git API has split
the old disable_sandbox option into separate filesystem and syscalls
controls.

Changes:
- Regenerated ffi_git.rs from current pacman git master source
- Added sandbox_filesystem_disabled() and sandbox_syscalls_disabled()
  getters for git feature
- Added set_disable_sandbox_filesystem() and set_disable_sandbox_syscalls()
  setters for git feature
- Updated alpm-utils to handle both old (stable) and new (git) sandbox APIs
- Kept stable set_disable_sandbox() for non-git feature
- Updated sandbox test to handle cases where set_sandbox_user may fail

The git feature now properly tracks the current pacman master API with:
- alpm_option_get/set_disable_sandbox_filesystem
- alpm_option_get/set_disable_sandbox_syscalls
- alpm_sandbox_setup_child with 4 parameters (including restrict_syscalls)

Signed-off-by: Josephine Pfeiffer <[email protected]>
@pfeifferj pfeifferj force-pushed the fix-pacman-git-api-compatibility branch from f1baaa3 to 07aac36 Compare October 17, 2025 17:51
@Morganamilo Morganamilo merged commit adcd470 into archlinux:master Oct 18, 2025
5 checks passed
@pfeifferj pfeifferj deleted the fix-pacman-git-api-compatibility branch October 19, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants