Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 493520 - app-admin/webapp-config - webapp-config -U removes installed configuration files
Summary: app-admin/webapp-config - webapp-config -U removes installed configuration files
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
Keywords: PATCH
: 496788 (view as bug list)
Depends on:
Reported: 2013-12-07 12:07 UTC by Thomas Beutin
Modified: 2023-01-28 20:30 UTC (History)
5 users (show)

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

Add content_protect config option (content_protect.patch,4.93 KB, patch)
2013-12-14 23:20 UTC, Samuel Damashek (RETIRED)
Details | Diff
Add config_protect config option, fix blank config error (content_protect.patch,5.84 KB, patch)
2013-12-15 04:12 UTC, Samuel Damashek (RETIRED)
Details | Diff
Fix error (content_protect.patch,5.54 KB, patch)
2013-12-15 04:28 UTC, Samuel Damashek (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Beutin 2013-12-07 12:07:50 UTC
after running 
# webapp-config -U -D SERVER_TYPE=AUTOMATIC -h -d '/' mantisbt 1.2.15-r1

the database configuration of the former running installation of www-apps/mantisbt-1.2.15 is lost

# webapp-config --li mantisbt

(the SERVER_TYPE is a local extension of webapp-config)

Reproducible: Didn't try

Actual Results:  
hostname ~ # webapp-config -U -D SERVER_TYPE=AUTOMATIC -h -d '/' mantisbt 1.2.15-r1
* Upgrading mantisbt-1.2.15 to mantisbt-1.2.15-r1
*   Installed by root on 2013-05-25 14:34:45
*   Config files owned by 0:0
* Remove whatever is listed above by hand
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
*   Files and directories installed
* Install completed - success
hostname ~ # 

openening the URL results in:


Database connection failed. Error received from database was #1044: Access denied for user ''@'localhost' to database 'bugtracker'.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.

Expected Results:  
I expected a saved configuration and a line like
CONFIG_PROTECT=... etc-update
(or similar) in the output

# emerge --info
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.7.3, glibc-2.16.0, 3.10.17-gentoo x86_64)
System uname: Linux-3.10.17-gentoo-x86_64-AMD_E-350_Processor-with-gentoo-2.2
KiB Mem:     3655528 total,    215240 free
KiB Swap:    4193264 total,   4060840 free
Timestamp of tree: Sat, 07 Dec 2013 05:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3, 3.3.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo sunrise x-portage
CFLAGS="-march=btver1 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/lib64/fax /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /var/bind /var/lib/otrs/Kernel/ /var/lib/otrs/Kernel/Config/ /var/spool/fax/etc /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=btver1 -O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /usr/local/portage"
USE="aac alsa amd64 amr apache2 berkdb bzip2 caps cli corefonts cracklib crypt curl cvs cxx djvu dri exif expat ffmpeg fits flac fontconfig fortran ftp gdbm geoip gif graphviz hdf5 http iconv imagemagick imap ipv6 jbig jpeg jpeg2k json ldap logrotate logwatch lzma lzo memcache memcached mercurial midi milter mmx modules mp4 mpeg mudflap multilib mysql mysqli ncurses nls nptl ogg openmp pam pcre pdf perl php png postgres postscript python raw readline sasl sendmail session sharedext sharedmem sndfile snmp soap sockets spamassassin spatialite sqlite sqlite3 sse sse2 sse4a ssl ssse3 subversion svg syslog tcpd tidy tiff tls truetype unicode uuid vhosts vim-syntax vorbis webp x264 xetex xinetd xls xml zip zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="access auth auth_basic authn_dbm dbd ident imagemap authn_dbd authn_file authn_default authz_groupfile authn_alias authn_anon authz_dbm authz_owner authz_default authz_user auth_digest authz_host alias file_cache echo charset_lite cache disk_cache mem_cache ext_filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy_ajp proxy_balancer expires headers usertrack proxy proxy_connect proxy_ftp proxy_http info include cgi cgid dav dav_lock dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status substitute autoindex asis negotiation dir imap actions userdir so unique_id" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FFTOOLS="aviocat ismindex" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en_IE en_GB en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3 php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="vesa" VOICEMAIL_STORAGE="imap" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2 3.3"
Comment 1 Thomas Beutin 2013-12-07 12:17:18 UTC
Exactly the same thing happens on another server w/o using my own webapp-config extension (-D SERVER_TYPE=AUTOMATIC)
Comment 2 Samuel Damashek (RETIRED) gentoo-dev 2013-12-14 23:20:31 UTC
Created attachment 365352 [details, diff]
Add content_protect config option

Add a content_protect option to the /etc/vhosts/webapp-config file to fix this. This option is an additional list of protected config directories. You may want to add /var/www to this config option so webapp-config recognizes the config as protected and creates an etc-update compatible config when you upgrade.

I tested this patch out and it works with mantisbt.
Comment 3 Samuel Damashek (RETIRED) gentoo-dev 2013-12-15 04:11:21 UTC
Comment on attachment 365352 [details, diff]
Add content_protect config option

Submitting new patch.
Comment 4 Samuel Damashek (RETIRED) gentoo-dev 2013-12-15 04:12:48 UTC
Created attachment 365368 [details, diff]
Add config_protect config option, fix blank config error

Fix error if config option is missing, fix blank config error which occurs with all config options.
Comment 5 Samuel Damashek (RETIRED) gentoo-dev 2013-12-15 04:28:03 UTC
Created attachment 365372 [details, diff]
Fix error

Fix error with previous patch
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-28 12:02:58 UTC
*** Bug 496788 has been marked as a duplicate of this bug. ***
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-28 12:03:09 UTC
*** Bug 499574 has been marked as a duplicate of this bug. ***