diff options
Diffstat (limited to 'meta-webserver/recipes-httpd/apache2/files')
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 @@ | |||
1 | From d8837756f2a48adcfe5d645c39cf163d96eac76c Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen.kooi@linaro.org> | ||
3 | Date: Tue, 17 Jun 2014 09:10:57 +0200 | ||
4 | Subject: [PATCH] configure: use pkg-config for PCRE detection | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen.kooi@linaro.org> | ||
7 | Upstream-Status: pending | ||
8 | --- | ||
9 | configure.in | 27 +++++---------------------- | ||
10 | 1 file changed, 5 insertions(+), 22 deletions(-) | ||
11 | |||
12 | diff --git a/configure.in b/configure.in | ||
13 | index 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 | -- | ||
51 | 1.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 @@ | |||
1 | d /var/run/apache2 0755 root root - | ||
2 | d /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] | ||
2 | Decription=The Apache HTTP Server | ||
3 | After=network.target remote-fs.target nss-lookup.target | ||
4 | |||
5 | [Service] | ||
6 | Type=simple | ||
7 | Environment=LANG=C | ||
8 | ExecStart=@SBINDIR@/httpd -DFOREGROUND -D SSL -D PHP5 -k start | ||
9 | ExecStop=@BASE_BINDIR@/kill -WINCH ${MAINPID} | ||
10 | KillSignal=SIGCONT | ||
11 | PrivateTmp=true | ||
12 | |||
13 | [Install] | ||
14 | WantedBy=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 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | fix 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 | |||
12 | ARGS="-D SSL -D PHP5 -k start" | ||
13 | NAME=apache2 | ||
14 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
15 | DAEMON=/usr/sbin/httpd | ||
16 | SUEXEC=/usr/lib/apache/suexec | ||
17 | PIDFILE=/run/httpd.pid | ||
18 | CONF=/etc/apache2/httpd.conf | ||
19 | APACHECTL=/usr/sbin/apachectl | ||
20 | |||
21 | trap "" 1 | ||
22 | export LANG=C | ||
23 | export PATH | ||
24 | |||
25 | test -f $DAEMON || exit 0 | ||
26 | test -f $APACHECTL || exit 0 | ||
27 | |||
28 | # ensure we don't leak environment vars into apachectl | ||
29 | APACHECTL="env -i LANG=${LANG} PATH=${PATH} $APACHECTL" | ||
30 | |||
31 | case "$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 | ;; | ||
65 | esac | ||
66 | |||
67 | if [ $? = 0 ]; then | ||
68 | echo . | ||
69 | exit 0 | ||
70 | else | ||
71 | echo failed | ||
72 | exit 1 | ||
73 | fi | ||