orig webapp-config
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
Index: webapp-config-1.50.16/WebappConfig/config.py
|
||||
===================================================================
|
||||
--- webapp-config-1.50.16.orig/WebappConfig/config.py
|
||||
+++ webapp-config-1.50.16/WebappConfig/config.py
|
||||
@@ -204,6 +204,7 @@ class Config:
|
||||
pass
|
||||
|
||||
self.__d = {
|
||||
+ 'allow_absolute' : 'no',
|
||||
'config_protect' : wrapper.config_protect,
|
||||
# Necessary to load the config file
|
||||
'my_etcconfig' : '/etc/vhosts/webapp-config',
|
||||
@@ -870,8 +871,13 @@ class Config:
|
||||
#
|
||||
# this makes sure we don't write rubbish into the installs list
|
||||
|
||||
- installpath = self.config.get('USER', 'g_htdocsdir') + '/' + \
|
||||
- self.config.get('USER', 'g_installdir')
|
||||
+ g_installdir = self.config.get('USER', 'g_installdir')
|
||||
+
|
||||
+ if (os.path.isabs(g_installdir)
|
||||
+ and self.config.get('USER', 'allow_absolute') == 'yes'):
|
||||
+ installpath = g_installdir
|
||||
+ else:
|
||||
+ installpath = self.config.get('USER', 'g_htdocsdir') + '/' + g_installdir
|
||||
|
||||
installpath = re.compile('/+').sub('/', self.__root + installpath)
|
||||
|
||||
Index: webapp-config-1.50.16/config/webapp-config
|
||||
===================================================================
|
||||
--- webapp-config-1.50.16.orig/config/webapp-config
|
||||
+++ webapp-config-1.50.16/config/webapp-config
|
||||
@@ -183,6 +183,9 @@ vhost_perms_virtualowned_file="o-w"
|
||||
|
||||
vhost_perms_installdir="0755"
|
||||
|
||||
+# Allow specifying absolute path names using the -d option?
|
||||
+allow_absolute="no"
|
||||
+
|
||||
|
||||
# ========================================================================
|
||||
# END OF USER-EDITABLE SETTINGS
|
@@ -0,0 +1,13 @@
|
||||
Index: webapp-config-1.50.16/WebappConfig/server.py
|
||||
===================================================================
|
||||
--- webapp-config-1.50.16.orig/WebappConfig/server.py
|
||||
+++ webapp-config-1.50.16/WebappConfig/server.py
|
||||
@@ -300,7 +300,7 @@ class Apache(Basic):
|
||||
|
||||
name = 'Apache'
|
||||
desc = 'supports installation on Apache 1 & 2'
|
||||
- dep = '>=net-www/apache-1.3'
|
||||
+ dep = '>=www-servers/apache-1.3'
|
||||
|
||||
def set_server_user(self):
|
||||
self.vhost_server_uid = get_user('apache')
|
@@ -0,0 +1,13 @@
|
||||
Index: webapp-config-1.50.16/sbin/webapp-cleaner
|
||||
===================================================================
|
||||
--- webapp-config-1.50.16.orig/sbin/webapp-cleaner
|
||||
+++ webapp-config-1.50.16/sbin/webapp-cleaner
|
||||
@@ -11,7 +11,7 @@ CMD="emerge -Cav"
|
||||
WEBAPP_DIR="/usr/share/webapps"
|
||||
WEBAPP_CONFIG=
|
||||
|
||||
-[[ -z ${RC_GOT_FUNCTIONS} ]] && source /sbin/functions.sh
|
||||
+[[ -z ${RC_GOT_FUNCTIONS} ]] && source /etc/init.d/functions.sh
|
||||
|
||||
function help() {
|
||||
echo "Remove obsolete and unused versions of web applications"
|
@@ -0,0 +1,13 @@
|
||||
Index: webapp-config-1.50.16/WebappConfig/server.py
|
||||
===================================================================
|
||||
--- webapp-config-1.50.16.orig/WebappConfig/server.py
|
||||
+++ webapp-config-1.50.16/WebappConfig/server.py
|
||||
@@ -158,7 +158,7 @@ class Basic:
|
||||
|
||||
# is the installation directory empty?
|
||||
|
||||
- if not os.listdir(self.__destd):
|
||||
+ if not os.listdir(self.__destd) and os.path.isdir(self.__destd):
|
||||
if not self.__p:
|
||||
os.rmdir(self.__destd)
|
||||
else:
|
Reference in New Issue
Block a user