Bug 1541052

Summary: ghostscript: Build flags injection is not fully effective
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: ghostscriptAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 28CC: deekej, twaugh, zdohnal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ghostscript-9.23-1.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-04 15:50:40 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-01 15:31:02 UTC
/usr/bin/gs and /usr/bin/gsx built from ghostscript-9.22-6.fc28 have e_type ET_EXEC, that is, they are not PIE binaries.  This suggests that the LDFLAGS injection did not work as intended.

Comment 1 David Kaspar // Dee'Kej 2018-02-01 15:46:14 UTC
Thanks for the report, Florian! :)

Anyway, this is really strange. The LDFLAGS injection shouldn't be different package we have built for F27. I will need to investigate further on what's going on there...

Comment 2 Florian Weimer 2018-02-01 15:52:34 UTC
It's not a regression, I see ET_EXEC with ghostscript-core-9.22-3.fc27.x86_64 as well.  (Only rawhide has the tools for detecting various kinds of build flag injection failures.)

Comment 3 David Kaspar // Dee'Kej 2018-02-01 16:43:28 UTC
(In reply to Florian Weimer from comment #2)
> It's not a regression, I see ET_EXEC with
> ghostscript-core-9.22-3.fc27.x86_64 as well.  (Only rawhide has the tools
> for detecting various kinds of build flag injection failures.)

Ah, OK, thanks for letting me know then. :)

It's still failing to inject the correct flags even with hardened build enabled:
%global _hardened_build 1

I guess I will have to try to manually inject the flags for %configure via LDFLAGS environment variable. If this fails, I'll report it to upstream to check with them what's going on there...

And looking at the build logs, the -fPIC parameter is passed there as it should... :-|

https://kojipkgs.fedoraproject.org//packages/ghostscript/9.22/7.fc28/data/logs/x86_64/build.log

Comment 4 Fedora End Of Life 2018-02-20 15:22:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 5 Igor Gnatenko 2018-03-26 08:54:07 UTC
any news here?

Comment 6 David Kaspar // Dee'Kej 2018-03-26 09:33:05 UTC
Actually yes - the fix I have proposed to upstream has been accepted & was released in version 9.23.

Comment 7 Florian Weimer 2018-03-26 11:02:18 UTC
Would you please put the fix into Fedora 28 as well? It has only ghostscript-9.22-9.fc28, which is still affected by this bug.

Comment 8 David Kaspar // Dee'Kej 2018-03-26 11:28:27 UTC
(In reply to Florian Weimer from comment #7)
> Would you please put the fix into Fedora 28 as well? It has only
> ghostscript-9.22-9.fc28, which is still affected by this bug.

Oh, I have missed that we have passed the point where Bodhi was enabled for F28.

Comment 9 Fedora Update System 2018-03-26 11:29:53 UTC
ghostscript-9.23-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-9983eb2f9e

Comment 10 Fedora Update System 2018-03-26 15:02:06 UTC
ghostscript-9.23-1.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-9983eb2f9e

Comment 11 Fedora Update System 2018-04-04 15:50:40 UTC
ghostscript-9.23-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.