1 |
commit: ea8125358ccdf60f3cb3b85582274455974bca5c |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 11 07:41:02 2021 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 11 07:42:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea812535 |
7 |
|
8 |
dev-vcs/subversion: Version bump (v1.14.1) |
9 |
|
10 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
11 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
12 |
|
13 |
dev-vcs/subversion/Manifest | 1 + |
14 |
dev-vcs/subversion/subversion-1.14.1.ebuild | 441 ++++++++++++++++++++++++++++ |
15 |
2 files changed, 442 insertions(+) |
16 |
|
17 |
diff --git a/dev-vcs/subversion/Manifest b/dev-vcs/subversion/Manifest |
18 |
index b8414805d46..a097b41da77 100644 |
19 |
--- a/dev-vcs/subversion/Manifest |
20 |
+++ b/dev-vcs/subversion/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST subversion-1.10.0_rc1-patches-1.tar.xz 2984 BLAKE2B 7c9619b95ca6b433a58dc5baf3a1e1b14ef0017f714af81762b975d50a37b743788a4da65cf7f9eb8e633cbc813ad8dd974b530a19ec2d3fc74b75921f8f0c17 SHA512 aa7a25a253ea2da99520399d292d3e1602985392bae6dc5582003fdb9719d654638754b6e370b68b184ee6729ba3833bd511c09b2cb36f8f476b42063f55fbb2 |
23 |
DIST subversion-1.14.0.tar.bz2 8497531 BLAKE2B 261f1401a96b181ccbdea9ab6e1dde301aa2c67296a0dc458a1d7e544530411b656d0d5335f985c9222c2d44fc8f962b1a960b81e4ff4883d373cb4405af2461 SHA512 af6b706fdc91f7ab292fce9d9de582da306fd11e92767dc852687e71a6a8b65bb867fa70d5afd7f76a46005acb1b3c2d3193e690def48cd26875b3a7851cd13b |
24 |
+DIST subversion-1.14.1.tar.bz2 8504612 BLAKE2B 27c6c5a9e656680b10fbc4b5c6d5fed36759d42d908e2bd5e56e19a7477c779c72314eb4a6766a13f1af047a759f9f9334b963c1d41cd48573b9800d5b671cc1 SHA512 0a70c7152b77cdbcb810a029263e4b3240b6ef41d1c19714e793594088d3cca758d40dfbc05622a806b06463becb73207df249393924ce591026b749b875fcdd |
25 |
|
26 |
diff --git a/dev-vcs/subversion/subversion-1.14.1.ebuild b/dev-vcs/subversion/subversion-1.14.1.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..220daf07afe |
29 |
--- /dev/null |
30 |
+++ b/dev-vcs/subversion/subversion-1.14.1.ebuild |
31 |
@@ -0,0 +1,441 @@ |
32 |
+# Copyright 1999-2021 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{7,8} ) |
38 |
+USE_RUBY="ruby26 ruby25 ruby24" |
39 |
+DISTUTILS_OPTIONAL=1 |
40 |
+WANT_AUTOMAKE="none" |
41 |
+GENTOO_DEPEND_ON_PERL="no" |
42 |
+ |
43 |
+inherit autotools bash-completion-r1 db-use depend.apache flag-o-matic java-pkg-opt-2 libtool perl-module python-any-r1 ruby-single toolchain-funcs xdg-utils |
44 |
+ |
45 |
+MY_P="${P/_/-}" |
46 |
+DESCRIPTION="Advanced version control system" |
47 |
+HOMEPAGE="https://subversion.apache.org/" |
48 |
+SRC_URI="mirror://apache/${PN}/${MY_P}.tar.bz2 |
49 |
+ https://dev.gentoo.org/~polynomial-c/${PN}-1.10.0_rc1-patches-1.tar.xz" |
50 |
+S="${WORKDIR}/${MY_P}" |
51 |
+ |
52 |
+LICENSE="Apache-2.0 BSD MIT BSD-2 FSFAP unicode" |
53 |
+SLOT="0" |
54 |
+[[ "${PV}" = *_rc* ]] || \ |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
56 |
+IUSE="apache2 berkdb debug doc extras gnome-keyring java kwallet nls perl ruby sasl test" |
57 |
+RESTRICT="!test? ( test )" |
58 |
+ |
59 |
+COMMON_DEPEND=" |
60 |
+ app-arch/bzip2 |
61 |
+ app-arch/lz4 |
62 |
+ >=dev-db/sqlite-3.7.12 |
63 |
+ >=dev-libs/apr-1.5:1 |
64 |
+ >=dev-libs/apr-util-1.5:1 |
65 |
+ dev-libs/expat |
66 |
+ dev-libs/libutf8proc:= |
67 |
+ >=net-libs/serf-1.3.4 |
68 |
+ sys-apps/file |
69 |
+ sys-libs/zlib |
70 |
+ berkdb? ( >=sys-libs/db-4.0.14:= ) |
71 |
+ gnome-keyring? ( |
72 |
+ dev-libs/glib:2 |
73 |
+ app-crypt/libsecret |
74 |
+ sys-apps/dbus |
75 |
+ ) |
76 |
+ kwallet? ( |
77 |
+ dev-qt/qtcore:5 |
78 |
+ dev-qt/qtdbus:5 |
79 |
+ dev-qt/qtgui:5 |
80 |
+ kde-frameworks/kcoreaddons:5 |
81 |
+ kde-frameworks/ki18n:5 |
82 |
+ kde-frameworks/kwallet:5 |
83 |
+ sys-apps/dbus |
84 |
+ ) |
85 |
+ perl? ( dev-lang/perl:= ) |
86 |
+ ruby? ( ${RUBY_DEPS} ) |
87 |
+ sasl? ( dev-libs/cyrus-sasl ) |
88 |
+" |
89 |
+RDEPEND="${COMMON_DEPEND} |
90 |
+ apache2? ( |
91 |
+ acct-group/apache |
92 |
+ acct-user/apache |
93 |
+ www-servers/apache[apache2_modules_dav] |
94 |
+ ) |
95 |
+ !apache2? ( |
96 |
+ acct-group/svnusers |
97 |
+ acct-user/svn |
98 |
+ ) |
99 |
+ java? ( >=virtual/jre-1.8 ) |
100 |
+ nls? ( virtual/libintl ) |
101 |
+ perl? ( dev-perl/URI ) |
102 |
+" |
103 |
+# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once |
104 |
+DEPEND="${COMMON_DEPEND} |
105 |
+ virtual/pkgconfig |
106 |
+ !!<sys-apps/sandbox-1.6 |
107 |
+ doc? ( app-doc/doxygen ) |
108 |
+ gnome-keyring? ( virtual/pkgconfig ) |
109 |
+ java? ( >=virtual/jdk-1.8 ) |
110 |
+ kwallet? ( |
111 |
+ kde-frameworks/kdelibs4support:5 |
112 |
+ virtual/pkgconfig |
113 |
+ ) |
114 |
+ nls? ( sys-devel/gettext ) |
115 |
+ perl? ( dev-lang/swig ) |
116 |
+ ruby? ( dev-lang/swig ) |
117 |
+ test? ( ${PYTHON_DEPS} ) |
118 |
+" |
119 |
+ |
120 |
+want_apache |
121 |
+ |
122 |
+pkg_setup() { |
123 |
+ if use berkdb ; then |
124 |
+ local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
125 |
+ | grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
126 |
+ | sed 's:.*b::')" |
127 |
+ einfo |
128 |
+ if [[ -z "${SVN_BDB_VERSION}" ]] ; then |
129 |
+ if [[ -n "${apu_bdb_version}" ]] ; then |
130 |
+ SVN_BDB_VERSION="${apu_bdb_version}" |
131 |
+ einfo "Matching db version to apr-util" |
132 |
+ else |
133 |
+ SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
134 |
+ einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
135 |
+ fi |
136 |
+ fi |
137 |
+ einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
138 |
+ einfo |
139 |
+ |
140 |
+ if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
141 |
+ eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
142 |
+ eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
143 |
+ eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
144 |
+ eerror "Aborting to avoid possible run-time crashes." |
145 |
+ die "Berkeley DB version mismatch" |
146 |
+ fi |
147 |
+ fi |
148 |
+ |
149 |
+ depend.apache_pkg_setup |
150 |
+ |
151 |
+ java-pkg-opt-2_pkg_setup |
152 |
+ |
153 |
+ # https://issues.apache.org/jira/browse/SVN-4813#comment-16813739 |
154 |
+ append-cppflags -P |
155 |
+ |
156 |
+ if use debug ; then |
157 |
+ append-cppflags -DSVN_DEBUG -DAP_DEBUG |
158 |
+ fi |
159 |
+ |
160 |
+ # http://mail-archives.apache.org/mod_mbox/subversion-dev/201306.mbox/%3C51C42014.3060700@××××××××.com%3E |
161 |
+ [[ ${CHOST} == *-solaris2* ]] && append-cppflags -D__EXTENSIONS__ |
162 |
+ |
163 |
+ # Allow for custom repository locations. |
164 |
+ SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
165 |
+ |
166 |
+ if use ruby ; then |
167 |
+ local rbslot |
168 |
+ RB_VER="" |
169 |
+ for rbslot in $(sed 's@\([[:digit:]]\+\)\([[:digit:]]\)@\1.\2@g' <<< ${USE_RUBY//ruby}) ; do |
170 |
+ if has_version dev-lang/ruby:${rbslot} ; then |
171 |
+ RB_VER="${rbslot/.}" |
172 |
+ break |
173 |
+ fi |
174 |
+ done |
175 |
+ [[ -z "${RB_VER}" ]] && die "No useable ruby version found" |
176 |
+ fi |
177 |
+} |
178 |
+ |
179 |
+src_prepare() { |
180 |
+ # https://bugs.gentoo.org/721300 |
181 |
+ rm "${WORKDIR}"/patches/subversion-1.10.0_rc1-utf8proc_include.patch || die |
182 |
+ |
183 |
+ eapply "${WORKDIR}/patches" |
184 |
+ eapply_user |
185 |
+ |
186 |
+ chmod +x build/transform_libtool_scripts.sh || die |
187 |
+ |
188 |
+ sed -i \ |
189 |
+ -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
190 |
+ -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
191 |
+ |
192 |
+ # this bites us in particular on Solaris |
193 |
+ sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
194 |
+ die "/bin/sh is not POSIX shell!" |
195 |
+ |
196 |
+ eautoconf |
197 |
+ elibtoolize |
198 |
+ |
199 |
+ sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \ |
200 |
+ -i build-outputs.mk || die "sed failed" |
201 |
+ |
202 |
+ xdg_environment_reset |
203 |
+} |
204 |
+ |
205 |
+src_configure() { |
206 |
+ local myconf=( |
207 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
208 |
+ $(use_with apache2 apache-libexecdir) |
209 |
+ $(use_with apache2 apxs "${EPREFIX}"/usr/bin/apxs) |
210 |
+ $(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") |
211 |
+ --without-ctypesgen |
212 |
+ --disable-runtime-module-search |
213 |
+ $(use_with gnome-keyring) |
214 |
+ $(use_enable java javahl) |
215 |
+ $(use_with java jdk "${JAVA_HOME}") |
216 |
+ $(use_with kwallet) |
217 |
+ $(use_enable nls) |
218 |
+ $(use_with sasl) |
219 |
+ --with-serf |
220 |
+ --with-apr="${EPREFIX}/usr/bin/apr-1-config" |
221 |
+ --with-apr-util="${EPREFIX}/usr/bin/apu-1-config" |
222 |
+ --disable-experimental-libtool |
223 |
+ --without-jikes |
224 |
+ --disable-mod-activation |
225 |
+ --disable-static |
226 |
+ --enable-svnxx |
227 |
+ ) |
228 |
+ |
229 |
+ if use perl || use ruby; then |
230 |
+ myconf+=( --with-swig ) |
231 |
+ else |
232 |
+ myconf+=( --without-swig ) |
233 |
+ fi |
234 |
+ |
235 |
+ if use java ; then |
236 |
+ myconf+=( --without-junit ) |
237 |
+ fi |
238 |
+ |
239 |
+ case ${CHOST} in |
240 |
+ *-aix*) |
241 |
+ # avoid recording immediate path to sharedlibs into executables |
242 |
+ append-ldflags -Wl,-bnoipath |
243 |
+ ;; |
244 |
+ *-cygwin*) |
245 |
+ # no LD_PRELOAD support, no undefined symbols |
246 |
+ myconf+=( --disable-local-library-preloading LT_LDFLAGS=-no-undefined ) |
247 |
+ ;; |
248 |
+ *-interix*) |
249 |
+ # loader crashes on the LD_PRELOADs... |
250 |
+ myconf+=( --disable-local-library-preloading ) |
251 |
+ ;; |
252 |
+ *-solaris*) |
253 |
+ # need -lintl to link |
254 |
+ use nls && append-libs intl |
255 |
+ # this breaks installation, on x64 echo replacement is 32-bits |
256 |
+ myconf+=( --disable-local-library-preloading ) |
257 |
+ ;; |
258 |
+ *-mint*) |
259 |
+ myconf+=( --enable-all-static --disable-local-library-preloading ) |
260 |
+ ;; |
261 |
+ *) |
262 |
+ # inject LD_PRELOAD entries for easy in-tree development |
263 |
+ myconf+=( --enable-local-library-preloading ) |
264 |
+ ;; |
265 |
+ esac |
266 |
+ |
267 |
+ #version 1.7.7 again tries to link against the older installed version and fails, when trying to |
268 |
+ #compile for x86 on amd64, so workaround this issue again |
269 |
+ #check newer versions, if this is still/again needed |
270 |
+ #myconf+=( --disable-disallowing-of-undefined-references ) |
271 |
+ |
272 |
+ # for build-time scripts |
273 |
+ if use test; then |
274 |
+ python_setup |
275 |
+ fi |
276 |
+ |
277 |
+ # Remove when >=dev-libs/libutf8proc-2.5.0 is stable |
278 |
+ # https://bugs.gentoo.org/721300 |
279 |
+ append-cppflags -I"${EPREFIX}"/usr/include/libutf8proc |
280 |
+ |
281 |
+ # allow overriding Python include directory |
282 |
+ ac_cv_path_RUBY=$(usex ruby "${EPREFIX}/usr/bin/ruby${RB_VER}" "none") \ |
283 |
+ ac_cv_path_RDOC=$(usex ruby "${EPREFIX}/usr/bin/rdoc${RB_VER}" "none") \ |
284 |
+ econf "${myconf[@]}" |
285 |
+} |
286 |
+ |
287 |
+src_compile() { |
288 |
+ emake local-all |
289 |
+ |
290 |
+ if use perl ; then |
291 |
+ emake swig-pl |
292 |
+ fi |
293 |
+ |
294 |
+ if use ruby ; then |
295 |
+ emake swig-rb |
296 |
+ fi |
297 |
+ |
298 |
+ if use java ; then |
299 |
+ emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl |
300 |
+ fi |
301 |
+ |
302 |
+ if use extras ; then |
303 |
+ emake tools |
304 |
+ fi |
305 |
+ |
306 |
+ if use doc ; then |
307 |
+ doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
308 |
+ |
309 |
+ if use java; then |
310 |
+ emake doc-javahl |
311 |
+ fi |
312 |
+ fi |
313 |
+} |
314 |
+ |
315 |
+src_test() { |
316 |
+ if has_version ~${CATEGORY}/${P} ; then |
317 |
+ default |
318 |
+ else |
319 |
+ ewarn "The test suite shows errors when there is an older version of" |
320 |
+ ewarn "${CATEGORY}/${PN} installed. Please install =${CATEGORY}/${P}*" |
321 |
+ ewarn "before running the test suite." |
322 |
+ ewarn "Test suite skipped." |
323 |
+ fi |
324 |
+} |
325 |
+ |
326 |
+src_install() { |
327 |
+ emake -j1 DESTDIR="${D}" local-install |
328 |
+ |
329 |
+ if use perl ; then |
330 |
+ emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl |
331 |
+ perl_delete_localpod |
332 |
+ find "${ED}" \( -name .packlist -o -name "*.bs" \) -delete || die |
333 |
+ fi |
334 |
+ |
335 |
+ if use ruby ; then |
336 |
+ emake DESTDIR="${D}" install-swig-rb |
337 |
+ fi |
338 |
+ |
339 |
+ if use java ; then |
340 |
+ emake DESTDIR="${D}" install-javahl |
341 |
+ java-pkg_regso "${ED%/}"/usr/$(get_libdir)/libsvnjavahl*$(get_libname) |
342 |
+ java-pkg_dojar "${ED%/}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
343 |
+ rm -fr "${ED%/}"/usr/$(get_libdir)/svn-javahl/*.jar |
344 |
+ fi |
345 |
+ |
346 |
+ # Install Apache module configuration. |
347 |
+ if use apache2 ; then |
348 |
+ keepdir "${APACHE_MODULES_CONFDIR}" |
349 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
350 |
+ doins "${FILESDIR}/47_mod_dav_svn.conf" |
351 |
+ fi |
352 |
+ |
353 |
+ # Install Bash Completion, bug 43179. |
354 |
+ newbashcomp tools/client-side/bash_completion svn |
355 |
+ bashcomp_alias svn svn{admin,dumpfilter,look,sync,version} |
356 |
+ rm -f tools/client-side/bash_completion |
357 |
+ |
358 |
+ # Install hot backup script, bug 54304. |
359 |
+ newbin tools/backup/hot-backup.py svn-hot-backup |
360 |
+ rm -fr tools/backup |
361 |
+ |
362 |
+ # Install svnserve init-script and xinet.d snippet, bug 43245. |
363 |
+ newinitd "${FILESDIR}"/svnserve.initd3 svnserve |
364 |
+ newconfd "${FILESDIR}"/svnserve.confd svnserve |
365 |
+ insinto /etc/xinetd.d |
366 |
+ newins "${FILESDIR}"/svnserve.xinetd svnserve |
367 |
+ |
368 |
+ #adjust default user and group with disabled apache2 USE flag, bug 381385 |
369 |
+ if ! use apache2 ; then |
370 |
+ sed -e "s\USER:-apache\USER:-svn\g" \ |
371 |
+ -e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
372 |
+ -i "${ED%/}"/etc/init.d/svnserve || die |
373 |
+ sed -e "0,/apache/s//svn/" \ |
374 |
+ -e "s:apache:svnusers:" \ |
375 |
+ -i "${ED%/}"/etc/xinetd.d/svnserve || die |
376 |
+ fi |
377 |
+ |
378 |
+ # Install documentation. |
379 |
+ dodoc CHANGES COMMITTERS README |
380 |
+ dodoc tools/xslt/svnindex.{css,xsl} |
381 |
+ rm -fr tools/xslt |
382 |
+ |
383 |
+ # Install extra files. |
384 |
+ if use extras ; then |
385 |
+ cat <<- EOF > 80subversion-extras |
386 |
+ PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
387 |
+ ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
388 |
+ EOF |
389 |
+ doenvd 80subversion-extras |
390 |
+ |
391 |
+ emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools |
392 |
+ |
393 |
+ find tools \( -name "*.bat" -o -name "*.in" -o -name ".libs" \) -print0 | xargs -0 rm -fr |
394 |
+ rm -fr tools/client-side/svnmucc |
395 |
+ rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
396 |
+ rm -fr tools/{buildbot,dev,diff,po} |
397 |
+ fi |
398 |
+ |
399 |
+ if use doc ; then |
400 |
+ docinto html |
401 |
+ dodoc -r doc/doxygen/html/* |
402 |
+ |
403 |
+ if use java ; then |
404 |
+ java-pkg_dojavadoc doc/javadoc |
405 |
+ fi |
406 |
+ fi |
407 |
+ |
408 |
+ find "${D}" -name '*.la' -type f -delete || die |
409 |
+ |
410 |
+ cd "${ED%/}"/usr/share/locale |
411 |
+ for i in * ; do |
412 |
+ if [[ ${i} != *${LINGUAS}* ]] ; then |
413 |
+ rm -r ${i} || die |
414 |
+ fi |
415 |
+ done |
416 |
+} |
417 |
+ |
418 |
+pkg_preinst() { |
419 |
+ # Compare versions of Berkeley DB, bug 122877. |
420 |
+ if use berkdb && [[ -f "${EROOT}/usr/bin/svn" ]] ; then |
421 |
+ OLD_BDB_VERSION="$(scanelf -nq "${EROOT}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
422 |
+ NEW_BDB_VERSION="$(scanelf -nq "${ED%/}/usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
423 |
+ if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then |
424 |
+ CHANGED_BDB_VERSION="1" |
425 |
+ fi |
426 |
+ fi |
427 |
+} |
428 |
+ |
429 |
+pkg_postinst() { |
430 |
+ if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then |
431 |
+ ewarn "You upgraded from an older version of Berkeley DB and may experience" |
432 |
+ ewarn "problems with your repository. Run the following commands as root to fix it:" |
433 |
+ ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
434 |
+ ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
435 |
+ fi |
436 |
+ |
437 |
+ ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
438 |
+} |
439 |
+ |
440 |
+pkg_postrm() { |
441 |
+ : |
442 |
+} |
443 |
+ |
444 |
+pkg_config() { |
445 |
+ # Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
446 |
+ # already has EPREFIX in it |
447 |
+ einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
448 |
+ if [[ -e "${SVN_REPOS_LOC}/repos" ]] ; then |
449 |
+ echo "A Subversion repository already exists and I will not overwrite it." |
450 |
+ echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
451 |
+ else |
452 |
+ mkdir -p "${SVN_REPOS_LOC}/conf" |
453 |
+ |
454 |
+ einfo "Populating repository directory..." |
455 |
+ # Create initial repository. |
456 |
+ "${EROOT}/usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
457 |
+ |
458 |
+ einfo "Setting repository permissions..." |
459 |
+ SVNSERVE_USER="$(. "${EROOT}/etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
460 |
+ SVNSERVE_GROUP="$(. "${EROOT}/etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
461 |
+ if use apache2 ; then |
462 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
463 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
464 |
+ else |
465 |
+ [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
466 |
+ [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
467 |
+ fi |
468 |
+ chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
469 |
+ chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
470 |
+ chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} "${SVN_REPOS_LOC}/repos" |
471 |
+ fi |
472 |
+} |