Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
The "man yum-builddep" documentation uses the kernel srpm as an example, but does not include mention that the command given will actually not achieve the result desired. In order to install all of the dependencies required in order to build the kernel srpm, either of the following must be completed:
1) Unpack the srpm and use the *.spec to resolve all of the build dependencies
2) Unpack the srpm, repack the srpm using the "--target <ARCH>" of the arch needing to be built and then provide that back to the yum-builddep command:
Version-Release number of selected component (if applicable):
N/A
How reproducible:
Everytime
Steps to Reproduce:
1. Open the "man yum-builddep" documentation
2. Follow the example within the "Examples" section
3. Attempt to build the kernel from the source RPM
Actual results:
Due to the "ifdef <arch> Requires" behaviour within the kernel RPM, as well as a few other large projects, the "yum-builddep" will only read the requires information from the srpm itself:
# yum-builddep kernel-3.10.0-123.8.1.el7.src.rpm
Loaded plugins: product-id
Enabling rhel-7-server-source-rpms repository
Enabling rhel-ha-for-rhel-7-server-source-rpms repository
Getting requirements for kernel-3.10.0-123.8.1.el7.src
--> Already installed : kmod-14-9.el7.x86_64
--> Already installed : patch-2.7.1-8.el7.x86_64
--> Already installed : bash-4.2.45-5.el7_0.4.x86_64
--> Already installed : coreutils-8.22-11.el7.x86_64
--> Already installed : 2:tar-1.26-29.el7.x86_64
--> Already installed : xz-5.1.2-8alpha.el7.x86_64
--> Already installed : 1:findutils-4.5.11-3.el7.x86_64
--> Already installed : gzip-1.5-7.el7.x86_64
--> Already installed : m4-1.4.16-9.el7.x86_64
--> Already installed : 4:perl-5.16.3-283.el7.x86_64
--> Already installed : 1:make-3.82-21.el7.x86_64
--> Already installed : diffutils-3.3-4.el7.x86_64
--> Already installed : gawk-4.0.2-4.el7.x86_64
--> Already installed : devtoolset-3-gcc-4.9.1-10.el7.x86_64
--> Already installed : binutils-2.23.52.0.1-16.el7.x86_64
--> Already installed : redhat-rpm-config-9.1.0-63.el7.noarch
--> Already installed : hostname-3.13-3.el7.x86_64
--> Already installed : net-tools-2.0-0.17.20131004git.el7.x86_64
--> Already installed : bc-1.06.95-13.el7.x86_64
--> Already installed : xmlto-0.0.25-7.el7.x86_64
--> Already installed : asciidoc-8.6.8-5.el7.noarch
--> Already installed : 1:openssl-1.0.1e-34.el7_0.6.x86_64
--> Already installed : hmaccalc-0.9.13-4.el7.x86_64
Whereas if you provide yum-builddep the spec file, it ignores the ifdef <arch> BuildRequires:
bash-4.2# yum-builddep --enablerepo=\* ~/rpmbuild/SPECS/kernel.spec
Loaded plugins: product-id
Getting requirements for //rpmbuild/SPECS/kernel.spec
--> Already installed : kmod-14-9.el7.x86_64
--> Already installed : patch-2.7.1-8.el7.x86_64
--> Already installed : bash-4.2.45-5.el7_0.4.x86_64
--> Already installed : coreutils-8.22-11.el7.x86_64
--> Already installed : 2:tar-1.26-29.el7.x86_64
--> Already installed : xz-5.1.2-8alpha.el7.x86_64
--> Already installed : 1:findutils-4.5.11-3.el7.x86_64
--> Already installed : gzip-1.5-7.el7.x86_64
--> Already installed : m4-1.4.16-9.el7.x86_64
--> Already installed : 4:perl-5.16.3-283.el7.x86_64
--> Already installed : 1:make-3.82-21.el7.x86_64
--> Already installed : diffutils-3.3-4.el7.x86_64
--> Already installed : gawk-4.0.2-4.el7.x86_64
--> Already installed : devtoolset-3-gcc-4.9.1-10.el7.x86_64
--> Already installed : binutils-2.23.52.0.1-16.el7.x86_64
--> Already installed : redhat-rpm-config-9.1.0-63.el7.noarch
--> Already installed : hostname-3.13-3.el7.x86_64
--> Already installed : net-tools-2.0-0.17.20131004git.el7.x86_64
--> Already installed : bc-1.06.95-13.el7.x86_64
--> Already installed : xmlto-0.0.25-7.el7.x86_64
--> Already installed : asciidoc-8.6.8-5.el7.noarch
--> Already installed : 1:openssl-1.0.1e-34.el7_0.6.x86_64
--> Already installed : hmaccalc-0.9.13-4.el7.x86_64
--> Already installed : pesign-0.109-6.el7.x86_64
--> Already installed : elfutils-devel-0.158-3.el7.x86_64
--> Already installed : zlib-devel-1.2.7-13.el7.x86_64
--> Already installed : binutils-devel-2.23.52.0.1-16.el7.x86_64
--> Already installed : newt-devel-0.52.15-4.el7.x86_64
--> Already installed : python-devel-2.7.5-16.el7.x86_64
--> Already installed : perl-ExtUtils-Embed-1.30-283.el7.noarch
--> Already installed : bison-2.7-4.el7.x86_64
--> Already installed : audit-libs-devel-2.3.3-4.el7.x86_64
--> Already installed : numactl-devel-2.0.9-2.el7.x86_64
--> Already installed : pciutils-devel-3.2.1-4.el7.x86_64
--> Already installed : gettext-0.18.2.1-4.el7.x86_64
--> Already installed : rpm-build-4.11.1-16.el7.x86_64
--> Already installed : elfutils-0.158-3.el7.x86_64
Expected results:
The man page should mention the above behaviour in the example section. Similar to the following:
$ man yum-builddep
<snip>
EXAMPLES
Download and install all the RPMs needed to build the kernel RPM:
yum-builddep kernel
When issuing the above command, only the BuildRequires information within the SRPM header information is used to determine build dependencies. This will specifically omit any dependencies that are required only for specific architectures. For example, the kernel includes specific BuildRequires dependencies for the x86_64 architecture. In order to make sure that those dependencies are downloaded and installed, the SRPM should be downloaded, installed, and the *.spec file used to determine the full dependency list as shown below:
yumdownloader --source kernel && rpm -ivh kernel*srpm && yum-builddep ~/rpmbuild/SPECS/kernel.spec
<snip>
Additional info:
If the above quirk is not accounted for, arch-specific builds will fail. Specifically the build following the process indicated in the man pages example.
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, 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://rhn.redhat.com/errata/RHBA-2016-2187.html
Description of problem: The "man yum-builddep" documentation uses the kernel srpm as an example, but does not include mention that the command given will actually not achieve the result desired. In order to install all of the dependencies required in order to build the kernel srpm, either of the following must be completed: 1) Unpack the srpm and use the *.spec to resolve all of the build dependencies 2) Unpack the srpm, repack the srpm using the "--target <ARCH>" of the arch needing to be built and then provide that back to the yum-builddep command: Version-Release number of selected component (if applicable): N/A How reproducible: Everytime Steps to Reproduce: 1. Open the "man yum-builddep" documentation 2. Follow the example within the "Examples" section 3. Attempt to build the kernel from the source RPM Actual results: Due to the "ifdef <arch> Requires" behaviour within the kernel RPM, as well as a few other large projects, the "yum-builddep" will only read the requires information from the srpm itself: # yum-builddep kernel-3.10.0-123.8.1.el7.src.rpm Loaded plugins: product-id Enabling rhel-7-server-source-rpms repository Enabling rhel-ha-for-rhel-7-server-source-rpms repository Getting requirements for kernel-3.10.0-123.8.1.el7.src --> Already installed : kmod-14-9.el7.x86_64 --> Already installed : patch-2.7.1-8.el7.x86_64 --> Already installed : bash-4.2.45-5.el7_0.4.x86_64 --> Already installed : coreutils-8.22-11.el7.x86_64 --> Already installed : 2:tar-1.26-29.el7.x86_64 --> Already installed : xz-5.1.2-8alpha.el7.x86_64 --> Already installed : 1:findutils-4.5.11-3.el7.x86_64 --> Already installed : gzip-1.5-7.el7.x86_64 --> Already installed : m4-1.4.16-9.el7.x86_64 --> Already installed : 4:perl-5.16.3-283.el7.x86_64 --> Already installed : 1:make-3.82-21.el7.x86_64 --> Already installed : diffutils-3.3-4.el7.x86_64 --> Already installed : gawk-4.0.2-4.el7.x86_64 --> Already installed : devtoolset-3-gcc-4.9.1-10.el7.x86_64 --> Already installed : binutils-2.23.52.0.1-16.el7.x86_64 --> Already installed : redhat-rpm-config-9.1.0-63.el7.noarch --> Already installed : hostname-3.13-3.el7.x86_64 --> Already installed : net-tools-2.0-0.17.20131004git.el7.x86_64 --> Already installed : bc-1.06.95-13.el7.x86_64 --> Already installed : xmlto-0.0.25-7.el7.x86_64 --> Already installed : asciidoc-8.6.8-5.el7.noarch --> Already installed : 1:openssl-1.0.1e-34.el7_0.6.x86_64 --> Already installed : hmaccalc-0.9.13-4.el7.x86_64 Whereas if you provide yum-builddep the spec file, it ignores the ifdef <arch> BuildRequires: bash-4.2# yum-builddep --enablerepo=\* ~/rpmbuild/SPECS/kernel.spec Loaded plugins: product-id Getting requirements for //rpmbuild/SPECS/kernel.spec --> Already installed : kmod-14-9.el7.x86_64 --> Already installed : patch-2.7.1-8.el7.x86_64 --> Already installed : bash-4.2.45-5.el7_0.4.x86_64 --> Already installed : coreutils-8.22-11.el7.x86_64 --> Already installed : 2:tar-1.26-29.el7.x86_64 --> Already installed : xz-5.1.2-8alpha.el7.x86_64 --> Already installed : 1:findutils-4.5.11-3.el7.x86_64 --> Already installed : gzip-1.5-7.el7.x86_64 --> Already installed : m4-1.4.16-9.el7.x86_64 --> Already installed : 4:perl-5.16.3-283.el7.x86_64 --> Already installed : 1:make-3.82-21.el7.x86_64 --> Already installed : diffutils-3.3-4.el7.x86_64 --> Already installed : gawk-4.0.2-4.el7.x86_64 --> Already installed : devtoolset-3-gcc-4.9.1-10.el7.x86_64 --> Already installed : binutils-2.23.52.0.1-16.el7.x86_64 --> Already installed : redhat-rpm-config-9.1.0-63.el7.noarch --> Already installed : hostname-3.13-3.el7.x86_64 --> Already installed : net-tools-2.0-0.17.20131004git.el7.x86_64 --> Already installed : bc-1.06.95-13.el7.x86_64 --> Already installed : xmlto-0.0.25-7.el7.x86_64 --> Already installed : asciidoc-8.6.8-5.el7.noarch --> Already installed : 1:openssl-1.0.1e-34.el7_0.6.x86_64 --> Already installed : hmaccalc-0.9.13-4.el7.x86_64 --> Already installed : pesign-0.109-6.el7.x86_64 --> Already installed : elfutils-devel-0.158-3.el7.x86_64 --> Already installed : zlib-devel-1.2.7-13.el7.x86_64 --> Already installed : binutils-devel-2.23.52.0.1-16.el7.x86_64 --> Already installed : newt-devel-0.52.15-4.el7.x86_64 --> Already installed : python-devel-2.7.5-16.el7.x86_64 --> Already installed : perl-ExtUtils-Embed-1.30-283.el7.noarch --> Already installed : bison-2.7-4.el7.x86_64 --> Already installed : audit-libs-devel-2.3.3-4.el7.x86_64 --> Already installed : numactl-devel-2.0.9-2.el7.x86_64 --> Already installed : pciutils-devel-3.2.1-4.el7.x86_64 --> Already installed : gettext-0.18.2.1-4.el7.x86_64 --> Already installed : rpm-build-4.11.1-16.el7.x86_64 --> Already installed : elfutils-0.158-3.el7.x86_64 Expected results: The man page should mention the above behaviour in the example section. Similar to the following: $ man yum-builddep <snip> EXAMPLES Download and install all the RPMs needed to build the kernel RPM: yum-builddep kernel When issuing the above command, only the BuildRequires information within the SRPM header information is used to determine build dependencies. This will specifically omit any dependencies that are required only for specific architectures. For example, the kernel includes specific BuildRequires dependencies for the x86_64 architecture. In order to make sure that those dependencies are downloaded and installed, the SRPM should be downloaded, installed, and the *.spec file used to determine the full dependency list as shown below: yumdownloader --source kernel && rpm -ivh kernel*srpm && yum-builddep ~/rpmbuild/SPECS/kernel.spec <snip> Additional info: If the above quirk is not accounted for, arch-specific builds will fail. Specifically the build following the process indicated in the man pages example.