Source: forgejo-cli Version: 0.3.0-2 Severity: serious Tags: FTBFS, patch Dear forgejo-cli maintainer, The package forgejo-cli build failed on riscv64.The crucial buildd log below: ```
debian/rules execute_after_dh_auto_install make[1]: Entering directory '/build/reproducible-path/forgejo-cli-0.3.0' # bash-completion mkdir -p debian/forgejo-cli/usr/share/bash-completion/completions debian/forgejo-cli/usr/bin/fj completion bash > debian/forgejo-cli/usr/share/bash-completion/completions/fj keys file not found, creating Error: Permission denied (os error 13) Location: src/keys.rs:43:9 make[1]: *** [debian/rules:12: execute_after_dh_auto_install] Error 1 make[1]: Leaving directory '/build/reproducible-path/forgejo-cli-0.3.0' make: *** [debian/rules:4: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2 ``` The full buildd log is here: https://buildd.debian.org/status/fetch.php?pkg=forgejo-cli&arch=riscv64&ver=0.3.0-2&stamp=1746652984&raw=0 My solution to this issue: The problem arises because `forgejo-cli` (specifically the `fj` binary) attempts to create a user-specific keys file (as indicated by `keys file not found, creating` and the error at `src/keys.rs:43:9`) when its `completion` subcommand is invoked. This is problematic in a sandboxed build environment where write access to typical user configuration paths is denied.The issue can be worked around in `debian/rules` by temporarily setting the `HOME`, `XDG_CONFIG_HOME`, and `XDG_DATA_HOME` environment variables to a temporary, writable directory before running the `fj completion` commands. This ensures any attempted file writes are contained and can be cleaned up.The debdiff patch is in the attachment.I have tested that locally,and it works well.Please let me know whether this solution can be accepted. Gui-Yue Best Regards
fix_forgejo-cli_permission_denied.patch
Description: Binary data