#12543 closed enhancement (invalid)
add patch to make bzr svn plugin work
Reported by: | darwin@… | Owned by: | blair (Blair Zajac) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | subversion-python25bindings bazaar-ng | Cc: | blair (Blair Zajac), skymoo (Adam Mercer) |
Port: |
Description
The new Bazaar version control system has a plugin that allows it to interoperate with Subversion repositories. This plugin requires an updated version of the Subversion python bindings. A patch has been made available online.
My patch to the Portfile downloads this patch and applies it before building. It seems to apply ok to 1.4.4, and the bzr svn plugin works once it is installed.
For more information, check the Requirements section of the plugin page. I have merely automated their directions without exhaustively testing everything. Significantly, they seem to claim this patch will not work with newer versions of SWIG, although exactly what they mean is unclear. I built the bindings fine with the SWIG 1.3.27 port.
I have made a new port for the bzr svn plugin, but it will not work unless this port is updated.
Attachments (3)
Change History (16)
Changed 17 years ago by darwin@…
comment:1 Changed 17 years ago by darwin@…
comment:2 Changed 17 years ago by sfiera@…
Cc: | blair@… ramercer@… added |
---|---|
Keywords: | subversion-python24bindings bazaar-ng added |
Milestone: | → Port Updates |
comment:3 Changed 17 years ago by skymoo (Adam Mercer)
Just applied that patch to subversion-python24bindings port locally, rebuilt it, and installed the bzr svn plugin locally. On running bzr the following is written to my ~/.bzr.log
bzr arguments: [u'plugins'] looking for plugins in /Users/ram/.bazaar/plugins [ 8344] Wed 13:13:43.383 WARNING: Unable to load plugin 'svn' from '/Users/ram/.bazaar/plugins' Traceback (most recent call last):
File "/opt/local/lib/python2.4/site-packages/bzrlib/plugin.py", line 180, in load_from_dir
exec "import bzrlib.plugins.%s" % name in {}
File "<string>", line 1, in ? File "/Users/ram/.bazaar/plugins/svn/init.py", line 63, in ?
check_subversion_version()
File "/Users/ram/.bazaar/plugins/svn/init.py", line 56, in check_subversion_version
import svn.delta
File "/opt/local/lib/svn-python/svn/delta.py", line 19, in ? File "/opt/local/lib/svn-python/libsvn/delta.py", line 5, in ?
ImportError: No module named _delta
This is the same error I've always had when trying to get the bzr svn plugin to work.
comment:4 Changed 17 years ago by darwin@…
Try my new bazaar-ng-svn port after applying my patch and rebuilding the bindings. I've gotten the bzr svn plugin to work that way.
Changed 17 years ago by darwin@…
bazaar-ng-svn Portfile, should work once patch is applied and python bindings rebuilt
comment:5 Changed 17 years ago by peter@…
Oh wow- thanks for this patch. It works fine for me, though your bazaar-ng-svn port pulls a version of the plugin that is too new for bazaar 0.91. Installed bzr-svn 0.3.4 and it's working fine.
again, thanks!
comment:7 Changed 17 years ago by skymoo (Adam Mercer)
Cc: | ram@… added; ramercer@… removed |
---|---|
Milestone: | Port Updates → Port Enhancements |
comment:8 Changed 17 years ago by skymoo (Adam Mercer)
Keywords: | subversion-python25bindings added; subversion-python24bindings removed |
---|
just updated this patch for subversion-python25bindings as bzr now uses the python25 portgroup and the following error occurs during the running of autogen.sh
uildcheck: checking installation for a source release... buildcheck: autoconf version 2.61 (ok) buildcheck: autoheader version 2.61 (ok) buildcheck: libtool version 1.5.22 (ok) Copying libtool helper: /usr/share/aclocal/libtool.m4 Generating SWIG code... swig -I/opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/include -I/opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig -I/opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/include -I/opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy -I/opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy -python -classic -w451 -w305 -o subversion/bindings/swig/python/core.c ./subversion/bindings/swig/core.i /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:46: Error: Unable to find 'pyswigtype.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:47: Error: Unable to find 'pyinout.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:48: Error: Unable to find 'pyvoid.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:49: Error: Unable to find 'pyobject.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:50: Error: Unable to find 'pystrbase.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:52: Error: Unable to find 'pyvaltypes.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:53: Error: Unable to find 'pyptrtypes.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:55: Error: Unable to find 'pymisctypes.swg' /opt/local/var/macports/build/_Users_ram_bzr_macports_local_devel_subversion-python25bindings/work/subversion-1.4.5/subversion/bindings/swig/proxy/python.swg:56: Error: Unable to find 'pyenum.swg' make: *** [subversion/bindings/swig/python/core.c] Error 1
Changed 17 years ago by skymoo (Adam Mercer)
Attachment: | subversion-metze.diff added |
---|
updated patch against subversion-python25bindings
comment:9 Changed 17 years ago by cwalther@…
I updated this for subversion-python25bindings 1.4.6, bzr 1.0, and bzr-svn 0.4.5, and ran into the same SWIG errors as ram above. In consequence, bzr complained "Installed Subversion version does not have updated Python bindings."
I was able to get around this by installing swig 1.3.27 instead of 1.3.33 (resurrecting its Portfile rev. 14795). I have not tried any other versions.
However, trying bzr branch svn+http://some/svn/repo now crashes with a Bus error before getting anything done:
Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000110 0x958e056e in sqlite3_set_auxdata () (gdb) bt #0 0x958e056e in sqlite3_set_auxdata () #1 0x9590e0b2 in sqlite3RegisterBuiltinFunctions () #2 0x014e0f41 in openDatabase () #3 0x016b082d in connection_init () #4 0x001f4fb0 in type_call () #5 0x0019eac2 in PyObject_Call () #6 0x016b329f in module_connect () #7 0x002332a0 in PyEval_EvalFrameEx () #8 0x00234e4a in PyEval_EvalCodeEx () #9 0x001c324a in function_call () #10 0x0019eac2 in PyObject_Call () #11 0x001a77e6 in instancemethod_call () #12 0x0019eac2 in PyObject_Call () #13 0x001f2907 in slot_tp_init () #14 0x001f4fb0 in type_call () #15 0x0019eac2 in PyObject_Call () #16 0x0023179f in PyEval_EvalFrameEx () #17 0x00233ffb in PyEval_EvalFrameEx () #18 0x00234e4a in PyEval_EvalCodeEx () #19 0x00232fda in PyEval_EvalFrameEx () #20 0x00234e4a in PyEval_EvalCodeEx () #21 0x00232fda in PyEval_EvalFrameEx () #22 0x00234e4a in PyEval_EvalCodeEx () #23 0x001c324a in function_call () #24 0x0019eac2 in PyObject_Call () #25 0x00231435 in PyEval_EvalFrameEx () #26 0x00234e4a in PyEval_EvalCodeEx () #27 0x001c324a in function_call () #28 0x0019eac2 in PyObject_Call () #29 0x00231435 in PyEval_EvalFrameEx () #30 0x00233ffb in PyEval_EvalFrameEx () #31 0x00233ffb in PyEval_EvalFrameEx () #32 0x00233ffb in PyEval_EvalFrameEx () #33 0x00234e4a in PyEval_EvalCodeEx () #34 0x00234f57 in PyEval_EvalCode () #35 0x00258db7 in PyRun_FileExFlags () #36 0x00259163 in PyRun_SimpleFileExFlags () #37 0x002678c8 in Py_Main () #38 0x00001f7c in _start () #39 0x00001ea9 in start ()
I have
buia:~ cwalther$ port installed | grep sqlite py25-sqlite3 @2.5.1_1 (active) sqlite3 @3.5.4_0 (active)
comment:10 Changed 17 years ago by skymoo (Adam Mercer)
Version: | 1.5.0 → 1.6.0 |
---|
Could you report this on the bzr mailing list <bazaar@…> as they may be able to shed some light?
comment:11 Changed 17 years ago by cwalther@…
I'm not sure this is a problem in bzr.
Here's what I found out so far:
I uninstalled py25-sqlite3 from MacPorts and tried installing pysqlite 2.4.0 from source. However, this gave me the same crash. What I noticed is that stack frames #0 and #1 in the backtrace above come from /usr/lib/libsqlite3.0.dylib, while #2 comes from /opt/local/lib/libsqlite3.0.8.6.dylib. So it seems that somehow the Apple and MacPorts versions of libsqlite3 get mixed up. I haven't been able to find out where the reference to /usr/lib/libsqlite3.0.dylib comes from, 'otool -L /opt/local/lib/python2.5/site-packages/pysqlite2/_sqlite.so' confirms that it's linked only against /opt/local/lib/libsqlite3.0.8.6.dylib, and likewise for all other python modules I could find.
I then tried 'port deactivate sqlite3' before building pysqlite 2.4.0 and reactivting it afterwards to force the module to be linked against /usr/lib/libsqlite3.0.dylib. This worked, and got me a working bzr-svn.
comment:12 Changed 16 years ago by skymoo (Adam Mercer)
Resolution: | → invalid |
---|---|
Status: | new → closed |
This patch is no longer needed for bzr-svn which now includes its own python wrappings for subversion, bzr-svn was added in r39726
comment:13 Changed 16 years ago by (none)
Milestone: | Port Enhancements |
---|
Milestone Port Enhancements deleted
This was supposed to be for the subversion-python24bindings port, must've missed the part where I specify that.