public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: xdch47@posteo.de, nemunaire@nemunai.re, idl0r@gentoo.org,
	"Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 4/5] dev-vcs/gitolite: Use acct-{group,user}/git
Date: Sat, 17 Aug 2019 22:48:25 +0200	[thread overview]
Message-ID: <20190817204826.406692-4-mgorny@gentoo.org> (raw)
In-Reply-To: <20190817204826.406692-1-mgorny@gentoo.org>

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild | 91 ++++++++++++++++++++++
 dev-vcs/gitolite/gitolite-9999.ebuild      | 23 ++----
 2 files changed, 97 insertions(+), 17 deletions(-)
 create mode 100644 dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild

diff --git a/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild b/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild
new file mode 100644
index 000000000000..5ee33241a771
--- /dev/null
+++ b/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+[[ ${PV} == *9999 ]] && SCM="git-2"
+EGIT_REPO_URI="https://github.com/sitaramc/${PN}.git"
+EGIT_MASTER=master
+
+inherit perl-module user versionator ${SCM}
+
+DESCRIPTION="Highly flexible server for git directory version tracker"
+HOMEPAGE="https://github.com/sitaramc/gitolite"
+if [[ ${PV} != *9999 ]]; then
+	SRC_URI="https://github.com/sitaramc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~arm ~x86"
+else
+	SRC_URI=""
+	KEYWORDS="~amd64 ~arm ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="selinux tools"
+
+DEPEND="
+	acct-group/git
+	acct-user/git[gitolite]
+	dev-lang/perl
+	virtual/perl-File-Path
+	virtual/perl-File-Temp
+	>=dev-vcs/git-1.6.6"
+RDEPEND="${DEPEND}
+	!app-vim/gitolite-syntax
+	!dev-vcs/gitolite-gentoo
+	!www-apps/gitea
+	selinux? ( sec-policy/selinux-gitosis )
+	dev-perl/JSON"
+
+PATCHES=( )
+
+src_prepare() {
+	default
+	echo $PF > src/VERSION || die
+}
+
+src_install() {
+	local uexec=/usr/libexec/${PN}
+
+	rm -rf src/lib/Gitolite/Test{,.pm}
+	insinto $VENDOR_LIB
+	doins -r src/lib/Gitolite
+
+	dodoc README.markdown CHANGELOG
+	# These are meant by upstream as examples, you are strongly recommended to
+	# customize them for your needs.
+	dodoc contrib/utils/ipa_groups.pl contrib/utils/ldap_groups.sh
+
+	insinto /usr/share/vim/vimfiles
+	doins -r contrib/vim/*
+
+	insopts -m0755
+	insinto $uexec
+	doins -r src/{commands,syntactic-sugar,triggers,VREF}/
+	doins -r contrib/{commands,triggers,hooks}
+
+	insopts -m0644
+	doins src/VERSION
+
+	exeinto $uexec
+	doexe src/gitolite{,-shell}
+
+	dodir /usr/bin
+	for bin in gitolite{,-shell}; do
+		dosym /usr/libexec/${PN}/${bin} /usr/bin/${bin}
+	done
+
+	if use tools; then
+		dobin check-g2-compat convert-gitosis-conf
+		dobin contrib/utils/rc-format-v3.4
+	fi
+
+	fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only
+}
+
+pkg_postinst() {
+	if [[ "$(get_major_version $REPLACING_VERSIONS)" == "2" ]]; then
+		ewarn
+		elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!"
+		elog "Please read http://gitolite.com/gitolite/migr/index.html first!"
+	fi
+}
diff --git a/dev-vcs/gitolite/gitolite-9999.ebuild b/dev-vcs/gitolite/gitolite-9999.ebuild
index 928bbe83926c..ba689d0e780b 100644
--- a/dev-vcs/gitolite/gitolite-9999.ebuild
+++ b/dev-vcs/gitolite/gitolite-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -22,21 +22,20 @@ LICENSE="GPL-2"
 SLOT="0"
 IUSE="selinux tools vim-syntax"
 
-DEPEND="dev-lang/perl
+DEPEND="
+	acct-group/git
+	acct-user/git[gitolite]
+	dev-lang/perl
 	virtual/perl-File-Path
 	virtual/perl-File-Temp
 	>=dev-vcs/git-1.6.6"
 RDEPEND="${DEPEND}
 	!dev-vcs/gitolite-gentoo
+	!www-apps/gitea
 	selinux? ( sec-policy/selinux-gitosis )
 	vim-syntax? ( app-vim/gitolite-syntax )
 	dev-perl/JSON"
 
-pkg_setup() {
-	enewgroup git
-	enewuser git -1 /bin/sh /var/lib/gitolite git
-}
-
 src_prepare() {
 	echo $PF > src/VERSION
 }
@@ -74,10 +73,6 @@ src_install() {
 		dobin contrib/utils/rc-format-v3.4
 	fi
 
-	keepdir /var/lib/gitolite
-	fowners git:git /var/lib/gitolite
-	fperms 750 /var/lib/gitolite
-
 	fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only
 }
 
@@ -87,10 +82,4 @@ pkg_postinst() {
 		elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!"
 		elog "Please read http://gitolite.com/gitolite/migr/index.html first!"
 	fi
-
-	# bug 352291
-	ewarn
-	elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)."
-	elog "Especially if you're migrating from gitosis."
-	ewarn
 }
-- 
2.23.0.rc2



  parent reply	other threads:[~2019-08-17 20:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-17  7:06 [gentoo-dev] [PATCH 1/5] acct-group/git: Add git group, GID 196 Michał Górny
2019-08-17  7:06 ` [gentoo-dev] [PATCH 2/5] acct-user/git: Add git user, UID 196 Michał Górny
2019-08-17  7:06 ` [gentoo-dev] [PATCH 3/5] www-apps/gitea: Use acct-{group,user}/git Michał Górny
2019-08-17  8:52   ` Ulrich Mueller
2019-08-17  8:54     ` Michał Górny
2019-08-17 13:42       ` Michael Orlitzky
2019-08-17 20:43         ` Michał Górny
2019-08-17 21:29           ` Michael Orlitzky
2019-09-01  5:54             ` Michał Górny
2019-08-17  7:06 ` [gentoo-dev] [PATCH 4/5] dev-vcs/gitolite: " Michał Górny
2019-08-17  7:06 ` [gentoo-dev] [PATCH 5/5] dev-vcs/gitolite-gentoo: " Michał Górny
2019-08-17 20:48 ` [gentoo-dev] [PATCH v2 1/5] acct-group/git: Add git group, GID 196 Michał Górny
2019-08-17 20:48   ` [gentoo-dev] [PATCH v2 2/5] acct-user/git: Add git user, UID 196 Michał Górny
2019-08-17 20:48   ` [gentoo-dev] [PATCH v2 3/5] www-apps/gitea: Use acct-{group,user}/git Michał Górny
2019-08-17 20:48   ` Michał Górny [this message]
2019-08-17 20:48   ` [gentoo-dev] [PATCH v2 5/5] dev-vcs/gitolite-gentoo: " Michał Górny
2019-09-08  9:24   ` [gentoo-dev] [PATCH v2 1/5] acct-group/git: Add git group, GID 196 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190817204826.406692-4-mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=idl0r@gentoo.org \
    --cc=nemunaire@nemunai.re \
    --cc=xdch47@posteo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox