Bug 1488934 - please require coreutils instead of /bin/chmod
Summary: please require coreutils instead of /bin/chmod
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-06 13:27 UTC by Kamil Dudka
Modified: 2017-09-07 19:04 UTC (History)
7 users (show)

Fixed In Version: sudo-1.8.20p2-4.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-07 14:56:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 979518 0 unspecified CLOSED sudo spec file does not contain requires(post) entry for used chmod command 2021-02-22 00:41:40 UTC

Internal Links: 979518

Description Kamil Dudka 2017-09-06 13:27:57 UTC
Description of problem:
Since Fedora 17, executables (like chmod) are installed to /usr/bin:
https://fedoraproject.org/wiki/Features/UsrMove

Please make sudo require the actually installed /usr/bin/chmod binary instead of the virtual provide /bin/chmod which was temporarily introduced in coreutils to ease the transition.


Version-Release number of selected component (if applicable):
sudo-1.8.20p2-1.fc26


Steps to Reproduce:
1. dnf install --allowerasing coreutils-single
2. dnf reinstall sudo


Actual results:
Error: package sudo-1.8.20p2-1.fc26.x86_64 requires /bin/chmod, but none of the providers can be installed


Additional info:
The fix is trivial:
--- a/sudo.spec
+++ b/sudo.spec
@@ -12,7 +12,7 @@ Source1: sudoers
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires: /etc/pam.d/system-auth
 Requires: /usr/bin/vi
-Requires(post): /bin/chmod
+Requires(post): /usr/bin/chmod

 BuildRequires: pam-devel
 BuildRequires: groff

Comment 1 Matthew Miller 2017-09-06 13:31:11 UTC
Is there any reason to not just require coreutils and drop as many file deps as possible? File deps cause a lot of extra metadata to be required, and I'd like to migrate away from them.

Comment 2 Kamil Dudka 2017-09-06 14:50:18 UTC
(In reply to Matthew Miller from comment #1)
> Is there any reason to not just require coreutils and drop as many file deps
> as possible?

Not that I know of.  This would certainly fix the bug, too.

Comment 3 Daniel Kopeček 2017-09-06 15:08:06 UTC
(In reply to Kamil Dudka from comment #2)
> (In reply to Matthew Miller from comment #1)
> > Is there any reason to not just require coreutils and drop as many file deps
> > as possible?
> 
> Not that I know of.  This would certainly fix the bug, too.

Me neither. It's probably just to explicitly state that only chmod is needed whatever the source package is. So, if the package dependency is preferred, let's fix it that way.

Comment 4 Kamil Dudka 2017-09-06 16:38:13 UTC
Works for me.

Comment 5 Matthew Miller 2017-09-06 17:06:36 UTC
What's the timeframe for this? Is it okay in rawhide only? Should it be pulled back to f27 and f26, too?

Comment 6 Kamil Dudka 2017-09-06 18:48:26 UTC
I cannot image where the proposed change could cause any problems.  But fixing just rawhide is also fine...

Comment 7 Matthew Miller 2017-09-06 20:09:39 UTC
Well, I guess the issue might be with coreutils vs coreutils-single -- and we could use rich deps for that (Requires: "coreutils or coreutils-single") but not in older releases.

Comment 8 Kamil Dudka 2017-09-07 07:16:27 UTC
(In reply to Matthew Miller from comment #7)
> Well, I guess the issue might be with coreutils vs coreutils-single -- and
> we could use rich deps for that (Requires: "coreutils or coreutils-single")
> but not in older releases.

Not really.  coreutils-single provides coreutils.  It is a drop-in replacement.

% rpm -q coreutils-single --provides
coreutils = 8.27-16.fc27
coreutils-single = 8.27-16.fc27
coreutils-single(x86-64) = 8.27-16.fc27
libstdbuf.so.single()(64bit)

Comment 9 Matthew Miller 2017-09-07 14:56:02 UTC
Okay then. No problem. :)


Note You need to log in before you can comment on or make changes to this bug.