Bug 1548462

Summary: ttmkfdir: Partial injection of build flags
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: ttmkfdirAssignee: Parag Nemade <pnemade>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: i18n-bugs, pnemade, psatpute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ttmkfdir-3.0.9-54.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-01 00:41:18 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-23 15:20:02 UTC
/usr/bin/ttmkfdir in ttmkfdir-3.0.9-53.fc28.x86_64 is not linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config:

libtool: link: g++ -o ttmkfdir ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o -ggdb  -lfreetype -lz

LDFLAGS are completely missing.

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 Parag Nemade 2018-03-07 09:14:45 UTC
Does this change looks okay?

@@ -35,6 +35,8 @@ by the font server.
 %prep
 %autosetup -p1
 
+sed -i '32i override LDFLAGS += -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now' Makefile
+
 %build
 make %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS"
 

scratch-build https://koji.fedoraproject.org/koji/taskinfo?taskID=25536278

Comment 2 Florian Weimer 2018-03-07 09:41:43 UTC
(In reply to Parag Nemade from comment #1)
> Does this change looks okay?
> 
> @@ -35,6 +35,8 @@ by the font server.
>  %prep
>  %autosetup -p1
>  
> +sed -i '32i override LDFLAGS += -pie -Wl,-z -Wl,relro -Wl,-z -Wl,now'
> Makefile
> +

You should use a regular patch to avoid any nasty surprises, and use “LDFLAGS += $(RPM_OPT_FLAGS)”, instead of hard-coding those flags.

Comment 3 Parag Nemade 2018-03-07 11:52:47 UTC
Thanks. Built for F28+ with Makefile patch
+override LDFLAGS += $(RPM_LD_FLAGS)

https://koji.fedoraproject.org/koji/buildinfo?buildID=1055064

Comment 4 Fedora Update System 2018-03-07 11:57:04 UTC
ttmkfdir-3.0.9-54.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-d9af475c71

Comment 5 Fedora Update System 2018-03-08 15:27:39 UTC
ttmkfdir-3.0.9-54.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-d9af475c71

Comment 6 Fedora Update System 2018-04-01 00:41:18 UTC
ttmkfdir-3.0.9-54.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.