Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 206973 | Differences between
and this patch

Collapse All | Expand All

(-)webapp-config-1.50.16/WebappConfig/config.py (-4 / +4 lines)
Lines 206-212 Link Here
206
        self.__d = {
206
        self.__d = {
207
            'config_protect'               : wrapper.config_protect,
207
            'config_protect'               : wrapper.config_protect,
208
            # Necessary to load the config file
208
            # Necessary to load the config file
209
            'my_etcconfig'                 : '/etc/vhosts/webapp-config',
209
            'my_etcconfig'                 : '@GENTOO_PORTAGE_EPREFIX@/etc/vhosts/webapp-config',
210
            'my_dotconfig'                 : '.webapp',
210
            'my_dotconfig'                 : '.webapp',
211
            'my_version'                   : WCVERSION,
211
            'my_version'                   : WCVERSION,
212
            'my_conf_version'              : '7',
212
            'my_conf_version'              : '7',
Lines 248-254 Link Here
248
            # -- wrobel
248
            # -- wrobel
249
            'vhost_server_uid'  : 'root',
249
            'vhost_server_uid'  : 'root',
250
            'vhost_server_gid'  : 'root',
250
            'vhost_server_gid'  : 'root',
251
            'vhost_root'        : '/var/www/%(vhost_hostname)s',
251
            'vhost_root'        : '@GENTOO_PORTAGE_EPREFIX@/var/www/%(vhost_hostname)s',
252
            'g_htdocsdir'       : '%(vhost_root)s/%(my_htdocsbase)s',
252
            'g_htdocsdir'       : '%(vhost_root)s/%(my_htdocsbase)s',
253
            'my_appdir'         : '%(my_approot)s/%(my_appsuffix)s',
253
            'my_appdir'         : '%(my_approot)s/%(my_appsuffix)s',
254
            'my_htdocsdir'      : '%(my_appdir)s/htdocs',
254
            'my_htdocsdir'      : '%(my_appdir)s/htdocs',
Lines 257-265 Link Here
257
            'my_cgibindir'      : '%(my_hostrootdir)s/%(my_cgibinbase)s',
257
            'my_cgibindir'      : '%(my_hostrootdir)s/%(my_cgibinbase)s',
258
            'my_iconsdir'       : '%(my_hostrootdir)s/%(my_iconsbase)s',
258
            'my_iconsdir'       : '%(my_hostrootdir)s/%(my_iconsbase)s',
259
            'my_errorsdir'      : '%(my_hostrootdir)s/%(my_errorsbase)s',
259
            'my_errorsdir'      : '%(my_hostrootdir)s/%(my_errorsbase)s',
260
            'my_approot'        : '/usr/share/webapps',
260
            'my_approot'        : '@GENTOO_PORTAGE_EPREFIX@/usr/share/webapps',
261
            'my_appsuffix'      : '%(pn)s/%(pvr)s',
261
            'my_appsuffix'      : '%(pn)s/%(pvr)s',
262
            'my_persistroot'    : '/var/db/webapps',
262
            'my_persistroot'    : '@GENTOO_PORTAGE_EPREFIX@/var/db/webapps',
263
            'my_hostrootbase'   : 'hostroot',
263
            'my_hostrootbase'   : 'hostroot',
264
            'my_cgibinbase'     : 'cgi-bin',
264
            'my_cgibinbase'     : 'cgi-bin',
265
            'my_iconsbase'      : 'icons',
265
            'my_iconsbase'      : 'icons',
(-)webapp-config-1.50.16/WebappConfig/db.py (-12 / +12 lines)
Lines 161-180 Link Here
161
161
162
    This lists the database:
162
    This lists the database:
163
    >>> a.listinstalls()
163
    >>> a.listinstalls()
164
    /var/www/localhost/htdocs/gallery
164
    @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/gallery
165
    /var/www/localhost/htdocs/horde
165
    @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde
166
    /var/www/localhost/htdocs/phpldapadmin
166
    @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/phpldapadmin
167
167
168
    Which is also possible in a more user friendly way:
168
    Which is also possible in a more user friendly way:
169
169
170
    >>> b = WebappDB(here + '/tests/testfiles/webapps', verbose = True)
170
    >>> b = WebappDB(here + '/tests/testfiles/webapps', verbose = True)
171
    >>> b.listinstalls()
171
    >>> b.listinstalls()
172
    * Installs for gallery-1.4.4_p6
172
    * Installs for gallery-1.4.4_p6
173
    *   /var/www/localhost/htdocs/gallery
173
    *   @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/gallery
174
    * Installs for horde-3.0.5
174
    * Installs for horde-3.0.5
175
    *   /var/www/localhost/htdocs/horde
175
    *   @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde
176
    * Installs for phpldapadmin-0.9.7_alpha4
176
    * Installs for phpldapadmin-0.9.7_alpha4
177
    *   /var/www/localhost/htdocs/phpldapadmin
177
    *   @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/phpldapadmin
178
178
179
    The function 'get_inst_files' handles the file locations within the
179
    The function 'get_inst_files' handles the file locations within the
180
    database. If no package has been specified while initializing
180
    database. If no package has been specified while initializing
Lines 225-232 Link Here
225
    * Entry:
225
    * Entry:
226
    * ... me me /my/really/weird/hierarchy/for/horde
226
    * ... me me /my/really/weird/hierarchy/for/horde
227
    * 
227
    * 
228
    >>> d.remove('/var/www/localhost/htdocs/horde')
228
    >>> d.remove('@GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde')
229
    * Pretended to remove installation /var/www/localhost/htdocs/horde
229
    * Pretended to remove installation @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde
230
    * Final DB content:
230
    * Final DB content:
231
    * 
231
    * 
232
    * 
232
    * 
Lines 235-247 Link Here
235
    * Installation at "/my/really/weird/hierarchy/for/horde" could not be found in the database file. Check the entries in ".../tests/testfiles/webapps/horde/3.0.5/installs"!
235
    * Installation at "/my/really/weird/hierarchy/for/horde" could not be found in the database file. Check the entries in ".../tests/testfiles/webapps/horde/3.0.5/installs"!
236
    * Pretended to remove installation /my/really/weird/hierarchy/for/horde
236
    * Pretended to remove installation /my/really/weird/hierarchy/for/horde
237
    * Final DB content:
237
    * Final DB content:
238
    * 1124612110 root root /var/www/localhost/htdocs/horde
238
    * 1124612110 root root @GENTOO_PORTAGE_EPREFIX@/var/www/localhost/htdocs/horde
239
    * 
239
    * 
240
240
241
    '''
241
    '''
242
242
243
    def __init__(self,
243
    def __init__(self,
244
                 root       = '/var/db/webapps',
244
                 root       = '@GENTOO_PORTAGE_EPREFIX@/var/db/webapps',
245
                 package    = '',
245
                 package    = '',
246
                 version    = '',
246
                 version    = '',
247
                 installs   = 'installs',
247
                 installs   = 'installs',
Lines 437-443 Link Here
437
class WebappSource(AppHierarchy):
437
class WebappSource(AppHierarchy):
438
    '''
438
    '''
439
    The WebappSource class handles a web application hierarchy under
439
    The WebappSource class handles a web application hierarchy under
440
    /usr/share/webapps.
440
    @GENTOO_PORTAGE_EPREFIX@/usr/share/webapps.
441
441
442
    Some test files are needed to test the functionality. This localizes
442
    Some test files are needed to test the functionality. This localizes
443
    the current position:
443
    the current position:
Lines 461-467 Link Here
461
    '''
461
    '''
462
462
463
    def __init__(self,
463
    def __init__(self,
464
                 root = '/usr/share/webapps',
464
                 root = '@GENTOO_PORTAGE_EPREFIX@/usr/share/webapps',
465
                 package    = '',
465
                 package    = '',
466
                 version    = '',
466
                 version    = '',
467
                 installed  = 'installed_by_webapp_eclass'):
467
                 installed  = 'installed_by_webapp_eclass'):
(-)webapp-config-1.50.16/WebappConfig/sandbox.py (-4 / +5 lines)
Lines 40-58 Link Here
40
40
41
        self.config     = config
41
        self.config     = config
42
        self.__path     =  [config_libdir + '/libsandbox.so',
42
        self.__path     =  [config_libdir + '/libsandbox.so',
43
                           '/usr/lib/libsandbox.so', '/lib/libsandbox.so']
43
                           '@GENTOO_PORTAGE_EPREFIX@/usr/lib/libsandbox.so',
44
                           '@GENTOO_PORTAGE_EPREFIX@/lib/libsandbox.so']
44
        self.__export   = {}
45
        self.__export   = {}
45
        self.__write    = ['g_installdir',
46
        self.__write    = ['g_installdir',
46
                           'g_htdocsdir',
47
                           'g_htdocsdir',
47
                           'g_cgibindir',
48
                           'g_cgibindir',
48
                           'vhost_root']
49
                           'vhost_root']
49
        self.__read     =  '/'
50
        self.__read     =  '@GENTOO_PORTAGE_EPREFIX@/'
50
51
51
        self.__syswrite = ':/dev/tty:/dev/pts:/dev/null:/tmp'
52
        self.__syswrite = ':/dev/tty:/dev/pts:/dev/null:@GENTOO_PORTAGE_EPREFIX@/tmp'
52
53
53
        self.sandbox    = ''
54
        self.sandbox    = ''
54
55
55
        self.log        = '/tmp/w-c.sandbox-' \
56
        self.log        = '@GENTOO_PORTAGE_EPREFIX@/tmp/w-c.sandbox-' \
56
                            + time.strftime("%Y-%m-%d-%H.%M.%S",time.gmtime())\
57
                            + time.strftime("%Y-%m-%d-%H.%M.%S",time.gmtime())\
57
                            + '.log'
58
                            + '.log'
58
        self.debug_log        = self.log + '.debug'
59
        self.debug_log        = self.log + '.debug'
(-)webapp-config-1.50.16/WebappConfig/wrapper.py (-2 / +2 lines)
Lines 52-63 Link Here
52
# example, if ABI == 'amd64' then read LIBDIR_amd64. This routine should work on
52
# example, if ABI == 'amd64' then read LIBDIR_amd64. This routine should work on
53
# all arches as it sets '/usr/lib' as a fallback. See bugs #125032 and #125156.
53
# all arches as it sets '/usr/lib' as a fallback. See bugs #125032 and #125156.
54
54
55
config_libdir = '/usr/lib'
55
config_libdir = '@GENTOO_PORTAGE_EPREFIX@/usr/lib'
56
56
57
if 'ABI' in portage.settings.keys():
57
if 'ABI' in portage.settings.keys():
58
    config_abi  = portage.settings['ABI']
58
    config_abi  = portage.settings['ABI']
59
    if 'LIBDIR_' + config_abi in portage.settings.keys():
59
    if 'LIBDIR_' + config_abi in portage.settings.keys():
60
        config_libdir = '/usr/' + portage.settings['LIBDIR_' + config_abi]
60
        config_libdir = '@GENTOO_PORTAGE_EPREFIX@/usr/' + portage.settings['LIBDIR_' + config_abi]
61
    else:
61
    else:
62
        # This shouldn't happen but we want to know if it ever does
62
        # This shouldn't happen but we want to know if it ever does
63
        OUT.warn('Failed to determine libdir from portage.settings[\'LIBDIR_' + config_abi + '\']\n')
63
        OUT.warn('Failed to determine libdir from portage.settings[\'LIBDIR_' + config_abi + '\']\n')
(-)webapp-config-1.50.16/sbin/webapp-cleaner (-2 / +2 lines)
Lines 8-17 Link Here
8
PRETEND=
8
PRETEND=
9
9
10
CMD="emerge -Cav"
10
CMD="emerge -Cav"
11
WEBAPP_DIR="/usr/share/webapps"
11
WEBAPP_DIR="@GENTOO_PORTAGE_EPREFIX@/usr/share/webapps"
12
WEBAPP_CONFIG=
12
WEBAPP_CONFIG=
13
13
14
[[ -z ${RC_GOT_FUNCTIONS} ]] && source /etc/init.d/functions.sh
14
[[ -z ${RC_GOT_FUNCTIONS} ]] && source @GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh
15
15
16
function help() {
16
function help() {
17
	echo "Remove obsolete and unused versions of web applications"
17
	echo "Remove obsolete and unused versions of web applications"
(-)webapp-config-1.50.16/config/webapp-config (-3 / +3 lines)
Lines 42-50 Link Here
42
# If you want to have fine grained control over the location the web
42
# If you want to have fine grained control over the location the web
43
# applications get installed, you can use the third setting
43
# applications get installed, you can use the third setting
44
44
45
vhost_root="/var/www/${vhost_hostname}"
45
vhost_root="@GENTOO_PORTAGE_EPREFIX@/var/www/${vhost_hostname}"
46
#vhost_root="/srv/${vhost_hostname}/www"
46
#vhost_root="@GENTOO_PORTAGE_EPREFIX@/srv/${vhost_hostname}/www"
47
#vhost_root="/var/www/${vhost_subdomain_1}/${vhost_subdomain_2}/${vhost_subdomain_3}"
47
#vhost_root="@GENTOO_PORTAGE_EPREFIX@/var/www/${vhost_subdomain_1}/${vhost_subdomain_2}/${vhost_subdomain_3}"
48
48
49
# some web applications need to know what host they are serving up pages
49
# some web applications need to know what host they are serving up pages
50
# for.  this information is configured when the application is installed
50
# for.  this information is configured when the application is installed

Return to bug 206973