This is a repeat of bug 1503048 which was closed as not-a-bug. However other shells do not follow the same behaviour. So either the ksh package is wrong or the other shell packages are wrong. Description of problem: In Fedora 27 the command "dnf provides /bin/ksh" does not find any results where as on 26 and below the command returns the ksh package as expected. This problem causes packages that require /bin/ksh to fail installation. As many scripts involve /bin/ksh this gets listed as a requirement for packages, which then fail to install. Version-Release number of selected component (if applicable): ksh-20120801-41.fc27.x86_64 How reproducible: Steps to Reproduce: dnf provides /bin/sh dnf provides /bin/bash dnf provides /bin/zsh dnf provides /bin/ksh Actual results: All commands report their respective packages except for ksh # dnf provides /bin/sh bash-4.4.12-12.fc27.x86_64 : The GNU Bourne Again shell Repo : @System Matched from: Provide : /bin/sh bash-4.4.12-12.fc27.x86_64 : The GNU Bourne Again shell Repo : fedora Matched from: Provide : /bin/sh # dnf provides /bin/bash Last metadata expiration check: 0:30:46 ago on Tue 14 Nov 2017 12:34:55 PM EST. bash-4.4.12-12.fc27.x86_64 : The GNU Bourne Again shell Repo : @System Matched from: Provide : /bin/bash bash-4.4.12-12.fc27.x86_64 : The GNU Bourne Again shell Repo : fedora Matched from: Provide : /bin/bash # dnf provides /bin/ksh Last metadata expiration check: 0:32:12 ago on Tue 14 Nov 2017 12:34:55 PM EST. Error: No Matches found Expected results: Expect that the ksh package would work the same as bash, zsh, tcsh, etc.. Additional info:
(In reply to arif from comment #0) > This problem causes packages that require /bin/ksh to fail installation. Please provide the list of packages that require /bin/ksh. I see no such packages in the official Fedora repos: % sudo dnf repoquery --whatrequires /bin/ksh Last metadata expiration check: 0:00:24 ago on Wed 15 Nov 2017 09:57:25 AM CET. > As many scripts involve /bin/ksh this gets listed as a requirement for > packages, which then fail to install. You are mixing apples and oranges here. If a script contains /bin/ksh in its shebang, it does not mean that the package owning the script needs to require /bin/ksh. Such packages need to be fixed to require the ksh package instead.
Not in official repo, but Zfs on Linux do require it: # dnf -y system-upgrade download --releasever=27 Fedora 27 - x86_64 - Updates 2.3 MB/s | 7.5 MB 00:03 Failed to synchronize cache for repo 'zfs', disabling. Last metadata expiration check: 0:00:00 ago on Wed 15 Nov 2017 08:43:20 PM CET. Error: Problem: package zfs-dkms-0.7.3-1.fc26.noarch requires /bin/ksh, but none of the providers can be installed - ksh-20120801-35.fc26.x86_64 does not belong to a distupgrade repository - problem with installed package zfs-dkms-0.7.3-1.fc26.noarch [root@tux ~]# rpm -q ksh ksh-20120801-35.fc26.x86_64 On Fedora26: # dnf provides /bin/ksh ... ksh-20120801-35.fc26.x86_64 : The Original ATT Korn Shell Repo : @System Matched from: Filename : /bin/ksh On Fedora27: # dnf provides /bin/ksh ... Error: No Matches found Could this be fixed?
Please file a bug against Zfs on Linux wherever you got it from.
(In reply to Kamil Dudka from comment #3) > Please file a bug against Zfs on Linux wherever you got it from. ??? Why can't this be fixed? The ksh package in 27 behaves in another way than it did in 26. Why has this been changed?
(In reply to Lars E. Pettersson from comment #4) > Why can't this be fixed? I am not saying that we cannot introduce a virtual Provides for /bin/ksh but it is not in contradiction with fixing the packages that require it for historical reasons. Did you file the bug? > The ksh package in 27 behaves in another way than > it did in 26. Why has this been changed? It must have been side effect of the following change: https://src.fedoraproject.org/cgit/rpms/ksh.git/commit/?id=9bad5ead
(In reply to Kamil Dudka from comment #5) > Did you file the bug? Not yet. > It must have been side effect of the following change: > > https://src.fedoraproject.org/cgit/rpms/ksh.git/commit/?id=9bad5ead OK, but why is ksh treated in another way than other shells? They seem to end up in /bin, why not also ksh? Or am I missing something?
Since Fedora 17, /bin is just a symlink to /usr/bin. So, if /usr/bin/ksh is available on your system, /bin/ksh must be available, too. It is just RPM dependencies (requires/provides) what makes ksh different between Fedora 26 and Fedora 27.
(In reply to Kamil Dudka from comment #7) > It is just RPM > dependencies (requires/provides) what makes ksh different between Fedora 26 > and Fedora 27. Yes, and that seem to break things. There is a difference between the shells though. $ yum provides /bin/bash /usr/bin/bash ... Repo : @System Matched from: Filename : /usr/bin/bash Provide : /bin/bash and $ yum provides /bin/ksh /usr/bin/ksh ... Repo : updates Matched from: Filename : /usr/bin/ksh So bash has the filename /usr/bin/bash and provides /bin/bash. ksh only has a filename of /usr/bin/ksh, but no provide of /bin/ksh csh and tcsh behaves as bash (having both filename and provide), dash only has a filename of /bin/dash So ksh and dash seem to be odd-balls right now, in regards to how shell rpm:s handle provides.
The point is that file dependencies should be avoided whenever possible anyway: https://fedoraproject.org/wiki/Packaging:Guidelines#File_and_Directory_Dependencies You did not tell us why Zfs on Linux needs to depend on /bin/ksh instead of ksh.
(In reply to Kamil Dudka from comment #9) > The point is that file dependencies should be avoided whenever possible > anyway: Avoided, yes, but it does not say "not allowed", i.e. they should be setup in such a way that one could use filename dependency solving, if asked for it. My point is that ksh behaves in another way than the other shells, except dash, for filename dependency solving, as I pointed out in comment #8. The other shells, except dash, will be shown as a provider if one ask them for /bin/<shell> or /usr/bin/<shell>. ksh will only be shown as a provider if one asks for /usr/bin/ksh I.e. could the /bin/ksh provide be added? As has been done with bash, csh, and tcsh? > You did not tell us why Zfs on Linux needs to depend on /bin/ksh instead of > ksh. I'm a user of ZFS for Linux and have no clue whatsoever why they have that dependency or why it is used in the way that it is used. But /bin/<shell> has been the normal place for shells for decades.
(In reply to Lars E. Pettersson from comment #10) > I.e. could the /bin/ksh provide be added? I think it could. > I'm a user of ZFS for Linux and have no clue whatsoever why they have that > dependency or why it is used in the way that it is used. I wonder why a file system implementation requires ksh in the first place. > But /bin/<shell> has been the normal place for shells for decades. It still is if you talk about file system layout. It is not when you talk about RPM dependencies. The cited policy from Fedora Packaging Guidelines has not been changed (at least) since the first import in 2008.
(In reply to Kamil Dudka from comment #11) > (In reply to Lars E. Pettersson from comment #10) > > I.e. could the /bin/ksh provide be added? > > I think it could. $ grep Provides bash.spec ksh.spec bash.spec:Provides: /bin/sh bash.spec:Provides: /bin/bash I.e. add Provides: /bin/ksh to ksh.spec
(In reply to Lars E. Pettersson from comment #12) > I.e. add > Provides: /bin/ksh > > to ksh.spec That is what I meant by "virtual Provides for /bin/ksh" in comment #5.
I filed this bug and yes we need to fix the dependant packages if possible. However I would argue that the traditional system shells have a special status. The standard place to find them is in /bin and the ksh package itself does add /bin/ksh to /etc/shells. The Fedora Packaging Guidelines says "Things that history has placed into /bin, /sbin, /lib, or /lib64 should be listed in the %files section as being in those directories." or use a "Virtual Provides" statement. So adding a "virtual provides" would be perfect.
Could we expect to see an updated ksh package soon? Making it work they way as the majority of the other shells do? I mean, it's just a one-liner. Would be appreciated.
(In reply to Kamil Dudka from comment #3) > Please file a bug against Zfs on Linux wherever you got it from. FYI... https://github.com/zfsonlinux/zfs/issues/6878
ksh-20120801-43.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2094282f35
ksh-20120801-43.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2094282f35
The latest ksh package in testing works great. Thanks.
Thank you. Now it works as expected! Feedback left at Bohdi.
ksh-20120801-43.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.