From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 45BF5138334 for ; Sat, 17 Aug 2019 20:49:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F23BAE0960; Sat, 17 Aug 2019 20:49:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A3BBE0959 for ; Sat, 17 Aug 2019 20:49:07 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 46DE9349CDE; Sat, 17 Aug 2019 20:49:05 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: xdch47@posteo.de, nemunaire@nemunai.re, idl0r@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH v2 2/5] acct-user/git: Add git user, UID 196 Date: Sat, 17 Aug 2019 22:48:23 +0200 Message-Id: <20190817204826.406692-2-mgorny@gentoo.org> X-Mailer: git-send-email 2.23.0.rc2 In-Reply-To: <20190817204826.406692-1-mgorny@gentoo.org> References: <20190817070648.185374-1-mgorny@gentoo.org> <20190817204826.406692-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: e8dce3d7-479c-40a1-8137-40e8133ec932 X-Archives-Hash: 2861dc2e79eddec61a40f66f3030a52e 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 --- acct-user/git/git-0.ebuild | 29 +++++++++++++++++++++++++++++ acct-user/git/metadata.xml | 15 +++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 acct-user/git/git-0.ebuild create mode 100644 acct-user/git/metadata.xml diff --git a/acct-user/git/git-0.ebuild b/acct-user/git/git-0.ebuild new file mode 100644 index 000000000000..384b3bd703e6 --- /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 000000000000..159d766b8251 --- /dev/null +++ b/acct-user/git/metadata.xml @@ -0,0 +1,15 @@ + + + + + mgorny@gentoo.org + Michał Górny + + + Set home directory for git hosting + via www-apps/gitea. + Set home directory for git hosting + via dev-vcs/gitolite + or dev-vcs/gitolite-gentoo. + + -- 2.23.0.rc2