RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1949289 - clevis-systemd is using ncat but has dependency set on nc but uses ncat
Summary: clevis-systemd is using ncat but has dependency set on nc but uses ncat
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: clevis
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Sergio Correia
QA Contact: Martin Zelený
Khushbu Borole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-13 21:17 UTC by James Hartsock
Modified: 2022-05-10 14:24 UTC (History)
5 users (show)

Fixed In Version: clevis-15-3.el8
Doc Type: Enhancement
Doc Text:
.`clevis-systemd` no longer depends on `nc` With this enhancement, the `clevis-systemd` package no longer depends on the `nc` package. The dependency did not work correctly when used with Extra Packages for Enterprise Linux (EPEL).
Clone Of:
Environment:
Last Closed: 2022-05-10 13:52:43 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5961491 0 None None None 2021-04-13 21:41:06 UTC
Red Hat Product Errata RHBA-2022:1857 0 None None None 2022-05-10 13:52:53 UTC

Description James Hartsock 2021-04-13 21:17:51 UTC
Description of problem:
clevis-systemd uses ncat in /usr/libexec/clevis-luks-askpass
However, the clevis-systemd RPM has dependency on nc


Not a big issue when only RHEL BaseOs & AppStream repos are in use; however, in EPEL the netcat RPM exists and it too provides nc, but NOT ncat binary clevis-systemd actually uses.


Version-Release number of selected component (if applicable):
clevis-systemd-13-3.el8

How reproducible:
100%

Steps to Reproduce:
1. Look at what the RPM requires

  # rpm -qp --requires rhel-8-for-x86_64-appstream-rpms/Packages/c/clevis- 
 systemd-13-3.el8.x86_64.rpm | head -n 4
  /bin/bash
  /bin/sh
  clevis-luks(x86-64) = 13-3.el8
  nc

2. Looking at script the RPM provides, can see clearly it uses ncat (not nc)

  # grep -n ncat /usr/libexec/clevis-luks-askpass
  60:            echo -n "+$pt" | ncat -U -u --send-only "$s"


3. And can see that nc is provided by both nmap-ncat (AppStream) & netcat (EPEL)

  # dnf --repo rhel-8-for-x86_64-baseos-rpms --repo rhel-8-for-x86_64-appstream-rpms --repo epel whatprovides nc | grep -v @System | grep -B1 Repo
netcat-1.217-3.el8.x86_64 : OpenBSD netcat to read and write data across 
  connections using TCP or UDP
  Repo        : epel
  --
  nmap-ncat-2:7.70-4.el8.x86_64 : Nmap's Netcat replacement
  Repo        : rhel-8-for-x86_64-appstream-rpms
  --
  nmap-ncat-2:7.70-5.el8.x86_64 : Nmap's Netcat replacement
  Repo        : rhel-8-for-x86_64-appstream-rpms


Actual results:
  With netcat from EPEL install (or even selected by dnf when both repos enabled) to meet the 'nc' require, clevis fails and are unable to boot/mount an NBDE system you just installed.

Expected results:
  The requires should match the binary it is using to make sure the actual required binary is installed


Additional info:

  Here can see just nc binary for netcat from EPEL
    # rpm -qp --list ./netcat-1.217-3.el8.x86_64.rpm  | grep bin/nc
    /usr/bin/nc


  And nmap-ncat provides 
    #  rpm -q --list nmap-ncat  | grep bin/nc
    /usr/bin/nc
    /usr/bin/ncat


  Looking at provides, pehaps best to set require on nmap-ncat ... since ncat isn't explicitly listed in provides?

    # rpm -q --provides nmap-ncat
    nc
    nc6
    nmap-ncat = 2:7.70-5.el8
    nmap-ncat(x86-64) = 2:7.70-5.el8

Comment 1 Sergio Correia 2021-04-13 21:47:59 UTC
(In reply to James Hartsock from comment #0)

[snip]

>   Looking at provides, pehaps best to set require on nmap-ncat ... since
> ncat isn't explicitly listed in provides?

This would make sense.

The latest clevis release upstream (v16) even dropped netcat altogether as a requirement, since systemd provides a utility that can do the task netcat was being used for and it's already available -- as this is a systemd unlocker.

Comment 2 James Hartsock 2021-04-13 22:00:42 UTC
(In reply to Sergio Correia from comment #1)

[snip]

> The latest clevis release upstream (v16) even dropped netcat altogether as a
> requirement, since systemd provides a utility that can do the task netcat
> was being used for and it's already available -- as this is a systemd
> unlocker.


Looks like this is link to your pull ... that should work too.
  https://github.com/latchset/clevis/pull/266

Comment 9 errata-xmlrpc 2022-05-10 13:52:43 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 (clevis 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/RHBA-2022:1857


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