Problem. The published dev repo advertises fdroidserver's stock
placeholder values. 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. ...
fdroid-update.sh writes <repo-root>/config.yml itself on every run, but
only sets keystore/keystorepass/keypass/repo_keyalias. It never sets repo_url/repo_name/repo_description, so fdroidserver falls back to its
own template. A publish that succeeds while advertising the wrong URL is
the worst outcome here -- it is how bit noticed, via the broken "Add to
F-Droid" button.
Change. Add FDROID_REPO_URL/FDROID_REPO_NAME/ FDROID_REPO_DESCRIPTION environment variables (not new positionals -- fdroid-update.sh already has five plus pass-through extra args, and more
positionals would be unreadable). The first two are now a hard
requirement: missing either one is a named, immediate error rather than a
silent fallback to the placeholder. FDROID_REPO_DESCRIPTION stays
optional. This is a breaking interface change, acceptable only because
weblib-viewer is this action's sole consumer and is updated in the same
piece of work: weblib-viewer#25 (stacked on this PR).
A second thing found while wiring this up, not assumed going in.
fdroidserver's own common.py unconditionally refuses to run any command
once config.yml sets repo_url at all, unless it ends in the literal
suffix /repo -- verified by reading the installed package
(common.py:662-664) and reproduced in the test suite. There is no flag to
disable it, and the value is embedded verbatim as repo.address in index-v2.json. So FDROID_REPO_URL has to end in /repo, and publish.sh's existing <prefix> argument has to put the published tree
under a URL path that actually ends in /repo to match -- publishing to
the bucket root with no prefix (today's setup) cannot satisfy this at all:
either repo_url lacks the suffix and fdroid update refuses to run, or
it has the suffix and points at a path the bucket never serves. This
README section spells it out and weblib-viewer#25 wires the matching publish.sh prefix.
Verification.run_tests.sh: 104 passed / 4 skipped (was 98/4;
the 4 skips are the opt-in live-bucket tests in test_publish.sh, unrelated
to this change). New assertions in test_fdroid_update.sh: the written config.yml carries repo_url/repo_name/repo_description; the
resulting index-v2.json has the right repo.address/repo.name/ repo.description and none of fdroidserver's placeholder text; a name with
an embedded single quote round-trips correctly through the YAML; the script
fails when FDROID_REPO_URL or FDROID_REPO_NAME is unset, and fails
(via fdroidserver itself) when FDROID_REPO_URL lacks the /repo suffix.
Not merging or arming auto-merge -- this repo has only main, so it needs
review the same way weblib-ci does.
See fdroid-repo-ci#11.
**Problem.** The published dev repo advertises fdroidserver's stock
placeholder values. 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. ...
```
`fdroid-update.sh` writes `<repo-root>/config.yml` itself on every run, but
only sets `keystore`/`keystorepass`/`keypass`/`repo_keyalias`. It never sets
`repo_url`/`repo_name`/`repo_description`, so fdroidserver falls back to its
own template. A publish that *succeeds* while advertising the wrong URL is
the worst outcome here -- it is how bit noticed, via the broken "Add to
F-Droid" button.
**Change.** Add `FDROID_REPO_URL`/`FDROID_REPO_NAME`/
`FDROID_REPO_DESCRIPTION` environment variables (not new positionals --
`fdroid-update.sh` already has five plus pass-through extra args, and more
positionals would be unreadable). The first two are now a **hard
requirement**: missing either one is a named, immediate error rather than a
silent fallback to the placeholder. `FDROID_REPO_DESCRIPTION` stays
optional. **This is a breaking interface change**, acceptable only because
weblib-viewer is this action's sole consumer and is updated in the same
piece of work: weblib-viewer#25 (stacked on this PR).
**A second thing found while wiring this up, not assumed going in.**
fdroidserver's own `common.py` unconditionally refuses to run *any* command
once `config.yml` sets `repo_url` at all, unless it ends in the literal
suffix `/repo` -- verified by reading the installed package
(`common.py:662-664`) and reproduced in the test suite. There is no flag to
disable it, and the value is embedded verbatim as `repo.address` in
`index-v2.json`. So `FDROID_REPO_URL` has to end in `/repo`, and
`publish.sh`'s existing `<prefix>` argument has to put the published tree
under a URL path that actually ends in `/repo` to match -- publishing to
the bucket root with no prefix (today's setup) cannot satisfy this at all:
either `repo_url` lacks the suffix and `fdroid update` refuses to run, or
it has the suffix and points at a path the bucket never serves. This
README section spells it out and weblib-viewer#25 wires the matching
`publish.sh` prefix.
**Verification.** `run_tests.sh`: **104 passed / 4 skipped** (was 98/4;
the 4 skips are the opt-in live-bucket tests in `test_publish.sh`, unrelated
to this change). New assertions in `test_fdroid_update.sh`: the written
`config.yml` carries `repo_url`/`repo_name`/`repo_description`; the
resulting `index-v2.json` has the right `repo.address`/`repo.name`/
`repo.description` and none of fdroidserver's placeholder text; a name with
an embedded single quote round-trips correctly through the YAML; the script
fails when `FDROID_REPO_URL` or `FDROID_REPO_NAME` is unset, and fails
(via fdroidserver itself) when `FDROID_REPO_URL` lacks the `/repo` suffix.
Not merging or arming auto-merge -- this repo has only `main`, so it needs
review the same way weblib-ci does.
The published repo advertised fdroidserver's own demo values
(repo.address "https://MyFirstFDroidRepo.org/fdroid/repo", repo.name "My
First F-Droid Repo Demo") because fdroid-update.sh wrote config.yml itself
but never set repo_url/repo_name/repo_description, so fdroidserver fell
back to its template. The "Add to F-Droid" button on the generated
index.html is built from repo_url, which is how bit noticed. A publish
that succeeds while advertising the wrong URL is silently wrong -- worse
than a failed job.
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). The first two are now a hard requirement, naming
the missing one; FDROID_REPO_DESCRIPTION stays optional. This is a breaking
change to a public composite action's interface, acceptable only because
weblib-viewer is the sole consumer and is updated in the same change
(weblib-viewer#26).
Also discovered while wiring this up and worth recording since it
contradicts the "no /fdroid/repo suffix" assumption in weblib's working
notes: fdroidserver's own common.py unconditionally refuses to run once
config.yml sets repo_url at all, unless it ends in the literal suffix
"/repo" -- there is no flag to disable that check, and the value is
embedded verbatim as repo.address. So FDROID_REPO_URL has to end in /repo,
and publish.sh's existing <prefix> argument has to put the published tree
under a URL path that actually ends in /repo to match, or fdroid update
refuses to run at all (checked positive) / the address points at a path
the bucket never serves (checked against the live fdroid-weblib-dev bucket
layout).
Extends test_fdroid_update.sh: config.yml carries the values, the resulting
index-v2.json has the right repo.address/name/description (not
fdroidserver's placeholder), a name with an embedded single quote survives
the YAML round-trip, and the script fails when FDROID_REPO_URL or
FDROID_REPO_NAME is absent or FDROID_REPO_URL lacks the /repo suffix.
run_tests.sh: 104 passed / 4 skipped (was 98/4).
Filed as fdroid-repo-ci#11.
Co-authored-by: bit <bit@das-labor.org>
claude
requested review from bit 2026-09-09 20:23:45 +00:00
claude
added a new dependency 2026-09-09 20:26:28 +00:00
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.
See fdroid-repo-ci#11.
Problem. The published dev repo advertises fdroidserver's stock
placeholder values. Measured from the live
index-v2.jsoninfdroid-weblib-dev:fdroid-update.shwrites<repo-root>/config.ymlitself on every run, butonly sets
keystore/keystorepass/keypass/repo_keyalias. It never setsrepo_url/repo_name/repo_description, so fdroidserver falls back to itsown template. A publish that succeeds while advertising the wrong URL is
the worst outcome here -- it is how bit noticed, via the broken "Add to
F-Droid" button.
Change. Add
FDROID_REPO_URL/FDROID_REPO_NAME/FDROID_REPO_DESCRIPTIONenvironment variables (not new positionals --fdroid-update.shalready has five plus pass-through extra args, and morepositionals would be unreadable). The first two are now a hard
requirement: missing either one is a named, immediate error rather than a
silent fallback to the placeholder.
FDROID_REPO_DESCRIPTIONstaysoptional. This is a breaking interface change, acceptable only because
weblib-viewer is this action's sole consumer and is updated in the same
piece of work: weblib-viewer#25 (stacked on this PR).
A second thing found while wiring this up, not assumed going in.
fdroidserver's own
common.pyunconditionally refuses to run any commandonce
config.ymlsetsrepo_urlat all, unless it ends in the literalsuffix
/repo-- verified by reading the installed package(
common.py:662-664) and reproduced in the test suite. There is no flag todisable it, and the value is embedded verbatim as
repo.addressinindex-v2.json. SoFDROID_REPO_URLhas to end in/repo, andpublish.sh's existing<prefix>argument has to put the published treeunder a URL path that actually ends in
/repoto match -- publishing tothe bucket root with no prefix (today's setup) cannot satisfy this at all:
either
repo_urllacks the suffix andfdroid updaterefuses to run, orit has the suffix and points at a path the bucket never serves. This
README section spells it out and weblib-viewer#25 wires the matching
publish.shprefix.Verification.
run_tests.sh: 104 passed / 4 skipped (was 98/4;the 4 skips are the opt-in live-bucket tests in
test_publish.sh, unrelatedto this change). New assertions in
test_fdroid_update.sh: the writtenconfig.ymlcarriesrepo_url/repo_name/repo_description; theresulting
index-v2.jsonhas the rightrepo.address/repo.name/repo.descriptionand none of fdroidserver's placeholder text; a name withan embedded single quote round-trips correctly through the YAML; the script
fails when
FDROID_REPO_URLorFDROID_REPO_NAMEis unset, and fails(via fdroidserver itself) when
FDROID_REPO_URLlacks the/reposuffix.Not merging or arming auto-merge -- this repo has only
main, so it needsreview the same way weblib-ci does.