Dear idiot package maintainer:

Changing damned near every USE flag on a minor (!?!?!) release (0.8.34 to 0.8.34-r1) for a package WITHOUT DOING A DAMNED GOOD JOB DOCUMENTING THE CHANGES is a monumentally stupid idea and all you're going to do is annoy the crap out of people who use the package.

Is it a good idea to add support in gentoo for (nearly) all of the nginx modules, rather than the few that were previously being supported? Yes, it's fabulous. Thank you very much for working on this.

Is it a good idea to move all the module choice settings to USE_EXPAND? I have no friggin' clue, because there is NO DOCUMENTATION on how to, y'know, use USE_EXPAND. (I'm damned good at finding information, no matter where it's squirreled away. And yes, I RTFM. It's not there.) As it stands now, all you did was a) break my nginx installation (I made one minor change to a config file so I could restrict access to my new awstats installation and spent four hours tracking down why it wouldn't let me restart the nginx server), and b) changed my package.use entry for nginx from this:

www-servers/nginx -* fastcgi imap pcre ssl zlib

to this:

www-servers/nginx -* http ssl nginx_modules_http_access nginx_modules_http_auth_basic nginx_modules_http_autoindex nginx_modules_http_empty_gif nginx_modules_http_fastcgi nginx_modules_http_geo nginx_modules_http_gzip nginx_modules_http_gzip_static nginx_modules_http_limit_req nginx_modules_http_memcached nginx_modules_http_referer nginx_modules_http_rewrite

Wow. That's helpful. (Read: not terribly, actually.)

No love,

In the absence of any actual useful documentation, I had to try a bunch of different options to get nginx to do what I wanted it to do again. There was some indication (on pages about other packages) that USE_EXPAND was to be put in /etc/make.conf, as well as the package's variable (NGINX_MODULES_HTTP, in this case). So something like this should've worked, right?

NGINX_MODULES_HTTP="access auth_basic autoindex empty_gif fastcgi geo gzip gzip_static limit_req memcached referer rewrite"

But nope, that was a no-go. I think it actually makes more sense to be able to set the modules variable in /etc/portage/package.use, seeing as that's the currently accepted file location for detailed USE flag settings, but what do I know? I'm just a user. /sarcasm

Neither of those options (or any of the others I tried) worked. As stated above, I ended up changing the nginx line in my package.use and re-emerging nginx with the new USE flags. Hopefully this tip will help out anyone else who runs into this problem and will save many wasted hours.


  1. Dean Hall says:

    Found you on the googles.

    After your hint that NGINX_MODULES_HTTP is a USE_EXPAND variable (which I hadn't heard of before), I did a little looking and found this, , which I'm sure you also did.

    In /usr/portage/profiles/base/make.defaults, NGINX_MODULES_HTTP (and _MAIL) are already listed as USE_EXPAND variables, and, though I haven't seen any docs on USE_EXPAND, it doesn't seem necessary.

    Once I put the appropriate use flags into NGINX_MODULES_HTTP in /etc/make.conf, emerge appears to de-select the other use flags in NGINX_MODULES_HTTP, which is nice, since you can't specify "-useflag" in a USE_EXPAND variable.

    In my /etc/make.conf:

    NGINX_MODULES_HTTP='fastcgi gzip gzip-static realip stub_status uwsgi'

    Then to see what would happen:

    # ACCEPT_KEYWORDS='~amd64' emerge -pv nginx

    These are the packages that would be merged, in order:

    Calculating dependencies… done!
    [ebuild N ] app-vim/nginx-syntax-0.3.1 6 kB
    [ebuild N ] www-servers/nginx-0.8.38 USE="aio http http-cache pcre ssl vim-syntax -debug -ipv6 -libatomic" NGINX_MODULES_HTTP="fastcgi gzip realip stub_status uwsgi -access -addition -auth_basic -autoindex -browser -charset -dav -degradation -empty_gif -flv -geo -geoip -gzip_static -headers_more -image_filter -limit_req -limit_zone -map -memcached -passenger -perl -proxy -push -random_index -referer -rewrite -secure_link -split_clients -ssi -sub -upstream_ip_hash -userid -xslt" NGINX_MODULES_MAIL="-imap -pop3 -smtp" RUBY_TARGETS="ruby18" 725 kB

    Total: 2 packages (2 new), Size of downloads: 731 kB

Leave a Reply