added my Recipes
This commit is contained in:
17
meta-openembedded/meta-webserver/COPYING.MIT
Normal file
17
meta-openembedded/meta-webserver/COPYING.MIT
Normal file
@@ -0,0 +1,17 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
69
meta-openembedded/meta-webserver/README
Normal file
69
meta-openembedded/meta-webserver/README
Normal file
@@ -0,0 +1,69 @@
|
||||
meta-webserver
|
||||
==============
|
||||
|
||||
This layer provides support for building web servers, web-based
|
||||
applications and related software.
|
||||
|
||||
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
This layer depends on:
|
||||
|
||||
URI: git://git.openembedded.org/openembedded-core
|
||||
subdirectory: meta
|
||||
branch: mickledore
|
||||
|
||||
For some recipes, the meta-oe layer is required:
|
||||
|
||||
URI: git://git.openembedded.org/meta-openembedded
|
||||
subdirectory: meta-oe
|
||||
branch: mickledore
|
||||
|
||||
|
||||
|
||||
Layout
|
||||
------
|
||||
|
||||
recipes-httpd/ Web servers
|
||||
recipes-php/ PHP applications
|
||||
recipes-support/ Miscellaneous support recipes
|
||||
recipes-webadmin/ Standalone web administration interfaces
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
* This layer used to provide a modphp recipe that built mod_php, but
|
||||
this is now built as part of the php recipe in meta-oe. However, since
|
||||
apache2 is required to build mod_php, and apache2 recipe is in this
|
||||
layer and recipes in meta-oe can't depend on it, mod_php is not built
|
||||
by default. If you do wish to use mod_php, you need to add "apache2"
|
||||
to the PACKAGECONFIG value for the php recipe in order to enable it.
|
||||
See here for info on how to do that:
|
||||
|
||||
http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#var-PACKAGECONFIG
|
||||
|
||||
|
||||
Maintenance
|
||||
-----------
|
||||
|
||||
Send patches / pull requests to openembedded-devel@lists.openembedded.org
|
||||
with '[meta-webserver][mickledore]' in the subject.
|
||||
|
||||
When sending single patches, please using something like:
|
||||
git send-email -M -1 --to openembedded-devel@lists.openembedded.org --subject-prefix='meta-webserver][mickledore][PATCH'
|
||||
|
||||
Layer maintainer: Armin Kuster <akuster808@gmail.com>
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
All metadata is MIT licensed unless otherwise stated. Source code included
|
||||
in tree for individual recipes is under the LICENSE stated in each recipe
|
||||
(.bb file) unless otherwise stated.
|
||||
|
||||
This README document is Copyright (C) 2012 Intel Corporation.
|
||||
|
||||
27
meta-openembedded/meta-webserver/conf/layer.conf
Normal file
27
meta-openembedded/meta-webserver/conf/layer.conf
Normal file
@@ -0,0 +1,27 @@
|
||||
# Layer configuration for meta-webserver layer
|
||||
# Copyright 2012 Intel Corporation
|
||||
|
||||
# We have a conf and classes directory, add to BBPATH
|
||||
BBPATH .= ":${LAYERDIR}"
|
||||
|
||||
# We have various recipe-* directories, add to BBFILES
|
||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||
|
||||
BBFILE_COLLECTIONS += "webserver"
|
||||
BBFILE_PATTERN_webserver := "^${LAYERDIR}/"
|
||||
BBFILE_PRIORITY_webserver = "5"
|
||||
|
||||
# This should only be incremented on significant changes that will
|
||||
# cause compatibility issues with other layers
|
||||
LAYERVERSION_webserver = "1"
|
||||
|
||||
LAYERDEPENDS_webserver = "core openembedded-layer"
|
||||
|
||||
LAYERSERIES_COMPAT_webserver = "mickledore"
|
||||
|
||||
LICENSE_PATH += "${LAYERDIR}/licenses"
|
||||
|
||||
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
|
||||
phpmyadmin->bash \
|
||||
phpmyadmin->php \
|
||||
"
|
||||
28
meta-openembedded/meta-webserver/licenses/OML
Normal file
28
meta-openembedded/meta-webserver/licenses/OML
Normal file
@@ -0,0 +1,28 @@
|
||||
This FastCGI application library source and object code (the
|
||||
"Software") and its documentation (the "Documentation") are
|
||||
copyrighted by Open Market, Inc ("Open Market"). The following terms
|
||||
apply to all files associated with the Software and Documentation
|
||||
unless explicitly disclaimed in individual files.
|
||||
|
||||
Open Market permits you to use, copy, modify, distribute, and license
|
||||
this Software and the Documentation for any purpose, provided that
|
||||
existing copyright notices are retained in all copies and that this
|
||||
notice is included verbatim in any distributions. No written
|
||||
agreement, license, or royalty fee is required for any of the
|
||||
authorized uses. Modifications to this Software and Documentation may
|
||||
be copyrighted by their authors and need not follow the licensing
|
||||
terms described here. If modifications to this Software and
|
||||
Documentation have new licensing terms, the new terms must be clearly
|
||||
indicated on the first page of each file where they apply.
|
||||
|
||||
OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE
|
||||
SOFTWARE OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY
|
||||
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN
|
||||
NO EVENT SHALL OPEN MARKET BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY
|
||||
DAMAGES ARISING FROM OR RELATING TO THIS SOFTWARE OR THE
|
||||
DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT, SPECIAL OR
|
||||
CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST PROFITS OR
|
||||
LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS".
|
||||
OPEN MARKET HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE OR
|
||||
OTHERWISE ARISING OUT OF THIS SOFTWARE OR THE DOCUMENTATION.
|
||||
60
meta-openembedded/meta-webserver/licenses/Xdebug
Normal file
60
meta-openembedded/meta-webserver/licenses/Xdebug
Normal file
@@ -0,0 +1,60 @@
|
||||
--------------------------------------------------------------------
|
||||
The Xdebug License, version 1.01
|
||||
(Based on "The PHP License", version 3.0)
|
||||
Copyright (c) 2003-2012 Derick Rethans. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The name "Xdebug" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact derick@xdebug.org.
|
||||
|
||||
4. Products derived from this software may not be called "Xdebug", nor
|
||||
may "Xdebug" appear in their name, without prior written permission
|
||||
from derick@xdebug.org.
|
||||
|
||||
5. Derick Rethans may publish revised and/or new versions of the
|
||||
license from time to time. Each version will be given a
|
||||
distinguishing version number. Once covered code has been
|
||||
published under a particular version of the license, you may
|
||||
always continue to use it under the terms of that version. You
|
||||
may also choose to use such covered code under the terms of any
|
||||
subsequent version of the license published by Derick Rethans. No
|
||||
one other than Derick Rethans has the right to modify the terms
|
||||
applicable to covered code created under this License.
|
||||
|
||||
6. Redistributions of any form whatsoever must retain the following
|
||||
acknowledgment: "This product includes Xdebug, freely available
|
||||
from <http://xdebug.org/>".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY DERICK RETHANS ``AS IS'' AND ANY
|
||||
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR
|
||||
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
This software consists of voluntary contributions made by some
|
||||
individuals on behalf of Derick Rethans.
|
||||
|
||||
Derick Rethans can be contacted via e-mail at derick@xdebug.org.
|
||||
|
||||
For more information Xdebug, please see <http://xdebug.org>.
|
||||
@@ -0,0 +1,7 @@
|
||||
SUMMARY = "meta-webserver build test image"
|
||||
|
||||
IMAGE_INSTALL = "packagegroup-core-boot"
|
||||
|
||||
LICENSE = "MIT"
|
||||
|
||||
inherit core-image
|
||||
@@ -0,0 +1,3 @@
|
||||
require meta-webserver-image-base.bb
|
||||
|
||||
IMAGE_INSTALL += "packagegroup-meta-webserver"
|
||||
@@ -0,0 +1,49 @@
|
||||
SUMMARY = "Meta-webserver packagegroups"
|
||||
|
||||
inherit packagegroup
|
||||
|
||||
PROVIDES = "${PACKAGES}"
|
||||
PACKAGES = ' \
|
||||
packagegroup-meta-webserver \
|
||||
packagegroup-meta-webserver-http \
|
||||
packagegroup-meta-webserver-php \
|
||||
packagegroup-meta-webserver-support \
|
||||
packagegroup-meta-webserver-webadmin \
|
||||
'
|
||||
|
||||
RDEPENDS:packagegroup-meta-webserver = "\
|
||||
packagegroup-meta-webserver-http \
|
||||
packagegroup-meta-webserver-php \
|
||||
packagegroup-meta-webserver-support \
|
||||
packagegroup-meta-webserver-webadmin \
|
||||
"
|
||||
|
||||
RDEPENDS:packagegroup-meta-webserver-http = "\
|
||||
apache-websocket \
|
||||
apache2 \
|
||||
${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "cherokee", "", d)} \
|
||||
hiawatha \
|
||||
monkey \
|
||||
nginx \
|
||||
nginx \
|
||||
sthttpd \
|
||||
"
|
||||
|
||||
RDEPENDS:packagegroup-meta-webserver-php = "\
|
||||
phpmyadmin \
|
||||
xdebug \
|
||||
"
|
||||
|
||||
RDEPENDS:packagegroup-meta-webserver-support = "\
|
||||
spawn-fcgi \
|
||||
fcgi \
|
||||
fcgiwrap \
|
||||
"
|
||||
|
||||
RDEPENDS:packagegroup-meta-webserver-webadmin = "\
|
||||
cockpit \
|
||||
webmin \
|
||||
netdata \
|
||||
"
|
||||
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
@@ -0,0 +1,32 @@
|
||||
SUMMARY = "Websocket module for Apache web server"
|
||||
DESCRIPTION = "Process requests using the WebSocket protocol (RFC 6455)"
|
||||
HOMEPAGE = "https://github.com/jchampio/apache-websocket/"
|
||||
SECTION = "net"
|
||||
LICENSE = "Apache-2.0"
|
||||
|
||||
inherit autotools-brokensep pkgconfig
|
||||
|
||||
DEPENDS = "apache2 apache2-native pbzip2-native"
|
||||
RDEPENDS:${PN} += "apache2"
|
||||
|
||||
# Original (github.com/disconnect/apache-websocket) is dead since 2012, the
|
||||
# fork contains patches from the modules ML and fixes CVE compliance issues
|
||||
SRC_URI = "git://github.com/jchampio/apache-websocket.git;branch=master;protocol=https"
|
||||
|
||||
SRCREV = "0ee34c77fc78ff08fd548706300b80a7bc7874e4"
|
||||
|
||||
PV = "0.1.2+git${SRCPV}"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
|
||||
|
||||
EXTRA_OECONF = "APACHECTL=${STAGING_DIR_TARGET}${sbindir}/apachectl"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${libexecdir}/apache2/modules
|
||||
install -m 755 ${B}/.libs/mod_websocket.so ${D}${libexecdir}/apache2/modules
|
||||
}
|
||||
|
||||
FILES:${PN} += " ${libexecdir}/apache2/modules/* "
|
||||
FILES:${PN}-dbg += " ${libexecdir}/apache2/modules/.debug/* "
|
||||
@@ -0,0 +1,52 @@
|
||||
From ba9015386cbc044e111d7c266f13e2be045e4bf1 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen.kooi@linaro.org>
|
||||
Date: Tue, 17 Jun 2014 09:10:57 +0200
|
||||
Subject: [PATCH] configure: use pkg-config for PCRE detection
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
|
||||
---
|
||||
configure.in | 26 +++++---------------------
|
||||
1 file changed, 5 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 38c1d0a..c799aec 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -221,27 +221,11 @@ else if which $with_pcre 2>/dev/null; then :; else
|
||||
fi
|
||||
fi
|
||||
|
||||
-AC_CHECK_TARGET_TOOLS(PCRE_CONFIG, [pcre2-config pcre-config],
|
||||
- [`which $with_pcre 2>/dev/null`], $with_pcre)
|
||||
-
|
||||
-if test "x$PCRE_CONFIG" != "x"; then
|
||||
- if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else
|
||||
- AC_MSG_ERROR([Did not find working script at $PCRE_CONFIG])
|
||||
- fi
|
||||
- case `$PCRE_CONFIG --version` in
|
||||
- [1[0-9].*])
|
||||
- AC_DEFINE(HAVE_PCRE2, 1, [Detected PCRE2])
|
||||
- ;;
|
||||
- [[1-5].*])
|
||||
- AC_MSG_ERROR([Need at least pcre version 6.0])
|
||||
- ;;
|
||||
- esac
|
||||
- AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
|
||||
- APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
|
||||
- APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs8 2>/dev/null || $PCRE_CONFIG --libs`])
|
||||
-else
|
||||
- AC_MSG_ERROR([pcre(2)-config for libpcre not found. PCRE is required and available from http://pcre.org/])
|
||||
-fi
|
||||
+PKG_CHECK_MODULES([PCRE], [libpcre], [
|
||||
+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library])
|
||||
+], [
|
||||
+ AC_MSG_ERROR([$PCRE_PKG_ERRORS])
|
||||
+])
|
||||
APACHE_SUBST(PCRE_LIBS)
|
||||
|
||||
AC_MSG_NOTICE([])
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
From 5b5eae9cdf3bae91756c717349f2f33a31888f24 Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Wed, 3 Aug 2022 12:35:16 +0800
|
||||
Subject: [PATCH] make_exports.awk: not expose the path
|
||||
|
||||
Don't print the full path in the comment line.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
build/make_exports.awk | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/make_exports.awk b/build/make_exports.awk
|
||||
index 1cf0568..44d93c5 100644
|
||||
--- a/build/make_exports.awk
|
||||
+++ b/build/make_exports.awk
|
||||
@@ -47,7 +47,9 @@ function push(line) {
|
||||
|
||||
function do_output() {
|
||||
printf("/*\n")
|
||||
- printf(" * %s\n", FILENAME)
|
||||
+ file = FILENAME
|
||||
+ sub("([^/]*[/])*", "", file)
|
||||
+ printf(" * %s\n", file)
|
||||
printf(" */\n")
|
||||
|
||||
for (i = 0; i < stackptr; i++) {
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From 5074ab3425e5f1e01fd9cfa2d9b7300ea1b3f38f Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 17 Jul 2012 11:27:39 +0100
|
||||
Subject: [PATCH] apache2: bump up the core size limit if CoreDumpDirectory is
|
||||
configured
|
||||
|
||||
Bump up the core size limit if CoreDumpDirectory is
|
||||
configured.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Note: upstreaming was discussed but there are competing desires;
|
||||
there are portability oddities here too.
|
||||
---
|
||||
server/core.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/server/core.c b/server/core.c
|
||||
index 090e397..3020090 100644
|
||||
--- a/server/core.c
|
||||
+++ b/server/core.c
|
||||
@@ -5107,6 +5107,25 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
|
||||
}
|
||||
apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
|
||||
apr_pool_cleanup_null);
|
||||
+
|
||||
+#ifdef RLIMIT_CORE
|
||||
+ if (ap_coredumpdir_configured) {
|
||||
+ struct rlimit lim;
|
||||
+
|
||||
+ if (getrlimit(RLIMIT_CORE, &lim) == 0 && lim.rlim_cur == 0) {
|
||||
+ lim.rlim_cur = lim.rlim_max;
|
||||
+ if (setrlimit(RLIMIT_CORE, &lim) == 0) {
|
||||
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
+ "core dump file size limit raised to %lu bytes",
|
||||
+ lim.rlim_cur);
|
||||
+ } else {
|
||||
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, errno, NULL,
|
||||
+ "core dump file size is zero, setrlimit failed");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
return OK;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 9c03ed909b8da0e1a288f53fda535a3f15bcf791 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 17 Jul 2012 11:27:39 +0100
|
||||
Subject: [PATCH] apache2: do not export apr/apr-util symbols when using shared
|
||||
libapr
|
||||
|
||||
There is no need to "suck in" the apr/apr-util symbols when using
|
||||
a shared libapr{,util}, it just bloats the symbol table; so don't.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Note: EXPORT_DIRS change is conditional on using shared apr
|
||||
---
|
||||
server/Makefile.in | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index 8111877..8c0c396 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -60,9 +60,6 @@ export_files:
|
||||
ls $$dir/*.h ; \
|
||||
done; \
|
||||
echo "$(top_srcdir)/server/mpm_fdqueue.h"; \
|
||||
- for dir in $(EXPORT_DIRS_APR); do \
|
||||
- ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
|
||||
- done; \
|
||||
) | sed -e s,//,/,g | sort -u > $@
|
||||
|
||||
exports.c: export_files
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
From e47cc405eadcbe37a579c375e824e20a5c53bfad Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 17 Jul 2012 11:27:39 +0100
|
||||
Subject: [PATCH] Log the SELinux context at startup.
|
||||
|
||||
Log the SELinux context at startup.
|
||||
|
||||
Upstream-Status: Inappropriate [other]
|
||||
|
||||
Note: unlikely to be any interest in this upstream
|
||||
|
||||
---
|
||||
configure.in | 5 +++++
|
||||
server/core.c | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index ea6cec3..92b74b7 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -491,6 +491,11 @@ getloadavg
|
||||
dnl confirm that a void pointer is large enough to store a long integer
|
||||
APACHE_CHECK_VOID_PTR_LEN
|
||||
|
||||
+AC_CHECK_LIB(selinux, is_selinux_enabled, [
|
||||
+ AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
|
||||
+ APR_ADDTO(AP_LIBS, [-lselinux])
|
||||
+])
|
||||
+
|
||||
AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
|
||||
[AC_TRY_RUN(#define _GNU_SOURCE
|
||||
#include <unistd.h>
|
||||
diff --git a/server/core.c b/server/core.c
|
||||
index 4da7209..d3ca25b 100644
|
||||
--- a/server/core.c
|
||||
+++ b/server/core.c
|
||||
@@ -65,6 +65,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX
|
||||
+#include <selinux/selinux.h>
|
||||
+#endif
|
||||
+
|
||||
/* LimitRequestBody handling */
|
||||
#define AP_LIMIT_REQ_BODY_UNSET ((apr_off_t) -1)
|
||||
#define AP_DEFAULT_LIMIT_REQ_BODY ((apr_off_t) 1<<30) /* 1GB */
|
||||
@@ -5126,6 +5130,28 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_SELINUX
|
||||
+ {
|
||||
+ static int already_warned = 0;
|
||||
+ int is_enabled = is_selinux_enabled() > 0;
|
||||
+
|
||||
+ if (is_enabled && !already_warned) {
|
||||
+ security_context_t con;
|
||||
+
|
||||
+ if (getcon(&con) == 0) {
|
||||
+
|
||||
+ ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL,
|
||||
+ "SELinux policy enabled; "
|
||||
+ "httpd running as context %s", con);
|
||||
+
|
||||
+ already_warned = 1;
|
||||
+
|
||||
+ freecon(con);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
From e59aab44a28c654e518080693d573ca472ca5a08 Mon Sep 17 00:00:00 2001
|
||||
From: Yulong Pei <Yulong.pei@windriver.com>
|
||||
Date: Thu, 1 Sep 2011 01:03:14 +0800
|
||||
Subject: [PATCH] replace lynx to curl in apachectl script
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Yulong Pei <Yulong.pei@windriver.com>
|
||||
---
|
||||
support/apachectl.in | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/support/apachectl.in b/support/apachectl.in
|
||||
index 3281c2e..6ab4ba5 100644
|
||||
--- a/support/apachectl.in
|
||||
+++ b/support/apachectl.in
|
||||
@@ -52,11 +52,11 @@ fi
|
||||
# a command that outputs a formatted text version of the HTML at the
|
||||
# url given on the command line. Designed for lynx, however other
|
||||
# programs may work.
|
||||
-LYNX="@LYNX_PATH@ -dump"
|
||||
+CURL="/usr/bin/curl"
|
||||
#
|
||||
# the URL to your server's mod_status status page. If you do not
|
||||
# have one, then status and fullstatus will not work.
|
||||
-STATUSURL="http://localhost:@PORT@/server-status"
|
||||
+STATUSURL="http://localhost:@PORT@/"
|
||||
#
|
||||
# Set this variable to a command that increases the maximum
|
||||
# number of file descriptors allowed per child process. This is
|
||||
@@ -92,10 +92,16 @@ configtest)
|
||||
ERROR=$?
|
||||
;;
|
||||
status)
|
||||
- $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } '
|
||||
+ $CURL -s $STATUSURL | grep -o "It works!"
|
||||
+ if [ $? != 0 ] ; then
|
||||
+ echo The httpd server does not work!
|
||||
+ fi
|
||||
;;
|
||||
fullstatus)
|
||||
- $LYNX $STATUSURL
|
||||
+ $CURL -s $STATUSURL | grep -o "It works!"
|
||||
+ if [ $? != 0 ] ; then
|
||||
+ echo The httpd server does not work!
|
||||
+ fi
|
||||
;;
|
||||
*)
|
||||
$HTTPD "$@"
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
From fb09f1fe4525058b16b3d4edb2e3ae693154026e Mon Sep 17 00:00:00 2001
|
||||
From: Zhenhua Luo <zhenhua.luo@freescale.com>
|
||||
Date: Fri, 25 Jan 2013 18:10:50 +0800
|
||||
Subject: [PATCH] apache2: fix the race issue of parallel installation
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
fix following race issue when do parallel install
|
||||
| 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
|
||||
...
|
||||
| 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
|
||||
| make[1]: *** [install-man] Error 1
|
||||
| make[1]: *** Waiting for unfinished jobs....
|
||||
|
||||
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
|
||||
---
|
||||
build/mkdir.sh | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/mkdir.sh b/build/mkdir.sh
|
||||
index e2d5bb6..dde5ae0 100755
|
||||
--- a/build/mkdir.sh
|
||||
+++ b/build/mkdir.sh
|
||||
@@ -39,7 +39,7 @@ for file in ${1+"$@"} ; do
|
||||
esac
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
- mkdir "$pathcomp" || errstatus=$?
|
||||
+ mkdir -p "$pathcomp" || errstatus=$?
|
||||
fi
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 0686564f64130f230870db8b4846973e3edbd646 Mon Sep 17 00:00:00 2001
|
||||
From: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
Date: Mon, 1 Dec 2014 02:08:27 -0500
|
||||
Subject: [PATCH] apache2: allow to disable selinux support
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
|
||||
---
|
||||
configure.in | 14 ++++++++++----
|
||||
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 76811e7..4df3ff3 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -491,10 +491,16 @@ getloadavg
|
||||
dnl confirm that a void pointer is large enough to store a long integer
|
||||
APACHE_CHECK_VOID_PTR_LEN
|
||||
|
||||
-AC_CHECK_LIB(selinux, is_selinux_enabled, [
|
||||
- AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
|
||||
- APR_ADDTO(AP_LIBS, [-lselinux])
|
||||
-])
|
||||
+# SELinux support
|
||||
+AC_ARG_ENABLE(selinux,APACHE_HELP_STRING(--enable-selinux,Enable SELinux support [default=auto]),
|
||||
+ [],[enable_selinux=auto])
|
||||
+
|
||||
+if test x$enable_selinux != xno; then
|
||||
+ AC_CHECK_LIB(selinux, is_selinux_enabled, [
|
||||
+ AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
|
||||
+ APR_ADDTO(AP_LIBS, [-lselinux])
|
||||
+ ])
|
||||
+fi
|
||||
|
||||
AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
|
||||
[AC_TRY_RUN(#define _GNU_SOURCE
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
From 443d15b91d4e4979d92405610303797663f31102 Mon Sep 17 00:00:00 2001
|
||||
From: echo <fei.geng@windriver.com>
|
||||
Date: Tue, 28 Apr 2009 03:11:06 +0000
|
||||
Subject: [PATCH] Fix perl install directory to /usr/bin
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Add back this patch. Without this patch, apxs's shebang will use
|
||||
perl under hosttools, which can be too long for shebang, and cause
|
||||
error:
|
||||
bad interpreter: No such file or directory
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
---
|
||||
configure.in | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 4df3ff3..4eeb609 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -903,10 +903,7 @@ AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf",
|
||||
AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types",
|
||||
[Location of the MIME types config file, relative to the Apache root directory])
|
||||
|
||||
-perlbin=`$ac_aux_dir/PrintPath perl`
|
||||
-if test "x$perlbin" = "x"; then
|
||||
- perlbin="/replace/with/path/to/perl/interpreter"
|
||||
-fi
|
||||
+perlbin='/usr/bin/perl'
|
||||
AC_SUBST(perlbin)
|
||||
|
||||
dnl If we are running on BSD/OS, we need to use the BSD .include syntax.
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
From 43a4ad04e0d8771267a73f98b5918bcd10b167ec Mon Sep 17 00:00:00 2001
|
||||
From: Trevor Gamblin <trevor.gamblin@windriver.com>
|
||||
Date: Fri, 17 Apr 2020 06:31:35 -0700
|
||||
Subject: [PATCH] support/apxs.in: force destdir to be empty string
|
||||
|
||||
If destdir is assigned to anything other than the empty string, the
|
||||
search path for apache2 config files is appended to itself, and
|
||||
related packages like apache-websocket will be unable to locate them:
|
||||
|
||||
| cannot open
|
||||
/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot//usr/share/apache2/build/config_vars.mk:
|
||||
No such file or directory at
|
||||
/ala-lpggp31/tgamblin/yocto/poky.git/build/tmp/work/core2-64-poky-linux/apache-websocket/0.1.1+gitAUTOINC+6968083264-r0/recipe-sysroot/usr/bin/crossscripts/apxs
|
||||
line 213.
|
||||
|
||||
Ensure that it is always the empty string so that apache-websocket
|
||||
is able to find the required config files.
|
||||
|
||||
Upstream-Status: Inappropriate (embedded-specific)
|
||||
|
||||
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
|
||||
---
|
||||
support/apxs.in | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/support/apxs.in b/support/apxs.in
|
||||
index b2705fa..781f2ab 100644
|
||||
--- a/support/apxs.in
|
||||
+++ b/support/apxs.in
|
||||
@@ -28,10 +28,12 @@ package apxs;
|
||||
# is the empty string.
|
||||
|
||||
my $destdir = "";
|
||||
-my $ddi = rindex($0, "@exp_bindir@");
|
||||
-if ($ddi >= 0) {
|
||||
- $destdir = substr($0, 0, $ddi);
|
||||
-}
|
||||
+# Comment out assignment of destdir so that it doesn't affect bitbake
|
||||
+# cross-compilation setup
|
||||
+#my $ddi = rindex($0, "@exp_bindir@");
|
||||
+#if ($ddi >= 0) {
|
||||
+# $destdir = substr($0, 0, $ddi);
|
||||
+#}
|
||||
|
||||
my %config_vars = ();
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From d9993cbc33565c0acd29b0127d651dafa2a16975 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Date: Tue, 17 Jul 2012 11:27:39 +0100
|
||||
Subject: [PATCH] apache2: do not use relative path for gen_test_char
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
---
|
||||
server/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index 8c0c396..3544f55 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -29,7 +29,7 @@ gen_test_char: $(gen_test_char_OBJECTS)
|
||||
$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS)
|
||||
|
||||
test_char.h: gen_test_char
|
||||
- ./gen_test_char > test_char.h
|
||||
+ gen_test_char > test_char.h
|
||||
|
||||
util.lo: test_char.h
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 5c9257fa34335ff83f7c01581cf953111072a457 Mon Sep 17 00:00:00 2001
|
||||
From: Valeria Petrov <valeria.petrov@spinetix.com>
|
||||
Date: Tue, 18 Apr 2023 15:38:53 +0200
|
||||
Subject: [PATCH] * modules/mappers/config9.m4: Add 'server' directory to
|
||||
include path if mod_rewrite is enabled.
|
||||
|
||||
Upstream-Status: Accepted [https://svn.apache.org/viewvc?view=revision&revision=1909241]
|
||||
|
||||
---
|
||||
modules/mappers/config9.m4 | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4
|
||||
index 55a97ab993..7120b729b7 100644
|
||||
--- a/modules/mappers/config9.m4
|
||||
+++ b/modules/mappers/config9.m4
|
||||
@@ -14,6 +14,11 @@ APACHE_MODULE(userdir, mapping of requests to user-specific directories, , , mos
|
||||
APACHE_MODULE(alias, mapping of requests to different filesystem parts, , , yes)
|
||||
APACHE_MODULE(rewrite, rule based URL manipulation, , , most)
|
||||
|
||||
+if test "x$enable_rewrite" != "xno"; then
|
||||
+ # mod_rewrite needs test_char.h
|
||||
+ APR_ADDTO(INCLUDES, [-I\$(top_builddir)/server])
|
||||
+fi
|
||||
+
|
||||
APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
|
||||
|
||||
APACHE_MODPATH_FINISH
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
DESCRIPTION = "The Apache HTTP Server is a powerful, efficient, and \
|
||||
extensible web server."
|
||||
SUMMARY = "Apache HTTP Server"
|
||||
HOMEPAGE = "http://httpd.apache.org/"
|
||||
SECTION = "net"
|
||||
LICENSE = "Apache-2.0"
|
||||
|
||||
SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
|
||||
file://0001-configure-use-pkg-config-for-PCRE-detection.patch \
|
||||
file://0002-apache2-bump-up-the-core-size-limit-if-CoreDumpDirec.patch \
|
||||
file://0003-apache2-do-not-export-apr-apr-util-symbols-when-usin.patch \
|
||||
file://0004-apache2-log-the-SELinux-context-at-startup.patch \
|
||||
file://0005-replace-lynx-to-curl-in-apachectl-script.patch \
|
||||
file://0006-apache2-fix-the-race-issue-of-parallel-installation.patch \
|
||||
file://0007-apache2-allow-to-disable-selinux-support.patch \
|
||||
file://0008-Fix-perl-install-directory-to-usr-bin.patch \
|
||||
file://0009-support-apxs.in-force-destdir-to-be-empty-string.patch \
|
||||
file://0001-make_exports.awk-not-expose-the-path.patch \
|
||||
file://0011-modules-mappers-config9.m4-Add-server-directory-to-i.patch \
|
||||
"
|
||||
|
||||
SRC_URI:append:class-target = " \
|
||||
file://0010-apache2-do-not-use-relative-path-for-gen_test_char.patch \
|
||||
file://init \
|
||||
file://apache2-volatile.conf \
|
||||
file://apache2.service \
|
||||
file://volatiles.04_apache2 \
|
||||
"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
|
||||
SRC_URI[sha256sum] = "dbccb84aee95e095edfbb81e5eb926ccd24e6ada55dcd83caecb262e5cf94d2a"
|
||||
|
||||
S = "${WORKDIR}/httpd-${PV}"
|
||||
|
||||
inherit autotools update-rc.d pkgconfig systemd update-alternatives
|
||||
|
||||
DEPENDS = "openssl expat pcre apr apr-util apache2-native "
|
||||
|
||||
CVE_PRODUCT = "http_server"
|
||||
|
||||
SSTATE_SCAN_FILES += "apxs config_vars.mk config.nice"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
|
||||
PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux"
|
||||
PACKAGECONFIG[openldap] = "--enable-ldap --enable-authnz-ldap,--disable-ldap --disable-authnz-ldap,openldap"
|
||||
PACKAGECONFIG[zlib] = "--enable-deflate,,zlib,zlib"
|
||||
|
||||
CFLAGS:append = " -DPATH_MAX=4096"
|
||||
|
||||
EXTRA_OECONF:class-target = "\
|
||||
--enable-layout=Debian \
|
||||
--prefix=${base_prefix} \
|
||||
--exec_prefix=${exec_prefix} \
|
||||
--includedir=${includedir}/${BPN} \
|
||||
--sysconfdir=${sysconfdir}/${BPN} \
|
||||
--datadir=${datadir}/${BPN} \
|
||||
--libdir=${libdir} \
|
||||
--libexecdir=${libexecdir}/${BPN}/modules \
|
||||
--localstatedir=${localstatedir} \
|
||||
--enable-ssl \
|
||||
--with-dbm=sdbm \
|
||||
--with-gdbm=no \
|
||||
--with-ndbm=no \
|
||||
--with-berkeley-db=no \
|
||||
--enable-info \
|
||||
--enable-rewrite \
|
||||
--enable-mpms-shared \
|
||||
ap_cv_void_ptr_lt_long=no \
|
||||
ac_cv_have_threadsafe_pollset=no \
|
||||
"
|
||||
|
||||
EXTRA_OECONF:class-native = "\
|
||||
--prefix=${prefix} \
|
||||
--includedir=${includedir}/${BPN} \
|
||||
--sysconfdir=${sysconfdir}/${BPN} \
|
||||
--datadir=${datadir}/${BPN} \
|
||||
--libdir=${libdir} \
|
||||
--libexecdir=${libdir}/${BPN}/modules \
|
||||
--localstatedir=${localstatedir} \
|
||||
"
|
||||
|
||||
do_configure:prepend() {
|
||||
sed -i -e 's:$''{prefix}/usr/lib/cgi-bin:$''{libexecdir}/cgi-bin:g' ${S}/config.layout
|
||||
}
|
||||
|
||||
do_install:append:class-target() {
|
||||
install -d ${D}/${sysconfdir}/init.d
|
||||
|
||||
cat ${WORKDIR}/init | \
|
||||
sed -e 's,/usr/sbin/,${sbindir}/,g' \
|
||||
-e 's,/usr/bin/,${bindir}/,g' \
|
||||
-e 's,/usr/lib/,${libdir}/,g' \
|
||||
-e 's,/etc/,${sysconfdir}/,g' \
|
||||
-e 's,/usr/,${prefix}/,g' > ${D}/${sysconfdir}/init.d/${BPN}
|
||||
|
||||
chmod 755 ${D}/${sysconfdir}/init.d/${BPN}
|
||||
|
||||
# Remove the goofy original files...
|
||||
rm -rf ${D}/${sysconfdir}/${BPN}/original
|
||||
|
||||
install -d ${D}${sysconfdir}/${BPN}/conf.d
|
||||
install -d ${D}${sysconfdir}/${BPN}/modules.d
|
||||
|
||||
# Ensure configuration file pulls in conf.d and modules.d
|
||||
printf "\nIncludeOptional ${sysconfdir}/${BPN}/conf.d/*.conf" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.load" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
printf "\nIncludeOptional ${sysconfdir}/${BPN}/modules.d/*.conf\n\n" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
|
||||
# Match with that is in init script
|
||||
printf "\nPidFile /run/httpd.pid" >> ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
|
||||
# Set 'ServerName' to fix error messages when restart apache service
|
||||
sed -i 's/^#ServerName www.example.com/ServerName localhost/' ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
|
||||
sed -i 's/^ServerRoot/#ServerRoot/' ${D}/${sysconfdir}/${BPN}/httpd.conf
|
||||
|
||||
sed -i -e 's,${STAGING_DIR_TARGET},,g' \
|
||||
-e 's,${DEBUG_PREFIX_MAP},,g' \
|
||||
-e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-ffile-prefix-map[^ ]*,,g' \
|
||||
-e 's,${HOSTTOOLS_DIR}/,,g' \
|
||||
-e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
|
||||
-e 's,APU_CONFIG = .*,APU_CONFIG = ,g' ${D}${datadir}/apache2/build/config_vars.mk
|
||||
|
||||
sed -i -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
|
||||
-e 's,${DEBUG_PREFIX_MAP},,g' \
|
||||
-e 's,${RECIPE_SYSROOT},,g' \
|
||||
-e 's,-fdebug-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g; s,-fmacro-prefix-map[^ ]*,,g' \
|
||||
-e 's,APU_INCLUDEDIR = .*,APU_INCLUDEDIR = ,g' \
|
||||
-e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d/
|
||||
install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
|
||||
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
|
||||
elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
|
||||
fi
|
||||
|
||||
rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars*
|
||||
chown -R root:root ${D}
|
||||
}
|
||||
|
||||
do_install:append:class-native() {
|
||||
install -d ${D}${bindir} ${D}${libdir}
|
||||
install -m 755 server/gen_test_char ${D}${bindir}
|
||||
}
|
||||
|
||||
SYSROOT_PREPROCESS_FUNCS:append:class-target = " apache_sysroot_preprocess"
|
||||
|
||||
apache_sysroot_preprocess() {
|
||||
install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
|
||||
install -m 755 ${D}${bindir}/apxs ${SYSROOT_DESTDIR}${bindir_crossscripts}
|
||||
install -d ${SYSROOT_DESTDIR}${sbindir}
|
||||
install -m 755 ${D}${sbindir}/apachectl ${SYSROOT_DESTDIR}${sbindir}
|
||||
sed -i 's!my $installbuilddir = .*!my $installbuilddir = "${STAGING_DIR_HOST}/${datadir}/${BPN}/build";!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/apxs
|
||||
|
||||
sed -i 's!^APR_CONFIG = .*!APR_CONFIG = ${STAGING_BINDIR_CROSS}/apr-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!^APU_CONFIG = .*!APU_CONFIG = ${STAGING_BINDIR_CROSS}/apu-1-config!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!^includedir = .*!includedir = ${STAGING_INCDIR}/apache2!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!^CFLAGS = -I[^ ]*!CFLAGS = -I${STAGING_INCDIR}/openssl!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!^EXTRA_LDFLAGS = .*!EXTRA_LDFLAGS = -L${STAGING_LIBDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!^EXTRA_INCLUDES = .*!EXTRA_INCLUDES = -I$(includedir) -I. -I${STAGING_INCDIR}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
sed -i 's!--sysroot=[^ ]*!--sysroot=${STAGING_DIR_HOST}!' ${SYSROOT_DESTDIR}${datadir}/${BPN}/build/config_vars.mk
|
||||
}
|
||||
|
||||
# Implications - used by update-rc.d scripts
|
||||
INITSCRIPT_NAME = "apache2"
|
||||
INITSCRIPT_PARAMS = "defaults 91 20"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "apache2.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
|
||||
|
||||
ALTERNATIVE:${PN}-doc = "htpasswd.1"
|
||||
ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
|
||||
|
||||
PACKAGES = "${PN}-utils ${PN}-scripts ${PN}-doc ${PN}-dev ${PN}-dbg ${PN}"
|
||||
|
||||
CONFFILES:${PN} = "${sysconfdir}/${BPN}/httpd.conf \
|
||||
${sysconfdir}/${BPN}/magic \
|
||||
${sysconfdir}/${BPN}/mime.types \
|
||||
${sysconfdir}/${BPN}/extra/*"
|
||||
|
||||
FILES:${PN}-utils = "${bindir}/ab \
|
||||
${bindir}/htdbm \
|
||||
${bindir}/htdigest \
|
||||
${bindir}/htpasswd \
|
||||
${bindir}/logresolve \
|
||||
${bindir}/httxt2dbm \
|
||||
${sbindir}/htcacheclean \
|
||||
${sbindir}/fcgistarter \
|
||||
${sbindir}/checkgid \
|
||||
${sbindir}/rotatelogs \
|
||||
"
|
||||
|
||||
# We override here rather than append so that .so links are
|
||||
# included in the runtime package rather than here (-dev)
|
||||
# and to get build, icons, error into the -dev package
|
||||
FILES:${PN}-dev = "${datadir}/${BPN}/build \
|
||||
${datadir}/${BPN}/icons \
|
||||
${datadir}/${BPN}/error \
|
||||
${includedir}/${BPN} \
|
||||
${bindir}/apxs \
|
||||
"
|
||||
|
||||
# Add the manual to -doc
|
||||
FILES:${PN}-doc += " ${datadir}/${BPN}/manual"
|
||||
|
||||
FILES:${PN}-scripts += "${bindir}/dbmmanage"
|
||||
|
||||
# Override this too - here is the default, less datadir
|
||||
FILES:${PN} = "${bindir} ${sbindir} ${libexecdir} ${libdir} \
|
||||
${sysconfdir} ${libdir}/${BPN}"
|
||||
|
||||
# We want htdocs and cgi-bin to go with the binary
|
||||
FILES:${PN} += "${datadir}/${BPN}/ ${libdir}/cgi-bin"
|
||||
|
||||
FILES:${PN}-dbg += "${libdir}/${BPN}/modules/.debug"
|
||||
|
||||
RDEPENDS:${PN} += "openssl libgcc ${PN}-utils"
|
||||
RDEPENDS:${PN}-scripts += "perl ${PN}"
|
||||
RDEPENDS:${PN}-dev = "perl"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
pkg_postinst:${PN}() {
|
||||
if [ -z "$D" ]; then
|
||||
if type systemd-tmpfiles >/dev/null; then
|
||||
systemd-tmpfiles --create
|
||||
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
|
||||
${sysconfdir}/init.d/populate-volatile.sh update
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
d /run/apache2 0755 root root -
|
||||
d /var/log/apache2 0755 root root -
|
||||
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=The Apache HTTP Server
|
||||
After=network.target remote-fs.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=LANG=C
|
||||
ExecStart=@SBINDIR@/httpd -DFOREGROUND -D SSL -D PHP5 -k start
|
||||
ExecStop=@BASE_BINDIR@/kill -WINCH ${MAINPID}
|
||||
KillSignal=SIGCONT
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,230 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: httpd
|
||||
# Required-Start: $local_fs $remote_fs $network $named
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# Should-Start: distcache
|
||||
# Short-Description: start and stop Apache HTTP Server
|
||||
# Description: The Apache HTTP Server is an extensible server
|
||||
# implementing the current HTTP standards.
|
||||
### END INIT INFO
|
||||
|
||||
ARGS="-D SSL -D PHP5 -k start"
|
||||
NAME=apache2
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
DAEMON=/usr/sbin/httpd
|
||||
SUEXEC=/usr/lib/apache/suexec
|
||||
PIDFILE=/run/httpd.pid
|
||||
CONF=/etc/apache2/httpd.conf
|
||||
APACHECTL=/usr/sbin/apachectl
|
||||
|
||||
trap "" 1
|
||||
export LANG=C
|
||||
export PATH
|
||||
|
||||
test -f $DAEMON || exit 0
|
||||
test -f $APACHECTL || exit 0
|
||||
|
||||
# ensure we don't leak environment vars into apachectl
|
||||
APACHECTL="env -i LANG=${LANG} PATH=${PATH} $APACHECTL"
|
||||
|
||||
apache_conftest() {
|
||||
if $($APACHECTL configtest > /dev/null 2>&1 ); then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
apache_wait_start() {
|
||||
local STATUS=$1
|
||||
|
||||
if [ $STATUS != 0 ] ; then
|
||||
return $STATUS
|
||||
fi
|
||||
|
||||
local i=0
|
||||
while : ; do
|
||||
PIDTMP=$(pidof $DAEMON | tr ' ' '\n' | grep -w $(cat $PIDFILE))
|
||||
if [ -n "${PIDTMP:-}" ] && kill -0 "${PIDTMP:-}" 2> /dev/null; then
|
||||
return $STATUS
|
||||
fi
|
||||
|
||||
if [ $i = "20" ] ; then
|
||||
return 2
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
i=$(($i+1))
|
||||
done
|
||||
}
|
||||
|
||||
apache_wait_stop() {
|
||||
local STATUS=$1
|
||||
|
||||
if [ $STATUS != 0 ] ; then
|
||||
return $STATUS
|
||||
fi
|
||||
|
||||
PIDTMP=$(pidof $DAEMON | tr ' ' '\n' | grep -w $(cat $PIDFILE))
|
||||
if [ -n "${PIDTMP:-}" ] && kill -0 "${PIDTMP:-}" 2> /dev/null; then
|
||||
local i=0
|
||||
while kill -0 "${PIDTMP:-}" 2> /dev/null; do
|
||||
if [ $i = '60' ]; then
|
||||
STATUS=2
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
i=$(($i+1))
|
||||
done
|
||||
return $STATUS
|
||||
else
|
||||
return $STATUS
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
|
||||
if [ -e $PIDFILE ] && pidof $DAEMON | tr ' ' '\n' | grep -w $(cat $PIDFILE) > /dev/null 2>&1 ; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if apache_conftest ; then
|
||||
$APACHECTL start
|
||||
apache_wait_start $?
|
||||
return $?
|
||||
else
|
||||
return 2
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
|
||||
local AP_RET=0
|
||||
|
||||
if pidof $DAEMON > /dev/null 2>&1 ; then
|
||||
if [ -e $PIDFILE ] && pidof $DAEMON | tr ' ' '\n' | grep -w $(cat $PIDFILE) > /dev/null 2>&1 ; then
|
||||
AP_RET=2
|
||||
else
|
||||
AP_RET=1
|
||||
fi
|
||||
else
|
||||
AP_RET=0
|
||||
fi
|
||||
|
||||
# AP_RET is:
|
||||
# 0 if Apache (whichever) is not running
|
||||
# 1 if Apache (whichever) is running
|
||||
# 2 if Apache from the PIDFILE is running
|
||||
|
||||
if [ $AP_RET = 0 ] ; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ $AP_RET = 2 ] && apache_conftest ; then
|
||||
$APACHECTL stop
|
||||
apache_wait_stop $?
|
||||
return $?
|
||||
else
|
||||
if [ $AP_RET = 2 ]; then
|
||||
kill $(pidof $DAEMON | tr ' ' '\n' | grep -w $(cat $PIDFILE))
|
||||
apache_wait_stop $?
|
||||
return $?
|
||||
elif [ $AP_RET = 1 ] ; then
|
||||
return 2
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting web server: $NAME"
|
||||
do_start
|
||||
case $? in
|
||||
0|1)
|
||||
echo .
|
||||
exit 0
|
||||
;;
|
||||
2)
|
||||
echo failed
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping web server: $NAME"
|
||||
do_stop
|
||||
case $? in
|
||||
0|1)
|
||||
echo .
|
||||
exit 0
|
||||
;;
|
||||
2)
|
||||
echo failed
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
reload)
|
||||
echo -n "Reloading $NAME configuration"
|
||||
kill -HUP `cat $PIDFILE`
|
||||
;;
|
||||
|
||||
reload-modules)
|
||||
echo -n "Reloading $NAME modules"
|
||||
$APACHECTL restart
|
||||
;;
|
||||
|
||||
restart)
|
||||
echo "Restarting web server: $NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
exit $?
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
force-reload)
|
||||
$0 reload-modules
|
||||
exit $?
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: /etc/init.d/$NAME {start|stop|reload|reload-modules|force-reload|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ $? = 0 ]; then
|
||||
echo .
|
||||
exit 0
|
||||
else
|
||||
echo failed
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,3 @@
|
||||
# <type> <owner> <group> <mode> <path> <linksource>
|
||||
d root root 0755 /var/run/apache2 none
|
||||
d root root 0755 /var/log/apache2 none
|
||||
@@ -0,0 +1,47 @@
|
||||
From c73415021f3f3b2b30062ab74b25fe49c51c2242 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 10 Nov 2019 15:59:44 -0800
|
||||
Subject: [PATCH] common-internal.h: Define LLONG_MAX if undefined
|
||||
|
||||
time_t can also be long long type, therefore check for that as fallback
|
||||
Fixes build on 32bit hosts where time_t is fixed for Y2K38
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
cherokee/common-internal.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/cherokee/common-internal.h b/cherokee/common-internal.h
|
||||
index 5c28da97..5646ec0f 100644
|
||||
--- a/cherokee/common-internal.h
|
||||
+++ b/cherokee/common-internal.h
|
||||
@@ -222,6 +222,16 @@ char *strcasestr(char *s, char *find);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* Long Long limit
|
||||
+ */
|
||||
+#ifndef LLONG_MAX
|
||||
+# if (__SIZEOF_LONG_LONG__ == 8)
|
||||
+# define LLONG_MAX 0x7fffffffffffffffLL
|
||||
+# else
|
||||
+# error "Can't define LLONG_MAX"
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* time_t limit
|
||||
*/
|
||||
#ifndef TIME_MAX
|
||||
@@ -229,6 +239,8 @@ char *strcasestr(char *s, char *find);
|
||||
# define TIME_MAX ((time_t)INT_MAX)
|
||||
# elif (SIZEOF_TIME_T == SIZEOF_LONG)
|
||||
# define TIME_MAX ((time_t)LONG_MAX)
|
||||
+# elif (SIZEOF_TIME_T == __SIZEOF_LONG_LONG__)
|
||||
+# define TIME_MAX ((time_t)LLONG_MAX)
|
||||
# else
|
||||
# error "Can't define TIME_MAX"
|
||||
# endif
|
||||
--
|
||||
2.24.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 4591b5b40d66c19edc73b951ad091dac639454c9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 25 Jul 2017 16:00:34 -0700
|
||||
Subject: [PATCH] configure.ac: Add foreign to AM_INIT_AUTOMAKE
|
||||
|
||||
Fixes errors like
|
||||
| Makefile.am: error: required file './README' not found
|
||||
| Makefile.am: error: required file './ChangeLog' not found
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d6298f27..98cab791 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -32,7 +32,7 @@ dnl Init autoconf and automake
|
||||
AC_INIT([cherokee], [cherokee_version], [http://bugs.cherokee-project.com/], [cherokee])
|
||||
AC_CONFIG_SRCDIR([cherokee/server.c])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
-AM_INIT_AUTOMAKE([no-define])
|
||||
+AM_INIT_AUTOMAKE([no-define foreign])
|
||||
|
||||
dnl Define version
|
||||
AC_DEFINE(PACKAGE_MAJOR_VERSION, "cherokee_major_version", [Version string])
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From e9ae3231ec188df801fe51aa95d6afec2e52db58 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 25 Jul 2017 16:14:19 -0700
|
||||
Subject: [PATCH] make: Do not build po files
|
||||
|
||||
Target fails to build
|
||||
|
||||
Upstream-Status: Inappropriate [Cross-compile specific]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index f01278c3..eb864c36 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
## Cherokee: Makefile.am -*- makefile -*-
|
||||
|
||||
-SUBDIRS = po m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
|
||||
+SUBDIRS = m4 www icons themes qa doc . admin contrib cherokee cget packages dbslayer
|
||||
SUFFIXES = .sample.pre .sample .h.pre .h .xml.pre .xml
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 98a0f19df0a31d5649ad89d395fd1b8de5591827 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Thu, 3 Apr 2014 21:33:25 +0800
|
||||
Subject: [PATCH] admin/Makefile.am: only install configured.py once
|
||||
|
||||
Both the two rules install-adminpyDATA and install-generatedDATA will
|
||||
install the configured.py to the same location, they can run parallel,
|
||||
and they use "install -m", which would might build failures:
|
||||
|
||||
/usr/bin/install: setting permissions for `/path/to/configured.py': No such file or directory
|
||||
|
||||
This is because the first install is setting the permission while the
|
||||
second install is removing the file an re-install.
|
||||
|
||||
Only install the configured.py once will fix the problem, I think that
|
||||
there is no side effect since it installed the same file to the same
|
||||
location twice in the past.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
admin/Makefile.am | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/admin/Makefile.am b/admin/Makefile.am
|
||||
index ce5937b..6f96934 100644
|
||||
--- a/admin/Makefile.am
|
||||
+++ b/admin/Makefile.am
|
||||
@@ -73,7 +73,6 @@ SystemStatsWidgets.py \
|
||||
Wizard.py \
|
||||
XMLServerDigest.py \
|
||||
config_version.py \
|
||||
-configured.py \
|
||||
consts.py \
|
||||
util.py \
|
||||
popen.py \
|
||||
--
|
||||
1.8.2.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
DAEMON=/usr/sbin/cherokee
|
||||
CONFIG=/etc/cherokee/cherokee.conf
|
||||
PIDFILE=/var/run/cherokee.pid
|
||||
NAME="cherokee"
|
||||
DESC="Cherokee http server"
|
||||
|
||||
test -r /etc/default/cherokee && . /etc/default/cherokee
|
||||
test -x "$DAEMON" || exit 0
|
||||
test ! -r "$CONFIG" && exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Starting $DESC: "
|
||||
start-stop-daemon --oknodo -S -x $DAEMON -- -d -C $CONFIG
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping $DESC:"
|
||||
start-stop-daemon -K -p $PIDFILE
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop >/dev/null 2>&1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Cherokee web server
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/cherokee -d -C /etc/cherokee/cherokee.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,77 @@
|
||||
SUMMARY = "Cherokee Web Server fast and secure"
|
||||
SUMMARY:cget = "Small downloader based in the Cherokee client library"
|
||||
HOMEPAGE = "http://www.cherokee-project.com/"
|
||||
SECTION = "network"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
|
||||
|
||||
DEPENDS = "unzip-native libpcre openssl mysql5 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||
|
||||
SRCREV = "9a75e65b876bcc376cb6b379dca1f7ce4a055c59"
|
||||
PV = "1.2.104+git${SRCPV}"
|
||||
SRC_URI = "git://github.com/cherokee/webserver;branch=master;protocol=https \
|
||||
file://cherokee.init \
|
||||
file://cherokee.service \
|
||||
file://cherokee-install-configured.py-once.patch \
|
||||
file://0001-configure.ac-Add-foreign-to-AM_INIT_AUTOMAKE.patch \
|
||||
file://0001-make-Do-not-build-po-files.patch \
|
||||
file://0001-common-internal.h-Define-LLONG_MAX-if-undefined.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools-brokensep pkgconfig binconfig update-rc.d systemd ${@bb.utils.contains("BBFILE_COLLECTIONS", "meta-python2", "pythonnative", "", d)}
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
PACKAGECONFIG[ffmpeg] = "--with-ffmpeg,--without-ffmpeg,libav"
|
||||
PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
|
||||
PACKAGECONFIG[geoip] = "--with-geoip,--without-geoip,geoip"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
|
||||
|
||||
EXTRA_OECONF = "--disable-static \
|
||||
--disable-nls \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', '--disable-pam', d)} \
|
||||
--with-wwwroot=${localstatedir}/www/cherokee \
|
||||
"
|
||||
|
||||
do_install:append () {
|
||||
install -m 0755 -d ${D}${sysconfdir}/init.d
|
||||
install -m 755 ${WORKDIR}/cherokee.init ${D}${sysconfdir}/init.d/cherokee
|
||||
|
||||
# clean up .la files for plugins
|
||||
rm -f ${D}${libdir}/cherokee/*.la
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/cherokee.service ${D}${systemd_unitdir}/system
|
||||
rmdir "${D}${localstatedir}/run"
|
||||
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
|
||||
}
|
||||
|
||||
# Put -dev near the front so we can move the .la files into it with a wildcard
|
||||
PACKAGES =+ "libcherokee-server libcherokee-client libcherokee-base cget"
|
||||
|
||||
FILES:cget = "${bindir}/cget"
|
||||
FILES:libcherokee-server = "${libdir}/libcherokee-server${SOLIBS}"
|
||||
FILES:libcherokee-client = "${libdir}/libcherokee-client${SOLIBS}"
|
||||
FILES:libcherokee-base = "${libdir}/libcherokee-base${SOLIBS}"
|
||||
|
||||
# Pack the htdocs
|
||||
FILES:${PN} += "${localstatedir}/www/cherokee"
|
||||
|
||||
CONFFILES:${PN} = " \
|
||||
${sysconfdir}/cherokee/cherokee.conf \
|
||||
${sysconfdir}/init.d/cherokee \
|
||||
"
|
||||
|
||||
INITSCRIPT_NAME = "cherokee"
|
||||
INITSCRIPT_PARAMS = "defaults 91 91"
|
||||
|
||||
RPROVIDES:${PN} += "${PN}-systemd"
|
||||
RREPLACES:${PN} += "${PN}-systemd"
|
||||
RCONFLICTS:${PN} += "${PN}-systemd"
|
||||
SYSTEMD_SERVICE:${PN} = "cherokee.service"
|
||||
|
||||
python() {
|
||||
if 'meta-python2' not in d.getVar('BBFILE_COLLECTIONS').split():
|
||||
raise bb.parse.SkipRecipe('Requires meta-python2 to be present.')
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: hiawatha httpd httpd-cgi
|
||||
# Required-Start: $syslog $network $remote_fs
|
||||
# Required-Stop: $syslog $network $remote_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Hiawatha webserver
|
||||
# Description: Hiawatha, a secure and advanced webserver.
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=sed_sbin_path/hiawatha
|
||||
NAME=hiawatha
|
||||
DESC="Hiawatha Web Server"
|
||||
OPTS=""
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
mkdir -p /var/log/hiawatha &> /dev/null
|
||||
start-stop-daemon --start -x "$DAEMON" -- $OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop -x "$DAEMON"
|
||||
echo "$NAME."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop -x "$DAEMON"
|
||||
sleep 1
|
||||
start-stop-daemon --start -x "$DAEMON" -- $OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Hiawatha Web Server
|
||||
After=network.target remote-fs.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
SyslogIdentifier=hiawatha
|
||||
ExecStartPre=/usr/sbin/hiawatha -k ; /usr/sbin/wigwam
|
||||
ExecStart= /usr/sbin/hiawatha -d
|
||||
TimeoutSec=10
|
||||
#(doesn't like this setting. Can't find files) PrivateTmp=true
|
||||
LimitNOFILE=infinity
|
||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_CHOWN CAP_DAC_OVERRIDE CAP_FOWNER CAP_FSETID CAP_SETGID CAP_SETUID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,81 @@
|
||||
SUMMARY = "Lightweight secure web server"
|
||||
HOMEPAGE = "http://www.hiawatha-webserver.org"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
|
||||
DEPENDS = "libxml2 libxslt virtual/crypt"
|
||||
|
||||
SECTION = "net"
|
||||
|
||||
SRC_URI = "http://hiawatha-webserver.org/files/hiawatha-10/${BP}.tar.gz \
|
||||
file://hiawatha-init \
|
||||
file://hiawatha.service "
|
||||
|
||||
SRC_URI[md5sum] = "d9e282be06ed456207726b7ac0df9d48"
|
||||
SRC_URI[sha256sum] = "61bf41146c51244769984135529fcffd0f6cb92be18dc12d460effc42f19f50d"
|
||||
|
||||
INITSCRIPT_NAME = "hiawatha"
|
||||
INITSCRIPT_PARAMS = "defaults 70"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "hiawatha.service"
|
||||
|
||||
inherit cmake update-rc.d systemd
|
||||
|
||||
EXTRA_OECMAKE = " -DENABLE_IPV6=OFF \
|
||||
-DENABLE_CACHE=OFF \
|
||||
-DENABLE_DEBUG=OFF \
|
||||
-DENABLE_TLS=OFF \
|
||||
-DENABLE_TOOLKIT=OFF \
|
||||
-DENABLE_CHROOT=OFF \
|
||||
-DENABLE_XSLT=ON \
|
||||
-DENABLE_TOMAHAWK=OFF \
|
||||
-DCMAKE_INSTALL_MANDIR=${mandir} \
|
||||
-DCMAKE_INSTALL_BINDIR=${bindir} \
|
||||
-DCMAKE_INSTALL_SBINDIR=${sbindir} \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=${sysconfdir} \
|
||||
-DCMAKE_INSTALL_LIBDIR=${libdir} \
|
||||
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=${localstatedir}"
|
||||
|
||||
do_install:append() {
|
||||
# Copy over init script and sed in the correct sbin path
|
||||
sed -i 's,sed_sbin_path,${sbindir},' ${WORKDIR}/hiawatha-init
|
||||
mkdir -p ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/hiawatha-init ${D}${sysconfdir}/init.d/hiawatha
|
||||
|
||||
# configure php-fcgi to have a working configuration
|
||||
# by default if php is installed
|
||||
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
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -d ${D}/${systemd_unitdir}/system
|
||||
install -m 644 ${WORKDIR}/hiawatha.service ${D}/${systemd_unitdir}/system
|
||||
fi
|
||||
|
||||
# /var/log/hiawatha and /var/lib/hiawatha needs to be created in runtime.
|
||||
# Use rmdir to catch if upstream stops creating these dirs, or adds
|
||||
# something else in /var/log.
|
||||
rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/log
|
||||
rmdir ${D}${localstatedir}/run
|
||||
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
||||
|
||||
# Create /var/log/hiawatha at runtime.
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||
install -d ${D}${nonarch_libdir}/tmpfiles.d
|
||||
echo "d ${localstatedir}/log/${BPN} - - - -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
|
||||
fi
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
echo "d root root 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
CONFFILES:${PN} = " \
|
||||
${sysconfdir}/hiawatha/cgi-wrapper.conf \
|
||||
${sysconfdir}/hiawatha/hiawatha.conf \
|
||||
${sysconfdir}/hiawatha/index.xslt \
|
||||
${sysconfdir}/hiawatha/mimetype.conf \
|
||||
${sysconfdir}/hiawatha/php-fcgi.conf \
|
||||
"
|
||||
|
||||
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
|
||||
FILES:${PN}-dev = "${libdir}/hiawatha/*${SOLIBSDEV}"
|
||||
@@ -0,0 +1,30 @@
|
||||
From b0526a9b5325bd4758dad8d14efd85c98ef2ebff Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Fri, 14 Jul 2017 18:25:23 -0700
|
||||
Subject: [PATCH] configure: Respect LIBS variable from env
|
||||
|
||||
For musl we need to pass -lexecinfo from env
|
||||
this change accomodates that
|
||||
|
||||
Upstream-Status: Inappropriate [OE-specific]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 4286c34..f1c65db 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -620,7 +620,7 @@ LIBDEFS = -DSHAREDLIB -fPIC \$(DEFS)
|
||||
INCDIR = ./include
|
||||
LDFLAGS = $LDFLAGS
|
||||
DESTDIR = ../bin/monkey
|
||||
-LIBS = -ldl $libs
|
||||
+LIBS = -ldl $libs ${LIBS}
|
||||
OBJ = monkey.o mk_method.o mk_mimetype.o mk_vhost.o mk_request.o \\
|
||||
mk_header.o mk_config.o mk_signals.o \\
|
||||
mk_user.o mk_utils.o mk_epoll.o mk_scheduler.o \\
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
From 7f724bbafbb1e170401dd5de201273ab8c8bc75f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 28 Aug 2022 14:24:02 -0700
|
||||
Subject: [PATCH] fastcgi: Use value instead of address of sin6_port
|
||||
|
||||
This seems to be wrongly assigned where ipv4 sin_port is
|
||||
equated to address of sin6_port and not value of sin6_port
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/monkey/monkey/pull/375]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
plugins/fastcgi/fcgi_handler.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/fastcgi/fcgi_handler.c b/plugins/fastcgi/fcgi_handler.c
|
||||
index 9e095e3c..e8e1eec1 100644
|
||||
--- a/plugins/fastcgi/fcgi_handler.c
|
||||
+++ b/plugins/fastcgi/fcgi_handler.c
|
||||
@@ -245,7 +245,7 @@ static inline int fcgi_add_param_net(struct fcgi_handler *handler)
|
||||
struct sockaddr_in *s4 = (struct sockaddr_in *)&addr4;
|
||||
memset(&addr4, 0, sizeof(addr4));
|
||||
addr4.sin_family = AF_INET;
|
||||
- addr4.sin_port = &s->sin6_port;
|
||||
+ addr4.sin_port = s->sin6_port;
|
||||
memcpy(&addr4.sin_addr.s_addr,
|
||||
s->sin6_addr.s6_addr + 12,
|
||||
sizeof(addr4.sin_addr.s_addr));
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/monkey
|
||||
NAME=monkey
|
||||
DESC="Monkey HTTP Server"
|
||||
OPTS="--daemon"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start -x "$DAEMON" -- $OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop -x "$DAEMON"
|
||||
echo "$NAME."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop -x "$DAEMON"
|
||||
sleep 1
|
||||
start-stop-daemon --start -x "$DAEMON" -- $OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Monkey HTTP Server
|
||||
After=network.target remote-fs.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/monkey --daemon
|
||||
PIDFile=/var/run/monkey.pid.2001
|
||||
TimeoutSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,88 @@
|
||||
SUMMARY = "Fast and Lightweight HTTP Server for Linux"
|
||||
HOMEPAGE = "http://monkey-project.com"
|
||||
BUGTRACKER = "https://github.com/monkey/monkey/issues"
|
||||
|
||||
LICENSE = "Apache-2.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
|
||||
|
||||
SECTION = "net"
|
||||
|
||||
SRC_URI = "git://github.com/monkey/monkey;branch=1.6;protocol=https \
|
||||
file://0001-fastcgi-Use-value-instead-of-address-of-sin6_port.patch \
|
||||
file://monkey.service \
|
||||
file://monkey.init"
|
||||
|
||||
SRCREV = "7999b487fded645381d387ec0e057e92407b0d2c"
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/monkey/monkey/releases"
|
||||
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
|
||||
|
||||
EXTRA_OECMAKE = "-DINSTALL_LOGDIR=${localstatedir}/log/monkey/ \
|
||||
-DPID_FILE=/run/monkey.pid \
|
||||
-DINSTALL_SYSCONFDIR=${sysconfdir}/monkey/ \
|
||||
-DWITH_PLUGINS=* \
|
||||
-DWITHOUT_PLUGINS=mbedtls \
|
||||
-DWITH_DEBUG=1 \
|
||||
-DDEFAULT_USER='www-data' \
|
||||
-DWITH_SYSTEM_MALLOC=1 \
|
||||
"
|
||||
|
||||
EXTRA_OECMAKE:append:libc-musl = " -DWITH_MUSL=1 "
|
||||
|
||||
# GCC-10+ defaults to -fno-common
|
||||
CFLAGS += "-fcommon"
|
||||
|
||||
DISABLE_STATIC = ""
|
||||
|
||||
inherit cmake pkgconfig update-rc.d systemd
|
||||
|
||||
OECMAKE_GENERATOR = "Unix Makefiles"
|
||||
|
||||
do_install:append() {
|
||||
rmdir ${D}${localstatedir}/log/${BPN} ${D}${localstatedir}/run ${D}${localstatedir}/log
|
||||
rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
|
||||
install -Dm 0755 ${WORKDIR}/monkey.init ${D}${sysconfdir}/init.d/monkey
|
||||
# Create /var/log/monkey in runtime.
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||
install -d ${D}${nonarch_libdir}/tmpfiles.d
|
||||
echo "d ${localstatedir}/log/${BPN} 0755 ${BPN} ${BPN} -" > ${D}${nonarch_libdir}/tmpfiles.d/${BPN}.conf
|
||||
fi
|
||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ]; then
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
echo "d ${BPN} ${BPN} 0755 ${localstatedir}/log/${BPN} none" > ${D}${sysconfdir}/default/volatiles/99_${BPN}
|
||||
fi
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
install -Dm 644 ${WORKDIR}/monkey.service ${D}/${systemd_unitdir}/system/monkey.service
|
||||
fi
|
||||
}
|
||||
|
||||
INITSCRIPT_NAME = "monkey"
|
||||
INITSCRIPT_PARAMS = "defaults 70"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "monkey.service"
|
||||
|
||||
PACKAGES += "${PN}-plugins"
|
||||
|
||||
FILES:${PN}-plugins = "${libdir}/monkey-*.so"
|
||||
|
||||
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
|
||||
|
||||
CONFFILES:${PN} = "${sysconfdir}/monkey/monkey.conf \
|
||||
${sysconfdir}/monkey/sites/default \
|
||||
${sysconfdir}/monkey/monkey.mime \
|
||||
${sysconfdir}/monkey/plugins.load \
|
||||
${sysconfdir}/monkey/plugins/proxy_reverse/proxy_reverse.conf \
|
||||
${sysconfdir}/monkey/plugins/mandril/mandril.conf \
|
||||
${sysconfdir}/monkey/plugins/fastcgi/fastcgi.conf \
|
||||
${sysconfdir}/monkey/plugins/logger/logger.conf \
|
||||
${sysconfdir}/monkey/plugins/cgi/cgi.conf \
|
||||
${sysconfdir}/monkey/plugins/cheetah/cheetah.conf \
|
||||
${sysconfdir}/monkey/plugins/dirlisting/dirhtml.conf \
|
||||
${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/header.theme \
|
||||
${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/footer.theme \
|
||||
${sysconfdir}/monkey/plugins/dirlisting/themes/guineo/entry.theme \
|
||||
${sysconfdir}/monkey/plugins/auth/README \
|
||||
${sysconfdir}/monkey/plugins/auth/monkey.users \
|
||||
"
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
From be9970aa16c5142ef814531d74a07990a8e9eb14 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Straka <derek@asterius.io>
|
||||
Date: Fri, 1 Dec 2017 10:32:29 -0500
|
||||
Subject: [PATCH] Allow the overriding of the endianness via the configure flag
|
||||
--with-endian
|
||||
|
||||
The existing configure options contain the --with-endian; however, the command
|
||||
line flag does not actually function. It does not set the endianness and it
|
||||
appears to do nothing.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Derek Straka <derek@asterius.io>
|
||||
|
||||
diff --git a/auto/endianness b/auto/endianness
|
||||
index 1b552b6..be84487 100644
|
||||
--- a/auto/endianness
|
||||
+++ b/auto/endianness
|
||||
@@ -13,7 +13,13 @@ checking for system byte ordering
|
||||
END
|
||||
|
||||
|
||||
-cat << END > $NGX_AUTOTEST.c
|
||||
+if [ ".$NGX_WITH_ENDIAN" = ".little" ]; then
|
||||
+ echo " little endian"
|
||||
+ have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
||||
+elif [ ".$NGX_WITH_ENDIAN" = ".big" ]; then
|
||||
+ echo " big endian"
|
||||
+else
|
||||
+ cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main(void) {
|
||||
int i = 0x11223344;
|
||||
@@ -26,25 +32,26 @@ int main(void) {
|
||||
|
||||
END
|
||||
|
||||
-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
+ ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
+ -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
-eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
+ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
-if [ -x $NGX_AUTOTEST ]; then
|
||||
- if $NGX_AUTOTEST >/dev/null 2>&1; then
|
||||
- echo " little endian"
|
||||
- have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
||||
- else
|
||||
- echo " big endian"
|
||||
- fi
|
||||
+ if [ -x $NGX_AUTOTEST ]; then
|
||||
+ if $NGX_AUTOTEST >/dev/null 2>&1; then
|
||||
+ echo " little endian"
|
||||
+ have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
||||
+ else
|
||||
+ echo " big endian"
|
||||
+ fi
|
||||
|
||||
- rm -rf $NGX_AUTOTEST*
|
||||
+ rm -rf $NGX_AUTOTEST*
|
||||
|
||||
-else
|
||||
- rm -rf $NGX_AUTOTEST*
|
||||
+ else
|
||||
+ rm -rf $NGX_AUTOTEST*
|
||||
|
||||
- echo
|
||||
- echo "$0: error: cannot detect system byte ordering"
|
||||
- exit 1
|
||||
+ echo
|
||||
+ echo "$0: error: cannot detect system byte ordering"
|
||||
+ exit 1
|
||||
+ fi
|
||||
fi
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# Default server configuration
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /var/www/localhost/html;
|
||||
|
||||
index index.html index.htm;
|
||||
|
||||
server_name _;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
We do not have capability to run binaries when cross compiling
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
|
||||
Index: nginx-1.12.2/auto/feature
|
||||
===================================================================
|
||||
--- nginx-1.12.2.orig/auto/feature
|
||||
+++ nginx-1.12.2/auto/feature
|
||||
@@ -49,12 +49,20 @@ eval "/bin/sh -c \"$ngx_test\" >> $NGX_A
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
+ if [ ".$NGX_CROSS_COMPILE" = ".yes" ]; then
|
||||
+ NGX_AUTOTEST_EXEC="true"
|
||||
+ NGX_FOUND_MSG=" (not tested, cross compiling)"
|
||||
+ else
|
||||
+ NGX_AUTOTEST_EXEC="$NGX_AUTOTEST"
|
||||
+ NGX_FOUND_MSG=""
|
||||
+ fi
|
||||
+
|
||||
case "$ngx_feature_run" in
|
||||
|
||||
yes)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
- echo " found"
|
||||
+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
+ echo " found$NGX_FOUND_MSG"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
@@ -68,17 +76,27 @@ if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
value)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
- echo " found"
|
||||
+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
+ echo " found$NGX_FOUND_MSG"
|
||||
ngx_found=yes
|
||||
|
||||
- cat << END >> $NGX_AUTO_CONFIG_H
|
||||
+ if [ ".$NGX_CROSS_COMPILE" = ".yes" ]; then
|
||||
+ cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_feature_name
|
||||
-#define $ngx_feature_name `$NGX_AUTOTEST`
|
||||
+#define $ngx_feature_name $(eval "echo \$NGX_WITH_${ngx_feature_name}")
|
||||
#endif
|
||||
|
||||
END
|
||||
+ else
|
||||
+ cat << END >> $NGX_AUTO_CONFIG_H
|
||||
+
|
||||
+#ifndef $ngx_feature_name
|
||||
+#define $ngx_feature_name `$NGX_AUTOTEST_EXEC`
|
||||
+#endif
|
||||
+
|
||||
+END
|
||||
+ fi
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
@@ -86,7 +104,7 @@ END
|
||||
|
||||
bug)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
+ if /bin/sh -c $NGX_AUTOTEST_EXEC >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " not found"
|
||||
|
||||
else
|
||||
Index: nginx-1.12.2/auto/options
|
||||
===================================================================
|
||||
--- nginx-1.12.2.orig/auto/options
|
||||
+++ nginx-1.12.2/auto/options
|
||||
@@ -386,6 +386,18 @@ $0: warning: the \"--with-sha1-asm\" opt
|
||||
--test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
|
||||
--test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
|
||||
|
||||
+ # cross compile support
|
||||
+ --with-int=*) NGX_WITH_INT="$value" ;;
|
||||
+ --with-long=*) NGX_WITH_LONG="$value" ;;
|
||||
+ --with-long-long=*) NGX_WITH_LONG_LONG="$value" ;;
|
||||
+ --with-ptr-size=*) NGX_WITH_PTR_SIZE="$value" ;;
|
||||
+ --with-sig-atomic-t=*) NGX_WITH_SIG_ATOMIC_T="$value" ;;
|
||||
+ --with-size-t=*) NGX_WITH_SIZE_T="$value" ;;
|
||||
+ --with-off-t=*) NGX_WITH_OFF_T="$value" ;;
|
||||
+ --with-time-t=*) NGX_WITH_TIME_T="$value" ;;
|
||||
+ --with-sys-nerr=*) NGX_WITH_NGX_SYS_NERR="$value" ;;
|
||||
+ --with-endian=*) NGX_WITH_ENDIAN="$value" ;;
|
||||
+
|
||||
*)
|
||||
echo "$0: error: invalid option \"$option\""
|
||||
exit 1
|
||||
@@ -568,6 +580,17 @@ cat << END
|
||||
|
||||
--with-debug enable debug logging
|
||||
|
||||
+ --with-int=VALUE force int size
|
||||
+ --with-long=VALUE force long size
|
||||
+ --with-long-long=VALUE force long long size
|
||||
+ --with-ptr-size=VALUE force pointer size
|
||||
+ --with-sig-atomic-t=VALUE force sig_atomic_t size
|
||||
+ --with-size-t=VALUE force size_t size
|
||||
+ --with-off-t=VALUE force off_t size
|
||||
+ --with-time-t=VALUE force time_t size
|
||||
+ --with-sys-nerr=VALUE force sys_nerr value
|
||||
+ --with-endian=VALUE force system endianess
|
||||
+
|
||||
END
|
||||
|
||||
exit 1
|
||||
@@ -576,6 +599,8 @@ fi
|
||||
|
||||
if [ ".$NGX_PLATFORM" = ".win32" ]; then
|
||||
NGX_WINE=$WINE
|
||||
+elif [ ! -z "$NGX_PLATFORM" ]; then
|
||||
+ NGX_CROSS_COMPILE="yes"
|
||||
fi
|
||||
|
||||
|
||||
Index: nginx-1.12.2/auto/types/sizeof
|
||||
===================================================================
|
||||
--- nginx-1.12.2.orig/auto/types/sizeof
|
||||
+++ nginx-1.12.2/auto/types/sizeof
|
||||
@@ -12,9 +12,12 @@ checking for $ngx_type size
|
||||
|
||||
END
|
||||
|
||||
-ngx_size=
|
||||
+ngx_size=$(eval "echo \$NGX_WITH_${ngx_param}")
|
||||
|
||||
-cat << END > $NGX_AUTOTEST.c
|
||||
+if [ ".$ngx_size" != "." ]; then
|
||||
+ echo " $ngx_size bytes"
|
||||
+else
|
||||
+ cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
@@ -33,15 +36,16 @@ int main(void) {
|
||||
END
|
||||
|
||||
|
||||
-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
+ ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
+ -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
-eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
+ eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
|
||||
-if [ -x $NGX_AUTOTEST ]; then
|
||||
- ngx_size=`$NGX_AUTOTEST`
|
||||
- echo " $ngx_size bytes"
|
||||
+ if [ -x $NGX_AUTOTEST ]; then
|
||||
+ ngx_size=`$NGX_AUTOTEST`
|
||||
+ echo " $ngx_size bytes"
|
||||
+ fi
|
||||
fi
|
||||
|
||||
|
||||
Index: nginx-1.12.2/auto/unix
|
||||
===================================================================
|
||||
--- nginx-1.12.2.orig/auto/unix
|
||||
+++ nginx-1.12.2/auto/unix
|
||||
@@ -587,13 +587,13 @@ ngx_feature_libs=
|
||||
|
||||
# C types
|
||||
|
||||
-ngx_type="int"; . auto/types/sizeof
|
||||
+ngx_type="int"; ngx_param="INT"; . auto/types/sizeof
|
||||
|
||||
-ngx_type="long"; . auto/types/sizeof
|
||||
+ngx_type="long"; ngx_param="LONG"; . auto/types/sizeof
|
||||
|
||||
-ngx_type="long long"; . auto/types/sizeof
|
||||
+ngx_type="long long"; ngx_param="LONG_LONG"; . auto/types/sizeof
|
||||
|
||||
-ngx_type="void *"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
|
||||
+ngx_type="void *"; ngx_param="PTR_SIZE"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
|
||||
ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
|
||||
|
||||
@@ -604,7 +604,7 @@ NGX_INCLUDE_AUTO_CONFIG_H="#include \"ng
|
||||
ngx_type="uint32_t"; ngx_types="u_int32_t"; . auto/types/typedef
|
||||
ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
|
||||
|
||||
-ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
|
||||
+ngx_type="sig_atomic_t"; ngx_param="SIG_ATOMIC_T"; ngx_types="int"; . auto/types/typedef
|
||||
. auto/types/sizeof
|
||||
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
|
||||
@@ -620,15 +620,15 @@ ngx_type="rlim_t"; ngx_types="int"; . au
|
||||
|
||||
. auto/endianness
|
||||
|
||||
-ngx_type="size_t"; . auto/types/sizeof
|
||||
+ngx_type="size_t"; ngx_param="SIZE_T"; . auto/types/sizeof
|
||||
ngx_param=NGX_MAX_SIZE_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
||||
ngx_param=NGX_SIZE_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
|
||||
-ngx_type="off_t"; . auto/types/sizeof
|
||||
+ngx_type="off_t"; ngx_param="OFF_T"; . auto/types/sizeof
|
||||
ngx_param=NGX_MAX_OFF_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
||||
ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
|
||||
-ngx_type="time_t"; . auto/types/sizeof
|
||||
+ngx_type="time_t"; ngx_param="TIME_T"; . auto/types/sizeof
|
||||
ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
ngx_param=NGX_MAX_TIME_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
||||
@@ -0,0 +1,99 @@
|
||||
Description: Fix NGINX pidfile handling
|
||||
Author: Tj <ubuntu@iam.tj>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864
|
||||
Last-Update: 2019-06-04
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
This patch is from ubuntu, https://github.com/aroth-arsoft/pkg-nginx/blob
|
||||
/master/debian/patches/nginx-fix-pidfile.patch, for fix below
|
||||
error info:
|
||||
nginx.service: failed to parse pid from file /run/nginx/nginx.pid:
|
||||
invalid argument
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
diff --git a/src/core/nginx.c b/src/core/nginx.c
|
||||
index 9fcb0eb2..083eba1d 100644
|
||||
--- a/src/core/nginx.c
|
||||
+++ b/src/core/nginx.c
|
||||
@@ -338,14 +338,21 @@ main(int argc, char *const *argv)
|
||||
ngx_process = NGX_PROCESS_MASTER;
|
||||
}
|
||||
|
||||
+ /* tell-tale to detect if this is parent or child process */
|
||||
+ ngx_int_t child_pid = NGX_BUSY;
|
||||
+
|
||||
#if !(NGX_WIN32)
|
||||
|
||||
if (ngx_init_signals(cycle->log) != NGX_OK) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
+ /* tell-tale that this code has been executed */
|
||||
+ child_pid--;
|
||||
+
|
||||
if (!ngx_inherited && ccf->daemon) {
|
||||
- if (ngx_daemon(cycle->log) != NGX_OK) {
|
||||
+ child_pid = ngx_daemon(cycle->log);
|
||||
+ if (child_pid == NGX_ERROR) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -358,8 +365,19 @@ main(int argc, char *const *argv)
|
||||
|
||||
#endif
|
||||
|
||||
- if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) {
|
||||
- return 1;
|
||||
+ /* If ngx_daemon() returned the child's PID in the parent process
|
||||
+ * after the fork() set ngx_pid to the child_pid, which gets
|
||||
+ * written to the PID file, then exit.
|
||||
+ * For NGX_WIN32 always write the PID file
|
||||
+ * For others, only write it from the parent process */
|
||||
+ if (child_pid < NGX_OK || child_pid > NGX_OK) {
|
||||
+ ngx_pid = child_pid > NGX_OK ? child_pid : ngx_pid;
|
||||
+ if (ngx_create_pidfile(&ccf->pid, cycle->log) != NGX_OK) {
|
||||
+ return 1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (child_pid > NGX_OK) {
|
||||
+ exit(0);
|
||||
}
|
||||
|
||||
if (ngx_log_redirect_stderr(cycle) != NGX_OK) {
|
||||
diff --git a/src/os/unix/ngx_daemon.c b/src/os/unix/ngx_daemon.c
|
||||
index 385c49b6..3719854c 100644
|
||||
--- a/src/os/unix/ngx_daemon.c
|
||||
+++ b/src/os/unix/ngx_daemon.c
|
||||
@@ -7,14 +7,17 @@
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
|
||||
ngx_int_t
|
||||
ngx_daemon(ngx_log_t *log)
|
||||
{
|
||||
int fd;
|
||||
+ /* retain the return value for passing back to caller */
|
||||
+ pid_t pid_child = fork();
|
||||
|
||||
- switch (fork()) {
|
||||
+ switch (pid_child) {
|
||||
case -1:
|
||||
ngx_log_error(NGX_LOG_EMERG, log, ngx_errno, "fork() failed");
|
||||
return NGX_ERROR;
|
||||
@@ -23,7 +26,8 @@ ngx_daemon(ngx_log_t *log)
|
||||
break;
|
||||
|
||||
default:
|
||||
- exit(0);
|
||||
+ /* let caller do the exit() */
|
||||
+ return pid_child;
|
||||
}
|
||||
|
||||
ngx_parent = ngx_pid;
|
||||
@@ -0,0 +1,2 @@
|
||||
d @NGINX_USER@ www-data 0755 /run/nginx none
|
||||
d root root 0755 /var/log/nginx none
|
||||
@@ -0,0 +1,47 @@
|
||||
user www;
|
||||
worker_processes 1;
|
||||
pid /run/nginx/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
# multi_accept on;
|
||||
}
|
||||
|
||||
http {
|
||||
# Basic Settings
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
# server_tokens off;
|
||||
|
||||
# server_names_hash_bucket_size 64;
|
||||
# server_name_in_redirect off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# SSL Settings
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
## Logging
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
## Gzip settings
|
||||
gzip on;
|
||||
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_buffers 16 8k;
|
||||
gzip_http_version 1.1;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
## Virtual Host Configs
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
#! /bin/sh
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/sbin/nginx
|
||||
NAME=nginx
|
||||
DESC=nginx
|
||||
PID=/run/nginx/nginx.pid
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
# Include nginx defaults if available
|
||||
if [ -f /etc/default/nginx ] ; then
|
||||
. /etc/default/nginx
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --quiet --pidfile $PID \
|
||||
--name $NAME --exec $DAEMON -- $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon -K --quiet --pidfile $PID \
|
||||
--name $NAME
|
||||
echo "$NAME."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon -K --quiet --pidfile $PID \
|
||||
--name $NAME
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --pidfile $PID \
|
||||
--name $NAME --exec $DAEMON -- $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
reload)
|
||||
echo -n "Reloading $DESC configuration: "
|
||||
start-stop-daemon --stop --signal HUP --quiet --pidfile $PID \
|
||||
--exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=The NGINX HTTP and reverse proxy server
|
||||
After=syslog.target network.target remote-fs.target nss-lookup.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/run/nginx/nginx.pid
|
||||
ExecStartPre=@SBINDIR@/nginx -t
|
||||
ExecStart=@SBINDIR@/nginx
|
||||
ExecReload=@SBINDIR@/nginx -s reload
|
||||
ExecStop=@BASE_BINDIR@/kill -s QUIT $MAINPID
|
||||
PrivateTmp=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,4 @@
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
184
meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
Normal file
184
meta-openembedded/meta-webserver/recipes-httpd/nginx/nginx.inc
Normal file
@@ -0,0 +1,184 @@
|
||||
SUMMARY = "HTTP and reverse proxy server"
|
||||
|
||||
DESCRIPTION = "Nginx is a web server and a reverse proxy server for \
|
||||
HTTP, SMTP, POP3 and IMAP protocols, with a strong focus on high \
|
||||
concurrency, performance and low memory usage."
|
||||
|
||||
HOMEPAGE = "http://nginx.org/"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
|
||||
SECTION = "net"
|
||||
|
||||
DEPENDS = "libpcre zlib"
|
||||
|
||||
SRC_URI = " \
|
||||
http://nginx.org/download/nginx-${PV}.tar.gz \
|
||||
file://nginx-cross.patch \
|
||||
file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \
|
||||
file://nginx.conf \
|
||||
file://default_server.site \
|
||||
file://proxy_params \
|
||||
file://nginx.init \
|
||||
file://nginx-volatile.conf \
|
||||
file://nginx.service \
|
||||
file://nginx-fix-pidfile.patch \
|
||||
"
|
||||
|
||||
inherit siteinfo update-rc.d useradd systemd
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "nginx.service"
|
||||
|
||||
CFLAGS:append = " -fPIE -pie"
|
||||
CXXFLAGS:append = " -fPIE -pie"
|
||||
|
||||
NGINX_WWWDIR ?= "${localstatedir}/www/localhost"
|
||||
NGINX_USER ?= "www"
|
||||
|
||||
EXTRA_OECONF = ""
|
||||
DISABLE_STATIC = ""
|
||||
|
||||
PACKAGECONFIG ??= "ssl ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
|
||||
PACKAGECONFIG[gunzip] = "--with-http_gunzip_module,,"
|
||||
PACKAGECONFIG[http2] = "--with-http_v2_module,,"
|
||||
PACKAGECONFIG[ssl] = "--with-http_ssl_module,,openssl"
|
||||
PACKAGECONFIG[http-auth-request] = "--with-http_auth_request_module,,"
|
||||
PACKAGECONFIG[ipv6] = "--with-ipv6,,"
|
||||
PACKAGECONFIG[webdav] = "--with-http_dav_module,,"
|
||||
|
||||
do_configure () {
|
||||
if [ "${SITEINFO_BITS}" = "64" ]; then
|
||||
PTRSIZE=8
|
||||
else
|
||||
PTRSIZE=4
|
||||
fi
|
||||
|
||||
echo $CFLAGS
|
||||
echo $LDFLAGS
|
||||
|
||||
# Add the LDFLAGS to the main nginx link to avoid issues with missing GNU_HASH
|
||||
echo "MAIN_LINK=\"\${MAIN_LINK} ${LDFLAGS}\"" >> auto/cc/conf
|
||||
|
||||
./configure \
|
||||
--crossbuild=Linux:${TUNE_ARCH} \
|
||||
--with-endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
|
||||
--with-int=4 \
|
||||
--with-long=${PTRSIZE} \
|
||||
--with-long-long=8 \
|
||||
--with-ptr-size=${PTRSIZE} \
|
||||
--with-sig-atomic-t=${PTRSIZE} \
|
||||
--with-size-t=${PTRSIZE} \
|
||||
--with-off-t=8 \
|
||||
--with-time-t=${PTRSIZE} \
|
||||
--with-sys-nerr=132 \
|
||||
--conf-path=${sysconfdir}/nginx/nginx.conf \
|
||||
--http-log-path=${localstatedir}/log/nginx/access.log \
|
||||
--error-log-path=${localstatedir}/log/nginx/error.log \
|
||||
--http-client-body-temp-path=/run/nginx/client_body_temp \
|
||||
--http-proxy-temp-path=/run/nginx/proxy_temp \
|
||||
--http-fastcgi-temp-path=/run/nginx/fastcgi_temp \
|
||||
--http-uwsgi-temp-path=/run/nginx/uwsgi_temp \
|
||||
--http-scgi-temp-path=/run/nginx/scgi_temp \
|
||||
--pid-path=/run/nginx/nginx.pid \
|
||||
--prefix=${prefix} \
|
||||
--with-threads \
|
||||
--with-http_gzip_static_module \
|
||||
${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS}
|
||||
}
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
rm -fr ${D}${localstatedir}/run ${D}/run
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
echo "d /run/${BPN} - - - -" \
|
||||
> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
|
||||
echo "d ${localstatedir}/log/${BPN} 0755 root root -" \
|
||||
>> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
|
||||
fi
|
||||
install -d ${D}${sysconfdir}/${BPN}
|
||||
ln -rs ${D}${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
|
||||
install -d ${D}${NGINX_WWWDIR}
|
||||
mv ${D}${exec_prefix}/html ${D}${NGINX_WWWDIR}/
|
||||
chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR}
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx
|
||||
sed -i 's,/usr/sbin/,${sbindir}/,g' ${D}${sysconfdir}/init.d/nginx
|
||||
sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/init.d/nginx
|
||||
|
||||
install -d ${D}${sysconfdir}/nginx
|
||||
install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf
|
||||
sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
|
||||
sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
|
||||
sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf
|
||||
install -Dm 0644 ${WORKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server
|
||||
sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/sites-available/default_server
|
||||
install -d ${D}${sysconfdir}/nginx/sites-enabled
|
||||
ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/
|
||||
|
||||
install -m 0644 ${WORKDIR}/proxy_params ${D}${sysconfdir}/nginx/proxy_params
|
||||
|
||||
install -d ${D}${sysconfdir}/default/volatiles
|
||||
install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
|
||||
sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx
|
||||
sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx
|
||||
|
||||
# cleanup configuration folder
|
||||
rm ${D}${sysconfdir}/nginx/*.default
|
||||
|
||||
# add additional configuration folders
|
||||
install -d ${D}${sysconfdir}/nginx/modules-available
|
||||
install -d ${D}${sysconfdir}/nginx/modules-enabled
|
||||
install -d ${D}${sysconfdir}/nginx/server-conf.d
|
||||
install -d ${D}${sysconfdir}/nginx/conf.d
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/
|
||||
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
-e 's,@LOCALSTATEDIR@,${localstatedir},g' \
|
||||
-e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@BASE_BINDIR@,${base_bindir},g' \
|
||||
${D}${systemd_unitdir}/system/nginx.service
|
||||
fi
|
||||
|
||||
rm -rf ${D}${localstatedir}/log/
|
||||
}
|
||||
|
||||
pkg_postinst:${PN} () {
|
||||
if [ -z "$D" ]; then
|
||||
if type systemd-tmpfiles >/dev/null 2>&1; then
|
||||
systemd-tmpfiles --create
|
||||
elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
|
||||
${sysconfdir}/init.d/populate-volatile.sh update
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
FILES:${PN} += " \
|
||||
${localstatedir}/ \
|
||||
${systemd_unitdir}/system/nginx.service \
|
||||
"
|
||||
|
||||
CONFFILES:${PN} = " \
|
||||
${sysconfdir}/nginx/nginx.conf \
|
||||
${sysconfdir}/nginx/fastcgi.conf \
|
||||
${sysconfdir}/nginx/fastcgi_params \
|
||||
${sysconfdir}/nginx/koi-utf \
|
||||
${sysconfdir}/nginx/koi-win \
|
||||
${sysconfdir}/nginx/mime.types \
|
||||
${sysconfdir}/nginx/scgi_params \
|
||||
${sysconfdir}/nginx/uwsgi_params \
|
||||
${sysconfdir}/nginx/win-utf \
|
||||
"
|
||||
|
||||
INITSCRIPT_NAME = "nginx"
|
||||
INITSCRIPT_PARAMS = "defaults 92 20"
|
||||
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = " \
|
||||
--system --no-create-home \
|
||||
--home ${NGINX_WWWDIR} \
|
||||
--groups www-data \
|
||||
--user-group ${NGINX_USER}"
|
||||
@@ -0,0 +1,10 @@
|
||||
require nginx.inc
|
||||
|
||||
# 1.20.x branch is the current stable branch, the recommended default
|
||||
# 1.21.x is the current mainline branches containing all new features
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=206629dc7c7b3e87acb31162363ae505"
|
||||
|
||||
SRC_URI[md5sum] = "7dce9e2136ec32dfd823736e871815b1"
|
||||
SRC_URI[sha256sum] = "68ba0311342115163a0354cad34f90c05a7e8bf689dc498abf07899eda155560"
|
||||
@@ -0,0 +1,6 @@
|
||||
require nginx.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=175abb631c799f54573dc481454c8632"
|
||||
|
||||
SRC_URI[sha256sum] = "d43300e36bb249a7e6edc60bca1b0fc372a0bafce2f346d76acfb677a8790fc0"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From f3889e5870e9761ee6113fac7f38aa44cc43e46c Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 7 Sep 2022 00:30:52 -0700
|
||||
Subject: [PATCH] Define _GNU_SOURCE if HAVE_SIGSET is set
|
||||
|
||||
This enforces using sigset() API which needs _GNU_SOURCE macro to be
|
||||
defined
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/blueness/sthttpd/pull/16]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libhttpd.c | 5 ++++-
|
||||
src/thttpd.c | 4 ++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/libhttpd.c b/src/libhttpd.c
|
||||
index fa42c10..669be11 100644
|
||||
--- a/src/libhttpd.c
|
||||
+++ b/src/libhttpd.c
|
||||
@@ -25,9 +25,12 @@
|
||||
** SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
-
|
||||
#include <config.h>
|
||||
|
||||
+#ifdef HAVE_SIGSET
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
//system headers
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
diff --git a/src/thttpd.c b/src/thttpd.c
|
||||
index ad97188..3c7a449 100644
|
||||
--- a/src/thttpd.c
|
||||
+++ b/src/thttpd.c
|
||||
@@ -28,6 +28,10 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
+#ifdef HAVE_SIGSET
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
//system headers
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: thttpd
|
||||
# Required-Start: $remote_fs $syslog
|
||||
# Required-Stop: $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Small http server
|
||||
# Description: thttpd is a simple, small, portable, fast, and secure HTTP server.
|
||||
### END INIT INFO
|
||||
|
||||
|
||||
thttpd=/usr/sbin/thttpd
|
||||
test -x "$thttpd" || exit 0
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting thttpd"
|
||||
start-stop-daemon --start --quiet --exec $thttpd -- -C @@CONFFILE
|
||||
echo "."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping thttpd"
|
||||
start-stop-daemon --stop --quiet --exec $thttpd
|
||||
echo "."
|
||||
;;
|
||||
reload|force-reload)
|
||||
start-stop-daemon --stop --quiet --signal 1 --exec $thttpd
|
||||
;;
|
||||
restart)
|
||||
echo -n "Stopping thttpd"
|
||||
start-stop-daemon --stop --quiet --exec $thttpd -- -C @@CONFFILE
|
||||
echo "."
|
||||
echo -n "Waiting for thttpd to die off"
|
||||
for i in 1 2 3 ;
|
||||
do
|
||||
sleep 1
|
||||
echo -n "."
|
||||
done
|
||||
echo ""
|
||||
echo -n "Starting thttpd"
|
||||
start-stop-daemon --start --quiet --exec $thttpd -- -C @@CONFFILE
|
||||
echo "."
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/thttpd {start|stop|reload|restart|force-reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1 @@
|
||||
dir=@@SRVDIR
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Tiny/Turbo/Throttling Web Server
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/usr/sbin/thttpd -C @@CONFFILE -c cgi-bin/* -i /var/run/thttpd.pid
|
||||
PIDFile=/var/run/thttpd.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,59 @@
|
||||
SUMMARY = "A simple, small, portable, fast, and secure HTTP server"
|
||||
DESCRIPTION = "A simple, small, portable, fast, and secure HTTP server (supported fork of thttpd)."
|
||||
HOMEPAGE = "http://opensource.dyc.edu/sthttpd"
|
||||
LICENSE = "BSD-2-Clause"
|
||||
LIC_FILES_CHKSUM = "file://src/thttpd.c;beginline=1;endline=26;md5=0c5762c2c34dcbe9eb18815516502872"
|
||||
|
||||
DEPENDS += "base-passwd virtual/crypt"
|
||||
|
||||
SRCREV = "2845bf5bff2b820d2336c8c8061cbfc5f271e720"
|
||||
SRC_URI = "git://github.com/blueness/${BPN};branch=master;protocol=https \
|
||||
file://0001-Define-_GNU_SOURCE-if-HAVE_SIGSET-is-set.patch \
|
||||
file://thttpd.service \
|
||||
file://thttpd.conf \
|
||||
file://init"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/blueness/sthttpd/releases/"
|
||||
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+).tar.gz"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools update-rc.d systemd update-alternatives
|
||||
|
||||
ALTERNATIVE_PRIORITY = "100"
|
||||
ALTERNATIVE:${PN}-doc = "htpasswd.1"
|
||||
ALTERNATIVE_LINK_NAME[htpasswd.1] = "${mandir}/man1/htpasswd.1"
|
||||
|
||||
SRV_DIR ?= "${servicedir}/www"
|
||||
|
||||
# Note that `${sbindir}/makeweb' is installed setgid to this group,
|
||||
# but ${SRV_DIR} is not installed chgrp'd to the group by default.
|
||||
WEBGROUP ?= "www-data"
|
||||
|
||||
do_configure:prepend () {
|
||||
export WEBDIR=${SRV_DIR}
|
||||
export WEBGROUP=${WEBGROUP}
|
||||
}
|
||||
|
||||
do_install:append () {
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/thttpd
|
||||
install -c -m 755 ${WORKDIR}/thttpd.conf ${D}${sysconfdir}
|
||||
sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${sysconfdir}/init.d/thttpd
|
||||
sed -i -e 's,@@SRVDIR,${SRV_DIR},g' ${D}${sysconfdir}/thttpd.conf
|
||||
sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/thttpd
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/thttpd.service ${D}${systemd_unitdir}/system
|
||||
sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
|
||||
sed -i 's!/var/!${localstatedir}/!g' ${D}${systemd_unitdir}/system/thttpd.service
|
||||
sed -i -e 's,@@CONFFILE,${sysconfdir}/thttpd.conf,g' ${D}${systemd_unitdir}/system/thttpd.service
|
||||
}
|
||||
|
||||
INITSCRIPT_NAME = "thttpd"
|
||||
INITSCRIPT_PARAMS = "defaults"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "thttpd.service"
|
||||
|
||||
FILES:${PN} += "${SRV_DIR}"
|
||||
FILES:${PN}-dbg += "${SRV_DIR}/cgi-bin/.debug"
|
||||
@@ -0,0 +1,42 @@
|
||||
# phpMyAdmin default Apache configuration
|
||||
|
||||
Alias /phpmyadmin /usr/share/phpmyadmin
|
||||
|
||||
<Directory /usr/share/phpmyadmin>
|
||||
Options FollowSymLinks
|
||||
DirectoryIndex index.php
|
||||
Require all granted
|
||||
|
||||
<IfModule mod_php5.c>
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
php_flag magic_quotes_gpc Off
|
||||
php_flag track_vars On
|
||||
php_flag register_globals Off
|
||||
php_admin_flag allow_url_fopen Off
|
||||
php_value include_path .
|
||||
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
|
||||
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# Authorize for setup
|
||||
<Directory /usr/share/phpmyadmin/setup>
|
||||
<IfModule mod_authn_file.c>
|
||||
AuthType Basic
|
||||
AuthName "phpMyAdmin Setup"
|
||||
AuthUserFile /etc/phpmyadmin/htpasswd.setup
|
||||
</IfModule>
|
||||
Require valid-user
|
||||
</Directory>
|
||||
|
||||
# Disallow web access to directories that don't need it
|
||||
<Directory /usr/share/phpmyadmin/libraries>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
</Directory>
|
||||
<Directory /usr/share/phpmyadmin/setup/lib>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
</Directory>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
SUMMARY = "Web-based MySQL administration interface"
|
||||
HOMEPAGE = "http://www.phpmyadmin.net"
|
||||
# Main code is GPLv2, vendor/tecnickcom/tcpdf is under LGPLv3, js/jquery is under MIT
|
||||
LICENSE = "GPL-2.0-only & LGPL-3.0-only & MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||
file://vendor/tecnickcom/tcpdf/LICENSE.TXT;md5=d0ff7e060074497f34481cf574e8a581 \
|
||||
file://js/vendor/jquery/MIT-LICENSE.txt;md5=de877aa6d744cc160ff41c26a8e4811f \
|
||||
"
|
||||
|
||||
SRC_URI = "https://files.phpmyadmin.net/phpMyAdmin/${PV}/phpMyAdmin-${PV}-all-languages.tar.xz \
|
||||
file://apache.conf \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "373f9599dfbd96d6fe75316d5dad189e68c305f297edf42377db9dd6b41b2557"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://www.phpmyadmin.net/downloads/"
|
||||
UPSTREAM_CHECK_REGEX = "phpMyAdmin-(?P<pver>\d+(\.\d+)+)-all-languages.tar.xz"
|
||||
|
||||
S = "${WORKDIR}/phpMyAdmin-${PV}-all-languages"
|
||||
|
||||
inherit allarch
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${datadir}/${BPN}
|
||||
cp -R --no-dereference --preserve=mode,links -v * ${D}${datadir}/${BPN}
|
||||
chown -R root:root ${D}${datadir}/${BPN}
|
||||
# Don't install patches to target
|
||||
rm -rf ${D}${datadir}/${BPN}/patches
|
||||
|
||||
install -d ${D}${sysconfdir}/apache2/conf.d
|
||||
install -m 0644 ${WORKDIR}/apache.conf ${D}${sysconfdir}/apache2/conf.d/phpmyadmin.conf
|
||||
|
||||
# Remove a few scripts that explicitly require bash (!)
|
||||
rm -f ${D}${datadir}/phpmyadmin/libraries/transformations/*.sh
|
||||
}
|
||||
|
||||
FILES:${PN} = "${datadir}/${BPN} \
|
||||
${sysconfdir}/apache2/conf.d"
|
||||
|
||||
RDEPENDS:${PN} += "bash php-cli"
|
||||
@@ -0,0 +1,34 @@
|
||||
SUMMARY = "Debugging and profiling extension for PHP"
|
||||
LICENSE = "Xdebug"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=92d94a330d34ee6edc2638450736f119"
|
||||
|
||||
DEPENDS = "php re2c-native"
|
||||
|
||||
SRC_URI = "http://xdebug.org/files/xdebug-${PV}.tgz"
|
||||
|
||||
SRC_URI[sha256sum] = "7769b20eecdadf5fbe9f582512c10b394fb575b6f7a8c3a3a82db6883e0032b7"
|
||||
|
||||
UPSTREAM_CHECK_REGEX = "xdebug-(?P<pver>\d+(\.\d+)+)\.tgz"
|
||||
|
||||
inherit autotools
|
||||
|
||||
EXTRA_OECONF += "--enable-xdebug -with-php-config=${STAGING_BINDIR_CROSS}/php-config"
|
||||
|
||||
do_configure() {
|
||||
cd ${S}
|
||||
${STAGING_BINDIR_CROSS}/phpize
|
||||
cd ${B}
|
||||
|
||||
# Running autoreconf as autotools_do_configure would do here
|
||||
# breaks the libtool configuration resulting in a failure later
|
||||
# in do_compile. It's possible this may be fixable, however the
|
||||
# easiest course of action for the moment is to avoid doing that.
|
||||
oe_runconf
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install INSTALL_ROOT=${D}
|
||||
}
|
||||
|
||||
FILES:${PN} += "${libdir}/php*/extensions/*/*.so"
|
||||
FILES:${PN}-dbg += "${libdir}/php*/extensions/*/.debug"
|
||||
@@ -0,0 +1,16 @@
|
||||
DESCRIPTION = "FastCGI is a protocol for interfacing interactive programs with a web server."
|
||||
HOMEPAGE = "http://www.fastcgi.com"
|
||||
LICENSE = "OML"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TERMS;md5=e3aacac3a647af6e7e31f181cda0a06a"
|
||||
|
||||
SRCREV = "382aa2b0d53a87c27f2f647dfaf670375ba0b85f"
|
||||
PV = "2.4.2"
|
||||
|
||||
SRC_URI = "git://github.com/FastCGI-Archives/fcgi2.git;protocol=https;branch=master \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit autotools
|
||||
|
||||
PARALLEL_MAKE = ""
|
||||
@@ -0,0 +1,313 @@
|
||||
From 962e532099d10ee6ce5b4ce68537bc46595230c0 Mon Sep 17 00:00:00 2001
|
||||
From: Joshua Watt <Joshua.Watt@garmin.com>
|
||||
Date: Tue, 24 Nov 2020 08:30:13 -0600
|
||||
Subject: [PATCH] Fix implicit fallthrough warning
|
||||
|
||||
Fixes a warning about an implicit fall through in a case statement
|
||||
(-Werror=implicit-fallthrough) with newer versions of GCC
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/gnosek/fcgiwrap/pull/54]
|
||||
Signed-off-by: Joshua Watt <Joshua.Watt@garmin.com>
|
||||
---
|
||||
configure.ac | 3 +
|
||||
fcgiwrap.c | 7 ++
|
||||
m4/ax_gcc_func_attribute.m4 | 242 ++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 252 insertions(+)
|
||||
create mode 100644 m4/ax_gcc_func_attribute.m4
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index bb3674e..9ef517a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
AC_PREREQ(2.61)
|
||||
AC_INIT([fcgiwrap], [1.1.0], [root@localdomain.pl])
|
||||
+AC_CONFIG_MACRO_DIRS([m4])
|
||||
AM_CFLAGS="-std=gnu99 -Wall -Wextra -Werror -pedantic"
|
||||
if test x"$CFLAGS" = x""; then
|
||||
AM_CFLAGS="$AM_CFLAGS -O2 -g3"
|
||||
@@ -62,5 +63,7 @@ AC_FUNC_MALLOC
|
||||
AC_CHECK_FUNCS([strchr strdup strrchr])
|
||||
AC_CHECK_FUNCS([dup2 putenv select setenv strerror],, [AC_MSG_ERROR([seems as if your libraries don't provide an expected function])])
|
||||
|
||||
+AX_GCC_FUNC_ATTRIBUTE([fallthrough])
|
||||
+
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
diff --git a/fcgiwrap.c b/fcgiwrap.c
|
||||
index b44d8aa..a83726b 100644
|
||||
--- a/fcgiwrap.c
|
||||
+++ b/fcgiwrap.c
|
||||
@@ -56,6 +56,12 @@
|
||||
#define UNIX_PATH_MAX 108
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_FUNC_ATTRIBUTE_FALLTHROUGH
|
||||
+#define FALLTHROUGH __attribute__ ((fallthrough))
|
||||
+#else
|
||||
+#define FALLTHROUGH (void)
|
||||
+#endif
|
||||
+
|
||||
extern char **environ;
|
||||
static char * const * inherited_environ;
|
||||
static const char **allowed_programs;
|
||||
@@ -580,6 +586,7 @@ static void handle_fcgi_request(void)
|
||||
execl(filename, filename, (void *)NULL);
|
||||
cgi_error("502 Bad Gateway", "Cannot execute script", filename);
|
||||
|
||||
+ FALLTHROUGH;
|
||||
default: /* parent */
|
||||
close(pipe_in[0]);
|
||||
close(pipe_out[1]);
|
||||
diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4
|
||||
new file mode 100644
|
||||
index 0000000..da2b1ac
|
||||
--- /dev/null
|
||||
+++ b/m4/ax_gcc_func_attribute.m4
|
||||
@@ -0,0 +1,242 @@
|
||||
+# ===========================================================================
|
||||
+# https://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
|
||||
+# ===========================================================================
|
||||
+#
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
|
||||
+#
|
||||
+# DESCRIPTION
|
||||
+#
|
||||
+# This macro checks if the compiler supports one of GCC's function
|
||||
+# attributes; many other compilers also provide function attributes with
|
||||
+# the same syntax. Compiler warnings are used to detect supported
|
||||
+# attributes as unsupported ones are ignored by default so quieting
|
||||
+# warnings when using this macro will yield false positives.
|
||||
+#
|
||||
+# The ATTRIBUTE parameter holds the name of the attribute to be checked.
|
||||
+#
|
||||
+# If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
|
||||
+#
|
||||
+# The macro caches its result in the ax_cv_have_func_attribute_<attribute>
|
||||
+# variable.
|
||||
+#
|
||||
+# The macro currently supports the following function attributes:
|
||||
+#
|
||||
+# alias
|
||||
+# aligned
|
||||
+# alloc_size
|
||||
+# always_inline
|
||||
+# artificial
|
||||
+# cold
|
||||
+# const
|
||||
+# constructor
|
||||
+# constructor_priority for constructor attribute with priority
|
||||
+# deprecated
|
||||
+# destructor
|
||||
+# dllexport
|
||||
+# dllimport
|
||||
+# error
|
||||
+# externally_visible
|
||||
+# fallthrough
|
||||
+# flatten
|
||||
+# format
|
||||
+# format_arg
|
||||
+# gnu_format
|
||||
+# gnu_inline
|
||||
+# hot
|
||||
+# ifunc
|
||||
+# leaf
|
||||
+# malloc
|
||||
+# noclone
|
||||
+# noinline
|
||||
+# nonnull
|
||||
+# noreturn
|
||||
+# nothrow
|
||||
+# optimize
|
||||
+# pure
|
||||
+# sentinel
|
||||
+# sentinel_position
|
||||
+# unused
|
||||
+# used
|
||||
+# visibility
|
||||
+# warning
|
||||
+# warn_unused_result
|
||||
+# weak
|
||||
+# weakref
|
||||
+#
|
||||
+# Unsupported function attributes will be tested with a prototype
|
||||
+# returning an int and not accepting any arguments and the result of the
|
||||
+# check might be wrong or meaningless so use with care.
|
||||
+#
|
||||
+# LICENSE
|
||||
+#
|
||||
+# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
|
||||
+#
|
||||
+# Copying and distribution of this file, with or without modification, are
|
||||
+# permitted in any medium without royalty provided the copyright notice
|
||||
+# and this notice are preserved. This file is offered as-is, without any
|
||||
+# warranty.
|
||||
+
|
||||
+#serial 12
|
||||
+
|
||||
+AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
|
||||
+ AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
|
||||
+
|
||||
+ AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||
+ m4_case([$1],
|
||||
+ [alias], [
|
||||
+ int foo( void ) { return 0; }
|
||||
+ int bar( void ) __attribute__(($1("foo")));
|
||||
+ ],
|
||||
+ [aligned], [
|
||||
+ int foo( void ) __attribute__(($1(32)));
|
||||
+ ],
|
||||
+ [alloc_size], [
|
||||
+ void *foo(int a) __attribute__(($1(1)));
|
||||
+ ],
|
||||
+ [always_inline], [
|
||||
+ inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [artificial], [
|
||||
+ inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [cold], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [const], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [constructor_priority], [
|
||||
+ int foo( void ) __attribute__((__constructor__(65535/2)));
|
||||
+ ],
|
||||
+ [constructor], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [deprecated], [
|
||||
+ int foo( void ) __attribute__(($1("")));
|
||||
+ ],
|
||||
+ [destructor], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [dllexport], [
|
||||
+ __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [dllimport], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [error], [
|
||||
+ int foo( void ) __attribute__(($1("")));
|
||||
+ ],
|
||||
+ [externally_visible], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [fallthrough], [
|
||||
+ int foo( void ) {switch (0) { case 1: __attribute__(($1)); case 2: break ; }};
|
||||
+ ],
|
||||
+ [flatten], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [format], [
|
||||
+ int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
|
||||
+ ],
|
||||
+ [gnu_format], [
|
||||
+ int foo(const char *p, ...) __attribute__((format(gnu_printf, 1, 2)));
|
||||
+ ],
|
||||
+ [format_arg], [
|
||||
+ char *foo(const char *p) __attribute__(($1(1)));
|
||||
+ ],
|
||||
+ [gnu_inline], [
|
||||
+ inline __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [hot], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [ifunc], [
|
||||
+ int my_foo( void ) { return 0; }
|
||||
+ static int (*resolve_foo(void))(void) { return my_foo; }
|
||||
+ int foo( void ) __attribute__(($1("resolve_foo")));
|
||||
+ ],
|
||||
+ [leaf], [
|
||||
+ __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [malloc], [
|
||||
+ void *foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [noclone], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [noinline], [
|
||||
+ __attribute__(($1)) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [nonnull], [
|
||||
+ int foo(char *p) __attribute__(($1(1)));
|
||||
+ ],
|
||||
+ [noreturn], [
|
||||
+ void foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [nothrow], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [optimize], [
|
||||
+ __attribute__(($1(3))) int foo( void ) { return 0; }
|
||||
+ ],
|
||||
+ [pure], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [sentinel], [
|
||||
+ int foo(void *p, ...) __attribute__(($1));
|
||||
+ ],
|
||||
+ [sentinel_position], [
|
||||
+ int foo(void *p, ...) __attribute__(($1(1)));
|
||||
+ ],
|
||||
+ [returns_nonnull], [
|
||||
+ void *foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [unused], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [used], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [visibility], [
|
||||
+ int foo_def( void ) __attribute__(($1("default")));
|
||||
+ int foo_hid( void ) __attribute__(($1("hidden")));
|
||||
+ int foo_int( void ) __attribute__(($1("internal")));
|
||||
+ int foo_pro( void ) __attribute__(($1("protected")));
|
||||
+ ],
|
||||
+ [warning], [
|
||||
+ int foo( void ) __attribute__(($1("")));
|
||||
+ ],
|
||||
+ [warn_unused_result], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [weak], [
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ],
|
||||
+ [weakref], [
|
||||
+ static int foo( void ) { return 0; }
|
||||
+ static int bar( void ) __attribute__(($1("foo")));
|
||||
+ ],
|
||||
+ [
|
||||
+ m4_warn([syntax], [Unsupported attribute $1, the test may fail])
|
||||
+ int foo( void ) __attribute__(($1));
|
||||
+ ]
|
||||
+ )], [])
|
||||
+ ],
|
||||
+ dnl GCC doesn't exit with an error if an unknown attribute is
|
||||
+ dnl provided but only outputs a warning, so accept the attribute
|
||||
+ dnl only if no warning were issued.
|
||||
+ [AS_IF([grep -- -Wattributes conftest.err],
|
||||
+ [AS_VAR_SET([ac_var], [no])],
|
||||
+ [AS_VAR_SET([ac_var], [yes])])],
|
||||
+ [AS_VAR_SET([ac_var], [no])])
|
||||
+ ])
|
||||
+
|
||||
+ AS_IF([test yes = AS_VAR_GET([ac_var])],
|
||||
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
|
||||
+ [Define to 1 if the system has the `$1' function attribute])], [])
|
||||
+
|
||||
+ AS_VAR_POPDEF([ac_var])
|
||||
+])
|
||||
--
|
||||
2.29.2
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
SUMMARY = "FastCGI wrapper for CGI scripts"
|
||||
DESCRIPTION = "FcgiWrap is a simple server for running CGI applications over FastCGI. Fcgiwrap can be used together with Nginx to serve CGI or Perl scripts"
|
||||
HOMEPAGE = "https://github.com/gnosek/fcgiwrap"
|
||||
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=a95d02d614a3a0232d4e6e51b7963c5b"
|
||||
|
||||
DEPENDS = "fcgi"
|
||||
|
||||
SRC_URI = "git://github.com/gnosek/fcgiwrap.git;protocol=https;branch=${BRANCH} \
|
||||
file://0001-Fix-implicit-fallthrough-warning.patch \
|
||||
"
|
||||
BRANCH = "master"
|
||||
SRCREV = "99c942c90063c73734e56bacaa65f947772d9186"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
CFLAGS =+ "-I${B}"
|
||||
EXTRA_OEMAKE = "VPATH=${S}"
|
||||
|
||||
inherit autotools pkgconfig
|
||||
|
||||
do_install() {
|
||||
install -Dm 755 ${B}/fcgiwrap ${D}${sbindir}/fcgiwrap
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
SUMMARY = "spawn-fcgi is used to spawn FastCGI applications"
|
||||
HOMEPAGE = "http://redmine.lighttpd.net/projects/spawn-fcgi"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
|
||||
|
||||
SRC_URI = "http://download.lighttpd.net/spawn-fcgi/releases-1.6.x/spawn-fcgi-${PV}.tar.gz"
|
||||
|
||||
SRC_URI[sha256sum] = "a72d7bf7fb6d1a0acda89c93d4f060bf77a2dba97ddcfecd00f11e708f592c40"
|
||||
|
||||
inherit autotools
|
||||
|
||||
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
|
||||
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
|
||||
@@ -0,0 +1,194 @@
|
||||
SUMMARY = "Admin interface for Linux machines"
|
||||
DESCRIPTION = "Cockpit makes it easy to administer your GNU/Linux servers via a web browser"
|
||||
|
||||
LICENSE = "LGPL-2.1-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
|
||||
|
||||
SRC_URI += " \
|
||||
https://github.com/cockpit-project/cockpit/releases/download/${PV}/cockpit-${PV}.tar.xz \
|
||||
file://0001-remove-tests-dep-on-gobject-intro.patch \
|
||||
file://0002-fix-makefile-use-copy-rule-for-unmodified-files.patch \
|
||||
file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \
|
||||
file://cockpit.pam \
|
||||
"
|
||||
SRC_URI[sha256sum] = "dde91a157ee8514112334653fa2775a99d71bd1b604067a48eaf7411114d19de"
|
||||
|
||||
inherit gettext pkgconfig autotools systemd features_check
|
||||
|
||||
DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
|
||||
|
||||
COMPATIBLE_HOST:libc-musl = "null"
|
||||
|
||||
RDEPENDS:${PN} += "glib-networking"
|
||||
|
||||
REQUIRED_DISTRO_FEATURES = "systemd pam"
|
||||
|
||||
COCKPIT_USER_GROUP ?= "root"
|
||||
COCKPIT_WS_USER_GROUP ?= "${COCKPIT_USER_GROUP}"
|
||||
|
||||
EXTRA_AUTORECONF = "-I tools"
|
||||
EXTRA_OECONF = " \
|
||||
--with-cockpit-user=${COCKPIT_USER_GROUP} \
|
||||
--with-cockpit-group=${COCKPIT_USER_GROUP} \
|
||||
--with-admin-group=${COCKPIT_USER_GROUP} \
|
||||
--with-cockpit-ws-instance-user=${COCKPIT_WS_USER_GROUP} \
|
||||
--with-cockpit-ws-instance-group=${COCKPIT_WS_USER_GROUP} \
|
||||
--disable-doc \
|
||||
--with-systemdunitdir=${systemd_system_unitdir} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG ??= " \
|
||||
${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
|
||||
"
|
||||
|
||||
PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
|
||||
PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
|
||||
PACKAGECONFIG[storaged] = ",,,udisks2"
|
||||
PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
|
||||
|
||||
PACKAGES =+ " \
|
||||
${PN}-pcp \
|
||||
${PN}-realmd \
|
||||
${PN}-tuned \
|
||||
${PN}-shell \
|
||||
${PN}-systemd \
|
||||
${PN}-users \
|
||||
${PN}-kdump \
|
||||
${PN}-sosreport \
|
||||
${PN}-storaged \
|
||||
${PN}-networkmanager \
|
||||
${PN}-machines \
|
||||
${PN}-selinux \
|
||||
${PN}-playground \
|
||||
${PN}-docker \
|
||||
${PN}-dashboard \
|
||||
${PN}-bridge \
|
||||
${PN}-ws \
|
||||
${PN}-desktop \
|
||||
"
|
||||
SYSTEMD_PACKAGES = "${PN}-ws"
|
||||
|
||||
FILES:${PN}-pcp = " \
|
||||
${libexecdir}/cockpit-pcp \
|
||||
${datadir}/cockpit/pcp \
|
||||
${localstatedir}/lib/pcp/config/pmlogconf/tools/cockpit \
|
||||
"
|
||||
FILES:${PN}-realmd = "${datadir}/cockpit/realmd"
|
||||
FILES:${PN}-tuned = "${datadir}/cockpit/tuned"
|
||||
FILES:${PN}-shell = "${datadir}/cockpit/shell"
|
||||
FILES:${PN}-systemd = "${datadir}/cockpit/systemd"
|
||||
FILES:${PN}-users = "${datadir}/cockpit/users"
|
||||
FILES:${PN}-kdump = " \
|
||||
${datadir}/cockpit/kdump \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-kdump.metainfo.xml \
|
||||
"
|
||||
FILES:${PN}-sosreport = " \
|
||||
${datadir}/cockpit/sosreport \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-sosreport.metainfo.xml \
|
||||
${datadir}/pixmaps/cockpit-sosreport.png \
|
||||
"
|
||||
FILES:${PN}-storaged = " \
|
||||
${datadir}/cockpit/storaged \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-storaged.metainfo.xml \
|
||||
"
|
||||
|
||||
FILES:${PN}-networkmanager = "${datadir}/cockpit/networkmanager"
|
||||
RDEPENDS:${PN}-networkmanager = "networkmanager"
|
||||
|
||||
FILES:${PN}-machines = " \
|
||||
${datadir}/cockpit/machines \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-machines.metainfo.xml \
|
||||
"
|
||||
FILES:${PN}-selinux = " \
|
||||
${datadir}/cockpit/selinux \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-selinux.metainfo.xml \
|
||||
"
|
||||
FILES:${PN}-playground = "${datadir}/cockpit/playground"
|
||||
FILES:${PN}-docker = " \
|
||||
${datadir}/cockpit/docker \
|
||||
${datadir}/metainfo/org.cockpit-project.cockpit-docker.metainfo.xml \
|
||||
"
|
||||
FILES:${PN}-dashboard = "${datadir}/cockpit/dashboard"
|
||||
ALLOW_EMPTY:${PN}-dashboard = "1"
|
||||
|
||||
FILES:${PN}-bridge = " \
|
||||
${bindir}/cockpit-bridge \
|
||||
${libexec}/cockpit-askpass \
|
||||
"
|
||||
RDEPENDS:${PN}-bridge = ""
|
||||
|
||||
FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop"
|
||||
RDEPENDS:${PN}-desktop += "bash"
|
||||
|
||||
FILES:${PN}-ws = " \
|
||||
${sysconfdir}/cockpit/ws-certs.d \
|
||||
${sysconfdir}/pam.d/cockpit \
|
||||
${sysconfdir}/issue.d/cockpit.issue \
|
||||
${sysconfdir}/motd.d/cockpit \
|
||||
${datadir}/cockpit/motd/update-motd \
|
||||
${datadir}/cockpit/motd/inactive.motd \
|
||||
${systemd_system_unitdir}/cockpit.service \
|
||||
${systemd_system_unitdir}/cockpit-motd.service \
|
||||
${systemd_system_unitdir}/cockpit.socket \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-http.socket \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-http.service \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.socket \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-http-redirect.service \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-https-factory.socket \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-https-factory@.service \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-https@.socket \
|
||||
${systemd_system_unitdir}/cockpit-wsinstance-https@.service \
|
||||
${systemd_system_unitdir}/system-cockpithttps.slice \
|
||||
${libdir}/tmpfiles.d/cockpit-tempfiles.conf \
|
||||
${sbindir}/remotectl \
|
||||
${libdir}/security/pam_ssh_add.so \
|
||||
${libdir}/security/pam_cockpit_cert.so \
|
||||
${libexecdir}/cockpit-ws \
|
||||
${libexecdir}/cockpit-wsinstance-factory \
|
||||
${libexecdir}/cockpit-tls \
|
||||
${libexecdir}/cockpit-session \
|
||||
${localstatedir}/lib/cockpit \
|
||||
${datadir}/cockpit/static \
|
||||
${datadir}/cockpit/branding \
|
||||
"
|
||||
CONFFILES:${PN}-ws += " \
|
||||
${sysconfdir}/issue.d/cockpit.issue \
|
||||
${sysconfdir}/motd.d/cockpit \
|
||||
"
|
||||
RDEPENDS:${PN}-ws += "openssl-bin"
|
||||
SYSTEMD_SERVICE:${PN}-ws = "cockpit.socket"
|
||||
|
||||
FILES:${PN} += " \
|
||||
${datadir}/cockpit/base1 \
|
||||
${sysconfdir}/cockpit/machines.d \
|
||||
${datadir}/polkit-1/actions/org.cockpit-project.cockpit-bridge.policy \
|
||||
${datadir}/cockpit/ssh \
|
||||
${libexecdir}/cockpit-ssh \
|
||||
${datadir}/cockpit \
|
||||
${datadir}/metainfo/cockpit.appdata.xml \
|
||||
${datadir}/pixmaps/cockpit.png \
|
||||
${nonarch_libdir}/tmpfiles.d \
|
||||
${nonarch_libdir}/firewalld \
|
||||
"
|
||||
RDEPENDS:${PN} += "${PN}-bridge"
|
||||
# Needs bash for /usr/libexec/cockpit-certificate-helper
|
||||
RDEPENDS:${PN} += "bash"
|
||||
|
||||
do_install:append() {
|
||||
pkgdatadir=${datadir}/cockpit
|
||||
|
||||
chmod 4750 ${D}${libexecdir}/cockpit-session
|
||||
|
||||
install -d "${D}${sysconfdir}/pam.d"
|
||||
install -p -m 0644 ${WORKDIR}/cockpit.pam ${D}${sysconfdir}/pam.d/cockpit
|
||||
|
||||
# provided by firewalld
|
||||
rm -rf ${D}${libdir}/firewalld
|
||||
|
||||
if ! ${@bb.utils.contains('PACKAGECONFIG', 'storaged', 'true', 'false', d)}; then
|
||||
for filename in ${FILES:${PN}-storaged}
|
||||
do
|
||||
rm -rf ${D}$filename
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
From 588bb5cb248aaeaf0fea33084229c99ad1574291 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 7 Sep 2022 11:12:28 -0700
|
||||
Subject: [PATCH] Warn not error if xsltproc is not found
|
||||
|
||||
Upstream-Status: Inappropriate [oe-core specific]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7659f41..537203e 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -177,7 +177,7 @@ AC_SUBST([systemdunitdir], [$systemdunitdir])
|
||||
# package as xgettext, and we find them by PATH, so just check for the one.
|
||||
AC_PATH_PROG([XGETTEXT], [xsltproc], [no])
|
||||
if test "$XGETTEXT" = "no"; then
|
||||
- AC_MSG_ERROR([Please install gettext tools])
|
||||
+ AC_MSG_WARN([Please install gettext tools])
|
||||
fi
|
||||
|
||||
# ssh-add
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
From 788aace494f79e8201b18ebcdf1592b5030c5295 Mon Sep 17 00:00:00 2001
|
||||
From: Adrian Freihofer <adrian.freihofer@siemens.com>
|
||||
Date: Wed, 4 Dec 2019 17:23:46 +0100
|
||||
Subject: [PATCH] remove tests dep on gobject-intro
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/ws/Makefile-ws.am | 54 ---------------------------------------------------
|
||||
1 file changed, 54 deletions(-)
|
||||
|
||||
--- a/src/ws/Makefile-ws.am
|
||||
+++ b/src/ws/Makefile-ws.am
|
||||
@@ -58,46 +58,6 @@ pam_cockpit_cert_so_LDFLAGS = -shared
|
||||
pam_cockpit_cert_so_SOURCES = src/ws/pam_cockpit_cert.c
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
-# test-server: server for running the html/browser unit tests against
|
||||
-
|
||||
-check_PROGRAMS += test-server
|
||||
-
|
||||
-test_server_CPPFLAGS = $(libcockpit_ws_a_CPPFLAGS) $(TEST_CPP)
|
||||
-test_server_LDADD = $(libcockpit_ws_a_LIBS) $(TEST_LIBS)
|
||||
-
|
||||
-test_server_SOURCES = \
|
||||
- src/ws/mock-service.c \
|
||||
- src/ws/mock-service.h \
|
||||
- src/ws/test-server.c \
|
||||
- $(NULL)
|
||||
-
|
||||
-test_server_CPPFLAGS += -I$(top_builddir)/src/ws
|
||||
-nodist_test_server_SOURCES = $(GDBUS_CODEGEN_GENERATED)
|
||||
-
|
||||
-BUILT_SOURCES += $(GDBUS_CODEGEN_GENERATED)
|
||||
-CLEANFILES += $(GDBUS_CODEGEN_GENERATED)
|
||||
-GDBUS_CODEGEN_GENERATED = \
|
||||
- src/ws/mock-dbus-tests.h \
|
||||
- src/ws/mock-dbus-tests.c \
|
||||
- $(NULL)
|
||||
-
|
||||
-EXTRA_DIST += $(GDBUS_CODEGEN_XML)
|
||||
-GDBUS_CODEGEN_XML = $(srcdir)/src/ws/com.redhat.Cockpit.DBusTests.xml
|
||||
-
|
||||
-GDBUS_CODEGEN_INVOCATION = \
|
||||
- $(AM_V_GEN) gdbus-codegen \
|
||||
- --interface-prefix com.redhat.Cockpit.DBusTests \
|
||||
- --c-namespace Test \
|
||||
- --c-generate-object-manager \
|
||||
- $(NULL)
|
||||
-
|
||||
-src/ws/mock-dbus-tests.h: $(GDBUS_CODEGEN_XML)
|
||||
- $(GDBUS_CODEGEN_INVOCATION) --header --output $@ $<
|
||||
-
|
||||
-src/ws/mock-dbus-tests.c: $(GDBUS_CODEGEN_XML)
|
||||
- $(GDBUS_CODEGEN_INVOCATION) --body --output $@ $<
|
||||
-
|
||||
-# -----------------------------------------------------------------------------
|
||||
# Unit tests
|
||||
|
||||
check_SCRIPTS += src/ws/mock-cat-with-init
|
||||
@@ -0,0 +1,47 @@
|
||||
From 1edf0756bf4fd002f5b60cf2b86d4b97a00aff20 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Haener <michael.haener@siemens.com>
|
||||
Date: Wed, 25 Mar 2020 08:32:07 +0100
|
||||
Subject: [PATCH] fix(makefile): use copy rule for unmodified files
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
pkg/Makefile.am | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
--- a/pkg/Makefile.am
|
||||
+++ b/pkg/Makefile.am
|
||||
@@ -7,6 +7,33 @@ TESTS += $(pkg_TESTS)
|
||||
%.metainfo.xml: %.metainfo.xml.in
|
||||
$(AM_V_GEN) mkdir -p $(dir $@) && msgfmt --xml -d $(top_srcdir)/po --template $< --output $@
|
||||
|
||||
+dist/playground/hammer.gif: pkg/playground/hammer.gif
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/sosreport/sosreport.png: pkg/sosreport/sosreport.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/apps/default.png: pkg/apps/default.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/storaged/images/storage-array.png: pkg/storaged/images/storage-array.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/storaged/images/storage-disk.png: pkg/storaged/images/storage-disk.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/shell/images/server-error.png: pkg/shell/images/server-error.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/shell/images/server-large.png: pkg/shell/images/server-large.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/shell/images/server-small.png: pkg/shell/images/server-small.png
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
+dist/shell/index.html: pkg/shell/index.html
|
||||
+ $(COPY_RULE)
|
||||
+
|
||||
metainfodir = ${datarootdir}/metainfo
|
||||
nodist_metainfo_DATA = \
|
||||
pkg/sosreport/org.cockpit-project.cockpit-sosreport.metainfo.xml \
|
||||
@@ -0,0 +1,8 @@
|
||||
#%PAM-1.0
|
||||
auth required pam_unix.so nullok
|
||||
|
||||
account required pam_unix.so
|
||||
|
||||
-session optional pam_systemd.so
|
||||
session required pam_unix.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
[Unit]
|
||||
Description=Real time performance monitoring
|
||||
RequiresMountsFor=/var
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=/bin/mkdir -p /var/log/netdata
|
||||
ExecStartPre=/bin/chown -R netdata.netdata /var/log/netdata
|
||||
ExecStart=/usr/sbin/netdata -D -u netdata
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,82 @@
|
||||
SUMMARY = "Real-time performance monitoring"
|
||||
DESCRIPTION = "Netdata is high-fidelity infrastructure monitoring and troubleshooting. \
|
||||
Open-source, free, preconfigured, opinionated, and always real-time."
|
||||
HOMEPAGE = "https://github.com/netdata/netdata/"
|
||||
LICENSE = "GPL-3.0-only"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=fc9b848046ef54b5eaee6071947abd24"
|
||||
|
||||
DEPENDS += "libuv util-linux zlib"
|
||||
|
||||
SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-v${PV}.tar.gz \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f4a1233112b55e07e2862ffda0416255f0aa4c8e2b16929b76fa7ad6b69fd931"
|
||||
|
||||
# default netdata.conf for netdata configuration
|
||||
SRC_URI += "file://netdata.conf"
|
||||
|
||||
# file for providing systemd service support
|
||||
SRC_URI += "file://netdata.service"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/netdata/netdata/releases"
|
||||
|
||||
S = "${WORKDIR}/${BPN}-v${PV}"
|
||||
|
||||
# Stop sending anonymous statistics to Google Analytics
|
||||
NETDATA_ANONYMOUS ??= "enabled"
|
||||
|
||||
inherit pkgconfig autotools-brokensep useradd systemd
|
||||
|
||||
LIBS:toolchain-clang:x86 = "-latomic"
|
||||
LIBS:riscv64 = "-latomic"
|
||||
LIBS:riscv32 = "-latomic"
|
||||
LIBS:mips = "-latomic"
|
||||
export LIBS
|
||||
|
||||
#systemd
|
||||
SYSTEMD_PACKAGES = "${PN}"
|
||||
SYSTEMD_SERVICE:${PN} = "netdata.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN} = "enable"
|
||||
|
||||
#User specific
|
||||
USERADD_PACKAGES = "${PN}"
|
||||
USERADD_PARAM:${PN} = "--system --no-create-home --home-dir ${localstatedir}/run/netdata --user-group netdata"
|
||||
|
||||
PACKAGECONFIG ??= "https"
|
||||
PACKAGECONFIG[cloud] = "--enable-cloud, --disable-cloud, json-c"
|
||||
PACKAGECONFIG[compression] = "--enable-compression, --disable-compression, lz4"
|
||||
PACKAGECONFIG[https] = "--enable-https, --disable-https, openssl"
|
||||
|
||||
# ebpf doesn't compile (or detect) the cross compilation well
|
||||
EXTRA_OECONF += "--disable-ebpf"
|
||||
|
||||
do_install:append() {
|
||||
#set S UID for plugins
|
||||
chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||
# Install systemd unit files
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
|
||||
fi
|
||||
|
||||
# Install default netdata.conf
|
||||
install -d ${D}${sysconfdir}/netdata
|
||||
install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
|
||||
sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||
sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||
sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||
|
||||
if [ "${NETDATA_ANONYMOUS}" = "enabled" ]; then
|
||||
touch ${D}${sysconfdir}/netdata/.opt-out-from-anonymous-statistics
|
||||
fi
|
||||
|
||||
install --group netdata --owner netdata --directory ${D}${localstatedir}/cache/netdata
|
||||
install --group netdata --owner netdata --directory ${D}${localstatedir}/lib/netdata
|
||||
|
||||
chown -R netdata:netdata ${D}${datadir}/netdata/web
|
||||
}
|
||||
|
||||
FILES:${PN} += "${localstatedir}/cache/netdata/ ${localstatedir}/lib/netdata/"
|
||||
|
||||
RDEPENDS:${PN} = "bash zlib"
|
||||
@@ -0,0 +1,64 @@
|
||||
Disable OS version check in status screen
|
||||
|
||||
The code is not able to accurately detect the correct distro/version at
|
||||
the moment.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
Index: webmin-1.850/webmin/webmin-lib.pl
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/webmin/webmin-lib.pl
|
||||
+++ webmin-1.850/webmin/webmin-lib.pl
|
||||
@@ -1112,28 +1112,28 @@ my %miniserv;
|
||||
&load_theme_library(); # So that UI functions work
|
||||
|
||||
# Need OS upgrade
|
||||
-my %realos = &detect_operating_system(undef, 1);
|
||||
-if (($realos{'os_version'} ne $gconfig{'os_version'} ||
|
||||
- $realos{'os_type'} ne $gconfig{'os_type'}) &&
|
||||
- $realos{'os_version'} && $realos{'os_type'} &&
|
||||
- &foreign_available("webmin")) {
|
||||
- my ($realminor) = split(/\./, $realos{'os_version'});
|
||||
- my ($minor) = split(/\./, $gconfig{'os_version'});
|
||||
- if ($realos{'os_type'} eq $gconfig{'os_type'} &&
|
||||
- $realminor == $minor) {
|
||||
- # Only the minor version number changed - no need to apply
|
||||
- &apply_new_os_version(\%realos);
|
||||
- }
|
||||
- else {
|
||||
- # Large enough change to tell the user
|
||||
- push(@notifs,
|
||||
- &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
|
||||
- &text('os_incorrect', $realos{'real_os_type'},
|
||||
- $realos{'real_os_version'})."<p>\n".
|
||||
- &ui_form_end([ [ undef, $text{'os_fix'} ] ])
|
||||
- );
|
||||
- }
|
||||
- }
|
||||
+#my %realos = &detect_operating_system(undef, 1);
|
||||
+#if (($realos{'os_version'} ne $gconfig{'os_version'} ||
|
||||
+# $realos{'os_type'} ne $gconfig{'os_type'}) &&
|
||||
+# $realos{'os_version'} && $realos{'os_type'} &&
|
||||
+# &foreign_available("webmin")) {
|
||||
+# my ($realminor) = split(/\./, $realos{'os_version'});
|
||||
+# my ($minor) = split(/\./, $gconfig{'os_version'});
|
||||
+# if ($realos{'os_type'} eq $gconfig{'os_type'} &&
|
||||
+# $realminor == $minor) {
|
||||
+# # Only the minor version number changed - no need to apply
|
||||
+# &apply_new_os_version(\%realos);
|
||||
+# }
|
||||
+# else {
|
||||
+# # Large enough change to tell the user
|
||||
+# push(@notifs,
|
||||
+# &ui_form_start("$gconfig{'webprefix'}/webmin/fix_os.cgi").
|
||||
+# &text('os_incorrect', $realos{'real_os_type'},
|
||||
+# $realos{'real_os_version'})."<p>\n".
|
||||
+# &ui_form_end([ [ undef, $text{'os_fix'} ] ])
|
||||
+# );
|
||||
+# }
|
||||
+# }
|
||||
|
||||
# Password close to expiry
|
||||
my $warn_days = $config{'warn_days'};
|
||||
@@ -0,0 +1,29 @@
|
||||
From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Strasser <kevin.strasser@linux.intel.com>
|
||||
Date: Wed, 1 Aug 2012 11:51:26 -0700
|
||||
Subject: [PATCH] nfs export: remove nfsd check
|
||||
|
||||
nfsd runs as a kernel process and does not have a pid. This means
|
||||
that the command assigned to apply_cmd will never be executed when
|
||||
the user tries to apply changes to nfs exports.
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
|
||||
---
|
||||
exports/exports-lib.pl | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: webmin-1.850/exports/exports-lib.pl
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/exports/exports-lib.pl
|
||||
+++ webmin-1.850/exports/exports-lib.pl
|
||||
@@ -301,7 +301,7 @@ return !&has_command("rpc.nfsd") && !&ha
|
||||
sub restart_mountd
|
||||
{
|
||||
# Try exportfs -r first
|
||||
-if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) {
|
||||
+if ($config{'apply_cmd'} && &find_byname("mountd")) {
|
||||
my $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
|
||||
if (!$? && $out !~ /invalid|error|failed/i) {
|
||||
# Looks like it worked!
|
||||
@@ -0,0 +1,75 @@
|
||||
Hack in support for an "exclude" config option for the init module, so
|
||||
we can hide certain system services that shouldn't really be configurable
|
||||
via the web interface
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
|
||||
---
|
||||
init/index.cgi | 27 ++++++++++++++-------------
|
||||
init/init-lib.pl | 5 +++--
|
||||
2 files changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: webmin-1.850/init/index.cgi
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/init/index.cgi
|
||||
+++ webmin-1.850/init/index.cgi
|
||||
@@ -45,19 +45,20 @@ elsif ($init_mode eq "init" && $access{'
|
||||
: "$config{'init_dir'}/$ac[0]");
|
||||
}
|
||||
@runlevels = &list_runlevels();
|
||||
- foreach $r (@runlevels) {
|
||||
- foreach $w ("S", "K") {
|
||||
- foreach $a (&runlevel_actions($r, $w)) {
|
||||
- @ac = split(/\s+/, $a);
|
||||
- if (!$nodemap{$ac[2]}) {
|
||||
- push(@acts, $ac[1]);
|
||||
- push(@actsl,
|
||||
- "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
|
||||
- push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ # Assume there won't be any of these broken actions
|
||||
+ #foreach $r (@runlevels) {
|
||||
+ # foreach $w ("S", "K") {
|
||||
+ # foreach $a (&runlevel_actions($r, $w)) {
|
||||
+ # @ac = split(/\s+/, $a);
|
||||
+ # if (!$nodemap{$ac[2]}) {
|
||||
+ # push(@acts, $ac[1]);
|
||||
+ # push(@actsl,
|
||||
+ # "1+$r+$ac[0]+$ac[1]+$ac[2]+$w");
|
||||
+ # push(@actsf, "$config{'init_base'}/rc$r.d/$w$ac[0]$ac[1]");
|
||||
+ # }
|
||||
+ # }
|
||||
+ # }
|
||||
+ # }
|
||||
|
||||
# For each action, look at /etc/rc*.d/* files to see if it is
|
||||
# started at boot
|
||||
Index: webmin-1.850/init/init-lib.pl
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/init/init-lib.pl
|
||||
+++ webmin-1.850/init/init-lib.pl
|
||||
@@ -124,8 +124,9 @@ List boot time action names from init.d,
|
||||
=cut
|
||||
sub list_actions
|
||||
{
|
||||
-local($dir, $f, @stbuf, @rv);
|
||||
+local($dir, $f, @stbuf, @rv, @exclude);
|
||||
$dir = $config{init_dir};
|
||||
+@exclude = split(/,/, $config{exclude});
|
||||
opendir(DIR, $dir);
|
||||
foreach $f (sort { lc($a) cmp lc($b) } readdir(DIR)) {
|
||||
if ($f eq "." || $f eq ".." || $f =~ /\.bak$/ || $f eq "functions" ||
|
||||
@@ -133,7 +134,7 @@ foreach $f (sort { lc($a) cmp lc($b) } r
|
||||
-d "$dir/$f" || $f =~ /\.swp$/ || $f eq "skeleton" ||
|
||||
$f =~ /\.lock$/ || $f =~ /\.dpkg-(old|dist)$/ ||
|
||||
$f =~ /^\.depend\./ || $f eq '.legacy-bootordering' ||
|
||||
- $f =~ /^mandrake/) { next; }
|
||||
+ $f =~ /^mandrake/ || grep {$_ eq $f} @exclude ) { next; }
|
||||
if (@stbuf = stat("$dir/$f")) {
|
||||
push(@rv, "$f $stbuf[1]");
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
add mediatomb support
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
diff -Nru webmin-1.570.bak/mediatomb/index.cgi webmin-1.570/mediatomb/index.cgi
|
||||
--- webmin-1.570.bak/mediatomb/index.cgi 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ webmin-1.570/mediatomb/index.cgi 2011-10-26 10:00:05.992522036 -0700
|
||||
@@ -0,0 +1,13 @@
|
||||
+#!/usr/bin/perl
|
||||
+# index.cgi
|
||||
+# Display MediaTomb option categories
|
||||
+
|
||||
+require './mediatomb-lib.pl';
|
||||
+
|
||||
+ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
|
||||
+
|
||||
+
|
||||
+$ipaddress = &get_my_address();
|
||||
+print &text('index_desc', $ipaddress),"<p>\n";
|
||||
+
|
||||
+ui_print_footer("/", $text{'index'});
|
||||
diff -Nru webmin-1.570.bak/mediatomb/lang/en webmin-1.570/mediatomb/lang/en
|
||||
--- webmin-1.570.bak/mediatomb/lang/en 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ webmin-1.570/mediatomb/lang/en 2011-10-26 10:01:13.340522186 -0700
|
||||
@@ -0,0 +1,2 @@
|
||||
+index_title=MediaTomb
|
||||
+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>.
|
||||
diff -Nru webmin-1.570.bak/mediatomb/mediatomb-lib.pl webmin-1.570/mediatomb/mediatomb-lib.pl
|
||||
--- webmin-1.570.bak/mediatomb/mediatomb-lib.pl 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ webmin-1.570/mediatomb/mediatomb-lib.pl 2011-10-26 10:01:34.692522079 -0700
|
||||
@@ -0,0 +1,31 @@
|
||||
+#!/usr/bin/perl
|
||||
+# mediatomb-lib.pl
|
||||
+# Common functions for the MediaTomb module
|
||||
+
|
||||
+BEGIN { push(@INC, ".."); };
|
||||
+use WebminCore;
|
||||
+&init_config();
|
||||
+
|
||||
+sub get_my_address
|
||||
+{
|
||||
+my $myip;
|
||||
+if (&foreign_check("net")) {
|
||||
+ # Try to get ethernet interface
|
||||
+ &foreign_require("net", "net-lib.pl");
|
||||
+ my @act = &net::active_interfaces();
|
||||
+ my @ifaces = grep { &net::iface_type($_->{'fullname'}) =~ /ether/i }
|
||||
+ @act;
|
||||
+ @ifaces = ( $act[0] ) if (!@ifaces && @act);
|
||||
+ if (@ifaces) {
|
||||
+ return wantarray ? ( map { $_->{'address'} } @ifaces )
|
||||
+ : $ifaces[0]->{'address'};
|
||||
+ }
|
||||
+ }
|
||||
+$myip = &to_ipaddress(&get_system_hostname());
|
||||
+if ($myip) {
|
||||
+ # Can resolve hostname .. use that
|
||||
+ return wantarray ? ( $myip ) : $myip;
|
||||
+ }
|
||||
+return wantarray ? ( ) : undef;
|
||||
+}
|
||||
+
|
||||
diff -Nru webmin-1.570.bak/mediatomb/module.info webmin-1.570/mediatomb/module.info
|
||||
--- webmin-1.570.bak/mediatomb/module.info 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ webmin-1.570/mediatomb/module.info 2011-10-26 09:59:50.428528369 -0700
|
||||
@@ -0,0 +1,3 @@
|
||||
+desc=MediaTomb
|
||||
+category=others
|
||||
+longdesc=MediaTomb access module
|
||||
@@ -0,0 +1,25 @@
|
||||
Add excludefs config option to mount module
|
||||
|
||||
Adds a configuration option (currently hidden) to allow the distro to
|
||||
hide certain filesystems from the mount module within Webmin (e.g. /dev)
|
||||
since these shouldn't be modified from the web interface.
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
--- webmin-1.570.orig/mount/index.cgi
|
||||
+++ webmin-1.570/mount/index.cgi
|
||||
@@ -33,10 +33,12 @@ elsif ($config{'sort_mode'} == 1) {
|
||||
}
|
||||
|
||||
# Build visible filesystems list
|
||||
+@excludefs = split(/,/, $config{excludefs});
|
||||
foreach $m (@all) {
|
||||
@minfo = @$m;
|
||||
$p = &simplify_mount_path($minfo[0], $minfo[2]);
|
||||
next if ($ignore{$minfo[2]});
|
||||
+ next if (grep {$_ eq $minfo[2]} @excludefs);
|
||||
@mmodes = &mount_modes($minfo[2], $minfo[0], $minfo[1]);
|
||||
$canedit = $can_edit{$minfo[2]} && !$mmodes[4] &&
|
||||
&can_edit_fs(@minfo);
|
||||
@@ -0,0 +1,50 @@
|
||||
From 719206df606acd7a623e8d75da293c25489b7884 Mon Sep 17 00:00:00 2001
|
||||
From: Diego Rondini <diego.ml@zoho.com>
|
||||
Date: Thu, 18 Feb 2016 15:44:06 +0100
|
||||
Subject: [PATCH] Adjust Mysql config defaults
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Diego Rondini <diego.ml@zoho.com>
|
||||
---
|
||||
mysql/config | 18 +++++++++---------
|
||||
1 file changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/mysql/config b/mysql/config
|
||||
index e5b6fb3..77bfe69 100644
|
||||
--- a/mysql/config
|
||||
+++ b/mysql/config
|
||||
@@ -1,13 +1,13 @@
|
||||
-start_cmd=cd /usr/local/mysql ; (./bin/safe_mysqld || ./bin/mysqld_safe) &
|
||||
+start_cmd=/usr/bin/mysqld_safe
|
||||
perpage=25
|
||||
-mysql=/usr/local/mysql/bin/mysql
|
||||
-mysqldump=/usr/local/mysql/bin/mysqldump
|
||||
-mysqlimport=/usr/local/mysql/bin/mysqlimport
|
||||
-pass=foo
|
||||
-mysqlshow=/usr/local/mysql/bin/mysqlshow
|
||||
+mysql=/usr/bin/mysql
|
||||
+mysqldump=/usr/bin/mysqldump
|
||||
+mysqlimport=/usr/bin/mysqlimport
|
||||
+pass=
|
||||
+mysqlshow=/usr/bin/mysqlshow
|
||||
login=root
|
||||
-mysql_libs=/usr/local/mysql/lib
|
||||
-mysqladmin=/usr/local/mysql/bin/mysqladmin
|
||||
+mysql_libs=/usr/lib
|
||||
+mysqladmin=/usr/bin/mysqladmin
|
||||
style=0
|
||||
add_mode=1
|
||||
nodbi=0
|
||||
@@ -15,7 +15,7 @@ access=*: *
|
||||
blob_mode=0
|
||||
date_subs=0
|
||||
passwd_mode=0
|
||||
-mysql_data=/usr/local/mysql/var
|
||||
+mysql_data=/var/lib/mysql
|
||||
max_dbs=50
|
||||
my_cnf=/etc/my.cnf
|
||||
max_text=1000
|
||||
--
|
||||
2.5.0
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
Add support for configuring network interfaces on a generic linux system
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Index: webmin-1.850/net/module.info
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/net/module.info
|
||||
+++ webmin-1.850/net/module.info
|
||||
@@ -14,7 +14,7 @@ desc_ko_KR.UTF-8=네트워크 구성
|
||||
name=Networking
|
||||
desc_tr=A<> Yap<61>land<6E>rmas<61>
|
||||
desc_de=Netzwerkkonfiguration
|
||||
-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
|
||||
+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
|
||||
desc_sk=Konfigur<75>cia siete
|
||||
desc_zh_CN=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
risk=low medium high
|
||||
Index: webmin-1.850/net/generic-linux-lib.pl
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ webmin-1.850/net/generic-linux-lib.pl
|
||||
@@ -0,0 +1,2 @@
|
||||
+do 'linux-lib.pl';
|
||||
+
|
||||
@@ -0,0 +1,19 @@
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
XXX: need to work out a better fix.
|
||||
|
||||
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
|
||||
|
||||
diff -Nru webmin-1.570.orig//net/net-lib.pl webmin-1.570/net/net-lib.pl
|
||||
--- webmin-1.570.orig//net/net-lib.pl 2011-10-03 09:01:48.000000000 +0800
|
||||
+++ webmin-1.570/net/net-lib.pl 2011-10-28 13:52:56.138873664 +0800
|
||||
@@ -21,7 +21,8 @@
|
||||
do "$gconfig{'os_type'}-9.1-ALL-lib.pl";
|
||||
}
|
||||
else {
|
||||
- do "$gconfig{'os_type'}-lib.pl";
|
||||
+ #do "$gconfig{'os_type'}-lib.pl";
|
||||
+ do "debian-linux-lib.pl";
|
||||
}
|
||||
|
||||
# list_hosts()
|
||||
@@ -0,0 +1,39 @@
|
||||
commit e48f61d2f6df32a518bcb84db8c6eacfe5435c32
|
||||
Author: Yu Ke <ke.yu@intel.com>
|
||||
Date: Fri Oct 28 14:40:51 2011 +0800
|
||||
|
||||
NFS export: fix syntax issue
|
||||
|
||||
fix two syntax issue in /etc/exports:
|
||||
1. if it is exported to everyone, should use "*", e.g. "/export *(xxx)"
|
||||
2. explicitly specify subtree_check or no_subtree_check, required by latest nfs-utils
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Yu Ke <ke.yu@intel.com>
|
||||
|
||||
Index: webmin-1.850/exports/save_export.cgi
|
||||
===================================================================
|
||||
--- webmin-1.850.orig/exports/save_export.cgi
|
||||
+++ webmin-1.850/exports/save_export.cgi
|
||||
@@ -50,7 +50,7 @@ else {
|
||||
&error(&text('save_enetmask', $in{'netmask'}));
|
||||
$exp{'host'} = $in{'network'}."/".$in{'netmask'};
|
||||
}
|
||||
- elsif ($in{'mode'} == 3) { $exp{'host'} = ""; }
|
||||
+ elsif ($in{'mode'} == 3) { $exp{'host'} = "*"; }
|
||||
else {
|
||||
$in{'host'} =~ /\*/ || &to_ipaddress($in{'host'}) ||
|
||||
&error(&text('save_ehost', $in{'host'}));
|
||||
@@ -87,6 +87,11 @@ else {
|
||||
delete($opts{'no_subtree_check'});
|
||||
delete($opts{'subtree_check'});
|
||||
$opts{'no_subtree_check'} = "" if ($in{'no_subtree_check'});
|
||||
+ if ($in{'no_subtree_check'}) {
|
||||
+ $opts{'no_subtree_check'} = "";
|
||||
+ } else {
|
||||
+ $opts{'subtree_check'} = "";
|
||||
+ }
|
||||
|
||||
delete($opts{'nohide'});
|
||||
delete($opts{'hide'});
|
||||
@@ -0,0 +1,18 @@
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
|
||||
|
||||
Index: webmin-1.570/proftpd/config
|
||||
===================================================================
|
||||
--- webmin-1.570.orig/proftpd/config 2011-10-25 20:18:37.000000000 +0800
|
||||
+++ webmin-1.570/proftpd/config 2011-10-25 20:21:13.000000000 +0800
|
||||
@@ -1,6 +1,6 @@
|
||||
-proftpd_path=/usr/local/sbin/proftpd
|
||||
-proftpd_conf=/usr/local/etc/proftpd.conf
|
||||
-pid_file=/usr/local/var/proftpd.pid
|
||||
+proftpd_path=/usr/sbin/proftpd
|
||||
+proftpd_conf=/etc/proftpd.conf
|
||||
+pid_file=/var/proftpd.pid
|
||||
ftpusers=/etc/ftpusers
|
||||
test_config=1
|
||||
test_always=0
|
||||
@@ -0,0 +1,25 @@
|
||||
From 6f04699d5d417122b67e8118fd1955c769f17e76 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Yang <liezhi.yang@windriver.com>
|
||||
Date: Tue, 2 Sep 2014 00:11:05 -0700
|
||||
Subject: [PATCH] ajaxterm/ajaxterm/qweb.py: fix hardcode of python2.3
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
|
||||
---
|
||||
ajaxterm/ajaxterm/qweb.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ajaxterm/ajaxterm/qweb.py b/ajaxterm/ajaxterm/qweb.py
|
||||
index 20c5092..c658a6b 100644
|
||||
--- a/ajaxterm/ajaxterm/qweb.py
|
||||
+++ b/ajaxterm/ajaxterm/qweb.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python2.3
|
||||
+#!/usr/bin/env python
|
||||
#
|
||||
# vim:set et ts=4 fdc=0 fdn=2 fdl=0:
|
||||
#
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
Remove "start on boot" option from webmin configuration, as
|
||||
end-users should not need to configure this from the web interface
|
||||
|
||||
Upstream-Status: Inappropriate [OE-specific]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
--- webmin-1.570.orig/webmin/index.cgi
|
||||
+++ webmin-1.570/webmin/index.cgi
|
||||
@@ -79,20 +79,6 @@ print &ui_buttons_start();
|
||||
my %miniserv;
|
||||
&get_miniserv_config(\%miniserv);
|
||||
|
||||
-if (&foreign_check("init")) {
|
||||
- &foreign_require("init");
|
||||
- my $starting = &init::action_status("webmin");
|
||||
- print &ui_buttons_row("bootup.cgi",
|
||||
- $text{'index_boot'},
|
||||
- $text{'index_bootmsg'}.
|
||||
- ($miniserv{'inetd'} ? "<b>$text{'index_inetd'}</b>" :
|
||||
- !$ENV{'MINISERV_CONFIG'} ? "<b>$text{'index_apache'}</b>" : ""),
|
||||
- &ui_hidden("starting", $starting),
|
||||
- &ui_radio("boot", $starting == 2 ? 1 : 0,
|
||||
- [ [ 1, $text{'yes'} ],
|
||||
- [ 0, $text{'no'} ] ]));
|
||||
- }
|
||||
-
|
||||
# Restart Webmin
|
||||
if (!$miniserv{'inetd'} && $ENV{'MINISERV_CONFIG'}) {
|
||||
print &ui_buttons_row("restart.cgi",
|
||||
@@ -0,0 +1,32 @@
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
|
||||
|
||||
Index: webmin-1.570/samba/config-generic-linux
|
||||
===================================================================
|
||||
--- webmin-1.570.orig/samba/config-generic-linux 2011-10-25 20:11:35.000000000 +0800
|
||||
+++ webmin-1.570/samba/config-generic-linux 2011-10-25 20:15:41.000000000 +0800
|
||||
@@ -1,15 +1,15 @@
|
||||
list_printers_command=lpc status | grep "[A-z0-9]:" | sed -e 's/://g'
|
||||
-smb_passwd=/usr/local/samba/private/smbpasswd
|
||||
+smb_passwd=/usr/bin/smbpasswd
|
||||
text_lists=0
|
||||
dont_convert=-499
|
||||
-name_server=/usr/local/samba/bin/nmbd
|
||||
-smb_conf=/usr/local/samba/lib/smb.conf
|
||||
-samba_server=/usr/local/samba/bin/smbd
|
||||
+name_server=/usr/sbin/nmbd
|
||||
+smb_conf=/etc/samba/smb.conf
|
||||
+samba_server=/usr/sbin/smbd
|
||||
run_from_inetd=0
|
||||
-samba_password_program=/usr/local/samba/bin/smbpasswd
|
||||
-samba_status_program=/usr/local/samba/bin/smbstatus
|
||||
+samba_password_program=/usr/bin/smbpasswd
|
||||
+samba_status_program=/usr/bin/smbstatus
|
||||
swat_path=/usr/local/samba/bin/swat
|
||||
sort_mode=0
|
||||
smbgroupedit=/usr/local/samba/bin/smbgroupedit
|
||||
-pdbedit=/usr/local/samba/bin/pdbedit
|
||||
-net=/usr/local/samba/bin/net
|
||||
+pdbedit=/usr/bin/pdbedit
|
||||
+net=/usr/bin/net
|
||||
340
meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/setup.sh
Executable file
340
meta-openembedded/meta-webserver/recipes-webadmin/webmin/files/setup.sh
Executable file
@@ -0,0 +1,340 @@
|
||||
#!/bin/sh
|
||||
# Modified version of setup.sh distributed with webmin
|
||||
|
||||
if [ "$wadir" = "" ]; then
|
||||
echo "ERROR: wadir not specified"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
config_dir_runtime=$config_dir
|
||||
config_dir=$prefix$config_dir
|
||||
|
||||
wadir_runtime=$wadir
|
||||
wadir=$prefix$wadir
|
||||
|
||||
ver=`cat "$wadir/version"`
|
||||
|
||||
cd "$wadir"
|
||||
|
||||
# Work out perl library path
|
||||
PERLLIB=$wadir
|
||||
|
||||
# Validate source directory
|
||||
allmods=`cd "$wadir"; echo */module.info | sed -e 's/\/module.info//g'`
|
||||
if [ "$allmods" = "" ]; then
|
||||
echo "ERROR: Failed to get module list"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
|
||||
if [ "$login" = "webmin" ]; then
|
||||
echo "ERROR: Username 'webmin' is reserved for internal use"
|
||||
echo ""
|
||||
exit 14
|
||||
fi
|
||||
|
||||
# Create webserver config file
|
||||
echo $perl > $config_dir/perl-path
|
||||
echo $var_dir > $config_dir/var-path
|
||||
echo "Creating web server config files.."
|
||||
cfile=$config_dir/miniserv.conf
|
||||
echo "port=$port" >> $cfile
|
||||
echo "root=$wadir_runtime" >> $cfile
|
||||
echo "mimetypes=$wadir_runtime/mime.types" >> $cfile
|
||||
echo "addtype_cgi=internal/cgi" >> $cfile
|
||||
echo "realm=Webmin Server" >> $cfile
|
||||
echo "logfile=$var_dir/miniserv.log" >> $cfile
|
||||
echo "errorlog=$var_dir/miniserv.error" >> $cfile
|
||||
echo "pidfile=$var_dir/miniserv.pid" >> $cfile
|
||||
echo "logtime=168" >> $cfile
|
||||
echo "ppath=$ppath" >> $cfile
|
||||
echo "ssl=$ssl" >> $cfile
|
||||
echo "env_WEBMIN_CONFIG=$config_dir_runtime" >> $cfile
|
||||
echo "env_WEBMIN_VAR=$var_dir" >> $cfile
|
||||
echo "atboot=$atboot" >> $cfile
|
||||
echo "logout=$config_dir_runtime/logout-flag" >> $cfile
|
||||
if [ "$listen" != "" ]; then
|
||||
echo "listen=$listen" >> $cfile
|
||||
else
|
||||
echo "listen=10000" >> $cfile
|
||||
fi
|
||||
echo "denyfile=\\.pl\$" >> $cfile
|
||||
echo "log=1" >> $cfile
|
||||
echo "blockhost_failures=5" >> $cfile
|
||||
echo "blockhost_time=60" >> $cfile
|
||||
echo "syslog=1" >> $cfile
|
||||
if [ "$allow" != "" ]; then
|
||||
echo "allow=$allow" >> $cfile
|
||||
fi
|
||||
if [ "$session" != "" ]; then
|
||||
echo "session=$session" >> $cfile
|
||||
else
|
||||
echo "session=1" >> $cfile
|
||||
fi
|
||||
if [ "$pam" != "" ]; then
|
||||
echo "pam=$pam" >> $cfile
|
||||
fi
|
||||
if [ "$no_pam" != "" ]; then
|
||||
echo "no_pam=$no_pam" >> $cfile
|
||||
fi
|
||||
echo premodules=WebminCore >> $cfile
|
||||
echo "server=MiniServ/$ver" >> $cfile
|
||||
|
||||
md5pass=`$perl -e 'print crypt("test", "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/") eq "\\$1\\$A9wB3O18\\$zaZgqrEmb9VNltWTL454R/" ? "1\n" : "0\n"'`
|
||||
|
||||
ufile=$config_dir/miniserv.users
|
||||
if [ "$crypt" != "" ]; then
|
||||
echo "$login:$crypt:0" > $ufile
|
||||
else
|
||||
if [ "$md5pass" = "1" ]; then
|
||||
$perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "\$1\$XXXXXXXX"),":0\n"' "$login" "$password" > $ufile
|
||||
else
|
||||
$perl -e 'print "$ARGV[0]:",crypt($ARGV[1], "XX"),":0\n"' "$login" "$password" > $ufile
|
||||
fi
|
||||
fi
|
||||
chmod 600 $ufile
|
||||
echo "userfile=$config_dir_runtime/miniserv.users" >> $cfile
|
||||
|
||||
kfile=$config_dir/miniserv.pem
|
||||
openssl version >/dev/null 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
# We can generate a new SSL key for this host
|
||||
host=`hostname`
|
||||
openssl req -newkey rsa:512 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 >/dev/null 2>&1 <<EOF
|
||||
.
|
||||
.
|
||||
.
|
||||
Webmin Webserver on $host
|
||||
.
|
||||
*
|
||||
root@$host
|
||||
EOF
|
||||
if [ "$?" = "0" ]; then
|
||||
cat $tempdir/cert $tempdir/key >$kfile
|
||||
fi
|
||||
rm -f $tempdir/cert $tempdir/key
|
||||
fi
|
||||
if [ ! -r $kfile ]; then
|
||||
# Fall back to the built-in key
|
||||
cp "$wadir/miniserv.pem" $kfile
|
||||
fi
|
||||
chmod 600 $kfile
|
||||
echo "keyfile=$config_dir_runtime/miniserv.pem" >> $cfile
|
||||
|
||||
chmod 600 $cfile
|
||||
echo "..done"
|
||||
echo ""
|
||||
|
||||
echo "Creating access control file.."
|
||||
afile=$config_dir/webmin.acl
|
||||
rm -f $afile
|
||||
if [ "$defaultmods" = "" ]; then
|
||||
echo "$login: $allmods" >> $afile
|
||||
else
|
||||
echo "$login: $defaultmods" >> $afile
|
||||
fi
|
||||
chmod 600 $afile
|
||||
echo "..done"
|
||||
echo ""
|
||||
|
||||
if [ "$login" != "root" -a "$login" != "admin" ]; then
|
||||
# Allow use of RPC by this user
|
||||
echo rpc=1 >>$config_dir/$login.acl
|
||||
fi
|
||||
|
||||
if [ "$noperlpath" = "" ]; then
|
||||
echo "Inserting path to perl into scripts.."
|
||||
(find "$wadir" -name '*.cgi' -print ; find "$wadir" -name '*.pl' -print) | $perl "$wadir/perlpath.pl" $perl_runtime -
|
||||
echo "..done"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "Creating start and stop scripts.."
|
||||
rm -f $config_dir/stop $config_dir/start $config_dir/restart $config_dir/reload
|
||||
echo "#!/bin/sh" >>$config_dir/start
|
||||
echo "echo Starting Webmin server in $wadir_runtime" >>$config_dir/start
|
||||
echo "trap '' 1" >>$config_dir/start
|
||||
echo "LANG=" >>$config_dir/start
|
||||
echo "export LANG" >>$config_dir/start
|
||||
echo "#PERLIO=:raw" >>$config_dir/start
|
||||
echo "unset PERLIO" >>$config_dir/start
|
||||
echo "export PERLIO" >>$config_dir/start
|
||||
echo "PERLLIB=$PERLLIB" >>$config_dir/start
|
||||
echo "export PERLLIB" >>$config_dir/start
|
||||
uname -a | grep -i 'HP/*UX' >/dev/null
|
||||
if [ $? = "0" ]; then
|
||||
echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf &" >>$config_dir/start
|
||||
else
|
||||
echo "exec '$wadir_runtime/miniserv.pl' $config_dir_runtime/miniserv.conf" >>$config_dir/start
|
||||
fi
|
||||
|
||||
echo "#!/bin/sh" >>$config_dir/stop
|
||||
echo "echo Stopping Webmin server in $wadir_runtime" >>$config_dir/stop
|
||||
echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/stop
|
||||
echo "kill \`cat \$pidfile\`" >>$config_dir/stop
|
||||
|
||||
echo "#!/bin/sh" >>$config_dir/restart
|
||||
echo "$config_dir_runtime/stop && $config_dir_runtime/start" >>$config_dir/restart
|
||||
|
||||
echo "#!/bin/sh" >>$config_dir/reload
|
||||
echo "echo Reloading Webmin server in $wadir_runtime" >>$config_dir/reload
|
||||
echo "pidfile=\`grep \"^pidfile=\" $config_dir_runtime/miniserv.conf | sed -e 's/pidfile=//g'\`" >>$config_dir/reload
|
||||
echo "kill -USR1 \`cat \$pidfile\`" >>$config_dir/reload
|
||||
|
||||
chmod 755 $config_dir/start $config_dir/stop $config_dir/restart $config_dir/reload
|
||||
echo "..done"
|
||||
echo ""
|
||||
|
||||
if [ "$upgrading" = 1 ]; then
|
||||
echo "Updating config files.."
|
||||
else
|
||||
echo "Copying config files.."
|
||||
fi
|
||||
newmods=`$perl "$wadir/copyconfig.pl" "$os_type/$real_os_type" "$os_version/$real_os_version" "$wadir" $config_dir "" $allmods`
|
||||
# Store the OS and version
|
||||
echo "os_type=$os_type" >> $config_dir/config
|
||||
echo "os_version=$os_version" >> $config_dir/config
|
||||
echo "real_os_type=$real_os_type" >> $config_dir/config
|
||||
echo "real_os_version=$real_os_version" >> $config_dir/config
|
||||
if [ -r /etc/system.cnf ]; then
|
||||
# Found a caldera system config file .. get the language
|
||||
source /etc/system.cnf
|
||||
if [ "$CONF_LST_LANG" = "us" ]; then
|
||||
CONF_LST_LANG=en
|
||||
elif [ "$CONF_LST_LANG" = "uk" ]; then
|
||||
CONF_LST_LANG=en
|
||||
fi
|
||||
grep "lang=$CONF_LST_LANG," "$wadir/lang_list.txt" >/dev/null 2>&1
|
||||
if [ "$?" = 0 ]; then
|
||||
echo "lang=$CONF_LST_LANG" >> $config_dir/config
|
||||
fi
|
||||
fi
|
||||
|
||||
# Turn on logging by default
|
||||
echo "log=1" >> $config_dir/config
|
||||
|
||||
# Use licence module specified by environment variable
|
||||
if [ "$licence_module" != "" ]; then
|
||||
echo licence_module=$licence_module >>$config_dir/config
|
||||
fi
|
||||
|
||||
# Disallow unknown referers by default
|
||||
echo "referers_none=1" >>$config_dir/config
|
||||
echo $ver > $config_dir/version
|
||||
echo "..done"
|
||||
echo ""
|
||||
|
||||
# Set passwd_ fields in miniserv.conf from global config
|
||||
for field in passwd_file passwd_uindex passwd_pindex passwd_cindex passwd_mindex; do
|
||||
grep $field= $config_dir/miniserv.conf >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
grep $field= $config_dir/config >> $config_dir/miniserv.conf
|
||||
fi
|
||||
done
|
||||
grep passwd_mode= $config_dir/miniserv.conf >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo passwd_mode=0 >> $config_dir/miniserv.conf
|
||||
fi
|
||||
|
||||
# If Perl crypt supports MD5, then make it the default
|
||||
if [ "$md5pass" = "1" ]; then
|
||||
echo md5pass=1 >> $config_dir/config
|
||||
fi
|
||||
|
||||
# Set a special theme if none was set before
|
||||
if [ "$theme" = "" ]; then
|
||||
theme=`cat "$wadir/defaulttheme" 2>/dev/null`
|
||||
fi
|
||||
oldthemeline=`grep "^theme=" $config_dir/config`
|
||||
oldtheme=`echo $oldthemeline | sed -e 's/theme=//g'`
|
||||
if [ "$theme" != "" ] && [ "$oldthemeline" = "" ] && [ -d "$wadir/$theme" ]; then
|
||||
themelist=$theme
|
||||
fi
|
||||
|
||||
# Set a special overlay if none was set before
|
||||
if [ "$overlay" = "" ]; then
|
||||
overlay=`cat "$wadir/defaultoverlay" 2>/dev/null`
|
||||
fi
|
||||
if [ "$overlay" != "" ] && [ "$theme" != "" ] && [ -d "$wadir/$overlay" ]; then
|
||||
themelist="$themelist $overlay"
|
||||
fi
|
||||
|
||||
# Apply the theme and maybe overlay
|
||||
if [ "$themelist" != "" ]; then
|
||||
echo "theme=$themelist" >> $config_dir/config
|
||||
echo "preroot=$themelist" >> $config_dir/miniserv.conf
|
||||
fi
|
||||
|
||||
# Set the product field in the global config
|
||||
grep product= $config_dir/config >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo product=webmin >> $config_dir/config
|
||||
fi
|
||||
|
||||
if [ "$makeboot" = "1" ]; then
|
||||
echo "Configuring Webmin to start at boot time.."
|
||||
(cd "$wadir/init" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/init/atboot.pl" $bootscript)
|
||||
echo "..done"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# If password delays are not specifically disabled, enable them
|
||||
grep passdelay= $config_dir/miniserv.conf >/dev/null
|
||||
if [ "$?" != "0" ]; then
|
||||
echo passdelay=1 >> $config_dir/miniserv.conf
|
||||
fi
|
||||
|
||||
echo "Changing ownership and permissions .."
|
||||
# Make all config dirs non-world-readable
|
||||
for m in $newmods; do
|
||||
chown -R root $config_dir/$m
|
||||
chgrp -R bin $config_dir/$m
|
||||
chmod -R og-rw $config_dir/$m
|
||||
done
|
||||
# Make miniserv config files non-world-readable
|
||||
for f in miniserv.conf miniserv.pem miniserv.users; do
|
||||
chown -R root $config_dir/$f
|
||||
chgrp -R bin $config_dir/$f
|
||||
chmod -R og-rw $config_dir/$f
|
||||
done
|
||||
chmod +r $config_dir/version
|
||||
if [ "$nochown" = "" ]; then
|
||||
# Make program directory non-world-writable, but executable
|
||||
chown -R root "$wadir"
|
||||
chgrp -R bin "$wadir"
|
||||
chmod -R og-w "$wadir"
|
||||
chmod -R a+rx "$wadir"
|
||||
fi
|
||||
if [ $var_dir != "/var" ]; then
|
||||
# Make log directory non-world-readable or writable
|
||||
chown -R root $prefix$var_dir
|
||||
chgrp -R bin $prefix$var_dir
|
||||
chmod -R og-rwx $prefix$var_dir
|
||||
fi
|
||||
# Fix up bad permissions from some older installs
|
||||
for m in ldap-client ldap-server ldap-useradmin mailboxes mysql postgresql servers virtual-server; do
|
||||
if [ -d "$config_dir/$m" ]; then
|
||||
chown root $config_dir/$m
|
||||
chgrp bin $config_dir/$m
|
||||
chmod og-rw $config_dir/$m
|
||||
chmod og-rw $config_dir/$m/config 2>/dev/null
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$nopostinstall" = "" ]; then
|
||||
echo "Running postinstall scripts .."
|
||||
(cd "$wadir" ; WEBMIN_CONFIG=$config_dir WEBMIN_VAR=$var_dir "$wadir/run-postinstalls.pl")
|
||||
echo "..done"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Enable background collection
|
||||
if [ "$upgrading" != 1 -a -r $config_dir/system-status/enable-collection.pl ]; then
|
||||
echo "Enabling background status collection .."
|
||||
$config_dir/system-status/enable-collection.pl 5
|
||||
echo "..done"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Webmin Admin Tool
|
||||
Requires=local-fs.target
|
||||
After=basic.target
|
||||
Conflicts=shutdown.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=@SYSCONFDIR@/webmin/start
|
||||
ExecStop=@SYSCONFDIR@/webmin/stop
|
||||
ExecReload=@SYSCONFDIR@/webmin/reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,170 @@
|
||||
SUMMARY = "Web-based administration interface"
|
||||
HOMEPAGE = "http://www.webmin.com"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c"
|
||||
|
||||
SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
|
||||
file://setup.sh \
|
||||
file://init-exclude.patch \
|
||||
file://net-generic.patch \
|
||||
file://remove-startup-option.patch \
|
||||
file://disable-version-check.patch \
|
||||
file://nfs-export.patch \
|
||||
file://exports-lib.pl.patch \
|
||||
file://mount-excludefs.patch \
|
||||
file://samba-config-fix.patch \
|
||||
file://proftpd-config-fix.patch \
|
||||
file://net-lib.pl.patch \
|
||||
file://media-tomb.patch \
|
||||
file://remove-python2.3.patch \
|
||||
file://mysql-config-fix.patch \
|
||||
file://webmin.service \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b"
|
||||
SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1"
|
||||
|
||||
UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html"
|
||||
UPSTREAM_CHECK_REGEX = "webmin-(?P<pver>\d+(\.\d+)+).tar.gz"
|
||||
|
||||
inherit perlnative update-rc.d systemd
|
||||
|
||||
do_configure() {
|
||||
# Remove binaries and plugins for other platforms
|
||||
rm -rf acl/Authen-SolarisRBAC-0.1*
|
||||
rm -rf format bsdexports hpuxexports sgiexports
|
||||
rm -rf zones rbac smf ipfw ipfilter dfsadmin
|
||||
rm -f mount/freebsd-mounts* mount/netbsd-mounts*
|
||||
rm -f mount/openbsd-mounts* mount/macos-mounts*
|
||||
|
||||
# Remove some plugins for the moment
|
||||
rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap
|
||||
rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix
|
||||
rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat
|
||||
|
||||
# Adjust configs
|
||||
[ -f init/config-debian-linux ] && mv init/config-debian-linux init/config-generic-linux
|
||||
sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux
|
||||
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
|
||||
echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux
|
||||
|
||||
[ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux
|
||||
sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux
|
||||
sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux
|
||||
|
||||
# Fix insane naming that causes problems at packaging time (must be done before deleting below)
|
||||
find . -name "*\**" | while read from
|
||||
do
|
||||
to=`echo "$from" | sed "s/*/ALL/"`
|
||||
mv "$from" "$to"
|
||||
done
|
||||
|
||||
# Remove some other files we don't need
|
||||
find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete
|
||||
find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete
|
||||
rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam
|
||||
|
||||
# Don't need these at runtime (and we have our own setup script)
|
||||
rm -f setup.sh
|
||||
rm -f setup.pl
|
||||
|
||||
# Use pidof for finding PIDs
|
||||
sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux
|
||||
}
|
||||
|
||||
WEBMIN_LOGIN ?= "admin"
|
||||
WEBMIN_PASSWORD ?= "password"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir}
|
||||
install -d ${D}${sysconfdir}/webmin
|
||||
install -d ${D}${sysconfdir}/init.d
|
||||
install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/webmin.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
${D}${systemd_unitdir}/system/webmin.service
|
||||
|
||||
install -d ${D}${localstatedir}
|
||||
install -d ${D}${localstatedir}/webmin
|
||||
|
||||
install -d ${D}${libexecdir}/webmin
|
||||
cd ${S} || exit 1
|
||||
tar --no-same-owner --exclude='./patches' --exclude='./.pc' -cpf - . \
|
||||
| tar --no-same-owner -xpf - -C ${D}${libexecdir}/webmin
|
||||
|
||||
rm -f ${D}${libexecdir}/webmin/webmin-init
|
||||
rm -f ${D}${libexecdir}/webmin/ajaxterm/ajaxterm/configure.initd.gentoo
|
||||
rm -rf ${D}${libexecdir}/webmin/patches
|
||||
|
||||
# Run setup script
|
||||
export perl=perl
|
||||
export perl_runtime=${bindir}/perl
|
||||
export prefix=${D}
|
||||
export tempdir=${S}/install_tmp
|
||||
export wadir=${libexecdir}/webmin
|
||||
export config_dir=${sysconfdir}/webmin
|
||||
export var_dir=${localstatedir}/webmin
|
||||
export os_type=generic-linux
|
||||
export os_version=0
|
||||
export real_os_type="${DISTRO_NAME}"
|
||||
export real_os_version="${DISTRO_VERSION}"
|
||||
export port=10000
|
||||
export login=${WEBMIN_LOGIN}
|
||||
export password=${WEBMIN_PASSWORD}
|
||||
export ssl=0
|
||||
export atboot=1
|
||||
export no_pam=1
|
||||
mkdir -p $tempdir
|
||||
${S}/../setup.sh
|
||||
|
||||
# Ensure correct PERLLIB path
|
||||
sed -i -e 's#${D}##g' ${D}${sysconfdir}/webmin/start
|
||||
}
|
||||
|
||||
INITSCRIPT_NAME = "webmin"
|
||||
INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "webmin.service"
|
||||
SYSTEMD_AUTO_ENABLE:${PN} = "disable"
|
||||
|
||||
# FIXME: some of this should be figured out automatically
|
||||
RDEPENDS:${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
|
||||
RDEPENDS:${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
|
||||
RDEPENDS:${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
|
||||
RDEPENDS:${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm-file perl-module-feature"
|
||||
|
||||
PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*"
|
||||
RRECOMMENDS:${PN} += "webmin-module-system-status"
|
||||
|
||||
PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm"
|
||||
RDEPENDS:${PN}-module-proc = "procps"
|
||||
RDEPENDS:${PN}-module-raid = "mdadm"
|
||||
RDEPENDS:${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
|
||||
RRECOMMENDS:${PN}-module-fdisk = "parted"
|
||||
RRECOMMENDS:${PN}-module-lvm = "lvm2"
|
||||
|
||||
python populate_packages:prepend() {
|
||||
import os, os.path
|
||||
|
||||
wadir = bb.data.expand('${libexecdir}/webmin', d)
|
||||
wadir_image = bb.data.expand('${D}', d) + wadir
|
||||
modules = []
|
||||
themes = []
|
||||
for mod in os.listdir(wadir_image):
|
||||
modinfo = os.path.join(wadir_image, mod, "module.info")
|
||||
themeinfo = os.path.join(wadir_image, mod, "theme.info")
|
||||
if os.path.exists(modinfo):
|
||||
modules.append(mod)
|
||||
elif os.path.exists(themeinfo):
|
||||
themes.append(mod)
|
||||
|
||||
do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', extra_depends='perl', allow_dirs=True, prepend=True)
|
||||
do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', extra_depends='perl', allow_dirs=True, prepend=True)
|
||||
}
|
||||
|
||||
# Time-savers
|
||||
package_do_pkgconfig() {
|
||||
:
|
||||
}
|
||||
Reference in New Issue
Block a user