Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: xdch47@××××××.de, nemunaire@×××××××.re, idl0r@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 4/5] dev-vcs/gitolite: Use acct-{group,user}/git
Date: Sat, 17 Aug 2019 07:07:58
Message-Id: 20190817070648.185374-4-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/5] acct-group/git: Add git group, GID 196 by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild | 90 ++++++++++++++++++++++
4 dev-vcs/gitolite/gitolite-9999.ebuild | 22 ++----
5 2 files changed, 95 insertions(+), 17 deletions(-)
6 create mode 100644 dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild
7
8 diff --git a/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild b/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild
9 new file mode 100644
10 index 000000000000..39e318eef01b
11 --- /dev/null
12 +++ b/dev-vcs/gitolite/gitolite-3.6.11-r1.ebuild
13 @@ -0,0 +1,90 @@
14 +# Copyright 1999-2019 Gentoo Authors
15 +# Distributed under the terms of the GNU General Public License v2
16 +
17 +EAPI=6
18 +[[ ${PV} == *9999 ]] && SCM="git-2"
19 +EGIT_REPO_URI="https://github.com/sitaramc/${PN}.git"
20 +EGIT_MASTER=master
21 +
22 +inherit perl-module user versionator ${SCM}
23 +
24 +DESCRIPTION="Highly flexible server for git directory version tracker"
25 +HOMEPAGE="https://github.com/sitaramc/gitolite"
26 +if [[ ${PV} != *9999 ]]; then
27 + SRC_URI="https://github.com/sitaramc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
28 + KEYWORDS="~amd64 ~arm ~x86"
29 +else
30 + SRC_URI=""
31 + KEYWORDS="~amd64 ~arm ~x86"
32 +fi
33 +
34 +LICENSE="GPL-2"
35 +SLOT="0"
36 +IUSE="selinux tools"
37 +
38 +DEPEND="
39 + acct-group/git
40 + acct-user/git[gitolite]
41 + dev-lang/perl
42 + virtual/perl-File-Path
43 + virtual/perl-File-Temp
44 + >=dev-vcs/git-1.6.6"
45 +RDEPEND="${DEPEND}
46 + !app-vim/gitolite-syntax
47 + !dev-vcs/gitolite-gentoo
48 + selinux? ( sec-policy/selinux-gitosis )
49 + dev-perl/JSON"
50 +
51 +PATCHES=( )
52 +
53 +src_prepare() {
54 + default
55 + echo $PF > src/VERSION || die
56 +}
57 +
58 +src_install() {
59 + local uexec=/usr/libexec/${PN}
60 +
61 + rm -rf src/lib/Gitolite/Test{,.pm}
62 + insinto $VENDOR_LIB
63 + doins -r src/lib/Gitolite
64 +
65 + dodoc README.markdown CHANGELOG
66 + # These are meant by upstream as examples, you are strongly recommended to
67 + # customize them for your needs.
68 + dodoc contrib/utils/ipa_groups.pl contrib/utils/ldap_groups.sh
69 +
70 + insinto /usr/share/vim/vimfiles
71 + doins -r contrib/vim/*
72 +
73 + insopts -m0755
74 + insinto $uexec
75 + doins -r src/{commands,syntactic-sugar,triggers,VREF}/
76 + doins -r contrib/{commands,triggers,hooks}
77 +
78 + insopts -m0644
79 + doins src/VERSION
80 +
81 + exeinto $uexec
82 + doexe src/gitolite{,-shell}
83 +
84 + dodir /usr/bin
85 + for bin in gitolite{,-shell}; do
86 + dosym /usr/libexec/${PN}/${bin} /usr/bin/${bin}
87 + done
88 +
89 + if use tools; then
90 + dobin check-g2-compat convert-gitosis-conf
91 + dobin contrib/utils/rc-format-v3.4
92 + fi
93 +
94 + fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only
95 +}
96 +
97 +pkg_postinst() {
98 + if [[ "$(get_major_version $REPLACING_VERSIONS)" == "2" ]]; then
99 + ewarn
100 + elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!"
101 + elog "Please read http://gitolite.com/gitolite/migr/index.html first!"
102 + fi
103 +}
104 diff --git a/dev-vcs/gitolite/gitolite-9999.ebuild b/dev-vcs/gitolite/gitolite-9999.ebuild
105 index 928bbe83926c..c97712af0d4f 100644
106 --- a/dev-vcs/gitolite/gitolite-9999.ebuild
107 +++ b/dev-vcs/gitolite/gitolite-9999.ebuild
108 @@ -1,4 +1,4 @@
109 -# Copyright 1999-2017 Gentoo Foundation
110 +# Copyright 1999-2019 Gentoo Authors
111 # Distributed under the terms of the GNU General Public License v2
112
113 EAPI=5
114 @@ -22,7 +22,10 @@ LICENSE="GPL-2"
115 SLOT="0"
116 IUSE="selinux tools vim-syntax"
117
118 -DEPEND="dev-lang/perl
119 +DEPEND="
120 + acct-group/git
121 + acct-user/git[gitolite]
122 + dev-lang/perl
123 virtual/perl-File-Path
124 virtual/perl-File-Temp
125 >=dev-vcs/git-1.6.6"
126 @@ -32,11 +35,6 @@ RDEPEND="${DEPEND}
127 vim-syntax? ( app-vim/gitolite-syntax )
128 dev-perl/JSON"
129
130 -pkg_setup() {
131 - enewgroup git
132 - enewuser git -1 /bin/sh /var/lib/gitolite git
133 -}
134 -
135 src_prepare() {
136 echo $PF > src/VERSION
137 }
138 @@ -74,10 +72,6 @@ src_install() {
139 dobin contrib/utils/rc-format-v3.4
140 fi
141
142 - keepdir /var/lib/gitolite
143 - fowners git:git /var/lib/gitolite
144 - fperms 750 /var/lib/gitolite
145 -
146 fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only
147 }
148
149 @@ -87,10 +81,4 @@ pkg_postinst() {
150 elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!"
151 elog "Please read http://gitolite.com/gitolite/migr/index.html first!"
152 fi
153 -
154 - # bug 352291
155 - ewarn
156 - elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)."
157 - elog "Especially if you're migrating from gitosis."
158 - ewarn
159 }
160 --
161 2.23.0.rc2