public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: acct-user/git/
@ 2019-09-08  9:21 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2019-09-08  9:21 UTC (permalink / raw
  To: gentoo-commits

commit:     c3708bc21bea076dbb014797e6ae9db88cc216a0
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 17 06:31:21 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Sep  8 09:21:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3708bc2

acct-user/git: Add git user, UID 196

Add 'git' user.  UID 196 is used on Arch Linux for gitolite which serves
the same purpose as 'git' in Gentoo.

Note that since we have multiple git hosting providers in Gentoo,
and they use disjoint home directories, we need to use USE flags to
control the provider used.  Upon switching flags, the home directory
for git user will be updated accordingly to permit SSH access.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 acct-user/git/git-0.ebuild | 29 +++++++++++++++++++++++++++++
 acct-user/git/metadata.xml | 15 +++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/acct-user/git/git-0.ebuild b/acct-user/git/git-0.ebuild
new file mode 100644
index 00000000000..384b3bd703e
--- /dev/null
+++ b/acct-user/git/git-0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="Git repository hosting user"
+
+IUSE="gitea gitolite"
+REQUIRED_USE="^^ ( gitea gitolite )"
+
+ACCT_USER_ID=196
+ACCT_USER_HOME_OWNER=git:git
+ACCT_USER_HOME_PERMS=750
+ACCT_USER_SHELL=/bin/sh
+ACCT_USER_GROUPS=( git )
+
+acct-user_add_deps
+
+pkg_setup() {
+	if use gitea; then
+		ACCT_USER_HOME=/var/lib/gitea
+	elif use gitolite; then
+		ACCT_USER_HOME=/var/lib/gitolite
+	else
+		die "Incorrect USE flag combination"
+	fi
+}

diff --git a/acct-user/git/metadata.xml b/acct-user/git/metadata.xml
new file mode 100644
index 00000000000..159d766b825
--- /dev/null
+++ b/acct-user/git/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>mgorny@gentoo.org</email>
+		<name>Michał Górny</name>
+	</maintainer>
+	<use>
+		<flag name="gitea">Set home directory for git hosting
+			via <pkg>www-apps/gitea</pkg>.</flag>
+		<flag name="gitolite">Set home directory for git hosting
+			via <pkg>dev-vcs/gitolite</pkg>
+			or <pkg>dev-vcs/gitolite-gentoo</pkg>.</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: acct-user/git/
@ 2022-03-13 20:46 Conrad Kostecki
  0 siblings, 0 replies; 2+ messages in thread
From: Conrad Kostecki @ 2022-03-13 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     1303e166ecdcba92654477b03909ab132aa77510
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 13 20:44:43 2022 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Mar 13 20:45:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1303e166

acct-user/git: add git use flag

Adding 'git' use flag, to be able to install git user for using with
plain git without any additional software, when hosting git repos.

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 acct-user/git/{git-0-r1.ebuild => git-0-r2.ebuild} | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/acct-user/git/git-0-r1.ebuild b/acct-user/git/git-0-r2.ebuild
similarity index 70%
rename from acct-user/git/git-0-r1.ebuild
rename to acct-user/git/git-0-r2.ebuild
index 0e86336ce40b..18e2d5f67173 100644
--- a/acct-user/git/git-0-r1.ebuild
+++ b/acct-user/git/git-0-r2.ebuild
@@ -1,14 +1,14 @@
-# Copyright 2019-2020 Gentoo Authors
+# Copyright 2019-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit acct-user
 
 DESCRIPTION="Git repository hosting user"
 
-IUSE="gitea gitolite"
-REQUIRED_USE="^^ ( gitea gitolite )"
+IUSE="git gitea gitolite"
+REQUIRED_USE="^^ ( git gitea gitolite )"
 
 ACCT_USER_ID=196
 ACCT_USER_HOME_OWNER=git:git
@@ -19,7 +19,9 @@ ACCT_USER_GROUPS=( git )
 acct-user_add_deps
 
 pkg_setup() {
-	if use gitea; then
+	if use git; then
+		ACCT_USER_HOME=/var/lib/git
+	elif use gitea; then
 		ACCT_USER_HOME=/var/lib/gitea
 	elif use gitolite; then
 		ACCT_USER_HOME=/var/lib/gitolite


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-13 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-13 20:46 [gentoo-commits] repo/gentoo:master commit in: acct-user/git/ Conrad Kostecki
  -- strict thread matches above, loose matches on Subject: below --
2019-09-08  9:21 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox