Verify checksums of installed APK package files
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apksums-0.1.2.tar.gz.
File metadata
- Download URL: apksums-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f93544f21cb3ccddb65f7250b56a0681d80726fe858b935a4331d067175f44c0
|
|
| MD5 |
4f53156ed268019f743c2db997f76b06
|
|
| BLAKE2b-256 |
04630d93cf9be3b607e3164d489e62539676f46e1cae6e36fa34730d171d5f9e
|
Provenance
The following attestation bundles were made for apksums-0.1.2.tar.gz:
Publisher:
publish.yml on jontyms/apksums
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apksums-0.1.2.tar.gz -
Subject digest:
f93544f21cb3ccddb65f7250b56a0681d80726fe858b935a4331d067175f44c0 - Sigstore transparency entry: 170669862
- Sigstore integration time:
-
Permalink:
jontyms/apksums@32caf4d06f7ec21bb10d3768a531ad5a8fc74b1c -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jontyms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32caf4d06f7ec21bb10d3768a531ad5a8fc74b1c -
Trigger Event:
push
-
Statement type:
File details
Details for the file apksums-0.1.2-py3-none-any.whl.
File metadata
- Download URL: apksums-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c94a17568cfec49eab894c118ee6b6a65dfe77f36fd0201f41d46569329053
|
|
| MD5 |
bb2c6eb96a1cb53c9af28c485f837bd5
|
|
| BLAKE2b-256 |
d9abba3ae18567365e2907eca736a08aaa4c900fd160884399e56e06a46957ce
|
Provenance
The following attestation bundles were made for apksums-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on jontyms/apksums
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apksums-0.1.2-py3-none-any.whl -
Subject digest:
43c94a17568cfec49eab894c118ee6b6a65dfe77f36fd0201f41d46569329053 - Sigstore transparency entry: 170669864
- Sigstore integration time:
-
Permalink:
jontyms/apksums@32caf4d06f7ec21bb10d3768a531ad5a8fc74b1c -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jontyms
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@32caf4d06f7ec21bb10d3768a531ad5a8fc74b1c -
Trigger Event:
push
-
Statement type: