#fedora #update #feedback #command-line #test-cases #bodhi

app fedora-update-feedback

Provide feedback for Fedora updates (inspired by fedora-easy-karma)

35 releases (14 stable)

2.1.4 Apr 7, 2024
2.1.3 Nov 14, 2023
2.1.2 Apr 10, 2023
2.1.1 Mar 14, 2023
0.5.1 Mar 28, 2020

#316 in Command line utilities

Download history 46/week @ 2024-07-28 49/week @ 2024-09-22 16/week @ 2024-09-29

1,789 downloads per month

MIT/Apache

70KB
1.5K SLoC

fedora-update-feedback

crates.io crates.io crates.io docs.rs

This project is inspired by fedora-easy-karma, but with more features.

It allows submitting feedback for bugs and test cases in addition to providing a comment and karma.

By default, all updates in the testing state that the user has not submitted themselves or has already commented on are presented, sorted by ascending submission date (so, oldest to most recent update).

requirements

The program assumes that the dnf and rpm binaries are present on the system (which is probably a reasonable assumption for a CLI tool targeted at fedora users).

It also expects a config file at ~/.config/fedora.toml, with at least the following contents:

[FAS]
username = "USERNAME"

If this file is not present, the legacy ~/.fedora.upn file is used as a fallback mechanism.

If both files are not present, the username has to be specified with the --username USERNAME CLI switch.

The username is used to authenticate with bodhi, and to filter out updates that the user themselves has submitted, or has already commented on.

features

By default, fedora-update-feedback queries bodhi for updates for the current release that are in the testing state.

Some additional options can be set either on the command line, or in a [fedora-update-feedback] section in the ~/.config/fedora.toml configuration file.

With the --check-pending CLI switch or the check-pending = true configuration option, updates in the pending state are also queried (for example, if the user has manually installed builds from koji and wants to give bodhi feedback for those as well).

Additionally, with the --check-obsoleted and --check-unpushed flags (or the check-obsoleted = true and check-unpushed configuration options), fedora-update-feedback will check if any lingering builds from unpushed or obsoleted updates are still installed locally.

With the save-password = true configuration option, fedora-update-feedback will attempt to securely save the FAS password in the login keyring, so it does not have to be entered every time. To ignore or overwrite a stored password, use the --ignore-keyring CLI switch.

This information is also printed when running fedora-update-feedback --help.

installation

RPM packages:

RPM packages are now available from the official fedora repositories.

Compiling manually:

To compile the program, first install cargo (the build tool, also pulls in the Rust compiler) and openssl-devel (used by the OpenSSL rust bindings).

To download, build, and install the latest version from https://crates.io, just run cargo install fedora-update-feedback.

To build from the sources provided on https://github.com, download the sources (recommended: tarball of the latest release from GitHub), and easily build and install the binary for yourself by running cargo install --path . in the source directory.

Either way, cargo will install the binary into ~/.cargo/bin by default.

To make it available in $PATH, either copy it into $HOME/.local/bin, or add ~/.cargo/bin to your $PATH (probably by editing ~/.bash_profile).

development + debugging

By default, no "structured" log messages from fedora-update-feedback or any of the invoked libraries should be visible when running fedora-update-feedback. For debugging and development purposes, they can be turned on by setting the FUF_LOG environment variable:

FUF_LOG=debug cargo run

TODO

  • I'd like to improve the "visual quality" of the terminal output and pretty-printed data, which should be easy.

  • It would be great to add additional switches and arguments to the binary (for example, sorting updates by a different value than submission date).

Dependencies

~23–39MB
~651K SLoC