diff --git a/module.nix b/module.nix index 14359c4..e7204f5 100644 --- a/module.nix +++ b/module.nix @@ -34,11 +34,13 @@ let repo_name: ${cfg.repoName} repo_description: ${cfg.repoDescription} repo_keyalias: ${cfg.keyAlias} - # fdroidserver checks this path for existence relative to the cwd `fdroid - # update` runs in (stateDir), then copies it into repo/icons/ under its - # own basename — so this is deliberately already that destination path, - # which the sync script keeps populated before every run. - repo_icon: repo/icons/icon.png + # fdroidserver's legacy index builder checks this path for existence + # relative to the cwd `fdroid update` runs in (stateDir) and then + # `shutil.copyfile`s it into repo/icons/ under its own basename — which + # raises SameFileError if source and destination are the same path. So + # this has to name a *source* file outside repo/icons/, kept at + # ${cfg.stateDir}/icon.png by the sync script below. + repo_icon: icon.png keystore: ${cfg.keystoreFile} keystorepass: {env: FDROID_KEYSTORE_PASS} keypass: {env: FDROID_KEY_PASS} @@ -76,7 +78,9 @@ let install -m 0600 ${repoConfig} ${cfg.stateDir}/config.yml # Kept populated every run rather than once, so an icon change here # propagates on the next sync without anyone having to touch the server. - install -D -m 0644 ${cfg.repoIcon} ${cfg.stateDir}/repo/icons/icon.png + # Lives next to repo/, not inside repo/icons/ itself — see repo_icon + # above for why that distinction matters. + install -m 0644 ${cfg.repoIcon} ${cfg.stateDir}/icon.png exec ${pythonEnv}/bin/python3 ${./fdroid-sync.py} ${syncConfig} "$@" '';