Skip to main content

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 Structure

apksums/
├── apksums/
│   ├── __init__.py
│   └── main.py
├── tests/
│   └── test_main.py
├── setup.py
└── README.md

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

apksums-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

apksums-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file apksums-0.1.0.tar.gz.

File metadata

  • Download URL: apksums-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for apksums-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d26d169db1be55d70a1178feefe71cd9b632af8d9e609025d4576f2fb487422
MD5 7a3d22d2da15229f849cbe6da13d81eb
BLAKE2b-256 b7999294beda82aed4dc6178a46a576acd888abdc6aa1e67d14ed8db8ba6e2a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksums-0.1.0.tar.gz:

Publisher: publish.yml on jontyms/apksums

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file apksums-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: apksums-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for apksums-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ef4d19f2657d067368f78bc6a721f4e9ad830bbbcd702288e12efebd53f81fe
MD5 ad30cd89c81132c35b14ea9c3075c036
BLAKE2b-256 156ef590c5acc96e93c5ba790ead610c643fe5a3104a70e54e08e69ae1f5ff47

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksums-0.1.0-py3-none-any.whl:

Publisher: publish.yml on jontyms/apksums

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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