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 2065314 - Demote netcat to Recommends
Summary: Demote netcat to Recommends
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Andrea Bolognani
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 2067176
TreeView+ depends on / blocked
 
Reported: 2022-03-17 16:15 UTC by Stephen Hobbs
Modified: 2023-03-24 17:09 UTC (History)
5 users (show)

Fixed In Version: libvirt-8.0.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2067176 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:26:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-115974 0 None None None 2022-03-17 16:29:17 UTC
Red Hat Product Errata RHSA-2022:1759 0 None None None 2022-05-10 13:26:25 UTC

Description Stephen Hobbs 2022-03-17 16:15:29 UTC
Description of problem: Curently libvirt requires the nmap-ncat package to be installed as a dependency.  My customer would like the ability to remove this package.

Currently this is a issue for their Satellite installation as the foreman-libvirt packages are requiring the nmap-ncat install as well.


Additional info:

On Fri, Dec 24, 2021 at 02:27:45AM -0800, Andrea Bolognani wrote:
> On Fri, Dec 24, 2021 at 01:45:13AM -0800, Andrea Bolognani wrote:
> > In the more immediate,
> > perhaps we could demote the Requires on netcat to a Recommends?
> > Assuming those work roughly the same as the Debian equivalent, the
> > result would be that netcat is installed by default but it's possible
> > to uninstall it without the package manager yelling at you.
>
> Upstream patch:
>
>   https://listman.redhat.com/archives/libvir-list/2021-December/msg00895.html

Merged upstream:

  commit cac854e4d4819574b684c1690a1756d5a19fcb17
  Author: Andrea Bolognani <abologna>
  Date:   Fri Dec 24 10:56:04 2021 +0100

    spec: Demote netcat to Recommends

    It is only needed if compatibility with clients that have
    libvirt < 6.9.0 is required, and can be uninstalled otherwise.

    Signed-off-by: Andrea Bolognani <abologna>
    Reviewed-by: Martin Kletzander <mkletzan>

  v7.10.0-383-gcac854e4d4

It will be included in libvirt 8.0.0, which is due to be released
later this month and will be included in RHEL 8.6 as well as RHEL
9.0.

Comment 2 Jiri Denemark 2022-03-18 08:53:11 UTC
Included in a RHEL 8.6.0 build made two months ago.

Comment 4 yalzhang@redhat.com 2022-03-21 03:59:15 UTC
Reproduced it on libvirt-7.6.0-6.module+el8.5.0+13051+7ddbe958.x86_64
# rpm -q libvirt 
libvirt-7.6.0-6.module+el8.5.0+13051+7ddbe958.x86_64

# yum remove nmap-ncat
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Dependencies resolved.
=============================================================================================================================================================================
 Package                                             Architecture    Version                                                                Repository                  Size
=============================================================================================================================================================================
Removing:
 nmap-ncat                                           x86_64          2:7.70-6.el8                                                           @beaker-AppStream          480 k
Removing dependent packages:
 gnome-boxes                                         x86_64          3.36.5-8.el8                                                           @beaker-AppStream          6.3 M
 libguestfs                                          x86_64          1:1.44.0-3.module+el8.5.0+10681+17a9b157                               @ci                        4.5 M
 libvirt                                             x86_64          7.6.0-6.module+el8.5.0+13051+7ddbe958                                  @ci                          0  
 libvirt-daemon-driver-storage-core                  x86_64          7.6.0-6.module+el8.5.0+13051+7ddbe958                                  @ci                        712 k


And test on libvirt-8.0.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64
# yum remove nmap-ncat
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Dependencies resolved.
===============================================================================
 Package         Architecture Version            Repository               Size
===============================================================================
Removing:
 nmap-ncat       x86_64       2:7.70-6.el8       @beaker-AppStream
...

The result is as expected.

Comment 10 yalzhang@redhat.com 2022-03-24 11:13:34 UTC
Test on libvirt-8.0.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64, the result is as expected.

1. On fresh installed rhel 8.6 host, remove the nmap-ncat package;
2. Install the libvirt packages, check the nmap-ncat is not installed by dependencies;

Comment 11 Stephen Hobbs 2022-03-25 18:23:24 UTC
Hello, 

Followup question on this request.  Will this change be filtered down to other "libvirt" packages, or will a RFE need to be opened for each one of those.  The nmap-ncat package shows as a dependency of other packages as well.

This was determine by trying to remove the package from a system running Red Hat Satellite.

# rpm -e nmap-ncat
error: Failed dependencies:
	nc is needed by (installed) libvirt-libs-4.5.0-36.el7_9.5.x86_64

# rpm -e libvirt-libs
error: Failed dependencies:
        libvirt-lxc.so.0()(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-lxc.so.0(LIBVIRT_LXC_1.0.2)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-lxc.so.0(LIBVIRT_LXC_1.0.4)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-qemu.so.0()(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-qemu.so.0(LIBVIRT_QEMU_0.10.0)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-qemu.so.0(LIBVIRT_QEMU_0.8.3)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt-qemu.so.0(LIBVIRT_QEMU_0.9.4)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt.so.0()(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
        libvirt.so.0(LIBVIRT_0.0.3)(64bit) is needed by (installed) tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64

# rpm -e tfm-rubygem-ruby-libvirt-0.7.1-1.el7sat.x86_64
error: Failed dependencies:
	tfm-rubygem(ruby-libvirt) >= 0.6.0 is needed by (installed) foreman-proxy-2.3.1-1.el7sat.noarch
	tfm-rubygem(ruby-libvirt) >= 0.7.0 is needed by (installed) tfm-rubygem-fog-libvirt-0.7.0-1.el7sat.noarch
	tfm-rubygem(ruby-libvirt) >= 0.5 is needed by (installed) foreman-libvirt-2.3.1.25-2.el7sat.noarch
	tfm-rubygem(ruby-libvirt) < 1.0 is needed by (installed) foreman-libvirt-2.3.1.25-2.el7sat.noarch

Comment 12 Andrea Bolognani 2022-03-28 12:13:53 UTC
(In reply to Stephen Hobbs from comment #11)
> Will this change be filtered down to
> other "libvirt" packages, or will a RFE need to be opened for each one of
> those.  The nmap-ncat package shows as a dependency of other packages as
> well.

From the output you provided, it look like an *indirect* dependency:
foreman depends on libvirt-ruby which depends on libvirt which
depends on netcat.

Put it another way: aside from libvirt, there is no package in the
dependency chain that depends on netcat directly. So no need for
further bugs to be filed.

> This was determine by trying to remove the package from a system running Red
> Hat Satellite.
> 
> # rpm -e nmap-ncat
> error: Failed dependencies:
> 	nc is needed by (installed) libvirt-libs-4.5.0-36.el7_9.5.x86_64

Note that the first version of libvirt that contains the fix is
8.0.0-1 (RHEL 8.6) and you seem to have 4.5.0-36 (RHEL 7.9). You
won't benefit from the fix until you are running a version of
Satellite that is based on RHEL 8.6 and uses the corresponding
version of libvirt.

Comment 14 errata-xmlrpc 2022-05-10 13:26:21 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 (Moderate: virt:rhel and virt-devel:rhel security, 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/RHSA-2022:1759


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