Bug 1650256 - Hardcoded /usr/lib
Summary: Hardcoded /usr/lib
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sendmail
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Jaroslav Škarvada
QA Contact: Patrik Moško
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-15 16:52 UTC by Jaroslav Škarvada
Modified: 2019-06-14 01:56 UTC (History)
2 users (show)

Fixed In Version: sendmail-8.15.2-31.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-14 01:56:48 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Jaroslav Škarvada 2018-11-15 16:52:08 UTC
Description of problem:
Sendmail hardcodes /usr/lib

Version-Release number of selected component (if applicable):
sendmail-8.15.2-30.el8

How reproducible:
Always

Steps to Reproduce:
1. Check spec
2.
3.

Actual results:
Hardcoded /usr/lib

Expected results:
It should use %{_prefix} macro.

Additional info:

Comment 3 Patrik Moško 2018-11-20 23:06:04 UTC
Verified MANUALLY as SanityOnly on all relevant archs (x86_64, aarch64, s390x, ppc64le).
Build: sendmail-8.15.2-31.el8

Sanity checks:

-----------------------------------------------------------
Looked for "%{_prefix}" keyword in sendmail's specfile in old/new version.

$grep -ne '%{_prefix}' sendmail-8.15.2-29.el8/sendmail.spec
(no output)

$grep -ne '%{_prefix}' sendmail-8.15.2-31.el8/sendmail.spec | nl
1	220:define(\`confENVDEF', \`-I%{_includedir}/libdb -I%{_prefix}/kerberos/include -Wall -DXDEBUG=0 -DNETINET6 -DHES_GETMAILHOST -DUSE_VENDOR_CF_PATH=1 -D_FFR_LINUX_MHNL -D_FFR_QOS -D_FILE_OFFSET_BITS=64')
2	221:define(\`confLIBDIRS', \`-L%{_prefix}/kerberos/%{_lib}')
3	315:%if "%{_libdir}" != "%{_prefix}/lib"
4	316:install -m 755 -d %{buildroot}%{_prefix}/lib
5	356:ln -sf ../sbin/sendmail.sendmail %{buildroot}%{_prefix}/lib/sendmail.sendmail
6	472:touch %{buildroot}%{_prefix}/lib/sendmail
7	520:	--slave %{_prefix}/lib/sendmail mta-sendmail %{_prefix}/lib/sendmail.sendmail \
8	604:%{_prefix}/lib/sendmail.sendmail
     9	626:%ghost %attr(0755,-,-) %{_prefix}/lib/sendmail

Spec file contains all (9) changes (from /usr to %{_prefix}) as could be seen in commit.
---------------------------------------------------------

Checked all macro config files stated in man page of rpmbuild (FILES -> Macro Configuration)
...
$grep -B4 -ne _prefix.*\/usr /usr/lib/rpm/macros
964-#=======================================================================
965-# ---- configure macros.
966-#	Macro(s) slavishly copied from autoconf's config.status.
967-#
968:%_prefix		/usr
...
---------------------------------------------------------

Tried to rebuild newest version (sendmail-8.15.2-31.el8)
$rpmbuild -ba sendmail.spec 
...
+ cd sendmail-8.15.2
+ /usr/bin/rm -rf /root/rpmbuild/BUILDROOT/sendmail-8.15.2-31.el8.`arch`
+ exit 0
...
---------------------------------------------------------

Everything seems sane and working. Also tried running few functional/sanity test cases. Moving to VERIFIED.


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