Search code examples
linuxbuildredhatrpmrpmbuild

Why am I getting an error for missing file apr_dbd_odbc* when using rpmbuild for apr-util-1.6.1.tar.bz2?


I'm on RHEL 7.8, with the latest rpm-build installed. I've downloaded the official apr-util-1.6.1.tar.bz2. I already built the RPM for apr (apr-1.7.0.tar.bz2) successfully. When I run from /root/rpmbuild/SOURCES as root:

rpmbuild -bb apr-1.7.0.tar.bz2

It goes along fine for quite a while but then spits out the build error:

RPM build errors: File not found by glob: /root/rpmbuild/BUILDROOT/apr-util-1.6.1-1.x86_64/usr/lib64/apr-util-1/apr_dbd_odbc*

Those files, indeed, are not there. The dbd files in that location are mysql, pgsql, and sqlite3. Is there somewhere I need to get those files? Thanks in advance, security has put a due date of Thursday on this update. Apparently, RHEL7 repo doesn't play nice with security scans so we have to build and maintain our own apache now.


Solution

  • Here's what I had to do. Nuts, but it worked:

    1. bunzip and untar the apr-util-1.6.1.tar.bz2 file in an alternate location
    2. cd into that untar to apr-util-1.6.1/dbd with one shell
    3. in another shell, cd /root/rpmbuild/SOURCES, and then run: rpmbuild -tb apr-util-1.6.1.tar.bz2
    4. When the rpmbuild gets to the section “======== drop table ========”, cp apr_dbd_odbc* /root/rpmbuild/BUILDROOT/apr-util-1.6.1-1.x86_64/usr/lib64/apr-util-1/

    And it succeeded...