Skip to content

Commit 5055522

Browse files
author
Nicolas
committed
Update README.mkd
1 parent 8056aa4 commit 5055522

File tree

1 file changed

+27
-53
lines changed

1 file changed

+27
-53
lines changed

Diff for: README.mkd

+27-53
Original file line numberDiff line numberDiff line change
@@ -381,99 +381,73 @@ Note that the act of changing a project from public to private will set the **Gi
381381

382382
## Caching Options
383383

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.
385385

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.
387387

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.
390389

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.
392391

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.
395393

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.
399395

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.
402397

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 :
406400

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
415407

416408
The above example should allow **Max Cache Element Size** == 32M.
417409

418410
## SELinux Configuration for Redmine
419411

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 :
424413

425414
rake selinux:install RAILS_ENV=production
426415

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 :
429417

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"
431419

432420
**(2)** The dispatch files in Rails.root/public/dispatch.* will be marked with "httpd_sys_script_exec_t"
433421

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.
437423

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) :
440425

441426
rake selinux:install RAILS_ENV=production ROOT_PATTERN="/source/.*/redmine"
442427

443-
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
444429
your log each time that you visit the plugin settings page.
445430

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
432+
remove scripts with :
451433

452434
rake selinux:redmine_git_hosting:remove_scripts RAILS_ENV=production
453435

454-
Scripts and selinux policy/tags can be reinstalled with:
436+
Scripts and SELinux policy/tags can be reinstalled with :
455437

456438
rake selinux:redmine_git_hosting:install RAILS_ENV=production
457439

458-
Alternately, you can change the frozen parameters by altering them in the init.rb file and resetting the options to the defaults via:
459-
460-
rake redmine_git_hosting:restore_defaults RAILS_ENV=production
461-
462-
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 :
464441

465442
rake selinux:redmine_git_hosting:build_policy RAILS_ENV=productinon
466443

467444
This task can be followed by the selinux:install task.
468445

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.
471447

472448
## Copyright & License
473449

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.
477451

478452
Copyright (c) 2013 Nicolas Rodriguez ([email protected]) MIT License.
479453

0 commit comments

Comments
 (0)