1 |
arfrever 09/03/28 19:37:57 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.6.0-r1.ebuild |
5 |
Log: |
6 |
Fix undefined references to svn_fs_path_change2_create() (bug #263714). |
7 |
Fix dependencies (bug #263772). Fix segmentation fault when updating old |
8 |
working copies which don't have UUID recorded. |
9 |
(Portage version: 13240-svn/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.359 dev-util/subversion/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.359&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.359&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.358&r2=1.359 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v |
21 |
retrieving revision 1.358 |
22 |
retrieving revision 1.359 |
23 |
diff -u -r1.358 -r1.359 |
24 |
--- ChangeLog 26 Mar 2009 03:02:20 -0000 1.358 |
25 |
+++ ChangeLog 28 Mar 2009 19:37:57 -0000 1.359 |
26 |
@@ -1,6 +1,14 @@ |
27 |
# ChangeLog for dev-util/subversion |
28 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.358 2009/03/26 03:02:20 darkside Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.359 2009/03/28 19:37:57 arfrever Exp $ |
31 |
+ |
32 |
+*subversion-1.6.0-r1 (28 Mar 2009) |
33 |
+ |
34 |
+ 28 Mar 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
35 |
+ files/subversion-1.6.0-various_fixes.patch, +subversion-1.6.0-r1.ebuild: |
36 |
+ Fix undefined references to svn_fs_path_change2_create() (bug #263714). |
37 |
+ Fix dependencies (bug #263772). Fix segmentation fault when updating old |
38 |
+ working copies which don't have UUID recorded. |
39 |
|
40 |
26 Mar 2009; Jeremy Olexa <darkside@g.o> metadata.xml: |
41 |
fix metadata - missing herd element |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-util/subversion/subversion-1.6.0-r1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.0-r1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.0-r1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: subversion-1.6.0-r1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2009 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.0-r1.ebuild,v 1.1 2009/03/28 19:37:57 arfrever Exp $ |
55 |
|
56 |
EAPI="1" |
57 |
|
58 |
WANT_AUTOMAKE="none" |
59 |
|
60 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
61 |
|
62 |
DESCRIPTION="Advanced version control system" |
63 |
HOMEPAGE="http://subversion.tigris.org/" |
64 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
65 |
|
66 |
LICENSE="Subversion" |
67 |
SLOT="0" |
68 |
KEYWORDS="~amd64 ~ppc" |
69 |
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf" |
70 |
RESTRICT="test" |
71 |
|
72 |
CDEPEND=">=dev-db/sqlite-3.4 |
73 |
>=dev-libs/apr-1.3:1 |
74 |
>=dev-libs/apr-util-1.3:1 |
75 |
dev-libs/expat |
76 |
sys-libs/zlib |
77 |
berkdb? ( =sys-libs/db-4* ) |
78 |
emacs? ( virtual/emacs ) |
79 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
80 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
81 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
82 |
sasl? ( dev-libs/cyrus-sasl ) |
83 |
webdav-neon? ( >=net-misc/neon-0.28 ) |
84 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
85 |
|
86 |
RDEPEND="${CDEPEND} |
87 |
java? ( >=virtual/jre-1.5 ) |
88 |
kde? ( kde-base/kwalletd ) |
89 |
nls? ( virtual/libintl ) |
90 |
perl? ( dev-perl/URI )" |
91 |
|
92 |
DEPEND="${CDEPEND} |
93 |
ctypes-python? ( dev-python/ctypesgen ) |
94 |
doc? ( app-doc/doxygen ) |
95 |
gnome-keyring? ( dev-util/pkgconfig ) |
96 |
java? ( >=virtual/jdk-1.5 ) |
97 |
kde? ( dev-util/pkgconfig ) |
98 |
nls? ( sys-devel/gettext ) |
99 |
webdav-neon? ( dev-util/pkgconfig )" |
100 |
|
101 |
want_apache |
102 |
|
103 |
S="${WORKDIR}/${P/_/-}" |
104 |
|
105 |
# Allow for custom repository locations. |
106 |
# This can't be in pkg_setup() because the variable needs to be available to pkg_config(). |
107 |
: ${SVN_REPOS_LOC:=/var/svn} |
108 |
|
109 |
pkg_setup() { |
110 |
if use kde && ! use nls; then |
111 |
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)." |
112 |
die "Enable \"nls\" USE flag" |
113 |
fi |
114 |
|
115 |
if use berkdb; then |
116 |
einfo |
117 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
118 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
119 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
120 |
fi |
121 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
122 |
einfo |
123 |
|
124 |
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
125 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
126 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
127 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
128 |
eerror "Aborting to avoid possible run-time crashes." |
129 |
die "Berkeley DB version mismatch" |
130 |
fi |
131 |
fi |
132 |
|
133 |
java-pkg-opt-2_pkg_setup |
134 |
|
135 |
if ! use webdav-neon && ! use webdav-serf; then |
136 |
ewarn |
137 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
138 |
ewarn "access repositories through the HTTP protocol." |
139 |
ewarn |
140 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
141 |
ewarn " webdav-neon webdav-serf" |
142 |
ewarn |
143 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
144 |
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf" |
145 |
ewarn |
146 |
ebeep |
147 |
fi |
148 |
|
149 |
append-flags -fno-strict-aliasing |
150 |
|
151 |
if use debug; then |
152 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
153 |
fi |
154 |
} |
155 |
|
156 |
src_unpack() { |
157 |
unpack ${A} |
158 |
cd "${S}" |
159 |
|
160 |
epatch "${FILESDIR}/${P}-disable_linking_against_unneeded_libraries.patch" |
161 |
|
162 |
# Various fixes which will be included in 1.6.1. |
163 |
epatch "${FILESDIR}/${P}-various_fixes.patch" |
164 |
|
165 |
# Fix 2 messages in Polish translation. They will be fixed in 1.6.1. |
166 |
sed -e "7420d;8586d" -i subversion/po/pl.po |
167 |
|
168 |
# https://svn.collab.net/viewvc/svn?view=revision&revision=36742 |
169 |
sed -e 's/$SVN_APRUTIL_INCLUDES $SVN_DB_INCLUDES/$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES/' -i build/ac-macros/berkeley-db.m4 |
170 |
|
171 |
sed -i \ |
172 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
173 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
174 |
|
175 |
sed -e "s:@bindir@/svn-contrib:@libdir@/subversion/bin:" \ |
176 |
-e "s:@bindir@/svn-tools:@libdir@/subversion/bin:" \ |
177 |
-i Makefile.in |
178 |
|
179 |
eautoconf |
180 |
elibtoolize |
181 |
} |
182 |
|
183 |
src_compile() { |
184 |
local myconf |
185 |
|
186 |
if use python || use perl || use ruby; then |
187 |
myconf="${myconf} --with-swig" |
188 |
else |
189 |
myconf="${myconf} --without-swig" |
190 |
fi |
191 |
|
192 |
econf --libdir="/usr/$(get_libdir)" \ |
193 |
${myconf} \ |
194 |
$(use_with apache2 apxs "${APXS}") \ |
195 |
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
196 |
$(use_with ctypes-python ctypesgen /usr) \ |
197 |
$(use_enable dso runtime-module-search) \ |
198 |
$(use_with gnome-keyring) \ |
199 |
$(use_enable java javahl) \ |
200 |
$(use_with java jdk "${JAVA_HOME}") \ |
201 |
$(use_with kde kwallet) \ |
202 |
$(use_enable nls) \ |
203 |
$(use_with sasl) \ |
204 |
$(use_with webdav-neon neon) \ |
205 |
$(use_with webdav-serf serf /usr) \ |
206 |
--with-apr=/usr/bin/apr-1-config \ |
207 |
--with-apr-util=/usr/bin/apu-1-config \ |
208 |
--disable-experimental-libtool \ |
209 |
--without-jikes \ |
210 |
--without-junit \ |
211 |
--disable-mod-activation \ |
212 |
--disable-neon-version-check \ |
213 |
--with-sqlite=/usr |
214 |
|
215 |
einfo |
216 |
einfo "Building of core of Subversion" |
217 |
einfo |
218 |
emake local-all || die "Building of core of Subversion failed" |
219 |
|
220 |
if use ctypes-python; then |
221 |
einfo |
222 |
einfo "Building of Subversion Ctypes Python bindings" |
223 |
einfo |
224 |
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed" |
225 |
fi |
226 |
|
227 |
if use python; then |
228 |
einfo |
229 |
einfo "Building of Subversion SWIG Python bindings" |
230 |
einfo |
231 |
emake swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" swig-py \ |
232 |
|| die "Building of Subversion SWIG Python bindings failed" |
233 |
fi |
234 |
|
235 |
if use perl; then |
236 |
einfo |
237 |
einfo "Building of Subversion SWIG Perl bindings" |
238 |
einfo |
239 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
240 |
fi |
241 |
|
242 |
if use ruby; then |
243 |
einfo |
244 |
einfo "Building of Subversion SWIG Ruby bindings" |
245 |
einfo |
246 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
247 |
fi |
248 |
|
249 |
if use java; then |
250 |
einfo |
251 |
einfo "Building of Subversion JavaHL library" |
252 |
einfo |
253 |
make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \ |
254 |
|| die "Building of Subversion JavaHL library failed" |
255 |
fi |
256 |
|
257 |
if use emacs; then |
258 |
einfo |
259 |
einfo "Compilation of Emacs support" |
260 |
einfo |
261 |
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" |
262 |
fi |
263 |
|
264 |
if use extras; then |
265 |
einfo |
266 |
einfo "Building of contrib and tools" |
267 |
einfo |
268 |
emake contrib || die "Building of contrib failed" |
269 |
emake tools || die "Building of tools failed" |
270 |
fi |
271 |
|
272 |
if use doc; then |
273 |
einfo |
274 |
einfo "Building of Subversion HTML documentation" |
275 |
einfo |
276 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
277 |
|
278 |
if use java; then |
279 |
einfo |
280 |
einfo "Building of Subversion JavaHL library HTML documentation" |
281 |
einfo |
282 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
283 |
fi |
284 |
fi |
285 |
} |
286 |
|
287 |
src_install() { |
288 |
einfo |
289 |
einfo "Installation of core of Subversion" |
290 |
einfo |
291 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
292 |
|
293 |
if use ctypes-python; then |
294 |
einfo |
295 |
einfo "Installation of Subversion Ctypes Python bindings" |
296 |
einfo |
297 |
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed" |
298 |
fi |
299 |
|
300 |
if use python; then |
301 |
einfo |
302 |
einfo "Installation of Subversion SWIG Python bindings" |
303 |
einfo |
304 |
emake -j1 DESTDIR="${D}" swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" install-swig-py \ |
305 |
|| die "Installation of Subversion SWIG Python bindings failed" |
306 |
fi |
307 |
|
308 |
if use perl; then |
309 |
einfo |
310 |
einfo "Installation of Subversion SWIG Perl bindings" |
311 |
einfo |
312 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
313 |
fixlocalpod |
314 |
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
315 |
fi |
316 |
|
317 |
if use ruby; then |
318 |
einfo |
319 |
einfo "Installation of Subversion SWIG Ruby bindings" |
320 |
einfo |
321 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
322 |
fi |
323 |
|
324 |
if use java; then |
325 |
einfo |
326 |
einfo "Installation of Subversion JavaHL library" |
327 |
einfo |
328 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
329 |
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so |
330 |
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
331 |
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar |
332 |
fi |
333 |
|
334 |
# Install Apache module configuration. |
335 |
if use apache2; then |
336 |
dodir "${APACHE_MODULES_CONFDIR}" |
337 |
cat <<EOF >"${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
338 |
<IfDefine SVN> |
339 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
340 |
<IfDefine SVN_AUTHZ> |
341 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
342 |
</IfDefine> |
343 |
|
344 |
# Example configuration: |
345 |
#<Location /svn/repos> |
346 |
# DAV svn |
347 |
# SVNPath ${SVN_REPOS_LOC}/repos |
348 |
# AuthType Basic |
349 |
# AuthName "Subversion repository" |
350 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
351 |
# Require valid-user |
352 |
#</Location> |
353 |
</IfDefine> |
354 |
EOF |
355 |
fi |
356 |
|
357 |
# Install Bash Completion, bug 43179. |
358 |
dobashcompletion tools/client-side/bash_completion subversion |
359 |
rm -f tools/client-side/bash_completion |
360 |
|
361 |
# Install hot backup script, bug 54304. |
362 |
newbin tools/backup/hot-backup.py svn-hot-backup |
363 |
rm -fr tools/backup |
364 |
|
365 |
# Install svn_load_dirs.pl. |
366 |
if use perl; then |
367 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
368 |
fi |
369 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
370 |
|
371 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
372 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
373 |
if use apache2; then |
374 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
375 |
else |
376 |
newconfd "${FILESDIR}"/svnserve.confd2 svnserve |
377 |
fi |
378 |
insinto /etc/xinetd.d |
379 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
380 |
|
381 |
# Install documentation. |
382 |
dodoc CHANGES COMMITTERS README |
383 |
dohtml www/hacking.html |
384 |
dodoc tools/xslt/svnindex.{css,xsl} |
385 |
rm -fr tools/xslt |
386 |
|
387 |
# Install Vim syntax files. |
388 |
if use vim-syntax; then |
389 |
insinto /usr/share/vim/vimfiles/syntax |
390 |
doins contrib/client-side/vim/svn.vim |
391 |
fi |
392 |
rm -f contrib/client-side/vim/svn.vim |
393 |
|
394 |
# Install Emacs Lisps. |
395 |
if use emacs; then |
396 |
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" |
397 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
398 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
399 |
elisp-site-file-install "${FILESDIR}/1.5.0/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
400 |
fi |
401 |
rm -fr contrib/client-side/emacs |
402 |
|
403 |
# Install extra files. |
404 |
if use extras; then |
405 |
einfo |
406 |
einfo "Installation of contrib and tools" |
407 |
einfo |
408 |
doenvd "${FILESDIR}/1.5.0/80subversion-extras" |
409 |
emake DESTDIR="${D}" install-contrib || die "Installation of contrib failed" |
410 |
emake DESTDIR="${D}" install-tools || die "Installation of tools failed" |
411 |
|
412 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
413 |
rm -fr contrib/client-side/svn-push |
414 |
rm -fr contrib/server-side/svnstsw |
415 |
rm -fr tools/client-side/svnmucc |
416 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
417 |
rm -fr tools/{buildbot,dev,diff,po} |
418 |
|
419 |
insinto /usr/share/${PN} |
420 |
doins -r contrib tools |
421 |
fi |
422 |
|
423 |
if use doc; then |
424 |
einfo |
425 |
einfo "Installation of Subversion HTML documentation" |
426 |
einfo |
427 |
dohtml doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
428 |
|
429 |
insinto /usr/share/doc/${PF} |
430 |
doins -r notes |
431 |
ecompressdir /usr/share/doc/${PF}/notes |
432 |
|
433 |
# if use ruby; then |
434 |
# make DESTDIR="${D}" install-swig-rb-doc |
435 |
# fi |
436 |
|
437 |
if use java; then |
438 |
java-pkg_dojavadoc doc/javadoc |
439 |
fi |
440 |
fi |
441 |
} |
442 |
|
443 |
pkg_preinst() { |
444 |
# Compare versions of Berkeley DB, bug 122877. |
445 |
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then |
446 |
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
447 |
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
448 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
449 |
CHANGED_BDB_VERSION=1 |
450 |
fi |
451 |
fi |
452 |
} |
453 |
|
454 |
pkg_postinst() { |
455 |
use emacs && elisp-site-regen |
456 |
use perl && perl-module_pkg_postinst |
457 |
|
458 |
if use ctypes-python; then |
459 |
python_mod_compile "$(python_get_sitedir)/csvn/"{.,core,ext}/*.py |
460 |
fi |
461 |
|
462 |
elog "Subversion Server Notes" |
463 |
elog "-----------------------" |
464 |
elog |
465 |
elog "If you intend to run a server, a repository needs to be created using" |
466 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
467 |
elog "${SVN_REPOS_LOC}:" |
468 |
elog |
469 |
elog " emerge --config =${CATEGORY}/${PF}" |
470 |
elog |
471 |
elog "Subversion has multiple server types, take your pick:" |
472 |
elog |
473 |
elog " - svnserve daemon: " |
474 |
elog " 1. Edit /etc/conf.d/svnserve" |
475 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
476 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
477 |
elog " 4. Make persistent: rc-update add svnserve default" |
478 |
elog |
479 |
elog " - svnserve via xinetd:" |
480 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
481 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
482 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
483 |
elog |
484 |
elog " - svn over ssh:" |
485 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
486 |
elog " Additionally run:" |
487 |
elog " groupadd svnusers" |
488 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
489 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
490 |
elog " want, for example:" |
491 |
elog " #!/bin/bash" |
492 |
elog " . /etc/conf.d/svnserve" |
493 |
elog " umask 007" |
494 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
495 |
elog |
496 |
|
497 |
if use apache2; then |
498 |
elog " - http-based server:" |
499 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
500 |
elog " 2. Create an htpasswd file:" |
501 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
502 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
503 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
504 |
elog |
505 |
fi |
506 |
|
507 |
elog " Fixing the repository permissions:" |
508 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
509 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
510 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
511 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
512 |
elog |
513 |
|
514 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
515 |
elog "backups to keep per repository by specifying an environment variable." |
516 |
elog "If you want to keep e.g. 2 backups, do the following:" |
517 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
518 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
519 |
elog |
520 |
|
521 |
elog "Subversion contains support for the use of Memcached" |
522 |
elog "to cache data of FSFS repositories." |
523 |
elog "You should install \"net-misc/memcached\", start memcached" |
524 |
elog "and configure your FSFS repositories, if you want to use this feature." |
525 |
elog "See the documentation for details." |
526 |
elog |
527 |
epause 6 |
528 |
|
529 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
530 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
531 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
532 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
533 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
534 |
fi |
535 |
} |
536 |
|
537 |
pkg_postrm() { |
538 |
use emacs && elisp-site-regen |
539 |
use perl && perl-module_pkg_postrm |
540 |
|
541 |
if use ctypes-python; then |
542 |
python_mod_cleanup |
543 |
fi |
544 |
} |
545 |
|
546 |
pkg_config() { |
547 |
if [[ ! -x "${ROOT}usr/bin/svnadmin" ]]; then |
548 |
die "You seem to only have built the Subversion client" |
549 |
fi |
550 |
|
551 |
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." |
552 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
553 |
echo "A Subversion repository already exists and I will not overwrite it." |
554 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
555 |
else |
556 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
557 |
|
558 |
einfo ">>> Populating repository directory ..." |
559 |
# Create initial repository. |
560 |
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
561 |
|
562 |
einfo ">>> Setting repository permissions ..." |
563 |
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
564 |
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
565 |
if use apache2; then |
566 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
567 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
568 |
else |
569 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
570 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
571 |
enewgroup "${SVNSERVE_GROUP}" |
572 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
573 |
fi |
574 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
575 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
576 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
577 |
fi |
578 |
} |