OpenWrt Forum Archive

Topic: SVN over HTTP on OpenWRT

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

i posted also in general discussion but i received no response. I think what I ask is quite simple, the problem is that I'm not a linux expert...

I have a Subversion server installed on openwrt (i used it for my projects) that works like a charme, now a software developer that should contribute is behind corporate firewall, so I'm trying to serve svn over http/https

I installed Apache, but default package has not mod_dav_svn module. So I tried to compile, modifying makefile, the apache and subversion package, without luck (instruction are for generic linux distribution, probably I do something wrong trying with openwrt)...

There is someone that could give me a step by step help? also few lines are sufficient...

Thanks in advance
FunMan

(Last edited by FunMan on 4 Feb 2012, 23:54)

Ok, these are my progress. I modify subversion makefile to add ./configure --with-apxs2=[path of apache apxs script]

This is the modified section of makefile

CONFIGURE_ARGS += \
    --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
    --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
    --with-neon="$(STAGING_DIR)/usr" \
    --disable-mod-activation \
    --without-ruby-sitedir \
    --without-swig \
    --with-jikes=no \
    --without-junit \
    --without-berkeley-db \
    --with-ssl \
    --disable-neon-version-check \
    --with-apxs=/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs \
    --without-sasl \

Type make, I obtain this error

checking for stdint.h... yes checking for unistd.h... yes
configure: looking for apr_memcache as part of apr-util checking apr_memcache.h usability... yes checking apr_memcache.h presence... yes checking for apr_memcache.h... yes checking for apr_memcache_create in -laprutil-1... yes checking for Apache module support via DSO through APXS... Use of assignment to $[ is deprecated at /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs line 86.
cannot open /usr/share/build/config_vars.mk: No such file or directory at /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs line 218.
configure: error: no - APXS refers to an old version of Apache
                     Unable to locate /mod_dav.h
make[3]: *** [/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/.configured_] Error 1
make[3]: Leaving directory `/home/daniele/dev/openwrt/backfire/feeds/packages/net/subversion'
make[2]: *** [package/feeds/packages/subversion/compile] Error 2
make[2]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make[1]: *** [/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/daniele/dev/openwrt/backfire'

Okay, the script cannot find the config_vars.mk file, I modify apxs script changing installbuilddir to build system root (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build). I modify also config_vars.mk,  changing all reference to apache in build system. The new one is

exp_exec_prefix = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr
exp_bindir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin
exp_sbindir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin
exp_libdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib
exp_libexecdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib
exp_mandir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/man
exp_sysconfdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/etc/apache
exp_datadir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share
exp_installbuilddir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build
exp_errordir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/error
exp_iconsdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/icons
exp_htdocsdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/htdocs
exp_manualdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/manual
exp_cgidir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/cgi-bin
exp_includedir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/include
exp_localstatedir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/var
exp_runtimedir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/var/log
exp_logfiledir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/var/log
exp_proxycachedir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/var/proxy
SHLTCFLAGS = -prefer-pic
LTCFLAGS = -prefer-non-pic -static
MKINSTALLDIRS = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build/mkdir.sh
INSTALL = $(LIBTOOL) --mode=install (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build/install.sh -c SSL_LIBS = -lssl -lcrypto -ldl MPM_NAME = prefork INSTALL_DSO = no progname = httpd OS = unix SHLIBPATH_VAR = LD_LIBRARY_PATH AP_BUILD_SRCLIB_DIRS = AP_CLEAN_SRCLIB_DIRS = bindir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin
sbindir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin
cgidir = ${datadir}/cgi-bin
logfiledir = ${localstatedir}/log
exec_prefix = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr
datadir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share
localstatedir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/var
mandir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/man
libdir = ${exec_prefix}/lib
libexecdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib
htdocsdir = ${datadir}/htdocs
manualdir = ${datadir}/manual
includedir = ${prefix}/include
errordir = ${datadir}/error
iconsdir = ${datadir}/icons
sysconfdir = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/etc/apache
installbuilddir = ${datadir}/build
runtimedir = ${localstatedir}/log
proxycachedir = ${localstatedir}/proxy
other_targets =
progname = httpd
prefix = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr
AWK = gawk
CC = mips-openwrt-linux-uclibc-gcc
CPP = mips-openwrt-linux-uclibc-gcc -E
CXX = mips-openwrt-linux-uclibc-g++
CPPFLAGS = -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/include -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/include -I/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS = -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -fpic CXXFLAGS = -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -fpic LTFLAGS = --silent LDFLAGS = -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib
LT_LDFLAGS =
SH_LDFLAGS =
LIBS =
DEFS =
INCLUDES =
NOTEST_CPPFLAGS =
NOTEST_CFLAGS =
NOTEST_CXXFLAGS =
NOTEST_LDFLAGS =
NOTEST_LIBS =
EXTRA_CPPFLAGS = -D_REENTRANT -DAP_DEBUG EXTRA_CFLAGS = EXTRA_CXXFLAGS = EXTRA_LDFLAGS = -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib/libiconv-stub/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr//lib
EXTRA_LIBS = -lm -lpcre
EXTRA_INCLUDES = -I$(includedir) -I. -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/include/apr-1 -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/include -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib/libiconv-stub/include -I/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1(/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr//include
LIBTOOL =  --silent
SHELL = /bin/sh
RSYNC = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin/rsync
SH_LIBS =
SH_LIBTOOL = $(LIBTOOL)
MK_IMPLIB =
MKDEP = $(CC) -MM
INSTALL_PROG_FLAGS =
APR_BINDIR = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin
APR_INCLUDEDIR =
APR_VERSION = 1.4.5
APR_CONFIG = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin/apr-1-config
APU_BINDIR = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin
APU_INCLUDEDIR =
APU_VERSION = 1.3.12
APU_CONFIG = (/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/bin/apu-1-config

Make, and another error

configure: looking for apr_memcache as part of apr-util checking apr_memcache.h usability... yes checking apr_memcache.h presence... yes checking for apr_memcache.h... yes checking for apr_memcache_create in -laprutil-1... yes checking for Apache module support via DSO through APXS... Use of assignment to $[ is deprecated at /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs line 86.
sh: /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/httpd: cannot execute binary file
apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary `/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/httpd'..
configure: error: no - APXS refers to an old version of Apache
                     Unable to locate /mod_dav.h
make[3]: *** [/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/.configured_] Error 1
make[3]: Leaving directory `/home/daniele/dev/openwrt/backfire/feeds/packages/net/subversion'
make[2]: *** [package/feeds/packages/subversion/compile] Error 2
make[2]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make[1]: *** [/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make: *** [world] Errore 2

The error is because the script try to launch httpd -l in order to check if apache is compiled with shared object support... obviously fails because that version of httpd is compiled for ar71xx, so I remove the control in the apxs script and copy few script required in respective directory

cd subversion/mod_dav_svn ; /usr/bin/install -c -d "/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib" ; /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs -i -S LIBEXECDIR="/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib"  -n dav_svn mod_dav_svn.la Use of assignment to $[ is deprecated at /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs line 86.
/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build/instdso.sh SH_LIBTOOL='/usr/share/build-1/libtool' mod_dav_svn.la /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib
/usr/share/build-1/libtool --mode=install cp mod_dav_svn.la /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib/
/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build/instdso.sh: line 54: /usr/share/build-1/libtool: No such file or directory
apxs:Error: Command failed with rc=8323072

The SH_LIBTOOL='/usr/share/build-1/libtool' is wrong, I fix it

/man1/svndumpfilter.1
/usr/bin/install -c -m 644 ./subversion/svnlook/svnlook.1 /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/man/man1/svnlook.1
/usr/bin/install -c -m 644 ./subversion/svnserve/svnserve.8 /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/man/man8/svnserve.8
/usr/bin/install -c -m 644 ./subversion/svnserve/svnserve.conf.5 /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/man/man5/svnserve.conf.5
/usr/bin/install -c -m 644 ./subversion/svnsync/svnsync.1 /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/man/man1/svnsync.1
/usr/bin/install -c -m 644 ./subversion/svnversion/svnversion.1 /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/man/man1/svnversion.1
cd subversion/mod_dav_svn ; /usr/bin/install -c -d "/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib" ; /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs -i -S LIBEXECDIR="/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib"  -n dav_svn mod_dav_svn.la Use of assignment to $[ is deprecated at /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/sbin/apxs line 86.
/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/share/build/instdso.sh SH_LIBTOOL='/usr/share/build-1/libtool' mod_dav_svn.la /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib
/usr/bin/libtool --mode=install cp mod_dav_svn.la /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib/
libtool: install: warning: relinking `mod_dav_svn.la'
libtool: install: (cd /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/subversion/mod_dav_svn; /bin/sh /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/libtool  --tag CC --silent --mode=relink mips-openwrt-linux-uclibc-gcc -Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts -msoft-float -fpic -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -lcrypt -lm -lz -lpthread -L/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib -L/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/lib/libiconv-stub/lib -rpath /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/httpd-2.2.15/ipkg-install/usr/lib -avoid-version -module -o mod_dav_svn.la activity.lo authz.lo deadprops.lo liveprops.lo lock.lo merge.lo mirror.lo mod_dav_svn.lo reports/dated-rev.lo reports/deleted-rev.lo reports/file-revs.lo reports/get-location-segments.lo reports/get-locations.lo reports/get-locks.lo reports/log.lo reports/mergeinfo.lo reports/replay.lo reports/update.lo repos.lo util.lo version.lo ../../subversion/libsvn_repos/libsvn_repos-1.la ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la )
/home/daniele/dev/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/lib/gcc/mips-openwrt-linux-uclibc/4.3.3/../../../../mips-openwrt-linux-uclibc/bin/ld: cannot find -lsvn_repos-1
collect2: ld returned 1 exit status
libtool: install: error: relink `mod_dav_svn.la' with the above command before installing it
apxs:Error: Command failed with rc=65536 .
make[4]: *** [install-mods-shared] Error 1
make[4]: Leaving directory `/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17'
make[3]: *** [/home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/.built] Error 2
make[3]: Leaving directory `/home/daniele/dev/openwrt/backfire/feeds/packages/net/subversion'
make[2]: *** [package/feeds/packages/subversion/compile] Error 2
make[2]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make[1]: *** [/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make: *** [world] Errore 2

And this is the error that I'm unable to comprehend and resolve....  As I said I'm not linux expert, and crosscompile doesn't help...  Nobody can give me help?

Thanks
FunMan

Hi,

but is developer section this, right? 60 views and nobody that can help me?

There is something strange in my queston?

Thanks
FunMan

Hi,

In case you still have not solved the problem this might help. I was also trying to make my subversion server running on a wzr-hp-g300nh accessible through http(s). After some trial and error I ended up building functional apache and subversion packages by applying the following patches:

APR library - apply the following package Makefile patch:

Index: feeds/packages/libs/apr/Makefile
===================================================================
--- feeds/packages/libs/apr/Makefile    (revision 30550)
+++ feeds/packages/libs/apr/Makefile    (working copy)
@@ -35,18 +35,19 @@
 
 CONFIGURE_ARGS += \
     --with-devrandom=/dev/urandom \
-    --disable-dso \
     --enable-ipv6
 
 # XXX: ac_cv_sizeof_struct_iovec=1 is just to trick configure
 CONFIGURE_VARS += \
     ac_cv_sizeof_struct_iovec=1 \
     ac_cv_struct_rlimit=yes \
-    apr_cv_process_shared_works=no \
+    apr_cv_process_shared_works=yes \
     apr_cv_mutex_robust_shared=no \
     apr_cv_tcp_nodelay_with_cork=yes \
     apr_cv_use_lfs64=yes \

Apache server- apply the following package Makefile patch:

Index: feeds/packages/net/apache/Makefile
===================================================================
--- feeds/packages/net/apache/Makefile    (revision 30618)
+++ feeds/packages/net/apache/Makefile    (working copy)
@@ -59,7 +59,7 @@
 endef
 
 define Package/apache/conffiles
-/etc/apache/httpd.conf
+/etc/apache/apache2.conf
 /etc/apache/extra/httpd-autoindex.conf
 /etc/apache/extra/httpd-dav.conf
 /etc/apache/extra/httpd-default.conf
@@ -95,6 +95,11 @@
         --with-apr="$(STAGING_DIR)/usr/bin/apr-1-config" \
         --with-apr-util="$(STAGING_DIR)/usr/bin/apu-1-config" \
         --with-pcre="$(STAGING_DIR)/usr/bin/pcre-config" \
+        --with-z="$(STAGING_DIR)/usr/lib" \
+        --with-program-name=apache2 \
+        --with-port=8080 \
+        --with-staging-dir="$(STAGING_DIR)" \
+        --enable-mods-shared='auth-digest dav dav-fs dav-lock deflate info rewrite' \
         --enable-http \
         --enable-ssl \
         --enable-proxy \
@@ -103,6 +108,7 @@
         --enable-mime-magic \
         --without-suexec-bin \
         --sysconfdir=/etc/apache \
+        --includedir=/usr/include/apache \
         ap_cv_void_ptr_lt_long=no \
         logfiledir="/var/log" \
         runtimedir="/var/run" \
@@ -117,10 +123,10 @@
     $(CP)   $(PKG_INSTALL_DIR)/etc/* \
         $(1)/etc
     $(INSTALL_DIR) $(1)/usr/include/apache
-    $(CP)    $(PKG_INSTALL_DIR)/usr/include/* \
+    $(CP)    $(PKG_INSTALL_DIR)/usr/include/apache/* \
         $(1)/usr/include/apache
     $(INSTALL_DIR) $(1)/usr/lib
-    $(CP)   $(PKG_INSTALL_DIR)/usr/lib/httpd.exp \
+    $(CP)   $(PKG_INSTALL_DIR)/usr/lib/* \
         $(1)/usr/lib
     $(INSTALL_DIR) $(1)/usr/sbin
     $(CP)   $(PKG_INSTALL_DIR)/usr/sbin/* \
@@ -131,7 +137,7 @@
 endef
 
 define Package/apache/preinst
-    rm /usr/sbin/httpd
+#    rm /usr/sbin/httpd
     echo -e "You should take a look in the initscripts, busybox's httpd \n\
     uses some parameters which are maybe unsupported by apache."
 endef
@@ -139,18 +145,20 @@
 define Package/apache/install
     $(INSTALL_DIR) $(1)/usr/sbin
     # we don't need apxs on the router, it's just for building apache modules.
-    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
+    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,apache2,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
+#    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{ab,apachectl,checkgid,dbmmanage,envvars,envvars-std,htcacheclean,htdbm,htdigest,htpasswd,httpd,httxt2dbm,logresolve,rotatelogs} $(1)/usr/sbin/
     $(INSTALL_DIR) $(1)/usr/lib
-    $(CP) $(PKG_INSTALL_DIR)/usr/lib/httpd.exp $(1)/usr/lib/
+    $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
     $(INSTALL_DIR) $(1)/usr/share
     $(CP) $(PKG_INSTALL_DIR)/usr/share/{error,htdocs,cgi-bin,build} $(1)/usr/share/
     $(INSTALL_DIR) $(1)/etc/apache
-    $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
+    $(CP) $(PKG_INSTALL_DIR)/etc/apache/{apache2.conf,magic,mime.types,extra} $(1)/etc/apache/
+#    $(CP) $(PKG_INSTALL_DIR)/etc/apache/{httpd.conf,magic,mime.types,extra} $(1)/etc/apache/
 endef
 
 define Package/apache/postrm
-    rm -rf /usr/sbin/httpd
-    ln -s /bin/busybox /usr/sbin/httpd
+#    rm -rf /usr/sbin/httpd
+#    ln -s /bin/busybox /usr/sbin/httpd
     echo -e "You may need to change your initscripts back for the use \n\
         with busybox's httpd."
 endef

Here I added a few other modules to the list of enabled DSOs, mainly for testing purposes. You will also notice I changed the default program name and server port in order to avoid conflicts with busybox's httpd server.
You will also need to add the following two patches to the feeds/packages/net/apache/patches directory:

010-configure_staging.patch:

--- a/configure
+++ b/configure
@@ -906,6 +906,7 @@ datarootdir
 libexecdir
 sbindir
 bindir
+stagingdir
 program_transform_name
 prefix
 exec_prefix
@@ -1040,6 +1041,7 @@ with_suexec_gidmin
 with_suexec_logfile
 with_suexec_safepath
 with_suexec_umask
+with_staging_dir
 '
       ac_precious_vars='build_alias
 host_alias
@@ -21610,6 +21612,14 @@ _ACEOF
 
 fi
 
+# Check whether --with-staging-dir was given.
+if test "${with_staging_dir+set}" = set; then
+  withval=$with_staging_dir;
+  stagingdir="$(echo $withval | sed 's/\/*$//')"
+else
+  stagingdir=""
+fi
+
 
 apulinklibs="`$apu_config --avoid-ldap --link-libtool --libs`" \
  || apulinklibs="`$apu_config --link-libtool --libs`"

011-apxs_in_staging.patch:

--- a/support/apxs.in
+++ b/support/apxs.in
@@ -25,8 +25,11 @@ package apxs;
 
 my %config_vars = ();
 
-my $installbuilddir = "@exp_installbuilddir@";
+my @install_paths = ("prefix","exec_prefix","bindir","sbindir","datadir","localstatedir","sysconfdir","libdir","includedir","APR_CONFIG","APU_CONFIG","APR_BINDIR","APU_BINDIR");
+my $stagingdir = "@stagingdir@";
+my $installbuilddir = $stagingdir."@exp_installbuilddir@";
 get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
+remap_paths($stagingdir);
 
 # read the configuration variables once
 
@@ -204,7 +207,9 @@ unless (-x "$httpd") {
     exit 1;
 }
 
-unless (grep /mod_so/, `. $envvars && $httpd -l`) {
+# The test will fail when staging, make sure your Apache has DSO support compiled in
+#unless (grep /mod_so/, `. $envvars && $httpd -l`) {
+unless (1 == 1) {
     error("Sorry, no shared object support for Apache");
     error("available under your platform. Make sure");
     error("the Apache module mod_so is compiled into");
@@ -257,6 +262,16 @@ sub get_vars {
     return $result;
 }
 
+sub remap_paths {
+    my ($new_prefix) = @_;
+    my $r_path;
+    foreach $r_path (@install_paths) {
+        if (exists $config_vars{$r_path}) {
+            $config_vars{$r_path}=$new_prefix.$config_vars{$r_path};
+        }
+    }
+}
+
 ##
 ##  Operation
 ##

The idea is to pass an additional parameter to the apache configure script telling it the path to the staging directory. Then the parameter can be used in apxs to generate correct paths to apache files installed in staging directory.

Finally, you need to apply the following patch to the subversion package Makefile:

Index: feeds/packages/net/subversion/Makefile
===================================================================
--- feeds/packages/net/subversion/Makefile    (revision 30550)
+++ feeds/packages/net/subversion/Makefile    (working copy)
@@ -88,14 +88,16 @@
     --without-berkeley-db \
     --with-ssl \
     --disable-neon-version-check \
-    --with-apxs=no \
+    --with-apxs="$(STAGING_DIR)/usr/sbin/apxs" \
+    --with-sysroot="$(STAGING_DIR)" \
     --without-sasl \
 
 CONFIGURE_VARS += \
     svn_lib_neon=yes \
     LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm \
         -lz -lpthread -L$(TOOLCHAIN_DIR)/usr/lib \
-        -L$(TOOLCHAIN_DIR)/lib" \
+        -L$(TOOLCHAIN_DIR)/lib \
+        -L$(PKG_INSTALL_DIR)/usr/lib" \
     CPPFLAGS="$(TARGET_CPPFLAGS)" \
 
 define Build/Compile
@@ -107,6 +109,7 @@
 define Package/subversion-libs/install
     $(INSTALL_DIR) $(1)/usr/lib
     $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
+    $(CP) $(PKG_INSTALL_DIR)/usr/lib/mod_*_svn.so $(1)/usr/lib/
 endef
 
 define Package/subversion-client/install

Please note that the apache server executable will be named apache2 and its configuration file is /etc/apache/apache2.conf. Remember to edit the later such it will load the necessary modules, e.g.:

LoadModule auth_digest_module lib/mod_auth_digest.so
LoadModule dav_module lib/mod_dav.so
LoadModule dav_fs_module lib/mod_dav_fs.so
LoadModule dav_lock_module lib/mod_dav_lock.so
LoadModule dav_svn_module lib/mod_dav_svn.so
LoadModule authz_svn_module lib/mod_authz_svn.so
LoadModule info_module lib/mod_info.so

Hope this works for you as it did for me.

Have fun!
Looking forward for some feedback.

Thank you,

finally I have Apache and subversion working on my router smile

The only problem was that I had to manually apply patches you posted to makefiles (patch command fails), except 010 and 010 apache patches.

I use WZR-HP-AG300N, so I must use Attitude Adjustment. I noticed that apache packages for trunk is broken (segmentation fault error), so I downloaded backfire rc packages (latest backfire apache give me segmentation fault too).

At this point i obtain this error

svn: Corrupt node-revision '0.0.t0-2'

This error is described in this ticket https://dev.openwrt.org/ticket/9287 and resolved with r28763, r28764 & r28765. Unfortunately these changeset seems to break apache. So I reverted r28763, r28764 & r28765 and applied the patch reported in ticket description (http://mail-archives.apache.org/mod_mbo … kkevej2%3E) and finally I resolved.

I think to open a ticket for the broken apache.

Now I have another little problem. I installed python and trac, but now I need subversion python binding... can you help me? or it's not necessary using apache as web server for trac?

Thanks
FunMan

Hi,

I forgot to mention that I am running backfire 10.03.1-RC6 on my WZR. I checked out the sources from svn last October (build root r28388, feeds r28681 at the time) and built everything from sources as I wanted to have a "clean" setup before attempting to modify/add anything. It actually proved to be a very stable build (current uptime = 96 days).

I encountered the same "svn: Corrupt node-revision '0.0.t0-2'" problem with my build when testing the standalone svn server. However, updating apr, apr-utils, subversion (now at r30550) and apache (now at r30618) feeds did the trick for me.

Now to your last question - apparently we have the same agenda with svn + apache + trac smile
I did some more work last week resulting in more patches wink

First, you should recompile your Python with shared libraries enabled.
Python Makefile patch (Note: my Python package is at r28681):

Index: feeds/packages/lang/python/Makefile
===================================================================
--- feeds/packages/lang/python/Makefile (revision 28681)
+++ feeds/packages/lang/python/Makefile (working copy)
@@ -136,7 +136,7 @@
        $(CP) $(STAGING_DIR_HOST)/bin/python $(PKG_BUILD_DIR)/hostpython
        $(call Build/Configure/Default, \
                --sysconfdir=/etc \
-               --disable-shared \
+               --enable-shared \
                --without-cxx-main \
                --with-threads \
                --with-system-ffi \
@@ -162,10 +162,13 @@
        $(CP) \
                $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
                $(1)/usr/lib/python$(PYTHON_VERSION)/
-
        $(CP) \
                $(STAGING_DIR_HOST)/bin/python \
                $(1)/usr/bin/hostpython
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libpython$(PYTHON_VERSION).so* \
+               $(STAGING_DIR)/usr/lib/
+
        (cd $(2)/bin; \
        ln -sf ../../usr/bin/hostpython python$(PYTHON_VERSION); \
        ln -sf python$(PYTHON_VERSION) python)
@@ -282,6 +285,7 @@
 
 define PyPackage/python-mini/filespec
 +|/usr/bin/python$(PYTHON_VERSION)
++|/usr/lib/libpython$(PYTHON_VERSION).so*
 +|/usr/lib/python$(PYTHON_VERSION)/__future__.py
 +|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
 +|/usr/lib/python$(PYTHON_VERSION)/abc.py

Next, I had to add the swig package to my buildroot/packages/ directory. I used the Makefile found here:
http://projects.qi-hardware.com/index.p … g/Makefile

I enabled SWIG bindings in subversion. This is the updated subversion Makefile patch:

Index: feeds/packages/net/subversion/Makefile
===================================================================
--- feeds/packages/net/subversion/Makefile      (revision 30550)
+++ feeds/packages/net/subversion/Makefile      (working copy)
@@ -24,7 +24,7 @@
   SECTION:=net
   CATEGORY:=Network
   TITLE:=A compelling replacement for CVS
-  DEPENDS:=+zlib +libneon +libaprutil
+  DEPENDS:=+zlib +libneon +libaprutil +swig/host
   URL:=http://subversion.apache.org/
   SUBMENU:=Version Control Systems
 endef
@@ -82,31 +82,42 @@
        --with-neon="$(STAGING_DIR)/usr" \
        --disable-mod-activation \
        --without-ruby-sitedir \
-       --without-swig \
+       --with-swig \
        --with-jikes=no \
        --without-junit \
        --without-berkeley-db \
        --with-ssl \
        --disable-neon-version-check \
-       --with-apxs=no \
+       --with-apxs="$(STAGING_DIR)/usr/sbin/apxs" \
+       --with-sysroot="$(STAGING_DIR)" \
        --without-sasl \
 
 CONFIGURE_VARS += \
        svn_lib_neon=yes \
        LDFLAGS="$(TARGET_LDFLAGS) -lcrypt -lm \
                -lz -lpthread -L$(TOOLCHAIN_DIR)/usr/lib \
-               -L$(TOOLCHAIN_DIR)/lib" \
+               -L$(TOOLCHAIN_DIR)/lib \
+               -L$(STAGING_DIR)/usr/lib/apache \
+               -L$(PKG_INSTALL_DIR)/usr/lib" \
        CPPFLAGS="$(TARGET_CPPFLAGS)" \
 
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all local-install
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               swig-py
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               install-swig-py
 endef
 
 define Package/subversion-libs/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsvn_*.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/apache
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/apache/mod_*_svn.so $(1)/usr/lib/apache
 endef
 
 define Package/subversion-client/install

Important note: I was playing with apache installation layout in the mean time and I put all apache modules under /usr/lib/apache now. Please fix the relevant paths in above and below Makefiles according to your current apache setup (probably /usr/lib).

Finally, I added a new package mod_wsgi to buildroot/packages. Remember to select it in menuconfig. You will find it in the same submenu with Apache.

This is the mod_wsgi package Makefile:

#
# Copyright (C) 2007-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=mod_wsgi
PKG_VERSION:=3.3
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://modwsgi.googlecode.com/files
PKG_MD5SUM:=6172bb2bbabcd0c25867c2bc06f99dbb

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/mod_wsgi
  SECTION:=net
  CATEGORY:=Network
  SUBMENU:=Web Servers/Proxies
  TITLE:=Apache module for Python hosting
  DEPENDS:=apache +python
  URL:=http://code.google.com/p/modwsgi/
endef

define Package/mod_wsgi/description
    The aim of mod_wsgi is to implement a simple to use Apache module,
    which can host any Python application which supports the Python
    WSGI interface. The module would be suitable for use in hosting
    high performance production web sites, as well as your average
    self managed personal sites running on web hosting services.
endef

TARGET_CFLAGS += $(FPIC)
TARGET_CPPFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

CONFIGURE_ARGS += \
        --with-apxs="$(STAGING_DIR)/usr/sbin/apxs" \
        --with-python="$(STAGING_DIR)/usr/bin/hostpython" \
        --with-stagingdir="$(STAGING_DIR)" \

CONFIGURE_VARS += \
        LDFLAGS="$(TARGET_LDFLAGS) \
                -L$(TOOLCHAIN_DIR)/usr/lib \
                -L$(TOOLCHAIN_DIR)/lib \
                -L$(PKG_INSTALL_DIR)/usr/lib" \
        CPPFLAGS="$(TARGET_CPPFLAGS)" \

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)"
endef

define Package/mod_wsgi/install
        $(INSTALL_DIR) $(1)/usr/lib/apache
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/apache/mod_*.so $(1)/usr/lib/apache/
endef

$(eval $(call BuildPackage,mod_wsgi))

And this is the mod_wsgi configure script patch. Save it as buildroot/mod_wsgi/patches/001-configure_staging.patch:

--- a/configure
+++ b/configure
@@ -616,6 +616,7 @@ host_alias
 target_alias
 APXS
 PYTHON
+STAGINGDIR
 CPPFLAGS
 CFLAGS
 LDFLAGS
@@ -1203,6 +1204,7 @@ Optional Packages:
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-apxs=NAME        name of the apxs executable [apxs]
   --with-python=NAME      name of the python executable [python]
+  --with-stagingdir=DIR   path to staging root directory []
 
 _ACEOF
 ac_status=$?
@@ -1703,7 +1705,8 @@ fi
 echo $ECHO_N "checking Apache version... $ECHO_C" >&6; }
 HTTPD="`${APXS} -q SBINDIR`/`${APXS} -q TARGET`"
 HTTPD_INCLUDEDIR="`${APXS} -q INCLUDEDIR`"
-if test -x ${HTTPD}; then
+# if test -x ${HTTPD}; then
+if test 1 -eq 0; then
     HTTPD_VERSION=`${HTTPD} -v | awk '/version/ {print $3}' \
      | awk -F/ '{print $2}'`
 else
@@ -1781,7 +1784,13 @@ test -n "$PYTHON" || PYTHON="python"
 
 fi
 
-
+# Check whether --with-stagingdir was given.
+if test "${with_stagingdir+set}" = set; then
+  withval=$with_stagingdir;
+  STAGINGDIR="$(echo $withval | sed 's/\/*$//')"
+else
+  STAGINGDIR=""
+fi
 
 PYTHON_VERSION=`${PYTHON} -c 'from sys import stdout; \
     from distutils import sysconfig; \
@@ -1789,7 +1798,12 @@ PYTHON_VERSION=`${PYTHON} -c 'from sys i
 
 CPPFLAGS1=`${PYTHON} -c 'from sys import stdout; \
     from distutils import sysconfig; \
-    stdout.write("-I" + sysconfig.get_config_var("INCLUDEPY"))'`
+    stdout.write(sysconfig.get_config_var("INCLUDEPY"))'`
+if test -n "${STAGINGDIR}"; then
+    CPPFLAGS1="-I${STAGINGDIR}${CPPFLAGS1}"
+else
+    CPPFLAGS1="-I${CPPFLAGS1}"
+fi
 
 CPPFLAGS2=`${PYTHON} -c 'from sys import stdout; \
     from distutils import sysconfig; \

This should pretty much cover Trac + Apache + Subversion dependencies according to TracWiki.
I successfully compiled all the packages. Unfortunately I did not get to test them out as I have to do all my testing on my 'live' system.
I hope you will be able to configure a working setup.

Cheers,
urosk

(Last edited by urosk on 27 Feb 2012, 20:51)

Hi urosk,

thank again for your help... tonight I have tried but with some errors...

cp -fpR /home/daniele/dev/openwrt/backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/neon-0.29.6/ipkg-install/usr/lib/libneon.so.* /home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/root-ar71xx/tmp-libneon/usr/lib/
cp -fpR /home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/root-ar71xx/tmp-libneon/. /home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/root-ar71xx/
rm -rf /home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/root-ar71xx/tmp-libneon
touch /home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/root-ar71xx/stamp/.libneon_installed
make[3]: Leaving directory `/home/daniele/dev/openwrt/backfire/feeds/packages/libs/neon'
make[3]: Entering directory `/home/daniele/dev/openwrt/backfire/feeds/packages/lang/python'
Makefile:441: *** missing separator.  Stop.
make[3]: Leaving directory `/home/daniele/dev/openwrt/backfire/feeds/packages/lang/python'
make[2]: *** [package/feeds/packages/python/host/compile] Error 2
make[2]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make[1]: *** [/home/daniele/dev/openwrt/backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/stamp/.package_compile] Error 2
make[1]: Leaving directory `/home/daniele/dev/openwrt/backfire'
make: *** [world] Errore 2

Probably I did some mistake applying patches.... I'll investigate on it

I have a little question... when you say "buildroot/packages/" do you mean "package" or "feeds/packages" folder?

I have created "package/swig" and "package/mod_wsgi" folder with relative makefile, but I'm not sure that this is the correct path....

Thanks
FunMan

Hi FunMan,

Sorry for the imprecisions in my previous post. I put the extra packages (swig, mod_wsgi) directly under the "package" directory so I do not need to bother with updating and installing from feeds.
As an alternative you could put them into a custom feed as described here http://wiki.openwrt.org/doc/devel/feeds.

Your error seems to be somewhere in the python Makefile. It could be a missing backslash-newline ('\') or something similar.

Good luck,
urosk

Hi urosk,

I fixed the problem, there were some spaces instead of tab that make does not like smile

Now i have this error trying to install subversion

Installing subversion-server (1.6.17-1) to root...
Downloading http://172.20.0.148/subversion-server_1.6.17-1_ar71xx.ipk.
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for subversion-server:
 *      swig/host *     swig/host *
 * opkg_install_cmd: Cannot install package subversion-server.

I don't find the swig compiled package, but I'm quite sure that I saw it during compilation phase...

Always during compilation I have these warning

package/Makefile:104: warning: overriding recipe for target `package/swig/host/clean'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/clean'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/clean'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/clean'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/download'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/download'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/download'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/download'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/prepare'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/prepare'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/prepare'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/prepare'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/compile'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/compile'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/compile'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/compile'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/install'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/install'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/install'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/install'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/update'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/update'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/update'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/update'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/refresh'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/refresh'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/refresh'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/refresh'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/prereq'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/prereq'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/prereq'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/prereq'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/dist'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/dist'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/dist'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/dist'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/distcheck'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/distcheck'
package/Makefile:104: warning: overriding recipe for target `package/swig/host/distcheck'
package/Makefile:104: warning: ignoring old recipe for target `package/swig/host/distcheck'

Do you think that is symptom that there is something wrong or can I ignore them?

Thanks
FunMan

(Last edited by FunMan on 2 Mar 2012, 12:14)

Hi FunMan,

Considering you are probably using a "fresher" buildroot checkout than I am, could it be that swig was already included in it? The warnings could point to a duplicate swig package Makefile. Please check if you have swig somewhere else in your buildroot or just try to remove the one you added manually and recompile.

Good luck,
urosk

Hi urosk,

It was my error, I pasted three times swing makefile content smile anyway I continue to have dependency error problem, and I cannot find compiled swing package in bin folder... where I should find it? I build also entire firmware with swing enabled via make menuconfig, but with no luck...( build is ok but I cannot locate swing library and I have the same dependency not found error when trying to install subversion)

Any idea? I have put swing makefile in  "package/swing" folder, is it correct?

Thanks for any help you can give me.
FunMan

(Last edited by FunMan on 2 Mar 2012, 22:47)

Hi urosk,

I can confirm that openwrt build system build swig, these are the build logs

Swig -> http://www.neowebsite.it/tmp/swig_compile.log.tar.gz
Subversion -> http://www.neowebsite.it/tmp/subversion … log.tar.gz

I noticed that build system uses normal fedora gcc istead of toolchain, is it normal?

checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-redhat-linux-gcc... x86_64-redhat-linux-gcc

I have to solve this "opkg_install_cmd: Cannot install package subversion-server." related to swig/host smile

Thanks
FunMan

Hi FunMan,

SWIG is only required on your buildroot host in order to build the subversion bindings for python (SWIG is actually an interface generator, see http://www.swig.org/index.php). Therefore you won't get a swig package as a result of your building process but you should get the libsvn_swig_py-1.so library in your subversion libs package. This is also the reason why you see

checking build system type... x86_64-redhat-linux-gnu
checking host system type... x86_64-redhat-linux-gnu

in your swig build log as it is being built for your buildroot host platform.

Anyway, here you can find my package patches and compiled binaries:
http://svn.rnblab.net:8080/openwrt/

Maybe you could give them a try on your device.

Good luck,
urosk

Hi urosk,

waiting for your answer I have tried to resolve the problem by myself. I read about swig and at last I managed to install subversion with libsvn_swig_py-1.so library simply removing the dependancy declaration in subversion makefile "+swig/host".

If i did not do so I cannot install subversion due to

 * satisfy_dependencies_for: Cannot satisfy the following dependencies for subversion-server:
 *      swig/host *     swig/host *
 * opkg_install_cmd: Cannot install package subversion-server.

error.

Now I successfully configured trac on apache, and it's working, but I have problem connecting to subversion (using tracd too)

2012-03-04 13:03:56,820 Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
  File "build/bdist.linux-mips/egg/trac/versioncontrol/svn_fs.py", line 267, in __init__
    _import_svn()
  File "build/bdist.linux-mips/egg/trac/versioncontrol/svn_fs.py", line 68, in _import_svn
    from svn import fs, repos, core, delta
ImportError: No module named svn

I checked in site-package and I have no svn module... I'm a little confused, probably I'm doing something wrong.

I'll try also your makefile and patch that you have very kindly made ??available...

Thanks much for the help you're giving me, is really welcome wink

FunMan

(Last edited by FunMan on 4 Mar 2012, 19:05)

Hi FunMan,

I failed to include the actual python bindings in the subversion package. This is the contents of python-svn rpm on my host system (Mandriva 2010.2):

        ??/usr/lib/python2.6/site-packages/svn
        ?/usr/lib/python2.6/site-packages/svn/__init__.py
        ?/usr/lib/python2.6/site-packages/svn/__init__.pyc
        ?/usr/lib/python2.6/site-packages/svn/client.py
        ?/usr/lib/python2.6/site-packages/svn/client.pyc
        ?/usr/lib/python2.6/site-packages/svn/core.py
        ?/usr/lib/python2.6/site-packages/svn/core.pyc
        ?/usr/lib/python2.6/site-packages/svn/delta.py
        ?/usr/lib/python2.6/site-packages/svn/delta.pyc
        ?/usr/lib/python2.6/site-packages/svn/diff.py
        ?/usr/lib/python2.6/site-packages/svn/diff.pyc
        ?/usr/lib/python2.6/site-packages/svn/fs.py
        ?/usr/lib/python2.6/site-packages/svn/fs.pyc
        ?/usr/lib/python2.6/site-packages/svn/ra.py
        ?/usr/lib/python2.6/site-packages/svn/ra.pyc
        ?/usr/lib/python2.6/site-packages/svn/repos.py
        ?/usr/lib/python2.6/site-packages/svn/repos.pyc
        ?/usr/lib/python2.6/site-packages/svn/wc.py
        ?/usr/lib/python2.6/site-packages/svn/wc.pyc
        ?/usr/lib64/libsvn_swig_py-1.so.0
        ?/usr/lib64/libsvn_swig_py-1.so.0.0.0
        ?/usr/lib64/python2.6/site-packages/libsvn
        ?/usr/lib64/python2.6/site-packages/libsvn/__init__.py
        ?/usr/lib64/python2.6/site-packages/libsvn/__init__.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/_client.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_client.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_core.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_core.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_delta.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_delta.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_diff.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_diff.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_fs.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_fs.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_ra.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_ra.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_repos.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_repos.so
        ?/usr/lib64/python2.6/site-packages/libsvn/_wc.la
        ?/usr/lib64/python2.6/site-packages/libsvn/_wc.so
        ?/usr/lib64/python2.6/site-packages/libsvn/client.py
        ?/usr/lib64/python2.6/site-packages/libsvn/client.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/core.py
        ?/usr/lib64/python2.6/site-packages/libsvn/core.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/delta.py
        ?/usr/lib64/python2.6/site-packages/libsvn/delta.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/diff.py
        ?/usr/lib64/python2.6/site-packages/libsvn/diff.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/fs.py
        ?/usr/lib64/python2.6/site-packages/libsvn/fs.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/ra.py
        ?/usr/lib64/python2.6/site-packages/libsvn/ra.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/repos.py
        ?/usr/lib64/python2.6/site-packages/libsvn/repos.pyc
        ?/usr/lib64/python2.6/site-packages/libsvn/wc.py
        ?/usr/lib64/python2.6/site-packages/libsvn/wc.pyc
        ?/usr/share/doc/python-svn
        ?/usr/share/doc/python-svn/INSTALL
        ?/usr/share/doc/python-svn/NOTES
        ?/usr/share/doc/python-svn/blame.py
        ?/usr/share/doc/python-svn/check-modified.py
        ?/usr/share/doc/python-svn/dumpprops.py
        ?/usr/share/doc/python-svn/get-location-segments.py
        ?/usr/share/doc/python-svn/getfile.py
        ?/usr/share/doc/python-svn/geturl.py
        ?/usr/share/doc/python-svn/putfile.py
        ?/usr/share/doc/python-svn/revplist.py
        ?/usr/share/doc/python-svn/svnlook.py
        ?/usr/share/doc/python-svn/svnshell.py

so I guess I should just pack the relative files found in build_rootbuild_dir/target-mips_r2_uClibc-0.9.30.1/subversion-1.6.17/ipkg-install/usr/lib/svn-python to a similar installation layout:

        ?/usr/lib/libsvn_swig_py-1.so.0
        ?/usr/lib/libsvn_swig_py-1.so.0.0.0
        ?/usr/lib/python2.6/site-packages/svn/__init__.py
        ?/usr/lib/python2.6/site-packages/svn/client.py
        ?/usr/lib/python2.6/site-packages/svn/core.py
        ?/usr/lib/python2.6/site-packages/svn/delta.py
        ?/usr/lib/python2.6/site-packages/svn/diff.py
        ?/usr/lib/python2.6/site-packages/svn/fs.py
        ?/usr/lib/python2.6/site-packages/svn/ra.py
        ?/usr/lib/python2.6/site-packages/svn/repos.py
        ?/usr/lib/python2.6/site-packages/svn/wc.py
        ?/usr/lib/python2.6/site-packages/libsvn/__init__.py
        ?/usr/lib/python2.6/site-packages/libsvn/client.py
        ?/usr/lib/python2.6/site-packages/libsvn/core.py
        ?/usr/lib/python2.6/site-packages/libsvn/delta.py
        ?/usr/lib/python2.6/site-packages/libsvn/diff.py
        ?/usr/lib/python2.6/site-packages/libsvn/fs.py
        ?/usr/lib/python2.6/site-packages/libsvn/ra.py
        ?/usr/lib/python2.6/site-packages/libsvn/repos.py
        ?/usr/lib/python2.6/site-packages/libsvn/wc.py
        ?/usr/lib/python2.6/site-packages/libsvn/_client.so
        ?/usr/lib/python2.6/site-packages/libsvn/_core.so
        ?/usr/lib/python2.6/site-packages/libsvn/_delta.so
        ?/usr/lib/python2.6/site-packages/libsvn/_diff.so
        ?/usr/lib/python2.6/site-packages/libsvn/_fs.so
        ?/usr/lib/python2.6/site-packages/libsvn/_ra.so
        ?/usr/lib/python2.6/site-packages/libsvn/_repos.so
        ?/usr/lib/python2.6/site-packages/libsvn/_wc.so

You can try adding the necessary $(INSTALL_DIR) ... and $(CP) ...  commands to the Package/subversion-libs/install target in subversion package Makefile. You should use wildcards of course wink e.g.:

        $(INSTALL_DIR) $(1)/usr/lib/python2.6/site-packages/svn
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/svn-python/svn/*.py $(1)/usr/lib/python2.6/site-packages/svn
        $(INSTALL_DIR) $(1)/usr/lib/python2.6/site-packages/libsvn
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/svn-python/libsvn/*.{py,so} $(1)/usr/lib/python2.6/site-packages/libsvn

Good luck,
urosk

(Last edited by urosk on 4 Mar 2012, 20:27)

Hi urosk,

ok, now I have all confired and working, obvioulsy also thank to your delp smile

Another question: have you experienced performance problem using trac on your router? which trac version have you installed?

Because my trac is very slow. This is the wiki page request

[Sun Mar 04 22:42:22 2012] [info] Initial (No.1) HTTPS request received for child 4 (server 127.0.0.1:443)
[Sun Mar 04 22:42:22 2012] [error] [client 172.20.0.148] File does not exist: /mnt/trac/Apache/TW/htdocs/site/your_project_logo.png, referer: https://172.20.0.90/trac/wiki
[Sun Mar 04 22:42:22 2012] [debug] ssl_engine_kernel.c(1884): OpenSSL: Write: SSL negotiation finished successfully
[Sun Mar 04 22:42:22 2012] [info] [client 172.20.0.148] Connection closed to child 4 with standard shutdown (server 127.0.0.1:443)
[Sun Mar 04 22:42:22 2012] [debug] ssl_engine_kernel.c(1884): OpenSSL: Write: SSL negotiation finished successfully
[Sun Mar 04 22:42:22 2012] [info] [client 172.20.0.148] Connection closed to child 1 with standard shutdown (server 127.0.0.1:443)
[Sun Mar 04 22:42:38 2012] [info] [client 172.20.0.148] Connection to child 3 established (server 127.0.0.1:443)
[Sun Mar 04 22:42:38 2012] [info] Seeding PRNG with 0 bytes of entropy

16 seconds for loading wiki! With apache running at 100% cpu.... obviously timeline etc have no better performance...

I also configured static content, with no appreciable changes...

Waiting for your feedback,
FunMan

(Last edited by FunMan on 4 Mar 2012, 23:33)

My progress with performance problem (no progress smile )

     - tried trac with tracd... I have segmentation fault error if I specify svn repository in trac.ini. If I remove it tracd does not crash and is definitely faster than apache. So I decide, for test, to remove temporarly svn repository reference (apache remains slow anyway).
     - compiled mod_wsgi v2.6, as adviced on several forums (this is a common problem, not only mine) with same result.
     - configured mysql instead of sqlite for trac: no appreciable difference.
     - configure mod_wsgi to run as separate process, and not in embedded mode: no difference.
     - compiled apache with with-mpm=worker directive: segmentation fault accessing apache
     - refreshed apache to last branch 2.2 version (2.2.22) and also aprlib to v1.4.6: same segmentation fault as above
     - compiled refreshed apache and aprlib with --with-mpm=prefork, now apache run but the speed rendering trac pages are equals to "old" apache.
     - tried to compile apache 2.4 branch, too files to patch: aborted.

What I have to try
     - compile lighttpd with cgi module and try lighttpd with trac.

I know, it's a router (but with 680 Mhz processor), but I would have expected at least same performance between apache and tracd server (tracd is faster).

Thanks
FunMan

(Last edited by FunMan on 7 Mar 2012, 15:49)

I doubt that a router is the right environment for running Trac... even if it has 680 MHz processor.

This python stuff is very performance hungry. Nevertheless I got the highest performance with lighttpd and the following fcgi script:

#!/usr/bin/env python
import tempfile
import os
try:
    from flup.server.fcgi import WSGIServer
except ImportError:
    from trac.web._fcgi import WSGIServer
from trac.web.main import dispatch_request

def application(environ, start_request):
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
    environ['SCRIPT_NAME'] = ''
    return dispatch_request(environ, start_request)

if __name__ == '__main__':
    WSGIServer(application).run()

Regards
Oliver

Hi guys!
I'd like to make my svn server accessible over http, but i can't find dav_svn_module.
I read that you made good work, i wonder if you upload your work to somewhere.
(i'm running tl-wr1043nd)
Thank you in advance and sorry for my english:)

Hi !

Is there any way to solve APACHE segmentation FAULT ?
Im using r32603 and tried the "apache...ipk" from r32603 and from backfire/10.03.1/ and none seems to work.

[Mon Jul 09 10:13:24 2012] [notice] child pid 14888 exit signal Segmentation fault (11)
[Mon Jul 09 10:13:24 2012] [notice] child pid 14889 exit signal Segmentation fault (11)
[Mon Jul 09 10:13:24 2012] [notice] child pid 14890 exit signal Segmentation fault (11)

Lot of these messages in error_log with debug log config.

Can some one help us ?
sad

kennyevo wrote:

Hi guys!
I'd like to make my svn server accessible over http, but i can't find dav_svn_module.
I read that you made good work, i wonder if you upload your work to somewhere.
(i'm running tl-wr1043nd)
Thank you in advance and sorry for my english:)

I managed to build all packages for ar71xx(wndr3800) and they are working, don't ask how I did because I don't remember(long night and 3 coffees).
I think I put different revisions together, the old apache(because I couldn't debug the new one), and I applied the patches given by this thread (thank you!). Now...sorry for my bad english, I'm tired ;-)

here is the link with apache + svn: http://dl.dropbox.com/u/57044570/apache%2Bsvn.tar.bz2

PS: the server is listening on port 8080
PPS: you must install all packages or you will get a segmentation fault, probably

(Last edited by roaman on 14 Aug 2012, 09:08)

The discussion might have continued from here.