Bug 1550543

Summary: cyrus-imapd: Missing build flags injection for vzic
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: cyrus-imapdAssignee: Jason Tibbitts <j>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: code, dan, j, pokorra.mailinglists, pzhukov, vanmeeuwen+fedora, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 19:10:24 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-03-01 12:34:05 UTC
/usr/libexec/cyrus-imapd/vzic in cyrus-imapd-vzic-3.0.5-3.fc28.x86_64 has not been built with the standard Fedora build flags (CFLAGS and FLAGS) from redhat-rpm-config:

cc -g -I../.. -DOLSON_DIR=\".\" -DPRODUCT_ID='"-//CyrusIMAP.org//Cyrus %s//EN"' -DTZID_PREFIX='""' `pkg-config --cflags glib-2.0`    -c -o vzic.o vzic.c
cc -g -I../.. -DOLSON_DIR=\".\" -DPRODUCT_ID='"-//CyrusIMAP.org//Cyrus %s//EN"' -DTZID_PREFIX='""' `pkg-config --cflags glib-2.0`    -c -o vzic-parse.o vzic-parse.c
cc -g -I../.. -DOLSON_DIR=\".\" -DPRODUCT_ID='"-//CyrusIMAP.org//Cyrus %s//EN"' -DTZID_PREFIX='""' `pkg-config --cflags glib-2.0`    -c -o vzic-dump.o vzic-dump.c
cc -g -I../.. -DOLSON_DIR=\".\" -DPRODUCT_ID='"-//CyrusIMAP.org//Cyrus %s//EN"' -DTZID_PREFIX='""' `pkg-config --cflags glib-2.0`    -c -o vzic-output.o vzic-output.c
cc vzic.o vzic-parse.o vzic-dump.o vzic-output.o `pkg-config --libs glib-2.0` -o vzic
make: Leaving directory '/builddir/build/BUILD/cyrus-imapd-3.0.5/tools/vzic'

No build flags are injected 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 Jason Tibbitts 2018-03-01 18:04:29 UTC
Hmm, that part of the build process is something of a mess.  I'll have a look at it.

Comment 2 Jason Tibbitts 2018-03-01 19:10:24 UTC
Fixed in rawhide and F28:

cc -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 -I../.. -DOLSON_DIR=\".\" -DPRODUCT_ID='"-//CyrusIMAP.org//Cyrus %s//EN"' -DTZID_PREFIX='""' `pkg-config --cflags glib-2.0`    -c -o vzic.o vzic.c

cc -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld vzic.o vzic-parse.o vzic-dump.o vzic-output.o `pkg-config --libs glib-2.0` -o vzic

Sadly this code is terrible and generates tonnes of warnings.  Since it's bundled code from a dead upstream I have no idea if the Cyrus folks will care about that, but I'll file a ticket anyway.