Bug 1999012

Summary: Missing conditionals for "--without libarchive"
Product: Red Hat Enterprise Linux 9 Reporter: Michal Domonkos <mdomonko>
Component: rpmAssignee: Michal Domonkos <mdomonko>
Status: CLOSED ERRATA QA Contact: Tomáš Bajer <tbajer>
Severity: unspecified Docs Contact:
Priority: high    
Version: 9.0CC: mbanas, tbajer
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-4.16.1.3-9.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 16:01:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Domonkos 2021-08-30 09:07:37 UTC
This bug was initially created as a copy of Bug #1902887

I am copying this bug because: 

This was shipped in RHEL-8 and so we shouldn't regress in RHEL-9.

Description of problem:
It seems like the conditionals for "--without libarchive" are missing in the spec file, because at least building with "--without libarchive" leads to build failures.

Version-Release number of selected component (if applicable):
rpm-4.14.3-4.el8

How reproducible:
Everytime with "--without libarchive" options at build-time.

Actual results:
--- 8< ---
--- rpm.spec
+++ rpm.spec.rsc
@@ -439,6 +439,7 @@ done;
     %{?with_lmdb: --enable-lmdb} \
     --enable-python \
     --with-crypto=openssl \
+    %{!?with_libarchive: --without-archive} \
     PYTHON=python3
 
 make %{?_smp_mflags}
@@ -531,7 +532,9 @@ make check || cat tests/rpmtests.log
 %attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/rpm/*
 
 %{_bindir}/rpm
+%if %{with libarchive}
 %{_bindir}/rpm2archive
+%endif # with libarchive
 %{_bindir}/rpm2cpio
 %{_bindir}/rpmdb
 %{_bindir}/rpmkeys
--- 8< ---

Expected results:
Above patch or better being applied to rpm.spec

Comment 10 errata-xmlrpc 2022-05-17 16:01: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 (new packages: rpm), 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:4021