* [gentoo-commits] proj/dotnet:master commit in: www-apache/mod_mono/files/2.2/, www-apache/mod_mono/files/, www-apache/mod_mono/
@ 2016-07-31 8:52 99% Mikhail Pukhlikov
0 siblings, 0 replies; 1+ results
From: Mikhail Pukhlikov @ 2016-07-31 8:52 UTC (permalink / raw
To: gentoo-commits
commit: 1989e5f5a0a08818df767edfa1ded68477924674
Author: ArsenShnurkov <Arsen.Shnurkov <AT> gmail <DOT> com>
AuthorDate: Sat Jul 30 08:08:28 2016 +0000
Commit: Mikhail Pukhlikov <cynede <AT> gentoo <DOT> org>
CommitDate: Sat Jul 30 08:08:28 2016 +0000
URL: https://gitweb.gentoo.org/proj/dotnet.git/commit/?id=1989e5f5
version from main tree
www-apache/mod_mono/files/2.2/70_mod_mono.conf | 88 +++++++++++++
.../mod_mono/files/mod_mono-2.10-apache-2.4.patch | 146 +++++++++++++++++++++
www-apache/mod_mono/metadata.xml | 13 ++
www-apache/mod_mono/mod_mono-2.10.ebuild | 64 +++++++++
4 files changed, 311 insertions(+)
diff --git a/www-apache/mod_mono/files/2.2/70_mod_mono.conf b/www-apache/mod_mono/files/2.2/70_mod_mono.conf
new file mode 100644
index 0000000..f944039
--- /dev/null
+++ b/www-apache/mod_mono/files/2.2/70_mod_mono.conf
@@ -0,0 +1,88 @@
+# For more information on the Mono* directives, see the man page for
+# mod_mono(8)
+
+<IfDefine MONO>
+ # Set this to False if you manage your ASP.Net server manually through
+ # /etc/init.d/mod-mono-server
+ MonoRunXSP True
+
+ # Set this to Enabled if you want to enable AutoHosting.
+ # See http://www.mono-project.com/AutoConfiguration for more info.
+ # Note that if you want your automatically hosted applications
+ # handled by ASP.NET 2.0 engine you have to enable the aspnet2 USE flag.
+ MonoAutoApplication Enabled
+
+ <IfModule !mod_mono.c>
+ LoadModule mono_module /usr/@LIBDIR@/apache2/modules/mod_mono.so
+ </IfModule>
+
+ <IfModule mod_mime.c>
+ AddType application/x-asp-net .aspx
+ AddType application/x-asp-net .asmx
+ AddType application/x-asp-net .ashx
+ AddType application/x-asp-net .asax
+ AddType application/x-asp-net .ascx
+ AddType application/x-asp-net .soap
+ AddType application/x-asp-net .rem
+ AddType application/x-asp-net .axd
+ AddType application/x-asp-net .cs
+ AddType application/x-asp-net .vb
+ AddType application/x-asp-net .master
+ AddType application/x-asp-net .sitemap
+ AddType application/x-asp-net .resources
+ AddType application/x-asp-net .skin
+ AddType application/x-asp-net .browser
+ AddType application/x-asp-net .webinfo
+ AddType application/x-asp-net .resx
+ AddType application/x-asp-net .licx
+ AddType application/x-asp-net .csproj
+ AddType application/x-asp-net .vbproj
+ AddType application/x-asp-net .config
+ AddType application/x-asp-net .Config
+ AddType application/x-asp-net .dll
+ DirectoryIndex index.aspx
+ DirectoryIndex Default.aspx
+ DirectoryIndex default.aspx
+ </IfModule>
+
+### Please also add "-D MONO_DEMO" in order to activate out-of-the-box mono demo
+###
+
+ # Note that the test application runs on a separate mod-mono-server
+ # instance named "testinst". Athought this is not mandatory, it shows how to
+ # distribute workload between multiple mod-mono-servers. For more info see:
+ # http://www.mono-project.com/Mod_mono
+
+ <IfDefine MONO_DEMO>
+ <IfModule mod_alias.c>
+ Alias /mono "/usr/lib/xsp/test"
+ </IfModule>
+
+ # You might want to specify the version of mod-mono-server
+ # instance that will handle your application. The default
+ # value depends on whether the aspnet2 USE flag was set
+ # during compilation
+ #MonoServerPath testinst /usr/lib/mono/1.0/mod-mono-server.exe
+ #MonoServerPath testinst /usr/lib/mono/2.0/mod-mono-server2.exe
+
+ AddMonoApplications testinst "/mono:/usr/lib/xsp/test"
+
+ <Directory /usr/lib/xsp/test>
+ SetHandler mono
+ MonoSetServerAlias testinst
+
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ <IfModule mod_dir.c>
+ # Sample ASP.NET 1.1/2.0 applications can be accessed
+ # via index2.aspx.
+ DirectoryIndex index.aspx
+ #DirectoryIndex index2.aspx
+ </IfModule>
+ </Directory>
+ </IfDefine>
+### MONO_DEMO end.
+
+</IfDefine>
diff --git a/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch b/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
new file mode 100644
index 0000000..86694bf
--- /dev/null
+++ b/www-apache/mod_mono/files/mod_mono-2.10-apache-2.4.patch
@@ -0,0 +1,146 @@
+Sólo en mod_mono-2.10.new/: attachment.cgi?id=402888
+diff -ur mod_mono-2.10/configure.in mod_mono-2.10.new/configure.in
+--- mod_mono-2.10/configure.in 2011-01-13 23:32:35.000000000 +0100
++++ mod_mono-2.10.new/configure.in 2015-06-07 21:09:26.417127319 +0200
+@@ -336,6 +336,16 @@
+ ], [
+ ])
+
++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
+@@ -385,6 +395,10 @@
+ AC_DEFINE([APACHE22],,[Compiling for Apache >= 2.2 ])
+ fi
+
++if test "$APACHE_VER" = "2.4" ; then
++ AC_DEFINE([APACHE24],,[Compiling for Apache >= 2.4 ])
++fi
++
+ # check for --with-mono-default-config-dir
+ DFLT_MONO_CONFIG_DIR=`$APXS -q SYSCONFDIR`/mod-mono-applications
+ AC_ARG_WITH(mono-default-config-dir,
+diff -ur mod_mono-2.10/src/mod_mono.c mod_mono-2.10.new/src/mod_mono.c
+--- mod_mono-2.10/src/mod_mono.c 2011-01-13 23:32:35.000000000 +0100
++++ mod_mono-2.10.new/src/mod_mono.c 2015-06-07 21:09:26.421127351 +0200
+@@ -386,7 +386,11 @@
+ apache_get_userid ()
+ {
+ #ifdef HAVE_UNIXD
+- return unixd_config.user_id;
++#if defined(APACHE24)
++ return ap_unixd_config.user_id;
++#else
++ return unixd_config.user_id;
++#endif
+ #else
+ return ap_user_id;
+ #endif
+@@ -396,7 +400,11 @@
+ apache_get_groupid ()
+ {
+ #ifdef HAVE_UNIXD
+- return unixd_config.group_id;
++#if defined(APACHE24)
++ return ap_unixd_config.user_id;
++#else
++ return unixd_config.user_id;
++#endif
+ #else
+ return ap_group_id;
+ #endif
+@@ -406,7 +414,11 @@
+ apache_get_username ()
+ {
+ #ifdef HAVE_UNIXD
++#if defined(APACHE24)
++ return ap_unixd_config.user_name;
++#else
+ return unixd_config.user_name;
++#endif
+ #else
+ return ap_user_name;
+ #endif
+@@ -485,8 +497,12 @@
+
+ #if defined (AP_NEED_SET_MUTEX_PERMS) && defined (HAVE_UNIXD)
+ DEBUG_PRINT (1, "Setting mutex permissions for %s", xsp->dashboard_lock_file);
++#if defined(APACHE24)
++ rv = ap_unixd_set_global_mutex_perms (xsp->dashboard_mutex);
++#else
+ rv = unixd_set_global_mutex_perms (xsp->dashboard_mutex);
+- if (rv != APR_SUCCESS) {
++#endif
++ if (rv != APR_SUCCESS) {
+ ap_log_error (APLOG_MARK, APLOG_CRIT, STATCODE_AND_SERVER (rv),
+ "Failed to set mutex permissions for %s",
+ xsp->dashboard_lock_file);
+@@ -850,10 +866,14 @@
+ #if defined(APACHE22)
+ return c->remote_addr->port;
+ #else
++#if defined(APACHE24)
++ return c->client_addr->port;
++#else
+ apr_port_t port;
+ apr_sockaddr_port_get (&port, c->remote_addr);
+ return port;
+ #endif
++#endif
+
+ }
+
+@@ -863,10 +883,14 @@
+ #if defined(APACHE22)
+ return r->connection->local_addr->port;
+ #else
++#if defined(APACHE24)
++ return r->connection->local_addr->port;
++#else
+ apr_port_t port;
+ apr_sockaddr_port_get (&port, r->connection->local_addr);
+ return port;
+ #endif
++#endif
+ }
+
+ static const char *
+@@ -1977,9 +2001,12 @@
+ size += info.local_ip_len + sizeof (int32_t);
+
+ size += sizeof (int32_t);
+-
+- info.remote_ip_len = strlen (r->connection->remote_ip);
+- size += info.remote_ip_len + sizeof (int32_t);
++#if defined(APACHE24)
++ info.remote_ip_len = strlen (r->connection->client_ip);
++#else
++ info.remote_ip_len = strlen (r->connection->remote_ip);
++#endif
++ size += info.remote_ip_len + sizeof (int32_t);
+
+ size += sizeof (int32_t);
+
+@@ -2026,7 +2053,11 @@
+ i = LE_FROM_INT (i);
+ memcpy (ptr, &i, sizeof (i));
+ ptr += sizeof (int32_t);
++#if defined(APACHE24)
++ ptr += write_string_to_buffer (ptr, 0, r->connection->client_ip, info.remote_ip_len);
++#else
+ ptr += write_string_to_buffer (ptr, 0, r->connection->remote_ip, info.remote_ip_len);
++#endif
+ i = connection_get_remote_port (r->connection);
+ i = LE_FROM_INT (i);
+ memcpy (ptr, &i, sizeof (i));
+Sólo en mod_mono-2.10.new/src: mod_mono.c.orig
diff --git a/www-apache/mod_mono/metadata.xml b/www-apache/mod_mono/metadata.xml
new file mode 100644
index 0000000..153f190
--- /dev/null
+++ b/www-apache/mod_mono/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>dotnet@gentoo.org</email>
+ <name>Gentoo Dotnet Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The module allows Apache (https://httpd.apache.org/) to serve ASP.NET
+ pages by proxying the requests to a slightly modified version of our XSP
+ called mod-mono-server that is installed along with XSP.
+ </longdescription>
+</pkgmetadata>
diff --git a/www-apache/mod_mono/mod_mono-2.10.ebuild b/www-apache/mod_mono/mod_mono-2.10.ebuild
new file mode 100644
index 0000000..a6285fd
--- /dev/null
+++ b/www-apache/mod_mono/mod_mono-2.10.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# Watch the order of these!
+inherit autotools apache-module multilib eutils go-mono mono
+
+KEYWORDS="amd64 ppc x86"
+
+DESCRIPTION="Apache module for Mono"
+HOMEPAGE="http://www.mono-project.com/Mod_mono"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="debug"
+
+DEPEND="=dev-dotnet/xsp-${GO_MONO_REL_PV}*"
+RDEPEND="${DEPEND}"
+
+APACHE2_MOD_CONF="2.2/70_${PN}"
+APACHE2_MOD_DEFINE="MONO"
+
+DOCFILES="AUTHORS ChangeLog COPYING INSTALL NEWS README"
+
+need_apache2
+
+src_prepare() {
+ sed -e "s:@LIBDIR@:$(get_libdir):" "${FILESDIR}/${APACHE2_MOD_CONF}.conf" \
+ > "${WORKDIR}/${APACHE2_MOD_CONF##*/}.conf" || die
+
+ epatch "${FILESDIR}"/${PN}-2.10-apache-2.4.patch
+
+ eautoreconf
+ go-mono_src_prepare
+}
+
+src_configure() {
+ export LIBS="$(pkg-config --libs apr-1)"
+ go-mono_src_configure \
+ $(use_enable debug) \
+ --with-apxs="${APXS}" \
+ --with-apr-config="/usr/bin/apr-1-config" \
+ --with-apu-config="/usr/bin/apu-1-config"
+}
+src_compile() {
+ go-mono_src_compile
+}
+
+src_install() {
+ go-mono_src_install
+ find "${D}" -name 'mod_mono.conf' -delete || die "failed to remove mod_mono.conf"
+ insinto "${APACHE_MODULES_CONFDIR}"
+ newins "${WORKDIR}/${APACHE2_MOD_CONF##*/}.conf" "${APACHE2_MOD_CONF##*/}.conf" \
+ || die "internal ebuild error: '${FILESDIR}/${APACHE2_MOD_CONF}.conf' not found"
+}
+
+pkg_postinst() {
+ apache-module_pkg_postinst
+
+ elog "To enable mod_mono, add \"-D MONO\" to your Apache's"
+ elog "conf.d configuration file. Additionally, to view sample"
+ elog "ASP.NET applications, add \"-D MONO_DEMO\" too."
+}
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-07-31 8:52 99% [gentoo-commits] proj/dotnet:master commit in: www-apache/mod_mono/files/2.2/, www-apache/mod_mono/files/, www-apache/mod_mono/ Mikhail Pukhlikov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox