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

Bug 153100

Summary: unexpanded variables in env.d entries kill webapp-config
Product: Gentoo Linux Reporter: Dave <dliana>
Component: Current packagesAssignee: Gentoo NX Server project <nx>
Status: RESOLVED FIXED    
Severity: normal CC: bas, d.noorman, daemon, fester420, howard_b_golden, jakub, m.dantonio, web-apps
Priority: High    
Version: 2006.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dave 2006-10-27 15:50:32 UTC
Keep getting this error message when I install any web app like phpmyadmin:

* Fatal error:
* Fatal error: There is a problem with your configuration file.
* Fatal error: webapp-config tried to read the variable "config_protect"
* Fatal error: and received the following error:
* Fatal error:
* Fatal error: Bad value substitution:
* Fatal error:  section: [USER]
* Fatal error:  option : config_protect
* Fatal error:  key    : svcvardir
* Fatal error:  rawval :  /etc /etc/mail/dspam /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/run/dspam
* Fatal error:
* Fatal error: Please note that webapp-config is not written in bash anymore
* Fatal error: and that you cannot use the bash scripting features.
* Fatal error(s) - aborting
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-10-27 15:54:29 UTC
Well, so delete the config file and re-emerge it.
Comment 2 Dave 2006-10-27 15:58:24 UTC
Tried that and same error
Comment 3 Dave 2006-10-27 16:02:31 UTC
Tried that and same error
Comment 4 Jason Wever (RETIRED) gentoo-dev 2006-11-01 16:14:14 UTC
I'm also encountering this on ~sparc.  I've tried the suggestion in comment #1 with no avail.  I've also removed webapp-config and re-installed it and that didn't help.

Also, can someone explain why /etc/vhosts/webapp-config is marked executable?
Comment 5 Bas Nedermeijer 2006-11-06 09:28:28 UTC
Same problem here.

After removing the ${SVCVARDIR} from the "CONFIG_PROTECT="-line in my /etc/profile.env, webapp - installation works again.
(although on top of the file it states it shouldn't by hand-editted)

I couldn't find where this entire line was generated, but the program installs at least.
Comment 6 Dave 2006-11-06 18:57:32 UTC
Bas Nedermeijer,

Based on your input, I think I have figured this out.  It appears to be a problem with sys-process/daemontools-scripts-1.0.3 - it owns /etc/env.d/50svcinit

If you look in profile.env, SVCVARDIR gets initialized after CONFIG_PROTECT.  Is it possible to have SVCVARDIR initialized before CONFIG_PROTECT?
Comment 7 Bas Nedermeijer 2006-11-07 08:56:01 UTC
(In reply to comment #6)

> If you look in profile.env, SVCVARDIR gets initialized after CONFIG_PROTECT. 
> Is it possible to have SVCVARDIR initialized before CONFIG_PROTECT?

Yes, but it doesnt help, i believe it is because of the single quotes. The variable wont get expanded. 
And it only works when editting /etc/profile.env directly which is generated, and seems to alphabet-sort the vars.

Comment 8 Dave 2006-11-09 15:59:39 UTC
Un-merge the package for a temporary fix.  Maybe the devs can look at this.
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-11-28 10:24:25 UTC
(In reply to comment #7)
> Yes, but it doesnt help, i believe it is because of the single quotes. The
> variable wont get expanded. 

Variables in env.d entries never get expanded, by design. Re-assigning to sys-process/daemontools-scripts maintainer...
Comment 10 petre rodan (RETIRED) gentoo-dev 2006-11-28 23:42:20 UTC
based on jakub's comment #9 I released daemontools-scripts-1.0.4.
it should hit the mirrors soon.

the problem is that I cannot reproduce the problem from comment #1 and I never saw this problem occurring on my web servers.
so can someone please test daemontools-scripts-1.0.4 and tel me if it fixed your problem?
Comment 11 Jason Wever (RETIRED) gentoo-dev 2006-11-29 08:32:49 UTC
Hi Petre,

That appears to have fixed the problem for me here on SPARC.  Thanks for the new release of daemontools-scripts! :)
Comment 12 Dave 2006-12-02 11:27:15 UTC
Looks like this works on both x86 and ppc
Comment 13 petre rodan (RETIRED) gentoo-dev 2006-12-03 22:00:08 UTC
thanks everyone for the bug report and debugging
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2007-02-13 22:33:02 UTC
*** Bug 166753 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-02-17 15:51:42 UTC
*** Bug 167343 has been marked as a duplicate of this bug. ***
Comment 16 petre rodan (RETIRED) gentoo-dev 2007-02-17 16:40:35 UTC
jakub, Bug 166753 and Bug 167343 brake because of a ${NXDIR} that does not get expanded. I am not sure what application set that config_protect variable, but it is clearly not the case of daemontools-scripts.
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2007-02-17 16:43:09 UTC
(In reply to comment #16)
> jakub, Bug 166753 and Bug 167343 brake because of a ${NXDIR} that does not get
> expanded.

Hmm, looks like that... I'll re-assign this to (pretty much non-existant) nx herd. Thanks!
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-02-17 16:44:08 UTC
@nx - see Comment #9.
Comment 19 Devon Warren 2007-02-22 13:21:57 UTC
I removed the CONFIG_PROTECT line from /etc/env.d/50nxpaths and it now works fine.
Comment 20 Bernard Cafarelli gentoo-dev 2007-03-03 00:06:20 UTC
Hmmm the remaining nx components currently in portage do not use unexpanded variables for their CONFIG_PROTECT env.d files... (and so no ${NXDIR} in them)

To the original reporters of bugs #166753 and #167343, which version of net-misc/nx* do you have installed? (post the output of `equery l nx`)
Comment 21 dno 2007-03-04 23:12:59 UTC
output of `equery l nx`)
[I--] [ ~] net-misc/nxclient-2.1.0-r2 (0)
[I--] [ ~] net-misc/nxnode-2.1.0-r2 (0)
[I--] [ ~] net-misc/nxserver-free-2.1.0-r2 (0) 

Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 13:43:07 UTC
*** Bug 169451 has been marked as a duplicate of this bug. ***
Comment 23 Leo 2007-03-05 14:02:32 UTC
(In reply to comment #21)
> output of `equery l nx`)
> [I--] [ ~] net-misc/nxclient-2.1.0-r2 (0)
> [I--] [ ~] net-misc/nxnode-2.1.0-r2 (0)
> [I--] [ ~] net-misc/nxserver-free-2.1.0-r2 (0) 
> 
+++++++++++++++++++++++++++
# equery l nx
[ Searching for package 'nx' in all categories among: ]
 * installed packages
# env-update
>>> Regenerating /etc/ld.so.cache...
# emerge www-apps/egroupware
[SNIP]
* Fatal error:
[SNIP]
* Fatal error:
* Fatal error: There is a problem with your configuration file.
* Fatal error: webapp-config tried to read the variable "config_protect"
* Fatal error: and received the following error:
* Fatal error:
* Fatal error: Bad value substitution:
* Fatal error:  section: [USER]
* Fatal error:  option : config_protect
* Fatal error:  key    : nxdir
* Fatal error:  rawval : /etc ${NXDIR}/home /etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config
* Fatal error:
* Fatal error: Please note that webapp-config is not written in bash anymore
* Fatal error: and that you cannot use the bash scripting features.
* Fatal error(s) - aborting
[SNIP]
+++++++++++++++++++++++++++
I don't have any nx related packages installed... 
what else can I try?
Comment 24 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 14:04:27 UTC
(In reply to comment #23)
> I don't have any nx related packages installed... 
> what else can I try?

Search for ${NXDIR} in /etc/env.d and delete the offending stuff.
Comment 25 Leo 2007-03-05 14:45:26 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > I don't have any nx related packages installed... 
> > what else can I try?
> 
> Search for ${NXDIR} in /etc/env.d and delete the offending stuff.
> 

You was right... some garbage was left... tnx... now it compiles :-)
Comment 26 Bernard Cafarelli gentoo-dev 2007-03-05 17:22:53 UTC
(In reply to comment #21)
> output of `equery l nx`)
> [I--] [ ~] net-misc/nxclient-2.1.0-r2 (0)
> [I--] [ ~] net-misc/nxnode-2.1.0-r2 (0)
> [I--] [ ~] net-misc/nxserver-free-2.1.0-r2 (0) 

From the packages naming and numbers, these are sabayon ebuilds, not gentoo: this should be reported in their bugzilla too (or switch to the NX overlay packages ;) ).
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2007-05-31 23:01:26 UTC
*** Bug 180502 has been marked as a duplicate of this bug. ***
Comment 28 Jakub Moc (RETIRED) gentoo-dev 2007-06-15 08:34:21 UTC
This is fixed in all Gentoo ebuilds (resp., the offending ebuilds have been removed and replaced). If you are using sabayon, then use http://bugs.sabayonlinux.org/, not bugs.gentoo.org.

Closing as FIXED.
Comment 29 Jakub Moc (RETIRED) gentoo-dev 2007-09-28 22:01:04 UTC
*** Bug 194144 has been marked as a duplicate of this bug. ***