fdroid-update.sh writes <repo-root>/config.yml itself on every run, but
only sets keystore, keystorepass, keypass and repo_keyalias. It never
sets repo_url, repo_name or repo_description, so fdroidserver falls
back to its own placeholder template.
Measured from the live index-v2.json in fdroid-weblib-dev:
repo.address https://MyFirstFDroidRepo.org/fdroid/repo
repo.name My First F-Droid Repo Demo
repo.description This is a repository of apps to be used with F-Droid. ...
That is fdroidserver's stock demo text, not this repo. The "Add to F-Droid" / fdroid.link button on the generated index.html is built from repo_url,
which is how bit noticed -- it points at MyFirstFDroidRepo.org, not at the
real bucket. This is silently wrong: the publish succeeds while advertising
someone else's URL, which is worse than failing.
Fix: add FDROID_REPO_URL/FDROID_REPO_NAME/FDROID_REPO_DESCRIPTION
environment variables (not new positionals -- the script already has five
plus pass-through extra args) that fdroid-update.sh writes into config.yml. Make the first two a hard error when unset, naming the
variable -- defaulting would just move the silent-wrong-value bug rather
than fix it. FDROID_REPO_DESCRIPTION may stay optional.
This is a breaking change to a public composite action's interface, which is
acceptable only because weblib-viewer is the sole consumer and is updated
in the same piece of work.
`fdroid-update.sh` writes `<repo-root>/config.yml` itself on every run, but
only sets `keystore`, `keystorepass`, `keypass` and `repo_keyalias`. It never
sets `repo_url`, `repo_name` or `repo_description`, so fdroidserver falls
back to its own placeholder template.
Measured from the live `index-v2.json` in `fdroid-weblib-dev`:
```
repo.address https://MyFirstFDroidRepo.org/fdroid/repo
repo.name My First F-Droid Repo Demo
repo.description This is a repository of apps to be used with F-Droid. ...
```
That is fdroidserver's stock demo text, not this repo. The "Add to F-Droid" /
`fdroid.link` button on the generated `index.html` is built from `repo_url`,
which is how bit noticed -- it points at `MyFirstFDroidRepo.org`, not at the
real bucket. This is silently wrong: the publish *succeeds* while advertising
someone else's URL, which is worse than failing.
Fix: add `FDROID_REPO_URL`/`FDROID_REPO_NAME`/`FDROID_REPO_DESCRIPTION`
environment variables (not new positionals -- the script already has five
plus pass-through extra args) that `fdroid-update.sh` writes into
`config.yml`. Make the first two a hard error when unset, naming the
variable -- defaulting would just move the silent-wrong-value bug rather
than fix it. `FDROID_REPO_DESCRIPTION` may stay optional.
This is a breaking change to a public composite action's interface, which is
acceptable only because `weblib-viewer` is the sole consumer and is updated
in the same piece of work.
4a25e36, merged as 760583b (PR #12). Consumer side wired in weblib-viewer#25.
What changed:fdroid-update.sh now requires FDROID_REPO_URL and FDROID_REPO_NAME — a named hard error if either is missing — and writes them, plus the optional FDROID_REPO_DESCRIPTION, into the config.yml it generates. Required rather than defaulted, because the old failure mode was a publish that succeeded while advertising MyFirstFDroidRepo.org: silently wrong, which is worse than not running.
One thing found during implementation that was not in the original diagnosis, and that changes the URLs: fdroidserver/common.py:662-664 refuses to run anyfdroid command when repo_url does not end in the literal /repo, with no way to disable it.
if'repo_url'inconfig:ifnotconfig['repo_url'].endswith('/repo'):raiseFDroidException(_('repo_url needs to end with /repo'))
Both channels published to the bucket root, so neither spelling worked — a suffix-less URL makes fdroidserver refuse to start, a suffixed one names a path the bucket never served. Resolved by using publish.sh's existing <prefix> argument so the tree is served under .../repo/.
Tests: 104 passed / 4 skipped, up from 98/4. The new assertions cover a missing FDROID_REPO_URL/FDROID_REPO_NAME failing, a URL without /repo failing, index-v2.json carrying the configured repo.address/repo.name/repo.description with no placeholder text, and a name containing a single quote surviving the YAML round-trip.
Live confirmation is still in flight — the dev publish triggered by weblib-viewer#25 is running, and the real check is reading repo.address back from https://fdroid-weblib-dev.s3w.dev.chaosbit.de/repo/index-v2.json. Closing on the merged, unit-tested change; if that read comes back wrong I will reopen rather than leave it looking done.
Also noted for whoever does it: the pre-existing objects at the bucket root will survive the move to /repo/, because aws s3 sync --delete only prunes within its prefix. They will keep serving the old placeholder index at the root URL until deleted.
## Fixed and merged
`4a25e36`, merged as `760583b` (PR #12). Consumer side wired in weblib-viewer#25.
**What changed:** `fdroid-update.sh` now requires `FDROID_REPO_URL` and `FDROID_REPO_NAME` — a named hard error if either is missing — and writes them, plus the optional `FDROID_REPO_DESCRIPTION`, into the `config.yml` it generates. Required rather than defaulted, because the old failure mode was a publish that *succeeded* while advertising `MyFirstFDroidRepo.org`: silently wrong, which is worse than not running.
**One thing found during implementation that was not in the original diagnosis**, and that changes the URLs: `fdroidserver/common.py:662-664` refuses to run *any* `fdroid` command when `repo_url` does not end in the literal `/repo`, with no way to disable it.
```python
if 'repo_url' in config:
if not config['repo_url'].endswith('/repo'):
raise FDroidException(_('repo_url needs to end with /repo'))
```
Both channels published to the **bucket root**, so neither spelling worked — a suffix-less URL makes fdroidserver refuse to start, a suffixed one names a path the bucket never served. Resolved by using `publish.sh`'s existing `<prefix>` argument so the tree is served under `.../repo/`.
**Tests:** 104 passed / 4 skipped, up from 98/4. The new assertions cover a missing `FDROID_REPO_URL`/`FDROID_REPO_NAME` failing, a URL without `/repo` failing, `index-v2.json` carrying the configured `repo.address`/`repo.name`/`repo.description` with no placeholder text, and a name containing a single quote surviving the YAML round-trip.
**Live confirmation is still in flight** — the dev publish triggered by weblib-viewer#25 is running, and the real check is reading `repo.address` back from `https://fdroid-weblib-dev.s3w.dev.chaosbit.de/repo/index-v2.json`. Closing on the merged, unit-tested change; if that read comes back wrong I will reopen rather than leave it looking done.
Also noted for whoever does it: the pre-existing objects at the **bucket root** will survive the move to `/repo/`, because `aws s3 sync --delete` only prunes within its prefix. They will keep serving the old placeholder index at the root URL until deleted.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
fdroid-update.shwrites<repo-root>/config.ymlitself on every run, butonly sets
keystore,keystorepass,keypassandrepo_keyalias. It neversets
repo_url,repo_nameorrepo_description, so fdroidserver fallsback to its own placeholder template.
Measured from the live
index-v2.jsoninfdroid-weblib-dev:That is fdroidserver's stock demo text, not this repo. The "Add to F-Droid" /
fdroid.linkbutton on the generatedindex.htmlis built fromrepo_url,which is how bit noticed -- it points at
MyFirstFDroidRepo.org, not at thereal bucket. This is silently wrong: the publish succeeds while advertising
someone else's URL, which is worse than failing.
Fix: add
FDROID_REPO_URL/FDROID_REPO_NAME/FDROID_REPO_DESCRIPTIONenvironment variables (not new positionals -- the script already has five
plus pass-through extra args) that
fdroid-update.shwrites intoconfig.yml. Make the first two a hard error when unset, naming thevariable -- defaulting would just move the silent-wrong-value bug rather
than fix it.
FDROID_REPO_DESCRIPTIONmay stay optional.This is a breaking change to a public composite action's interface, which is
acceptable only because
weblib-vieweris the sole consumer and is updatedin the same piece of work.
@claude: close?
Fixed and merged
4a25e36, merged as760583b(PR #12). Consumer side wired in weblib-viewer#25.What changed:
fdroid-update.shnow requiresFDROID_REPO_URLandFDROID_REPO_NAME— a named hard error if either is missing — and writes them, plus the optionalFDROID_REPO_DESCRIPTION, into theconfig.ymlit generates. Required rather than defaulted, because the old failure mode was a publish that succeeded while advertisingMyFirstFDroidRepo.org: silently wrong, which is worse than not running.One thing found during implementation that was not in the original diagnosis, and that changes the URLs:
fdroidserver/common.py:662-664refuses to run anyfdroidcommand whenrepo_urldoes not end in the literal/repo, with no way to disable it.Both channels published to the bucket root, so neither spelling worked — a suffix-less URL makes fdroidserver refuse to start, a suffixed one names a path the bucket never served. Resolved by using
publish.sh's existing<prefix>argument so the tree is served under.../repo/.Tests: 104 passed / 4 skipped, up from 98/4. The new assertions cover a missing
FDROID_REPO_URL/FDROID_REPO_NAMEfailing, a URL without/repofailing,index-v2.jsoncarrying the configuredrepo.address/repo.name/repo.descriptionwith no placeholder text, and a name containing a single quote surviving the YAML round-trip.Live confirmation is still in flight — the dev publish triggered by weblib-viewer#25 is running, and the real check is reading
repo.addressback fromhttps://fdroid-weblib-dev.s3w.dev.chaosbit.de/repo/index-v2.json. Closing on the merged, unit-tested change; if that read comes back wrong I will reopen rather than leave it looking done.Also noted for whoever does it: the pre-existing objects at the bucket root will survive the move to
/repo/, becauseaws s3 sync --deleteonly prunes within its prefix. They will keep serving the old placeholder index at the root URL until deleted.