Consolidate FDroidData tooling into fdroidserver for broader applicability

proletarius101
2026-01-07T14:23:03Z

## Background

Several scripts currently live under `fdroiddata/tools` in the FDroidData repository:

- `check-metadata-summary-whitespace.py`
- `check-for-unattached-signatures.py`
- `check-exif-in-images.sh`
- `fix-ellipsis.sh`
- `png-pre-compress`
- `build-contains-signatures.py`

These utilities are primarily used during the build and validation phases of FDroid apps, but they are **not** exclusive to the `fdroiddata` repository. They operate on generic metadata, signatures, and image assets that any FDroid‑compatable repositories may need to process.

## Proposal

Move the above scripts into the `fdroidserver` codebase and expose them as part of its command‑line interface (or as library functions). This will:

1. **Reduce duplication** – developers won’t need to clone `fdroiddata` just to run these checks.
2. **Improve discoverability** – all server‑side tooling lives in one place, making onboarding easier.
3. **Encourage reuse** – other projects (e.g., custom CI pipelines) can invoke the same logic via `fdroidserver`.
4. **Simplify maintenance** – bug fixes and enhancements happen in a single repo, lowering the risk of drift.

## Impact

- **Developers:** One less repository to clone; consistent tooling across FDroid projects.
- **CI/CD pipelines:** Simpler configuration – just install `fdroidserver` and invoke the needed checks.
- **Maintenance:** Centralized issue tracking; PRs affect a single codebase.

## Risks / Open Questions

1. **Backward compatibility:** Existing scripts referenced directly from `fdroiddata` will break. Provide thin wrapper scripts in `fdroiddata/tools` that forward calls to the new `fdroidserver` commands for at least one release cycle.
2. **Dependency footprint:** Adding these scripts may increase `fdroidserver`’s runtime dependencies (e.g., `exiftool`). Ensure those are declared in `setup.cfg`/`requirements.txt`.