Bug 1548561

Summary: spamassassin: Partial injection of Fedora linker flags
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: spamassassinAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: jjelen, jskarvad, kevin, nb, wtogami
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spamassassin-3.4.1-19.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-11 01:23:22 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 20:53:08 UTC
/usr/bin/spamc in spamassassin-3.4.1-18.fc28.x86_64 has not been linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config:

gcc -DSPAMC_SSL -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
	-o spamc/spamc  -lssl -lcrypto  -ldl -lz 

CFLAGS are there (but unnecessary), but LDFLAGS are 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 Jaroslav Škarvada 2018-04-24 16:06:46 UTC
It seems it has been already fixed, but the bug wasn't closed, i.e.:

* Tue Apr 10 2018 Rafael Santos <rdossant> - 3.4.1-19
- Use standard Fedora linker flags (bug #1548561)

And:
$ gcc -DSPAMC_SSL -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
	-o spamc/spamc -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib -lssl -lcrypto  -ldl -lz 

So closing, feel free to reopen if the problem persists.

Comment 2 Florian Weimer 2018-04-30 08:56:59 UTC
Please release this as an update via Fedora 28, too.

Comment 3 Jaroslav Škarvada 2018-04-30 11:01:54 UTC
(In reply to Florian Weimer from comment #2)
> Please release this as an update via Fedora 28, too.

OK, I will do it.

Comment 4 Fedora Update System 2018-04-30 11:12:10 UTC
spamassassin-3.4.1-19.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1c47e16a16

Comment 5 Fedora Update System 2018-04-30 19:55:06 UTC
spamassassin-3.4.1-19.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-1c47e16a16

Comment 6 Fedora Update System 2018-05-11 01:23:22 UTC
spamassassin-3.4.1-19.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.