Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300833 - www-apps/joomla-1.5.15 upgrading joomla zeroes existing configuration.php file instead of protecting it
Summary: www-apps/joomla-1.5.15 upgrading joomla zeroes existing configuration.php fil...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Harold Anderson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-13 12:16 UTC by Frieder Bürzele
Modified: 2014-09-06 07:44 UTC (History)
4 users (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 Frieder Bürzele 2010-01-13 12:16:39 UTC
updating joomla does not protect its config file. The size of configuration.php is zero after upgrading joomla.
Why there is no config protection?

Reproducible: Always

Steps to Reproduce:
Comment 1 Olivier Huber 2010-01-14 20:00:54 UTC
(In reply to comment #0)
> updating joomla does not protect its config file. The size of configuration.php
> is zero after upgrading joomla.
> Why there is no config protection?

Can you please post the output of 'emerge --info joomla' ?
Can you also attach /etc/vhosts/webapp-config ?

Thanks for your report.
Comment 2 Frieder Bürzele 2010-01-14 23:32:34 UTC
 # emerge --info joomla
Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.27-gentoo-r10 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.27-gentoo-r10-x86_64-Intel-R-_Xeon-R-_CPU_E5420_@_2.50GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 11 Jan 2010 09:00:01 +0000
app-shells/bash:     4.0_p35
dev-lang/python:     2.6.4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 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="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /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="-O2 -pipe -march=nocona"
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"
LINGUAS="de en"
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"
PORTDIR_OVERLAY="/usr/local/portage/layman/dertobi123 /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gd gif gpm gstreamer gtk hal iconv jpeg kde ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp overlays pam pcre pdf perl php png ppds pppd python qt3support qt4 quicktime readline reflection samba sdl session slp spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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" LINGUAS="de en" 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, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

www-apps/joomla-1.5.15 was built with the following:
USE="(multilib) -vhosts"

#####################################################
# egrep -v  '^(#|$)' /etc/vhosts/webapp-config
vhost_root="/var/www/${vhost_hostname}"
vhost_hostname="localhost"
vhost_server="apache"
vhost_config_default_dirs="default-owned"
vhost_config_virtual_files="virtual"
vhost_config_dir="${vhost_root}/conf"
vhost_default_uid="root"
vhost_default_gid="root"
vhost_htdocs_insecure="htdocs"
vhost_htdocs_secure="htdocs-secure"
vhost_perms_serverowned_dir="0775"
vhost_perms_serverowned_file="0664"
vhost_perms_configowned_dir="0755"
vhost_perms_configowned_file="0644"
vhost_perms_defaultowned_dir="0755"
vhost_perms_virtualowned_file="o-w"
vhost_perms_installdir="0755"
WA_CONF_VERSION="7"
Comment 3 Olivier Huber 2010-01-15 01:05:16 UTC
Did you run this kind of command after updating joomla ? 
CONFIG_PROTECT="/var/www/localhost/htdocs/joomla//" etc-update
(the path may be a little bit different)

Since you haven't the vhost flag enabled, when you update Joomla! via portage, just after webapp-config updates the files, there's this statement :

* One or more files have been config protected
* To complete your install, you need to run the following command(s):
*
* CONFIG_PROTECT="/var/www/localhost/htdocs/joomla//" etc-update

So configuration.php is in fact config-protected.
Comment 4 Olivier Huber 2010-01-15 16:09:32 UTC
> So configuration.php is in fact config-protected.
In fact I'm able to reproduce a bug in webapp-config.

I begun with a fresh install of Joomla!
I modified configuration.php.
I did a fake upgrade to the same version.
webapp-config detected that I modified configuration.php, I think because of the mtime :

!time configuration.php

The problem is that during the upgrade, the mtime is modified.

So if I do a fake upgrade again, configuration.php is now erased.

Christian, I think we can reassign this bug to the webapp-config devs.
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2010-01-17 14:00:30 UTC
(In reply to comment #4)
> > So configuration.php is in fact config-protected.
> In fact I'm able to reproduce a bug in webapp-config.
> 
> I begun with a fresh install of Joomla!
> I modified configuration.php.
> I did a fake upgrade to the same version.
> webapp-config detected that I modified configuration.php, I think because of
> the mtime :
> 
> !time configuration.php
> 
> The problem is that during the upgrade, the mtime is modified.
> 
> So if I do a fake upgrade again, configuration.php is now erased.
> 
> Christian, I think we can reassign this bug to the webapp-config devs.

 The problem is that I am not sure that webapp-config is the culprit.  mtime modification is being introduced for EAPI 3, which should be approved on monday.
Comment 6 Arne Brutschy 2010-12-06 10:11:30 UTC
I think I am facing the same problem (joomla config vanished after upgrade to 1.5.22) and I can't find the protected config anywhere.

Any news on this bug?
Comment 7 Yixun Lan archtester gentoo-dev 2014-09-04 09:22:32 UTC
not sure this bug still valid with recent version, just re-assign.
Comment 8 Harold Anderson 2014-09-04 14:14:43 UTC
My comment is that this ebuild is useful only for initial installs.  Upgrades are supported only in the application itself.

I would mark this bug as WILL NOT FIX unless someone else has an opinion.
Comment 9 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-09-04 16:38:17 UTC
(In reply to Harold Naparst from comment #8)
> My comment is that this ebuild is useful only for initial installs. 
> Upgrades are supported only in the application itself.

That defeats the whole point of doing installs through the package manager.
For comparison, we can do upgrades of drupal through the ebuild / webapp-config. We just run the update scripts after updating the system version.
Comment 10 Harold Anderson 2014-09-04 16:53:29 UTC
That is going to be a large amount of work, since you would need to detect the existing version on the system, download the correct upgrade script, and install it.  

Right now there is only one supported version in portage, so I am hoping this isn't a critical issue.

How is this handled in Drupal?  Any hints?
Comment 11 Harold Anderson 2014-09-05 17:38:31 UTC
I am unable to reproduce this problem.  The configuration.php file seems to be correctly preserved, both with and without the vhosts flag.

Please correct me if I am wrong.
Comment 12 Harold Anderson 2014-09-06 07:44:10 UTC
Works for me.