From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q3DDN-0004ZN-1Z for garchives@archives.gentoo.org; Fri, 25 Mar 2011 20:02:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 369931C178; Fri, 25 Mar 2011 20:00:16 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E8E9B1C178 for ; Fri, 25 Mar 2011 20:00:15 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8274C2AC017 for ; Fri, 25 Mar 2011 20:00:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id BBEC880073 for ; Fri, 25 Mar 2011 20:00:13 +0000 (UTC) From: "Christian Ruppert" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Christian Ruppert" Message-ID: Subject: [gentoo-commits] proj/gitolite-gentoo:t/per_repo_umask commit in: / X-VCS-Repository: proj/gitolite-gentoo X-VCS-Committer: idl0r X-VCS-Committer-Name: Christian Ruppert X-VCS-Revision: f8da673c1d2b17b85e48c9a9b330625fa277ecc5 Date: Fri, 25 Mar 2011 20:00:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 58308e286fa64543d6f9407776ea7087 Message-ID: <20110325200013.UJ--yGGvYaUPssnj2X9nwRwG12Kz5LnMcvgtVX4gDwI@z> commit: f8da673c1d2b17b85e48c9a9b330625fa277ecc5 Author: Christian Ruppert gentoo org> AuthorDate: Fri Mar 25 19:19:43 2011 +0000 Commit: Christian Ruppert gentoo org> CommitDate: Fri Mar 25 19:19:43 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gitolite-gent= oo.git;a=3Dcommit;h=3Df8da673c Merge commit 'refs/top-bases/t/per_repo_umask' into t/per_repo_umask README.mkd | 30 +- conf/example.conf | 243 +--------- conf/example.gitolite.rc | 26 +- contrib/adc/able | 20 +- contrib/adc/adc.common-functions | 5 + contrib/adc/fork | 9 +- contrib/adc/get-rights-and-owner.in-perl | 15 +- contrib/adc/git | 123 +++++ contrib/adc/gl-reflog | 8 +- contrib/adc/hub | 443 +++++++++++++++++ contrib/adc/hub.mkd | 202 ++++++++ contrib/adc/perms | 115 +++++ contrib/adc/pygitolite.py | 77 +++ contrib/adc/rm | 4 +- contrib/adc/set-head | 17 + contrib/adc/who-pushed | 2 +- contrib/autotoc | 35 -- contrib/gerrit.mkd | 2 +- contrib/gitolite-tools.mkd | 2 +- contrib/gitweb/gitweb.conf | 44 ++- contrib/ldap/README.mkd | 6 +- contrib/vim/README.mkd | 2 +- doc/1-INSTALL.mkd | 53 ++- doc/2-admin.mkd | 56 ++- doc/3-faq-tips-etc.mkd | 285 ++---------- doc/CHANGELOG | 22 + doc/admin-defined-commands.mkd | 14 +- doc/big-config.mkd | 14 +- doc/delegation.mkd | 10 +- doc/developer-notes.mkd | 213 ++++++++ doc/gitolite.conf.mkd | 469 ++++++++++++++++++ doc/gitolite.rc.mkd | 62 ++- doc/hook-propagation.mkd | 4 +- doc/http-backend.mkd | 142 +++++-- doc/migrate.mkd | 10 +- doc/mirroring.mkd | 21 +- doc/mob-branches.mkd | 2 +- doc/monkeysphere.mkd | 2 + doc/overkill.mkd | 2 +- doc/packaging.mkd | 2 +- doc/progit-article.mkd | 14 +- doc/report-output.mkd | 19 + doc/shell-games.mkd | 25 +- doc/ssh-troubleshooting.mkd | 42 ++- doc/uninstall.mkd | 2 +- doc/who-uses-it.mkd | 4 +- doc/wildcard-repositories.mkd | 17 +- hooks/common/gl-pre-git.hub-sample | 10 + hooks/common/update | 62 +-- hooks/gitolite-admin/post-update | 8 +- src/gitolite.pm | 775 +++++++++++++++---------= ------ src/gitolite_env.pm | 157 ++++++ src/gitolite_rc.pm | 70 +++ src/gl-auth-command | 235 +++------ src/gl-compile-conf | 141 ++---- src/gl-dont-panic | 17 +- src/gl-easy-install | 16 +- src/gl-install | 33 +- src/gl-mirror-shell | 13 +- src/gl-mirror-sync | 4 +- src/gl-query-rc | 23 + src/gl-setup | 47 ++- src/gl-setup-authkeys | 64 ++-- src/gl-time | 30 +- src/gl-tool | 9 +- src/sshkeys-lint | 6 +- t/README.mkd | 11 +- t/t53-check-info-expand-output | 16 + t/t64-write-able | 11 +- t/t65-rsync | 83 ++++ t/t67-hub | 174 +++++++ t/test-driver.sh | 73 ++-- 72 files changed, 3483 insertions(+), 1541 deletions(-) diff --cc src/gitolite.pm index d58df32,c0581c8..a59ff17 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@@ -1162,19 -1143,6 +1143,21 @@@ sub ext_cmd_svnserv die "svnserve exec failed\n"; } =20 +# ---------------------------------------------------------------------= ------- +# Gentoo specific stuff +# ---------------------------------------------------------------------= ------- + +sub get_repo_umask { + my $repo =3D shift; + + return $REPO_UMASK if ! $repo; + + do $GL_CONF_COMPILED if ! %repos; + + return $REPO_UMASK if ! $repos{$repo}; + return $repos{$repo}{"umask"} ? $repos{$repo}{"umask"} : $REPO_UMASK; +} + + # ---------------------------------------------------------------------= --------- + # per perl rules, this should be the last line in such a file: 1; diff --cc src/gl-auth-command index deb388e,754bfad..b706ae0 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@@ -267,8 -180,7 +180,8 @@@ if ($ENV{REQUEST_URI})=20 # a SetEnv in the apache config somewhere } =20 - &log_it(); + log_it(); =20 +umask(get_repo_umask($repo)); $repo =3D "'$REPO_BASE/$repo.git'"; exec("git", "shell", "-c", "$verb $repo") unless $verb eq 'git-init';