This is an automated tool for maintaining the aacs-keydb-daily package on AUR.
- Automatic archiving: Archive
http://fvonline-db.bplaced.net/export/keydb_eng.zipon web.archive.org - SHA256 verification: Compare current AUR package SHA256 with archived file SHA256
- Automatic generation: If differences are detected, automatically generate AUR package files including:
- Update version number (based on archive timestamp: YYYYMMDDhhmmss)
- Update SHA256 hash
- Replace original link with web.archive.org archive link
- Generate new .SRCINFO file
- Commit and push changes to AUR repository
- Structured logging: Uses the
tracinglibrary for hierarchical, structured logging that can be filtered by level and output to stdout, files, or syslog
Create a .env file (optional):
# SSH Key Path for AUR repository access
# Default: ~/.ssh/id_ed25519
SSH_KEY_PATH=~/.ssh/id_ed25519_aur
# Log level configuration (optional)
# Default: info
# Options: trace, debug, info, warn, error
RUST_LOG=infoEnsure you have SSH access to AUR:
- Default path:
~/.ssh/id_ed25519 - Make sure the key is added to your AUR account
cargo build --releasecargo runOr run the compiled binary:
./target/release/aur-aacs-keydb- Package name:
aacs-keydb-daily - Description: Contains the Key Database for the AACS Library (Daily Updates)
- Architecture: any
- Dependencies: libaacs
- License: Based on upstream project
- URL: http://fvonline-db.bplaced.net/
- Request archive: Request creation of new archive of
http://fvonline-db.bplaced.net/export/keydb_eng.zipon web.archive.org - Get archive URL: Retrieve the archive URL from web.archive.org
- Example:
https://web.archive.org/web/20250707095314/http://fvonline-db.bplaced.net/export/keydb_eng.zip - Archive URL is used to download the file
- Archive timestamp is used to generate the version number (YYYYMMDDhhmmss)
- Example:
- Download and verify: Download file from archive URL and calculate SHA256
- Clone/update AUR repo: Clone or update the AUR repository
- Compare hash: Compare with current AUR package SHA256 (if package exists)
- Generate files: If different or package doesn't exist, generate PKGBUILD and .SRCINFO
- Commit and push: Automatically commit and push changes to AUR
app.rs: Core application logic and workflow orchestration, usestracing::infofor loggingarchive.rs: Web Archive API interaction, handles archive creation and retrieval, usestracing::infofor detailed operation loggingaur.rs: AUR package management functionality, handles PKGBUILD and .SRCINFO generationconfig.rs: Configuration management, reads environment variables and validates settingsgit.rs: Git operations helper, handles repository cloning/updating and commits, usestracing::infofor operation statusmain.rs: Main application entry point and tracing initialization with hierarchical logging configurationerror.rs: Custom error type definitions and Result type
This application uses the tracing library for structured, hierarchical logging:
- Logs are formatted with timestamps and module paths
- Log level can be controlled via environment variables (e.g.,
RUST_LOG=debug) - Default log level is INFO
- All modules use consistent logging (no direct println! calls)
- Logs can be redirected to files or syslog by modifying the tracing subscriber in main.rs
- Current version automatically commits and pushes to AUR
- The tool clones/updates the AUR repository automatically
- Generated files are in
/tmp/aur-aacs-keydb-daily/directory - Network connection is required (for web.archive.org access)
- SSH key must be configured for AUR access
This project is open source under 0BSD.