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 1548462 - ttmkfdir: Partial injection of build flags
Summary: ttmkfdir: Partial injection of build flags
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ttmkfdir
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Fedora28BuildFlags
TreeView+ depends on / blocked
 
Reported: 2018-02-23 15:20 UTC by Florian Weimer
Modified: 2018-04-01 00:41 UTC (History)
3 users (show)

Fixed In Version: ttmkfdir-3.0.9-54.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-01 00:41:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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