Bug 1607366

Summary: glibc: Add provides for command line tools
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: glibcAssignee: Carlos O'Donell <codonell>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: aoliva, arjun.is, codonell, dj, fweimer, igor.raits, law, mfabian, mhroncok, pfrankli, psabata, rth, siddhesh, vondruch
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-02 23:17:58 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:

Description Florian Weimer 2018-07-23 11:20:20 UTC
glibc currently ships tools such as getent and iconv which could be used by applications, without providing /usr/bin/getent and /usr/bin/iconv.  This means that packagers who want to make explicit the dependency on these tools cannot currently do so.

Comment 1 Miro Hrončok 2018-07-23 11:26:03 UTC
$ LANG=C.utf8 dnf install /usr/bin/iconv
Package glibc-common-2.27-19.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

Comment 2 Florian Weimer 2018-07-23 11:28:36 UTC
(In reply to Miro Hrončok from comment #1)
> $ LANG=C.utf8 dnf install /usr/bin/iconv
> Package glibc-common-2.27-19.fc28.x86_64 is already installed, skipping.
> Dependencies resolved.
> Nothing to do.
> Complete!

But:

$ rpm -q --provides glibc-common
config(glibc-common) = 2.26-28.fc27
glibc-common = 2.26-28.fc27
glibc-common(x86-64) = 2.26-28.fc27

So if a package requires /usr/bin/iconv, that can only be satisfied via the filelist file, which we generally avoid downloading, at least for the initial installation.

Comment 3 Vít Ondruch 2018-07-23 12:04:13 UTC
(In reply to Florian Weimer from comment #2)
> which we generally avoid downloading, at least for the
> initial installation.

Not sure about the initial installation, but DNF always downloads file lists no matter what [1]. And AFAIK, the /usr/bin files are part of the metadata, not part of the file list anyway.


[1] https://bugzilla.redhat.com/show_bug.cgi?id=968006

Comment 4 Igor Raits 2018-07-23 12:22:36 UTC
Why not to use BuildRequires: /usr/bin/iconv?

Comment 5 Florian Weimer 2018-07-23 12:29:35 UTC
(In reply to Igor Gnatenko from comment #4)
> Why not to use BuildRequires: /usr/bin/iconv?

My understanding is that the packaging guidelines strongly recommend avoiding pure file dependencies:

https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Dependencies

Comment 6 Igor Raits 2018-07-23 12:34:13 UTC
Whatever is in
- *bin/*
- /etc/*

Should be perfectly fine.

https://github.com/openSUSE/libsolv/blob/75d03059cdaf7770d2217fafaba6af732cd860ba/src/repodata.c#L1274-L1286

Comment 7 Florian Weimer 2018-07-23 12:46:45 UTC
(In reply to Igor Gnatenko from comment #6)
> Whatever is in
> - *bin/*
> - /etc/*
> 
> Should be perfectly fine.
> 
> https://github.com/openSUSE/libsolv/blob/
> 75d03059cdaf7770d2217fafaba6af732cd860ba/src/repodata.c#L1274-L1286

Oh.  Can we please put this into the packaging guidelines, if such dependencies are indeed acceptable?

Comment 8 Ben Cotton 2019-05-02 21:16:19 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Miro Hrončok 2019-05-02 23:17:58 UTC
> Oh.  Can we please put this into the packaging guidelines, if such dependencies are indeed acceptable?

That is already in for some time: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies