summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-16 20:17:05 +0100
committerGitHub <noreply@github.com>2017-12-16 20:17:05 +0100
commit334bead74bc9c5e819f14946726eaad40986d636 (patch)
treee7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /Bugzilla/Install
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Filesystem.pm12
-rw-r--r--Bugzilla/Install/Localconfig.pm19
2 files changed, 15 insertions, 16 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index bb87e499e..01b8d7e8e 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -416,9 +416,6 @@ sub FILESYSTEM {
"skins/yui3.css" => { perms => CGI_READ,
overwrite => 1,
contents => $yui3_all_css },
- "robots.txt" => { perms => CGI_READ,
- overwrite => 1,
- contents => \&robots_txt},
"httpd/env.conf" => { perms => CGI_READ,
overwrite => 1,
contents => \&HTTPD_ENV_CONF },
@@ -969,15 +966,6 @@ sub _check_web_server_group {
return $group_id;
}
-sub robots_txt {
- my $output = '';
- my %vars;
- Bugzilla::Hook::process("before_robots_txt", { vars => \%vars });
- Bugzilla->template->process("robots.txt.tmpl", \%vars, \$output)
- or die Bugzilla->template->error;
- return $output;
-}
-
1;
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index c1c8fb12e..f877829c5 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -31,6 +31,7 @@ use Tie::Hash::NamedCapture;
use Safe;
use Term::ANSIColor;
use Taint::Util qw(untaint);
+use Sys::Hostname qw(hostname);
use parent qw(Exporter);
@@ -122,10 +123,11 @@ use constant LOCALCONFIG_VARS => (
},
{
name => 'diffpath',
- default => sub { dirname(bin_loc('diff')) },
+ default => sub { dirname( bin_loc('diff') ) },
},
{
- name => 'site_wide_secret',
+ name => 'site_wide_secret',
+
# 64 characters is roughly the equivalent of a 384-bit key, which
# is larger than anybody would ever be able to brute-force.
default => sub { generate_random_password(64) },
@@ -148,14 +150,23 @@ use constant LOCALCONFIG_VARS => (
},
{
name => 'memcached_servers',
- default => _migrate_param("memcached_servers", ""),
+ default => _migrate_param( "memcached_servers", "" ),
},
{
name => 'memcached_namespace',
- default => _migrate_param("memcached_namespace", "bugzilla:"),
+ default => _migrate_param( "memcached_namespace", "bugzilla:" ),
+ },
+ {
+ name => 'urlbase',
+ default => _migrate_param( "urlbase", "" ),
},
+ {
+ name => 'attachment_base',
+ default => _migrate_param( "attachment_base", '' ),
+ }
);
+
use constant ENV_KEYS => (
(map { ENV_PREFIX . $_->{name} } LOCALCONFIG_VARS),
(map { ENV_PREFIX . $_ } PARAM_OVERRIDE),