Skip to main content

Salt extension restoring the apk package provider (apkpkg) removed from Salt core in 3008

Project description

saltext-apk

A Salt extension that restores the apkpkg execution module — the pkg provider for apk-based systems (OpenWrt 25.12+, Alpine Linux).

Source: https://gitlab.com/paulto/saltext-apk

Why this exists

Salt 3008 removed salt/modules/apkpkg.py in its purge of community extensions (it was last present in v3007.14). Unlike many purged modules — saltext-zfs, for example — no replacement extension was published, so on Salt 3008 there is no pkg provider for apk at all. This package restores it.

It matters now because OpenWrt 25.12 switched its package manager from opkg to apk: Salt 3008 minions on OpenWrt have no working pkg module without this.

What differs from the original

The first commit is the verbatim v3007.14 module, so the git history shows every change since. On top of that:

  • __virtual__ loads the module as pkg on any host where salt.utils.path.which("apk") finds an apk executable on PATH — covering OpenWrt (grain os_family: OpenWrt) as well as Alpine. The upstream module only enabled on os_family == "Alpine", so OpenWrt previously needed a providers: pkg: apkpkg override; with this it doesn't.
  • list_pkgs uses apk list --installed --manifest instead of fragile string-splitting. The original assumed Alpine's name + X.Y.Z-rN form and mis-parsed packages whose names contain hyphens or whose versions lack a -rN suffix — e.g. luci-app-mwan3 25.360.65088~78a62f2, which it recorded under the wrong name so pkg.installed could never confirm it.

Install

Into the same environment as Salt (onedir / uv / system):

salt-pip install saltext-apk

or as a Salt state:

saltext.apk:
  pip.installed:
    - bin_env: /usr/bin/salt-pip

Once installed, it loads as the pkg provider on any minion with an apk executable on PATH.

License

Apache-2.0 — the same license as the Salt code it derives from; see LICENSE. The apkpkg module is derived from SaltStack's salt/modules/apkpkg.py; copyright of the original portions remains with the SaltStack authors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saltext_apk-0.4.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saltext_apk-0.4.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file saltext_apk-0.4.0.tar.gz.

File metadata

  • Download URL: saltext_apk-0.4.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for saltext_apk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 bbcd7c34ff975515921ec5ccef8c677bdf53ee8219edbf1ad173c0403f146ed1
MD5 e296a94a8b68be86a1eb7548c7f9b42f
BLAKE2b-256 c05d1aa606322aa20a671222b3e8ccaecf9ff882f231236a7d9aa95066963290

See more details on using hashes here.

File details

Details for the file saltext_apk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: saltext_apk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for saltext_apk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30e6c0052fc855eec6c5c4f983677945f6a1e62752f4fa92b9398692b9eb0617
MD5 1f993e7b684ccbd1c3f1480aaf95cc54
BLAKE2b-256 4cf90d60815008677fd90480c3d66b5670fe843351f46e9f6840e68a2acfb66b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page