From Fedora Project Wiki

(the server sometimes gets crazy :-))
(Update the Fedora Easy karma documentation to the latest status quo.)
 
(22 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{autolang|base=yes}}
{{autolang|base=yes}}
{| style="float:right;"
<span id="fedora-easy-karma"></span>
! colspan="2" | Quick Links
= Fedora Easy Karma =
|-
 
|[http://fedorapeople.org/gitweb?p=till/public_git/fedora-easy-karma.git gitweb]
<span id="the-purpose-of-fedora-easy-karma"></span>
|}
== The purpose of Fedora Easy Karma ==
fedora-easy-karma allows you to easily portion out karma points for testing updates that you have currently installed. The typical workflow is as follows:
 
'''fedora-easy-karma''' is a console application that makes it easier to submit feedback for [https://bodhi.fedoraproject.org proposed updates] in a Fedora or EPEL testing repository, all from your command line.
 
It can automatically recognize any testing package that you have installed (it overrides the stable version), it gives you various pieces of information on the package, including other users’ comments, and it lets you easily comment and provide karma (evaluation) to that package. For more details on karma, check the ''Understanding package karma'' section.
 
<span id="how-to-enable-testing-packages-on-your-system"></span>
== How to enable testing packages on your system ==
 
In order to use Fedora Easy Karma, it is important that you have enabled ''testing packages'' (testing updates) on your system. Testing packages are newer version of applications, programs, or libraries, and they will eventually become a part of stable updates to the system.
 
By default, testing packages are not enabled on the system (except for Beta versions), so if you want to use them, you need to enable them explicitely. There are two ways to bring testing packages onto your system:
 
<span id="temporarily-enabling-the-testing-repository"></span>
=== Temporarily enabling the testing repository ===
 
You can temporarily enable the testing repository while you run the <code>dnf update</code> command. With this approach, you will only download and install new testing updates when you decide for it.
 
To make DNF installing testing updates, use
 
<pre class="[bash]">$ sudo dnf update --enablerepo=updates-testing --best</pre>
Note that when you do not use the <code>--enablerepo</code> argument in the future, DNF will not update the packages to their latest testing versions and your system could get into a situation when you will not have installed the newest testing packages, but you will not have installed the stable packages either, so you could be experiencing issues, especially if the particular versions of the packages you have installed were problematic.
 
To reset your system to the stable version of the packages, use
 
<pre class="[bash]">$ sudo dnf distro-sync</pre>
<span id="persistently-enabling-the-testing-repository"></span>
=== Persistently enabling the testing repository ===
 
You can persistently enable the testing repository and always update to the newest testing packages. When you enable them, you will be getting these new updates anytime you will use the <code>dnf update</code> command until you disable them again. With this approach, your Fedora will a step ahead of the stable Fedora, so you might experience issues with certain applications or packages. However, this is what testing is about, isn’t it?
 
To persistently enable the testing repository, use
 
<pre class="[bash]">$ sudo dnf config-manager setopt &quot;updates-testing.enabled=1&quot;</pre>
To disable the testing repositories, use the same command, but replace <code>enabled=1</code> with <code>enabled=0</code>. Also, it could be wise to distro sync your system afterwards.
 
Alternatively, you can use your package manager, such as ''Gnome Software'', ''KDE Discover'', or ''DNFdragora'' to enable or disable repositories.
 
<span id="understanding-package-karma"></span>
== Understanding package ''karma'' ==
 
Every new updated package arrives in a testing repository where it needs to spend some time (usually upto 14 days) before it can be moved into the ''stable'' repository. While being there, users can comment on the package and provide evaluation to it, the so called ''karma''.
 
The provided karma can be ''positive'', ''neutral'', or ''negative'' based on the user experience and testing of that particular package. While neutral karma does not affect the life of the package in the testing repository, both positive and negative karma does.
 
If a package gets a pre-defined number of positive karma (that depends on the packager’s decision), it will be made ready for a push into the stable repository and it does not have to wait out the grace period. On the other hand, when a package receives negative karma, the automated push is blocked and the packager either pushes the package manually, or they fix the problems and make a new build of the package and the process starts anew.
 
<span id="using-fedora-easy-karma"></span>
== Using Fedora Easy Karma ==


# install packages from [[QA/Updates_Testing|updates-testing]]: {{command|su -c 'yum --enablerepo<nowiki>=</nowiki>updates-testing update'}}
<span id="installing-and-running-fek"></span>
# Use these packages to identify breakage or directly run fedora-easy-karma and test packages according to the update notes
=== Installing and running FEK ===
# Run fedora-easy-karma


== Installation ==
''Fedora Easy Karma'' is not installed on the system by default, so you need to install it first. To do so, execute
You need version 0.4.0 or greater of {{package|fedora-packager}} to use this script. You can install {{package|fedora-easy-karma}} for any supported Fedora release by using the command: {{command|su -c 'yum --enablerepo<nowiki>=</nowiki>updates-testing install fedora-easy-karma'}}


== Example Output ==
<pre class="[bash]">$ sudo dnf install fedora-easy-karma</pre>
<pre>
When you have installed the application, you can run it from the console using
$ fedora-easy-karma --help
Usage: fedora-easy-karma [options] [pattern, ..]


You will be asked for every package installed from updates-testing to provide
<pre class="[bash]">$ fedora-easy-karma</pre>
feedback using karma points. If patterns are provided, you will be only prompted
The application will show you information about the packages, users’ comments related to it, and it will let you comment and provide karma. If you do not wish to comment and provide karma for this particular package, you can ''skip'' to a next package or you can ''ignore'' that package and move to the next one, until all the packages have been provided karma, skipped or ignored.
for updates related to packages or builds that match any of the patterns.
Possible wildcards are *, ?, [seq] and [!seq] as explained at
http://docs.python.org/library/fnmatch.html
After selecting the karma points, you will be asked for a comment. An empty
comment skips the update.


Possible karma points are:
When you skip the package, ''Fedora Easy Karma'' will ask about it next time you run it. If you ignore the package, ''Fedora Easy Karma'' will not ask you about it any longer until a newer version of that package is found on your system.
-1 : Update breaks something or does not fix a bug it is supposed to
0 : The update has not been tested much or at all
1 : The update seems not to break anything new
All other inputs will skip the update.
You can use <CTRL>-<D> on an empty prompt to exit
If you use a default comment, '<CTRL>-<X> <backspace>' can be used to delete the
default comment to easily enter a custom one.


The source can be found at
Note that in order to use ''Fedora Easy Karma'', you need to have a '''FAS account'''. If you do not have, create the account at [https://accounts.fedoraproject.org Fedora Accounts].
http://fedorapeople.org/gitweb?p=till/public_git/fedora-easy-karma.git;a=summary
Please send bug reports and feature requests to
'Till Maas <opensource@till.name>'
For patches please use 'git send-email'.


Options:
<span id="optional-arguments"></span>
  -h, --help            show this help message and exit
=== Optional arguments ===
  --bodhi-cached        Use cached bodhi query
  --bodhi-cachedir=BODHI_CACHEDIR
                        Directory to store bodhi cache, default: ~/.fedora-
                        easy-karma
  --bodhi-update-cache  Update bodhi query cache
  --critpath-only      Only consider unapproved critpath updates
  --debug              Enable debug output
  --default-comment=COMMENT
                        Default comment to use, default:
  --default-karma=KARMA
                        Default karma to use, default:
  --fas-username=FAS_USERNAME
                        FAS username
  --include-commented  Also ask for more comments on updates that already got
                        a comment from you, this is enabled if patterns are
                        provided
  --installed-max-days=DAYS
                        Only check packages installed within the last XX days,
                        default: 28
  --installed-min-days=DAYS
                        Only check packages installed for at least XX days,
                        default: 0
  --list-rpms-only      Only list affected rpms
  --no-skip-empty-comment
                        Do not skip update if comment is empty
  --product=PRODUCT    product to query Bodhi for, 'F' for Fedora, 'EL-' for
                        EPEL, default: F
  --releasever=RELEASEVER
                        releasever to query Bodhi for, default: releasever
                        from yum
  --retries=RETRIES    Number if retries when submitting a comment in case of
                        an error, default: 3
  --wrap-bugs          Apply line-wrapping to bugs
  --wrap-rpms          Apply line-wrapping to list of installed rpms
  --wrap-width=WRAP_WIDTH
                        Width to use for line wrapping of updates, default: 80
$ fedora-easy-karma
Getting list of installed packages...
Getting list of packages in updates-testing...
================================================================================
    fedora-easy-karma-0-0.7.20100709git561718c8.fc12
================================================================================
  Update ID: FEDORA-2010-11029
    Release: Fedora 12
    Status: testing
      Type: enhancement
      Karma: 1
      Notes: Introduce the --critpath-only parameter.
  Submitter: till
  Submitted: 2010-07-09 15:30:58
  Comments: bodhi - 2010-07-09 15:30:58 (karma 0)
            This update has been submitted for testing by till.
            bodhi - 2010-07-13 07:45:42 (karma 0)
            This update has been pushed to testing
            robatino (proventesters) - 2010-07-13 08:49:36 (karma 1)
            Seems to work properly.


  https://admin.fedoraproject.org/updates/F12/FEDORA-2010-11029
Using optional arguments, you can alter the default way ''Fedora Easy Karma'' behaves. Note, that the following list only shows the most often used arguments. For a complete list, use <code>--help</code> argument.


inst. RPMS: fedora-easy-karma-0-0.7.20100709git561718c8.fc12.noarch - Fedora update feedback made easy (installed 0 days ago)
{| class="wikitable"
|-
! Argument
! Meaning
|-
| <code>--help</code>
| Shows the help message.
|-
| <code>--datadir=DATADIR</code>
| Changes the location of the configuration directory. By default it is placed in <code>~/.config/fedora-easy-karma</code>
|-
| <code>--default-comment=COMMENT</code>
| Use this value as a default comment for each shown package.
|-
| <code>--default-karma=KARMA</code>
| Use this value as a default karma for each shown package.
|-
| <code>--no-color</code>
| Do not use color output. By default, some fields use color for better orientation, however they might not be well readable with some terminal palettes, and it might be necessary to switch them off.
|-
| <code>--installed-max-days=DAYS</code>
| Only include packages installed withing the last DAYS days.
|-
| <code>--installed-min-days=DAYS</code>
| Only include packages installed at least for DAYS days.
|-
| <code>--pages</code>
| Clear the terminal between packages so that only that particular package is shown at the terminal screen. This can help to increase readability of the output.
|-
| <code>--retries=RETRIES</code>
| How many times to retry to submit the comment if it fails.
|-
| <code>--skip-bodhi-comments</code>
| Disable comments provided by the Bodhi system. This increases the readability of the comments section significantly.
|-
| <code>--wrap-width=WIDTH</code>
| The length of the line after which the text will wrap. The default value is 80.
|}


Comment? -1/0/1 ->karma, other -> skip> 1
<span id="troubleshooting"></span>
Comment> It works perfectly.
=== Troubleshooting ===
FAS Password for till:
</pre>


== Example Workflows ==
If you experience problems with ''Fedora Easy Karma'', please consider reporting an issue at [https://pagure.io/fedora-easy-karma the project’s source page].
=== Update Everything, then look at updates and perform some direct testing ===
First update:
{{command|yum update --enablerepo<nowiki>=</nowiki>"*-testing"}}
The run fedora-easy-karma:
{{command|fedora-easy-karma}}
Now read the presented update information. If there is an update to would like to test, do it now in parallel, e.g. if it is a text editor, run it, open some files, edit something etc. If you are content with the application, enter "1" in fedora-easy-karma and describe what you did. If something broke, please file a bug report, enter "-1" in fedora-easy-karma and mention the bug in the comment. If you do not know how to test the package, just skip it hitting "Enter".


== Frequently Asked Questions ==
* Q: I just updated package foo from updates-testing, but when I run fedora-easy-karma, why I am not asked for feedback?
: A: The update for the package is probably already requested to become stable or maybe to be unpushed from testing. You will not be asked for feedback on such updates. If you found a new bug, please open a bug report instead.


== Source ==
[[Category:QA]]
Currently the source is available at a [http://fedorapeople.org/gitweb?p=till/public_git/fedora-easy-karma.git Fedorapeople git repository]

Latest revision as of 14:36, 30 January 2025

Fedora Easy Karma

The purpose of Fedora Easy Karma

fedora-easy-karma is a console application that makes it easier to submit feedback for proposed updates in a Fedora or EPEL testing repository, all from your command line.

It can automatically recognize any testing package that you have installed (it overrides the stable version), it gives you various pieces of information on the package, including other users’ comments, and it lets you easily comment and provide karma (evaluation) to that package. For more details on karma, check the Understanding package karma section.

How to enable testing packages on your system

In order to use Fedora Easy Karma, it is important that you have enabled testing packages (testing updates) on your system. Testing packages are newer version of applications, programs, or libraries, and they will eventually become a part of stable updates to the system.

By default, testing packages are not enabled on the system (except for Beta versions), so if you want to use them, you need to enable them explicitely. There are two ways to bring testing packages onto your system:

Temporarily enabling the testing repository

You can temporarily enable the testing repository while you run the dnf update command. With this approach, you will only download and install new testing updates when you decide for it.

To make DNF installing testing updates, use

$ sudo dnf update --enablerepo=updates-testing --best

Note that when you do not use the --enablerepo argument in the future, DNF will not update the packages to their latest testing versions and your system could get into a situation when you will not have installed the newest testing packages, but you will not have installed the stable packages either, so you could be experiencing issues, especially if the particular versions of the packages you have installed were problematic.

To reset your system to the stable version of the packages, use

$ sudo dnf distro-sync

Persistently enabling the testing repository

You can persistently enable the testing repository and always update to the newest testing packages. When you enable them, you will be getting these new updates anytime you will use the dnf update command until you disable them again. With this approach, your Fedora will a step ahead of the stable Fedora, so you might experience issues with certain applications or packages. However, this is what testing is about, isn’t it?

To persistently enable the testing repository, use

$ sudo dnf config-manager setopt "updates-testing.enabled=1"

To disable the testing repositories, use the same command, but replace enabled=1 with enabled=0. Also, it could be wise to distro sync your system afterwards.

Alternatively, you can use your package manager, such as Gnome Software, KDE Discover, or DNFdragora to enable or disable repositories.

Understanding package karma

Every new updated package arrives in a testing repository where it needs to spend some time (usually upto 14 days) before it can be moved into the stable repository. While being there, users can comment on the package and provide evaluation to it, the so called karma.

The provided karma can be positive, neutral, or negative based on the user experience and testing of that particular package. While neutral karma does not affect the life of the package in the testing repository, both positive and negative karma does.

If a package gets a pre-defined number of positive karma (that depends on the packager’s decision), it will be made ready for a push into the stable repository and it does not have to wait out the grace period. On the other hand, when a package receives negative karma, the automated push is blocked and the packager either pushes the package manually, or they fix the problems and make a new build of the package and the process starts anew.

Using Fedora Easy Karma

Installing and running FEK

Fedora Easy Karma is not installed on the system by default, so you need to install it first. To do so, execute

$ sudo dnf install fedora-easy-karma

When you have installed the application, you can run it from the console using

$ fedora-easy-karma

The application will show you information about the packages, users’ comments related to it, and it will let you comment and provide karma. If you do not wish to comment and provide karma for this particular package, you can skip to a next package or you can ignore that package and move to the next one, until all the packages have been provided karma, skipped or ignored.

When you skip the package, Fedora Easy Karma will ask about it next time you run it. If you ignore the package, Fedora Easy Karma will not ask you about it any longer until a newer version of that package is found on your system.

Note that in order to use Fedora Easy Karma, you need to have a FAS account. If you do not have, create the account at Fedora Accounts.

Optional arguments

Using optional arguments, you can alter the default way Fedora Easy Karma behaves. Note, that the following list only shows the most often used arguments. For a complete list, use --help argument.

Argument Meaning
--help Shows the help message.
--datadir=DATADIR Changes the location of the configuration directory. By default it is placed in ~/.config/fedora-easy-karma
--default-comment=COMMENT Use this value as a default comment for each shown package.
--default-karma=KARMA Use this value as a default karma for each shown package.
--no-color Do not use color output. By default, some fields use color for better orientation, however they might not be well readable with some terminal palettes, and it might be necessary to switch them off.
--installed-max-days=DAYS Only include packages installed withing the last DAYS days.
--installed-min-days=DAYS Only include packages installed at least for DAYS days.
--pages Clear the terminal between packages so that only that particular package is shown at the terminal screen. This can help to increase readability of the output.
--retries=RETRIES How many times to retry to submit the comment if it fails.
--skip-bodhi-comments Disable comments provided by the Bodhi system. This increases the readability of the comments section significantly.
--wrap-width=WIDTH The length of the line after which the text will wrap. The default value is 80.

Troubleshooting

If you experience problems with Fedora Easy Karma, please consider reporting an issue at the project’s source page.