ports/159260: [NEW PORT] devel/gitolite: An access control layer on top of git

milki milki at rescomp.berkeley.edu
Thu Jul 28 15:50:10 UTC 2011


>Number:         159260
>Category:       ports
>Synopsis:       [NEW PORT] devel/gitolite: An access control layer on top of git
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 28 15:50:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     milki
>Release:        FreeBSD 8.2-RELEASE amd64
>Organization:
UC Berkeley - RSSP-IT
>Environment:
System: FreeBSD cibo.ircmylife.com 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
>Description:
Gitolite is an access control layer on top of git, which allows access control
down to the branch level, including specifying who can and cannot rewind a
given branch.

Gitolite lets you use a single user on a server to host many git repositories
and provide access to many developers, without having to give them real
userids on or shell access to the server. Authentication is most commonly done
using sshd, but you can also use httpd if you prefer.

Gitolite can restrict who can read from (clone/fetch) or write to (push) a
repository. It can also restrict who can push to what branch or tag, which is
very important in a corporate environment. 

WWW: https://github.com/sitaramc/gitolite


Note: I'd like the committer to also host the tarball
http://milki.github.com/gitolite/gitolite-2.0.2.tar.gz

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- gitolite-2.0.2.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	gitolite
#	gitolite/Makefile
#	gitolite/distinfo
#	gitolite/pkg-descr
#	gitolite/pkg-plist
#	gitolite/files
#	gitolite/files/patch-gl-install
#	gitolite/files/auth-command.in
#	gitolite/files/patch-gl-setup
#	gitolite/files/pkg-message.in
#	gitolite/files/setup.in
#
echo c - gitolite
mkdir -p gitolite > /dev/null 2>&1
echo x - gitolite/Makefile
sed 's/^X//' >gitolite/Makefile << '89b8dc285ec59aad5ce501212bc8d885'
X# New ports collection makefile for:	gitolite
X# Date created:				07-28-2011
X# Whom:					milki <milki at rescomp.berkeley.edu>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	gitolite
XPORTVERSION=	2.0.2
XCATEGORIES=	devel
XMASTER_SITES=	http://milki.github.com/${PORTNAME}/
X
XMAINTAINER=	milki at rescomp.berkeley.edu
XCOMMENT=	An access control layer on top of git
X
XLICENSE=	GPLv2
X
XRUN_DEPENDS=	git>=0:${PORTSDIR}/devel/git
X
XUSE_PERL5=	yes
X
XSUB_FILES=	pkg-message
X
XOPTIONS=	GITUSER	"Create git user as gitolite provider" On
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITHOUT_GITUSER)
XUSERS=		git
XGROUPS=		${USERS}
XPLIST_SUB+=	GITUSER=""
X.else
XPLIST_SUB+=	GITUSER="@comment "
X.endif
X
XGLAUTHCOMMAND=	\
X\#!/bin/sh\n \
Xexec ${PREFIX}/libexec/gitolite/gl-auth-command \"\$$@\"\n
X
XGLSETUP=	\
X\#!/bin/sh\n \
Xexec ${PREFIX}/libexec/gitolite/gl-setup \"\$$@\"\n
X
Xpost-patch:
X	@${ECHO} -e "${GLAUTHCOMMAND}" > ${WRKDIR}/auth-command
X	@${ECHO} -e "${GLSETUP}" > ${WRKDIR}/setup
X
Xpre-build:
X.for FILE in gl-auth-command gl-compile-conf gl-conf-convert gl-dont-panic gl-mirror-shell gl-mirror-sync gl-query-rc gl-setup gl-setup-authkeys gl-time gl-tool sshkeys-lint
X	${REINPLACE_CMD} \
X		-Ee '1s|#!/usr/bin/perl|#!${PERL}|' \
X		${WRKSRC}/src/${FILE}
X.endfor
X
Xdo-build:
X	${RM} ${WRKSRC}/src/gl-easy-install
X	${RM} ${WRKSRC}/src/gl-system-install
X	${REINPLACE_CMD} \
X		-E 's%^GL_PACKAGE_CONF=.*%GL_PACKAGE_CONF=${PREFIX}/etc/gitolite;%' \
X		${WRKSRC}/src/gl-setup
X	${REINPLACE_CMD} \
X		-E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_CONF[[:blank:]]*=.*%\$$GL_PACKAGE_CONF = '${PREFIX}/etc/gitolite';%" \
X		${WRKSRC}/conf/example.gitolite.rc
X	${REINPLACE_CMD} \
X		-E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_HOOKS[[:blank:]]*=.*%\$$GL_PACKAGE_HOOKS = '${DATADIR}/hooks';%" \
X		${WRKSRC}/conf/example.gitolite.rc
X
Xpost-build:
X	@${FIND} ${WRKSRC} -name "*.bak" -delete
X	@${FIND} ${WRKSRC} -name "*.orig" -delete
X
Xdo-install:
X	${MKDIR} ${PREFIX}/libexec/gitolite
X	${INSTALL_SCRIPT} ${WRKSRC}/src/* ${PREFIX}/libexec/gitolite/
X	${MKDIR} ${PREFIX}/etc/gitolite
X	${INSTALL_DATA} ${WRKSRC}/conf/* ${PREFIX}/etc/gitolite/
X	${MKDIR} ${PREFIX}/share/gitolite/hooks
X	(cd ${WRKSRC}/hooks && ${COPYTREE_SHARE} \* ${DATADIR}/hooks)
X	${INSTALL_SCRIPT} ${WRKDIR}/auth-command ${PREFIX}/bin/gl-auth-command
X	${INSTALL_SCRIPT} ${WRKDIR}/setup ${PREFIX}/bin/gl-setup
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
89b8dc285ec59aad5ce501212bc8d885
echo x - gitolite/distinfo
sed 's/^X//' >gitolite/distinfo << '2c4856d0bd3e70e00806b2ffcdcbdccb'
XSHA256 (gitolite-2.0.2.tar.gz) = 49d59db565d071f8f81bb11c9aff6b6fae995e0041ca458a1d3d780685c4f7f6
XSIZE (gitolite-2.0.2.tar.gz) = 225507
2c4856d0bd3e70e00806b2ffcdcbdccb
echo x - gitolite/pkg-descr
sed 's/^X//' >gitolite/pkg-descr << '6c1904a934c427230faee2b5afc864c4'
XGitolite is an access control layer on top of git, which allows access control
Xdown to the branch level, including specifying who can and cannot rewind a
Xgiven branch.
X
XGitolite lets you use a single user on a server to host many git repositories
Xand provide access to many developers, without having to give them real
Xuserids on or shell access to the server. Authentication is most commonly done
Xusing sshd, but you can also use httpd if you prefer.
X
XGitolite can restrict who can read from (clone/fetch) or write to (push) a
Xrepository. It can also restrict who can push to what branch or tag, which is
Xvery important in a corporate environment. 
X
XWWW: https://github.com/sitaramc/gitolite
6c1904a934c427230faee2b5afc864c4
echo x - gitolite/pkg-plist
sed 's/^X//' >gitolite/pkg-plist << '2e8f2ea13cbc85c3cf43f826d69a6c02'
Xbin/gl-auth-command
Xbin/gl-setup
Xetc/gitolite/example.conf
Xetc/gitolite/example.gitolite.rc
Xlibexec/gitolite/gitolite.pm
Xlibexec/gitolite/gitolite_env.pm
Xlibexec/gitolite/gitolite_rc.pm
Xlibexec/gitolite/gl-auth-command
Xlibexec/gitolite/gl-compile-conf
Xlibexec/gitolite/gl-conf-convert
Xlibexec/gitolite/gl-dont-panic
Xlibexec/gitolite/gl-install
Xlibexec/gitolite/gl-mirror-shell
Xlibexec/gitolite/gl-mirror-sync
Xlibexec/gitolite/gl-query-rc
Xlibexec/gitolite/gl-setup
Xlibexec/gitolite/gl-setup-authkeys
Xlibexec/gitolite/gl-time
Xlibexec/gitolite/gl-tool
Xlibexec/gitolite/sshkeys-lint
X%%DATADIR%%/hooks/common/gitolite-hooked
X%%DATADIR%%/hooks/common/gl-pre-git.hub-sample
X%%DATADIR%%/hooks/common/post-receive.mirrorpush
X%%DATADIR%%/hooks/common/update
X%%DATADIR%%/hooks/common/update.secondary.sample
X%%DATADIR%%/hooks/gitolite-admin/post-update
X at dirrm share/gitolite/hooks/gitolite-admin
X at dirrm share/gitolite/hooks/common
X at dirrm share/gitolite/hooks
X at dirrm share/gitolite
X at dirrm libexec/gitolite
X at dirrm etc/gitolite
X%%GITUSER%%@dirrmtry git
2e8f2ea13cbc85c3cf43f826d69a6c02
echo c - gitolite/files
mkdir -p gitolite/files > /dev/null 2>&1
echo x - gitolite/files/patch-gl-install
sed 's/^X//' >gitolite/files/patch-gl-install << 'c9650b65521e9c69fc3cab1314808434'
X--- src/gl-install	2011-07-26 11:16:41.000000000 -0700
X+++ src/gl-install	2011-07-28 07:30:17.000000000 -0700
X@@ -70,7 +70,7 @@
X 
X # "src" and "doc" will be overwritten on each install, but not conf
X if ($GL_PACKAGE_HOOKS) {
X-    system("cp -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR");
X+    system("cp -f -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR");
X } else {
X     system("cp -R -p $ENV{GL_BINDIR}/../src $ENV{GL_BINDIR}/../doc $ENV{GL_BINDIR}/../hooks $GL_ADMINDIR");
X     system("cp       $ENV{GL_BINDIR}/../conf/VERSION                        $GL_ADMINDIR/conf");
c9650b65521e9c69fc3cab1314808434
echo x - gitolite/files/auth-command.in
sed 's/^X//' >gitolite/files/auth-command.in << 'c79bade8c37d0567416fbfe49c4f4960'
X--- /dev/null	2011-07-27 18:40:16.000000000 -0700
X+++ auth-command	2011-07-27 18:39:44.187465000 -0700
X@@ -0,0 +1,2 @@
X+#!%%SH%%
X+exec %%PREFIX%%/libexec/gl-auth-command
c79bade8c37d0567416fbfe49c4f4960
echo x - gitolite/files/patch-gl-setup
sed 's/^X//' >gitolite/files/patch-gl-setup << '6fe59f703087c482f9bb3b8e132fa3e8'
X--- src/gl-setup	2011-07-26 11:16:41.000000000 -0700
X+++ src/gl-setup	2011-07-28 04:02:41.000000000 -0700
X@@ -107,7 +107,7 @@
X 
X # now we get to gitolite itself
X 
X-gl-install -q
X+${GL_BINDIR}/gl-install -q
X 
X [ -f $GL_ADMINDIR/conf/gitolite.conf ] || {
X     cat <<EOF | cut -c9- > $GL_ADMINDIR/conf/gitolite.conf
X@@ -121,7 +121,7 @@
X [ -n "$pubkey_file" ] && cp $pubkey_file $GL_ADMINDIR/keydir
X 
X touch $HOME/.ssh/authorized_keys
X-gl-compile-conf -q
X+${GL_BINDIR}/gl-compile-conf -q
X 
X # setup push-to-admin
X (
X@@ -133,4 +133,4 @@
X 
X # now that the admin repo is created, you have to set the hooks properly; best
X # do it by running install again
X-gl-install -q
X+${GL_BINDIR}/gl-install -q
6fe59f703087c482f9bb3b8e132fa3e8
echo x - gitolite/files/pkg-message.in
sed 's/^X//' >gitolite/files/pkg-message.in << '0e093054fbc390036401782db2f3cff1'
X==============================================================================
X
XFinal gitolite installation instructions:
X
XAny ssh user can be a gitolite provider. Simply run the following command as
Xthe user:
X
X%%PREFIX%%/bin/gl-setup /path/to/admin.ssh.key.pub
X
XThis will setup up the configuration files for gitolite, designating where the
Xrepositories are located and other options.
X
XThe admin ssh key allows full access to the gitolite-admin repository where
Xadditional users and repositories can be configured.
X
XBy default, the git user is created for use by gitolite.
X
X==============================================================================
0e093054fbc390036401782db2f3cff1
echo x - gitolite/files/setup.in
sed 's/^X//' >gitolite/files/setup.in << '8b2817b2bd98341744be63ab027b06e8'
X--- /dev/null	2011-07-27 18:40:18.000000000 -0700
X+++ setup	2011-07-27 18:39:46.893528000 -0700
X@@ -0,0 +1,2 @@
X+#!%%SH%%
X+exec %%PREFIX%%/libexec/gl-setup
8b2817b2bd98341744be63ab027b06e8
exit
--- gitolite-2.0.2.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list