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 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.2.tar.gz (5.4 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.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

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

Hashes for apksums-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f93544f21cb3ccddb65f7250b56a0681d80726fe858b935a4331d067175f44c0
MD5 4f53156ed268019f743c2db997f76b06
BLAKE2b-256 04630d93cf9be3b607e3164d489e62539676f46e1cae6e36fa34730d171d5f9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksums-0.1.2.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.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

Hashes for apksums-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43c94a17568cfec49eab894c118ee6b6a65dfe77f36fd0201f41d46569329053
MD5 bb2c6eb96a1cb53c9af28c485f837bd5
BLAKE2b-256 d9abba3ae18567365e2907eca736a08aaa4c900fd160884399e56e06a46957ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for apksums-0.1.2-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