From patchwork Fri Jul 20 12:59:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Dawson X-Patchwork-Id: 172259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 80EC92C03FB for ; Fri, 20 Jul 2012 23:00:33 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E501AA05F3; Fri, 20 Jul 2012 13:00:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k78I7VEirS8V; Fri, 20 Jul 2012 13:00:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AFAF1A0050; Fri, 20 Jul 2012 13:00:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 267DB8F79A for ; Fri, 20 Jul 2012 13:00:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 176EC8FFC9 for ; Fri, 20 Jul 2012 13:00:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jiPi+OmuMNUy for ; Fri, 20 Jul 2012 13:00:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 94D7E8FFC8 for ; Fri, 20 Jul 2012 13:00:24 +0000 (UTC) Received: by weyx43 with SMTP id x43so5097209wey.16 for ; Fri, 20 Jul 2012 06:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer; bh=nOxG8s0EBJYGFCsAhq7RjgSSjPJBhWrYfaBGPvsrb+4=; b=dJFrQDNo9eaEriz5Ci71KEPn8A7N+O9qnyoLYjyUAHRyWtsDJpdKjUlmTCFZKkCBIh znpk6i5DDBhfkc0O925xT3/XQOrRWVqmU1Q39gtXMQJJNf5HlJXJvIO9XwuZIAK5TQLo ZzR7wsF0ZyZuC1A33UlFYTfmQitVLHGhALirRKw/QCqKCpAL+dbP2MWs4IzNie66719c x1zaMxm6EWXZWhkPbtvXH8O4uZgreqxplWzWZSy+04vV/EUd0K5vfDcFBjnKrbgnTEnw rbdob0AJEIjf3qdNaiLEBydZS2pTCVt/sYE1bicHnQP3TbUQbQgtzxmIGRu9BrHTGO0D EwCg== Received: by 10.180.19.169 with SMTP id g9mr25850406wie.9.1342789222151; Fri, 20 Jul 2012 06:00:22 -0700 (PDT) Received: from localhost.localdomain (host-2-100-182-54.as13285.net. [2.100.182.54]) by mx.google.com with ESMTPS id k48sm14209787eep.13.2012.07.20.06.00.20 (version=SSLv3 cipher=OTHER); Fri, 20 Jul 2012 06:00:21 -0700 (PDT) From: spdawson@gmail.com To: buildroot@busybox.net Date: Fri, 20 Jul 2012 13:59:15 +0100 Message-Id: <1342789155-7320-1-git-send-email-spdawson@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH v5] lighttpd: use standard web root directory X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Simon Dawson Signed-off-by: Simon Dawson Acked-By: Maxime Ripard --- v5: Add acked-by for Maxime Ripard v4: Add signed off by line to lighttpd patch, as suggested by Maxime Ripard v3: Update patch to reduce fuzz caused by changes to package build infrastructure. v2: Fixed creation of web root directory during install. Also fixed makefile to use $(INSTALL) and $(RM) instead of mkdir and rm -f .../lighttpd-Fix-default-config-file.patch | 53 +++++++++----------- package/lighttpd/lighttpd.mk | 11 ++-- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/package/lighttpd/lighttpd-Fix-default-config-file.patch b/package/lighttpd/lighttpd-Fix-default-config-file.patch index 59ce907..aa0f1f6 100644 --- a/package/lighttpd/lighttpd-Fix-default-config-file.patch +++ b/package/lighttpd/lighttpd-Fix-default-config-file.patch @@ -8,25 +8,35 @@ Modify the default lighttpd configuration file to have one a starting conf * Change the network backend to writev since linux-sendfile fails on buildroot Signed-off-by: Maxime Ripard ---- - doc/config/conf.d/access_log.conf | 2 +- - doc/config/lighttpd.conf | 18 +++++++++--------- - 2 files changed, 10 insertions(+), 10 deletions(-) +Signed-off-by: Simon Dawson -Index: lighttpd-1.4.30/doc/config/lighttpd.conf -=================================================================== ---- lighttpd-1.4.30.orig/doc/config/lighttpd.conf -+++ lighttpd-1.4.30/doc/config/lighttpd.conf -@@ -13,7 +13,7 @@ +diff -Nurp a/doc/config/conf.d/access_log.conf b/doc/config/conf.d/access_log.conf +--- a/doc/config/conf.d/access_log.conf 2010-07-11 18:01:32.000000000 +0100 ++++ b/doc/config/conf.d/access_log.conf 2012-06-25 15:20:29.053260085 +0100 +@@ -9,7 +9,7 @@ server.modules += ( "mod_accesslog" ) + ## + ## Default access log. + ## +-accesslog.filename = log_root + "/access.log" ++accesslog.filename = log_root + "/lighttpd-access.log" + + ## + ## The default format produces CLF compatible output. +diff -Nurp a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf +--- a/doc/config/lighttpd.conf 2011-12-18 12:57:25.000000000 +0000 ++++ b/doc/config/lighttpd.conf 2012-06-25 15:21:49.469256500 +0100 +@@ -13,8 +13,8 @@ ## if you add a variable here. Add the corresponding variable in the ## chroot example aswell. ## -var.log_root = "/var/log/lighttpd" +-var.server_root = "/srv/www" +var.log_root = "/var/log" - var.server_root = "/srv/www" ++var.server_root = "/var/www" var.state_dir = "/var/run" var.home_dir = "/var/lib/lighttpd" -@@ -90,7 +90,7 @@ + var.conf_dir = "/etc/lighttpd" +@@ -90,7 +90,7 @@ server.port = 80 ## ## Use IPv6? ## @@ -35,7 +45,7 @@ Index: lighttpd-1.4.30/doc/config/lighttpd.conf ## ## bind to a specific IP -@@ -101,8 +101,8 @@ +@@ -101,8 +101,8 @@ server.use-ipv6 = "enable" ## Run as a different username/groupname. ## This requires root permissions during startup. ## @@ -46,7 +56,7 @@ Index: lighttpd-1.4.30/doc/config/lighttpd.conf ## ## enable core files. -@@ -138,7 +138,7 @@ +@@ -138,7 +138,7 @@ server.pid-file = state_dir + "/lighttpd ## ## Path to the error log file ## @@ -55,7 +65,7 @@ Index: lighttpd-1.4.30/doc/config/lighttpd.conf ## ## If you want to log to syslog you have to unset the -@@ -188,7 +188,7 @@ +@@ -188,7 +188,7 @@ server.event-handler = "linux-sysepoll" ## linux-sendfile - is recommended for small files. ## writev - is recommended for sending many large files ## @@ -64,7 +74,7 @@ Index: lighttpd-1.4.30/doc/config/lighttpd.conf ## ## As lighttpd is a single-threaded server, its main resource limit is -@@ -311,9 +311,9 @@ +@@ -311,9 +311,9 @@ url.access-deny = ( "~", ".i ## disable range requests for pdf files ## workaround for a bug in the Acrobat Reader plugin. ## @@ -77,16 +87,3 @@ Index: lighttpd-1.4.30/doc/config/lighttpd.conf ## ## url handling modules (rewrite, redirect) -Index: lighttpd-1.4.30/doc/config/conf.d/access_log.conf -=================================================================== ---- lighttpd-1.4.30.orig/doc/config/conf.d/access_log.conf -+++ lighttpd-1.4.30/doc/config/conf.d/access_log.conf -@@ -9,7 +9,7 @@ - ## - ## Default access log. - ## --accesslog.filename = log_root + "/access.log" -+accesslog.filename = log_root + "/lighttpd-access.log" - - ## - ## The default format produces CLF compatible output. diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk index 5ff4ce6..48f733a 100644 --- a/package/lighttpd/lighttpd.mk +++ b/package/lighttpd/lighttpd.mk @@ -57,9 +57,8 @@ LIGHTTPD_CONF_OPT += --without-lua endif define LIGHTTPD_INSTALL_CONFIG - mkdir -p $(TARGET_DIR)/etc/lighttpd - mkdir -p $(TARGET_DIR)/etc/lighttpd/conf.d - mkdir -p $(TARGET_DIR)/srv/www/htdocs + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www [ -f $(TARGET_DIR)/etc/lighttpd/lighttpd.conf ] || \ $(INSTALL) -D -m 755 $(@D)/doc/config/lighttpd.conf \ @@ -89,9 +88,9 @@ endef LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG define LIGHTTPD_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/sbin/lighttpd - rm -f $(TARGET_DIR)/usr/sbin/lighttpd-angel - rm -rf $(TARGET_DIR)/usr/lib/lighttpd + $(RM) $(TARGET_DIR)/usr/sbin/lighttpd + $(RM) $(TARGET_DIR)/usr/sbin/lighttpd-angel + $(RM) -r $(TARGET_DIR)/usr/lib/lighttpd endef $(eval $(autotools-package))