Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432606 - www-servers/uwsgi - EDITOR variable usage in initd scripts
Summary: www-servers/uwsgi - EDITOR variable usage in initd scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ultrabug
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 15:55 UTC by Andrius Dijakas
Modified: 2012-08-27 08:35 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Dijakas 2012-08-24 15:55:00 UTC
It seems EDITOR variable is unaccessible from some initd scripts (unless the rc_env_allow="EDITOR" is set in /etc/rc.conf)

Builds could be affected: uwsgi, spawn-fcgi

Reproducible: Always
Steps to reproduce:
1. emerge www-servers/uwsgi
2. /etc/init.d/uwsgi start


As the result, error messages shown lack completeness, e.g. for uwsgi-1.2.5 :

$ /etc/init.d/uwsgi start
 * Caching service dependencies ...
                                                                                                                                                 [ ok ]
 * You are not supposed to run this script directly unless you
 * want to run in Emperor mode. In that case please set the UWSGI_EMPEROR_PATH.
 * Otherwise create a symlink for the uwsgi application you want to run as well as
 * a copy of the configuration file and modify it appropriately like so...
 *   ln -s uwsgi /etc/init.d/uwsgi.trac
 *   cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac
 *    /etc/conf.d/uwsgi.trac
 * ERROR: uwsgi failed to start


Line before last line should read (if EDITOR == vim):  
*    vim /etc/conf.d/uwsgi.trac

Problematic source line is (/etc/init.d/uwsgi):
  eerror "  `basename "${EDITOR}"` /etc/conf.d/uwsgi.trac"
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-08-24 16:06:10 UTC
It shouldn't bother with that kind of hand-holding at all. People generally know their (preferred) $EDITOR so there's no point in reminding them.
Comment 2 Andrius Dijakas 2012-08-24 16:19:09 UTC
Yes, it sounds like minor problem, but nevertheless, it required me to look at script's source to understand what a heck the suggested sequence of commands was trying to express (first time uwsgi launcher, myself):

 *   cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac
 *    /etc/conf.d/uwsgi.trac
Comment 3 Mike Gilbert gentoo-dev 2012-08-24 19:38:32 UTC
Maybe just hard-code "nano" as the editor of the masses. As jer suggests, anybody who knows what they are doing can make the translation.
Comment 4 Ultrabug gentoo-dev 2012-08-27 08:35:17 UTC
You're right guys, thanks Andrius for pointing this out.

+  27 Aug 2012; Ultrabug <ultrabug@gentoo.org> files/uwsgi.initd,
+  files/uwsgi.initd-r1:
+  hard-code EDITOR in init scripts wrt #432606.
+