You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.mkd
+27-53
Original file line number
Diff line number
Diff line change
@@ -381,99 +381,73 @@ Note that the act of changing a project from public to private will set the **Gi
381
381
382
382
## Caching Options
383
383
384
-
This plugin includes code for caching output of the Git command, which is called to display the details of the Git repository. Redmine/ChiliProject by default calls Git directly every time this information is needed. This can result in relatively long page load times.
384
+
This plugin includes code for caching output of the Git command, which is called to display the details of the Git repository. Redmine/ChiliProject by default calls Git directly every time this information is needed. This can result in relatively long page load times.
385
385
386
-
This plugin caches the output of Git commands to dramatically improve page load times, roughly a 10x speed increase.
386
+
This plugin caches the output of Git commands to dramatically improve page load times, roughly a 10x speed increase.
387
387
388
-
There are three configurable caching parameters in the plugins settings page : Max Cache Elements, Max Cache Element
389
-
Size and Max Cache Time.
388
+
There are three configurable caching parameters in the plugins settings page : Max Cache Elements, Max Cache Element Size and Max Cache Time.
390
389
391
-
* The **Max Cache Elements** is the maximum number of git commands for which to cache the output.
390
+
* The **Max Cache Elements** is the maximum number of Git commands for which to cache the output.
392
391
393
-
* The **Max Cache Element Size** is the maximum size of the git output to cache. Anything above this size won't be cached,
394
-
and git will be called directly every time this command is run.
392
+
* The **Max Cache Element Size** is the maximum size of the Git output to cache. Anything above this size won't be cached, and Git will be called directly every time this command is run.
395
393
396
-
* The **Max Cache Time** is the maximum amount of time the git command will be cached. No matter what, the output of git
397
-
commands for a given repository are cleared when new commits are pushed to the server and the post-receive hook is
398
-
called.
394
+
* The **Max Cache Time** is the maximum amount of time the Git command will be cached. No matter what, the output of Git commands for a given repository are cleared when new commits are pushed to the server and the post-receive hook is called.
399
395
400
-
This caching functionality only works in Redmine 1.2.x+ and ChiliProject v2.x+ -- while this plugin is compatible
401
-
with ChiliProject 1.x the caching functionality is not.
396
+
This caching functionality only works in Redmine 1.2.x+ and ChiliProject v2.x+ -- while this plugin is compatible with ChiliProject 1.x the caching functionality is not.
402
397
403
-
Important note: If using *mysql* for your database, you must make sure that the **max_allowed_packet** size is set (in, e.g., /etc/my.cnf) to be at least as
404
-
large as the value you specify for **Max Cache Element Size** above. If you do not do this, you are likely to get very strange failures of the web
405
-
server. Such a setting must be placed in the `[mysqld]` parameter section of this file, for instance:
398
+
Important note : If using *mysql* for your database, you must make sure that the **max_allowed_packet** size is set (in, e.g., /etc/my.cnf) to be at least as
399
+
large as the value you specify for **Max Cache Element Size** above. If you do not do this, you are likely to get very strange failures of the web server. Such a setting must be placed in the `[mysqld]` parameter section of this file, for instance :
406
400
407
-
<pre>
408
-
[mysqld]
409
-
datadir=/var/lib/mysql
410
-
socket=/var/lib/mysql/mysql.sock
411
-
user=mysql
412
-
symbolic-links=0
413
-
max_allowed_packet=32M
414
-
</pre>
401
+
[mysqld]
402
+
datadir=/var/lib/mysql
403
+
socket=/var/lib/mysql/mysql.sock
404
+
user=mysql
405
+
symbolic-links=0
406
+
max_allowed_packet=32M
415
407
416
408
The above example should allow **Max Cache Element Size** == 32M.
417
409
418
410
## SELinux Configuration for Redmine
419
411
420
-
This plugin can be configured to run with SELinux. We have included a rakefile in tasks/selinux.rake to assist
421
-
with installing with SELinux. You should start by editing init.rb and migrating as described above. Then, you
422
-
can execute one of the SELinux rake tasks (from the Redmine root). For instance, the simplest option installs
423
-
a SELinux configuration for both Redmine and the redmine_git_hosting plugin:
412
+
This plugin can be configured to run with SELinux. We have included a rakefile in tasks/selinux.rake to assist with installing with SELinux. You should start by migrating as described above. Then, you can execute one of the SELinux rake tasks (from the Redmine root). For instance, the simplest option installs a SELinux configuration for both Redmine and the redmine_git_hosting plugin :
424
413
425
414
rake selinux:install RAILS_ENV=production
426
415
427
-
This will generate the redmine_git_hosting binaries in ./bin, install a SELinux policy for these binaries (called
428
-
redmine_git.pp), then install a complete context for Redmine as follows:
416
+
This will generate the redmine_git_hosting binaries in ./bin, install a SELinux policy for these binaries (called redmine_git.pp), then install a complete context for Redmine as follows :
429
417
430
-
**(1)** Most of Redmine will be marked with "public_content_rw_t".
418
+
**(1)** Most of Redmine will be marked with "public_content_rw_t"
431
419
432
420
**(2)** The dispatch files in Rails.root/public/dispatch.* will be marked with "httpd_sys_script_exec_t"
433
421
434
-
**(3)** The redmine_git_hosting binaries in Rails.root/vendor/plugins/redmine_git_hosting/bin will be labeled
435
-
with "httpd_redmine_git_script_exec_t", which has been crafted to allow the sudo behavior required by these
436
-
binaries.
422
+
**(3)** The redmine_git_hosting binaries in Rails.root/vendor/plugins/redmine_git_hosting/bin will be labeled with "httpd_redmine_git_script_exec_t", which has been crafted to allow the sudo behavior required by these binaries.
437
423
438
-
Note that this rake file has additional options. For instance, you can specify multiple Redmine roots with regular
439
-
expressions (not globbed expressions!) as follows (notice the use of double quotes):
424
+
Note that this rake file has additional options. For instance, you can specify multiple Redmine roots with regular expressions (not globbed expressions!) as follows (notice the use of double quotes) :
These additional options are documented in the selinux.rake file. Under normal operation, you will get one selinux complaint about /bin/touch in
428
+
These additional options are documented in the selinux.rake file. Under normal operation, you will get one SELinux complaint about /bin/touch in
444
429
your log each time that you visit the plugin settings page.
445
430
446
-
Once this plugin is placed under selinux control, four of the redmine_git_hosting settings can
447
-
not be modified from the settings page. They are: 'gitScriptDir', 'gitUser', 'gitoliteIdentityFile', and
448
-
'gitoliteIdentityPublicKeyFile'. The plugin settings page will make this clear. One way to
449
-
modify these options is to remove the old scripts, refresh the setting page, change options, then reinstall scripts. Specifically, you can
450
-
remove scripts with:
431
+
Once this plugin is placed under SELinux control, five of the redmine_git_hosting settings can not be modified from the settings page. They are : 'gitScriptDir', 'gitUser', 'gitoliteIdentityFile', and 'gitoliteIdentityPublicKeyFile'. The plugin settings page will make this clear. One way to modify these options is to remove the old scripts, refresh the setting page, change options, then reinstall scripts. Specifically, you can
One final comment: The selinux policy exists in binary form as selinux/redmine_git.pp. Should this policy
463
-
need to be rebuilt, an additional rake task exists which will build the policy from selinux/redmine_git.te:
440
+
One final comment : The SELinux policy exists in binary form as selinux/redmine_git.pp. Should this policy need to be rebuilt, an additional rake task exists which will build the policy from selinux/redmine_git.te :
This task can be followed by the selinux:install task.
468
445
469
-
The rakefile and SELinux configuration has been primarily tested on Redhat Enterprise Linux version 6.x
470
-
with apache and fcgi. Other configurations may require slight tweaking.
446
+
The rakefile and SELinux configuration has been primarily tested on Redhat Enterprise Linux version 6.x with Apache and fcgi. Other configurations may require slight tweaking.
471
447
472
448
## Copyright & License
473
449
474
-
This plugin is based largely on the Gitosis plugin by Jan Schulz-Hofen for http://plan.io. Several updates/fixes
475
-
were provided by Github users : untoldwind, tingar and ericpaulbishop. These updates were merged together and
476
-
expanded upon by Eric Bishop to create this more comprehensive Git Hosting plugin.
450
+
This plugin is based largely on the Gitosis plugin by Jan Schulz-Hofen for http://plan.io. Several updates/fixes were provided by Github users : untoldwind, tingar and ericpaulbishop. These updates were merged together and expanded upon by Eric Bishop to create this more comprehensive Git Hosting plugin.
477
451
478
452
Copyright (c) 2013 Nicolas Rodriguez ([email protected]) MIT License.
0 commit comments