tags 666836 + patch thanks Hello maintainer,
you will find attached below a patch porting your module to Apache2 2.4. Please test it and consider its inclusion. Note, I hardly tried more than compiling and loading the module. I didn't test it in detail. I consider this patch mostly a proof-of-concept. The upstream part should be cleaner in order to be forwarded (in particular, my patch might break Apache 2.2 although that could be easily avoided) and the Debian specific autoconf hunk in the patch is mostly a hack. Also note, you are providing two modules which conflict with each other. You should declare this relation in your .load file as explained in [1]. [1] http://anonscm.debian.org/gitweb/?p=pkg-apache/apache2.git;a=blob;f=debian/PACKAGING;hb=next -- with kind regards, Arno Töll IRC: daemonkeeper on Freenode/OFTC GnuPG Key-ID: 0x9D80F36D
debian/control | 4 +- debian/libapache2-mod-mono.apache2 | 3 + debian/libapache2-mod-mono.install | 3 - debian/libapache2-mod-mono.postinst | 14 ----- debian/libapache2-mod-mono.prerm | 16 ------ debian/patches/port-24-patch | 105 +++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 12 ++-- debian/source/options | 1 + 9 files changed, 119 insertions(+), 40 deletions(-) diff --git a/debian/control b/debian/control index 8ee2a9f..193d7e0 100644 --- a/debian/control +++ b/debian/control @@ -6,13 +6,13 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-mono/mod-mono/trunk/ Vcs-Svn: svn://svn.debian.org/pkg-mono/mod-mono/trunk Maintainer: Debian Mono Group <pkg-mono-gr...@lists.alioth.debian.org> Uploaders: Dylan R. E. Moonfire <deb...@mfgames.com>, Mirco Bauer <mee...@debian.org>, Jo Shields <direct...@apebox.org> -Build-Depends: debhelper (>= 7.0.50~), apache2-threaded-dev (>= 2.2), po-debconf, pkg-config, mono-runtime +Build-Depends: debhelper (>= 7.0.50~), apache2-dev, dh-apache2, po-debconf, pkg-config, mono-runtime, automake Standards-Version: 3.9.1 Package: libapache2-mod-mono Architecture: any Section: web -Depends: ${misc:Depends}, ${shlibs:Depends}, debconf (>= 1.2.0), apache2.2-common, mono-runtime (>= 2.10), mono-apache-server (>= ${current-version}) | mono-apache-server4 (>= ${current-version}) | mono-apache-server2 (>= ${current-version}), mono-apache-server (<< ${next-version}) | mono-apache-server4 (<< ${next-version}) | mono-apache-server2 (<< ${next-version}) +Depends: ${misc:Depends}, ${shlibs:Depends}, debconf (>= 1.2.0), mono-runtime (>= 2.10), mono-apache-server (>= ${current-version}) | mono-apache-server4 (>= ${current-version}) | mono-apache-server2 (>= ${current-version}), mono-apache-server (<< ${next-version}) | mono-apache-server4 (<< ${next-version}) | mono-apache-server2 (<< ${next-version}) Description: Apache module for running ASP.NET applications on Mono The mod_mono module for Apache allows ASP.NET web applications to be run with the Mono .NET implementation. diff --git a/debian/libapache2-mod-mono.apache2 b/debian/libapache2-mod-mono.apache2 new file mode 100644 index 0000000..3703f2c --- /dev/null +++ b/debian/libapache2-mod-mono.apache2 @@ -0,0 +1,3 @@ +mod debian/mod_mono.load +mod debian/mod_mono.conf +mod debian/mod_mono_auto.conf diff --git a/debian/libapache2-mod-mono.install b/debian/libapache2-mod-mono.install deleted file mode 100644 index b9230c6..0000000 --- a/debian/libapache2-mod-mono.install +++ /dev/null @@ -1,3 +0,0 @@ -debian/mod_mono.load /etc/apache2/mods-available/ -debian/mod_mono.conf /etc/apache2/mods-available/ -debian/mod_mono_auto.conf /etc/apache2/mods-available/ diff --git a/debian/libapache2-mod-mono.postinst b/debian/libapache2-mod-mono.postinst index c014dc5..b7b2d9c 100644 --- a/debian/libapache2-mod-mono.postinst +++ b/debian/libapache2-mod-mono.postinst @@ -8,18 +8,4 @@ db_version 2.0 #DEBHELPER# -# If we aren't configuring, we don't do anything -if [ "$1" != "configure" ]; then - exit 0 -fi - -# We're upgrading, don't ask again -if [ -n "$2" ]; then - exit 0 -fi - -if [ -e /etc/apache2/apache2.conf ]; then - /usr/sbin/a2enmod mod_mono || true -fi - exit 0 diff --git a/debian/libapache2-mod-mono.prerm b/debian/libapache2-mod-mono.prerm deleted file mode 100644 index 4e63dd3..0000000 --- a/debian/libapache2-mod-mono.prerm +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -e - -#DEBHELPER# - -if [ "$1" != "remove" -a "$1" != "purge" ]; then - exit 0 -fi - -if [ -e /etc/apache2/apache2.conf ]; then - /usr/sbin/a2dismod mod_mono || true - /usr/sbin/a2dismod mod_mono_auto || true -fi - -exit 0 diff --git a/debian/patches/port-24-patch b/debian/patches/port-24-patch new file mode 100644 index 0000000..f7a30f7 --- /dev/null +++ b/debian/patches/port-24-patch @@ -0,0 +1,105 @@ +--- a/src/mod_mono.c ++++ b/src/mod_mono.c +@@ -386,7 +386,7 @@ + apache_get_userid () + { + #ifdef HAVE_UNIXD +- return unixd_config.user_id; ++ return ap_unixd_config.user_id; + #else + return ap_user_id; + #endif +@@ -396,7 +396,7 @@ + apache_get_groupid () + { + #ifdef HAVE_UNIXD +- return unixd_config.group_id; ++ return ap_unixd_config.group_id; + #else + return ap_group_id; + #endif +@@ -406,7 +406,7 @@ + apache_get_username () + { + #ifdef HAVE_UNIXD +- return unixd_config.user_name; ++ return ap_unixd_config.user_name; + #else + return ap_user_name; + #endif +@@ -485,7 +485,7 @@ + + #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD) + DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file); +- rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex); ++ rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex); + if (rv != APR_SUCCESS) { + ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv), + "Failed to set mutex permissions for %s", +@@ -845,13 +845,13 @@ + } + + static int +-connection_get_remote_port (conn_rec *c) ++connection_get_remote_port (request_rec *r) + { + #if defined(APACHE22) +- return c->remote_addr->port; ++ return r->useragent_addr->port; + #else + apr_port_t port; +- apr_sockaddr_port_get (&port, c->remote_addr); ++ apr_sockaddr_port_get (&port, r->connection->remote_addr); + return port; + #endif + +@@ -1978,7 +1978,7 @@ + + size += sizeof (int32_t); + +- info.remote_ip_len = strlen (r->connection->remote_ip); ++ info.remote_ip_len = strlen (r->useragent_ip); + size += info.remote_ip_len + sizeof (int32_t); + + size += sizeof (int32_t); +@@ -2026,8 +2026,8 @@ + i = LE_FROM_INT (i); + memcpy (ptr, &i, sizeof (i)); + ptr += sizeof (int32_t); +- ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len); +- i = connection_get_remote_port (r->connection); ++ ptr += write_string_to_buffer (ptr, 0, r->useragent_ip, info.remote_ip_len); ++ i = connection_get_remote_port (r); + i = LE_FROM_INT (i); + memcpy (ptr, &i, sizeof (i)); + ptr += sizeof (int32_t); +--- a/configure.in ++++ b/configure.in +@@ -336,6 +336,18 @@ + ], [ + ]) + ++AC_TRY_RUN([ ++ #include <ap_release.h> ++ int main () ++ { ++ return (AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 4) ? 0 : 1; ++ } ++], [ ++ APACHE_VER=2.4 ++], [ ++]) ++ ++ + fi + + if test ! "$APACHE_VER" = "1.3" -a ! "$APACHE_VER" = "retry" ; then +@@ -381,7 +393,7 @@ + dnl Sources are recompiled if we change the target version + AC_DEFINE([APACHE2],,[Compiling for Apache >= 2.0 ]) + +-if test "$APACHE_VER" = "2.2" ; then ++if test "$APACHE_VER" = "2.2" || test "$APACHE_VER" = "2.4" ; then + AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ]) + fi + diff --git a/debian/patches/series b/debian/patches/series index ad28177..26f333d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ #dont_use_sigpwr_on_kfreebsd.patch +port-24-patch diff --git a/debian/rules b/debian/rules index 8839208..561ed46 100755 --- a/debian/rules +++ b/debian/rules @@ -18,9 +18,8 @@ DEB_VERSION = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Vers DEB_SOURCE_NAME = $(shell dpkg-parsechangelog -l$(DEBIAN_DIR)/changelog | grep ^Source | cut -d" " -f2) VERSION = $(shell echo $(DEB_VERSION) | cut -d"-" -f1 | sed 's/+dfsg.*//') -override_dh_install: - dh_install - +override_dh_apache2: + dh_apache2 # Install a Debian version of the AutoConfiguration stuff that fits # with the apache2 a2{en,dis}mod stuff. We use the existing version # because of the autoconf substitutions. @@ -33,6 +32,10 @@ override_dh_gencontrol: dh_gencontrol -- \ -Vcurrent-version=$(PKG_VERSION) -Vnext-version=$(NEXT_PKG_VERSION) +override_dh_auto_configure: + autoreconf -i + dh_auto_configure + get-orig-source: uscan \ --package $(DEB_SOURCE_NAME) \ @@ -44,5 +47,4 @@ get-orig-source: --rename %: - dh $@ - + dh $@ --with apache2 diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 0000000..1958bd6 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore = "(^|/)(config.sub|config.guess|configure|Makefile.in|aclocal.m4|config.in|ltmain.sh)$"
signature.asc
Description: OpenPGP digital signature