Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
webapp-config no longer protect modified files?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
PanardBook
n00b
n00b


Joined: 25 Feb 2006
Posts: 11

PostPosted: Sat Feb 25, 2006 9:32 pm    Post subject: webapp-config no longer protect modified files? Reply with quote

Hello,

Before version 1.50.10, if i remember correctly, when upgrading a webapp, if I modified some files, webapp-config created a .cfg_file.
But since 1.50.10, it seems that it is no longer the case :

Code:
# webapp-config -I -h localhost -d test/mediawiki mediawiki 1.5.4
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
*   Files and directories installed
...

Code:
echo 1234 >> test/mediawiki/index.php

Code:
# webapp-config -U -h localhost -d test/mediawiki mediawiki 1.5.6
* Upgrading mediawiki-1.5.4 to mediawiki-1.5.6
*   Installed by root on 2006-02-25 22:26:54
*   Config files owned by 0:0
!time index.php
!empty /var/www/localhost/cgi-bin
!empty /var/www/localhost/icons
--- /var/www/localhost/htdocs/test/mediawiki
* Invalid line "" removed from the database file!
*   Creating required directories
*   Linking in required files
*     This can take several minutes for larger apps
*   Files and directories installed
* Install completed - success

Code:
# ls -A test/mediawiki | egrep '^\.'
.webapp
.webapp-mediawiki-1.5.6


no .cfg....

Is that a bug or miss I something ?

Thanks
_________________
Panard - http://dev.inzenet.org/~panard/
Back to top
View user's profile Send private message
wrobel
Retired Dev
Retired Dev


Joined: 29 Dec 2005
Posts: 16
Location: Hamburg

PostPosted: Wed Mar 01, 2006 8:46 am    Post subject: Reply with quote

Hi Panard!

webapp-config will only protect files that are marked as being config files for the application. The list of config files for mediawiki will be stored in
Code:

/usr/share/webapps/mediawiki/1.5.4/config-files


webapp-config assumes that all other files are not being modified within the virtual install location (this is in line with what portage does during upgrades).

Regards,

Gunnar
_________________
http://www.gunnarwrobel.de
http://www.pardus.de
Back to top
View user's profile Send private message
PanardBook
n00b
n00b


Joined: 25 Feb 2006
Posts: 11

PostPosted: Wed Mar 08, 2006 2:15 am    Post subject: Reply with quote

Hello,

wrobel wrote:

webapp-config assumes that all other files are not being modified within the virtual install location (this is in line with what portage does during upgrades).


Why? webapp-config detect modified files ( !mtime ), so why send my changes (and sometimes lot of changes) to /dev/null? why not just protect modified files?
I think that the current behaviour is really bad, and may cause important lost of user modifications...
why not use the CONFIG_PROTECT from make.conf to auto-protect server-owned files? it would be better "portage compliant"...

Thanks.
_________________
Panard - http://dev.inzenet.org/~panard/
Back to top
View user's profile Send private message
wrobel
Retired Dev
Retired Dev


Joined: 29 Dec 2005
Posts: 16
Location: Hamburg

PostPosted: Wed Mar 08, 2006 7:17 am    Post subject: Reply with quote

PanardBook wrote:

Why? webapp-config detect modified files ( !mtime ), so why send my changes (and sometimes lot of changes) to /dev/null? why not just protect modified files?


You are not completely alone with that sentiment since the original author of webapp-config (Stuart) added a comment in the code that he dislikes the behavior :) And I am not debating that it could be done.

But the idea of portage and also webapp-config is to get an application installed to a stage where it is completely functional. This will not be possible if the tools are disallowed to write all files of the application since there are local modifications.

I agree that the situation for webapp-config is slightly more difficult than for portage. For portage the user knows that he has the /etc dir config protected. He also knows that editing stuff in /usr is futile since portage will overwrite any changes there on the next update. For webapp-config this usually happens all within the webroot so the boundaries are not that easy.

But essentially we are simply copying the portage behavior.

If you feel the issue needs broader discussion I'd suggest posting a mail to gentoo-web-user@lists.gentoo.org our webapps related discussion group.
_________________
http://www.gunnarwrobel.de
http://www.pardus.de
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum