summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod_perl-httpd24-maps.patch82
-rw-r--r--mod_perl.spec60
2 files changed, 122 insertions, 20 deletions
diff --git a/mod_perl-httpd24-maps.patch b/mod_perl-httpd24-maps.patch
new file mode 100644
index 0000000..f443b66
--- /dev/null
+++ b/mod_perl-httpd24-maps.patch
@@ -0,0 +1,82 @@
+diff --git a/xs/maps/apache2_structures.map b/xs/maps/apache2_structures.map
+index f86ec93..cca915b 100644
+--- a/xs/maps/apache2_structures.map
++++ b/xs/maps/apache2_structures.map
+@@ -2,6 +2,20 @@
+
+ # for mapping see %ModPerl::MapUtil::disabled_map in
+ # lib/ModPerl/MapUtil.pm
++# the mapping happens in lib/ModPerl/StructureMap.pm: sub parse
++# '<' => 'auto-generated but gives only a read-only access'
++# '&' => 'RDWR accessor to a char* field, supporting undef arg'
++# '$' => 'RONLY accessor, with WRITE accessor before child_init'
++# '%' => like $, but makes sure that for the write accessor the
++# original perl scalar can change or go away w/o affecting
++# the object
++# my %disabled_map = (
++# '!' => 'disabled or not yet implemented',
++# '~' => 'implemented but not auto-generated',
++# '-' => 'likely never be available to Perl',
++# '>' => '"private" to apache',
++# '?' => 'unclassified',
++# );
+
+ IGNORE: ap_LINK_ ap_filter_func ap_bucket_error ap_listen_rec core_net_rec
+
+@@ -69,6 +83,8 @@ IGNORE: ap_LINK_ ap_filter_func ap_bucket_error ap_listen_rec core_net_rec
+ proto_output_filters
+ proto_input_filters
+ ? eos_sent
++< useragent_addr
++ useragent_ip
+ </request_rec>
+
+ <server_rec>
+@@ -78,10 +94,12 @@ IGNORE: ap_LINK_ ap_filter_func ap_bucket_error ap_listen_rec core_net_rec
+ - defn_line_number
+ % server_admin
+ % server_hostname
++% server_scheme
+ $ port
+ % error_fname
+ $ error_log
+ $ loglevel
++$ log
+ < is_virtual
+ < module_config
+ < lookup_defaults
+@@ -97,6 +115,7 @@ $ keep_alive
+ $ limit_req_line
+ $ limit_req_fieldsize
+ $ limit_req_fields
++ context
+ </server_rec>
+
+ <conn_rec>
+@@ -104,6 +123,8 @@ $ limit_req_fields
+ < base_server
+ > vhost_lookup_data
+ < local_addr
++< client_addr
++ client_ip
+ < local_ip
+ < local_host
+ < remote_addr
+@@ -121,6 +142,8 @@ $ limit_req_fields
+ output_filters
+ < sbh
+ < bucket_alloc
++< log
++< log_id
+ </conn_rec>
+
+ !<server_addr_rec>
+@@ -268,3 +291,8 @@ $ limit_req_fields
+ p
+ sa
+ </ap_pod_t>
++
++<ap_logconf>
++% level
++% module_levels
++</ap_logconf>
diff --git a/mod_perl.spec b/mod_perl.spec
index 8c3d3a2..b4e23aa 100644
--- a/mod_perl.spec
+++ b/mod_perl.spec
@@ -1,10 +1,13 @@
-%global contentdir /var/www
-%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
-%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
+%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
+%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo missing-httpd-devel)}}
+%{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}}
+# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
+%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
+%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}
Name: mod_perl
Version: 2.0.7
-Release: 7%{?dist}
+Release: 10%{?dist}
Summary: An embedded Perl interpreter for the Apache HTTP Server
Group: System Environment/Daemons
@@ -18,6 +21,7 @@ Patch1: mod_perl-2.0.4-inline.patch
Patch2: mod_perl-2.0.5-nolfs.patch
Patch3: mod_perl-short-name.patch
Patch4: mod_perl-httpd24.patch
+Patch5: mod_perl-httpd24-maps.patch
BuildRequires: perl-devel, perl(ExtUtils::Embed)
BuildRequires: httpd-devel >= 2.4.0, httpd, gdbm-devel
@@ -36,6 +40,8 @@ Requires: perl(Linux::Pid)
%global __provides_exclude %__provides_exclude|perl\\(Apache2::RequestRec\\)$
%global __provides_exclude %__provides_exclude|perl\\(warnings\\)$
%global __provides_exclude %__provides_exclude|perl\\(HTTP::Request::Common\\)$
+%global __provides_exclude %__provides_exclude|mod_perl\\.so\\(.*$
+%global __provides_exclude %__provides_exclude|mod_perl\\.so$
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(Apache::Test.*\\)
%global __requires_exclude %__requires_exclude|perl\\(Data::Flow\\)
%global __requires_exclude %__requires_exclude|perl\\(Apache2::FunctionTable\\)
@@ -59,7 +65,7 @@ like for it to directly incorporate a Perl interpreter.
%package devel
Summary: Files needed for building XS modules that use mod_perl
Group: Development/Libraries
-Requires: mod_perl = %{version}-%{release}, httpd-devel
+Requires: %{name}%{?_isa} = %{version}-%{release}, httpd-devel%{?_isa}
%description devel
The mod_perl-devel package contains the files needed for building XS
@@ -69,10 +75,11 @@ modules that use mod_perl.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
-%patch1 -p1 -b .inline
+%patch1 -p1
%patch2 -p1
-%patch3 -p1 -b .short-name
+%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
@@ -104,15 +111,13 @@ CFLAGS="$RPM_OPT_FLAGS -fpic" %{__perl} Makefile.PL </dev/null \
MP_APXS=%{_httpd_apxs} \
MP_APR_CONFIG=%{_bindir}/apr-1-config
-
make -C src/modules/perl %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS -fpic"
make
%install
-rm -rf $RPM_BUILD_ROOT
-install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/httpd/modules
+install -d -m 755 $RPM_BUILD_ROOT%{_httpd_moddir}
make install \
- MODPERL_AP_LIBEXECDIR=$RPM_BUILD_ROOT%{_libdir}/httpd/modules \
+ MODPERL_AP_LIBEXECDIR=$RPM_BUILD_ROOT%{_httpd_moddir} \
MODPERL_AP_INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir}/httpd
# Remove the temporary files.
@@ -125,10 +130,10 @@ find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
# Install the config file
-install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
-install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d
-install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
-install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.modules.d/02-perl.conf
+install -d -m 755 $RPM_BUILD_ROOT%{_httpd_confdir}
+install -d -m 755 $RPM_BUILD_ROOT%{_httpd_modconfdir}
+install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_confdir}
+install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_modconfdir}/02-perl.conf
# Move set of modules to -devel
devmods="ModPerl::Code ModPerl::BuildMM ModPerl::CScan \
@@ -152,14 +157,16 @@ for m in $devmods; do
done | tee devel.files | sed 's/^/%%exclude /' > exclude.files
echo "%%exclude %{_mandir}/man3/Apache::Test*.3pm*" >> exclude.files
+# perl build script generates *.orig files, they get installed and later they
+# break provides so mod_perl requires mod_perl-devel. We remove them here.
+find "$RPM_BUILD_ROOT" -type f -name *.orig -exec rm -f {} \;
%files -f exclude.files
-%defattr(-,root,root,-)
%doc Changes LICENSE NOTICE README* STATUS SVN-MOVE docs/
-%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
-%config(noreplace) %{_sysconfdir}/httpd/conf.modules.d/*.conf
+%config(noreplace) %{_httpd_confdir}/perl.conf
+%config(noreplace) %{_httpd_modconfdir}/02-perl.conf
%{_bindir}/*
-%{_libdir}/httpd/modules/mod_perl.so
+%{_httpd_moddir}/mod_perl.so
%{perl_vendorarch}/auto/*
%dir %{perl_vendorarch}/Apache/
%{perl_vendorarch}/Apache/Reload.pm
@@ -172,12 +179,25 @@ echo "%%exclude %{_mandir}/man3/Apache::Test*.3pm*" >> exclude.files
%{_mandir}/man3/*.3*
%files devel -f devel.files
-%defattr(-,root,root,-)
%{_includedir}/httpd/*
%{perl_vendorarch}/Apache/Test*.pm
%{_mandir}/man3/Apache::Test*.3pm*
%changelog
+* Wed Feb 13 2013 Remi Collet <RPMS@FamilleCollet.com> - 2.0.7-10
+- sync with rawhide, backport for remi repo
+
+* Tue Nov 20 2012 Jan Kaluza <jkaluza@redhat.com> - 2.0.7-10
+- do not install .orig file generated by make xs_generate
+- filter unversioned mod_perl.so from provides
+
+* Mon Nov 19 2012 Jan Kaluza <jkaluza@redhat.com> - 2.0.7-9
+- clean up spec file
+- do not require -devel when installing main package
+
+* Mon Nov 19 2012 Jan Kaluza <jkaluza@redhat.com> - 2.0.7-8
+- add wrappers for new fields added in httpd-2.4 structures
+
* Thu Aug 02 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.0.7-7
- sync with rawhide, backport for remi repo