From f832e249164ff5803e8364efbe91ab190be0e6a1 Mon Sep 17 00:00:00 2001
From: punk
Date: Sat, 24 Apr 2021 19:35:03 +0100
Subject: tools/gitolite hooks transition from bash to sh
---
tools/gitolite.html | 334 +++++-----------------------------------------------
1 file changed, 28 insertions(+), 306 deletions(-)
(limited to 'tools/gitolite.html')
diff --git a/tools/gitolite.html b/tools/gitolite.html
index fd9ad8c..108d4d8 100644
--- a/tools/gitolite.html
+++ b/tools/gitolite.html
@@ -236,9 +236,30 @@
4. Gitolite Hooks
This document creates three scripts, one is run when gitolite receives
- push to a project with hook active, second script is run under root
+ push to a project with hook active - deploy-web, second script is run under root
user to allow operations where gitolite user have no rights, third one
- is project specific.
+ is project specific - deploy.sh. hooks.sh are support functions for deploy hook.
+
+
+ cron ---> deploy.sh
+ (extracts/process tar)
+ |
+ calls defined script
+ to extract this case
+ deploy-web.sh
+
+ gitolite-admin/local/hooks/repo-specific/deploy-web
+ (ends in remote rep/hooks/post-receive.h00-deploy-web)
+ |
+ sources
+ |
+ /srv/gitolite/deploy/hook.sh
+ |
+ creates package and
+ set deploy script to
+ deploy-web.sh
+
+
This example try to have a separate creation of a package and its deployment,
in case deploy script is not on the same machine other method can be used to send
@@ -255,6 +276,8 @@
/srv/gitolite/deploy/deploy.sh,
deploy in this example is called called by cron.
+ Note on OpenBSD all scripts must be changed to use other than bash, ksh.
+
4.1. Activate Hooks
Example from
@@ -331,133 +354,10 @@
4.3.1. Hook Script
Create
- gitolite-admin/local/hooks/repo-specific/deploy-web-doc;
-
-
- #!/bin/bash
- ######################################################################
- #
- # Put this file in your gitolite-admin;
- # ~/gitolite-admin/local/hooks/repo-specific/deploy-web-doc
- #
- # set host to empty to create package for each push
- # or set remote host to create package based on last deployed push
- # host="https://doc.localhost"
- host=""
- # set name of witch branch should be deployed
- branch_to_deploy="deploy_branch"
-
- ######################################################################
-
-
- url="$host/.last_deploy"
- source /srv/gitolite/deploy/hook.sh
- read oldrev newrev refname
- push_branch=$(git rev-parse --symbolic --abbrev-ref $refname)
-
- #SCRIPT_VARS=$(set)
- #echo "project: $PROJECT"
- #echo "local dir: $PWD" > /srv/gitolite/deploy/${GL_REPO}
- #echo "${SCRIPT_VARS}" >> /srv/gitolite/deploy/${GL_REPO}
-
- if [[ $push_branch = $branch_to_deploy ]]; then
-
- # if host empty we make local tracking
- if [[ $host = "" ]]; then
- if [[ $(is_initial ${GL_REPO}) = "true" ]]; then
- oldrev="initial"
- fi
- else
- if [[ ! $(valid_url $url) = "true" ]]; then
- echo "Deploy: set $url on remote to start creating packages"
- exit 1
- fi
- oldrev=$(get_remote_rev $url)
- fi
- create_package ${GL_REPO} ${PWD} ${oldrev} ${newrev} "deploy-web.sh"
- fi
-
+ gitolite-admin/local/hooks/repo-specific/deploy-web.
Create
- /srv/gitolite/deploy/scripts/deploy-web.sh;
-
-
- #!/bin/bash
-
- pkg_path=$1
-
- www_root="/srv/www"
- www_user="nginx"
- www_group="www"
-
- pkg_file="${pkg_path}/project"
- pkg_rm="${pkg_path}/deleted"
- pkg_files="${pkg_path}/files"
-
- if [ ! -f ${pkg_file} ]; then
- echo "Deploy web: invalid pkg_file ${pkg_file}"
- exit 1
- fi
-
- pkg_name=$(head -1 ${pkg_file})
- pkg_new=$(head -3 ${pkg_file} | tail -1)
- pkg_new7=$(echo ${pkg_new} | cut -c1-7)
-
- pkg_www="${www_root}/${pkg_name}"
- pkg_back="${pkg_www}/backup_deploy"
- pkg_last="${pkg_www}/.last_deploy"
-
- if [ ! -d ${pkg_www} ]; then
- echo "Deploy web: invalid pkg_www ${pkg_www}"
- exit 1
- fi
-
- # first backup all data
- if [[ ! $(ls ${pkg_www} | grep -v "backup_deploy") = "" ]]; then
- if [ ! -d ${pkg_back} ]; then
- sudo -u ${www_user} mkdir -p ${pkg_back}
- fi
- backup_file="${pkg_back}/${pkg_name}-$(date '+%Y-%j-%H-%M-%S').tar.gz"
- echo "Deploy web: making backup ${backup_file}"
- sudo -u ${www_user} tar --exclude ${pkg_back} --xattrs -zcpf ${backup_file} ${pkg_www}
- fi
-
- # remove files and directories that have been deleted
- if [ -f ${pkg_rm} ]; then
-
- echo "Deploy web: files to delete:"
- # first we delete files
- while read deleted_file; do
- deleted_file="${pkg_www}/${deleted_file}"
- if [ -f ${deleted_file} ]; then
- echo "file rm ${deleted_file}"
- rm ${deleted_file}
- fi
- done <${pkg_rm}
-
- # delete directories
- while read deleted_file; do
- deleted_file="${pkg_www}/${deleted_file}"
- if [ -d ${deleted_file} ]; then
- echo "file rm ${deleted_file}"
- rm ${deleted_file}
- fi
- done <${pkg_rm}
-
- fi
-
- # copy new files to destination
- if [ -d ${pkg_files} ]; then
- echo "Deploy web: cp from ${pkg_files} to ${pkg_www}"
- sudo -u ${www_user} cp -r ${pkg_files}/* ${pkg_www}
- fi
-
- echo ${pkg_new} > ${pkg_last}
- echo "Deploy: scripts/deployweb.sh ${pkg_name} ${pkg_new7} deployed."
-
- #remove temporary package
- rm -r ${pkg_path}
-
+ /srv/gitolite/deploy/scripts/deploy-web.sh.
Activate this hook, the idea is to start with this one as a template working
and then implement the final one. Edit gitolite admin configuration file and
@@ -486,185 +386,7 @@
4.3.2. Deploy Script
- Create /srv/gitolite/deploy/scripts/deploy.sh;
-
-
- #!/bin/bash
-
- # origin package directory
- packages_dir="/srv/gitolite/deploy/packages"
- # temporary work directory
- deploy_dir="/srv/deploy_dir"
- # scripts to deploy packages
- deploy_scripts="/srv/gitolite/deploy/scripts"
-
- function get_script(){
- # receives package path return script to call
- local pkg_path=$1
- echo $(head -2 ${pkg_path}/project | tail -1)
- }
-
- function get_new(){
- # receives package path return commit hash (new)
- local pkg_path=$1
- echo $(head -3 ${pkg_path}/project | tail -1)
- }
-
- function get_dep(){
- # receives package path return previews commit hash (old)
- local pkg_path=$1
-
- new=$(head -3 ${pkg_path}/project | tail -1)
- old=$(head -4 ${pkg_path}/project | tail -1)
-
- if [[ ! ${new} = ${old} ]]; then
- echo ${old} | cut -c1-7
- fi
- }
-
- function project_extract(){
-
- # project directory containing extracted packages
- local prj_dir=$1
-
- # final extracted package
- local prj_pkg="${prj_dir}/package"
-
- # temporary vars for swapping/iterating pkg_news
- local pkg_new=""
- local pkg_old=""
- local pkg_dir=""
- local pkg_temp=""
- local pkg_next=1
- local pkg_del=""
- local x=0
- local y=0
-
- # array with all the news hashes
- local pkg_news=($(ls ${prj_dir}))
-
- # total new packages
- local total=${#pkg_news[@]}
-
- echo "Deploy: $(basename ${prj_dir}) extracting packages ${pkg_news[*]}"
-
- # find first package
- for pkg_new in ${pkg_news[@]}
- do
- # get package dependency
- pkg_dir="${prj_dir}/${pkg_new}"
- pkg_old=$(get_dep ${pkg_dir})
- if [[ ! " ${pkg_news[@]} " =~ " ${pkg_old} " ]]; then
- # pkg_news don't contain package
- # we found initial package
- pkg_temp=${pkg_news[0]}
- pkg_news[0]=${pkg_new}
- pkg_news[${x}]=${pkg_temp}
- break
- fi
- x=$((${x}+1))
- done
-
- # Order packages by dependency start with first package
- for (( y=0; y<${total}; y++ ))
- do
- pkg_next=$(($y+1))
- if [[ ${pkg_next} = ${total} ]]; then
- ## we are in the last one
- break
- fi
-
- pkg_new=${pkg_news[$y]}
- for (( x=pkg_next; x<${total}; x++ ))
- do
- pkg_dir="${prj_dir}/${pkg_news[${x}]}"
- pkg_old=$(get_dep ${pkg_dir})
- # is dependent on current
- if [[ ${pkg_old} = ${pkg_new} ]]; then
- pkg_temp=${pkg_news[${pkg_next}]}
- pkg_news[${pkg_next}]=${pkg_news[${x}]}
- pkg_news[${x}]=${pkg_temp}
- # we can break and pass next one
- break
- fi
- done
- done
-
- # create project final package directory
- mkdir -p ${prj_pkg}/files
-
- # copy project information of last commit
- cp ${prj_dir}/${pkg_news[$((${total}-1))]}/project ${prj_pkg}
-
- # now that packages are ordered we can start creating files
- for pkg_new in ${pkg_news[@]}
- do
- pkg_dir=${prj_dir}/${pkg_new}
- tar xf ${pkg_dir}/files.tar.xz \
- --directory ${prj_pkg}/files
-
- # if deleted files exists
- if [ -f "${pkg_dir}/deleted" ]; then
- # first collect all files/directories don't exist
- while read pkg_del; do
- # if file don't exist add entry to project deleted file
- pkg_temp="${prj_pkg}/files/${pkg_del}"
- if [ ! -f ${pkg_temp} ]; then
- if [ ! -d ${pkg_temp} ]; then
- # is not a file or directory from previous packages
- echo ${pkg_del} >> ${prj_pkg}/deleted
- fi
- fi
- done <${prj_dir}/${pkg_new}/deleted
-
- # delete directories and files
- while read pkg_del; do
- pkg_temp="${prj_pkg}/files/${pkg_del}"
- if [ -d ${pkg_temp} ]; then
- rm -r ${pkg_temp}
- elif [ -f ${pkg_temp} ]; then
- rm ${pkg_temp}
- fi
- done <${prj_dir}/${pkg_new}/deleted
- fi
-
- #remove temporary directory
- rm -r ${prj_dir}/${pkg_new}
- done
-
- # call project deploy script
- call_script=${deploy_scripts}/$(get_script $prj_pkg)
- echo "Deploy: calling deploy script: ${call_script}"
- /bin/bash ${call_script} ${prj_pkg}
-
- }
-
- if [[ ! $(ls ${deploy_dir}) = "" ]]; then
- rm -r ${deploy_dir}/*
- fi
-
- # first extract all packages from origin directory
- for pkg_path in `find ${packages_dir} -type f -name "*.tar.gz"`
- do
- if [ -f ${pkg_path} ]; then
- pkg_name=$(basename ${pkg_path})
- pkg_proj=$(echo ${pkg_name} | cut -d "_" -f 1)
- pkg_new7=$(echo ${pkg_name} | tail -c -15 | cut -c -7)
- pkg_temp=${deploy_dir}/${pkg_proj}/${pkg_new7}
- mkdir -p ${pkg_temp}
- tar xf ${pkg_path} --directory ${pkg_temp}
- rm ${pkg_path}
- fi
- done
-
- # loop for all projects and deploy them
- for prj_dir in `find ${deploy_dir} -maxdepth 1 -mindepth 1 -type d`
- do
- # order index of hashes based on old commit
- echo "prj_dir $prj_dir"
- project_extract ${prj_dir}
- done
-
+ Create /srv/gitolite/deploy/scripts/deploy.sh.
Give permissions to access files;
--
cgit 1.4.1-2-gfad0
From 3790c6ecd836d25815f7cb8deef62a77d4f3ac9f Mon Sep 17 00:00:00 2001
From: punk
Date: Thu, 29 Apr 2021 16:01:37 +0100
Subject: renamed gitolite/cgit configuration files
---
tools/conf/srv/gitolite/.gitolite.rc | 200 ----------------------
tools/conf/srv/gitolite/cgitrc | 79 +++++++++
tools/conf/srv/gitolite/linux.gitweb.gitolite.rc | 200 ++++++++++++++++++++++
tools/conf/srv/gitolite/openbsd.cgit.gitolite.rc | 204 +++++++++++++++++++++++
tools/gitolite.html | 2 +-
5 files changed, 484 insertions(+), 201 deletions(-)
delete mode 100644 tools/conf/srv/gitolite/.gitolite.rc
create mode 100644 tools/conf/srv/gitolite/cgitrc
create mode 100644 tools/conf/srv/gitolite/linux.gitweb.gitolite.rc
create mode 100644 tools/conf/srv/gitolite/openbsd.cgit.gitolite.rc
(limited to 'tools/gitolite.html')
diff --git a/tools/conf/srv/gitolite/.gitolite.rc b/tools/conf/srv/gitolite/.gitolite.rc
deleted file mode 100644
index d2c80b7..0000000
--- a/tools/conf/srv/gitolite/.gitolite.rc
+++ /dev/null
@@ -1,200 +0,0 @@
-# configuration variables for gitolite
-
-# This file is in perl syntax. But you do NOT need to know perl to edit it --
-# just mind the commas, use single quotes unless you know what you're doing,
-# and make sure the brackets and braces stay matched up!
-
-# (Tip: perl allows a comma after the last item in a list also!)
-
-# HELP for commands can be had by running the command with "-h".
-
-# HELP for all the other FEATURES can be found in the documentation (look for
-# "list of non-core programs shipped with gitolite" in the master index) or
-# directly in the corresponding source file.
-
-%RC = (
-
- # ------------------------------------------------------------------
-
- # default umask gives you perms of '0700'; see the rc file docs for
- # how/why you might change this
- UMASK => 027,
-
- # look for "git-config" in the documentation
- GIT_CONFIG_KEYS => '.*',
-
- # comment out if you don't need all the extra detail in the logfile
- LOG_EXTRA => 1,
- # logging options
- # 1. leave this section as is for 'normal' gitolite logging (default)
- # 2. uncomment this line to log ONLY to syslog:
- LOG_DEST => 'syslog',
- # 3. uncomment this line to log to syslog and the normal gitolite log:
- # LOG_DEST => 'syslog,normal',
- # 4. prefixing "repo-log," to any of the above will **also** log just the
- # update records to "gl-log" in the bare repo directory:
- # LOG_DEST => 'repo-log,normal',
- # LOG_DEST => 'repo-log,syslog',
- # LOG_DEST => 'repo-log,syslog,normal',
-
- # roles. add more roles (like MANAGER, TESTER, ...) here.
- # WARNING: if you make changes to this hash, you MUST run 'gitolite
- # compile' afterward, and possibly also 'gitolite trigger POST_COMPILE'
- ROLES => {
- READERS => 1,
- WRITERS => 1,
- },
-
- # enable caching (currently only Redis). PLEASE RTFM BEFORE USING!!!
- # CACHE => 'Redis',
-
- # ------------------------------------------------------------------
-
- # rc variables used by various features
-
- # the 'info' command prints this as additional info, if it is set
- # SITE_INFO => 'Please see http://blahblah/gitolite for more help',
-
- # the CpuTime feature uses these
- # display user, system, and elapsed times to user after each git operation
- # DISPLAY_CPU_TIME => 1,
- # display a warning if total CPU times (u, s, cu, cs) crosses this limit
- # CPU_TIME_WARN_LIMIT => 0.1,
-
- # the Mirroring feature needs this
- # HOSTNAME => "foo",
-
- # TTL for redis cache; PLEASE SEE DOCUMENTATION BEFORE UNCOMMENTING!
- # CACHE_TTL => 600,
-
- # ------------------------------------------------------------------
-
- # suggested locations for site-local gitolite code (see cust.html)
-
- # this one is managed directly on the server
- # LOCAL_CODE => "$ENV{HOME}/local",
-
- # or you can use this, which lets you put everything in a subdirectory
- # called "local" in your gitolite-admin repo. For a SECURITY WARNING
- # on this, see http://gitolite.com/gitolite/non-core.html#pushcode
- LOCAL_CODE => "$rc{GL_ADMIN_BASE}/local",
-
- # ------------------------------------------------------------------
-
- # List of commands and features to enable
-
- ENABLE => [
-
- # COMMANDS
-
- # These are the commands enabled by default
- 'help',
- 'desc',
- 'info',
- 'perms',
- 'writable',
-
- # Uncomment or add new commands here.
- # 'create',
- # 'fork',
- # 'mirror',
- # 'readme',
- # 'sskm',
- # 'D',
-
- # These FEATURES are enabled by default.
-
- # essential (unless you're using smart-http mode)
- 'ssh-authkeys',
-
- # creates git-config enties from gitolite.conf file entries like 'config foo.bar = baz'
- 'git-config',
-
- # creates git-daemon-export-ok files; if you don't use git-daemon, comment this out
- 'daemon',
-
- # creates projects.list file; if you don't use gitweb, comment this out
- 'gitweb',
-
- # These FEATURES are disabled by default; uncomment to enable. If you
- # need to add new ones, ask on the mailing list :-)
-
- # user-visible behaviour
-
- # prevent wild repos auto-create on fetch/clone
- # 'no-create-on-read',
- # no auto-create at all (don't forget to enable the 'create' command!)
- # 'no-auto-create',
-
- # access a repo by another (possibly legacy) name
- # 'Alias',
-
- # give some users direct shell access. See documentation in
- # sts.html for details on the following two choices.
- # "Shell $ENV{HOME}/.gitolite.shell-users",
- # 'Shell alice bob',
-
- # set default roles from lines like 'option default.roles-1 = ...', etc.
- # 'set-default-roles',
-
- # show more detailed messages on deny
- # 'expand-deny-messages',
-
- # show a message of the day
- # 'Motd',
-
- # system admin stuff
-
- # enable mirroring (don't forget to set the HOSTNAME too!)
- # 'Mirroring',
-
- # allow people to submit pub files with more than one key in them
- # 'ssh-authkeys-split',
-
- # selective read control hack
- # 'partial-copy',
-
- # manage local, gitolite-controlled, copies of read-only upstream repos
- 'upstream',
-
- # updates 'description' file instead of 'gitweb.description' config item
- # 'cgit',
-
- # allow repo-specific hooks to be added
- 'repo-specific-hooks',
-
- # performance, logging, monitoring...
-
- # be nice
- # 'renice 10',
-
- # log CPU times (user, system, cumulative user, cumulative system)
- # 'CpuTime',
-
- # syntactic_sugar for gitolite.conf and included files
-
- # allow backslash-escaped continuation lines in gitolite.conf
- # 'continuation-lines',
-
- # create implicit user groups from directory names in keydir/
- # 'keysubdirs-as-groups',
-
- # allow simple line-oriented macros
- # 'macros',
-
- # Kindergarten mode
-
- # disallow various things that sensible people shouldn't be doing anyway
- # 'Kindergarten',
- ],
-
-);
-
-# ------------------------------------------------------------------------------
-# per perl rules, this should be the last line in such a file:
-1;
-
-# Local variables:
-# mode: perl
-# End:
-# vim: set syn=perl:
diff --git a/tools/conf/srv/gitolite/cgitrc b/tools/conf/srv/gitolite/cgitrc
new file mode 100644
index 0000000..abd2437
--- /dev/null
+++ b/tools/conf/srv/gitolite/cgitrc
@@ -0,0 +1,79 @@
+##footer=/conf/cgit.footer
+#
+## Enable caching of up to 1000 output entries
+#cache-size=1000
+#
+#cache-root=/cgit/cache
+#
+## Specify some default clone urls using macro expansion
+##clone-url=git://git.codemadness.nl/$CGIT_REPO_URL
+#
+## Specify the css url
+##css=/cgit.css
+#
+## Show owner on index page
+#enable-index-owner=0
+#
+## Allow http transport git clone
+#enable-http-clone=0
+#
+## Show extra links for each repository on the index page
+#enable-index-links=0
+#
+## Enable ASCII art commit history graph on the log pages
+#enable-commit-graph=1
+#
+## Show number of affected files per commit on the log pages
+#enable-log-filecount=1
+#
+## Show number of added/removed lines per commit on the log pages
+#enable-log-linecount=1
+#
+## Sort branches by date
+#branch-sort=age
+#
+## Add a cgit favicon
+##favicon=/favicon.ico
+#
+## Enable statistics per week, month and quarter
+#max-stats=quarter
+#
+## Set the title and heading of the repository index page
+##root-title=Codemadness.org repositories
+#
+## Set a subheading for the repository index page
+##root-desc=
+#
+## Allow download of tar.gz, tar.bz2 and zip-files
+#snapshots=tar.gz
+#
+### List of common mimetypes
+#mimetype.gif=image/gif
+#mimetype.html=text/html
+#mimetype.jpg=image/jpeg
+#mimetype.jpeg=image/jpeg
+#mimetype.pdf=application/pdf
+#mimetype.png=image/png
+#mimetype.svg=image/svg+xml
+#
+### Search for these files in the root of the default branch of repositories
+### for coming up with the about page:
+#readme=:README
+#
+#virtual-root=/
+#
+#scan-path=/htdocs/src
+#
+## Disable adhoc downloads of this repo
+#repo.snapshots=0
+#
+## Disable line-counts for this repo
+#repo.enable-log-linecount=0
+#
+## Restrict the max statistics period for this repo
+#repo.max-stats=month
+enable-git-config=1
+enable-gitweb-owner=1
+#remove-suffix=1
+project-list=/projects.list
+scan-path=/repositories
diff --git a/tools/conf/srv/gitolite/linux.gitweb.gitolite.rc b/tools/conf/srv/gitolite/linux.gitweb.gitolite.rc
new file mode 100644
index 0000000..d2c80b7
--- /dev/null
+++ b/tools/conf/srv/gitolite/linux.gitweb.gitolite.rc
@@ -0,0 +1,200 @@
+# configuration variables for gitolite
+
+# This file is in perl syntax. But you do NOT need to know perl to edit it --
+# just mind the commas, use single quotes unless you know what you're doing,
+# and make sure the brackets and braces stay matched up!
+
+# (Tip: perl allows a comma after the last item in a list also!)
+
+# HELP for commands can be had by running the command with "-h".
+
+# HELP for all the other FEATURES can be found in the documentation (look for
+# "list of non-core programs shipped with gitolite" in the master index) or
+# directly in the corresponding source file.
+
+%RC = (
+
+ # ------------------------------------------------------------------
+
+ # default umask gives you perms of '0700'; see the rc file docs for
+ # how/why you might change this
+ UMASK => 027,
+
+ # look for "git-config" in the documentation
+ GIT_CONFIG_KEYS => '.*',
+
+ # comment out if you don't need all the extra detail in the logfile
+ LOG_EXTRA => 1,
+ # logging options
+ # 1. leave this section as is for 'normal' gitolite logging (default)
+ # 2. uncomment this line to log ONLY to syslog:
+ LOG_DEST => 'syslog',
+ # 3. uncomment this line to log to syslog and the normal gitolite log:
+ # LOG_DEST => 'syslog,normal',
+ # 4. prefixing "repo-log," to any of the above will **also** log just the
+ # update records to "gl-log" in the bare repo directory:
+ # LOG_DEST => 'repo-log,normal',
+ # LOG_DEST => 'repo-log,syslog',
+ # LOG_DEST => 'repo-log,syslog,normal',
+
+ # roles. add more roles (like MANAGER, TESTER, ...) here.
+ # WARNING: if you make changes to this hash, you MUST run 'gitolite
+ # compile' afterward, and possibly also 'gitolite trigger POST_COMPILE'
+ ROLES => {
+ READERS => 1,
+ WRITERS => 1,
+ },
+
+ # enable caching (currently only Redis). PLEASE RTFM BEFORE USING!!!
+ # CACHE => 'Redis',
+
+ # ------------------------------------------------------------------
+
+ # rc variables used by various features
+
+ # the 'info' command prints this as additional info, if it is set
+ # SITE_INFO => 'Please see http://blahblah/gitolite for more help',
+
+ # the CpuTime feature uses these
+ # display user, system, and elapsed times to user after each git operation
+ # DISPLAY_CPU_TIME => 1,
+ # display a warning if total CPU times (u, s, cu, cs) crosses this limit
+ # CPU_TIME_WARN_LIMIT => 0.1,
+
+ # the Mirroring feature needs this
+ # HOSTNAME => "foo",
+
+ # TTL for redis cache; PLEASE SEE DOCUMENTATION BEFORE UNCOMMENTING!
+ # CACHE_TTL => 600,
+
+ # ------------------------------------------------------------------
+
+ # suggested locations for site-local gitolite code (see cust.html)
+
+ # this one is managed directly on the server
+ # LOCAL_CODE => "$ENV{HOME}/local",
+
+ # or you can use this, which lets you put everything in a subdirectory
+ # called "local" in your gitolite-admin repo. For a SECURITY WARNING
+ # on this, see http://gitolite.com/gitolite/non-core.html#pushcode
+ LOCAL_CODE => "$rc{GL_ADMIN_BASE}/local",
+
+ # ------------------------------------------------------------------
+
+ # List of commands and features to enable
+
+ ENABLE => [
+
+ # COMMANDS
+
+ # These are the commands enabled by default
+ 'help',
+ 'desc',
+ 'info',
+ 'perms',
+ 'writable',
+
+ # Uncomment or add new commands here.
+ # 'create',
+ # 'fork',
+ # 'mirror',
+ # 'readme',
+ # 'sskm',
+ # 'D',
+
+ # These FEATURES are enabled by default.
+
+ # essential (unless you're using smart-http mode)
+ 'ssh-authkeys',
+
+ # creates git-config enties from gitolite.conf file entries like 'config foo.bar = baz'
+ 'git-config',
+
+ # creates git-daemon-export-ok files; if you don't use git-daemon, comment this out
+ 'daemon',
+
+ # creates projects.list file; if you don't use gitweb, comment this out
+ 'gitweb',
+
+ # These FEATURES are disabled by default; uncomment to enable. If you
+ # need to add new ones, ask on the mailing list :-)
+
+ # user-visible behaviour
+
+ # prevent wild repos auto-create on fetch/clone
+ # 'no-create-on-read',
+ # no auto-create at all (don't forget to enable the 'create' command!)
+ # 'no-auto-create',
+
+ # access a repo by another (possibly legacy) name
+ # 'Alias',
+
+ # give some users direct shell access. See documentation in
+ # sts.html for details on the following two choices.
+ # "Shell $ENV{HOME}/.gitolite.shell-users",
+ # 'Shell alice bob',
+
+ # set default roles from lines like 'option default.roles-1 = ...', etc.
+ # 'set-default-roles',
+
+ # show more detailed messages on deny
+ # 'expand-deny-messages',
+
+ # show a message of the day
+ # 'Motd',
+
+ # system admin stuff
+
+ # enable mirroring (don't forget to set the HOSTNAME too!)
+ # 'Mirroring',
+
+ # allow people to submit pub files with more than one key in them
+ # 'ssh-authkeys-split',
+
+ # selective read control hack
+ # 'partial-copy',
+
+ # manage local, gitolite-controlled, copies of read-only upstream repos
+ 'upstream',
+
+ # updates 'description' file instead of 'gitweb.description' config item
+ # 'cgit',
+
+ # allow repo-specific hooks to be added
+ 'repo-specific-hooks',
+
+ # performance, logging, monitoring...
+
+ # be nice
+ # 'renice 10',
+
+ # log CPU times (user, system, cumulative user, cumulative system)
+ # 'CpuTime',
+
+ # syntactic_sugar for gitolite.conf and included files
+
+ # allow backslash-escaped continuation lines in gitolite.conf
+ # 'continuation-lines',
+
+ # create implicit user groups from directory names in keydir/
+ # 'keysubdirs-as-groups',
+
+ # allow simple line-oriented macros
+ # 'macros',
+
+ # Kindergarten mode
+
+ # disallow various things that sensible people shouldn't be doing anyway
+ # 'Kindergarten',
+ ],
+
+);
+
+# ------------------------------------------------------------------------------
+# per perl rules, this should be the last line in such a file:
+1;
+
+# Local variables:
+# mode: perl
+# End:
+# vim: set syn=perl:
diff --git a/tools/conf/srv/gitolite/openbsd.cgit.gitolite.rc b/tools/conf/srv/gitolite/openbsd.cgit.gitolite.rc
new file mode 100644
index 0000000..6d7001a
--- /dev/null
+++ b/tools/conf/srv/gitolite/openbsd.cgit.gitolite.rc
@@ -0,0 +1,204 @@
+# configuration variables for gitolite
+
+# This file is in perl syntax. But you do NOT need to know perl to edit it --
+# just mind the commas, use single quotes unless you know what you're doing,
+# and make sure the brackets and braces stay matched up!
+
+# (Tip: perl allows a comma after the last item in a list also!)
+
+# HELP for commands can be had by running the command with "-h".
+
+# HELP for all the other FEATURES can be found in the documentation (look for
+# "list of non-core programs shipped with gitolite" in the master index) or
+# directly in the corresponding source file.
+
+%RC = (
+
+ # ------------------------------------------------------------------
+
+ # default umask gives you perms of '0700'; see the rc file docs for
+ # how/why you might change this
+ #UMASK => 0077,
+ UMASK => 0027,
+
+ # look for "git-config" in the documentation
+ #GIT_CONFIG_KEYS => '',
+ GIT_CONFIG_KEYS => '.*',
+
+ # comment out if you don't need all the extra detail in the logfile
+ LOG_EXTRA => 1,
+ # logging options
+ # 1. leave this section as is for 'normal' gitolite logging (default)
+ # 2. uncomment this line to log ONLY to syslog:
+ # LOG_DEST => 'syslog',
+ # 3. uncomment this line to log to syslog and the normal gitolite log:
+ # LOG_DEST => 'syslog,normal',
+ # 4. prefixing "repo-log," to any of the above will **also** log just the
+ # update records to "gl-log" in the bare repo directory:
+ # LOG_DEST => 'repo-log,normal',
+ # LOG_DEST => 'repo-log,syslog',
+ # LOG_DEST => 'repo-log,syslog,normal',
+ # syslog 'facility': defaults to 'local0', uncomment if needed. For example:
+ # LOG_FACILITY => 'local4',
+
+ # roles. add more roles (like MANAGER, TESTER, ...) here.
+ # WARNING: if you make changes to this hash, you MUST run 'gitolite
+ # compile' afterward, and possibly also 'gitolite trigger POST_COMPILE'
+ ROLES => {
+ READERS => 1,
+ WRITERS => 1,
+ },
+
+ # enable caching (currently only Redis). PLEASE RTFM BEFORE USING!!!
+ # CACHE => 'Redis',
+
+ # ------------------------------------------------------------------
+
+ # rc variables used by various features
+
+ # the 'info' command prints this as additional info, if it is set
+ # SITE_INFO => 'Please see http://blahblah/gitolite for more help',
+
+ # the CpuTime feature uses these
+ # display user, system, and elapsed times to user after each git operation
+ # DISPLAY_CPU_TIME => 1,
+ # display a warning if total CPU times (u, s, cu, cs) crosses this limit
+ # CPU_TIME_WARN_LIMIT => 0.1,
+
+ # the Mirroring feature needs this
+ # HOSTNAME => "foo",
+
+ # TTL for redis cache; PLEASE SEE DOCUMENTATION BEFORE UNCOMMENTING!
+ # CACHE_TTL => 600,
+
+ # ------------------------------------------------------------------
+
+ # suggested locations for site-local gitolite code (see cust.html)
+
+ # this one is managed directly on the server
+ # LOCAL_CODE => "$ENV{HOME}/local",
+
+ # or you can use this, which lets you put everything in a subdirectory
+ # called "local" in your gitolite-admin repo. For a SECURITY WARNING
+ # on this, see http://gitolite.com/gitolite/non-core.html#pushcode
+ LOCAL_CODE => "$rc{GL_ADMIN_BASE}/local",
+
+ # ------------------------------------------------------------------
+
+ # List of commands and features to enable
+
+ ENABLE => [
+
+ # COMMANDS
+
+ # These are the commands enabled by default
+ 'help',
+ 'desc',
+ 'info',
+ 'perms',
+ 'writable',
+
+ # Uncomment or add new commands here.
+ # 'create',
+ # 'fork',
+ # 'mirror',
+ # 'readme',
+ # 'sskm',
+ # 'D',
+
+ # These FEATURES are enabled by default.
+
+ # essential (unless you're using smart-http mode)
+ 'ssh-authkeys',
+
+ # creates git-config entries from gitolite.conf file entries like 'config foo.bar = baz'
+ 'git-config',
+
+ # creates git-daemon-export-ok files; if you don't use git-daemon, comment this out
+ 'daemon',
+
+ # creates projects.list file; if you don't use gitweb, comment this out
+ # 'gitweb',
+
+ # These FEATURES are disabled by default; uncomment to enable. If you
+ # need to add new ones, ask on the mailing list :-)
+
+ # user-visible behaviour
+
+ # prevent wild repos auto-create on fetch/clone
+ # 'no-create-on-read',
+ # no auto-create at all (don't forget to enable the 'create' command!)
+ # 'no-auto-create',
+
+ # access a repo by another (possibly legacy) name
+ # 'Alias',
+
+ # give some users direct shell access. See documentation in
+ # sts.html for details on the following two choices.
+ # "Shell $ENV{HOME}/.gitolite.shell-users",
+ # 'Shell alice bob',
+
+ # set default roles from lines like 'option default.roles-1 = ...', etc.
+ # 'set-default-roles',
+
+ # show more detailed messages on deny
+ # 'expand-deny-messages',
+
+ # show a message of the day
+ # 'Motd',
+
+ # system admin stuff
+
+ # enable mirroring (don't forget to set the HOSTNAME too!)
+ # 'Mirroring',
+
+ # allow people to submit pub files with more than one key in them
+ # 'ssh-authkeys-split',
+
+ # selective read control hack
+ # 'partial-copy',
+
+ # manage local, gitolite-controlled, copies of read-only upstream repos
+ # 'upstream',
+
+ # updates 'description' file instead of 'gitweb.description' config item
+ 'cgit',
+
+ # allow repo-specific hooks to be added
+ 'repo-specific-hooks',
+
+ # performance, logging, monitoring...
+
+ # be nice
+ # 'renice 10',
+
+ # log CPU times (user, system, cumulative user, cumulative system)
+ # 'CpuTime',
+
+ # syntactic_sugar for gitolite.conf and included files
+
+ # allow backslash-escaped continuation lines in gitolite.conf
+ # 'continuation-lines',
+
+ # create implicit user groups from directory names in keydir/
+ # 'keysubdirs-as-groups',
+
+ # allow simple line-oriented macros
+ # 'macros',
+
+ # Kindergarten mode
+
+ # disallow various things that sensible people shouldn't be doing anyway
+ # 'Kindergarten',
+ ],
+
+);
+
+# ------------------------------------------------------------------------------
+# per perl rules, this should be the last line in such a file:
+1;
+
+# Local variables:
+# mode: perl
+# End:
+# vim: set syn=perl:
diff --git a/tools/gitolite.html b/tools/gitolite.html
index 108d4d8..ace87d9 100644
--- a/tools/gitolite.html
+++ b/tools/gitolite.html
@@ -238,7 +238,7 @@
This document creates three scripts, one is run when gitolite receives
push to a project with hook active - deploy-web, second script is run under root
user to allow operations where gitolite user have no rights, third one
- is project specific - deploy.sh. hooks.sh are support functions for deploy hook.
+ is project specific - deploy.sh. File hooks.sh are support functions for deploy-web hook.
cron ---> deploy.sh
--
cgit 1.4.1-2-gfad0