Bug 1676891

Summary: RFE to allow for better stats gathering
Product: Red Hat Enterprise Linux 8 Reporter: Daniel Mach <dmach>
Component: dnfAssignee: Michal Domonkos <mdomonko>
Status: CLOSED ERRATA QA Contact: Luca Berton <lberton>
Severity: high Docs Contact: Katerina Nemcova <knemcova>
Priority: high    
Version: 8.1CC: amatej, bcotton, extras-qa, hasuzuki, james.antill, jberan, jblazek, jperrin, lberton, mblaha, mdomonko, mhatina, packaging-team-maint, rpm-software-management, tbowling, vmukhame
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libdnf-0.38.1-1.el8 Doc Type: Enhancement
Doc Text:
.`User-Agent` header string now includes information read from the `/etc/os-release` file With this enhancement, the `User-Agent` header string, which is normally included with the HTTP requests made by DNF, has been extended with information read from the `/etc/os-release` file. To obtain more information, see `user_agent` in the `dnf.conf(5)` man page.
Story Points: ---
Clone Of: 1647454 Environment:
Last Closed: 2020-04-28 16:47:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1647454, 1681084    
Bug Blocks: 1755139    

Description Daniel Mach 2019-02-13 14:13:47 UTC
This requirement comes from Fedora to enable better stats gathering on metalink servers and mirrors.


Fedora Change: https://fedoraproject.org/wiki/Changes/DNF_Better_Counting


The change consists of 2 parts:
- User-Agent change
- countme feature


User-Agent
----------

Schemas:
libdnf/$libdnf_version ($NAME $VERSION_ID; Linux.$basearch)
libdnf/$libdnf_version ($NAME $VERSION_ID; $VARIANT_ID; Linux.$basearch)

Examples:
libdnf/0.26.0 (Fedora 29; Linux.x86_64)
libdnf/0.26.0 (Fedora 29; server; Linux.x86_64)
libdnf/0.26.0 (Red Hat Enterprise Linux 7.6; workstation; Linux.x86_64)


Countme
-------
Add a new 'countme' option to repo configs, for example:
[fedora]
countme = 1

Create a new dnf sub-command to trigger the countme feature:
$ dnf countme
Iterate through all repos:
if countme == 1:
   GET($url?countme=1)
   where $url is first available from [metalink, mirrorlist, baseurl]
   # consider using HEAD instead of GET

Create a systemd timer triggering the `dnf countme` command periodically

Comment 23 Terry Bowling 2019-12-06 13:36:10 UTC
After further discussion, it was decided that this should be included in the release notes to ensure full disclosure and trust from users. It should be noted that great care was taken to ensure that this is not user identifiable information and is less detailed than common Web Browser user agent reporting, as well as less detail than other popular linux distributions collect from update repositories.

Additionally documentation should included instructions on how this can be disabled in the yum configuration.

Comment 33 errata-xmlrpc 2020-04-28 16:47:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1823