* [ptxdist] [PATCHv3 2/2] apache2: added patches for apache 2.4.12
2015-03-04 10:02 [ptxdist] [PATCHv3 1/2] apache2: version update to 2.4.12 Oliver Graute
@ 2015-03-04 10:02 ` Oliver Graute
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Graute @ 2015-03-04 10:02 UTC (permalink / raw)
To: ptxdist; +Cc: Oliver Graute
this adds the required patches to compile on a arm platform
Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
---
...t-apxs-don-t-try-to-modify-the-config-fil.patch | 220 ++++++++++++++++++++
...ound-for-duplicate-definitions-in-exports.patch | 15 ++
.../0003-workaround-for-exports_errors.patch | 42 ++++
patches/httpd-2.4.12/series | 3 +
4 files changed, 280 insertions(+)
create mode 100644 patches/httpd-2.4.12/0001-HACK-support-apxs-don-t-try-to-modify-the-config-fil.patch
create mode 100644 patches/httpd-2.4.12/0002-workaround-for-duplicate-definitions-in-exports.patch
create mode 100644 patches/httpd-2.4.12/0003-workaround-for-exports_errors.patch
create mode 100644 patches/httpd-2.4.12/series
diff --git a/patches/httpd-2.4.12/0001-HACK-support-apxs-don-t-try-to-modify-the-config-fil.patch b/patches/httpd-2.4.12/0001-HACK-support-apxs-don-t-try-to-modify-the-config-fil.patch
new file mode 100644
index 0000000..497b3a8
--- /dev/null
+++ b/patches/httpd-2.4.12/0001-HACK-support-apxs-don-t-try-to-modify-the-config-fil.patch
@@ -0,0 +1,220 @@
+diff -rupN AS/support/apxs.in AT/support/apxs.in
+--- AS/support/apxs.in 2015-02-18 10:06:32.858756315 +0100
++++ AT/support/apxs.in 2015-02-18 10:44:56.321461391 +0100
+@@ -548,111 +548,111 @@ if ($opt_i or $opt_e) {
+ # execute the commands
+ &execute_cmds(@cmds);
+
+- # activate module via LoadModule/AddModule directive
+- if ($opt_a or $opt_A) {
+- if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
+- error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
+- exit(1);
+- }
+-
+- open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
+- my $content = join('', <FP>);
+- close(FP);
+-
+- if ($content !~ m|\n#?\s*LoadModule\s+|) {
+- error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
+- error("At least one `LoadModule' directive already has to exist.");
+- exit(1);
+- }
+-
+- my $lmd;
+- my $c = '';
+- $c = '#' if ($opt_A);
+- foreach $lmd (@lmd) {
+- my $what = $opt_A ? "preparing" : "activating";
+- my $lmd_re = $lmd;
+- $lmd_re =~ s/\s+/\\s+/g;
+-
+- if ($content !~ m|\n#?\s*$lmd_re|) {
+- # check for open <containers>, so that the new LoadModule
+- # directive always appears *outside* of an <container>.
+-
+- my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
+-
+- # the '()=' trick forces list context and the scalar
+- # assignment counts the number of list members (aka number
+- # of matches) then
+- my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
+- my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
+-
+- if ($cntopen == $cntclose) {
+- # fine. Last LoadModule is contextless.
+- $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
+- }
+- elsif ($cntopen < $cntclose) {
+- error('Configuration file is not valid. There are sections'
+- . ' closed before opened.');
+- exit(1);
+- }
+- else {
+- # put our cmd after the section containing the last
+- # LoadModule.
+- my $found =
+- $content =~ s!\A ( # string and capture start
+- (?:(?:
+- ^\s* # start of conf line with a
+- (?:[^<]|<[^/]) # directive which does not
+- # start with '</'
+-
+- .*(?:$)\n # rest of the line.
+- # the '$' is in parentheses
+- # to avoid misinterpreting
+- # the string "$\" as
+- # perl variable.
+-
+- )* # catch as much as possible
+- # of such lines. (including
+- # zero)
+-
+- ^\s*</.*(?:$)\n? # after the above, we
+- # expect a config line with
+- # a closing container (</)
+-
+- ) {$cntopen} # the whole pattern (bunch
+- # of lines that end up with
+- # a closing directive) must
+- # be repeated $cntopen
+- # times. That's it.
+- # Simple, eh? ;-)
+-
+- ) # capture end
+- !$1$c$lmd\n!mx;
+-
+- unless ($found) {
+- error('Configuration file is not valid. There are '
+- . 'sections opened and not closed.');
+- exit(1);
+- }
+- }
+- } else {
+- # replace already existing LoadModule line
+- $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
+- }
+- $lmd =~ m|LoadModule\s+(.+?)_module.*|;
+- notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
+- }
+- if (@lmd) {
+- if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
+- print FP $content;
+- close(FP);
+- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
+- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
+- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
+- } else {
+- notice("unable to open configuration file");
+- }
+- }
+- }
++# # activate module via LoadModule/AddModule directive
++# if ($opt_a or $opt_A) {
++# if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
++# error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
++# exit(1);
++# }
++#
++# open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
++# my $content = join('', <FP>);
++# close(FP);
++#
++# if ($content !~ m|\n#?\s*LoadModule\s+|) {
++# error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
++# error("At least one `LoadModule' directive already has to exist.");
++# exit(1);
++# }
++#
++# my $lmd;
++# my $c = '';
++# $c = '#' if ($opt_A);
++# foreach $lmd (@lmd) {
++# my $what = $opt_A ? "preparing" : "activating";
++# my $lmd_re = $lmd;
++# $lmd_re =~ s/\s+/\\s+/g;
++#
++# if ($content !~ m|\n#?\s*$lmd_re|) {
++# # check for open <containers>, so that the new LoadModule
++# # directive always appears *outside* of an <container>.
++#
++# my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
++#
++# # the '()=' trick forces list context and the scalar
++# # assignment counts the number of list members (aka number
++# # of matches) then
++# my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
++# my $cntclose = () = ($before =~ m|^\s*</.*$|mg);
++#
++# if ($cntopen == $cntclose) {
++# # fine. Last LoadModule is contextless.
++# $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|s;
++# }
++# elsif ($cntopen < $cntclose) {
++# error('Configuration file is not valid. There are sections'
++# . ' closed before opened.');
++# exit(1);
++# }
++# else {
++# # put our cmd after the section containing the last
++# # LoadModule.
++# my $found =
++# $content =~ s!\A ( # string and capture start
++# (?:(?:
++# ^\s* # start of conf line with a
++# (?:[^<]|<[^/]) # directive which does not
++# # start with '</'
++#
++# .*(?:$)\n # rest of the line.
++# # the '$' is in parentheses
++# # to avoid misinterpreting
++# # the string "$\" as
++# # perl variable.
++#
++# )* # catch as much as possible
++# # of such lines. (including
++# # zero)
++#
++# ^\s*</.*(?:$)\n? # after the above, we
++# # expect a config line with
++# # a closing container (</)
++#
++# ) {$cntopen} # the whole pattern (bunch
++# # of lines that end up with
++# # a closing directive) must
++# # be repeated $cntopen
++# # times. That's it.
++# # Simple, eh? ;-)
++#
++# ) # capture end
++# !$1$c$lmd\n!mx;
++#
++# unless ($found) {
++# error('Configuration file is not valid. There are '
++# . 'sections opened and not closed.');
++# exit(1);
++# }
++# }
++# } else {
++# # replace already existing LoadModule line
++# $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s;
++# }
++# $lmd =~ m|LoadModule\s+(.+?)_module.*|;
++# notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]");
++# }
++# if (@lmd) {
++# if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
++# print FP $content;
++# close(FP);
++# system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
++# "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
++# "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
++# } else {
++# notice("unable to open configuration file");
++# }
++# }
++# }
+ }
+
+ sub error{
diff --git a/patches/httpd-2.4.12/0002-workaround-for-duplicate-definitions-in-exports.patch b/patches/httpd-2.4.12/0002-workaround-for-duplicate-definitions-in-exports.patch
new file mode 100644
index 0000000..97d52d6
--- /dev/null
+++ b/patches/httpd-2.4.12/0002-workaround-for-duplicate-definitions-in-exports.patch
@@ -0,0 +1,15 @@
+diff -rupN AO/build/make_exports.awk AP/build/make_exports.awk
+--- AO/build/make_exports.awk 2008-04-07 12:45:43.000000000 +0200
++++ AP/build/make_exports.awk 2015-02-18 08:16:49.007121145 +0100
+@@ -83,7 +83,10 @@ function leave_scope() {
+
+ function add_symbol(symbol) {
+ if (!index(symbol, "#")) {
+- push("const void *ap_hack_" symbol " = (const void *)" symbol ";")
++ push("#ifndef AP_DEFINED_AP_HACK_" symbol);
++ push("#define AP_DEFINED_AP_HACK_" symbol);
++ push("const void *ap_hack_" symbol " = (const void *)" symbol ";");
++ push("#endif");
+ scope_used[scope] = 1
+ }
+ }
diff --git a/patches/httpd-2.4.12/0003-workaround-for-exports_errors.patch b/patches/httpd-2.4.12/0003-workaround-for-exports_errors.patch
new file mode 100644
index 0000000..fc50138
--- /dev/null
+++ b/patches/httpd-2.4.12/0003-workaround-for-exports_errors.patch
@@ -0,0 +1,42 @@
+diff -rupN AQ/server/Makefile.in AR/server/Makefile.in
+--- AQ/server/Makefile.in 2015-02-18 10:24:16.537259129 +0100
++++ AR/server/Makefile.in 2015-02-18 10:35:16.394867701 +0100
+@@ -27,8 +27,8 @@ gen_test_char_OBJECTS = gen_test_char.lo
+ gen_test_char: $(gen_test_char_OBJECTS)
+ $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
+
+-test_char.h: gen_test_char
+- ./gen_test_char > test_char.h
++#test_char.h: gen_test_char
++# ./gen_test_char > test_char.h
+
+ util.lo: test_char.h
+
+diff -rupN AQ/server/test_char.h AR/server/test_char.h
+--- AQ/server/test_char.h 1970-01-01 01:00:00.000000000 +0100
++++ AR/server/test_char.h 2015-02-18 09:03:10.632668694 +0100
+@@ -0,0 +1,24 @@
++/* this file is automatically generated by gen_test_char, do not edit */
++#define T_ESCAPE_SHELL_CMD (1)
++#define T_ESCAPE_PATH_SEGMENT (2)
++#define T_OS_ESCAPE_PATH (4)
++#define T_HTTP_TOKEN_STOP (8)
++#define T_ESCAPE_LOGITEM (16)
++#define T_ESCAPE_FORENSIC (32)
++#define T_ESCAPE_URLENCODED (64)
++
++static const unsigned char test_char_table[256] = {
++ 32,126,126,126,126,126,126,126,126,126,127,126,126,126,126,126,126,126,126,126,
++ 126,126,126,126,126,126,126,126,126,126,126,126,14,64,95,70,65,102,65,65,
++ 73,73,1,64,72,0,0,74,0,0,0,0,0,0,0,0,0,0,104,79,
++ 79,72,79,79,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
++ 0,0,0,0,0,0,0,0,0,0,0,79,95,79,71,0,71,0,0,0,
++ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
++ 0,0,0,79,103,79,65,126,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,
++ 118,118,118,118,118,118,118,118,118,118,118,118,118,118,118,118
++};
diff --git a/patches/httpd-2.4.12/series b/patches/httpd-2.4.12/series
new file mode 100644
index 0000000..4d1602e
--- /dev/null
+++ b/patches/httpd-2.4.12/series
@@ -0,0 +1,3 @@
+0001-HACK-support-apxs-don-t-try-to-modify-the-config-fil.patch
+0002-workaround-for-duplicate-definitions-in-exports.patch
+0003-workaround-for-exports_errors.patch
--
1.7.9.5
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread