Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1548705

Summary: libpsm2: Partial build flags injection
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: libpsm2Assignee: aravind.gopalakrishnan
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aravind.gopalakrishnan, honli, mschmidt, paul.j.reger
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-22 07:47:45 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:
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-02-24 12:59:36 UTC
/usr/lib64/libpsm2.so.2.1 in libpsm2-10.3.8-3.fc28.x86_64 and /usr/lib64/psm2-compat/libpsm_infinipath.so.1 in libpsm2-compat-10.3.8-3.fc28.x86_64 have not been linked with the standard Fedora linker flags (LDFLAGS).

Something like this in the RPM spec file should fix this:

-export CFLAGS="%{optflags}"
+%{set_build_flags}

But I can't verify this because there is an unrelated build failure:

/builddir/build/BUILD/libpsm2-10.3.8/psm_utils.c:961:59: error: '%s' directive output may be truncated writing up to 127 bytes into a region of size between 110 and 237 [-Werror=format-truncation=]
   snprintf(fdesc, sizeof(fdesc) - 1, "Fault Injection %s <%s>",
                                                           ^~
     fname, fvals_str);
            ~~~~~~~~~

This looks very similar to the issue mentioned in bug 1548537.

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 aravind.gopalakrishnan 2018-02-28 22:49:31 UTC
Hi Florian,

The patch posted in bug 1548537 should fix this as well. There are two ways to apply the fix to libpsm2:
1. Apply the patch on GitHub (https://github.com/intel/opa-psm2)
2. Apply internally at Intel and then re-flow to GitHub. 

Question is- what is the deadline on this?

Fedora 28 release schedule indicates 2018-03-06 is Beta Freeze. Do you need it by then? If so, I can post to GitHub by this week. If not, I can take option (2) and then make sure to update GitHub by 2018-04-17 (final freeze).