diff options
author | tdb <tdb@FreeBSD.org> | 2011-07-30 06:16:45 +0800 |
---|---|---|
committer | tdb <tdb@FreeBSD.org> | 2011-07-30 06:16:45 +0800 |
commit | 6991bf3e18c25c76fb009d7a2f89fd87d42d26d6 (patch) | |
tree | 144868a0e0cf7d6ba79d3762ef6ea6455bc42062 | |
parent | 0d05b7bb91263f8c925b103c0eda448ba32c4a14 (diff) | |
download | freebsd-ports-gnome-6991bf3e18c25c76fb009d7a2f89fd87d42d26d6.tar.gz freebsd-ports-gnome-6991bf3e18c25c76fb009d7a2f89fd87d42d26d6.tar.zst freebsd-ports-gnome-6991bf3e18c25c76fb009d7a2f89fd87d42d26d6.zip |
- Add new port gitolite:
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
PR: ports/159260
Submitted by: milki <milki at rescomp.berkeley.edu>
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/gitolite/Makefile | 87 | ||||
-rw-r--r-- | devel/gitolite/distinfo | 2 | ||||
-rw-r--r-- | devel/gitolite/files/patch-gl-install | 11 | ||||
-rw-r--r-- | devel/gitolite/files/patch-gl-setup | 26 | ||||
-rw-r--r-- | devel/gitolite/files/pkg-message.in | 18 | ||||
-rw-r--r-- | devel/gitolite/pkg-descr | 14 | ||||
-rw-r--r-- | devel/gitolite/pkg-plist | 34 | ||||
-rw-r--r-- | devel/gitolite2/Makefile | 87 | ||||
-rw-r--r-- | devel/gitolite2/distinfo | 2 | ||||
-rw-r--r-- | devel/gitolite2/files/patch-gl-install | 11 | ||||
-rw-r--r-- | devel/gitolite2/files/patch-gl-setup | 26 | ||||
-rw-r--r-- | devel/gitolite2/files/pkg-message.in | 18 | ||||
-rw-r--r-- | devel/gitolite2/pkg-descr | 14 | ||||
-rw-r--r-- | devel/gitolite2/pkg-plist | 34 |
15 files changed, 385 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index bce785526818..0f81b29cbc21 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -476,6 +476,7 @@ SUBDIR += git-annex SUBDIR += git-merge-changelog SUBDIR += gitg + SUBDIR += gitolite SUBDIR += gittrac SUBDIR += glade2 SUBDIR += glade3 diff --git a/devel/gitolite/Makefile b/devel/gitolite/Makefile new file mode 100644 index 000000000000..0abe281c79b5 --- /dev/null +++ b/devel/gitolite/Makefile @@ -0,0 +1,87 @@ +# New ports collection makefile for: gitolite +# Date created: 07-28-2011 +# Whom: milki <milki@rescomp.berkeley.edu> +# +# $FreeBSD$ +# + +PORTNAME= gitolite +PORTVERSION= 2.0.2 +CATEGORIES= devel +MASTER_SITES= http://milki.github.com/${PORTNAME}/ \ + LOCAL/tdb + +MAINTAINER= milki@rescomp.berkeley.edu +COMMENT= An access control layer on top of git + +LICENSE= GPLv2 + +RUN_DEPENDS= git>=0:${PORTSDIR}/devel/git + +USE_PERL5= yes + +SUB_FILES= pkg-message + +OPTIONS= GITUSER "Create git user as gitolite provider" On + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_GITUSER) +USERS= git +GROUPS= ${USERS} +PLIST_SUB+= GITUSER="" +.else +PLIST_SUB+= GITUSER="@comment " +.endif + +GLAUTHCOMMAND= \ +\#!/bin/sh\n \ +exec ${PREFIX}/libexec/gitolite/gl-auth-command \"\$$@\"\n + +GLSETUP= \ +\#!/bin/sh\n \ +exec ${PREFIX}/libexec/gitolite/gl-setup \"\$$@\"\n + +post-patch: + @${ECHO} -e "${GLAUTHCOMMAND}" > ${WRKDIR}/auth-command + @${ECHO} -e "${GLSETUP}" > ${WRKDIR}/setup +.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 + @${REINPLACE_CMD} \ + -Ee '1s|#!/usr/bin/perl|#!${PERL}|' \ + ${WRKSRC}/src/${FILE} +.endfor + @${REINPLACE_CMD} \ + -Ee '1s|#!/usr/bin/perl|#!${PERL}|' \ + ${WRKSRC}/hooks/common/update + +do-build: + -@${RM} ${WRKSRC}/src/gl-easy-install + -@${RM} ${WRKSRC}/src/gl-system-install + @${REINPLACE_CMD} \ + -E 's%^GL_PACKAGE_CONF=.*%GL_PACKAGE_CONF=${DATADIR}/conf;%' \ + ${WRKSRC}/src/gl-setup + @${REINPLACE_CMD} \ + -E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_CONF[[:blank:]]*=.*%\$$GL_PACKAGE_CONF = '${DATADIR}/conf';%" \ + ${WRKSRC}/conf/example.gitolite.rc + @${REINPLACE_CMD} \ + -E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_HOOKS[[:blank:]]*=.*%\$$GL_PACKAGE_HOOKS = '${DATADIR}/hooks';%" \ + ${WRKSRC}/conf/example.gitolite.rc + +post-build: + @${FIND} ${WRKSRC} -name "*.bak" -delete + @${FIND} ${WRKSRC} -name "*.orig" -delete + +do-install: + ${MKDIR} ${PREFIX}/libexec/gitolite + ${INSTALL_SCRIPT} ${WRKSRC}/src/* ${PREFIX}/libexec/gitolite/ + ${MKDIR} ${DATADIR}/conf + ${INSTALL_DATA} ${WRKSRC}/conf/* ${DATADIR}/conf + ${MKDIR} ${DATADIR}/hooks + (cd ${WRKSRC}/hooks && ${COPYTREE_BIN} \* ${DATADIR}/hooks) + ${INSTALL_SCRIPT} ${WRKDIR}/auth-command ${PREFIX}/bin/gl-auth-command + ${INSTALL_SCRIPT} ${WRKDIR}/setup ${PREFIX}/bin/gl-setup + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/devel/gitolite/distinfo b/devel/gitolite/distinfo new file mode 100644 index 000000000000..d4b73e476df6 --- /dev/null +++ b/devel/gitolite/distinfo @@ -0,0 +1,2 @@ +SHA256 (gitolite-2.0.2.tar.gz) = e3f69f069087aa7c09ae98d0e89b1758de69ee98133e721da325163b8dd9ebd2 +SIZE (gitolite-2.0.2.tar.gz) = 225780 diff --git a/devel/gitolite/files/patch-gl-install b/devel/gitolite/files/patch-gl-install new file mode 100644 index 000000000000..1d2b3adf43b7 --- /dev/null +++ b/devel/gitolite/files/patch-gl-install @@ -0,0 +1,11 @@ +--- src/gl-install 2011-07-26 11:16:41.000000000 -0700 ++++ src/gl-install 2011-07-28 07:30:17.000000000 -0700 +@@ -70,7 +70,7 @@ + + # "src" and "doc" will be overwritten on each install, but not conf + if ($GL_PACKAGE_HOOKS) { +- system("cp -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR"); ++ system("cp -f -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR"); + } else { + system("cp -R -p $ENV{GL_BINDIR}/../src $ENV{GL_BINDIR}/../doc $ENV{GL_BINDIR}/../hooks $GL_ADMINDIR"); + system("cp $ENV{GL_BINDIR}/../conf/VERSION $GL_ADMINDIR/conf"); diff --git a/devel/gitolite/files/patch-gl-setup b/devel/gitolite/files/patch-gl-setup new file mode 100644 index 000000000000..c43173fe9d7e --- /dev/null +++ b/devel/gitolite/files/patch-gl-setup @@ -0,0 +1,26 @@ +--- src/gl-setup 2011-07-26 11:16:41.000000000 -0700 ++++ src/gl-setup 2011-07-28 04:02:41.000000000 -0700 +@@ -107,7 +107,7 @@ + + # now we get to gitolite itself + +-gl-install -q ++${GL_BINDIR}/gl-install -q + + [ -f $GL_ADMINDIR/conf/gitolite.conf ] || { + cat <<EOF | cut -c9- > $GL_ADMINDIR/conf/gitolite.conf +@@ -121,7 +121,7 @@ + [ -n "$pubkey_file" ] && cp $pubkey_file $GL_ADMINDIR/keydir + + touch $HOME/.ssh/authorized_keys +-gl-compile-conf -q ++${GL_BINDIR}/gl-compile-conf -q + + # setup push-to-admin + ( +@@ -133,4 +133,4 @@ + + # now that the admin repo is created, you have to set the hooks properly; best + # do it by running install again +-gl-install -q ++${GL_BINDIR}/gl-install -q diff --git a/devel/gitolite/files/pkg-message.in b/devel/gitolite/files/pkg-message.in new file mode 100644 index 000000000000..e385c83b2712 --- /dev/null +++ b/devel/gitolite/files/pkg-message.in @@ -0,0 +1,18 @@ +============================================================================== + +Final gitolite installation instructions: + +Any ssh user can be a gitolite provider. Simply run the following command as +the user: + +%%PREFIX%%/bin/gl-setup /path/to/admin.ssh.key.pub + +This will setup up the configuration files for gitolite, designating where the +repositories are located and other options. + +The admin ssh key allows full access to the gitolite-admin repository where +additional users and repositories can be configured. + +By default, the git user is created for use by gitolite. + +============================================================================== diff --git a/devel/gitolite/pkg-descr b/devel/gitolite/pkg-descr new file mode 100644 index 000000000000..89a4b8eb40e1 --- /dev/null +++ b/devel/gitolite/pkg-descr @@ -0,0 +1,14 @@ +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 diff --git a/devel/gitolite/pkg-plist b/devel/gitolite/pkg-plist new file mode 100644 index 000000000000..cd0c8dce9cd5 --- /dev/null +++ b/devel/gitolite/pkg-plist @@ -0,0 +1,34 @@ +bin/gl-auth-command +bin/gl-setup +libexec/gitolite/gitolite.pm +libexec/gitolite/gitolite_env.pm +libexec/gitolite/gitolite_rc.pm +libexec/gitolite/gl-auth-command +libexec/gitolite/gl-compile-conf +libexec/gitolite/gl-conf-convert +libexec/gitolite/gl-dont-panic +libexec/gitolite/gl-install +libexec/gitolite/gl-mirror-shell +libexec/gitolite/gl-mirror-sync +libexec/gitolite/gl-query-rc +libexec/gitolite/gl-setup +libexec/gitolite/gl-setup-authkeys +libexec/gitolite/gl-time +libexec/gitolite/gl-tool +libexec/gitolite/sshkeys-lint +%%DATADIR%%/conf/example.conf +%%DATADIR%%/conf/example.gitolite.rc +%%DATADIR%%/conf/VERSION +%%DATADIR%%/hooks/common/gitolite-hooked +%%DATADIR%%/hooks/common/gl-pre-git.hub-sample +%%DATADIR%%/hooks/common/post-receive.mirrorpush +%%DATADIR%%/hooks/common/update +%%DATADIR%%/hooks/common/update.secondary.sample +%%DATADIR%%/hooks/gitolite-admin/post-update +@dirrm %%DATADIR%%/conf +@dirrm %%DATADIR%%/hooks/gitolite-admin +@dirrm %%DATADIR%%/hooks/common +@dirrm %%DATADIR%%/hooks +@dirrm %%DATADIR%% +@dirrm libexec/gitolite +%%GITUSER%%@dirrmtry git diff --git a/devel/gitolite2/Makefile b/devel/gitolite2/Makefile new file mode 100644 index 000000000000..0abe281c79b5 --- /dev/null +++ b/devel/gitolite2/Makefile @@ -0,0 +1,87 @@ +# New ports collection makefile for: gitolite +# Date created: 07-28-2011 +# Whom: milki <milki@rescomp.berkeley.edu> +# +# $FreeBSD$ +# + +PORTNAME= gitolite +PORTVERSION= 2.0.2 +CATEGORIES= devel +MASTER_SITES= http://milki.github.com/${PORTNAME}/ \ + LOCAL/tdb + +MAINTAINER= milki@rescomp.berkeley.edu +COMMENT= An access control layer on top of git + +LICENSE= GPLv2 + +RUN_DEPENDS= git>=0:${PORTSDIR}/devel/git + +USE_PERL5= yes + +SUB_FILES= pkg-message + +OPTIONS= GITUSER "Create git user as gitolite provider" On + +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_GITUSER) +USERS= git +GROUPS= ${USERS} +PLIST_SUB+= GITUSER="" +.else +PLIST_SUB+= GITUSER="@comment " +.endif + +GLAUTHCOMMAND= \ +\#!/bin/sh\n \ +exec ${PREFIX}/libexec/gitolite/gl-auth-command \"\$$@\"\n + +GLSETUP= \ +\#!/bin/sh\n \ +exec ${PREFIX}/libexec/gitolite/gl-setup \"\$$@\"\n + +post-patch: + @${ECHO} -e "${GLAUTHCOMMAND}" > ${WRKDIR}/auth-command + @${ECHO} -e "${GLSETUP}" > ${WRKDIR}/setup +.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 + @${REINPLACE_CMD} \ + -Ee '1s|#!/usr/bin/perl|#!${PERL}|' \ + ${WRKSRC}/src/${FILE} +.endfor + @${REINPLACE_CMD} \ + -Ee '1s|#!/usr/bin/perl|#!${PERL}|' \ + ${WRKSRC}/hooks/common/update + +do-build: + -@${RM} ${WRKSRC}/src/gl-easy-install + -@${RM} ${WRKSRC}/src/gl-system-install + @${REINPLACE_CMD} \ + -E 's%^GL_PACKAGE_CONF=.*%GL_PACKAGE_CONF=${DATADIR}/conf;%' \ + ${WRKSRC}/src/gl-setup + @${REINPLACE_CMD} \ + -E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_CONF[[:blank:]]*=.*%\$$GL_PACKAGE_CONF = '${DATADIR}/conf';%" \ + ${WRKSRC}/conf/example.gitolite.rc + @${REINPLACE_CMD} \ + -E "s%^#[[:blank:]]*\\\$$GL_PACKAGE_HOOKS[[:blank:]]*=.*%\$$GL_PACKAGE_HOOKS = '${DATADIR}/hooks';%" \ + ${WRKSRC}/conf/example.gitolite.rc + +post-build: + @${FIND} ${WRKSRC} -name "*.bak" -delete + @${FIND} ${WRKSRC} -name "*.orig" -delete + +do-install: + ${MKDIR} ${PREFIX}/libexec/gitolite + ${INSTALL_SCRIPT} ${WRKSRC}/src/* ${PREFIX}/libexec/gitolite/ + ${MKDIR} ${DATADIR}/conf + ${INSTALL_DATA} ${WRKSRC}/conf/* ${DATADIR}/conf + ${MKDIR} ${DATADIR}/hooks + (cd ${WRKSRC}/hooks && ${COPYTREE_BIN} \* ${DATADIR}/hooks) + ${INSTALL_SCRIPT} ${WRKDIR}/auth-command ${PREFIX}/bin/gl-auth-command + ${INSTALL_SCRIPT} ${WRKDIR}/setup ${PREFIX}/bin/gl-setup + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/devel/gitolite2/distinfo b/devel/gitolite2/distinfo new file mode 100644 index 000000000000..d4b73e476df6 --- /dev/null +++ b/devel/gitolite2/distinfo @@ -0,0 +1,2 @@ +SHA256 (gitolite-2.0.2.tar.gz) = e3f69f069087aa7c09ae98d0e89b1758de69ee98133e721da325163b8dd9ebd2 +SIZE (gitolite-2.0.2.tar.gz) = 225780 diff --git a/devel/gitolite2/files/patch-gl-install b/devel/gitolite2/files/patch-gl-install new file mode 100644 index 000000000000..1d2b3adf43b7 --- /dev/null +++ b/devel/gitolite2/files/patch-gl-install @@ -0,0 +1,11 @@ +--- src/gl-install 2011-07-26 11:16:41.000000000 -0700 ++++ src/gl-install 2011-07-28 07:30:17.000000000 -0700 +@@ -70,7 +70,7 @@ + + # "src" and "doc" will be overwritten on each install, but not conf + if ($GL_PACKAGE_HOOKS) { +- system("cp -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR"); ++ system("cp -f -R -p $GL_PACKAGE_HOOKS $GL_ADMINDIR"); + } else { + system("cp -R -p $ENV{GL_BINDIR}/../src $ENV{GL_BINDIR}/../doc $ENV{GL_BINDIR}/../hooks $GL_ADMINDIR"); + system("cp $ENV{GL_BINDIR}/../conf/VERSION $GL_ADMINDIR/conf"); diff --git a/devel/gitolite2/files/patch-gl-setup b/devel/gitolite2/files/patch-gl-setup new file mode 100644 index 000000000000..c43173fe9d7e --- /dev/null +++ b/devel/gitolite2/files/patch-gl-setup @@ -0,0 +1,26 @@ +--- src/gl-setup 2011-07-26 11:16:41.000000000 -0700 ++++ src/gl-setup 2011-07-28 04:02:41.000000000 -0700 +@@ -107,7 +107,7 @@ + + # now we get to gitolite itself + +-gl-install -q ++${GL_BINDIR}/gl-install -q + + [ -f $GL_ADMINDIR/conf/gitolite.conf ] || { + cat <<EOF | cut -c9- > $GL_ADMINDIR/conf/gitolite.conf +@@ -121,7 +121,7 @@ + [ -n "$pubkey_file" ] && cp $pubkey_file $GL_ADMINDIR/keydir + + touch $HOME/.ssh/authorized_keys +-gl-compile-conf -q ++${GL_BINDIR}/gl-compile-conf -q + + # setup push-to-admin + ( +@@ -133,4 +133,4 @@ + + # now that the admin repo is created, you have to set the hooks properly; best + # do it by running install again +-gl-install -q ++${GL_BINDIR}/gl-install -q diff --git a/devel/gitolite2/files/pkg-message.in b/devel/gitolite2/files/pkg-message.in new file mode 100644 index 000000000000..e385c83b2712 --- /dev/null +++ b/devel/gitolite2/files/pkg-message.in @@ -0,0 +1,18 @@ +============================================================================== + +Final gitolite installation instructions: + +Any ssh user can be a gitolite provider. Simply run the following command as +the user: + +%%PREFIX%%/bin/gl-setup /path/to/admin.ssh.key.pub + +This will setup up the configuration files for gitolite, designating where the +repositories are located and other options. + +The admin ssh key allows full access to the gitolite-admin repository where +additional users and repositories can be configured. + +By default, the git user is created for use by gitolite. + +============================================================================== diff --git a/devel/gitolite2/pkg-descr b/devel/gitolite2/pkg-descr new file mode 100644 index 000000000000..89a4b8eb40e1 --- /dev/null +++ b/devel/gitolite2/pkg-descr @@ -0,0 +1,14 @@ +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 diff --git a/devel/gitolite2/pkg-plist b/devel/gitolite2/pkg-plist new file mode 100644 index 000000000000..cd0c8dce9cd5 --- /dev/null +++ b/devel/gitolite2/pkg-plist @@ -0,0 +1,34 @@ +bin/gl-auth-command +bin/gl-setup +libexec/gitolite/gitolite.pm +libexec/gitolite/gitolite_env.pm +libexec/gitolite/gitolite_rc.pm +libexec/gitolite/gl-auth-command +libexec/gitolite/gl-compile-conf +libexec/gitolite/gl-conf-convert +libexec/gitolite/gl-dont-panic +libexec/gitolite/gl-install +libexec/gitolite/gl-mirror-shell +libexec/gitolite/gl-mirror-sync +libexec/gitolite/gl-query-rc +libexec/gitolite/gl-setup +libexec/gitolite/gl-setup-authkeys +libexec/gitolite/gl-time +libexec/gitolite/gl-tool +libexec/gitolite/sshkeys-lint +%%DATADIR%%/conf/example.conf +%%DATADIR%%/conf/example.gitolite.rc +%%DATADIR%%/conf/VERSION +%%DATADIR%%/hooks/common/gitolite-hooked +%%DATADIR%%/hooks/common/gl-pre-git.hub-sample +%%DATADIR%%/hooks/common/post-receive.mirrorpush +%%DATADIR%%/hooks/common/update +%%DATADIR%%/hooks/common/update.secondary.sample +%%DATADIR%%/hooks/gitolite-admin/post-update +@dirrm %%DATADIR%%/conf +@dirrm %%DATADIR%%/hooks/gitolite-admin +@dirrm %%DATADIR%%/hooks/common +@dirrm %%DATADIR%%/hooks +@dirrm %%DATADIR%% +@dirrm libexec/gitolite +%%GITUSER%%@dirrmtry git |