1 |
commit: 646a3fcc850dcbf34cf11198f1445d1aaf2b43ae |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 9 23:25:06 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 9 23:26:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=646a3fcc |
7 |
|
8 |
dev-vcs/gitolite-gentoo: migrate to GLEP 81 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/589468 |
11 |
Closes: https://bugs.gentoo.org/781566 |
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
14 |
|
15 |
.../gitolite-gentoo-2.3.1-r2.ebuild | 69 ++++++++++++++ |
16 |
.../gitolite-gentoo-3.6.6.1-r2.ebuild | 106 +++++++++++++++++++++ |
17 |
2 files changed, 175 insertions(+) |
18 |
|
19 |
diff --git a/dev-vcs/gitolite-gentoo/gitolite-gentoo-2.3.1-r2.ebuild b/dev-vcs/gitolite-gentoo/gitolite-gentoo-2.3.1-r2.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..d86d7ba5294 |
22 |
--- /dev/null |
23 |
+++ b/dev-vcs/gitolite-gentoo/gitolite-gentoo-2.3.1-r2.ebuild |
24 |
@@ -0,0 +1,69 @@ |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+inherit perl-module |
31 |
+ |
32 |
+DESCRIPTION="Highly flexible server for git directory version tracker, Gentoo fork" |
33 |
+HOMEPAGE="https://cgit.gentoo.org/proj/gitolite-gentoo.git" |
34 |
+SRC_URI="mirror://gentoo/${P}.tar.bz2" |
35 |
+ |
36 |
+LICENSE="GPL-2" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="amd64 x86" |
39 |
+IUSE="contrib vim-syntax" |
40 |
+ |
41 |
+DEPEND=" |
42 |
+ dev-lang/perl |
43 |
+ >=dev-vcs/git-1.6.6 |
44 |
+ virtual/perl-File-Path |
45 |
+ virtual/perl-File-Temp |
46 |
+" |
47 |
+RDEPEND=" |
48 |
+ ${DEPEND} |
49 |
+ acct-group/git |
50 |
+ acct-user/git[gitolite] |
51 |
+ !dev-vcs/gitolite |
52 |
+ dev-perl/Net-SSH-AuthorizedKeysFile |
53 |
+ vim-syntax? ( app-vim/gitolite-syntax )" |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ rm Makefile doc/COPYING || die |
57 |
+ rm -rf contrib/{gitweb,vim} || die |
58 |
+ |
59 |
+ echo "${PF}-gentoo" > conf/VERSION |
60 |
+} |
61 |
+ |
62 |
+src_install() { |
63 |
+ local gl_bin="${D}/usr/bin" |
64 |
+ gl_bin=${gl_bin/\/\//\/} |
65 |
+ |
66 |
+ dodir /usr/share/gitolite/{conf,hooks} /usr/bin |
67 |
+ |
68 |
+ export PATH="${gl_bin}:${PATH}" |
69 |
+ ./src/gl-system-install ${gl_bin} \ |
70 |
+ "${D}"/usr/share/gitolite/conf "${D}"/usr/share/gitolite/hooks || die |
71 |
+ sed -e "s:${D}::g" "${D}/usr/bin/gl-setup" \ |
72 |
+ -i "${D}/usr/share/gitolite/conf/example.gitolite.rc" || die |
73 |
+ |
74 |
+ rm "${D}"/usr/bin/*.pm |
75 |
+ insinto "${VENDOR_LIB}" |
76 |
+ doins src/*.pm |
77 |
+ |
78 |
+ dodoc README.mkd doc/* |
79 |
+ |
80 |
+ use contrib && dodoc -r contrib |
81 |
+} |
82 |
+ |
83 |
+pkg_postinst() { |
84 |
+ # bug 352291 |
85 |
+ ewarn |
86 |
+ elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)." |
87 |
+ elog "Especially if you're migrating from gitosis." |
88 |
+ ewarn |
89 |
+ ewarn |
90 |
+ elog "If you use the umask feature and upgrade from <=gitolite-gentoo-1.5.9.1" |
91 |
+ elog "then please check the permissions of all repositories using the umask feature" |
92 |
+ ewarn |
93 |
+} |
94 |
|
95 |
diff --git a/dev-vcs/gitolite-gentoo/gitolite-gentoo-3.6.6.1-r2.ebuild b/dev-vcs/gitolite-gentoo/gitolite-gentoo-3.6.6.1-r2.ebuild |
96 |
new file mode 100644 |
97 |
index 00000000000..69ef11cfb53 |
98 |
--- /dev/null |
99 |
+++ b/dev-vcs/gitolite-gentoo/gitolite-gentoo-3.6.6.1-r2.ebuild |
100 |
@@ -0,0 +1,106 @@ |
101 |
+# Copyright 1999-2021 Gentoo Authors |
102 |
+# Distributed under the terms of the GNU General Public License v2 |
103 |
+ |
104 |
+EAPI=7 |
105 |
+ |
106 |
+[[ ${PV} == *9999 ]] && SCM="git-2" |
107 |
+EGIT_REPO_URI="git://git.gentoo.org/proj/gitolite-gentoo" |
108 |
+EGIT_MASTER=master |
109 |
+ |
110 |
+inherit perl-module ${SCM} |
111 |
+ |
112 |
+DESCRIPTION="Highly flexible server for git directory version tracker, Gentoo fork" |
113 |
+HOMEPAGE="https://cgit.gentoo.org/proj/gitolite-gentoo.git" |
114 |
+if [[ ${PV} != *9999 ]]; then |
115 |
+ SRC_URI="mirror://gentoo/${P}.tar.bz2" |
116 |
+ KEYWORDS="~amd64 ~x86" |
117 |
+else |
118 |
+ SRC_URI="" |
119 |
+fi |
120 |
+ |
121 |
+LICENSE="GPL-2" |
122 |
+SLOT="0" |
123 |
+IUSE="selinux tools vim-syntax" |
124 |
+ |
125 |
+DEPEND=" |
126 |
+ dev-lang/perl |
127 |
+ >=dev-vcs/git-1.6.6 |
128 |
+ virtual/perl-File-Path |
129 |
+ virtual/perl-File-Temp |
130 |
+" |
131 |
+RDEPEND=" |
132 |
+ ${DEPEND} |
133 |
+ acct-group/git |
134 |
+ acct-user/git[gitolite] |
135 |
+ >=dev-perl/Net-SSH-AuthorizedKeysFile-0.17 |
136 |
+ dev-perl/JSON |
137 |
+ !dev-vcs/gitolite |
138 |
+ vim-syntax? ( app-vim/gitolite-syntax ) |
139 |
+ selinux? ( sec-policy/selinux-gitosis ) |
140 |
+" |
141 |
+ |
142 |
+src_prepare() { |
143 |
+ default |
144 |
+ echo "${PF}-gentoo" > src/VERSION || die |
145 |
+} |
146 |
+ |
147 |
+src_install() { |
148 |
+ local uexec=/usr/libexec/${PN} |
149 |
+ |
150 |
+ rm -rf src/lib/Gitolite/Test{,.pm} |
151 |
+ insinto $VENDOR_LIB |
152 |
+ doins -r src/lib/Gitolite |
153 |
+ |
154 |
+ dodoc README.markdown CHANGELOG |
155 |
+ # These are meant by upstream as examples, you are strongly recommended to |
156 |
+ # customize them for your needs. |
157 |
+ dodoc contrib/utils/ipa_groups.pl contrib/utils/ldap_groups.sh |
158 |
+ |
159 |
+ insopts -m0755 |
160 |
+ insinto $uexec |
161 |
+ doins -r src/{commands,syntactic-sugar,triggers,VREF}/ |
162 |
+ doins -r contrib/{commands,triggers,hooks} |
163 |
+ |
164 |
+ insopts -m0644 |
165 |
+ doins src/VERSION |
166 |
+ |
167 |
+ exeinto $uexec |
168 |
+ doexe src/gitolite{,-shell} |
169 |
+ |
170 |
+ dodir /usr/bin |
171 |
+ for bin in gitolite{,-shell}; do |
172 |
+ dosym /usr/libexec/${PN}/${bin} /usr/bin/${bin} |
173 |
+ done |
174 |
+ |
175 |
+ if use tools; then |
176 |
+ dobin check-g2-compat convert-gitosis-conf |
177 |
+ dobin contrib/utils/rc-format-v3.4 |
178 |
+ fi |
179 |
+ |
180 |
+ fperms 0644 ${uexec}/VREF/MERGE-CHECK # It's meant as example only |
181 |
+} |
182 |
+ |
183 |
+pkg_postinst() { |
184 |
+ local old_ver |
185 |
+ for old_ver in ${REPLACING_VERSIONS}; do |
186 |
+ if ver_test ${old_ver} -lt "3" ; then |
187 |
+ ewarn |
188 |
+ elog "***NOTE*** This is a major upgrade and will likely break your existing gitolite-2.x setup!" |
189 |
+ elog "Please read http://gitolite.com/gitolite/migr.html first!" |
190 |
+ ewarn |
191 |
+ elog "***NOTE*** If you're using the \"umask\" feature of ${PN}-2.x:" |
192 |
+ elog "You'll have to replace each \"umask = ...\" option by \"option umask = ...\"" |
193 |
+ elog "And you'll also have to enable the \"RepoUmask\" module in your .gitolite.rc" |
194 |
+ ewarn |
195 |
+ fi |
196 |
+ done |
197 |
+ |
198 |
+ # bug 352291 |
199 |
+ gitolite_home=$(awk -F: '$1 == "git" { print $6 }' /etc/passwd) |
200 |
+ if [ -n "${gitolite_home}" -a "${gitolite_home}" != "/var/lib/gitolite" ]; then |
201 |
+ ewarn |
202 |
+ elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitolite)." |
203 |
+ elog "Especially if you're migrating from gitosis." |
204 |
+ ewarn |
205 |
+ fi |
206 |
+} |