Bug 1548427

Summary: ftp: Partial build flags injection
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: ftpAssignee: Michal Ruprich <mruprich>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jaskalnik, jsynacek, mruprich
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ftp-0.17-75.fc27 ftp-0.17-76.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-27 19:58:42 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    
Attachments:
Description Flags
spec patch none

Description Florian Weimer 2018-02-23 13:31:51 UTC
/usr/bin/ftp in ftp-0.17-75.fc28.x86_64 has not been linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config.

It seems that the %build section in the RPM spec file does not attempt to inject LDFLAGS at all.

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 Jan Synacek 2018-02-27 10:16:28 UTC
Created attachment 1401260 [details]
spec patch

Comment 2 Florian Weimer 2018-02-27 10:18:41 UTC
(In reply to Jan Synacek from comment #1)
> Created attachment 1401260 [details]
> spec patch

This seems problematic:

+    s,^LDFLAGS=.*$,LDFLAGS=\$(RPM_LD_FLAGS),;

I think RPM_LD_FLAGS can contain commas (“-Wl,-z,now”), so I don't see how this can work reliably.

Comment 3 Jan Synacek 2018-02-27 10:22:18 UTC
I think that it's working correctly: https://koji.fedoraproject.org/koji/taskinfo?taskID=25342138

I'm not able to explain it, though:)

Comment 4 Jan Synacek 2018-02-27 10:24:49 UTC
(In reply to Jan Synacek from comment #3)
> I'm not able to explain it, though:)

The $ sign is escaped, so the literal "$(RPM_LD_FLAGS)" goes into the MCONFIG file. The variable is later turned into the correct flags.

Comment 5 Florian Weimer 2018-02-27 10:26:18 UTC
(In reply to Jan Synacek from comment #4)
> (In reply to Jan Synacek from comment #3)
> > I'm not able to explain it, though:)
> 
> The $ sign is escaped, so the literal "$(RPM_LD_FLAGS)" goes into the
> MCONFIG file. The variable is later turned into the correct flags.

Yes, I see it now as well.  This should work reliably after all.

Comment 6 Fedora Update System 2018-03-14 15:47:27 UTC
ftp-0.17-75.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2a86032f6e

Comment 7 Fedora Update System 2018-03-14 15:47:43 UTC
ftp-0.17-76.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e026aa2225

Comment 8 Fedora Update System 2018-03-14 20:44:44 UTC
ftp-0.17-75.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-2a86032f6e

Comment 9 Fedora Update System 2018-03-15 13:30:13 UTC
ftp-0.17-76.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e026aa2225

Comment 10 Fedora Update System 2018-03-27 19:58:42 UTC
ftp-0.17-75.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2018-08-07 01:14:07 UTC
ftp-0.17-76.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.