1 |
arfrever 10/11/28 21:59:31 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.6.15.ebuild |
5 |
Log: |
6 |
Version bump. |
7 |
|
8 |
(Portage version: 2.2.0_alpha6/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.28 dev-vcs/subversion/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.28&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.28&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?r1=1.27&r2=1.28 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v |
20 |
retrieving revision 1.27 |
21 |
retrieving revision 1.28 |
22 |
diff -u -r1.27 -r1.28 |
23 |
--- ChangeLog 9 Oct 2010 16:39:31 -0000 1.27 |
24 |
+++ ChangeLog 28 Nov 2010 21:59:30 -0000 1.28 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for dev-vcs/subversion |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.27 2010/10/09 16:39:31 armin76 Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.28 2010/11/28 21:59:30 arfrever Exp $ |
30 |
+ |
31 |
+*subversion-1.6.15 (28 Nov 2010) |
32 |
+ |
33 |
+ 28 Nov 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
34 |
+ -subversion-1.6.12.ebuild, +subversion-1.6.15.ebuild: |
35 |
+ Version bump. |
36 |
|
37 |
09 Oct 2010; Raúl Porcel <armin76@g.o> subversion-1.6.13.ebuild: |
38 |
arm/ia64/s390/sh/sparc stable wrt #339517 |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-vcs/subversion/subversion-1.6.15.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.6.15.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.6.15.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: subversion-1.6.15.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.6.15.ebuild,v 1.1 2010/11/28 21:59:30 arfrever Exp $ |
52 |
|
53 |
EAPI="3" |
54 |
SUPPORT_PYTHON_ABIS="1" |
55 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
56 |
WANT_AUTOMAKE="none" |
57 |
|
58 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
59 |
|
60 |
DESCRIPTION="Advanced version control system" |
61 |
HOMEPAGE="http://subversion.apache.org/" |
62 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
63 |
|
64 |
LICENSE="Subversion" |
65 |
SLOT="0" |
66 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
67 |
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl test vim-syntax +webdav-neon webdav-serf" |
68 |
|
69 |
CDEPEND=">=dev-db/sqlite-3.4[threadsafe] |
70 |
>=dev-libs/apr-1.3:1 |
71 |
>=dev-libs/apr-util-1.3:1 |
72 |
dev-libs/expat |
73 |
sys-libs/zlib |
74 |
berkdb? ( =sys-libs/db-4* ) |
75 |
ctypes-python? ( =dev-lang/python-2* ) |
76 |
emacs? ( virtual/emacs ) |
77 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
78 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
79 |
perl? ( dev-lang/perl ) |
80 |
python? ( =dev-lang/python-2* ) |
81 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
82 |
sasl? ( dev-libs/cyrus-sasl ) |
83 |
webdav-neon? ( >=net-libs/neon-0.28 ) |
84 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
85 |
RDEPEND="${CDEPEND} |
86 |
apache2? ( www-servers/apache[apache2_modules_dav] ) |
87 |
java? ( >=virtual/jre-1.5 ) |
88 |
kde? ( kde-base/kwalletd ) |
89 |
nls? ( virtual/libintl ) |
90 |
perl? ( dev-perl/URI )" |
91 |
APACHE_TEST_DEPEND="|| ( |
92 |
=www-servers/apache-2.4*[apache2_modules_auth_basic,apache2_modules_authn_core,apache2_modules_authn_file,apache2_modules_authz_core,apache2_modules_authz_user,apache2_modules_dav,apache2_modules_log_config,apache2_modules_unixd] |
93 |
=www-servers/apache-2.2*[apache2_modules_auth_basic,apache2_modules_authn_file,apache2_modules_dav,apache2_modules_log_config] |
94 |
)" |
95 |
DEPEND="${CDEPEND} |
96 |
!!<sys-apps/sandbox-1.6 |
97 |
ctypes-python? ( dev-python/ctypesgen ) |
98 |
doc? ( app-doc/doxygen ) |
99 |
gnome-keyring? ( dev-util/pkgconfig ) |
100 |
java? ( >=virtual/jdk-1.5 ) |
101 |
kde? ( dev-util/pkgconfig ) |
102 |
nls? ( sys-devel/gettext ) |
103 |
test? ( |
104 |
=dev-lang/python-2* |
105 |
webdav-neon? ( ${APACHE_TEST_DEPEND} ) |
106 |
webdav-serf? ( ${APACHE_TEST_DEPEND} ) |
107 |
) |
108 |
webdav-neon? ( dev-util/pkgconfig )" |
109 |
|
110 |
want_apache |
111 |
|
112 |
S="${WORKDIR}/${P/_/-}" |
113 |
|
114 |
print() { |
115 |
local blue color green normal red |
116 |
|
117 |
if [[ "${NOCOLOR:-false}" =~ ^(false|no)$ ]]; then |
118 |
red=$'\e[1;31m' |
119 |
green=$'\e[1;32m' |
120 |
blue=$'\e[1;34m' |
121 |
normal=$'\e[0m' |
122 |
fi |
123 |
|
124 |
while (($#)); do |
125 |
case "$1" in |
126 |
--red) |
127 |
color="${red}" |
128 |
;; |
129 |
--green) |
130 |
color="${green}" |
131 |
;; |
132 |
--blue) |
133 |
color="${blue}" |
134 |
;; |
135 |
--) |
136 |
shift |
137 |
break |
138 |
;; |
139 |
-*) |
140 |
die "${FUNCNAME}(): Unrecognized option '$1'" |
141 |
;; |
142 |
*) |
143 |
break |
144 |
;; |
145 |
esac |
146 |
shift |
147 |
done |
148 |
|
149 |
echo " ${green}*${normal} ${color}$@${normal}" |
150 |
} |
151 |
|
152 |
pkg_setup() { |
153 |
if use kde && ! use nls; then |
154 |
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)." |
155 |
die "Enable \"nls\" USE flag" |
156 |
fi |
157 |
|
158 |
if use berkdb; then |
159 |
einfo |
160 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
161 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
162 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
163 |
fi |
164 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
165 |
einfo |
166 |
|
167 |
local apu_bdb_version="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
168 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
169 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
170 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
171 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
172 |
eerror "Aborting to avoid possible run-time crashes." |
173 |
die "Berkeley DB version mismatch" |
174 |
fi |
175 |
fi |
176 |
|
177 |
depend.apache_pkg_setup |
178 |
|
179 |
java-pkg-opt-2_pkg_setup |
180 |
|
181 |
if use ctypes-python || use python || use test; then |
182 |
python_pkg_setup |
183 |
fi |
184 |
|
185 |
if ! use webdav-neon && ! use webdav-serf; then |
186 |
ewarn |
187 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
188 |
ewarn "access repositories through the HTTP protocol." |
189 |
ewarn |
190 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
191 |
ewarn " webdav-neon webdav-serf" |
192 |
ewarn |
193 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
194 |
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf" |
195 |
ewarn |
196 |
echo -ne "\a" |
197 |
fi |
198 |
|
199 |
if use test; then |
200 |
print |
201 |
print --red "************************************************************************************************" |
202 |
print |
203 |
print "NOTES ABOUT TESTS" |
204 |
print |
205 |
print "You can set the following variables to enable testing of some features and configure testing:" |
206 |
if use webdav-neon || use webdav-serf; then |
207 |
print " SVN_TEST_APACHE_PORT=integer - Set Apache port number (Default value: 62208)" |
208 |
fi |
209 |
print " SVN_TEST_SVNSERVE_PORT=integer - Set svnserve port number (Default value: 62209)" |
210 |
print " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories" |
211 |
print " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 62210)" |
212 |
print " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories" |
213 |
print " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories" |
214 |
print " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)" |
215 |
# if use sasl; then |
216 |
# print " SVN_TEST_SASL=1 - Enable SASL authentication" |
217 |
# fi |
218 |
if use ctypes-python || use java || use perl || use python || use ruby; then |
219 |
print " SVN_TEST_BINDINGS=1 - Enable testing of bindings" |
220 |
fi |
221 |
if use java || use perl || use python || use ruby; then |
222 |
print " (Testing of bindings requires ${CATEGORY}/${PF})" |
223 |
fi |
224 |
if use java; then |
225 |
print " (Testing of JavaHL library requires dev-java/junit:4)" |
226 |
fi |
227 |
print |
228 |
print --red "************************************************************************************************" |
229 |
print |
230 |
|
231 |
if ! use apache2 && { use webdav-neon || use webdav-serf; }; then |
232 |
eerror "Testing of libsvn_ra_neon / libsvn_ra_serf requires support for Apache." |
233 |
die "Enable \"apache2\" USE flag." |
234 |
fi |
235 |
|
236 |
if [[ -n "${SVN_TEST_APACHE_PORT}" ]] && ! ([[ "$((${SVN_TEST_APACHE_PORT}))" == "${SVN_TEST_APACHE_PORT}" ]]) &>/dev/null; then |
237 |
die "Value of SVN_TEST_APACHE_PORT must be an integer" |
238 |
fi |
239 |
|
240 |
if [[ -n "${SVN_TEST_SVNSERVE_PORT}" ]] && ! ([[ "$((${SVN_TEST_SVNSERVE_PORT}))" == "${SVN_TEST_SVNSERVE_PORT}" ]]) &>/dev/null; then |
241 |
die "Value of SVN_TEST_SVNSERVE_PORT must be an integer" |
242 |
fi |
243 |
|
244 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then |
245 |
die "net-misc/memcached must be installed" |
246 |
fi |
247 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then |
248 |
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer" |
249 |
fi |
250 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then |
251 |
die "Value of SVN_TEST_FSFS_SHARDING must be an integer" |
252 |
fi |
253 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then |
254 |
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING" |
255 |
fi |
256 |
|
257 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
258 |
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then |
259 |
die "${CATEGORY}/${PF} must be installed" |
260 |
fi |
261 |
if use java && ! has_version dev-java/junit:4; then |
262 |
die "dev-java/junit:4 must be installed" |
263 |
fi |
264 |
fi |
265 |
fi |
266 |
|
267 |
if use debug; then |
268 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
269 |
fi |
270 |
|
271 |
# Allow for custom repository locations. |
272 |
SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
273 |
} |
274 |
|
275 |
src_prepare() { |
276 |
epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch" |
277 |
epatch "${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch" |
278 |
epatch "${FILESDIR}/${PN}-1.6.3-kwallet_window.patch" |
279 |
chmod +x build/transform_libtool_scripts.sh || die "chmod failed" |
280 |
|
281 |
if ! use test; then |
282 |
sed -i \ |
283 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
284 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
285 |
fi |
286 |
|
287 |
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed" |
288 |
|
289 |
eautoconf |
290 |
elibtoolize |
291 |
|
292 |
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed" |
293 |
} |
294 |
|
295 |
src_configure() { |
296 |
local myconf |
297 |
|
298 |
if use python || use perl || use ruby; then |
299 |
myconf+=" --with-swig" |
300 |
else |
301 |
myconf+=" --without-swig" |
302 |
fi |
303 |
|
304 |
if use java; then |
305 |
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
306 |
myconf+=" --with-junit=${EPREFIX}/usr/share/junit-4/lib/junit.jar" |
307 |
else |
308 |
myconf+=" --without-junit" |
309 |
fi |
310 |
fi |
311 |
|
312 |
econf --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
313 |
$(use_with apache2 apxs "${APXS}") \ |
314 |
$(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
315 |
$(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \ |
316 |
$(use_enable dso runtime-module-search) \ |
317 |
$(use_with gnome-keyring) \ |
318 |
$(use_enable java javahl) \ |
319 |
$(use_with java jdk "${JAVA_HOME}") \ |
320 |
$(use_with kde kwallet) \ |
321 |
$(use_enable nls) \ |
322 |
$(use_with sasl) \ |
323 |
$(use_with webdav-neon neon) \ |
324 |
$(use_with webdav-serf serf "${EPREFIX}/usr") \ |
325 |
${myconf} \ |
326 |
--with-apr="${EPREFIX}/usr/bin/apr-1-config" \ |
327 |
--with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \ |
328 |
--disable-experimental-libtool \ |
329 |
--without-jikes \ |
330 |
--enable-local-library-preloading \ |
331 |
--disable-mod-activation \ |
332 |
--disable-neon-version-check \ |
333 |
--with-sqlite="${EPREFIX}/usr" |
334 |
} |
335 |
|
336 |
src_compile() { |
337 |
print |
338 |
print "Building of core of Subversion" |
339 |
print |
340 |
emake local-all || die "Building of core of Subversion failed" |
341 |
|
342 |
if use ctypes-python; then |
343 |
print |
344 |
print "Building of Subversion Ctypes Python bindings" |
345 |
print |
346 |
python_copy_sources subversion/bindings/ctypes-python |
347 |
rm -fr subversion/bindings/ctypes-python |
348 |
ctypes_python_bindings_building() { |
349 |
rm -f subversion/bindings/ctypes-python |
350 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
351 |
emake ctypes-python |
352 |
} |
353 |
python_execute_function \ |
354 |
--action-message 'Building of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
355 |
--failure-message 'Building of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
356 |
ctypes_python_bindings_building |
357 |
fi |
358 |
|
359 |
if use python; then |
360 |
print |
361 |
print "Building of Subversion SWIG Python bindings" |
362 |
print |
363 |
python_copy_sources subversion/bindings/swig/python |
364 |
rm -fr subversion/bindings/swig/python |
365 |
swig_python_bindings_building() { |
366 |
rm -f subversion/bindings/swig/python |
367 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
368 |
emake \ |
369 |
PYTHON_INCLUDES="-I${EPREFIX}$(python_get_includedir)" \ |
370 |
PYTHON_VERSION="$(python_get_version)" \ |
371 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
372 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
373 |
swig-py |
374 |
} |
375 |
python_execute_function \ |
376 |
--action-message 'Building of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
377 |
--failure-message 'Building of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
378 |
swig_python_bindings_building |
379 |
fi |
380 |
|
381 |
if use perl; then |
382 |
print |
383 |
print "Building of Subversion SWIG Perl bindings" |
384 |
print |
385 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
386 |
fi |
387 |
|
388 |
if use ruby; then |
389 |
print |
390 |
print "Building of Subversion SWIG Ruby bindings" |
391 |
print |
392 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
393 |
fi |
394 |
|
395 |
if use java; then |
396 |
print |
397 |
print "Building of Subversion JavaHL library" |
398 |
print |
399 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "Building of Subversion JavaHL library failed" |
400 |
fi |
401 |
|
402 |
if use emacs; then |
403 |
print |
404 |
print "Compilation of Emacs modules" |
405 |
print |
406 |
elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el doc/svn-doc.el doc/tools/svnbook.el || die "Compilation of Emacs modules failed" |
407 |
fi |
408 |
|
409 |
if use extras; then |
410 |
print |
411 |
print "Building of contrib and tools" |
412 |
print |
413 |
emake contrib || die "Building of contrib failed" |
414 |
emake tools || die "Building of tools failed" |
415 |
fi |
416 |
|
417 |
if use doc; then |
418 |
print |
419 |
print "Building of Subversion HTML documentation" |
420 |
print |
421 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
422 |
|
423 |
if use java; then |
424 |
print |
425 |
print "Building of Subversion JavaHL library HTML documentation" |
426 |
print |
427 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
428 |
fi |
429 |
fi |
430 |
} |
431 |
|
432 |
create_apache_tests_configuration() { |
433 |
get_loadmodule_directive() { |
434 |
if [[ "$("${APACHE_BIN}" -l)" != *"mod_$1.c"* ]]; then |
435 |
echo "LoadModule $1_module \"${APACHE_MODULESDIR}/mod_$1.so\"" |
436 |
fi |
437 |
} |
438 |
get_loadmodule_directives() { |
439 |
if has_version "=www-servers/apache-2.4*"; then |
440 |
get_loadmodule_directive auth_basic |
441 |
get_loadmodule_directive authn_core |
442 |
get_loadmodule_directive authn_file |
443 |
get_loadmodule_directive authz_core |
444 |
get_loadmodule_directive authz_user |
445 |
get_loadmodule_directive dav |
446 |
get_loadmodule_directive log_config |
447 |
get_loadmodule_directive unixd |
448 |
else |
449 |
get_loadmodule_directive auth_basic |
450 |
get_loadmodule_directive authn_file |
451 |
get_loadmodule_directive dav |
452 |
get_loadmodule_directive log_config |
453 |
fi |
454 |
} |
455 |
|
456 |
mkdir -p "${T}/apache" |
457 |
cat << EOF > "${T}/apache/apache.conf" |
458 |
$(get_loadmodule_directives) |
459 |
LoadModule dav_svn_module "${S}/subversion/mod_dav_svn/.libs/mod_dav_svn.so" |
460 |
LoadModule authz_svn_module "${S}/subversion/mod_authz_svn/.libs/mod_authz_svn.so" |
461 |
|
462 |
User $(id -un) |
463 |
Group $(id -gn) |
464 |
Listen localhost:${SVN_TEST_APACHE_PORT} |
465 |
ServerName localhost |
466 |
ServerRoot "${T}" |
467 |
DocumentRoot "${T}" |
468 |
CoreDumpDirectory "${T}" |
469 |
PidFile "${T}/apache.pid" |
470 |
CustomLog "${T}/apache/access_log" "%h %l %u %{%Y-%m-%dT%H:%M:%S}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" |
471 |
CustomLog "${T}/apache/svn_log" "%{%Y-%m-%dT%H:%M:%S}t %u %{SVN-REPOS-NAME}e %{SVN-ACTION}e" env=SVN-ACTION |
472 |
ErrorLog "${T}/apache/error_log" |
473 |
LogLevel Debug |
474 |
MaxRequestsPerChild 0 |
475 |
|
476 |
<Directory /> |
477 |
AllowOverride None |
478 |
</Directory> |
479 |
|
480 |
<Location /svn-test-work/repositories> |
481 |
DAV svn |
482 |
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories" |
483 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
484 |
AuthType Basic |
485 |
AuthName "Subversion Repository" |
486 |
AuthUserFile "${T}/apache/users" |
487 |
Require valid-user |
488 |
</Location> |
489 |
|
490 |
<Location /svn-test-work/local_tmp/repos> |
491 |
DAV svn |
492 |
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos" |
493 |
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz" |
494 |
AuthType Basic |
495 |
AuthName "Subversion Repository" |
496 |
AuthUserFile "${T}/apache/users" |
497 |
Require valid-user |
498 |
</Location> |
499 |
EOF |
500 |
|
501 |
cat << EOF > "${T}/apache/users" |
502 |
jrandom:xCGl35kV9oWCY |
503 |
jconstant:xCGl35kV9oWCY |
504 |
EOF |
505 |
} |
506 |
|
507 |
set_tests_variables() { |
508 |
if [[ "$1" == "local" ]]; then |
509 |
base_url="file://${S}/subversion/tests/cmdline" |
510 |
http_library="" |
511 |
fi |
512 |
if [[ "$1" == "svn" ]]; then |
513 |
base_url="svn://127.0.0.1:${SVN_TEST_SVNSERVE_PORT}" |
514 |
http_library="" |
515 |
fi |
516 |
if [[ "$1" == "neon" || "$1" == "serf" ]]; then |
517 |
base_url="http://127.0.0.1:${SVN_TEST_APACHE_PORT}" |
518 |
http_library="$1" |
519 |
fi |
520 |
} |
521 |
|
522 |
src_test() { |
523 |
if ! use test; then |
524 |
die "Invalid configuration" |
525 |
fi |
526 |
|
527 |
local fs_type fs_types ra_type ra_types options failed_tests |
528 |
|
529 |
fs_types="fsfs" |
530 |
use berkdb && fs_types+=" bdb" |
531 |
|
532 |
ra_types="local svn" |
533 |
use webdav-neon && ra_types+=" neon" |
534 |
use webdav-serf && ra_types+=" serf" |
535 |
|
536 |
local pid_file |
537 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
538 |
rm -f "${T}/${pid_file}" |
539 |
done |
540 |
|
541 |
termination() { |
542 |
local die="$1" pid_file |
543 |
if [[ -n "${die}" ]]; then |
544 |
echo -e "\n\e[1;31mKilling of child processes...\e[0m\a" > /dev/tty |
545 |
fi |
546 |
for pid_file in svnserve.pid apache.pid memcached.pid; do |
547 |
if [[ -f "${T}/${pid_file}" ]]; then |
548 |
kill "$(<"${T}/${pid_file}")" |
549 |
fi |
550 |
done |
551 |
if [[ -n "${die}" ]]; then |
552 |
sleep 6 |
553 |
die "Termination" |
554 |
fi |
555 |
} |
556 |
|
557 |
trap 'termination 1 &' SIGINT SIGTERM |
558 |
|
559 |
SVN_TEST_SVNSERVE_PORT="${SVN_TEST_SVNSERVE_PORT:-62209}" |
560 |
LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --listen-port "${SVN_TEST_SVNSERVE_PORT}" --log-file "${T}/svnserve.log" --pid-file "${T}/svnserve.pid" |
561 |
if use webdav-neon || use webdav-serf; then |
562 |
SVN_TEST_APACHE_PORT="${SVN_TEST_APACHE_PORT:-62208}" |
563 |
create_apache_tests_configuration |
564 |
"${APACHE_BIN}" -f "${T}/apache/apache.conf" |
565 |
fi |
566 |
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then |
567 |
SVN_TEST_FSFS_MEMCACHED_PORT="${SVN_TEST_FSFS_MEMCACHED_PORT:-62210}" |
568 |
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf |
569 |
memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid" |
570 |
fi |
571 |
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then |
572 |
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}" |
573 |
fi |
574 |
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then |
575 |
options+=" FSFS_PACKING=1" |
576 |
fi |
577 |
# if [[ -n "${SVN_TEST_SASL}" ]]; then |
578 |
# options+=" ENABLE_SASL=1" |
579 |
# fi |
580 |
|
581 |
sleep 6 |
582 |
|
583 |
for ra_type in ${ra_types}; do |
584 |
for fs_type in ${fs_types}; do |
585 |
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue |
586 |
print |
587 |
print --blue "Testing of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')" |
588 |
print |
589 |
set_tests_variables ${ra_type} |
590 |
time emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="1" ${options} || failed_tests="1" |
591 |
mv tests.log "${T}/tests-ra_${ra_type}-${fs_type}.log" |
592 |
done |
593 |
done |
594 |
unset base_url http_library |
595 |
termination |
596 |
trap - SIGINT SIGTERM |
597 |
|
598 |
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then |
599 |
local swig_lingua swig_linguas |
600 |
local -A linguas |
601 |
|
602 |
if use ctypes-python; then |
603 |
print |
604 |
print --blue "Testing of Subversion Ctypes Python bindings" |
605 |
print |
606 |
ctypes_python_bindings_testing() { |
607 |
rm -f subversion/bindings/ctypes-python |
608 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
609 |
time emake check-ctypes-python || failed_tests="1" |
610 |
} |
611 |
python_execute_function \ |
612 |
--action-message 'Testing of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
613 |
--failure-message 'Testing of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
614 |
ctypes_python_bindings_testing |
615 |
fi |
616 |
|
617 |
if use python; then |
618 |
print |
619 |
print --blue "Testing of Subversion SWIG Python bindings" |
620 |
print |
621 |
swig_python_bindings_testing() { |
622 |
rm -f subversion/bindings/swig/python |
623 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
624 |
time emake PYTHON_VERSION="$(python_get_version)" check-swig-py || failed_tests="1" |
625 |
} |
626 |
python_execute_function \ |
627 |
--action-message 'Testing of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
628 |
--failure-message 'Testing of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
629 |
swig_python_bindings_testing |
630 |
fi |
631 |
|
632 |
use perl && swig_linguas+=" pl" |
633 |
use ruby && swig_linguas+=" rb" |
634 |
|
635 |
linguas[pl]="Perl" |
636 |
linguas[rb]="Ruby" |
637 |
|
638 |
for swig_lingua in ${swig_linguas}; do |
639 |
print |
640 |
print --blue "Testing of Subversion SWIG ${linguas[${swig_lingua}]} bindings" |
641 |
print |
642 |
time emake check-swig-${swig_lingua} || failed_tests="1" |
643 |
done |
644 |
|
645 |
if use java; then |
646 |
print |
647 |
print --blue "Testing of Subversion JavaHL library" |
648 |
print |
649 |
time emake check-javahl || failed_tests="1" |
650 |
fi |
651 |
fi |
652 |
|
653 |
if [[ -n "${failed_tests}" ]]; then |
654 |
ewarn |
655 |
ewarn "\e[1;31mTests failed\e[0m" |
656 |
ewarn |
657 |
fi |
658 |
} |
659 |
|
660 |
src_install() { |
661 |
print |
662 |
print "Installation of core of Subversion" |
663 |
print |
664 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
665 |
|
666 |
if use ctypes-python; then |
667 |
print |
668 |
print "Installation of Subversion Ctypes Python bindings" |
669 |
print |
670 |
ctypes_python_bindings_installation() { |
671 |
rm -f subversion/bindings/ctypes-python |
672 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
673 |
emake DESTDIR="${D}" install-ctypes-python |
674 |
} |
675 |
python_execute_function \ |
676 |
--action-message 'Installation of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
677 |
--failure-message 'Installation of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
678 |
ctypes_python_bindings_installation |
679 |
fi |
680 |
|
681 |
if use python; then |
682 |
print |
683 |
print "Installation of Subversion SWIG Python bindings" |
684 |
print |
685 |
swig_python_bindings_installation() { |
686 |
rm -f subversion/bindings/swig/python |
687 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
688 |
emake -j1 \ |
689 |
DESTDIR="${D}" \ |
690 |
PYTHON_VERSION="$(python_get_version)" \ |
691 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
692 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
693 |
install-swig-py |
694 |
} |
695 |
python_execute_function \ |
696 |
--action-message 'Installation of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
697 |
--failure-message 'Installation of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
698 |
swig_python_bindings_installation |
699 |
|
700 |
delete_static_libraries() { |
701 |
find "${ED}$(python_get_sitedir)" -name "*.a" -print0 | xargs -0 rm -f |
702 |
} |
703 |
python_execute_function -q delete_static_libraries |
704 |
fi |
705 |
|
706 |
if use ctypes-python || use python; then |
707 |
python_clean_installation_image -q |
708 |
fi |
709 |
|
710 |
if use perl; then |
711 |
print |
712 |
print "Installation of Subversion SWIG Perl bindings" |
713 |
print |
714 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
715 |
fixlocalpod |
716 |
find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
717 |
fi |
718 |
|
719 |
if use ruby; then |
720 |
print |
721 |
print "Installation of Subversion SWIG Ruby bindings" |
722 |
print |
723 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
724 |
find "${ED}usr/$(get_libdir)/ruby" "(" -name "*.a" -o -name "*.la" ")" -print0 | xargs -0 rm -f |
725 |
fi |
726 |
|
727 |
if use java; then |
728 |
print |
729 |
print "Installation of Subversion JavaHL library" |
730 |
print |
731 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
732 |
java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*.so |
733 |
java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
734 |
rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar |
735 |
fi |
736 |
|
737 |
# Install Apache module configuration. |
738 |
if use apache2; then |
739 |
mkdir -p "${D}${APACHE_MODULES_CONFDIR}" |
740 |
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
741 |
<IfDefine SVN> |
742 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
743 |
<IfDefine SVN_AUTHZ> |
744 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
745 |
</IfDefine> |
746 |
|
747 |
# Example configuration: |
748 |
#<Location /svn/repos> |
749 |
# DAV svn |
750 |
# SVNPath ${SVN_REPOS_LOC}/repos |
751 |
# AuthType Basic |
752 |
# AuthName "Subversion repository" |
753 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
754 |
# Require valid-user |
755 |
#</Location> |
756 |
</IfDefine> |
757 |
EOF |
758 |
fi |
759 |
|
760 |
# Install Bash Completion, bug 43179. |
761 |
dobashcompletion tools/client-side/bash_completion subversion |
762 |
rm -f tools/client-side/bash_completion |
763 |
|
764 |
# Install hot backup script, bug 54304. |
765 |
newbin tools/backup/hot-backup.py svn-hot-backup |
766 |
rm -fr tools/backup |
767 |
|
768 |
# Install svn_load_dirs.pl. |
769 |
if use perl; then |
770 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
771 |
fi |
772 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
773 |
|
774 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
775 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
776 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
777 |
insinto /etc/xinetd.d |
778 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
779 |
|
780 |
# Install documentation. |
781 |
dodoc CHANGES COMMITTERS README |
782 |
dodoc tools/xslt/svnindex.{css,xsl} |
783 |
rm -fr tools/xslt |
784 |
|
785 |
# Install Vim syntax files. |
786 |
if use vim-syntax; then |
787 |
insinto /usr/share/vim/vimfiles/syntax |
788 |
doins contrib/client-side/vim/svn.vim |
789 |
fi |
790 |
rm -f contrib/client-side/vim/svn.vim |
791 |
|
792 |
# Install Emacs Lisps. |
793 |
if use emacs; then |
794 |
elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} || die "Installation of Emacs modules failed" |
795 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
796 |
touch "${ED}${SITELISP}/${PN}/compat/.nosearch" |
797 |
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
798 |
fi |
799 |
rm -fr contrib/client-side/emacs |
800 |
|
801 |
# Install extra files. |
802 |
if use extras; then |
803 |
print |
804 |
print "Installation of contrib and tools" |
805 |
print |
806 |
|
807 |
cat << EOF > 80subversion-extras |
808 |
PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
809 |
ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
810 |
EOF |
811 |
doenvd 80subversion-extras |
812 |
|
813 |
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed" |
814 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
815 |
|
816 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
817 |
rm -fr contrib/client-side/svn-push |
818 |
rm -fr contrib/server-side/svnstsw |
819 |
rm -fr tools/client-side/svnmucc |
820 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
821 |
rm -fr tools/{buildbot,dev,diff,po} |
822 |
|
823 |
insinto /usr/share/${PN} |
824 |
doins -r contrib tools |
825 |
fi |
826 |
|
827 |
if use doc; then |
828 |
print |
829 |
print "Installation of Subversion HTML documentation" |
830 |
print |
831 |
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
832 |
|
833 |
insinto /usr/share/doc/${PF} |
834 |
doins -r notes |
835 |
ecompressdir /usr/share/doc/${PF}/notes |
836 |
|
837 |
# if use ruby; then |
838 |
# emake DESTDIR="${D}" install-swig-rb-doc |
839 |
# fi |
840 |
|
841 |
if use java; then |
842 |
java-pkg_dojavadoc doc/javadoc |
843 |
fi |
844 |
fi |
845 |
} |
846 |
|
847 |
pkg_preinst() { |
848 |
# Compare versions of Berkeley DB, bug 122877. |
849 |
if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]]; then |
850 |
OLD_BDB_VERSION="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
851 |
NEW_BDB_VERSION="$(scanelf -nq "${ED}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
852 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
853 |
CHANGED_BDB_VERSION="1" |
854 |
fi |
855 |
fi |
856 |
} |
857 |
|
858 |
pkg_postinst() { |
859 |
use emacs && elisp-site-regen |
860 |
use perl && perl-module_pkg_postinst |
861 |
|
862 |
if use ctypes-python; then |
863 |
python_mod_optimize csvn |
864 |
fi |
865 |
|
866 |
if use python; then |
867 |
python_mod_optimize libsvn svn |
868 |
fi |
869 |
|
870 |
elog "Subversion Server Notes" |
871 |
elog "-----------------------" |
872 |
elog |
873 |
elog "If you intend to run a server, a repository needs to be created using" |
874 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
875 |
elog "${SVN_REPOS_LOC}:" |
876 |
elog |
877 |
elog " emerge --config =${CATEGORY}/${PF}" |
878 |
elog |
879 |
elog "Subversion has multiple server types, take your pick:" |
880 |
elog |
881 |
elog " - svnserve daemon: " |
882 |
elog " 1. Edit /etc/conf.d/svnserve" |
883 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
884 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
885 |
elog " 4. Make persistent: rc-update add svnserve default" |
886 |
elog |
887 |
elog " - svnserve via xinetd:" |
888 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
889 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
890 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
891 |
elog |
892 |
elog " - svn over ssh:" |
893 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
894 |
elog " Additionally run:" |
895 |
elog " groupadd svnusers" |
896 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
897 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
898 |
elog " want, for example:" |
899 |
elog " #!/bin/bash" |
900 |
elog " . /etc/conf.d/svnserve" |
901 |
elog " umask 007" |
902 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
903 |
elog |
904 |
|
905 |
if use apache2; then |
906 |
elog " - http-based server:" |
907 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
908 |
elog " 2. Create an htpasswd file:" |
909 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
910 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
911 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
912 |
elog |
913 |
fi |
914 |
|
915 |
elog " Fixing the repository permissions:" |
916 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
917 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
918 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
919 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
920 |
elog |
921 |
|
922 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
923 |
elog "backups to keep per repository by specifying an environment variable." |
924 |
elog "If you want to keep e.g. 2 backups, do the following:" |
925 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
926 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
927 |
elog |
928 |
|
929 |
elog "Subversion contains support for the use of Memcached" |
930 |
elog "to cache data of FSFS repositories." |
931 |
elog "You should install \"net-misc/memcached\", start memcached" |
932 |
elog "and configure your FSFS repositories, if you want to use this feature." |
933 |
elog "See the documentation for details." |
934 |
elog |
935 |
|
936 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
937 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
938 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
939 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
940 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
941 |
fi |
942 |
} |
943 |
|
944 |
pkg_postrm() { |
945 |
use emacs && elisp-site-regen |
946 |
use perl && perl-module_pkg_postrm |
947 |
|
948 |
if use ctypes-python; then |
949 |
python_mod_cleanup csvn |
950 |
fi |
951 |
|
952 |
if use python; then |
953 |
python_mod_cleanup libsvn svn |
954 |
fi |
955 |
} |
956 |
|
957 |
pkg_config() { |
958 |
einfo "Initializing the database in ${EROOT}${SVN_REPOS_LOC}..." |
959 |
if [[ -e "${EROOT}${SVN_REPOS_LOC}/repos" ]]; then |
960 |
echo "A Subversion repository already exists and I will not overwrite it." |
961 |
echo "Delete \"${EROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
962 |
else |
963 |
mkdir -p "${EROOT}${SVN_REPOS_LOC}/conf" |
964 |
|
965 |
einfo "Populating repository directory..." |
966 |
# Create initial repository. |
967 |
"${EROOT}usr/bin/svnadmin" create "${EROOT}${SVN_REPOS_LOC}/repos" |
968 |
|
969 |
einfo "Setting repository permissions..." |
970 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
971 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
972 |
if use apache2; then |
973 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
974 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
975 |
else |
976 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
977 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
978 |
enewgroup "${SVNSERVE_GROUP}" |
979 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
980 |
fi |
981 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${EROOT}${SVN_REPOS_LOC}/repos" |
982 |
chmod -Rf go-rwx "${EROOT}${SVN_REPOS_LOC}/conf" |
983 |
chmod -Rf o-rwx "${EROOT}${SVN_REPOS_LOC}/repos" |
984 |
fi |
985 |
} |