APKSums
APKSums is a Python utility for verifying checksums of installed APK files on Alpine Linux systems. It helps ensure the integrity of installed packages by comparing file checksums against the package database.
Features
- Verify checksums of installed files against the APK database
- Support for both regular files and symbolic links
- Various output modes (normal, silent, changed-only)
- Configurable root directory for checking alternative installations
- Custom checksums file support
Installation
# From source
git clone https://github.com/yourusername/apksums.git
cd apksums
pip install .
# Or directly via pip (if published)
pip install apksums
Usage
Basic usage:
apksums
Command Line Options
-s, --silent Only report errors
-c, --changed Report changed file list to stdout (implies -s)
-r, --root DIR Root directory to check (default /)
-m, --md5sums FILE Read list of checksums from file (default /lib/apk/db/installed)
Examples
Check all files with normal output:
apksums
Only show modified files:
apksums -c
Check files in alternative root:
apksums -r /mnt/rootfs
Use custom checksums file:
apksums -m /path/to/checksums
Silent mode (only show errors):
apksums -s
Output Format
Normal Mode
OK: /bin/ls (from coreutils)
FAILED: /etc/passwd (from shadow)
Expected: abc123...
Got: def456...
MISSING: /etc/config (from base-pkg)
Changed Mode (-c)
/etc/passwd
/usr/bin/modified-binary
Exit Codes
- 0: All checks passed
- 1: Some files failed verification or are missing
Development
Requirements
- Python 3.6+
- pytest (for running tests)
Running Tests
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
Metadata
Release files for apksums 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apksums-0.1.2.tar.gz | 5.4 kB | With provenance | Details for apksums-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apksums-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for apksums-0.1.2-py3-none-any.whl |
Total release size: 11.2 kB
Release files / apksums-0.1.2.tar.gz
| Download URL | apksums-0.1.2.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f93544f21cb3ccddb65f7250b56a0681d80726fe858b935a4331d067175f44c0
|
|
BLAKE2b-256 checksum How to use checksums |
04630d93cf9be3b607e3164d489e62539676f46e1cae6e36fa34730d171d5f9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 12, 2025.
Transparency logRelease files / apksums-0.1.2-py3-none-any.whl
| Download URL | apksums-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43c94a17568cfec49eab894c118ee6b6a65dfe77f36fd0201f41d46569329053
|
|
BLAKE2b-256 checksum How to use checksums |
d9abba3ae18567365e2907eca736a08aaa4c900fd160884399e56e06a46957ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 12, 2025.
Transparency logSecurity for apksums 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for apksums-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 12, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.