| Index: modules/trac/manifests/init.pp |
| =================================================================== |
| --- a/modules/trac/manifests/init.pp |
| +++ b/modules/trac/manifests/init.pp |
| @@ -233,7 +233,20 @@ |
| Exec['install_TracXMLRPC'], |
| Exec['install_TracHTTPAuth']], |
| } |
| - |
| + |
| +# Ref https://issues.adblockplus.org/ticket/4641 |
| +$cgi_performance_fix = " |
|
Wladimir Palant
2016/11/16 09:26:18
Nit: This isn't really related to CGI in any way,
f.nicolaisen
2016/11/16 15:01:28
Acknowledged.
|
| +### Local modifications to the trac.fcgi file |
| +from trac.web.session import Session |
| +orig_get = Session.get |
| +def patched_get(self, key, default=None): |
| + if key == 'accesskeys': |
| + return '1' |
| + return orig_get(self, key, default) |
| +Session.get = patched_get |
| +### End of local modifications |
| +" |
| + |
| exec {"deploy_$name": |
| command => "trac-admin /home/trac/$environment \ |
| deploy /home/trac/htdocs-$name \ |
| @@ -244,8 +257,13 @@ |
| require => [ |
| Exec["update_env_$name"], |
| Package["tofrodos"]], |
| + } -> |
| + exec {"append_cgi_config_to_$name": |
| + command => "echo \"$cgi_performance_fix\" >> /home/trac/htdocs-$name/cgi-bin/trac.fcgi", |
|
Wladimir Palant
2016/11/16 09:26:18
Actually, this needs to be added at the top of the
f.nicolaisen
2016/11/16 15:01:28
Acknowledged.
|
| + user => trac, |
| + path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', |
|
Wladimir Palant
2016/11/16 09:26:18
The way I see it, this command will run every time
f.nicolaisen
2016/11/16 15:01:28
Won't it only run after the "deploy_$name" exec is
Wladimir Palant
2016/11/16 15:16:44
Given that deploy_$name runs every time - sure. No
|
| } |
| - |
| + |
| file {"/home/trac/htdocs-$name/htdocs/common/logo.png": |
| ensure => present, |
| source => $logo, |