diff options
author | ryoon <ryoon@pkgsrc.org> | 2011-11-20 19:11:49 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2011-11-20 19:11:49 +0000 |
commit | a5506f231476f7b735ad88fb19f4a5ffb6058016 (patch) | |
tree | dcfcbe2ef4b40191cf18f66aede5be7a10bc6e69 /devel/gitolite | |
parent | 54d8f18755388bd092f11bbcaaace97b4c65b534 (diff) | |
download | pkgsrc-a5506f231476f7b735ad88fb19f4a5ffb6058016.tar.gz |
Import gitolite-2.2 as devel/gitolite
Gitolite is an SSH-based gatekeeper providing access control for
a server that hosts many git repositories. Without gitolite, each
developer needing to push to one of the repositories hosted would
need a user account on that server; gitolite lets you do that just
using SSH public keys tied to a single, common, user that hosts
all the repositories.
Gitolite can restrict who can read (clone/fetch) from or write
(push) to a repository, and who can push to what branch or tag -
an important issue in corporate environments. Other features include:
* access control by branch-name or by modified file/directory;
* per-developer "personal namespace" prefixes;
* simple but powerful configuration file syntax (with validation);
* config files (and authority for maintaining them) can be split;
* easy integration with gitweb;
* comprehensive logging;
* easy migration from gitosis.
Diffstat (limited to 'devel/gitolite')
-rw-r--r-- | devel/gitolite/DESCR | 18 | ||||
-rw-r--r-- | devel/gitolite/MESSAGE | 39 | ||||
-rw-r--r-- | devel/gitolite/Makefile | 38 | ||||
-rw-r--r-- | devel/gitolite/PLIST | 28 | ||||
-rw-r--r-- | devel/gitolite/distinfo | 7 | ||||
-rw-r--r-- | devel/gitolite/patches/patch-contrib_adc_watch | 22 | ||||
-rw-r--r-- | devel/gitolite/patches/patch-src_gl-system-install | 52 |
7 files changed, 204 insertions, 0 deletions
diff --git a/devel/gitolite/DESCR b/devel/gitolite/DESCR new file mode 100644 index 00000000000..861d3ad5c31 --- /dev/null +++ b/devel/gitolite/DESCR @@ -0,0 +1,18 @@ +Gitolite is an SSH-based gatekeeper providing access control for +a server that hosts many git repositories. Without gitolite, each +developer needing to push to one of the repositories hosted would +need a user account on that server; gitolite lets you do that just +using SSH public keys tied to a single, common, user that hosts +all the repositories. + +Gitolite can restrict who can read (clone/fetch) from or write +(push) to a repository, and who can push to what branch or tag - +an important issue in corporate environments. Other features include: + +* access control by branch-name or by modified file/directory; +* per-developer "personal namespace" prefixes; +* simple but powerful configuration file syntax (with validation); +* config files (and authority for maintaining them) can be split; +* easy integration with gitweb; +* comprehensive logging; +* easy migration from gitosis. diff --git a/devel/gitolite/MESSAGE b/devel/gitolite/MESSAGE new file mode 100644 index 00000000000..5a40d3a9cd6 --- /dev/null +++ b/devel/gitolite/MESSAGE @@ -0,0 +1,39 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ + +To use gitolite, you will need to perform the following steps. + +1. Create a new user/group, for example, git/git. + + On server, + # groupadd git + # useradd -m -g git git + +2. login to new user git, create ssh public key, and copy public key + file to user git's home directory on server. + + $ ssh-keygen -t rsa -f git-admin + $ cp git-admin.pub ~/.ssh/ + $ scp ~/git-admin.pub gitserver:~/.ssh/ + +3. Setup gitolite. + + On server, + $ gl-setup ~/git-admin.pub + + And edit config file. + +4. Setup ~/.ssh/config on client. + Add the following lines. + + host gitserver + user git + hostname RealGitServerName + port 22 + identityfile ~/.ssh/git-admin + +5. For testing, please clone testing repository. + + On client, + $ git clone ssh://gitserver/testing +=========================================================================== diff --git a/devel/gitolite/Makefile b/devel/gitolite/Makefile new file mode 100644 index 00000000000..d22a9a7ca94 --- /dev/null +++ b/devel/gitolite/Makefile @@ -0,0 +1,38 @@ +# $NetBSD: Makefile,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ +# + +DISTNAME= sitaramc-gitolite-v2.2-0-g15b17d7 +PKGNAME= gitolite-2.2 +CATEGORIES= devel net +MASTER_SITES= -https://github.com/sitaramc/gitolite/tarball/v2.2 + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/sitaramc/gitolite/wiki +COMMENT= Gitolite allows you to host Git repositories easily and securely +LICENSE= gnu-gpl-v2 + +PKG_DESTDIR_SUPPORT= user-destdir + +DEPENDS+= scmgit-base-[0-9]*:../../devel/scmgit-base + +USE_LANGUAGES= # none +USE_TOOLS+= perl bash + +# Force using "curl" for fetching the distribution file. It is only available +# over HTTPS and "curl" is the only fetch program which always supports HTTPS. +FETCH_USING= curl + +WRKSRC= ${WRKDIR}/sitaramc-gitolite-0ffadc1 + +NO_BUILD= yes + +REPLACE_PERL= src/gl-* src/sshkeys-lint hooks/common/update +REPLACE_BASH= src/gl-* hooks/common/* + +do-install: + ${RM} ${WRKSRC}/src/gl-system-install.orig + ${WRKSRC}/src/gl-system-install ${PREFIX}/bin \ + ${PREFIX}/share/gitolite/conf ${PREFIX}/share/gitolite/hooks \ + ${DESTDIR} + +.include "../../mk/bsd.pkg.mk" diff --git a/devel/gitolite/PLIST b/devel/gitolite/PLIST new file mode 100644 index 00000000000..f15be11d82d --- /dev/null +++ b/devel/gitolite/PLIST @@ -0,0 +1,28 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ +bin/gitolite.pm +bin/gitolite_env.pm +bin/gitolite_rc.pm +bin/gl-admin-push +bin/gl-auth-command +bin/gl-compile-conf +bin/gl-conf-convert +bin/gl-dryrun +bin/gl-install +bin/gl-mirror-push +bin/gl-mirror-shell +bin/gl-query-rc +bin/gl-setup +bin/gl-setup-authkeys +bin/gl-system-install +bin/gl-time +bin/gl-tool +bin/sshkeys-lint +share/gitolite/conf/VERSION +share/gitolite/conf/example.conf +share/gitolite/conf/example.gitolite.rc +share/gitolite/hooks/common/gitolite-hooked +share/gitolite/hooks/common/gl-pre-git.hub-sample +share/gitolite/hooks/common/post-receive.mirrorpush +share/gitolite/hooks/common/update +share/gitolite/hooks/common/update.secondary.sample +share/gitolite/hooks/gitolite-admin/post-update diff --git a/devel/gitolite/distinfo b/devel/gitolite/distinfo new file mode 100644 index 00000000000..dd518f2e349 --- /dev/null +++ b/devel/gitolite/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ + +SHA1 (sitaramc-gitolite-v2.2-0-g15b17d7.tar.gz) = 395f66b984073af9de43598e25ff9f828bd65f7c +RMD160 (sitaramc-gitolite-v2.2-0-g15b17d7.tar.gz) = 7b8963cdb309e99d9ddffacc8877286a736ab16c +Size (sitaramc-gitolite-v2.2-0-g15b17d7.tar.gz) = 240960 bytes +SHA1 (patch-contrib_adc_watch) = bab42eb263900466aaa106a09d2bf3180be204ea +SHA1 (patch-src_gl-system-install) = 849d8a7b350f5e6ef4e35b35cdfd1cbcf05c964d diff --git a/devel/gitolite/patches/patch-contrib_adc_watch b/devel/gitolite/patches/patch-contrib_adc_watch new file mode 100644 index 00000000000..78d86caee5f --- /dev/null +++ b/devel/gitolite/patches/patch-contrib_adc_watch @@ -0,0 +1,22 @@ +$NetBSD: patch-contrib_adc_watch,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ + +* Improve portability + +--- contrib/adc/watch.orig 2011-11-16 00:23:56.000000000 +0000 ++++ contrib/adc/watch +@@ -75,11 +75,11 @@ cd $GL_REPO_BASE_ABS/$repo.git + grep "^$GL_USER $identarg$" gl-watchers > /dev/null + found=$? + +-[ $found -eq 0 -a $cmd == "add" ] && die "There is already a watch \"$identarg\" for user $GL_USER" +-[ $found -ne 0 -a $cmd == "remove" ] && die "No watch \"$identarg\" found for user $GL_USER" ++[ $found -eq 0 -a $cmd = "add" ] && die "There is already a watch \"$identarg\" for user $GL_USER" ++[ $found -ne 0 -a $cmd = "remove" ] && die "No watch \"$identarg\" found for user $GL_USER" + +-[ $cmd == "add" ] && echo "$GL_USER $identarg" >> gl-watchers && { echo "Added a watch \"$identarg\" for user $GL_USER"; exit 0; } ++[ $cmd = "add" ] && echo "$GL_USER $identarg" >> gl-watchers && { echo "Added a watch \"$identarg\" for user $GL_USER"; exit 0; } + +-[ $cmd == "remove" ] && sed -i -e "/^$GL_USER $identarg$/d" gl-watchers && { echo "Removed a watch \"$identarg\" for user $GL_USER"; exit 0; } ++[ $cmd = "remove" ] && sed -i -e "/^$GL_USER $identarg$/d" gl-watchers && { echo "Removed a watch \"$identarg\" for user $GL_USER"; exit 0; } + + die "16 cores, 320GB of RAM, 4TB of disk, and you give me a command I am not programmed to do. Humans..." diff --git a/devel/gitolite/patches/patch-src_gl-system-install b/devel/gitolite/patches/patch-src_gl-system-install new file mode 100644 index 00000000000..d1a60e15bb3 --- /dev/null +++ b/devel/gitolite/patches/patch-src_gl-system-install @@ -0,0 +1,52 @@ +$NetBSD: patch-src_gl-system-install,v 1.1.1.1 2011/11/20 19:11:49 ryoon Exp $ + +* Do not check gl-setup in $PATH, it is useless with staged installation. + +--- src/gl-system-install.orig 2011-11-20 12:03:57.000000000 +0000 ++++ src/gl-system-install +@@ -92,24 +92,24 @@ cp -R hooks/* $buildroot$gl_hooks_dir || + # ---- + + # check if $gl_bin_dir is in $PATH and advise the user if needed +-which=`which gl-setup 2>/dev/null` +- +-path_advice=" +-Since gl-setup MUST be run from the PATH (and not as src/gl-setup or such), +-you must fix this before running gl-setup. The simplest way is to add +- +- PATH=$gl_bin_dir:\$PATH +- +-to the end of your bashrc or similar file. You can even simply run that +-command manually each time you log in and want to run a gitolite command." +- +-[ -z "$which" ] && die " ***** WARNING ***** +-gl-setup is not in your \$PATH. +-$path_advice" +- +-which=`dirname $which` +-[ "$which" != "$gl_bin_dir" ] && die " ***** WARNING ***** +-$which precedes $gl_bin_dir in your \$PATH, +-and it *also* contains gl-setup. This is almost certainly going to confuse +-you or me later. +-$path_advice" ++#which=`which gl-setup 2>/dev/null` ++# ++#path_advice=" ++#Since gl-setup MUST be run from the PATH (and not as src/gl-setup or such), ++#you must fix this before running gl-setup. The simplest way is to add ++# ++# PATH=$gl_bin_dir:\$PATH ++# ++#to the end of your bashrc or similar file. You can even simply run that ++#command manually each time you log in and want to run a gitolite command." ++# ++#[ -z "$which" ] && die " ***** WARNING ***** ++#gl-setup is not in your \$PATH. ++#$path_advice" ++# ++#which=`dirname $which` ++#[ "$which" != "$gl_bin_dir" ] && die " ***** WARNING ***** ++#$which precedes $gl_bin_dir in your \$PATH, ++#and it *also* contains gl-setup. This is almost certainly going to confuse ++#you or me later. ++#$path_advice" |