Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593450 - www-servers/nginx[nginx_modules_http_upload_progress] - Module isn't build as static module
Summary: www-servers/nginx[nginx_modules_http_upload_progress] - Module isn't build as...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Thomas Deutschmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-10 16:28 UTC by andros
Modified: 2016-10-19 14:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_593450.txt,6.62 KB, text/plain)
2016-09-17 21:11 UTC, andros
Details
www-servers:nginx-1.11.4:20160917-211512.log (file_593450.txt,91.75 KB, text/plain)
2016-09-17 21:18 UTC, andros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andros 2016-09-10 16:28:33 UTC
with nginx 1.11+ it apears that the upload_progress module is not been build. The use flag is there.

nginx-V don't has it.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2016-09-17 19:50:06 UTC
Can't reproduce:

$ cd /usr/portage/www-servers/nginx
$ USE="-* nginx_modules_http_upload_progress" ebuild nginx-1.11.4.ebuild clean install
$ /var/tmp/portage/www-servers/nginx-1.11.4/image/usr/sbin/nginx -V

=> --add-module=external_module/nginx-upload-progress-module-0.9.2

$ readelf -s /var/tmp/portage/www-servers/nginx-1.11.4/image/usr/sbin/nginx | grep -i upload
   306: 0000000000672cc0   200 OBJECT  GLOBAL DEFAULT   24 ngx_http_uploadprogress_m


So please attach build.log and `emerge --info` output.
Comment 2 andros 2016-09-17 21:11:21 UTC
Created attachment 446212 [details]
emerge --info
Comment 3 andros 2016-09-17 21:18:06 UTC
Created attachment 446214 [details]
www-servers:nginx-1.11.4:20160917-211512.log
Comment 4 andros 2016-09-17 21:31:44 UTC
readelf -s /usr/sbin/nginx | grep -i upload 
   475: 0000000000342480   200 OBJECT  GLOBAL DEFAULT   23 ngx_http_uploadprogress_m

nginx -V        
nginx version: nginx/1.11.4
built with OpenSSL 1.0.2h  3 May 2016
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/run/nginx.pid --lock-path=/run/lock/nginx.lock --with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib64 --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=/var/lib/nginx/tmp/client --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --with-file-aio --with-http_v2_module --with-ipv6 --with-pcre --with-pcre-jit --with-threads --without-http_upstream_hash_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_realip_module --add-module=external_module/nginx-upload-progress-module-0.9.2 --add-module=external_module/headers-more-nginx-module-0.31 --add-module=external_module/ngx_cache_purge-2.3 --add-module=external_module/ngx-fancyindex-0.4.1 --add-module=external_module/nginx-dav-ext-module-0.0.3 --add-module=external_module/nginx-push-stream-module-0.5.2 --with-http_ssl_module --without-stream_access_module --without-stream_geo_module --with-stream --with-stream_ssl_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --user=nginx --group=nginx


nginx -c /etc/nginx/nginx.conf
nginx: [emerg] unknown directive "upload_progress" in /etc/nginx/nginx.conf:140
Comment 5 andros 2016-09-17 21:41:51 UTC
Sorry I thought  "nginx -V |grep upload" would catch it but it didn't. So I thought it wasn't there, but it is. Maybe that's not a Gentoo problem. :)
Comment 6 Micha Glave 2016-10-19 08:17:59 UTC
It's an effect caused by the switch to dynamically loadable module:

https://github.com/masterzen/nginx-upload-progress-module/issues/50

Changes needed: 

in ebuilds:
---------
     if use nginx_modules_http_upload_progress; then
         http_enabled=1
-        myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
+        myconf+=( --add-dynamic-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} )
     fi
---------

in nginx.conf
---------
 error_log /var/log/nginx/error.log crit;

+load_module modules/ngx_http_uploadprogress_module.so;
+
 events {
---------
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2016-10-19 12:55:26 UTC
OK, looks like the module's config file is following a bad skeleton with the result that the module was always build as dynamical module.

I filed a bug against nginx to ask for clarification/update of the invalid skeleton: https://trac.nginx.org/nginx/ticket/1115

I'll prepare a fix for the module's config file and do a revbump of nginx in Gentoo.

Thanks!
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2016-10-19 14:41:46 UTC
This is now fixed, thanks for the report:

> commit d85eb428d817a74efc8fd47d54ceb4e02564b6e2
> Author: Thomas Deutschmann
> Date:   Wed Oct 19 16:37:20 2016 +0200
> 
>     www-servers/nginx: Fix building of uploadprogress module; Add autotools depedencies
> 
>     Ebuild changes:
>     ===============
>     - Since nginx-upload-progress-module was bumped to v0.9.2 (commit
>       f03aacc3dc) the module was only build as dynamic module so it wasn't
>       useable in Gentoo. This is now fixed. (Bug #593450)
> 
>     - Cherry-picked a patch for cURL detection in Mod_Security
> 
>     - Added autotools depedencies (only necessary when you build
>       nginx_modules_http_security)
> 
>     Gentoo-Bug: https://bugs.gentoo.org/593450
> 
>     Package-Manager: portage-2.3.2
>