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

Bug 448712

Summary: www-servers/nginx-1.2.6: init script fails to create missing directories
Product: Gentoo Linux Reporter: Guillaume Castagnino <casta>
Component: [OLD] ServerAssignee: Benedikt Böhm (RETIRED) <hollow>
Status: RESOLVED FIXED    
Severity: normal CC: bugzie, dev-zero
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: nginx init fix

Description Guillaume Castagnino 2012-12-26 22:35:38 UTC
Created attachment 333400 [details]
nginx init fix

There is a change in the latested nginx ebuild that stops using keepdir to keep the /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi} directories, and create it within the init script.

Problem: checkpath does not create recursively the directories. But /var/tmp/nginx/ is missing, so creating the {client,proxy,fastcgi,scgi,uwsgi} subdirectories fails (and nginx fails to start):
# /etc/init.d/nginx restart
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * Checking nginx' configuration ...
nginx: [emerg] mkdir() "/var/tmp/nginx/client" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] mkdir() "/var/tmp/nginx/client" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
 * failed, please correct errors above                                                                                                                                          [ !! ]
 * ERROR: nginx failed to stop



The fix is quite simple, just adding one checkpath (see attached patch).
Comment 1 Piotr Szymaniak 2012-12-26 22:46:28 UTC
Got the same issue after upgrade.
Comment 2 Benedikt Böhm (RETIRED) gentoo-dev 2012-12-27 06:56:17 UTC
grr, stupid checkpath ... fixed, thanks!