Return-Path: X-Original-To: apmail-perl-dev-archive@www.apache.org Delivered-To: apmail-perl-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F0F19DC6 for ; Wed, 11 Apr 2012 07:51:06 +0000 (UTC) Received: (qmail 69427 invoked by uid 500); 11 Apr 2012 07:51:06 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 68205 invoked by uid 500); 11 Apr 2012 07:51:00 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 68168 invoked by uid 99); 11 Apr 2012 07:50:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 07:50:59 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jkaluza@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2012 07:50:53 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3B7oW91029964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Apr 2012 03:50:33 -0400 Received: from dhcp-29-218.brq.redhat.com (dhcp-25-149.brq.redhat.com [10.34.25.149]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3B7oVhi027108 for ; Wed, 11 Apr 2012 03:50:32 -0400 Message-ID: <4F852843.6090007@redhat.com> Date: Wed, 11 Apr 2012 08:44:19 +0200 From: =?windows-1252?Q?Jan_Kalu=9Ea?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: dev@perl.apache.org Subject: mod_perl and httpd-2.4 Content-Type: multipart/mixed; boundary="------------070400010309050105020707" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Virus-Checked: Checked by ClamAV on apache.org --------------070400010309050105020707 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi, I've talked with Torsten about the mod_perl and httpd-2.4 compatibility and he advised me to start discussion about this problem. Attached patch against httpd24 branch fixes the compilation with httpd-2.4. I was not able to generate xs using "make source_scan", so I've changed them manually. Should source_scan.pl work...? Except the source_scan.pl issue, there is one issue which has to be addressed too. conn_rec->remote_ip and conn_rec->remote_addr have been removed and replaced by request_rec->useragent_ip, request_rec->useragent_addr and conn_rec->client_ip, conn_rec->client_addr. See [1] to read about the differences between them. There are two ways how to address this issue: 1. Break the compatibility with older mod_perl versions. The advantage is that mod_perl will stay consistent with httpd and mod_perl developers would not have to maintain the compatibility layer. The disadvantage is that if there are projects using mod_perl and remote_ip/remote_addr, they would have to be fixed too. However, it's the very same situation like with httpd-2.4, where all the modules using remote_ip/remote_addr have to be fixed too. 2. Introduce the compatibility layer. I'm not Perl expert, but I think with the way how mod_perl is built currently it's not doable out-of-box (I can be wrong of course). Interesting thing is also that most modules I've ported to httpd-2.4 use remote_ip/remote_addr in the meaning of useragent_ip/useragent_addr. In http-2.4 these two pairs are members of different structs (conn_rec and request_rec). I think I can't imagine how would we map conn_rec->remote_ip to request_rec->useragent_ip... Personally I would vote for the number 1 and bumping mod_perl version. I'm not Perl developer, I just co-maintain mod_perl in Fedora and in the development version httpd has been updated to 2.4, so mod_perl is not building there anymore. Regards, Jan Kaluza --------------070400010309050105020707 Content-Type: text/x-patch; name="modperl-httpd24.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="modperl-httpd24.patch" Index: src/modules/perl/modperl_interp.c =================================================================== --- src/modules/perl/modperl_interp.c (revision 1324590) +++ src/modules/perl/modperl_interp.c (working copy) @@ -500,7 +500,7 @@ "set interp 0x%lx in %s 0x%lx (%s request for %s)\n", (unsigned long)interp, desc, (unsigned long)p, (r ? (is_subrequest ? "sub" : "main") : "conn"), - (r ? r->uri : c->remote_ip)); + (r ? r->uri : c->client_ip)); } /* set context (THX) for this thread */ Index: xs/tables/current/Apache2/StructureTable.pm =================================================================== --- xs/tables/current/Apache2/StructureTable.pm (revision 1324590) +++ xs/tables/current/Apache2/StructureTable.pm (working copy) @@ -2708,11 +2708,11 @@ }, { 'type' => 'apr_sockaddr_t *', - 'name' => 'remote_addr' + 'name' => 'client_addr' }, { 'type' => 'char *', - 'name' => 'remote_ip' + 'name' => 'client_ip' }, { 'type' => 'char *', @@ -2955,6 +2955,14 @@ }, { 'type' => 'char *', + 'name' => 'useragent_ip' + }, + { + 'type' => 'apr_sockaddr_t *', + 'name' => 'useragent_addr' + }, + { + 'type' => 'char *', 'name' => 'the_request' }, { @@ -3245,10 +3253,6 @@ }, { 'type' => 'int', - 'name' => 'loglevel' - }, - { - 'type' => 'int', 'name' => 'is_virtual' }, { Index: Apache-Reload/Makefile.PL =================================================================== --- Apache-Reload/Makefile.PL (revision 1324590) +++ Apache-Reload/Makefile.PL (working copy) @@ -11,7 +11,7 @@ # MOD_PERL_2_BUILD is set from building from mod_perl Makefile.PL which should # also set MP_APXS if ($ENV{MOD_PERL_2_BUILD}) { - push @ARGV, "-apxs", $ENV{MP_APXS}; + push @ARGV, "-apxs $ENV{MP_APXS}"; my $mp_gen = satisfy_mp_generation(2); } else { Index: Apache-SizeLimit/Makefile.PL =================================================================== --- Apache-SizeLimit/Makefile.PL (revision 1324590) +++ Apache-SizeLimit/Makefile.PL (working copy) @@ -11,7 +11,7 @@ # MOD_PERL_2_BUILD is set from building from mod_perl Makefile.PL which should # also set MP_APXS if ($ENV{MOD_PERL_2_BUILD}) { - push @ARGV, "-apxs", $ENV{MP_APXS}; + push @ARGV, "-apxs $ENV{MP_APXS}"; my $mp_gen = satisfy_mp_generation(2); } else { --------------070400010309050105020707 Content-Type: text/plain; charset=us-ascii --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org For additional commands, e-mail: dev-help@perl.apache.org --------------070400010309050105020707--