Bug 1548660 - libaesgm: Partial build flags injection
Summary: libaesgm: Partial build flags injection
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libaesgm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: Fedora28BuildFlags
TreeView+ depends on / blocked
 
Reported: 2018-02-24 09:59 UTC by Florian Weimer
Modified: 2018-03-05 16:49 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-05 16:49:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Florian Weimer 2018-02-24 09:59:09 UTC
/usr/lib64/libaesgm.so.0.0.0 in libaesgm-20090429-17.fc28.x86_64 is not linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config.

I tried to fix that by patching the RPM spec file, but somehow, LDFLAGS gets lost before reaching the linker invocation:

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 -fPIC -DUSE_SHA1 -shared -Wl,-soname,libaesgm.so.0 -o libaesgm.so.0.0.0 aescrypt.o aeskey.o aes_modes.o aestab.o fileenc.o hmac.o pwd2key.o sha1.o sha2.o 

Apparently, only CFLAGS is used there.

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 Tom "spot" Callaway 2018-03-05 16:40:25 UTC
Your efforts were thwarted by the most dangerous of beasts, the typo. :)

--- a/libaesgm.spec
+++ b/libaesgm.spec
@@ -30,7 +30,7 @@ cp %{SOURCE1} Makefile
 sed -i 's/\r//' *.txt
 
 %build
-make CFLAGS="%{optflags} -fPIC -DUSE_SHA1" LDFLAGS="${build_ldflags}"
+make CFLAGS="%{optflags} -fPIC -DUSE_SHA1" LDFLAGS="%{build_ldflags}"

Comment 2 Tom "spot" Callaway 2018-03-05 16:49:00 UTC
Fixed in rawhide (libaesgm-20090429-18.fc29) and F28 (libaesgm-20090429-18.fc28).


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