summaryrefslogtreecommitdiffstats
path: root/meta-webserver
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-webserver
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r--meta-webserver/COPYING.MIT17
-rw-r--r--meta-webserver/README54
-rw-r--r--meta-webserver/conf/layer.conf18
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb42
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch37
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch76
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch55
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-corelimit.patch37
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-selinux.patch63
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.4-export.patch22
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/npn-patch-2.4.7.patch289
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch52
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2/server-makefile.patch11
-rw-r--r--meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb142
-rw-r--r--meta-webserver/recipes-httpd/apache2/files/apache2-volatile.conf2
-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
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee/cherokee-install-configured.py-once.patch40
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.init32
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.service10
-rw-r--r--meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb67
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init44
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service16
-rw-r--r--meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb66
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch217
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf2
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/nginx.conf118
-rwxr-xr-xmeta-webserver/recipes-httpd/nginx/files/nginx.init52
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb117
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch141
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf55
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/nostromo34
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf1
-rw-r--r--meta-webserver/recipes-httpd/nostromo/files/volatiles2
-rw-r--r--meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb69
-rw-r--r--meta-webserver/recipes-httpd/sthttpd/sthttpd/init52
-rw-r--r--meta-webserver/recipes-httpd/sthttpd/sthttpd/thttpd.service10
-rw-r--r--meta-webserver/recipes-httpd/sthttpd/sthttpd_2.26.4.bb40
-rw-r--r--meta-webserver/recipes-php/modphp/files/70_mod_php5.conf12
-rw-r--r--meta-webserver/recipes-php/modphp/files/configure.patch11
-rw-r--r--meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch30
-rw-r--r--meta-webserver/recipes-php/modphp/modphp5.inc104
-rw-r--r--meta-webserver/recipes-php/modphp/modphp_5.5.10.bb7
-rw-r--r--meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf42
-rw-r--r--meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb31
-rw-r--r--meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb35
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch45
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch32
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch67
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch65
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch25
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/net-generic.patch21
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch19
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch39
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch18
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch29
-rw-r--r--meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch32
-rwxr-xr-xmeta-webserver/recipes-webadmin/webmin/files/setup.sh340
-rw-r--r--meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb139
59 files changed, 3339 insertions, 0 deletions
diff --git a/meta-webserver/COPYING.MIT b/meta-webserver/COPYING.MIT
new file mode 100644
index 0000000000..fb950dc69f
--- /dev/null
+++ b/meta-webserver/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/meta-webserver/README b/meta-webserver/README
new file mode 100644
index 0000000000..f3fe735558
--- /dev/null
+++ b/meta-webserver/README
@@ -0,0 +1,54 @@
1meta-webserver
2==============
3
4This layer provides support for building web servers, web-based
5applications and related software.
6
7
8
9Dependencies
10------------
11
12This layer depends on:
13
14URI: git://github.com/openembedded/oe-core.git
15subdirectory: meta
16branch: master
17revision: HEAD
18
19For some recipes, the meta-oe layer is required:
20
21URI: git://github.com/openembedded/meta-oe.git
22subdirectory: meta-oe
23branch: master
24revision: HEAD
25
26
27
28Layout
29------
30
31recipes-httpd/ Web servers
32recipes-php/ PHP and PHP applications
33recipes-webadmin/ Standalone web administration interfaces
34
35
36
37Maintenance
38-----------
39
40Send patches / pull requests to openembedded-devel@lists.openembedded.org
41with '[meta-webserver]' in the subject.
42
43Layer maintainer: Paul Eggleton <paul.eggleton@linux.intel.com>
44
45
46License
47-------
48
49All metadata is MIT licensed unless otherwise stated. Source code included
50in tree for individual recipes is under the LICENSE stated in each recipe
51(.bb file) unless otherwise stated.
52
53This README document is Copyright (C) 2012 Intel Corporation.
54
diff --git a/meta-webserver/conf/layer.conf b/meta-webserver/conf/layer.conf
new file mode 100644
index 0000000000..d887b679b8
--- /dev/null
+++ b/meta-webserver/conf/layer.conf
@@ -0,0 +1,18 @@
1# Layer configuration for meta-webserver layer
2# Copyright 2012 Intel Corporation
3
4# We have a conf and classes directory, add to BBPATH
5BBPATH .= ":${LAYERDIR}"
6
7# We have various recipe-* directories, add to BBFILES
8BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
9
10BBFILE_COLLECTIONS += "webserver"
11BBFILE_PATTERN_webserver := "^${LAYERDIR}/"
12BBFILE_PRIORITY_webserver = "6"
13
14# This should only be incremented on significant changes that will
15# cause compatibility issues with other layers
16LAYERVERSION_webserver = "1"
17
18LAYERDEPENDS_webserver = "core"
diff --git a/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
new file mode 100644
index 0000000000..aaa7e607d6
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2-native_2.4.9.bb
@@ -0,0 +1,42 @@
1DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
2extensible web server."
3SUMMARY = "Apache HTTP Server"
4HOMEPAGE = "http://httpd.apache.org/"
5DEPENDS = "expat-native pcre-native apr-native apr-util-native"
6SECTION = "net"
7LICENSE = "Apache-2.0"
8
9inherit native
10
11SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2"
12
13S = "${WORKDIR}/httpd-${PV}"
14
15LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
16SRC_URI[md5sum] = "2ef4e65353497606b24fa9bb3e5a3c40"
17SRC_URI[sha256sum] = "f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603"
18
19do_configure () {
20 ./configure --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
21 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
22 --prefix=${prefix} --datadir=${datadir}/apache2
23}
24
25do_install () {
26 install -d ${D}${bindir} ${D}${libdir}
27 cp server/gen_test_char ${D}${bindir}
28 install -m 755 support/apxs ${D}${bindir}/
29 install -m 755 httpd ${D}${bindir}/
30 install -d ${D}${datadir}/apache2/build
31 cp build/*.mk ${D}${datadir}/apache2/build
32 cp build/instdso.sh ${D}${datadir}/apache2/build
33
34 install -d ${D}${includedir}/apache2
35 cp include/* ${D}${includedir}/apache2
36 cp os/unix/os.h ${D}${includedir}/apache2
37 cp os/unix/unixd.h ${D}${includedir}/apache2
38
39 cp support/envvars-std ${D}${bindir}/envvars
40 chmod 755 ${D}${bindir}/envvars
41}
42
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch b/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
new file mode 100644
index 0000000000..baa739fd44
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/apache-configure_perlbin.patch
@@ -0,0 +1,37 @@
1# Author: echo <fei.geng@windriver.com>
2# Date: April 28 2009
3# Summary:Fix perl install directory to /usr/bin
4#
5# Upstream-Status: Inappropriate [configuration]
6
7--- a/configure
8+++ b/configure
9@@ -22365,13 +22365,7 @@
10 #define APACHE_MPM_DIR "$MPM_DIR"
11 _ACEOF
12
13-
14-perlbin=`$ac_aux_dir/PrintPath perl`
15-if test "x$perlbin" = "x"; then
16- perlbin="/replace/with/path/to/perl/interpreter"
17-fi
18-
19-
20+perlbin='/usr/bin/perl'
21
22 BSD_MAKEFILE=no
23 ap_make_include=include
24--- a/configure.in
25+++ b/configure.in
26@@ -638,10 +638,7 @@
27 AC_DEFINE_UNQUOTED(APACHE_MPM_DIR, "$MPM_DIR",
28 [Location of the source for the current MPM])
29
30-perlbin=`$ac_aux_dir/PrintPath perl`
31-if test "x$perlbin" = "x"; then
32- perlbin="/replace/with/path/to/perl/interpreter"
33-fi
34+perlbin='/usr/bin/perl'
35 AC_SUBST(perlbin)
36
37 dnl If we are running on BSD/OS, we need to use the BSD .include syntax.
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch b/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch
new file mode 100644
index 0000000000..3a59fb0799
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/apache-ssl-ltmain-rpath.patch
@@ -0,0 +1,76 @@
1--- httpd-2.2.8.orig/build/ltmain.sh
2+++ httpd-2.2.8/build/ltmain.sh
3@@ -1515,7 +1515,7 @@ EOF
4 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
5 # We need an absolute path.
6 case $dir in
7- [\\/]* | [A-Za-z]:[\\/]*) ;;
8+ =* | [\\/]* | [A-Za-z]:[\\/]*) ;;
9 *)
10 absdir=`cd "$dir" && pwd`
11 if test -z "$absdir"; then
12@@ -2558,7 +2558,7 @@ EOF
13 $echo "*** $linklib is not portable!"
14 fi
15 if test "$linkmode" = lib &&
16- test "$hardcode_into_libs" = yes; then
17+ test "x$wrs_use_rpaths" = "xyes" && test "$hardcode_into_libs" = yes; then
18 # Hardcode the library path.
19 # Skip directories that are in the system default run-time
20 # search path.
21@@ -2832,7 +2832,7 @@ EOF
22
23 if test "$linkmode" = lib; then
24 if test -n "$dependency_libs" &&
25- { test "$hardcode_into_libs" != yes ||
26+ { test "$hardcode_into_libs" != yes || test "x$wrs_use_rpaths" != "xyes" ||
27 test "$build_old_libs" = yes ||
28 test "$link_static" = yes; }; then
29 # Extract -R from dependency_libs
30@@ -3426,7 +3426,8 @@ EOF
31 *) finalize_rpath="$finalize_rpath $libdir" ;;
32 esac
33 done
34- if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
35+ if test "$hardcode_into_libs" != yes || test "x$wrs_use_rpaths" != "xyes" ||
36+ test "$build_old_libs" = yes; then
37 dependency_libs="$temp_xrpath $dependency_libs"
38 fi
39 fi
40@@ -3843,7 +3844,7 @@ EOF
41 case $archive_cmds in
42 *\$LD\ *) wl= ;;
43 esac
44- if test "$hardcode_into_libs" = yes; then
45+ if test "$hardcode_into_libs" = yes && test "x$wrs_use_rpaths" = "xyes" ; then
46 # Hardcode the library paths
47 hardcode_libdirs=
48 dep_rpath=
49@@ -4397,6 +4398,27 @@ EOF
50 # Now hardcode the library paths
51 rpath=
52 hardcode_libdirs=
53+
54+ # short circuit putting rpaths in executables
55+ #
56+ if test "x$wrs_use_rpaths" != "xyes" ; then
57+ flag=
58+ for libdir in $compile_rpath; do
59+ case $(echo $libdir | ${SED} 's,/[/]*,/,g') in
60+ /usr/lib/* | /usr/lib32/* | /usr/lib64/* ) flag="$flag $libdir" ;;
61+ esac
62+ done
63+ compile_rpath="$flag"
64+
65+ flag=
66+ for libdir in $finalize_rpath; do
67+ case $(echo $libdir | ${SED} 's,/[/]*,/,g') in
68+ /usr/lib/* | /usr/lib32/* | /usr/lib64/* ) flag="$flag $libdir" ;;
69+ esac
70+ done
71+ finalize_rpath="$flag"
72+ fi
73+
74 for libdir in $compile_rpath $finalize_rpath; do
75 if test -n "$hardcode_libdir_flag_spec"; then
76 if test -n "$hardcode_libdir_separator"; then
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch b/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch
new file mode 100644
index 0000000000..027af04c3b
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/fix-libtool-name.patch
@@ -0,0 +1,55 @@
1Fix build scripts to use correct libtool filename
2
3Upstream-Status: Inappropriate [configuration]
4
5---
6 httpd-2.4.2/build/config_vars.sh.in | 2 +-
7 httpd-2.4.2/configure | 2 +-
8 httpd-2.4.2/configure.in | 2 +-
9 httpd-2.4.2/support/apxs.in | 2 +-
10 4 files changed, 4 insertions(+), 4 deletions(-)
11
12--- a/build/config_vars.sh.in
13+++ b/build/config_vars.sh.in
14@@ -35,7 +35,7 @@ else
15 APU_CONFIG=@APU_CONFIG@
16 fi
17
18-APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
19+APR_LIBTOOL="`${APR_CONFIG} --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`"
20 APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
21 test -n "@APU_CONFIG@" && APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
22
23--- a/configure
24+++ b/configure
25@@ -6205,7 +6205,7 @@ case $host in
26 if test "x$LTFLAGS" = "x"; then
27 LTFLAGS='--silent'
28 fi
29- my_libtool=`$apr_config --apr-libtool`
30+ my_libtool=`$apr_config --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`
31 LIBTOOL="$my_libtool \$(LTFLAGS)"
32 libtoolversion=`$my_libtool --version`
33 case $libtoolversion in
34--- a/configure.in
35+++ b/configure.in
36@@ -264,7 +264,7 @@ case $host in
37 if test "x$LTFLAGS" = "x"; then
38 LTFLAGS='--silent'
39 fi
40- my_libtool=`$apr_config --apr-libtool`
41+ my_libtool=`$apr_config --apr-libtool | sed -e s,libtool,${host_alias}-libtool,`
42 LIBTOOL="$my_libtool \$(LTFLAGS)"
43 libtoolversion=`$my_libtool --version`
44 case $libtoolversion in
45--- a/support/apxs.in
46+++ b/support/apxs.in
47@@ -352,7 +352,7 @@ if ($apr_major_version < 2) {
48 }
49 }
50
51-my $libtool = `$apr_config --apr-libtool`;
52+my $libtool = `$apr_config --apr-libtool| sed -e s,libtool,${host_alias}-libtool,`;
53 chomp($libtool);
54
55 my $apr_includedir = `$apr_config --includes`;
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-corelimit.patch b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-corelimit.patch
new file mode 100644
index 0000000000..18e4107ec7
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-corelimit.patch
@@ -0,0 +1,37 @@
1
2Bump up the core size limit if CoreDumpDirectory is
3configured.
4
5Upstream-Status: Pending
6
7Note: upstreaming was discussed but there are competing desires;
8 there are portability oddities here too.
9
10--- httpd-2.4.1/server/core.c.corelimit
11+++ httpd-2.4.1/server/core.c
12@@ -4433,6 +4433,25 @@ static int core_post_config(apr_pool_t *
13 }
14 apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
15 apr_pool_cleanup_null);
16+
17+#ifdef RLIMIT_CORE
18+ if (ap_coredumpdir_configured) {
19+ struct rlimit lim;
20+
21+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
22+ lim.rlim_cur = lim.rlim_max;
23+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
24+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
25+ "core dump file size limit raised to %lu bytes",
26+ lim.rlim_cur);
27+ } else {
28+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
29+ "core dump file size is zero, setrlimit failed");
30+ }
31+ }
32+ }
33+#endif
34+
35 return OK;
36 }
37
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-selinux.patch b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-selinux.patch
new file mode 100644
index 0000000000..873328d9b5
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.1-selinux.patch
@@ -0,0 +1,63 @@
1
2Log the SELinux context at startup.
3
4Upstream-Status: Inappropriate [other]
5
6Note: unlikely to be any interest in this upstream
7
8--- httpd-2.4.1/configure.in.selinux
9+++ httpd-2.4.1/configure.in
10@@ -458,6 +458,11 @@ fopen64
11 dnl confirm that a void pointer is large enough to store a long integer
12 APACHE_CHECK_VOID_PTR_LEN
13
14+AC_CHECK_LIB(selinux, is_selinux_enabled, [
15+ AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
16+ APR_ADDTO(AP_LIBS, [-lselinux])
17+])
18+
19 AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
20 [AC_TRY_RUN(#define _GNU_SOURCE
21 #include <unistd.h>
22--- httpd-2.4.1/server/core.c.selinux
23+++ httpd-2.4.1/server/core.c
24@@ -58,6 +58,10 @@
25 #include <unistd.h>
26 #endif
27
28+#ifdef HAVE_SELINUX
29+#include <selinux/selinux.h>
30+#endif
31+
32 /* LimitRequestBody handling */
33 #define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1)
34 #define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 0)
35@@ -4452,6 +4456,28 @@ static int core_post_config(apr_pool_t *
36 }
37 #endif
38
39+#ifdef HAVE_SELINUX
40+ {
41+ static int already_warned = 0;
42+ int is_enabled = is_selinux_enabled() > 0;
43+
44+ if (is_enabled && !already_warned) {
45+ security_context_t con;
46+
47+ if (getcon(&con) == 0) {
48+
49+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
50+ "SELinux policy enabled; "
51+ "httpd running as context %s", con);
52+
53+ already_warned = 1;
54+
55+ freecon(con);
56+ }
57+ }
58+ }
59+#endif
60+
61 return OK;
62 }
63
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.4-export.patch b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.4-export.patch
new file mode 100644
index 0000000000..afbed8e550
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/httpd-2.4.4-export.patch
@@ -0,0 +1,22 @@
1
2There is no need to "suck in" the apr/apr-util symbols when using
3a shared libapr{,util}, it just bloats the symbol table; so don't.
4
5Upstream-HEAD: needed
6Upstream-2.0: omit
7Upstream-Status: Pending
8
9Note: EXPORT_DIRS change is conditional on using shared apr
10
11--- httpd-2.4.4/server/Makefile.in.export
12+++ httpd-2.4.4/server/Makefile.in
13@@ -57,9 +57,6 @@ export_files:
14 ( for dir in $(EXPORT_DIRS); do \
15 ls $$dir/*.h ; \
16 done; \
17- for dir in $(EXPORT_DIRS_APR); do \
18- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
19- done; \
20 ) | sed -e s,//,/,g | sort -u > $@
21
22 exports.c: export_files
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/npn-patch-2.4.7.patch b/meta-webserver/recipes-httpd/apache2/apache2/npn-patch-2.4.7.patch
new file mode 100644
index 0000000000..a4f185501b
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/npn-patch-2.4.7.patch
@@ -0,0 +1,289 @@
1Add support for TLS Next Protocol Negotiation:
2
3* modules/ssl/mod_ssl.c, modules/ssl/mod_ssl.h: Add and implement new
4 hooks for next protocol advertisement/discovery.
5
6* modules/ssl/ssl_engine_init.c (ssl_init_ctx_callbacks): Enable
7 NPN advertisement callback in handshake.
8
9* modules/ssl/ssl_engine_io.c (ssl_io_filter_input): Invoke
10 next-protocol discovery hook.
11
12* modules/ssl/ssl_engine_kernel.c (ssl_callback_AdvertiseNextProtos):
13 New callback.
14
15* modules/ssl/ssl_private.h: Add prototype.
16
17Submitted by: Matthew Steele <mdsteele google.com>
18 with slight tweaks by jorton
19
20http://svn.apache.org/viewvc?view=revision&revision=1332643
21https://bugzilla.redhat.com//show_bug.cgi?id=809599
22Upstream-Status: Backport
23Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24---
25 CHANGES | 2 +
26 modules/ssl/mod_ssl.c | 12 ++++++
27 modules/ssl/mod_ssl.h | 21 +++++++++++
28 modules/ssl/ssl_engine_init.c | 5 +++
29 modules/ssl/ssl_engine_io.c | 24 ++++++++++++
30 modules/ssl/ssl_engine_kernel.c | 82 +++++++++++++++++++++++++++++++++++++++++
31 modules/ssl/ssl_private.h | 6 +++
32 7 files changed, 152 insertions(+)
33
34diff --git a/CHANGES b/CHANGES
35--- a/CHANGES
36+++ b/CHANGES
37@@ -1,6 +1,8 @@
38 -*- coding: utf-8 -*-
39
40 Changes with Apache 2.4.7
41+ *) mod_ssl: Add support for TLS Next Protocol Negotiation. PR 52210.
42+ [Matthew Steele <mdsteele google.com>]
43
44 *) APR 1.5.0 or later is now required for the event MPM.
45
46diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
47--- a/modules/ssl/mod_ssl.c
48+++ b/modules/ssl/mod_ssl.c
49@@ -275,6 +275,18 @@ static const command_rec ssl_config_cmds[] = {
50 AP_END_CMD
51 };
52
53+/* Implement 'modssl_run_npn_advertise_protos_hook'. */
54+APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(
55+ modssl, AP, int, npn_advertise_protos_hook,
56+ (conn_rec *connection, apr_array_header_t *protos),
57+ (connection, protos), OK, DECLINED);
58+
59+/* Implement 'modssl_run_npn_proto_negotiated_hook'. */
60+APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(
61+ modssl, AP, int, npn_proto_negotiated_hook,
62+ (conn_rec *connection, const char *proto_name, apr_size_t proto_name_len),
63+ (connection, proto_name, proto_name_len), OK, DECLINED);
64+
65 /*
66 * the various processing hooks
67 */
68diff --git a/modules/ssl/mod_ssl.h b/modules/ssl/mod_ssl.h
69--- a/modules/ssl/mod_ssl.h
70+++ b/modules/ssl/mod_ssl.h
71@@ -63,5 +63,26 @@ APR_DECLARE_OPTIONAL_FN(int, ssl_proxy_enable, (conn_rec *));
72
73 APR_DECLARE_OPTIONAL_FN(int, ssl_engine_disable, (conn_rec *));
74
75+/** The npn_advertise_protos optional hook allows other modules to add entries
76+ * to the list of protocol names advertised by the server during the Next
77+ * Protocol Negotiation (NPN) portion of the SSL handshake. The hook callee is
78+ * given the connection and an APR array; it should push one or more char*'s
79+ * pointing to null-terminated strings (such as "http/1.1" or "spdy/2") onto
80+ * the array and return OK, or do nothing and return DECLINED. */
81+APR_DECLARE_EXTERNAL_HOOK(modssl, AP, int, npn_advertise_protos_hook,
82+ (conn_rec *connection, apr_array_header_t *protos));
83+
84+/** The npn_proto_negotiated optional hook allows other modules to discover the
85+ * name of the protocol that was chosen during the Next Protocol Negotiation
86+ * (NPN) portion of the SSL handshake. Note that this may be the empty string
87+ * (in which case modules should probably assume HTTP), or it may be a protocol
88+ * that was never even advertised by the server. The hook callee is given the
89+ * connection, a non-null-terminated string containing the protocol name, and
90+ * the length of the string; it should do something appropriate (i.e. insert or
91+ * remove filters) and return OK, or do nothing and return DECLINED. */
92+APR_DECLARE_EXTERNAL_HOOK(modssl, AP, int, npn_proto_negotiated_hook,
93+ (conn_rec *connection, const char *proto_name,
94+ apr_size_t proto_name_len));
95+
96 #endif /* __MOD_SSL_H__ */
97 /** @} */
98diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
99--- a/modules/ssl/ssl_engine_init.c
100+++ b/modules/ssl/ssl_engine_init.c
101@@ -546,6 +546,11 @@ static void ssl_init_ctx_callbacks(server_rec *s,
102 SSL_CTX_set_tmp_dh_callback(ctx, ssl_callback_TmpDH);
103
104 SSL_CTX_set_info_callback(ctx, ssl_callback_Info);
105+
106+#ifdef HAVE_TLS_NPN
107+ SSL_CTX_set_next_protos_advertised_cb(
108+ ctx, ssl_callback_AdvertiseNextProtos, NULL);
109+#endif
110 }
111
112 static void ssl_init_ctx_verify(server_rec *s,
113diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
114--- a/modules/ssl/ssl_engine_io.c
115+++ b/modules/ssl/ssl_engine_io.c
116@@ -28,6 +28,7 @@
117 core keeps dumping.''
118 -- Unknown */
119 #include "ssl_private.h"
120+#include "mod_ssl.h"
121 #include "apr_date.h"
122
123 /* _________________________________________________________________
124@@ -297,6 +298,7 @@ typedef struct {
125 apr_pool_t *pool;
126 char buffer[AP_IOBUFSIZE];
127 ssl_filter_ctx_t *filter_ctx;
128+ int npn_finished; /* 1 if NPN has finished, 0 otherwise */
129 } bio_filter_in_ctx_t;
130
131 /*
132@@ -1412,6 +1414,27 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
133 APR_BRIGADE_INSERT_TAIL(bb, bucket);
134 }
135
136+#ifdef HAVE_TLS_NPN
137+ /* By this point, Next Protocol Negotiation (NPN) should be completed (if
138+ * our version of OpenSSL supports it). If we haven't already, find out
139+ * which protocol was decided upon and inform other modules by calling
140+ * npn_proto_negotiated_hook. */
141+ if (!inctx->npn_finished) {
142+ const unsigned char *next_proto = NULL;
143+ unsigned next_proto_len = 0;
144+
145+ SSL_get0_next_proto_negotiated(
146+ inctx->ssl, &next_proto, &next_proto_len);
147+ ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, f->c,
148+ "SSL NPN negotiated protocol: '%s'",
149+ apr_pstrmemdup(f->c->pool, (const char*)next_proto,
150+ next_proto_len));
151+ modssl_run_npn_proto_negotiated_hook(
152+ f->c, (const char*)next_proto, next_proto_len);
153+ inctx->npn_finished = 1;
154+ }
155+#endif
156+
157 return APR_SUCCESS;
158 }
159
160@@ -1893,6 +1916,7 @@ static void ssl_io_input_add_filter(ssl_filter_ctx_t *filter_ctx, conn_rec *c,
161 inctx->block = APR_BLOCK_READ;
162 inctx->pool = c->pool;
163 inctx->filter_ctx = filter_ctx;
164+ inctx->npn_finished = 0;
165 }
166
167 /* The request_rec pointer is passed in here only to ensure that the
168diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
169--- a/modules/ssl/ssl_engine_kernel.c
170+++ b/modules/ssl/ssl_engine_kernel.c
171@@ -29,6 +29,7 @@
172 time I was too famous.''
173 -- Unknown */
174 #include "ssl_private.h"
175+#include "mod_ssl.h"
176 #include "util_md5.h"
177
178 static void ssl_configure_env(request_rec *r, SSLConnRec *sslconn);
179@@ -2139,3 +2140,84 @@ int ssl_callback_SRPServerParams(SSL *ssl, int *ad, void *arg)
180 }
181
182 #endif /* HAVE_SRP */
183+
184+#ifdef HAVE_TLS_NPN
185+/*
186+ * This callback function is executed when SSL needs to decide what protocols
187+ * to advertise during Next Protocol Negotiation (NPN). It must produce a
188+ * string in wire format -- a sequence of length-prefixed strings -- indicating
189+ * the advertised protocols. Refer to SSL_CTX_set_next_protos_advertised_cb
190+ * in OpenSSL for reference.
191+ */
192+int ssl_callback_AdvertiseNextProtos(SSL *ssl, const unsigned char **data_out,
193+ unsigned int *size_out, void *arg)
194+{
195+ conn_rec *c = (conn_rec*)SSL_get_app_data(ssl);
196+ apr_array_header_t *protos;
197+ int num_protos;
198+ unsigned int size;
199+ int i;
200+ unsigned char *data;
201+ unsigned char *start;
202+
203+ *data_out = NULL;
204+ *size_out = 0;
205+
206+ /* If the connection object is not available, then there's nothing for us
207+ * to do. */
208+ if (c == NULL) {
209+ return SSL_TLSEXT_ERR_OK;
210+ }
211+
212+ /* Invoke our npn_advertise_protos hook, giving other modules a chance to
213+ * add alternate protocol names to advertise. */
214+ protos = apr_array_make(c->pool, 0, sizeof(char*));
215+ modssl_run_npn_advertise_protos_hook(c, protos);
216+ num_protos = protos->nelts;
217+
218+ /* We now have a list of null-terminated strings; we need to concatenate
219+ * them together into a single string, where each protocol name is prefixed
220+ * by its length. First, calculate how long that string will be. */
221+ size = 0;
222+ for (i = 0; i < num_protos; ++i) {
223+ const char *string = APR_ARRAY_IDX(protos, i, const char*);
224+ unsigned int length = strlen(string);
225+ /* If the protocol name is too long (the length must fit in one byte),
226+ * then log an error and skip it. */
227+ if (length > 255) {
228+ ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
229+ "SSL NPN protocol name too long (length=%u): %s",
230+ length, string);
231+ continue;
232+ }
233+ /* Leave room for the length prefix (one byte) plus the protocol name
234+ * itself. */
235+ size += 1 + length;
236+ }
237+
238+ /* If there is nothing to advertise (either because no modules added
239+ * anything to the protos array, or because all strings added to the array
240+ * were skipped), then we're done. */
241+ if (size == 0) {
242+ return SSL_TLSEXT_ERR_OK;
243+ }
244+
245+ /* Now we can build the string. Copy each protocol name string into the
246+ * larger string, prefixed by its length. */
247+ data = apr_palloc(c->pool, size * sizeof(unsigned char));
248+ start = data;
249+ for (i = 0; i < num_protos; ++i) {
250+ const char *string = APR_ARRAY_IDX(protos, i, const char*);
251+ apr_size_t length = strlen(string);
252+ *start = (unsigned char)length;
253+ ++start;
254+ memcpy(start, string, length * sizeof(unsigned char));
255+ start += length;
256+ }
257+
258+ /* Success. */
259+ *data_out = data;
260+ *size_out = size;
261+ return SSL_TLSEXT_ERR_OK;
262+}
263+#endif /* HAVE_TLS_NPN */
264diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h
265--- a/modules/ssl/ssl_private.h
266+++ b/modules/ssl/ssl_private.h
267@@ -123,6 +123,11 @@
268 #define MODSSL_SSL_METHOD_CONST
269 #endif
270
271+#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_NEXTPROTONEG) \
272+ && !defined(OPENSSL_NO_TLSEXT)
273+#define HAVE_TLS_NPN
274+#endif
275+
276 #if defined(OPENSSL_FIPS)
277 #define HAVE_FIPS
278 #endif
279@@ -800,6 +805,7 @@ int ssl_callback_ServerNameIndication(SSL *, int *, modssl_ctx_t *);
280 int ssl_callback_SessionTicket(SSL *, unsigned char *, unsigned char *,
281 EVP_CIPHER_CTX *, HMAC_CTX *, int);
282 #endif
283+int ssl_callback_AdvertiseNextProtos(SSL *ssl, const unsigned char **data, unsigned int *len, void *arg);
284
285 /** Session Cache Support */
286 void ssl_scache_init(server_rec *, apr_pool_t *);
287--
2881.8.1.2
289
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch b/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch
new file mode 100644
index 0000000000..584ddc8d94
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/replace-lynx-to-curl-in-apachectl-script.patch
@@ -0,0 +1,52 @@
1From 760ccbb2fb046621a2aeaecabb2b1ef9aa280cf1 Mon Sep 17 00:00:00 2001
2From: Yulong Pei <Yulong.pei@windriver.com>
3Date: Thu, 1 Sep 2011 01:03:14 +0800
4Subject: [PATCH] replace lynx to curl in apachectl script
5
6Upstream-Status: Inappropriate [configuration]
7
8Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
9---
10 support/apachectl.in | 14 ++++++++++----
11 1 files changed, 10 insertions(+), 4 deletions(-)
12
13diff --git a/support/apachectl.in b/support/apachectl.in
14index d4dff38..109ea13 100644
15--- a/support/apachectl.in
16+++ b/support/apachectl.in
17@@ -51,11 +51,11 @@ fi
18 # a command that outputs a formatted text version of the HTML at the
19 # url given on the command line. Designed for lynx, however other
20 # programs may work.
21-LYNX="@LYNX_PATH@ -dump"
22+CURL="/usr/bin/curl"
23 #
24 # the URL to your server's mod_status status page. If you do not
25 # have one, then status and fullstatus will not work.
26-STATUSURL="http://localhost:@PORT@/server-status"
27+STATUSURL="http://localhost:@PORT@/"
28 #
29 # Set this variable to a command that increases the maximum
30 # number of file descriptors allowed per child process. This is
31@@ -91,10 +91,16 @@ configtest)
32 ERROR=$?
33 ;;
34 status)
35- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
36+ $CURL -s $STATUSURL | grep -o "It works!"
37+ if [ $? != 0 ] ; then
38+ echo The httpd server does not work!
39+ fi
40 ;;
41 fullstatus)
42- $LYNX $STATUSURL
43+ $CURL -s $STATUSURL | grep -o "It works!"
44+ if [ $? != 0 ] ; then
45+ echo The httpd server does not work!
46+ fi
47 ;;
48 *)
49 $HTTPD $ARGV
50--
511.6.4
52
diff --git a/meta-webserver/recipes-httpd/apache2/apache2/server-makefile.patch b/meta-webserver/recipes-httpd/apache2/apache2/server-makefile.patch
new file mode 100644
index 0000000000..f1349cb6a4
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2/server-makefile.patch
@@ -0,0 +1,11 @@
1--- http-2.0.54/server/Makefile.in-old 2005-12-20 13:26:56.000000000 -0500
2+++ http-2.0.54/server/Makefile.in 2005-12-20 13:27:22.000000000 -0500
3@@ -27,7 +27,7 @@
4 $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
5
6 test_char.h: gen_test_char
7- ./gen_test_char > test_char.h
8+ gen_test_char > test_char.h
9
10 util.lo: test_char.h
11
diff --git a/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb b/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
new file mode 100644
index 0000000000..33e197ab8a
--- /dev/null
+++ b/meta-webserver/recipes-httpd/apache2/apache2_2.4.9.bb
@@ -0,0 +1,142 @@
1DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
2extensible web server."
3SUMMARY = "Apache HTTP Server"
4HOMEPAGE = "http://httpd.apache.org/"
5DEPENDS = "libtool-native apache2-native openssl expat pcre apr apr-util"
6SECTION = "net"
7LICENSE = "Apache-2.0"
8
9SRC_URI = "http://www.apache.org/dist/httpd/httpd-${PV}.tar.bz2 \
10 file://server-makefile.patch \
11 file://httpd-2.4.1-corelimit.patch \
12 file://httpd-2.4.4-export.patch \
13 file://httpd-2.4.1-selinux.patch \
14 file://apache-configure_perlbin.patch \
15 file://replace-lynx-to-curl-in-apachectl-script.patch \
16 file://apache-ssl-ltmain-rpath.patch \
17 file://httpd-2.4.3-fix-race-issue-of-dir-install.patch \
18 file://npn-patch-2.4.7.patch \
19 file://init \
20 file://apache2-volatile.conf"
21
22LIC_FILES_CHKSUM = "file://LICENSE;md5=dbff5a2b542fa58854455bf1a0b94b83"
23SRC_URI[md5sum] = "2ef4e65353497606b24fa9bb3e5a3c40"
24SRC_URI[sha256sum] = "f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603"
25
26S = "${WORKDIR}/httpd-${PV}"
27
28inherit autotools update-rc.d
29
30SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
31
32CFLAGS_append = " -DPATH_MAX=4096"
33CFLAGS_prepend = "-I${STAGING_INCDIR}/openssl "
34EXTRA_OECONF = "--enable-ssl \
35 --with-ssl=${STAGING_LIBDIR}/.. \
36 --with-expat=${STAGING_LIBDIR}/.. \
37 --with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
38 --with-apr-util=${STAGING_BINDIR_CROSS}/apu-1-config \
39 --enable-info \
40 --enable-rewrite \
41 --with-dbm=sdbm \
42 --with-berkeley-db=no \
43 --localstatedir=/var/${BPN} \
44 --with-gdbm=no \
45 --with-ndbm=no \
46 --includedir=${includedir}/${BPN} \
47 --datadir=${datadir}/${BPN} \
48 --sysconfdir=${sysconfdir}/${BPN} \
49 --libexecdir=${libdir}/${BPN}/modules \
50 ap_cv_void_ptr_lt_long=no \
51 --enable-mpms-shared \
52 ac_cv_have_threadsafe_pollset=no"
53
54do_install_append() {
55 install -d ${D}/${sysconfdir}/init.d
56 cat ${WORKDIR}/init | \
57 sed -e 's,/usr/sbin/,${sbindir}/,g' \
58 -e 's,/usr/bin/,${bindir}/,g' \
59 -e 's,/usr/lib,${libdir}/,g' \
60 -e 's,/etc/,${sysconfdir}/,g' \
61 -e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
62 chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
63 # remove the goofy original files...
64 rm -rf ${D}/${sysconfdir}/${BPN}/original
65 # Expat should be found in the staging area via DEPENDS...
66 rm -f ${D}/${libdir}/libexpat.*
67
68 install -d ${D}${sysconfdir}/${BPN}/conf.d
69 install -d ${D}${sysconfdir}/${BPN}/modules.d
70
71 # Ensure configuration file pulls in conf.d and modules.d
72 printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
73 printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
74 # match with that is in init script
75 printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
76 # Set 'ServerName' to fix error messages when restart apache service
77 sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
78
79 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
80 install -d ${D}${sysconfdir}/tmpfiles.d/
81 install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
82 fi
83}
84
85SYSROOT_PREPROCESS_FUNCS += "apache_sysroot_preprocess"
86
87apache_sysroot_preprocess () {
88 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
89 install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}/
90 sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
91 sed -i 's!my $libtool = .*!my $libtool = "${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
92
93 sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
94 sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
95 sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
96}
97
98#
99# implications - used by update-rc.d scripts
100#
101INITSCRIPT_NAME = "apache2"
102INITSCRIPT_PARAMS = "defaults 91 20"
103LEAD_SONAME = "libapr-1.so.0"
104
105PACKAGES = "${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
106
107CONFFILES_${PN} = "${sysconfdir}/${BPN}/httpd.conf \
108 ${sysconfdir}/${BPN}/magic \
109 ${sysconfdir}/${BPN}/mime.types \
110 ${sysconfdir}/init.d/${BPN} "
111
112# we override here rather than append so that .so links are
113# included in the runtime package rather than here (-dev)
114# and to get build, icons, error into the -dev package
115FILES_${PN}-dev = "${datadir}/${BPN}/build \
116 ${datadir}/${BPN}/icons \
117 ${datadir}/${BPN}/error \
118 ${bindir}/apr-config ${bindir}/apu-config \
119 ${libdir}/apr*.exp \
120 ${includedir}/${BPN} \
121 ${libdir}/*.la \
122 ${libdir}/*.a"
123
124# manual to manual
125FILES_${PN}-doc += " ${datadir}/${BPN}/manual"
126
127#
128# override this too - here is the default, less datadir
129#
130FILES_${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir}/lib*.so.* ${sysconfdir} \
131 ${sharedstatedir} ${localstatedir} /bin /sbin /lib/*.so* \
132 ${libdir}/${BPN}"
133
134# we want htdocs and cgi-bin to go with the binary
135FILES_${PN} += "${datadir}/${BPN}/htdocs ${datadir}/${BPN}/cgi-bin"
136
137#make sure the lone .so links also get wrapped in the base package
138FILES_${PN} += "${libdir}/lib*.so ${libdir}/pkgconfig/*"
139
140FILES_${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
141
142RDEPENDS_${PN} += "openssl libgcc"
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 0000000000..ff2c587046
--- /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/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 0000000000..b948753b48
--- /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 0000000000..a1adbd74f9
--- /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
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee-install-configured.py-once.patch b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee-install-configured.py-once.patch
new file mode 100644
index 0000000000..3336f7df79
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee-install-configured.py-once.patch
@@ -0,0 +1,40 @@
1From 98a0f19df0a31d5649ad89d395fd1b8de5591827 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 3 Apr 2014 21:33:25 +0800
4Subject: [PATCH] admin/Makefile.am: only install configured.py once
5
6Both the two rules install-adminpyDATA and install-generatedDATA will
7install the configured.py to the same location, they can run parallel,
8and they use "install -m", which would might build failures:
9
10/usr/bin/install: setting permissions for `/path/to/configured.py': No such file or directory
11
12This is because the first install is setting the permission while the
13second install is removing the file an re-install.
14
15Only install the configured.py once will fix the problem, I think that
16there is no side effect since it installed the same file to the same
17location twice in the past.
18
19Upstream-Status: Pending
20
21Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
22---
23 admin/Makefile.am | 1 -
24 1 file changed, 1 deletion(-)
25
26diff --git a/admin/Makefile.am b/admin/Makefile.am
27index ce5937b..6f96934 100644
28--- a/admin/Makefile.am
29+++ b/admin/Makefile.am
30@@ -73,7 +73,6 @@ SystemStatsWidgets.py \
31 Wizard.py \
32 XMLServerDigest.py \
33 config_version.py \
34-configured.py \
35 consts.py \
36 util.py \
37 popen.py \
38--
391.8.2.1
40
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.init b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.init
new file mode 100644
index 0000000000..93603b84db
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.init
@@ -0,0 +1,32 @@
1#!/bin/sh
2DAEMON=/usr/sbin/cherokee
3CONFIG=/etc/cherokee/cherokee.conf
4PIDFILE=/var/run/cherokee.pid
5NAME="cherokee"
6DESC="Cherokee http server"
7
8test -r /etc/default/cherokee && . /etc/default/cherokee
9test -x "$DAEMON" || exit 0
10test ! -r "$CONFIG" && exit 0
11
12case "$1" in
13 start)
14 echo "Starting $DESC: "
15 start-stop-daemon --oknodo -S -x $DAEMON -- -d -C $CONFIG
16 ;;
17
18 stop)
19 echo "Stopping $DESC:"
20 start-stop-daemon -K -p $PIDFILE
21 ;;
22
23 restart)
24 $0 stop >/dev/null 2>&1
25 $0 start
26 ;;
27
28 *)
29 echo "Usage: $0 {start|stop|restart}"
30 exit 0
31 ;;
32esac
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.service b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.service
new file mode 100644
index 0000000000..a2d703185d
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee/cherokee.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=Cherokee web server
3After=syslog.target
4
5[Service]
6Type=forking
7ExecStart=/usr/sbin/cherokee -d -C /etc/cherokee/cherokee.conf
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb b/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
new file mode 100644
index 0000000000..054858ed33
--- /dev/null
+++ b/meta-webserver/recipes-httpd/cherokee/cherokee_1.2.98.bb
@@ -0,0 +1,67 @@
1SUMMARY = "Cherokee Web Server fast and secure"
2SUMMARY_cget = "Small downloader based in the Cherokee client library"
3HOMEPAGE = "http://www.cherokee-project.com/"
4SECTION = "network"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
7
8PR = "r9"
9
10DEPENDS = "libpcre openssl mysql5 ${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
11
12SRC_URI = "http://www.cherokee-project.de/mirrors/cherokee/1.2/${PV}/cherokee-${PV}.tar.gz \
13 file://cherokee.init \
14 file://cherokee.service \
15 file://cherokee-install-configured.py-once.patch \
16"
17SRC_URI[md5sum] = "21b01e7d45c0e82ecc0c4257a9c27feb"
18SRC_URI[sha256sum] = "042b5687b1a3db3ca818167548ce5d32c35e227c6640732dcb622a6f4a078b7d"
19
20inherit autotools pkgconfig binconfig update-rc.d systemd
21
22PACKAGECONFIG ??= ""
23PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
24PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
25
26EXTRA_OECONF = "--disable-static \
27 --disable-nls \
28 ${@base_contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
29 --with-wwwroot=${localstatedir}/www/cherokee \
30"
31
32do_install_append () {
33 install -m 0755 -d ${D}${sysconfdir}/init.d
34 install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee
35
36 # clean up .la files for plugins
37 rm -f ${D}${libdir}/cherokee/*.la
38
39 install -d ${D}${systemd_unitdir}/system
40 install -m 0644 ${WORKDIR}/cherokee.service ${D}${systemd_unitdir}/system
41 rmdir "${D}${localstatedir}/run"
42 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
43}
44
45# Put -dev near the front so we can move the .la files into it with a wildcard
46PACKAGES =+ "libcherokee-server libcherokee-client libcherokee-base cget"
47
48FILES_cget = "${bindir}/cget"
49FILES_libcherokee-server = "${libdir}/libcherokee-server${SOLIBS}"
50FILES_libcherokee-client = "${libdir}/libcherokee-client${SOLIBS}"
51FILES_libcherokee-base = "${libdir}/libcherokee-base${SOLIBS}"
52
53# Pack the htdocs
54FILES_${PN} += "${localstatedir}/www/cherokee"
55
56CONFFILES_${PN} = " \
57 ${sysconfdir}/cherokee/cherokee.conf \
58 ${sysconfdir}/init.d/cherokee \
59"
60
61INITSCRIPT_NAME = "cherokee"
62INITSCRIPT_PARAMS = "defaults 91 91"
63
64RPROVIDES_${PN} += "${PN}-systemd"
65RREPLACES_${PN} += "${PN}-systemd"
66RCONFLICTS_${PN} += "${PN}-systemd"
67SYSTEMD_SERVICE_${PN} = "cherokee.service"
diff --git a/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init
new file mode 100644
index 0000000000..47fc0877ad
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha-init
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: hiawatha httpd httpd-cgi
5# Required-Start: $syslog $network $remote_fs
6# Required-Stop: $syslog $network $remote_fs
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: Hiawatha webserver
10# Description: Hiawatha, a secure and advanced webserver.
11### END INIT INFO
12
13PATH=/sbin:/bin:/usr/sbin:/usr/bin
14DAEMON=sed_sbin_path/hiawatha
15NAME=hiawatha
16DESC="Hiawatha Web Server"
17OPTS=""
18
19case "$1" in
20 start)
21 echo -n "Starting $DESC: "
22 start-stop-daemon --start -x "$DAEMON" -- $OPTS
23 echo "$NAME."
24 ;;
25 stop)
26 echo -n "Stopping $DESC: "
27 start-stop-daemon --stop -x "$DAEMON"
28 echo "$NAME."
29 ;;
30 restart|force-reload)
31 echo -n "Restarting $DESC: "
32 start-stop-daemon --stop -x "$DAEMON"
33 sleep 1
34 start-stop-daemon --start -x "$DAEMON" -- $OPTS
35 echo "$NAME."
36 ;;
37 *)
38 N=/etc/init.d/$NAME
39 echo "Usage: $N {start|stop|restart|force-reload}" >&2
40 exit 1
41 ;;
42esac
43
44exit 0
diff --git a/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
new file mode 100644
index 0000000000..26cb8d03d0
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/files/hiawatha.service
@@ -0,0 +1,16 @@
1[Unit]
2Description=Hiawatha Web Server
3After=network.target remote-fs.target nss-lookup.target
4
5[Service]
6Type=simple
7SyslogIdentifier=hiawatha
8ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam
9ExecStart= /usr/sbin/hiawatha -d
10TimeoutSec=10
11#(doesn't like this setting. Can't find files) PrivateTmp=true
12LimitNOFILE=infinity
13CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID
14
15[Install]
16WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb b/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb
new file mode 100644
index 0000000000..57005c5ef2
--- /dev/null
+++ b/meta-webserver/recipes-httpd/hiawatha/hiawatha_9.2.bb
@@ -0,0 +1,66 @@
1SUMMARY = "Lightweight secure web server"
2HOMEPAGE = "http://www.hiawatha-webserver.org"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
5DEPENDS = "libxml2 libxslt"
6
7SECTION = "net"
8
9SRC_URI = "http://hiawatha-webserver.org/files/${PN}-${PV}.tar.gz \
10 file://hiawatha-init \
11 file://hiawatha.service "
12
13SRC_URI[md5sum] = "a77f044634884c4cc5d21dab44e822a3"
14SRC_URI[sha256sum] = "5d9cdec51c618bb3efab747030e593d9bd49dfaf3236254c8e0cb60715716dbf"
15
16INITSCRIPT_NAME = "hiawatha"
17INITSCRIPT_PARAMS = "defaults 70"
18
19SYSTEMD_SERVICE_${PN} = "hiawatha.service"
20
21inherit cmake update-rc.d systemd
22
23EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
24 -DENABLE_CACHE=OFF \
25 -DENABLE_DEBUG=OFF \
26 -DENABLE_SSL=OFF \
27 -DENABLE_TOOLKIT=OFF \
28 -DENABLE_CHROOT=OFF \
29 -DENABLE_XSLT=ON \
30 -DENABLE_TOMAHAWK=OFF \
31 -DCMAKE_INSTALL_MANDIR=${mandir} \
32 -DCMAKE_INSTALL_BINDIR=${bindir} \
33 -DCMAKE_INSTALL_SBINDIR=${sbindir} \
34 -DCMAKE_INSTALL_SYSCONFDIR=${sysconfdir} \
35 -DCMAKE_INSTALL_LIBDIR=${libdir} \
36 -DLOG_DIR=/var/log/hiawatha \
37 -DPID_DIR=/var/run \
38 -DWEBROOT_DIR=/var/www/hiawatha \
39 -DWORK_DIR=/var/lib/hiawatha "
40
41do_install_append() {
42 # Copy over init script and sed in the correct sbin path
43 sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
44 mkdir -p ${D}${sysconfdir}/init.d
45 install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
46
47 # configure php-fcgi to have a working configuration
48 # by default if php is installed
49 echo "Server = ${bindir}/php-cgi ; 2 ; 127.0.0.1:2005 ; nobody:nobody ; ${sysconfdir}/php/hiawatha-php5/php.ini" >> ${D}${sysconfdir}/hiawatha/php-fcgi.conf
50
51 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
52 install -d ${D}/${systemd_unitdir}/system
53 install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
54 fi
55
56 rmdir "${D}${localstatedir}/run"
57 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
58}
59
60CONFFILES_${PN} = " \
61 ${sysconfdir}/hiawatha/cgi-wrapper.conf \
62 ${sysconfdir}/hiawatha/hiawatha.conf \
63 ${sysconfdir}/hiawatha/index.xslt \
64 ${sysconfdir}/hiawatha/mimetype.conf \
65 ${sysconfdir}/hiawatha/php-fcgi.conf \
66"
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch b/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch
new file mode 100644
index 0000000000..5f899a1d84
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx-cross.patch
@@ -0,0 +1,217 @@
1We do not have capability to run binaries when cross compiling
2
3Upstream-Status: Pending
4
5
6diff -uraN nginx-1.0.11.orig/auto/feature nginx-1.0.11/auto/feature
7--- nginx-1.0.11.orig/auto/feature 2011-05-11 06:50:19.000000000 -0500
8+++ nginx-1.0.11/auto/feature 2011-12-27 13:56:42.323370040 -0600
9@@ -48,12 +48,20 @@
10
11 if [ -x $NGX_AUTOTEST ]; then
12
13+ if [ ".$NGX_CROSS_COMPILE" = ".yes" ]; then
14+ NGX_AUTOTEST_EXEC="true"
15+ NGX_FOUND_MSG=" (not tested, cross compiling)"
16+ else
17+ NGX_AUTOTEST_EXEC="$NGX_AUTOTEST"
18+ NGX_FOUND_MSG=""
19+ fi
20+
21 case "$ngx_feature_run" in
22
23 yes)
24 # /bin/sh is used to intercept "Killed" or "Abort trap" messages
25- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
26- echo " found"
27+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
28+ echo " found$NGX_FOUND_MSG"
29 ngx_found=yes
30
31 if test -n "$ngx_feature_name"; then
32@@ -67,17 +75,27 @@
33
34 value)
35 # /bin/sh is used to intercept "Killed" or "Abort trap" messages
36- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
37- echo " found"
38+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
39+ echo " found$NGX_FOUND_MSG"
40 ngx_found=yes
41
42- cat << END >> $NGX_AUTO_CONFIG_H
43+ if [ ".$NGX_CROSS_COMPILE" = ".yes" ]; then
44+ cat << END >> $NGX_AUTO_CONFIG_H
45
46 #ifndef $ngx_feature_name
47-#define $ngx_feature_name `$NGX_AUTOTEST`
48+#define $ngx_feature_name $(eval "echo \$NGX_WITH_${ngx_feature_name}")
49 #endif
50
51 END
52+ else
53+ cat << END >> $NGX_AUTO_CONFIG_H
54+
55+#ifndef $ngx_feature_name
56+#define $ngx_feature_name `$NGX_AUTOTEST_EXEC`
57+#endif
58+
59+END
60+ fi
61 else
62 echo " found but is not working"
63 fi
64@@ -85,7 +103,7 @@
65
66 bug)
67 # /bin/sh is used to intercept "Killed" or "Abort trap" messages
68- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
69+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
70 echo " not found"
71
72 else
73diff -uraN nginx-1.0.11.orig/auto/options nginx-1.0.11/auto/options
74--- nginx-1.0.11.orig/auto/options 2011-12-14 07:34:16.000000000 -0600
75+++ nginx-1.0.11/auto/options 2011-12-27 13:56:42.323370040 -0600
76@@ -289,6 +289,18 @@
77 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
78 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
79
80+ # cross compile support
81+ --with-int=*) NGX_WITH_INT="$value" ;;
82+ --with-long=*) NGX_WITH_LONG="$value" ;;
83+ --with-long-long=*) NGX_WITH_LONG_LONG="$value" ;;
84+ --with-ptr-size=*) NGX_WITH_PTR_SIZE="$value" ;;
85+ --with-sig-atomic-t=*) NGX_WITH_SIG_ATOMIC_T="$value" ;;
86+ --with-size-t=*) NGX_WITH_SIZE_T="$value" ;;
87+ --with-off-t=*) NGX_WITH_OFF_T="$value" ;;
88+ --with-time-t=*) NGX_WITH_TIME_T="$value" ;;
89+ --with-sys-nerr=*) NGX_WITH_NGX_SYS_NERR="$value" ;;
90+ --with-endian=*) NGX_WITH_ENDIAN="$value" ;;
91+
92 *)
93 echo "$0: error: invalid option \"$option\""
94 exit 1
95@@ -434,6 +446,17 @@
96
97 --with-debug enable debug logging
98
99+ --with-int=VALUE force int size
100+ --with-long=VALUE force long size
101+ --with-long-long=VALUE force long long size
102+ --with-ptr-size=VALUE force pointer size
103+ --with-sig-atomic-t=VALUE force sig_atomic_t size
104+ --with-size-t=VALUE force size_t size
105+ --with-off-t=VALUE force off_t size
106+ --with-time-t=VALUE force time_t size
107+ --with-sys-nerr=VALUE force sys_nerr value
108+ --with-endian=VALUE force system endianess
109+
110 END
111
112 exit 1
113@@ -455,6 +478,8 @@
114
115 if [ ".$NGX_PLATFORM" = ".win32" ]; then
116 NGX_WINE=$WINE
117+elif [ ! -z "$NGX_PLATFORM" ]; then
118+ NGX_CROSS_COMPILE="yes"
119 fi
120
121
122diff -uraN nginx-1.0.11.orig/auto/types/sizeof nginx-1.0.11/auto/types/sizeof
123--- nginx-1.0.11.orig/auto/types/sizeof 2006-06-28 11:00:26.000000000 -0500
124+++ nginx-1.0.11/auto/types/sizeof 2011-12-27 13:56:42.323370040 -0600
125@@ -11,9 +11,12 @@
126
127 END
128
129-ngx_size=
130+ngx_size=$(eval "echo \$NGX_WITH_${ngx_param}")
131
132-cat << END > $NGX_AUTOTEST.c
133+if [ ".$ngx_size" != "." ]; then
134+ echo " $ngx_size bytes"
135+else
136+ cat << END > $NGX_AUTOTEST.c
137
138 #include <sys/types.h>
139 #include <sys/time.h>
140@@ -31,19 +34,20 @@
141 END
142
143
144-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
145- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
146+ ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
147+ -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
148
149-eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
150+ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
151
152
153-if [ -x $NGX_AUTOTEST ]; then
154- ngx_size=`$NGX_AUTOTEST`
155- echo " $ngx_size bytes"
156-fi
157+ if [ -x $NGX_AUTOTEST ]; then
158+ ngx_size=`$NGX_AUTOTEST`
159+ echo " $ngx_size bytes"
160+ fi
161
162
163-rm -f $NGX_AUTOTEST
164+ rm -f $NGX_AUTOTEST
165+fi
166
167
168 case $ngx_size in
169diff -uraN nginx-1.0.11.orig/auto/unix nginx-1.0.11/auto/unix
170--- nginx-1.0.11.orig/auto/unix 2011-12-14 07:34:16.000000000 -0600
171+++ nginx-1.0.11/auto/unix 2011-12-27 13:56:42.327370060 -0600
172@@ -393,13 +393,13 @@
173
174 # C types
175
176-ngx_type="int"; . auto/types/sizeof
177+ngx_type="int"; ngx_param="INT"; . auto/types/sizeof
178
179-ngx_type="long"; . auto/types/sizeof
180+ngx_type="long"; ngx_param="LONG"; . auto/types/sizeof
181
182-ngx_type="long long"; . auto/types/sizeof
183+ngx_type="long long"; ngx_param="LONG_LONG"; . auto/types/sizeof
184
185-ngx_type="void *"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
186+ngx_type="void *"; ngx_param="PTR_SIZE"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
187 ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_size; . auto/types/value
188
189
190@@ -416,7 +416,7 @@
191
192 ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
193
194-ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
195+ngx_type="sig_atomic_t"; ngx_param="SIG_ATOMIC_T"; ngx_types="int"; . auto/types/typedef
196 . auto/types/sizeof
197 ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
198
199@@ -432,15 +432,15 @@
200
201 . auto/endianess
202
203-ngx_type="size_t"; . auto/types/sizeof
204+ngx_type="size_t"; ngx_param="SIZE_T"; . auto/types/sizeof
205 ngx_param=NGX_MAX_SIZE_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
206 ngx_param=NGX_SIZE_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
207
208-ngx_type="off_t"; . auto/types/sizeof
209+ngx_type="off_t"; ngx_param="OFF_T"; . auto/types/sizeof
210 ngx_param=NGX_MAX_OFF_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
211 ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
212
213-ngx_type="time_t"; . auto/types/sizeof
214+ngx_type="time_t"; ngx_param="TIME_T"; . auto/types/sizeof
215 ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
216 ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
217
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf b/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
new file mode 100644
index 0000000000..93f3c66345
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
@@ -0,0 +1,2 @@
1d www www-data 0755 /run/nginx none
2d root root 0755 /var/log/nginx none
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.conf b/meta-webserver/recipes-httpd/nginx/files/nginx.conf
new file mode 100644
index 0000000000..fb7e4b65da
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx.conf
@@ -0,0 +1,118 @@
1
2user www-data;
3worker_processes 1;
4
5error_log /var/log/nginx/error.log;
6#error_log logs/error.log notice;
7#error_log logs/error.log info;
8
9pid /run/nginx/nginx.pid;
10
11
12events {
13 worker_connections 1024;
14}
15
16
17http {
18 include mime.types;
19 default_type application/octet-stream;
20
21 log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 '$status $body_bytes_sent "$http_referer" '
23 '"$http_user_agent" "$http_x_forwarded_for"';
24
25 access_log /var/log/nginx/access.log main;
26
27 sendfile on;
28 #tcp_nopush on;
29
30 #keepalive_timeout 0;
31 keepalive_timeout 65;
32
33 #gzip on;
34
35 server {
36 listen 80;
37 server_name localhost;
38
39 #charset koi8-r;
40
41 #access_log logs/host.access.log main;
42
43 location / {
44 root /var/www/localhost/html;
45 index index.html index.htm;
46 }
47
48 #error_page 404 /404.html;
49
50 # redirect server error pages to the static page /50x.html
51 #
52 error_page 500 502 503 504 /50x.html;
53 location = /50x.html {
54 root /var/www/localhost/html;
55 }
56
57 # proxy the PHP scripts to Apache listening on 127.0.0.1:80
58 #
59 #location ~ \.php$ {
60 # proxy_pass http://127.0.0.1;
61 #}
62
63 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
64 #
65 #location ~ \.php$ {
66 # root html;
67 # fastcgi_pass 127.0.0.1:9000;
68 # fastcgi_index index.php;
69 # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
70 # include fastcgi_params;
71 #}
72
73 # deny access to .htaccess files, if Apache's document root
74 # concurs with nginx's one
75 #
76 #location ~ /\.ht {
77 # deny all;
78 #}
79 }
80
81
82 # another virtual host using mix of IP-, name-, and port-based configuration
83 #
84 #server {
85 # listen 8000;
86 # listen somename:8080;
87 # server_name somename alias another.alias;
88
89 # location / {
90 # root html;
91 # index index.html index.htm;
92 # }
93 #}
94
95
96 # HTTPS server
97 #
98 #server {
99 # listen 443;
100 # server_name localhost;
101
102 # ssl on;
103 # ssl_certificate cert.pem;
104 # ssl_certificate_key cert.key;
105
106 # ssl_session_timeout 5m;
107
108 # ssl_protocols SSLv2 SSLv3 TLSv1;
109 # ssl_ciphers HIGH:!aNULL:!MD5;
110 # ssl_prefer_server_ciphers on;
111
112 # location / {
113 # root html;
114 # index index.html index.htm;
115 # }
116 #}
117
118}
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.init b/meta-webserver/recipes-httpd/nginx/files/nginx.init
new file mode 100755
index 0000000000..0f38b9cdb7
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx.init
@@ -0,0 +1,52 @@
1#! /bin/sh
2PATH=/sbin:/bin:/usr/sbin:/usr/bin
3DAEMON=/usr/sbin/nginx
4NAME=nginx
5DESC=nginx
6PID=/var/run/nginx/nginx.pid
7
8test -x $DAEMON || exit 0
9
10# Include nginx defaults if available
11if [ -f /etc/default/nginx ] ; then
12 . /etc/default/nginx
13fi
14
15set -e
16
17case "$1" in
18 start)
19 echo -n "Starting $DESC: "
20 start-stop-daemon --start --quiet --pidfile $PID \
21 --name $NAME --exec $DAEMON -- $DAEMON_OPTS
22 echo "$NAME."
23 ;;
24 stop)
25 echo -n "Stopping $DESC: "
26 start-stop-daemon -K --quiet --pidfile $PID \
27 --name $NAME
28 echo "$NAME."
29 ;;
30 restart|force-reload)
31 echo -n "Restarting $DESC: "
32 start-stop-daemon -K --quiet --pidfile $PID \
33 --name $NAME
34 sleep 1
35 start-stop-daemon --start --quiet --pidfile $PID \
36 --name $NAME --exec $DAEMON -- $DAEMON_OPTS
37 echo "$NAME."
38 ;;
39 reload)
40 echo -n "Reloading $DESC configuration: "
41 start-stop-daemon --stop --signal HUP --quiet --pidfile $PID \
42 --exec $DAEMON
43 echo "$NAME."
44 ;;
45 *)
46 N=/etc/init.d/$NAME
47 echo "Usage: $N {start|stop|restart|force-reload}" >&2
48 exit 1
49 ;;
50esac
51
52exit 0
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb
new file mode 100644
index 0000000000..e78ed34dd0
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nginx/nginx_1.4.4.bb
@@ -0,0 +1,117 @@
1SUMMARY = "HTTP and reverse proxy server"
2
3DESCRIPTION = "Nginx is a web server and a reverse proxy server for \
4HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high \
5concurrency, performance and low memory usage."
6
7HOMEPAGE = "http://nginx.org/"
8LICENSE = "BSD-2-Clause"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=917bfdf005ffb6fd025550414ff05a9f"
10SECTION = "net"
11
12DEPENDS = "libpcre gzip openssl"
13
14SRC_URI = " \
15 http://nginx.org/download/nginx-${PV}.tar.gz \
16 file://nginx-cross.patch \
17 file://nginx.conf \
18 file://nginx.init \
19 file://nginx-volatile.conf \
20"
21SRC_URI[md5sum] = "5dfaba1cbeae9087f3949860a02caa9f"
22SRC_URI[sha256sum] = "7c989a58e5408c9593da0bebcd0e4ffc3d892d1316ba5042ddb0be5b0b4102b9"
23
24inherit update-rc.d useradd
25
26do_configure () {
27 if [ "${SITEINFO_BITS}" = "64" ]; then
28 PTRSIZE=8
29 else
30 PTRSIZE=4
31 fi
32
33 echo $CFLAGS
34 echo $LDFLAGS
35
36 ./configure \
37 --crossbuild=Linux:${TUNE_ARCH} \
38 --with-endian=${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
39 --with-int=4 \
40 --with-long=${PTRSIZE} \
41 --with-long-long=8 \
42 --with-ptr-size=${PTRSIZE} \
43 --with-sig-atomic-t=${PTRSIZE} \
44 --with-size-t=${PTRSIZE} \
45 --with-off-t=${PTRSIZE} \
46 --with-time-t=${PTRSIZE} \
47 --with-sys-nerr=132 \
48 --conf-path=${sysconfdir}/nginx/nginx.conf \
49 --http-log-path=${localstatedir}/log/nginx/access.log \
50 --error-log-path=${localstatedir}/log/nginx/error.log \
51 --pid-path=/run/nginx/nginx.pid \
52 --prefix=${prefix} \
53 --with-http_ssl_module \
54 --with-http_gzip_static_module
55}
56
57do_install () {
58 oe_runmake 'DESTDIR=${D}' install
59 rm -fr ${D}${localstatedir}/run ${D}/run
60 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
61 install -d ${D}${sysconfdir}/tmpfiles.d
62 echo "d /run/${BPN} - - - -" \
63 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
64 fi
65 install -d ${D}${sysconfdir}/${BPN}
66 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
67 install -d ${D}${localstatedir}/www/localhost
68 mv ${D}/usr/html ${D}${localstatedir}/www/localhost/
69 chown www:www-data -R ${D}${localstatedir}
70
71 install -d ${D}${sysconfdir}/init.d
72 install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx
73 sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx
74 sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx
75
76 install -d ${D}${sysconfdir}/nginx
77 install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf
78 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
79 install -d ${D}${sysconfdir}/nginx/sites-enabled
80
81 install -d ${D}${sysconfdir}/default/volatiles
82 install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
83 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx
84}
85
86pkg_postinst_${PN} () {
87 if [ -z "$D" ]; then
88 if type systemd-tmpfiles >/dev/null; then
89 systemd-tmpfiles --create
90 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
91 ${sysconfdir}/init.d/populate-volatile.sh update
92 fi
93 fi
94}
95
96FILES_${PN} += "${localstatedir}/"
97
98CONFFILES_${PN} = "${sysconfdir}/nginx/nginx.conf \
99 ${sysconfdir}/nginx/fastcgi.conf\
100 ${sysconfdir}/nginx/fastcgi_params \
101 ${sysconfdir}/nginx/koi-utf \
102 ${sysconfdir}/nginx/koi-win \
103 ${sysconfdir}/nginx/mime.types \
104 ${sysconfdir}/nginx/scgi_params \
105 ${sysconfdir}/nginx/uwsgi_params \
106 ${sysconfdir}/nginx/win-utf \
107"
108
109INITSCRIPT_NAME = "nginx"
110INITSCRIPT_PARAMS = "defaults 92 20"
111
112USERADD_PACKAGES = "${PN}"
113USERADD_PARAM_${PN} = " \
114 --system --no-create-home \
115 --home ${localstatedir}/www/localhost \
116 --groups www-data \
117 --user-group www"
diff --git a/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch b/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch
new file mode 100644
index 0000000000..7cf011b1c8
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/0001-GNUmakefile-add-possibility-to-override-variables.patch
@@ -0,0 +1,141 @@
1From 7fa0d31ec5c0be9dca84a03851b2d44f61527ec8 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
3Date: Sun, 4 Dec 2011 16:01:04 +0100
4Subject: [PATCH] GNUmakefile: add possibility to override variables
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9this is useful for cross compilation
10
11Signed-off-by: Eric Bénard <eric@eukrea.com>
12---
13Upstream-Status: Inappropriate [embedded specific]
14 src/libbsd/GNUmakefile | 10 +++++-----
15 src/libmy/GNUmakefile | 26 +++++++++++++-------------
16 src/nhttpd/GNUmakefile | 12 ++++++------
17 src/tools/GNUmakefile | 8 ++++----
18 4 files changed, 28 insertions(+), 28 deletions(-)
19
20diff --git a/src/libbsd/GNUmakefile b/src/libbsd/GNUmakefile
21index e2d01a3..b034bc6 100644
22--- a/src/libbsd/GNUmakefile
23+++ b/src/libbsd/GNUmakefile
24@@ -1,12 +1,12 @@
25-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
26+CFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
27
28 libbsd.a: strlcpy.o strlcat.o
29- ar -r libbsd.a strlcpy.o strlcat.o
30- ranlib libbsd.a
31+ $(AR) -r libbsd.a strlcpy.o strlcat.o
32+ $(RANLIB) libbsd.a
33
34 strlcpy.o: strlcpy.c
35- cc ${CCFLAGS} strlcpy.c
36+ $(CC) $(CFLAGS) strlcpy.c
37 strlcat.o: strlcat.c
38- cc ${CCFLAGS} strlcat.c
39+ $(CC) $(CFLAGS) strlcat.c
40 clean:
41 rm -f libbsd.a *.o
42diff --git a/src/libmy/GNUmakefile b/src/libmy/GNUmakefile
43index ce90dd9..891ffea 100644
44--- a/src/libmy/GNUmakefile
45+++ b/src/libmy/GNUmakefile
46@@ -1,30 +1,30 @@
47-CCFLAGS = -O2 -Wall -Werror -Wstrict-prototypes -c
48+CFLAGS := -O2 -Wall -Werror -Wstrict-prototypes -c
49
50 libmy.a: strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
51- ar -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
52- ranlib libmy.a
53+ $(AR) -r libmy.a strcutl.o strcutw.o strcuts.o strcuti.o strcutf.o flog.o flogd.o fparse.o strlower.o strb64d.o
54+ $(RANLIB) libmy.a
55
56 strcutl.o: strcutl.c
57- cc ${CCFLAGS} strcutl.c
58+ $(CC) $(CFLAGS) strcutl.c
59 strcutw.o: strcutw.c
60- cc ${CCFLAGS} strcutw.c
61+ $(CC) $(CFLAGS) strcutw.c
62 strcuts.o: strcuts.c
63- cc ${CCFLAGS} strcuts.c
64+ $(CC) $(CFLAGS) strcuts.c
65 strcuti.o: strcuti.c
66- cc ${CCFLAGS} strcuti.c
67+ $(CC) $(CFLAGS) strcuti.c
68 strcutf.o: strcutf.c
69- cc ${CCFLAGS} strcutf.c
70+ $(CC) $(CFLAGS) strcutf.c
71 strlower.o: strlower.c
72- cc ${CCFLAGS} strlower.c
73+ $(CC) $(CFLAGS) strlower.c
74 strb64d.o: strb64d.c
75- cc ${CCFLAGS} strb64d.c
76+ $(CC) $(CFLAGS) strb64d.c
77
78 flog.o: flog.c
79- cc ${CCFLAGS} flog.c
80+ $(CC) $(CFLAGS) flog.c
81 flogd.o: flogd.c
82- cc ${CCFLAGS} flogd.c
83+ $(CC) $(CFLAGS) flogd.c
84 fparse.o: fparse.c
85- cc ${CCFLAGS} fparse.c
86+ $(CC) $(CFLAGS) fparse.c
87
88 clean:
89 rm -f libmy.a *.o
90diff --git a/src/nhttpd/GNUmakefile b/src/nhttpd/GNUmakefile
91index f6d12de..9524911 100644
92--- a/src/nhttpd/GNUmakefile
93+++ b/src/nhttpd/GNUmakefile
94@@ -1,18 +1,18 @@
95-CCFLAGS = -O2 -pipe -Wall -Wstrict-prototypes -c
96+CFLAGS := -O2 -pipe -Wall -Wstrict-prototypes -c
97
98 nhttpd: main.o http.o sys.o
99- cc -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
100- strip nhttpd
101+ $(CC) -L../libmy -L../libbsd -o nhttpd main.o http.o sys.o -lmy -lbsd -lssl -lcrypt
102+# $(STRIP) nhttpd
103 nroff -Tascii -c -mandoc nhttpd.8 > nhttpd.cat8
104
105 main.o: main.c
106- cc ${CCFLAGS} main.c
107+ $(CC) $(CFLAGS) main.c
108
109 http.o: http.c
110- cc ${CCFLAGS} http.c
111+ $(CC) $(CFLAGS) http.c
112
113 sys.o: sys.c
114- cc ${CCFLAGS} sys.c
115+ $(CC) $(CFLAGS) sys.c
116
117 clean:
118 rm -f nhttpd nhttpd.cat8 *.o
119diff --git a/src/tools/GNUmakefile b/src/tools/GNUmakefile
120index 15bea61..663ddb5 100644
121--- a/src/tools/GNUmakefile
122+++ b/src/tools/GNUmakefile
123@@ -1,11 +1,11 @@
124-CCFLAGS = -O2 -pipe -Wall -Werror -Wstrict-prototypes -c
125+CCFLAGS := -O2 -pipe -Wall -Werror -Wstrict-prototypes
126
127 crypt: crypt.o
128- cc -o crypt crypt.o -lcrypt
129- strip crypt
130+ $(CC) $(CFLAGS) -o crypt crypt.o -lcrypt
131+# $(STRIP) crypt
132
133 crypt.o: crypt.c
134- cc ${CCFLAGS} crypt.c
135+ $(CC) $(CFLAGS) -c crypt.c
136
137 clean:
138 rm -f crypt *.o
139--
1401.7.6.4
141
diff --git a/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf b/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf
new file mode 100644
index 0000000000..6674bb696c
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/nhttpd.conf
@@ -0,0 +1,55 @@
1# MAIN [MANDATORY]
2
3servername localhost
4#servername www.nazgul.ch:8080
5serverlisten *
6#serverlisten 81.221.21.250 127.0.0.1 ::1
7serveradmin webmaster@localhost
8serverroot /var/nostromo
9servermimes /var/nostromo/conf/mimes
10docroot /var/nostromo/htdocs
11docindex index.html
12
13# LOGS [OPTIONAL]
14
15logpid /var/run/nostromo/nhttpd.pid
16#logaccess /var/log/nostromo/access_log
17
18# SETUID [RECOMMENDED]
19
20user www-data
21
22# BASIC AUTHENTICATION [OPTIONAL]
23
24#htaccess .htaccess
25#htpasswd /var/nostromo/conf/.htpasswd
26#htpasswd +bsdauth
27#htpasswd +bsdauthnossl
28
29# SSL [OPTIONAL]
30
31#sslport 443
32#sslcert /etc/ssl/server.crt
33#sslcertkey /etc/ssl/server.key
34
35# CUSTOM RESPONSES [OPTIONAL]
36#
37# The custom responses are searched in the corresponding document root.
38
39#custom_401 custom_401.html
40#custom_403 custom_403.html
41#custom_404 custom_404.html
42
43# ALIASES [OPTIONAL]
44
45/icons /var/nostromo/icons
46
47# VIRTUAL HOSTS [OPTIONAL]
48
49#www.rahel.ch /var/nostromo/htdocs/www.rahel.ch
50#www.rahel.ch:8080 /var/nostromo/htdocs/www.rahel.ch
51
52# HOMEDIRS [OPTIONAL]
53
54#homedirs /home
55#homedirs_public public_www
diff --git a/meta-webserver/recipes-httpd/nostromo/files/nostromo b/meta-webserver/recipes-httpd/nostromo/files/nostromo
new file mode 100644
index 0000000000..8a28868829
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/nostromo
@@ -0,0 +1,34 @@
1#!/bin/sh
2
3PATH=/sbin:/bin:/usr/sbin:/usr/bin
4DAEMON=nhttpd
5NAME=nhttpd
6DESC="Nostromo Web Server"
7OPTS="-c /etc/nhttpd.conf"
8
9case "$1" in
10 start)
11 echo -n "Starting $DESC: "
12 start-stop-daemon --start -x "$DAEMON" -- $OPTS
13 echo "$NAME."
14 ;;
15 stop)
16 echo -n "Stopping $DESC: "
17 start-stop-daemon --stop -x "$DAEMON"
18 echo "$NAME."
19 ;;
20 restart|force-reload)
21 echo -n "Restarting $DESC: "
22 start-stop-daemon --stop -x "$DAEMON"
23 sleep 1
24 start-stop-daemon --start -x "$DAEMON" -- $OPTS
25 echo "$NAME."
26 ;;
27 *)
28 N=/etc/init.d/$NAME
29 echo "Usage: $N {start|stop|restart|force-reload}" >&2
30 exit 1
31 ;;
32esac
33
34exit 0
diff --git a/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf
new file mode 100644
index 0000000000..b7a9f4886e
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/tmpfiles.conf
@@ -0,0 +1 @@
d /run/nostromo - www-data www-data -
diff --git a/meta-webserver/recipes-httpd/nostromo/files/volatiles b/meta-webserver/recipes-httpd/nostromo/files/volatiles
new file mode 100644
index 0000000000..40924960c6
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/files/volatiles
@@ -0,0 +1,2 @@
1d www-data www-data 0775 /var/run/nostromo none
2d www-data www-data 0775 /var/log/nostromo none
diff --git a/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb
new file mode 100644
index 0000000000..fe860ec9a9
--- /dev/null
+++ b/meta-webserver/recipes-httpd/nostromo/nostromo_1.9.5.bb
@@ -0,0 +1,69 @@
1SUMMARY = "A simple, fast and secure HTTP server"
2HOMEPAGE = "http://www.nazgul.ch/dev_nostromo.html"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://src/nhttpd/main.c;beginline=2;endline=14;md5=e5ec3fa723b29b7d59d205afd8d36938"
5
6SRC_URI = "http://www.nazgul.ch/dev/${BPN}-${PV}.tar.gz \
7 file://0001-GNUmakefile-add-possibility-to-override-variables.patch \
8 file://nhttpd.conf \
9 file://volatiles \
10 file://tmpfiles.conf \
11 file://nostromo \
12"
13
14SRC_URI[md5sum] = "dc6cfd6b5aae04c370c7f818fa7bde55"
15SRC_URI[sha256sum] = "5f62578285e02449406b46cf06a7888fe3dc4a90bedf58cc18523bad62f6b914"
16
17TARGET_CC_ARCH += "${LDFLAGS}"
18
19DEPENDS = "openssl"
20
21inherit update-rc.d useradd
22
23INITSCRIPT_NAME = "nostromo"
24INITSCRIPT_PARAMS = "defaults 70"
25
26do_compile() {
27 oe_runmake
28}
29
30# we need user/group www-data to exist when we install
31#
32USERADD_PACKAGES = "${PN}"
33USERADD_PARAM_${PN} = "--system -g www-data www-data"
34
35do_install() {
36 install -d ${D}/${sbindir}
37 install -m 0755 src/nhttpd/nhttpd ${D}/${sbindir}/nhttpd
38 install -m 0755 src/tools/crypt ${D}/${sbindir}/crypt
39 install -d ${D}/${mandir}/man8
40 install -m 0444 src/nhttpd/nhttpd.8 ${D}/${mandir}/man8/nhttpd.8
41 install -d ${D}${localstatedir}/nostromo/conf
42 install -d ${D}${localstatedir}/nostromo/htdocs/cgi-bin
43 install -d ${D}${localstatedir}/nostromo/icons
44 install -d ${D}${sysconfdir}/init.d
45 install -m 0644 conf/mimes ${D}${localstatedir}/nostromo/conf/mimes
46 install -m 0644 ${WORKDIR}/nhttpd.conf ${D}${sysconfdir}
47 install -m 0755 ${WORKDIR}/nostromo ${D}${sysconfdir}/init.d
48 install -D -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/nostromo
49 if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
50 install -D -m 0644 ${WORKDIR}/tmpfiles.conf ${D}${sysconfdir}/tmpfiles.d/nostromo.conf
51 fi
52 install -m 0644 htdocs/index.html ${D}${localstatedir}/nostromo/htdocs/index.html
53 install -m 0644 htdocs/nostromo.gif ${D}${localstatedir}/nostromo/htdocs/nostromo.gif
54 install -m 0644 icons/dir.gif ${D}${localstatedir}/nostromo/icons/dir.gif
55 install -m 0644 icons/file.gif ${D}${localstatedir}/nostromo/icons/file.gif
56 chown -R www-data:www-data ${D}/${localstatedir}/nostromo
57}
58
59CONFFILES_${PN} += "/var/nostromo/conf/mimes ${sysconfdir}/nhttpd.conf"
60
61pkg_postinst_${PN} () {
62 if [ -z "$D" ]; then
63 if [ -e /sys/fs/cgroup/systemd ]; then
64 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nostromo.conf
65 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
66 ${sysconfdir}/init.d/populate-volatile.sh update
67 fi
68 fi
69}
diff --git a/meta-webserver/recipes-httpd/sthttpd/sthttpd/init b/meta-webserver/recipes-httpd/sthttpd/sthttpd/init
new file mode 100644
index 0000000000..70f6797a75
--- /dev/null
+++ b/meta-webserver/recipes-httpd/sthttpd/sthttpd/init
@@ -0,0 +1,52 @@
1#!/bin/sh
2
3### BEGIN INIT INFO
4# Provides: thttpd
5# Required-Start: $remote_fs $syslog
6# Required-Stop: $remote_fs $syslog
7# Default-Start: 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: Small http server
10# Description: thttpd is a simple, small, portable, fast, and secure HTTP server.
11### END INIT INFO
12
13
14thttpd=/usr/sbin/thttpd
15test -x "$thttpd" || exit 0
16
17
18case "$1" in
19 start)
20 echo -n "Starting thttpd"
21 start-stop-daemon --start --quiet --exec $thttpd -- -d @@SRVDIR
22 echo "."
23 ;;
24 stop)
25 echo -n "Stopping thttpd"
26 start-stop-daemon --stop --quiet --exec $thttpd
27 echo "."
28 ;;
29 reload|force-reload)
30 start-stop-daemon --stop --quiet --signal 1 --exec $thttpd
31 ;;
32 restart)
33 echo -n "Stopping thttpd"
34 start-stop-daemon --stop --quiet --exec $thttpd -- -d @@SRVDIR
35 echo "."
36 echo -n "Waiting for thttpd to die off"
37 for i in 1 2 3 ;
38 do
39 sleep 1
40 echo -n "."
41 done
42 echo ""
43 echo -n "Starting thttpd"
44 start-stop-daemon --start --quiet --exec $thttpd -- -d @@SRVDIR
45 echo "."
46 ;;
47 *)
48 echo "Usage: /etc/init.d/thttpd {start|stop|reload|restart|force-reload}"
49 exit 1
50esac
51
52exit 0
diff --git a/meta-webserver/recipes-httpd/sthttpd/sthttpd/thttpd.service b/meta-webserver/recipes-httpd/sthttpd/sthttpd/thttpd.service
new file mode 100644
index 0000000000..e2dae61fd0
--- /dev/null
+++ b/meta-webserver/recipes-httpd/sthttpd/sthttpd/thttpd.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=Tiny/Turbo/Throttling Web Server
3
4[Service]
5Type=forking
6ExecStart=/usr/sbin/thttpd -d @@SRVDIR -c cgi-bin/* -i /var/run/thttpd.pid
7PIDFile=/var/run/thttpd.pid
8
9[Install]
10WantedBy=multi-user.target
diff --git a/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.26.4.bb b/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.26.4.bb
new file mode 100644
index 0000000000..0abd13169e
--- /dev/null
+++ b/meta-webserver/recipes-httpd/sthttpd/sthttpd_2.26.4.bb
@@ -0,0 +1,40 @@
1SUMMARY = "A simple, small, portable, fast, and secure HTTP server"
2DESCRIPTION = "A simple, small, portable, fast, and secure HTTP server (supported fork of thttpd)."
3HOMEPAGE = "http://opensource.dyc.edu/sthttpd"
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dcbe9eb18815516502872"
6
7SRC_URI = "http://opensource.dyc.edu/pub/sthttpd/sthttpd-${PV}.tar.gz \
8 file://thttpd.service \
9 file://init"
10
11SRC_URI[md5sum] = "e645a85a97d3cb883011a35bc2211815"
12SRC_URI[sha256sum] = "78e87979140cbda123c81b4051552242dbbffb5dec1a17e5f95ec4826b1eaddb"
13
14S = "${WORKDIR}/sthttpd-${PV}"
15
16inherit autotools update-rc.d systemd
17
18EXTRA_OEMAKE += "'WEBDIR=${servicedir}/www'"
19
20do_install_append () {
21 install -d ${D}${sysconfdir}/init.d
22 install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/thttpd
23 sed -i -e 's,@@SRVDIR,${servicedir}/www,g' ${D}${sysconfdir}/init.d/thttpd
24 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/thttpd
25
26 install -d ${D}${systemd_unitdir}/system
27 install -m 0644 ${WORKDIR}/thttpd.service ${D}${systemd_unitdir}/system
28 sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
29 sed -i 's!/var/!${localstatedir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
30 sed -i -e 's,@@SRVDIR,${servicedir}/www,g' ${D}${systemd_unitdir}/system/thttpd.service
31}
32
33INITSCRIPT_NAME = "thttpd"
34INITSCRIPT_PARAMS = "defaults"
35
36SYSTEMD_SERVICE_${PN} = "thttpd.service"
37
38FILES_${PN} += "${servicedir}"
39FILES_${PN}-dbg += "${servicedir}/www/cgi-bin/.debug"
40
diff --git a/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf
new file mode 100644
index 0000000000..1de6fb11ac
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/70_mod_php5.conf
@@ -0,0 +1,12 @@
1# vim: ft=apache sw=4 ts=4
2<IfDefine PHP5>
3 # Load the module first
4 <IfModule !sapi_apache2.c>
5 LoadModule php5_module lib/apache2/modules/libphp5.so
6 </IfModule>
7
8 # Set it to handle the files
9 AddHandler php5-script .php .phtml .php3 .php4 .php5
10 AddType application/x-httpd-php-source .phps
11 DirectoryIndex index.html index.html.var index.php index.phtml
12</IfDefine>
diff --git a/meta-webserver/recipes-php/modphp/files/configure.patch b/meta-webserver/recipes-php/modphp/files/configure.patch
new file mode 100644
index 0000000000..c5334c706e
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/configure.patch
@@ -0,0 +1,11 @@
1--- php-5.1.6/configure.old 2006-09-12 07:54:14.000000000 -0700
2+++ php-5.1.6/configure 2006-09-12 07:54:37.000000000 -0700
3@@ -14715,8 +14715,6 @@
4
5
6
7- unset ac_cv_func_dlopen
8- unset ac_cv_func___dlopen
9 unset found
10
11 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
diff --git a/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch
new file mode 100644
index 0000000000..0c564cd88e
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/pthread-check-threads-m4.patch
@@ -0,0 +1,30 @@
1From d8067ceacbf54e79c9c6b68675332c09eaa0b55d Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 8 Apr 2013 14:29:51 +0800
4Subject: [PATCH] pthread-check
5
6Enable pthreads support when cross-compiling
7
8Upstream-Status: Inapproprate [config]
9
10Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
11---
12 TSRM/threads.m4 | 2 +-
13 1 files changed, 1 insertions(+), 1 deletions(-)
14
15diff --git a/TSRM/threads.m4 b/TSRM/threads.m4
16index 38494ce..15d9454 100644
17--- a/TSRM/threads.m4
18+++ b/TSRM/threads.m4
19@@ -86,7 +86,7 @@ int main() {
20 pthreads_working=no
21 ], [
22 dnl For cross compiling running this test is of no use. NetWare supports pthreads
23- pthreads_working=no
24+ pthreads_working=yes
25 case $host_alias in
26 *netware*)
27 pthreads_working=yes
28--
291.7.4.1
30
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
new file mode 100644
index 0000000000..a1d550de30
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -0,0 +1,104 @@
1SECTION = "console/network"
2DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module."
3LICENSE = "PHP-3.0"
4INC_PR = "r1"
5DEPENDS = "apache2-native apache2 zlib bzip2 libmcrypt"
6
7SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \
8 file://configure.patch \
9 file://pthread-check-threads-m4.patch \
10 file://70_mod_php5.conf \
11"
12
13S = "${WORKDIR}/php-${PV}"
14
15LIC_FILES_CHKSUM = "file://LICENSE;md5=5bb09683f8f09b15b7076f4b4c31d61f"
16
17inherit autotools
18
19CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
20
21EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \
22 --with-pic \
23 --enable-maintainer-zts \
24 --without-mysql \
25 --disable-cgi \
26 --disable-cli \
27 --disable-pdo \
28 --without-pear \
29 --without-iconv \
30 --disable-ipv6 \
31 --disable-xml \
32 --disable-xmlreader \
33 --disable-xmlwriter \
34 --disable-simplexml \
35 --disable-libxml \
36 --disable-dom \
37 --disable-rpath \
38 --libdir=${libdir}/php5 \
39 --with-zlib --with-zlib-dir=${STAGING_DIR_TARGET}${exec_prefix} \
40 --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \
41 --with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \
42 --enable-zip \
43 --enable-mbstring \
44 --with-config-file-path=${sysconfdir}/php/apache2-php5 \
45 ${@base_conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)}"
46
47PACKAGECONFIG ??= "mysql"
48PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5"
49PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5"
50
51acpaths = ""
52
53do_configure_prepend () {
54 rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4
55 find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!'
56}
57
58do_configure_append() {
59 # No libtool, we really don't want rpath set...
60 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool
61 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool
62}
63
64do_install () {
65 install -d ${D}${libdir}/apache2/modules
66 install -d ${D}${sysconfdir}/apache2/modules.d
67 install -d ${D}${sysconfdir}/php/apache2-php5
68 install -m 755 libs/libphp5.so ${D}${libdir}/apache2/modules
69 install -m 644 ${WORKDIR}/70_mod_php5.conf ${D}${sysconfdir}/apache2/modules.d
70 sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php5.conf
71 cat ${S}/php.ini-production | \
72 sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \
73 > ${D}${sysconfdir}/php/apache2-php5/php.ini
74
75 install -d ${D}${bindir}
76 install -m 755 scripts/phpize ${D}${bindir}
77 install -m 755 scripts/php-config ${D}${bindir}
78 cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \
79 aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > ${S}/build/libtool.m4
80
81 oe_runmake install-build install-headers INSTALL_ROOT=${D}
82}
83
84SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess"
85
86php_sysroot_preprocess () {
87 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
88 install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/
89 install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
90
91 sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize
92 sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config
93}
94
95# phpize is not scanned for absolute paths by default (but php-config is).
96#
97SSTATE_SCAN_FILES += "phpize"
98
99RDEPENDS_${PN} = "apache2"
100
101FILES_${PN} = "${libdir}/apache2 ${sysconfdir}"
102FILES_${PN}-dev += "${bindir}/phpize ${bindir}/php-config ${libdir}/php5"
103FILES_${PN}-dbg += "${libdir}/apache2/modules/.debug"
104
diff --git a/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb b/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb
new file mode 100644
index 0000000000..fcdb11e9a0
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/modphp_5.5.10.bb
@@ -0,0 +1,7 @@
1include modphp5.inc
2
3EXTRA_OECONF += "--disable-opcache"
4
5SRC_URI[md5sum] = "d608230c7890b6a0cc5b92e66e866226"
6SRC_URI[sha256sum] = "bb34e61f8e6f56c612867bfe85d144d5045cd5e44497539bc126a4e8c6795419"
7
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf
new file mode 100644
index 0000000000..94cbd865c6
--- /dev/null
+++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin/apache.conf
@@ -0,0 +1,42 @@
1# phpMyAdmin default Apache configuration
2
3Alias /phpmyadmin /usr/share/phpmyadmin
4
5<Directory /usr/share/phpmyadmin>
6 Options FollowSymLinks
7 DirectoryIndex index.php
8 Require all granted
9
10 <IfModule mod_php5.c>
11 AddType application/x-httpd-php .php
12
13 php_flag magic_quotes_gpc Off
14 php_flag track_vars On
15 php_flag register_globals Off
16 php_admin_flag allow_url_fopen Off
17 php_value include_path .
18 php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
19 php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
20 </IfModule>
21</Directory>
22
23# Authorize for setup
24<Directory /usr/share/phpmyadmin/setup>
25 <IfModule mod_authn_file.c>
26 AuthType Basic
27 AuthName "phpMyAdmin Setup"
28 AuthUserFile /etc/phpmyadmin/htpasswd.setup
29 </IfModule>
30 Require valid-user
31</Directory>
32
33# Disallow web access to directories that don't need it
34<Directory /usr/share/phpmyadmin/libraries>
35 Order Deny,Allow
36 Deny from All
37</Directory>
38<Directory /usr/share/phpmyadmin/setup/lib>
39 Order Deny,Allow
40 Deny from All
41</Directory>
42
diff --git a/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb
new file mode 100644
index 0000000000..cd158891dd
--- /dev/null
+++ b/meta-webserver/recipes-php/phpmyadmin/phpmyadmin_4.1.9.bb
@@ -0,0 +1,31 @@
1SUMMARY = "Web-based MySQL administration interface"
2HOMEPAGE = "http://www.phpmyadmin.net"
3# Main code is GPLv2, libraries/tcpdf is under LGPLv3, js/jquery is under MIT
4LICENSE = "GPLv2 & LGPLv3 & MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a \
6 file://libraries/tcpdf/LICENSE.TXT;md5=5c87b66a5358ebcc495b03e0afcd342c"
7
8SRC_URI = "${SOURCEFORGE_MIRROR}/phpmyadmin/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
9 file://apache.conf"
10
11SRC_URI[md5sum] = "420c836228ceab8df5557c92e56021d7"
12SRC_URI[sha256sum] = "efc5bd669324cd094cc1912afee9c91fd052fe9f226f767f7ec7b31a1796ce2c"
13
14S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
15
16inherit allarch
17
18do_install() {
19 install -d ${D}${datadir}/${BPN}
20 cp -a * ${D}${datadir}/${BPN}
21
22 install -d ${D}${sysconfdir}/apache2/conf.d
23 install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf
24
25 # Remove a few scripts that explicitly require bash (!)
26 rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh
27}
28
29FILES_${PN} = "${datadir}/${BPN} \
30 ${sysconfdir}/apache2/conf.d"
31
diff --git a/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb b/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb
new file mode 100644
index 0000000000..3c4d8e4024
--- /dev/null
+++ b/meta-webserver/recipes-php/xdebug/xdebug_2.2.3.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Debugging and profiling extension for PHP"
2LICENSE = "Xdebug"
3LIC_FILES_CHKSUM = "file://LICENSE;md5=34df3a274aa12b795417c65634c07f16"
4
5DEPENDS = "modphp"
6
7
8SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz"
9
10SRC_URI[md5sum] = "e49cec9861b45dc0b36eae33bf8a14fa"
11SRC_URI[sha256sum] = "b351872da46ed8378dff90a87673f5ec1e0bdd94324558ebc898e1d115e9d71c"
12
13inherit autotools
14
15EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config"
16
17do_configure() {
18 cd ${S}
19 ${STAGING_BINDIR_CROSS}/phpize
20 cd ${B}
21
22 # Running autoreconf as autotools_do_configure would do here
23 # breaks the libtool configuration resulting in a failure later
24 # in do_compile. It's possible this may be fixable, however the
25 # easiest course of action for the moment is to avoid doing that.
26 oe_runconf
27}
28
29do_install() {
30 oe_runmake install INSTALL_ROOT=${D}
31}
32
33FILES_${PN} += "${libdir}/php5/extensions/*/*.so"
34FILES_${PN}-dbg += "${libdir}/php5/extensions/*/.debug"
35
diff --git a/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
new file mode 100644
index 0000000000..a9ee405075
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/disable-version-check.patch
@@ -0,0 +1,45 @@
1Disable OS version check in status screen
2
3The code is not able to accurately detect the correct distro/version at
4the moment.
5
6Upstream-status: Inappropriate
7
8Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9
10diff --git a/webmin/webmin-lib.pl b/webmin/webmin-lib.pl
11index 57a37f7..838b944 100755
12--- a/webmin/webmin-lib.pl
13+++ b/webmin/webmin-lib.pl
14@@ -1059,18 +1059,19 @@ my %miniserv;
15 &load_theme_library(); # So that UI functions work
16
17 # Need OS upgrade
18-my %realos = &detect_operating_system(undef, 1);
19-if (($realos{'os_version'} ne $gconfig{'os_version'} ||
20- $realos{'os_type'} ne $gconfig{'os_type'}) &&
21- $realos{'os_version'} && $realos{'os_type'} &&
22- &foreign_available("webmin")) {
23- push(@notifs,
24- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
25- &text('os_incorrect', $realos{'real_os_type'},
26- $realos{'real_os_version'})."<p>\n".
27- &ui_form_end([ [ undef, $text{'os_fix'} ] ])
28- );
29- }
30+# Disabled for now as os-chooser.pl does not work on our system
31+#my %realos = &detect_operating_system(undef, 1);
32+#if (($realos{'os_version'} ne $gconfig{'os_version'} ||
33+# $realos{'os_type'} ne $gconfig{'os_type'}) &&
34+# $realos{'os_version'} && $realos{'os_type'} &&
35+# &foreign_available("webmin")) {
36+# push(@notifs,
37+# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
38+# &text('os_incorrect', $realos{'real_os_type'},
39+# $realos{'real_os_version'})."<p>\n".
40+# &ui_form_end([ [ undef, $text{'os_fix'} ] ])
41+# );
42+# }
43
44 # Password close to expiry
45 my $warn_days = $config{'warn_days'};
diff --git a/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
new file mode 100644
index 0000000000..140ae7e450
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/exports-lib.pl.patch
@@ -0,0 +1,32 @@
1From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001
2From: Kevin Strasser <kevin.strasser@linux.intel.com>
3Date: Wed, 1 Aug 2012 11:51:26 -0700
4Subject: [PATCH] nfs export: remove nfsd check
5
6nfsd runs as a kernel process and does not have a pid. This means
7that the command assigned to apply_cmd will never be executed when
8the user tries to apply changes to nfs exports.
9
10Upstream-Status: Inappropriate [config]
11
12Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
13---
14 exports/exports-lib.pl | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl
18index 22891c0..1c67494 100755
19--- a/exports/exports-lib.pl
20+++ b/exports/exports-lib.pl
21@@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") && !&has_command("nfsd") &&
22 sub restart_mountd
23 {
24 # Try exportfs -r first
25-if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) {
26+if ($config{'apply_cmd'} && &find_byname("mountd")) {
27 local $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
28 if (!$? && $out !~ /invalid|error|failed/i) {
29 # Looks like it worked!
30--
311.7.9.5
32
diff --git a/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
new file mode 100644
index 0000000000..135492d713
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/init-exclude.patch
@@ -0,0 +1,67 @@
1# Hack in support for an "exclude" config option for the init module, so
2# we can hide certain system services that shouldn't really be configurable
3# via the web interface
4#
5# Upstream-status: Pending
6#
7# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8--- webmin-1.570.orig/init/index.cgi
9+++ webmin-1.570/init/index.cgi
10@@ -48,19 +48,20 @@ elsif ($init_mode eq "init" && $access{'
11 : "$config{'init_dir'}/$ac[0]");
12 }
13 @runlevels = &list_runlevels();
14- foreach $r (@runlevels) {
15- foreach $w ("S", "K") {
16- foreach $a (&runlevel_actions($r, $w)) {
17- @ac = split(/\s+/, $a);
18- if (!$nodemap{$ac[2]}) {
19- push(@acts, $ac[1]);
20- push(@actsl,
21- "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
22- push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
23- }
24- }
25- }
26- }
27+ # Assume there won't be any of these broken actions
28+ #foreach $r (@runlevels) {
29+ # foreach $w ("S", "K") {
30+ # foreach $a (&runlevel_actions($r, $w)) {
31+ # @ac = split(/\s+/, $a);
32+ # if (!$nodemap{$ac[2]}) {
33+ # push(@acts, $ac[1]);
34+ # push(@actsl,
35+ # "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
36+ # push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
37+ # }
38+ # }
39+ # }
40+ # }
41
42 # For each action, look at /etc/rc*.d/* files to see if it is
43 # started at boot
44Index: webmin-1.570/init/init-lib.pl
45===================================================================
46--- webmin-1.570.orig/init/init-lib.pl
47+++ webmin-1.570/init/init-lib.pl
48@@ -108,15 +108,17 @@ List boot time action names from init.d,
49 =cut
50 sub list_actions
51 {
52-local($dir, $f, @stbuf, @rv);
53+local($dir, $f, @stbuf, @rv, @exclude);
54 $dir = $config{init_dir};
55+@exclude = split(/,/, $config{exclude});
56 opendir(DIR, $dir);
57 foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) {
58 if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" ||
59 $f eq "core" || $f eq "README" || $f eq "rc" || $f eq "rcS" ||
60 -d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" ||
61 $f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ ||
62- $f =~ /^\.depend\./ || $f eq '.legacy-bootordering') { next; }
63+ $f =~ /^\.depend\./ || $f eq '.legacy-bootordering' ||
64+ grep {$_ eq $f} @exclude ) { next; }
65 if (@stbuf = stat("$dir/$f")) {
66 push(@rv, "$f $stbuf[1]");
67 }
diff --git a/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch
new file mode 100644
index 0000000000..46f3109796
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/media-tomb.patch
@@ -0,0 +1,65 @@
1diff -Nru webmin-1.570.bak/mediatomb/index.cgi webmin-1.570/mediatomb/index.cgi
2--- webmin-1.570.bak/mediatomb/index.cgi 1969-12-31 16:00:00.000000000 -0800
3+++ webmin-1.570/mediatomb/index.cgi 2011-10-26 10:00:05.992522036 -0700
4@@ -0,0 +1,13 @@
5+#!/usr/bin/perl
6+# index.cgi
7+# Display MediaTomb option categories
8+
9+require './mediatomb-lib.pl';
10+
11+ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
12+
13+
14+$ipaddress = &get_my_address();
15+print &text('index_desc', $ipaddress),"<p>\n";
16+
17+ui_print_footer("/", $text{'index'});
18diff -Nru webmin-1.570.bak/mediatomb/lang/en webmin-1.570/mediatomb/lang/en
19--- webmin-1.570.bak/mediatomb/lang/en 1969-12-31 16:00:00.000000000 -0800
20+++ webmin-1.570/mediatomb/lang/en 2011-10-26 10:01:13.340522186 -0700
21@@ -0,0 +1,2 @@
22+index_title=MediaTomb
23+index_desc=MediaTomb is an open source (GPL) UPnP MediaServer with a nice web user interface. You can access it via <a href='http://$1:49153'>here</a>.
24diff -Nru webmin-1.570.bak/mediatomb/mediatomb-lib.pl webmin-1.570/mediatomb/mediatomb-lib.pl
25--- webmin-1.570.bak/mediatomb/mediatomb-lib.pl 1969-12-31 16:00:00.000000000 -0800
26+++ webmin-1.570/mediatomb/mediatomb-lib.pl 2011-10-26 10:01:34.692522079 -0700
27@@ -0,0 +1,31 @@
28+#!/usr/bin/perl
29+# mediatomb-lib.pl
30+# Common functions for the MediaTomb module
31+
32+BEGIN { push(@INC, ".."); };
33+use WebminCore;
34+&init_config();
35+
36+sub get_my_address
37+{
38+my $myip;
39+if (&foreign_check("net")) {
40+ # Try to get ethernet interface
41+ &foreign_require("net", "net-lib.pl");
42+ my @act = &net::active_interfaces();
43+ my @ifaces = grep { &net::iface_type($_->{'fullname'}) =~ /ether/i }
44+ @act;
45+ @ifaces = ( $act[0] ) if (!@ifaces && @act);
46+ if (@ifaces) {
47+ return wantarray ? ( map { $_->{'address'} } @ifaces )
48+ : $ifaces[0]->{'address'};
49+ }
50+ }
51+$myip = &to_ipaddress(&get_system_hostname());
52+if ($myip) {
53+ # Can resolve hostname .. use that
54+ return wantarray ? ( $myip ) : $myip;
55+ }
56+return wantarray ? ( ) : undef;
57+}
58+
59diff -Nru webmin-1.570.bak/mediatomb/module.info webmin-1.570/mediatomb/module.info
60--- webmin-1.570.bak/mediatomb/module.info 1969-12-31 16:00:00.000000000 -0800
61+++ webmin-1.570/mediatomb/module.info 2011-10-26 09:59:50.428528369 -0700
62@@ -0,0 +1,3 @@
63+desc=MediaTomb
64+category=others
65+longdesc=MediaTomb access module
diff --git a/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
new file mode 100644
index 0000000000..8cb74c4b13
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/mount-excludefs.patch
@@ -0,0 +1,25 @@
1Add excludefs config option to mount module
2
3Adds a configuration option (currently hidden) to allow the distro to
4hide certain filesystems from the mount module within Webmin (e.g. /dev)
5since these shouldn't be modified from the web interface.
6
7Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
8
9Upstream-status: Pending
10
11--- webmin-1.570.orig/mount/index.cgi
12+++ webmin-1.570/mount/index.cgi
13@@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) {
14 }
15
16 # Build visible filesystems list
17+@excludefs = split(/,/, $config{excludefs});
18 foreach $m (@all) {
19 @minfo = @$m;
20 $p = &simplify_mount_path($minfo[0], $minfo[2]);
21 next if ($ignore{$minfo[2]});
22+ next if (grep {$_ eq $minfo[2]} @excludefs);
23 @mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]);
24 $canedit = $can_edit{$minfo[2]} && !$mmodes[4] &&
25 &can_edit_fs(@minfo);
diff --git a/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch b/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
new file mode 100644
index 0000000000..7d20affb22
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/net-generic.patch
@@ -0,0 +1,21 @@
1# Add support for configuring network interfaces on a generic linux system
2#
3# Upstream-status: Not appropriate [config]
4#
5# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
6--- webmin-1.570.orig/net/module.info
7+++ webmin-1.570/net/module.info
8@@ -11,7 +11,7 @@ desc_ko_KR.UTF-8=ë„¤íŠ¸ì›Œí¬ êµ¬ì„±
9 name=Networking
10 desc_tr=Að Yapýlandýrmasý
11 desc_de=Netzwerkkonfiguration
12-os_support=solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux
13+os_support=generic-linux solaris coherent-linux redhat-linux/5.0-* mandrake-linux united-linux suse-linux/6.0-* open-linux unixware turbo-linux/4.0 freebsd/3.2-* openbsd debian-linux/2.2-* cobalt-linux/2.2-* msc-linux gentoo-linux macos/1.5-* trustix-linux slackware-linux/8.0-* openmamba-linux cygwin windows pardus-linux
14 desc_sk=Konfigurácia siete
15 desc_zh_CN=ÍøÂçÅäÖÃ
16 risk=low medium high
17--- /dev/null
18+++ webmin-1.570/net/generic-linux-lib.pl
19@@ -0,0 +1,2 @@
20+do 'linux-lib.pl';
21+
diff --git a/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch b/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch
new file mode 100644
index 0000000000..bdba5e73f8
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/net-lib.pl.patch
@@ -0,0 +1,19 @@
1Upstream-Status: Inappropriate [config]
2
3XXX: need to work out a better fix.
4
5Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
6
7diff -Nru webmin-1.570.orig//net/net-lib.pl webmin-1.570/net/net-lib.pl
8--- webmin-1.570.orig//net/net-lib.pl 2011-10-03 09:01:48.000000000 +0800
9+++ webmin-1.570/net/net-lib.pl 2011-10-28 13:52:56.138873664 +0800
10@@ -21,7 +21,8 @@
11 do "$gconfig{'os_type'}-9.1-ALL-lib.pl";
12 }
13 else {
14- do "$gconfig{'os_type'}-lib.pl";
15+ #do "$gconfig{'os_type'}-lib.pl";
16+ do "debian-linux-lib.pl";
17 }
18
19 # list_hosts()
diff --git a/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch b/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
new file mode 100644
index 0000000000..c17e3b2167
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/nfs-export.patch
@@ -0,0 +1,39 @@
1commit e48f61d2f6df32a518bcb84db8c6eacfe5435c32
2Author: Yu Ke <ke.yu@intel.com>
3Date: Fri Oct 28 14:40:51 2011 +0800
4
5NFS export: fix syntax issue
6
7fix two syntax issue in /etc/exports:
81. if it is exported to everyone, should use "*", e.g. "/export *(xxx)"
92. explicitly specify subtree_check or no_subtree_check, required by latest nfs-utils
10
11Upstream-Status: Pending
12
13Signed-off-by: Yu Ke <ke.yu@intel.com>
14
15diff --git a/exports/save_export.cgi b/exports/save_export.cgi
16index 3bc2f97..3e60298 100755
17--- a/exports/save_export.cgi
18+++ b/exports/save_export.cgi
19@@ -40,7 +40,7 @@ else {
20 &error(&text('save_enetmask', $in{'netmask'}));
21 $exp{'host'} = $in{'network'}."/".$in{'netmask'};
22 }
23- elsif ($in{'mode'} == 3) { $exp{'host'} = ""; }
24+ elsif ($in{'mode'} == 3) { $exp{'host'} = "*"; }
25 else {
26 $in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) ||
27 &error(&text('save_ehost', $in{'host'}));
28@@ -70,6 +70,11 @@ else {
29
30 delete($opts{'no_subtree_check'}); delete($opts{'subtree_check'});
31 $opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'});
32+ if ($in{'no_subtree_check'}) {
33+ $opts{'no_subtree_check'} = "";
34+ } else {
35+ $opts{'subtree_check'} = "";
36+ }
37
38 delete($opts{'nohide'}); delete($opts{'hide'});
39 $opts{'nohide'} = "" if ($in{'nohide'});
diff --git a/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch b/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch
new file mode 100644
index 0000000000..492a652d48
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/proftpd-config-fix.patch
@@ -0,0 +1,18 @@
1Upstream-status: Inappropriate [configuration]
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Index: webmin-1.570/proftpd/config
6===================================================================
7--- webmin-1.570.orig/proftpd/config 2011-10-25 20:18:37.000000000 +0800
8+++ webmin-1.570/proftpd/config 2011-10-25 20:21:13.000000000 +0800
9@@ -1,6 +1,6 @@
10-proftpd_path=/usr/local/sbin/proftpd
11-proftpd_conf=/usr/local/etc/proftpd.conf
12-pid_file=/usr/local/var/proftpd.pid
13+proftpd_path=/usr/sbin/proftpd
14+proftpd_conf=/etc/proftpd.conf
15+pid_file=/var/proftpd.pid
16 ftpusers=/etc/ftpusers
17 test_config=1
18 test_always=0
diff --git a/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch b/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch
new file mode 100644
index 0000000000..8493af8526
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/remove-startup-option.patch
@@ -0,0 +1,29 @@
1# Remove "start on boot" option from webmin configuration, as
2# end-users should not need to configure this from the web interface
3#
4# Upstream-status: Inappropriate
5#
6# Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
7--- webmin-1.570.orig/webmin/index.cgi
8+++ webmin-1.570/webmin/index.cgi
9@@ -79,20 +79,6 @@ print &ui_buttons_start();
10 my %miniserv;
11 &get_miniserv_config(\%miniserv);
12
13-if (&foreign_check("init")) {
14- &foreign_require("init", "init-lib.pl");
15- my $starting = &init::action_status("webmin");
16- print &ui_buttons_row("bootup.cgi",
17- $text{'index_boot'},
18- $text{'index_bootmsg'}.
19- ($miniserv{'inetd'} ? "<b>$text{'index_inetd'}</b>" :
20- !$ENV{'MINISERV_CONFIG'} ? "<b>$text{'index_apache'}</b>" : ""),
21- &ui_hidden("starting", $starting),
22- &ui_radio("boot", $starting == 2 ? 1 : 0,
23- [ [ 1, $text{'yes'} ],
24- [ 0, $text{'no'} ] ]));
25- }
26-
27 # Restart Webmin
28 if (!$miniserv{'inetd'} && $ENV{'MINISERV_CONFIG'}) {
29 print &ui_buttons_row("restart.cgi",
diff --git a/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch b/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch
new file mode 100644
index 0000000000..46645ac30e
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/samba-config-fix.patch
@@ -0,0 +1,32 @@
1Upstream-status: Inappropriate [configuration]
2
3Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
4
5Index: webmin-1.570/samba/config-generic-linux
6===================================================================
7--- webmin-1.570.orig/samba/config-generic-linux 2011-10-25 20:11:35.000000000 +0800
8+++ webmin-1.570/samba/config-generic-linux 2011-10-25 20:15:41.000000000 +0800
9@@ -1,15 +1,15 @@
10 list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g'
11-smb_passwd=/usr/local/samba/private/smbpasswd
12+smb_passwd=/usr/bin/smbpasswd
13 text_lists=0
14 dont_convert=-499
15-name_server=/usr/local/samba/bin/nmbd
16-smb_conf=/usr/local/samba/lib/smb.conf
17-samba_server=/usr/local/samba/bin/smbd
18+name_server=/usr/sbin/nmbd
19+smb_conf=/etc/samba/smb.conf
20+samba_server=/usr/sbin/smbd
21 run_from_inetd=0
22-samba_password_program=/usr/local/samba/bin/smbpasswd
23-samba_status_program=/usr/local/samba/bin/smbstatus
24+samba_password_program=/usr/bin/smbpasswd
25+samba_status_program=/usr/bin/smbstatus
26 swat_path=/usr/local/samba/bin/swat
27 sort_mode=0
28 smbgroupedit=/usr/local/samba/bin/smbgroupedit
29-pdbedit=/usr/local/samba/bin/pdbedit
30-net=/usr/local/samba/bin/net
31+pdbedit=/usr/bin/pdbedit
32+net=/usr/bin/net
diff --git a/meta-webserver/recipes-webadmin/webmin/files/setup.sh b/meta-webserver/recipes-webadmin/webmin/files/setup.sh
new file mode 100755
index 0000000000..8d24f928f6
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/setup.sh
@@ -0,0 +1,340 @@
1#!/bin/sh
2# Modified version of setup.sh distributed with webmin
3
4if [ "$wadir" = "" ]; then
5 echo "ERROR: wadir not specified"
6 echo ""
7 exit 1
8fi
9
10config_dir_runtime=$config_dir
11config_dir=$prefix$config_dir
12
13wadir_runtime=$wadir
14wadir=$prefix$wadir
15
16ver=`cat "$wadir/version"`
17
18cd "$wadir"
19
20# Work out perl library path
21PERLLIB=$wadir
22
23# Validate source directory
24allmods=`cd "$wadir"; echo */module.info | sed -e 's/\/module.info//g'`
25if [ "$allmods" = "" ]; then
26 echo "ERROR: Failed to get module list"
27 echo ""
28 exit 1
29fi
30echo ""
31
32if [ "$login" = "webmin" ]; then
33 echo "ERROR: Username 'webmin' is reserved for internal use"
34 echo ""
35 exit 14
36fi
37
38# Create webserver config file
39echo $perl > $config_dir/perl-path
40echo $var_dir > $config_dir/var-path
41echo "Creating web server config files.."
42cfile=$config_dir/miniserv.conf
43echo "port=$port" >> $cfile
44echo "root=$wadir_runtime" >> $cfile
45echo "mimetypes=$wadir_runtime/mime.types" >> $cfile
46echo "addtype_cgi=internal/cgi" >> $cfile
47echo "realm=Webmin Server" >> $cfile
48echo "logfile=$var_dir/miniserv.log" >> $cfile
49echo "errorlog=$var_dir/miniserv.error" >> $cfile
50echo "pidfile=$var_dir/miniserv.pid" >> $cfile
51echo "logtime=168" >> $cfile
52echo "ppath=$ppath" >> $cfile
53echo "ssl=$ssl" >> $cfile
54echo "env_WEBMIN_CONFIG=$config_dir_runtime" >> $cfile
55echo "env_WEBMIN_VAR=$var_dir" >> $cfile
56echo "atboot=$atboot" >> $cfile
57echo "logout=$config_dir_runtime/logout-flag" >> $cfile
58if [ "$listen" != "" ]; then
59 echo "listen=$listen" >> $cfile
60else
61 echo "listen=10000" >> $cfile
62fi
63echo "denyfile=\\.pl\$" >> $cfile
64echo "log=1" >> $cfile
65echo "blockhost_failures=5" >> $cfile
66echo "blockhost_time=60" >> $cfile
67echo "syslog=1" >> $cfile
68if [ "$allow" != "" ]; then
69 echo "allow=$allow" >> $cfile
70fi
71if [ "$session" != "" ]; then
72 echo "session=$session" >> $cfile
73else
74 echo "session=1" >> $cfile
75fi
76if [ "$pam" != "" ]; then
77 echo "pam=$pam" >> $cfile
78fi
79if [ "$no_pam" != "" ]; then
80 echo "no_pam=$no_pam" >> $cfile
81fi
82echo premodules=WebminCore >> $cfile
83echo "server=MiniServ/$ver" >> $cfile
84
85md5pass=`$perl -e 'print crypt("test", "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/") eq "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/" ? "1\n" : "0\n"'`
86
87ufile=$config_dir/miniserv.users
88if [ "$crypt" != "" ]; then
89 echo "$login:$crypt:0" > $ufile
90else
91 if [ "$md5pass" = "1" ]; then
92 $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "\$1\$XXXXXXXX"),":0\n"' "$login" "$password" > $ufile
93 else
94 $perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "XX"),":0\n"' "$login" "$password" > $ufile
95 fi
96fi
97chmod 600 $ufile
98echo "userfile=$config_dir_runtime/miniserv.users" >> $cfile
99
100kfile=$config_dir/miniserv.pem
101openssl version >/dev/null 2>&1
102if [ "$?" = "0" ]; then
103 # We can generate a new SSL key for this host
104 host=`hostname`
105 openssl req -newkey rsa:512 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 >/dev/null 2>&1 <<EOF
106.
107.
108.
109Webmin Webserver on $host
110.
111*
112root@$host
113EOF
114 if [ "$?" = "0" ]; then
115 cat $tempdir/cert $tempdir/key >$kfile
116 fi
117 rm -f $tempdir/cert $tempdir/key
118fi
119if [ ! -r $kfile ]; then
120 # Fall back to the built-in key
121 cp "$wadir/miniserv.pem" $kfile
122fi
123chmod 600 $kfile
124echo "keyfile=$config_dir_runtime/miniserv.pem" >> $cfile
125
126chmod 600 $cfile
127echo "..done"
128echo ""
129
130echo "Creating access control file.."
131afile=$config_dir/webmin.acl
132rm -f $afile
133if [ "$defaultmods" = "" ]; then
134 echo "$login: $allmods" >> $afile
135else
136 echo "$login: $defaultmods" >> $afile
137fi
138chmod 600 $afile
139echo "..done"
140echo ""
141
142if [ "$login" != "root" -a "$login" != "admin" ]; then
143 # Allow use of RPC by this user
144 echo rpc=1 >>$config_dir/$login.acl
145fi
146
147if [ "$noperlpath" = "" ]; then
148 echo "Inserting path to perl into scripts.."
149 (find "$wadir" -name '*.cgi' -print ; find "$wadir" -name '*.pl' -print) | $perl "$wadir/perlpath.pl" $perl_runtime -
150 echo "..done"
151 echo ""
152fi
153
154echo "Creating start and stop scripts.."
155rm -f $config_dir/stop $config_dir/start $config_dir/restart $config_dir/reload
156echo "#!/bin/sh" >>$config_dir/start
157echo "echo Starting Webmin server in $wadir_runtime" >>$config_dir/start
158echo "trap '' 1" >>$config_dir/start
159echo "LANG=" >>$config_dir/start
160echo "export LANG" >>$config_dir/start
161echo "#PERLIO=:raw" >>$config_dir/start
162echo "unset PERLIO" >>$config_dir/start
163echo "export PERLIO" >>$config_dir/start
164echo "PERLLIB=$PERLLIB" >>$config_dir/start
165echo "export PERLLIB" >>$config_dir/start
166uname -a | grep -i 'HP/*UX' >/dev/null
167if [ $? = "0" ]; then
168 echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf &" >>$config_dir/start
169else
170 echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf" >>$config_dir/start
171fi
172
173echo "#!/bin/sh" >>$config_dir/stop
174echo "echo Stopping Webmin server in $wadir_runtime" >>$config_dir/stop
175echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/stop
176echo "kill \`cat \$pidfile\`" >>$config_dir/stop
177
178echo "#!/bin/sh" >>$config_dir/restart
179echo "$config_dir_runtime/stop && $config_dir_runtime/start" >>$config_dir/restart
180
181echo "#!/bin/sh" >>$config_dir/reload
182echo "echo Reloading Webmin server in $wadir_runtime" >>$config_dir/reload
183echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/reload
184echo "kill -USR1 \`cat \$pidfile\`" >>$config_dir/reload
185
186chmod 755 $config_dir/start $config_dir/stop $config_dir/restart $config_dir/reload
187echo "..done"
188echo ""
189
190if [ "$upgrading" = 1 ]; then
191 echo "Updating config files.."
192else
193 echo "Copying config files.."
194fi
195newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods`
196# Store the OS and version
197echo "os_type=$os_type" >> $config_dir/config
198echo "os_version=$os_version" >> $config_dir/config
199echo "real_os_type=$real_os_type" >> $config_dir/config
200echo "real_os_version=$real_os_version" >> $config_dir/config
201if [ -r /etc/system.cnf ]; then
202 # Found a caldera system config file .. get the language
203 source /etc/system.cnf
204 if [ "$CONF_LST_LANG" = "us" ]; then
205 CONF_LST_LANG=en
206 elif [ "$CONF_LST_LANG" = "uk" ]; then
207 CONF_LST_LANG=en
208 fi
209 grep "lang=$CONF_LST_LANG," "$wadir/lang_list.txt" >/dev/null 2>&1
210 if [ "$?" = 0 ]; then
211 echo "lang=$CONF_LST_LANG" >> $config_dir/config
212 fi
213fi
214
215# Turn on logging by default
216echo "log=1" >> $config_dir/config
217
218# Use licence module specified by environment variable
219if [ "$licence_module" != "" ]; then
220 echo licence_module=$licence_module >>$config_dir/config
221fi
222
223# Disallow unknown referers by default
224echo "referers_none=1" >>$config_dir/config
225echo $ver > $config_dir/version
226echo "..done"
227echo ""
228
229# Set passwd_ fields in miniserv.conf from global config
230for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do
231 grep $field= $config_dir/miniserv.conf >/dev/null
232 if [ "$?" != "0" ]; then
233 grep $field= $config_dir/config >> $config_dir/miniserv.conf
234 fi
235done
236grep passwd_mode= $config_dir/miniserv.conf >/dev/null
237if [ "$?" != "0" ]; then
238 echo passwd_mode=0 >> $config_dir/miniserv.conf
239fi
240
241# If Perl crypt supports MD5, then make it the default
242if [ "$md5pass" = "1" ]; then
243 echo md5pass=1 >> $config_dir/config
244fi
245
246# Set a special theme if none was set before
247if [ "$theme" = "" ]; then
248 theme=`cat "$wadir/defaulttheme" 2>/dev/null`
249fi
250oldthemeline=`grep "^theme=" $config_dir/config`
251oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'`
252if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then
253 themelist=$theme
254fi
255
256# Set a special overlay if none was set before
257if [ "$overlay" = "" ]; then
258 overlay=`cat "$wadir/defaultoverlay" 2>/dev/null`
259fi
260if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then
261 themelist="$themelist $overlay"
262fi
263
264# Apply the theme and maybe overlay
265if [ "$themelist" != "" ]; then
266 echo "theme=$themelist" >> $config_dir/config
267 echo "preroot=$themelist" >> $config_dir/miniserv.conf
268fi
269
270# Set the product field in the global config
271grep product= $config_dir/config >/dev/null
272if [ "$?" != "0" ]; then
273 echo product=webmin >> $config_dir/config
274fi
275
276if [ "$makeboot" = "1" ]; then
277 echo "Configuring Webmin to start at boot time.."
278 (cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/atboot.pl" $bootscript)
279 echo "..done"
280 echo ""
281fi
282
283# If password delays are not specifically disabled, enable them
284grep passdelay= $config_dir/miniserv.conf >/dev/null
285if [ "$?" != "0" ]; then
286 echo passdelay=1 >> $config_dir/miniserv.conf
287fi
288
289echo "Changing ownership and permissions .."
290# Make all config dirs non-world-readable
291for m in $newmods; do
292 chown -R root $config_dir/$m
293 chgrp -R bin $config_dir/$m
294 chmod -R og-rw $config_dir/$m
295done
296# Make miniserv config files non-world-readable
297for f in miniserv.conf miniserv.pem miniserv.users; do
298 chown -R root $config_dir/$f
299 chgrp -R bin $config_dir/$f
300 chmod -R og-rw $config_dir/$f
301done
302chmod +r $config_dir/version
303if [ "$nochown" = "" ]; then
304 # Make program directory non-world-writable, but executable
305 chown -R root "$wadir"
306 chgrp -R bin "$wadir"
307 chmod -R og-w "$wadir"
308 chmod -R a+rx "$wadir"
309fi
310if [ $var_dir != "/var" ]; then
311 # Make log directory non-world-readable or writable
312 chown -R root $prefix$var_dir
313 chgrp -R bin $prefix$var_dir
314 chmod -R og-rwx $prefix$var_dir
315fi
316# Fix up bad permissions from some older installs
317for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
318 if [ -d "$config_dir/$m" ]; then
319 chown root $config_dir/$m
320 chgrp bin $config_dir/$m
321 chmod og-rw $config_dir/$m
322 chmod og-rw $config_dir/$m/config 2>/dev/null
323 fi
324done
325
326if [ "$nopostinstall" = "" ]; then
327 echo "Running postinstall scripts .."
328 (cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl")
329 echo "..done"
330 echo ""
331fi
332
333# Enable background collection
334if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then
335 echo "Enabling background status collection .."
336 $config_dir/system-status/enable-collection.pl 5
337 echo "..done"
338 echo ""
339fi
340
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
new file mode 100644
index 0000000000..8822b92fb3
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
@@ -0,0 +1,139 @@
1SUMMARY = "Web-based administration interface"
2HOMEPAGE = "http://www.webmin.com"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c"
5
6SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
7 file://setup.sh \
8 file://init-exclude.patch \
9 file://net-generic.patch \
10 file://remove-startup-option.patch \
11 file://disable-version-check.patch \
12 file://nfs-export.patch \
13 file://exports-lib.pl.patch \
14 file://mount-excludefs.patch \
15 file://samba-config-fix.patch \
16 file://proftpd-config-fix.patch \
17 file://net-lib.pl.patch \
18 file://media-tomb.patch"
19
20SRC_URI[md5sum] = "e93bc5057a5b7d7e31ecb2bb228d7044"
21SRC_URI[sha256sum] = "3d36153406d8e5d3dcaeadba34dfb5cdbc4060b75c38339174ac97b2277f284b"
22
23inherit allarch perlnative update-rc.d
24
25do_configure() {
26 # Remove binaries and plugins for other platforms
27 rm -rf acl/Authen-SolarisRBAC-0.1*
28 rm -rf format bsdexports hpuxexports sgiexports
29 rm -rf zones rbac smf ipfw ipfilter dfsadmin
30 rm -f mount/freebsd-mounts* mount/netbsd-mounts*
31 rm -f mount/openbsd-mounts* mount/macos-mounts*
32
33 # Remove some plugins for the moment
34 rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap
35 rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix
36 rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat
37
38 # Adjust configs
39 mv init/config-debian-linux init/config-generic-linux
40 sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux
41 echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux
42 echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux
43
44 mv exports/config-debian-linux exports/config-generic-linux
45 sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux
46 sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux
47
48 # Fix insane naming that causes problems at packaging time (must be done before deleting below)
49 find . -name "*\**" | while read from
50 do
51 to=`echo "$from" | sed "s/*/ALL/"`
52 mv "$from" "$to"
53 done
54
55 # Remove some other files we don't need
56 find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete
57 find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete
58 rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam
59
60 # Don't need these at runtime (and we have our own setup script)
61 rm -f setup.sh
62 rm -f setup.pl
63
64 # Use pidof for finding PIDs
65 sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux
66}
67
68do_install() {
69 install -d ${D}${sysconfdir}
70 install -d ${D}${sysconfdir}/webmin
71 install -d ${D}${sysconfdir}/init.d
72 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
73
74 install -d ${D}${localstatedir}
75 install -d ${D}${localstatedir}/webmin
76
77 install -d ${D}${libexecdir}/webmin
78 cp -pPR ${S}/* ${D}${libexecdir}/webmin
79 rm -f ${D}${libexecdir}/webmin/webmin-init
80 rm -rf ${D}${libexecdir}/webmin/patches
81
82 # Run setup script
83 export perl=perl
84 export perl_runtime=${bindir}/perl
85 export prefix=${D}
86 export tempdir=${S}/install_tmp
87 export wadir=${libexecdir}/webmin
88 export config_dir=${sysconfdir}/webmin
89 export var_dir=${localstatedir}/webmin
90 export os_type=generic-linux
91 export os_version=0
92 export real_os_type="${DISTRO_NAME}"
93 export real_os_version="${DISTRO_VERSION}"
94 export port=10000
95 export login=admin
96 export password=password
97 export ssl=0
98 export atboot=1
99 export no_pam=1
100 mkdir -p $tempdir
101 ${S}/../setup.sh
102}
103
104INITSCRIPT_NAME = "webmin"
105INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
106
107# FIXME: some of this should be figured out automatically
108RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
109RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
110RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
111RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature"
112
113PACKAGES_DYNAMIC += "webmin-module-*"
114RRECOMMENDS_${PN} += "webmin-module-system-status"
115
116RDEPENDS_webmin-module-proc = "procps"
117RDEPENDS_webmin-module-raid = "mdadm"
118RDEPENDS_webmin-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
119RRECOMMENDS_webmin-module-fdisk = "parted"
120RRECOMMENDS_webmin-module-lvm = "lvm2"
121
122python populate_packages_prepend() {
123 import os, os.path
124
125 wadir = bb.data.expand('${libexecdir}/webmin', d)
126 wadir_image = bb.data.expand('${D}', d) + wadir
127 modules = []
128 for mod in os.listdir(wadir_image):
129 modinfo = os.path.join(wadir_image, mod, "module.info")
130 if os.path.exists(modinfo):
131 modules.append(mod)
132
133 do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True)
134}
135
136# Time-savers
137package_do_pkgconfig() {
138 :
139}