summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-httpd/apache2/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/files')
-rw-r--r--meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch52
-rw-r--r--meta-webserver/recipes-httpd/apache2/files/apache2-volatile.conf2
-rw-r--r--meta-webserver/recipes-httpd/apache2/files/apache2.service14
-rw-r--r--meta-webserver/recipes-httpd/apache2/files/httpd-2.4.3-fix-race-issue-of-dir-install.patch21
-rwxr-xr-xmeta-webserver/recipes-httpd/apache2/files/init73
5 files changed, 162 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch b/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch
new file mode 100644
index 000000000..63096db0a
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/0001-configure-use-pkg-config-for-PCRE-detection.patch
@@ -0,0 +1,52 @@
1From d8837756f2a48adcfe5d645c39cf163d96eac76c Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen.kooi@linaro.org>
3Date: Tue, 17 Jun 2014 09:10:57 +0200
4Subject: [PATCH] configure: use pkg-config for PCRE detection
5
6Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
7Upstream-Status: pending
8---
9 configure.in | 27 +++++----------------------
10 1 file changed, 5 insertions(+), 22 deletions(-)
11
12diff --git a/configure.in b/configure.in
13index 864d7c7..da4138e 100644
14--- a/configure.in
15+++ b/configure.in
16@@ -215,28 +215,11 @@ fi
17 AC_ARG_WITH(pcre,
18 APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
19
20-AC_PATH_PROG(PCRE_CONFIG, pcre-config, false)
21-if test -d "$with_pcre" && test -x "$with_pcre/bin/pcre-config"; then
22- PCRE_CONFIG=$with_pcre/bin/pcre-config
23-elif test -x "$with_pcre"; then
24- PCRE_CONFIG=$with_pcre
25-fi
26-
27-if test "$PCRE_CONFIG" != "false"; then
28- if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
29- AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG])
30- fi
31- case `$PCRE_CONFIG --version` in
32- [[1-5].*])
33- AC_MSG_ERROR([Need at least pcre version 6.0])
34- ;;
35- esac
36- AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
37- APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
38- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
39-else
40- AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
41-fi
42+PKG_CHECK_MODULES([PCRE], [libpcre], [
43+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
44+], [
45+ AC_MSG_ERROR([$PCRE_PKG_ERRORS])
46+])
47 APACHE_SUBST(PCRE_LIBS)
48
49 AC_MSG_NOTICE([])
50--
511.9.3
52
diff --git a/meta-webserver/recipes-httpd/apache2/files/apache2-volatile.conf b/meta-webserver/recipes-httpd/apache2/files/apache2-volatile.conf
new file mode 100644
index 000000000..ff2c58704
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/apache2-volatile.conf
@@ -0,0 +1,2 @@
1d /var/run/apache2 0755 root root -
2d /var/log/apache2 0755 root root -
diff --git a/meta-webserver/recipes-httpd/apache2/files/apache2.service b/meta-webserver/recipes-httpd/apache2/files/apache2.service
new file mode 100644
index 000000000..f4bcf9efa
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/apache2.service
@@ -0,0 +1,14 @@
1[Unit]
2Decription=The Apache HTTP Server
3After=network.target remote-fs.target nss-lookup.target
4
5[Service]
6Type=simple
7Environment=LANG=C
8ExecStart=@SBINDIR@/httpd -DFOREGROUND -D SSL -D PHP5 -k start
9ExecStop=@BASE_BINDIR@/kill -WINCH ${MAINPID}
10KillSignal=SIGCONT
11PrivateTmp=true
12
13[Install]
14WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-httpd/apache2/files/httpd-2.4.3-fix-race-issue-of-dir-install.patch b/meta-webserver/recipes-httpd/apache2/files/httpd-2.4.3-fix-race-issue-of-dir-install.patch
new file mode 100644
index 000000000..b948753b4
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/httpd-2.4.3-fix-race-issue-of-dir-install.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Pending
2
3fix following race issue when do parallel install
4| mkdir: cannot create directory `/home/mypc/workspace/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl_networking-linux/apache2/2.4.3-r1/image/usr/share/apache2': File exists
5...
6| mkdir: cannot create directory `/home/mypc/workspace/poky/build_p4080ds_release/tmp/work/ppce500mc-fsl_networking-linux/apache2/2.4.3-r1/image/usr/share/apache2': File exists
7| make[1]: *** [install-man] Error 1
8| make[1]: *** Waiting for unfinished jobs....
9
10-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
11--- httpd-2.4.3/build/mkdir.sh.orig 2013-01-25 03:47:21.565255420 -0600
12+++ httpd-2.4.3/build/mkdir.sh 2013-01-25 03:46:17.833051230 -0600
13@@ -39,7 +39,7 @@
14 esac
15 if test ! -d "$pathcomp"; then
16 echo "mkdir $pathcomp" 1>&2
17- mkdir "$pathcomp" || errstatus=$?
18+ mkdir -p "$pathcomp" || errstatus=$?
19 fi
20 pathcomp="$pathcomp/"
21 done
diff --git a/meta-webserver/recipes-httpd/apache2/files/init b/meta-webserver/recipes-httpd/apache2/files/init
new file mode 100755
index 000000000..a1adbd74f
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/files/init
@@ -0,0 +1,73 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: httpd
4# Required-Start: $local_fs $remote_fs $network $named
5# Required-Stop: $local_fs $remote_fs $network
6# Should-Start: distcache
7# Short-Description: start and stop Apache HTTP Server
8# Description: The Apache HTTP Server is an extensible server
9# implementing the current HTTP standards.
10### END INIT INFO
11
12ARGS="-D SSL -D PHP5 -k start"
13NAME=apache2
14PATH=/bin:/usr/bin:/sbin:/usr/sbin
15DAEMON=/usr/sbin/httpd
16SUEXEC=/usr/lib/apache/suexec
17PIDFILE=/run/httpd.pid
18CONF=/etc/apache2/httpd.conf
19APACHECTL=/usr/sbin/apachectl
20
21trap "" 1
22export LANG=C
23export PATH
24
25test -f $DAEMON || exit 0
26test -f $APACHECTL || exit 0
27
28# ensure we don't leak environment vars into apachectl
29APACHECTL="env -i LANG=${LANG} PATH=${PATH} $APACHECTL"
30
31case "$1" in
32 start)
33 echo -n "Starting web server: $NAME"
34 $APACHECTL $ARGS
35 ;;
36
37 stop)
38 $APACHECTL stop
39 ;;
40
41 reload)
42 echo -n "Reloading $NAME configuration"
43 kill -HUP `cat $PIDFILE`
44 ;;
45
46 reload-modules)
47 echo -n "Reloading $NAME modules"
48 $APACHECTL restart
49 ;;
50
51 restart)
52 $APACHECTL restart
53 exit $?
54 ;;
55
56 force-reload)
57 $0 reload-modules
58 exit $?
59 ;;
60
61 *)
62 echo "Usage: /etc/init.d/$NAME {start|stop|reload|reload-modules|force-reload|restart}"
63 exit 1
64 ;;
65esac
66
67if [ $? = 0 ]; then
68 echo .
69 exit 0
70else
71 echo failed
72 exit 1
73fi