Changing the value of vhost_root to use the ${vhost_subdomain_#} variables causes emerge to fail for trac and I would assume any other web application. Reproducible: Always Steps to Reproduce: 1. emerge webapp-config 2. Edit /etc/vhosts/webapp-config 3. Comment out the first vhost_root option and uncomment the 3rd vhost_root option 4. Emerge a web application: emerge -av trac Actual Results: Emerge aborts with the following message: * Fatal error: * Fatal error: There is a problem with your configuration file. * Fatal error: webapp-config tried to read the variable "vhost_config_dir" * Fatal error: and received the following error: * Fatal error: * Fatal error: Bad value substitution: * Fatal error: section: [USER] * Fatal error: option : vhost_config_dir * Fatal error: key : vhost_subdomain_2 * Fatal error: rawval : /${vhost_subdomain_3} * 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 Expected Results: Package should emerge. # emerge --info Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r8 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r8-i686-Intel-R-_Pentium-R-_Dual_CPU_E2180_@_2.00GHz-with-gentoo-1.12.13 Timestamp of tree: Fri, 08 Jan 2010 23:00:01 +0000 app-shells/bash: 4.0_p35 dev-lang/python: 2.4.6, 2.5.4-r3, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.63-r1 sys-devel/automake: 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl berkdb bzip2 cli cracklib crypt cxx gdbm iconv modules mudflap nls nptl nptlonly openmp pam pcre perl python readline reflection session spl ssl sysfs tcpd unicode x86 zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Created attachment 215757 [details] Build Log
Created attachment 215759 [details] Ebuild Environment
After some additional troubleshooting, this bug apparently only creeps up when attempting to re-merge trac after changing the setting specified. On my system, I completely removed trac and it's dependencies, adjusted /etc/vhosts/webapp-config and merged/installed trac successfully.
Could this bug be related to bug 349491?
When trying to reproduce with the latest updates to webapp-config I set: vhost_subdomain_1 = "foo" vhost_subdomain_2 = "bar" vhost_subdomain_3 = "boo" in /etc/vhosts/webapp-config. I then ran emerge -avq trac for the first time, and it installed correctly. However, after the emerge I noticed something. trac was installed into /var/www/localhost/bar/boo/ instead of the expected /var/www/foo/bar/boo/. I think this is because in webapp-config the vhost_subdomain_1 value is being overwritten as localhost. @Nico R., yes, bug 349491 is related to this bug and I also responded on there as well. I think the solution to this problem would be to use a different value instead of vhost_subdomain_1, which is being overwritten. And or, go through webapp-config to see where it's being overwritten and instead have it check to see if a value exists before overwritting. I'm going to attempt to do this later tonight.
(In reply to Devan Franchini from comment #5) > I think the solution to this problem would be to use a different value > instead of vhost_subdomain_1, which is being overwritten. And or, go through > webapp-config to see where it's being overwritten and instead have it check > to see if a value exists before overwriting. I'm going to attempt to do > this later tonight. I submitted a patch in the bug report for bug 349491 that resolves this issue.
*** This bug has been marked as a duplicate of bug 349491 ***