apksums


Nameapksums JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryVerify checksums of installed APK package files
upload_time2025-02-07 18:10:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseCopyright 2025 Jstyles Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords alpine apk checksums security verification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
# 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:
```bash
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:
```bash
apksums
```

Only show modified files:
```bash
apksums -c
```

Check files in alternative root:
```bash
apksums -r /mnt/rootfs
```

Use custom checksums file:
```bash
apksums -m /path/to/checksums
```

Silent mode (only show errors):
```bash
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

```bash
# 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
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "apksums",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "alpine, apk, checksums, security, verification",
    "author": null,
    "author_email": "Jstyles <python@styl.dev>",
    "download_url": "https://files.pythonhosted.org/packages/4a/f2/a3aacbeed4dd317cedfb88e53b4e77a3e81f5f6449640583918944177f85/apksums-0.1.1.tar.gz",
    "platform": null,
    "description": "# APKSums\n\nAPKSums 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.\n\n## Features\n\n- Verify checksums of installed files against the APK database\n- Support for both regular files and symbolic links\n- Various output modes (normal, silent, changed-only)\n- Configurable root directory for checking alternative installations\n- Custom checksums file support\n\n## Installation\n\n```bash\n# From source\ngit clone https://github.com/yourusername/apksums.git\ncd apksums\npip install .\n\n# Or directly via pip (if published)\npip install apksums\n```\n\n## Usage\n\nBasic usage:\n```bash\napksums\n```\n\n### Command Line Options\n\n```\n-s, --silent       Only report errors\n-c, --changed      Report changed file list to stdout (implies -s)\n-r, --root DIR     Root directory to check (default /)\n-m, --md5sums FILE Read list of checksums from file (default /lib/apk/db/installed)\n```\n\n### Examples\n\nCheck all files with normal output:\n```bash\napksums\n```\n\nOnly show modified files:\n```bash\napksums -c\n```\n\nCheck files in alternative root:\n```bash\napksums -r /mnt/rootfs\n```\n\nUse custom checksums file:\n```bash\napksums -m /path/to/checksums\n```\n\nSilent mode (only show errors):\n```bash\napksums -s\n```\n\n## Output Format\n\n### Normal Mode\n```\nOK: /bin/ls (from coreutils)\nFAILED: /etc/passwd (from shadow)\n  Expected: abc123...\n  Got: def456...\nMISSING: /etc/config (from base-pkg)\n```\n\n### Changed Mode (-c)\n```\n/etc/passwd\n/usr/bin/modified-binary\n```\n\n## Exit Codes\n\n- 0: All checks passed\n- 1: Some files failed verification or are missing\n\n## Development\n\n### Requirements\n\n- Python 3.6+\n- pytest (for running tests)\n\n### Running Tests\n\n```bash\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run tests\npytest\n```\n\n### Project Structure\n\n```\napksums/\n\u251c\u2500\u2500 apksums/\n\u2502   \u251c\u2500\u2500 __init__.py\n\u2502   \u2514\u2500\u2500 main.py\n\u251c\u2500\u2500 tests/\n\u2502   \u2514\u2500\u2500 test_main.py\n\u251c\u2500\u2500 setup.py\n\u2514\u2500\u2500 README.md\n```\n",
    "bugtrack_url": null,
    "license": "Copyright 2025 Jstyles\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Verify checksums of installed APK package files",
    "version": "0.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/jontyms/apksums/issues",
        "Homepage": "https://github.com/jontyms/apksums",
        "Repository": "https://github.com/jontyms/apksums.git"
    },
    "split_keywords": [
        "alpine",
        " apk",
        " checksums",
        " security",
        " verification"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e64c5818201e7e36321fad70cd7931e03f5d608f5c620f844aa32dbfcc3310ca",
                "md5": "499eb3f52b7a3fc979fcc9ea9cd566ca",
                "sha256": "58c24cdd5b1aa8cb1f73af8c245d7fc9cecaffe15b549d5ecb97bba55236f4fb"
            },
            "downloads": -1,
            "filename": "apksums-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "499eb3f52b7a3fc979fcc9ea9cd566ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5914,
            "upload_time": "2025-02-07T18:10:51",
            "upload_time_iso_8601": "2025-02-07T18:10:51.372010Z",
            "url": "https://files.pythonhosted.org/packages/e6/4c/5818201e7e36321fad70cd7931e03f5d608f5c620f844aa32dbfcc3310ca/apksums-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4af2a3aacbeed4dd317cedfb88e53b4e77a3e81f5f6449640583918944177f85",
                "md5": "81e817239942599dcfda6c6d76e5e463",
                "sha256": "6651af37b4aa47f6817cef36b4964d9459e594f931acb4bd1039dfe02e15fbc8"
            },
            "downloads": -1,
            "filename": "apksums-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "81e817239942599dcfda6c6d76e5e463",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 6154,
            "upload_time": "2025-02-07T18:10:53",
            "upload_time_iso_8601": "2025-02-07T18:10:53.749810Z",
            "url": "https://files.pythonhosted.org/packages/4a/f2/a3aacbeed4dd317cedfb88e53b4e77a3e81f5f6449640583918944177f85/apksums-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 18:10:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jontyms",
    "github_project": "apksums",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "apksums"
}
        
Elapsed time: 0.86367s