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

Bug 533570

Summary: www-servers/nginx with sys-libs/musl - NGINX includes glibc-specific code to work around some issues in sys-libs/glibc(?)
Product: Gentoo Linux Reporter: James Taylor <james>
Component: [OLD] ServerAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED FIXED    
Severity: normal CC: bugs, jlec, proxy-maint
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: http://trac.nginx.org/nginx/ticket/685
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: musl-crypt-fix.patch
=www-servers/nginx-1.7.8-r99 for hardened-development overlay

Description James Taylor 2014-12-26 07:08:45 UTC
Created attachment 392410 [details]
musl-crypt-fix.patch

NGINX includes glibc-specific code to work around some issues in glibc, and as such fails to build under musl.

This patch surrounds the code in #ifdef __GLIBC__ .. #endif to prevent it being built under musl.

I have already submitted the fix upstream, which has been accepted.

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2015-01-31 22:04:56 UTC
Hi can you make this into a single commit against the hardened-dev::musl overlay.  Its worth taking the time to learn this since it makes my life easy and I'll just shoot your commits in as soon as I get and review them.  Otherwise I got to piece stuff together.

Its not hard:

1. git clone git://git.overlays.gentoo.org/proj/hardened-dev.git

2. git checkout musl

3. add the ebuild and patches etc.  make sure the ebuild has rev version -r99.  look at other ebuilds in that overlay for examples.  reduce the KEYWORDS to just the musl supported arches.  don't include the ChangeLog, its not really necessary.

4. git add -A .

5. git commit -m "<cat>/<pkg>: fixed to build on musl"  obviously change <cat> and <pkg> and make "fixed ..." as precise as possible

6. git format-patch HEAD^

7. attack to the bug.

8. profit!

Thanks for helping out!
Comment 2 James Taylor 2015-02-20 09:37:03 UTC
Created attachment 397030 [details, diff]
=www-servers/nginx-1.7.8-r99 for hardened-development overlay

This contains the fix from upstream that I've backported from the nginx-1.7.10 release (as submitted prior)
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2015-03-10 09:34:52 UTC
+*nginx-1.7.10 (10 Mar 2015)
+
+  10 Mar 2015; Justin Lecher <jlec@gentoo.org> +files/AJP-nginx-1.7.9+.patch,
+  +nginx-1.7.10.ebuild, metadata.xml, nginx-1.7.6.ebuild, nginx-1.7.7.ebuild,
+  nginx-1.7.8.ebuild:
+  Version BUmp, #531542; fix for musl, #533570; drop suspecious einstall,
+  #521662; fix SLOT operators
+