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.