Bug 2054043

Summary: [RFE] No package provides /usr/bin/mkpasswd
Product: Red Hat Enterprise Linux 9 Reporter: Mattias Ellert <mattias.ellert>
Component: whoisAssignee: Petr Menšík <pemensik>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: high Docs Contact: Šárka Jana <sjanderk>
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jorton, jwboyer, ppisar, psklenar
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: whois-5.5.9-4.el9 Doc Type: Enhancement
Doc Text:
.The password encryption function is now available in `whois` The `whois` package now provides the `/usr/bin/mkpasswd` binary, which you can use to encrypt a password with the `crypt` C library interface.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:18:23 UTC Type: Feature Request
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:    
Bug Blocks: 2058423    
Deadline: 2022-05-16   

Description Mattias Ellert 2022-02-14 05:27:44 UTC
Description of problem:

/usr/bin/mkpasswd exists in two versions - one provided by expect and one provided by whois. These two SRPMS in RHEL 9 both assume that /usr/bin/mkpasswd is provided by the other, resulting in that the binary is provided by none of them.

https://git.centos.org/rpms/expect/blob/c9-beta/f/SPECS/expect.spec#_134

# rename mkpasswd, as it collides with more powerful variant from whois package (bug 1649456)
mv "$RPM_BUILD_ROOT"%{_bindir}/mkpasswd "$RPM_BUILD_ROOT"%{_bindir}/mkpasswd-expect
mv "$RPM_BUILD_ROOT"%{_mandir}/man1/mkpasswd.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/mkpasswd-expect.1
sed -i 's/mkpasswd/mkpasswd-expect/g;s/MKPASSWD/MKPASSWD-EXPECT/g' "$RPM_BUILD_ROOT"%{_mandir}/man1/mkpasswd-expect.1
sed -i 's/mkpasswd/mkpasswd-expect/g' "$RPM_BUILD_ROOT"%{_bindir}/mkpasswd-expect

https://git.centos.org/rpms/whois/blob/c9-beta/f/SPECS/whois.spec#_1

# Package mkpasswd tool
	
%if 0%{?rhel}
%{bcond_with whois_enables_mkpasswd}
%else
%{bcond_without whois_enables_mkpasswd}
%endif

Please fix this so thet /usr/bin/mkpasswd is provided by one of them (preferably by whois).

Version-Release number of selected component (if applicable):

whois-5.5.9-3.el9
(expect-5.45.4-15.el9)

How reproducible:

Always

Steps to Reproduce:
1. dnf install /usr/bin/mkpasswd
2. (or try to install a package with Requires: /usr/bin/mkpasswd)

Actual results:

Failure

Expected results:

Success

Comment 1 Petr Menšík 2022-02-25 17:44:06 UTC
Oh, indeed. mkpasswd were provided by expect in RHEL8, but it has renamed to mkpasswd-expect in later packages.

However mkpasswd in whois is disabled on RHEL 8 and 9. It seems not required, because it only depends on libxcrypt library available also on RHEL9. It seems nothing blocks us from building also mkpasswd.

Comment 6 Petr Menšík 2022-04-12 06:22:45 UTC
Enabling it is just matter of enabling bcond whois_enables_mkpasswd for RHEL 9+. Then release engineering has to ensure it would end in correct repository. I would say AppStream is optimal target repository.

Comment 16 errata-xmlrpc 2022-11-15 10:18:23 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 (whois bug fix and enhancement update), 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/RHEA-2022:8079