Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 424161

Summary: dev-db/firebird ebuild should not remove MSG_NOSIGNAL flag on x86
Product: Gentoo Linux Reporter: Maciej S. Szmigiero <mail>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal Keywords: NeedPatch
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patched firebird-2.5.1.26351.0-deps-flags.patch

Description Maciej S. Szmigiero 2012-06-29 21:01:25 UTC
By applying firebird-*-deps-flags.patch the firebird ebuilds remove FB_SEND_FLAGS=MSG_NOSIGNAL define from CFLAGS on x86 (but not on amd64).

This causes the software using the resulting fbclient library to killed by SIGPIPE if the Firebird DB connection drops.

For example consider firebird-2.5.1.26351.0-deps-flags.patch:
The define is kept correctly in prefix.linux_amd64:
-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0
+COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0

But it is removed in prefix.linux:
-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0
+COMMON_FLAGS=-DLINUX -MMD -fPIC -fmessage-length=0

This means that amd64 builds work properly, while x86 builds get killed by SIGPIPE.
Comment 1 Pacho Ramos gentoo-dev 2014-12-11 11:47:57 UTC
how should the final/fixed patch look like? Could you attach it here?

Thanks
Comment 2 Maciej S. Szmigiero 2014-12-14 21:14:36 UTC
Created attachment 391732 [details, diff]
Patched firebird-2.5.1.26351.0-deps-flags.patch
Comment 3 Maciej S. Szmigiero 2014-12-14 21:18:54 UTC
(In reply to Pacho Ramos from comment #1)
> how should the final/fixed patch look like? Could you attach it here?
> 
> Thanks

I've attached it above.

BTW. Thanks for looking into it.
Comment 4 Pacho Ramos gentoo-dev 2014-12-16 10:14:24 UTC
+*firebird-2.5.3.26780.0-r1 (16 Dec 2014)
+
+  16 Dec 2014; Pacho Ramos <pacho@gentoo.org>
+  +files/firebird-2.5.3.26780.0-deps-flags.patch,
+  +firebird-2.5.3.26780.0-r1.ebuild:
+  Patch should not remove MSG_NOSIGNAL flag on x86 (#424161 by Maciej Szmigiero)
+