Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152746 - subversion 1.4.0 and apache 2.2 don't play well together
Summary: subversion 1.4.0 and apache 2.2 don't play well together
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Paul de Vrieze (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-24 23:23 UTC by Brian Tarricone
Modified: 2007-03-22 16:14 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
subversion-1.4.0-apache2.2-fix.diff (subversion-1.4.0-apache2.2-fix.diff,882 bytes, patch)
2006-10-24 23:25 UTC, Brian Tarricone
Details | Diff
subversion-1.4.2-apache2.2-fix.diff (subversion-1.4.2-apache2.2-fix.diff,1.07 KB, patch)
2006-12-01 08:15 UTC, Brian Tarricone
Details | Diff
subversion-1.4.2-apache2.2-fix-r1.diff (subversion-1.4.2-apache2.2-fix-r1.diff,1.43 KB, patch)
2006-12-01 20:11 UTC, Brian Tarricone
Details | Diff
subversion-1.4.2-proper-apr-deps.diff (subversion-1.4.2-proper-apr.diff,1.33 KB, patch)
2007-01-31 16:54 UTC, Georgi Georgiev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Tarricone 2006-10-24 23:23:37 UTC
Turns out mod_dav_svn.so links to apr and apr-util 0.9 regardless of what apache is linked against, and apache 2.2 requires apr/apr-util 1.0.  Patch incoming...
Comment 1 Brian Tarricone 2006-10-24 23:25:29 UTC
Created attachment 100437 [details, diff]
subversion-1.4.0-apache2.2-fix.diff

Fixes subversion-1.4.0.ebuild to check apache's minor version, and use apr-config and apu-config if it's 2.0.x, and apr-1-config and apu-1-config otherwise.  Without this, apache subprocesses segfault when trying to access a svn repository.
Comment 2 Brian Tarricone 2006-12-01 08:15:28 UTC
Created attachment 103136 [details, diff]
subversion-1.4.2-apache2.2-fix.diff

Bug is still present in subversion 1.4.2 ebuild; here's a new patch.  This is fairly simple; can this please go in?  It's gonna get real old patching this myself every time a new version comes out.
Comment 3 Brian Tarricone 2006-12-01 20:11:50 UTC
Created attachment 103172 [details, diff]
subversion-1.4.2-apache2.2-fix-r1.diff

Just realised the previous patch won't work properly if apache2 isn't in USE.  This one should work either way.
Comment 4 Georgi Georgiev 2007-01-31 16:52:12 UTC
I'd agree with the patch, except for a small detail: subversion should explicitly depend on the apr slot that it links against. It should not depend on apr-0 if it is going to use apr-1.

In fact... if depending on apache, why bother specifying the apr dependency at all? apache will pull it for us.

DEPEND="apache2 ( ${APACHE2_DEPEND} )
!apache2 ( dev-util/apr-0* )
..."
Comment 5 Georgi Georgiev 2007-01-31 16:54:03 UTC
Created attachment 108777 [details, diff]
subversion-1.4.2-proper-apr-deps.diff

Took the idea from the previous patch but also made the apr dependency conditional on !apache2.
Comment 6 Brian Tarricone 2007-01-31 20:41:39 UTC
(In reply to comment #4)
> I'd agree with the patch, except for a small detail: subversion should
> explicitly depend on the apr slot that it links against. It should not depend
> on apr-0 if it is going to use apr-1.

Ah, good call.  I forgot to check DEPEND.  Looks like that should work right, though the ebuild will need to be modified if libapr-0 ever disappears from portage.  Basing it off my patch in attachment 103172 [details, diff] would just make it select the best version of libapr available.  If you wanted to use my latest patch, and add a modified version of your dep change:

!apache2? ( dev-libs/apr-util )

... that would be fine, since subversion can make use of any version of libapr, it just it needs to be selected at compile time.  Unless there's a compelling reason to use apr 0.x rather than apr 1.x; I don't really know.

Anyway, I'm just nitpicking.  Either way should work.  ^_^
Comment 7 Georgi Georgiev 2007-02-01 00:51:51 UTC
(In reply to comment #6)
> !apache2? ( dev-libs/apr-util )
> 
> ... that would be fine, since subversion can make use of any version of libapr,
> it just it needs to be selected at compile time.  Unless there's a compelling
> reason to use apr 0.x rather than apr 1.x; I don't really know.

I was trying to avoid the following situation:

you have apr-0
you emerge subversion and it links properly
you emerge apr-1
you eventually nuke apr-0 from your system, because nothing needs it (the dep of subversion is satisfied by apr-1, even though it is linked against apr-0)

As to why I picked apr-0 -- because it's the stable one :)
Comment 8 Brian Tarricone 2007-02-01 01:15:39 UTC
Ah, gotcha.  Sounds good to me.
Comment 9 Alexander Feigl 2007-02-14 14:26:05 UTC
I will try switch a host to apache2.2 + mod_dav_svn tonight. You will hear from me when there are problems.

Any chance that an ebuild which builds against apr 1.x when linked against apache 2.2 will be in the portage tree soon?
Comment 10 Lisa Seelye (RETIRED) gentoo-dev 2007-02-23 23:55:51 UTC
Georgi's patch (attachment #108777 [details, diff]) fixes segfaults for me, apache-2.2.4 and subversion-1.4.2 (as that is the version the diff is against).
Comment 11 Brian Tarricone 2007-02-24 00:02:42 UTC
Any particular reason why this hasn't gone in yet?  If the patch needs something, please let me know and I'll try to fix it.
Comment 12 Paul de Vrieze (RETIRED) gentoo-dev 2007-03-03 21:12:44 UTC
The problem is actually that subversion apr autodetection by default chooses the 0.x version instead of the one used by apache2. The correct workaround would be to unmerge apr-0.x (and apu-0.x) for the duration of the merge.

Concerning the patch. I've just committed a fixed subversion. It differs from the patches in that it correctly works with 1.1 apr/apr-util when not linked with apache2
Comment 13 Weedy 2007-03-07 23:08:27 UTC
you have a typo, it pretty much breaks your patch.

--- /usr/portage/dev-util/subversion/subversion-1.4.3.ebuild    2007-03-07 05:05:40.000000000 +0000
+++ subversion-1.4.3.ebuild     2007-03-07 23:06:53.000000000 +0000
@@ -80,7 +80,7 @@

        if use apache2; then
                myconf="--with-apxs=${APXS2}"
-               apache_minor="(best_version apache | cut -d. -f2)"
+               apache_minor="$(best_version apache | cut -d. -f2)"
                if [ ${apache_minor} -gt 0 ]; then
                        apr_suffix="-1"
                fi
Comment 14 Alexis Lahouze 2007-03-09 17:38:44 UTC
(In reply to comment #13)
> you have a typo, it pretty much breaks your patch.
> 
> --- /usr/portage/dev-util/subversion/subversion-1.4.3.ebuild    2007-03-07
> 05:05:40.000000000 +0000
> +++ subversion-1.4.3.ebuild     2007-03-07 23:06:53.000000000 +0000
> @@ -80,7 +80,7 @@
> 
>         if use apache2; then
>                 myconf="--with-apxs=${APXS2}"
> -               apache_minor="(best_version apache | cut -d. -f2)"
> +               apache_minor="$(best_version apache | cut -d. -f2)"
>                 if [ ${apache_minor} -gt 0 ]; then
>                         apr_suffix="-1"
>                 fi
> 

This last fix seems to work for me, thanks :-)

Comment 15 Georgi Georgiev 2007-03-10 05:58:34 UTC
Any chance to change the argument to best_version to include the category? This is the only ebuild in the tree that doesn't do it.

best_version dev-util/subversion
best_version net-www/apache
Comment 16 Christian Faulhammer (RETIRED) gentoo-dev 2007-03-12 08:30:11 UTC
Has been fixed.
Comment 17 Georgi Georgiev 2007-03-14 17:27:07 UTC
(In reply to comment #16)
> Has been fixed.

Was the above comment also in respond to comment #15, or only to the discussion up to comment #14?

Asking, because best_version is still getting called with "apache" and "subversion" and I was wondering if it is not an unintentional miss.
Comment 18 Christian Faulhammer (RETIRED) gentoo-dev 2007-03-14 17:30:02 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Has been fixed.
> Was the above comment also in respond to comment #15, or only to the discussion
> up to comment #14?
> Asking, because best_version is still getting called with "apache" and
> "subversion" and I was wondering if it is not an unintentional miss.

 Only comment #14.  pauldv?
Comment 19 Georgi Georgiev 2007-03-14 17:38:49 UTC
Ooops, seems that the fix is incomplete (in addition to what "best_version" needs):

 @@ -106,7 +106,7 @@
                myconf="${myconf} --with-neon=/usr"
        fi
 
-       append-flags `/usr/bin/apr-config --cppflags`
+       append-flags `/usr/bin/apr${apr_suffix}-config --cppflags`
 
        econf ${myconf} \
                $(use_with berkdb berkeley-db) \
Comment 20 Paul de Vrieze (RETIRED) gentoo-dev 2007-03-18 19:20:49 UTC
The missing cat (and the others) were a miss. Should be fixed now.
Comment 21 Georgi Georgiev 2007-03-19 00:23:16 UTC
(In reply to comment #20)
> The missing cat (and the others) were a miss. Should be fixed now.

Confirmed. Except for the following triviality in pkg_setup() (nothing major, but still)

- ewarn "Presently you have $(best_version subversion)"
+ ewarn "Presently you have $(best_version dev-util/subversion)"
Comment 22 Paul de Vrieze (RETIRED) gentoo-dev 2007-03-22 16:14:56 UTC
Yeah, missed it. Fixed in all ebuilds now.