From 1fd2105e28443e336b09c16408c3fc4c6dc6cfaf Mon Sep 17 00:00:00 2001 From: Litao Gao Date: Wed, 29 Apr 2020 03:14:36 -0400 Subject: [PATCH] lighttpd: prepare chroot enviroment for lighttpd cp /dev/null to /www/dev and set right permission Issue-ID: INF-57 Change-Id: Ida56cd2cadf9457e8989f09d639a13c5c7dae13c Signed-off-by: Litao Gao --- .../recipes-core/stx-config-files/config-files_1.0.0.bb | 1 + .../files/lighttpd-init-script-chroot.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 meta-stx/recipes-core/stx-config-files/files/lighttpd-init-script-chroot.patch diff --git a/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb b/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb index f18ca76..912d104 100644 --- a/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb +++ b/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb @@ -54,6 +54,7 @@ SRC_URI = " \ file://syslog-ng-config-systemd-service.patch \ file://syslog-ng-conf-fix-the-source.patch \ file://syslog-ng-conf-replace-match-with-message.patch \ + file://lighttpd-init-script-chroot.patch \ " do_configure () { diff --git a/meta-stx/recipes-core/stx-config-files/files/lighttpd-init-script-chroot.patch b/meta-stx/recipes-core/stx-config-files/files/lighttpd-init-script-chroot.patch new file mode 100644 index 0000000..d207006 --- /dev/null +++ b/meta-stx/recipes-core/stx-config-files/files/lighttpd-init-script-chroot.patch @@ -0,0 +1,14 @@ +diff -ru a/lighttpd-config/files/lighttpd.init b/lighttpd-config/files/lighttpd.init +--- a/lighttpd-config/files/lighttpd.init 2020-04-29 07:07:49.040288478 +0000 ++++ b/lighttpd-config/files/lighttpd.init 2020-04-29 07:09:35.332285981 +0000 +@@ -59,6 +59,10 @@ + mkdir -p /scratch/lighttpd + mount --bind /scratch/lighttpd /www/tmp/ + chown www /www/tmp/ ++ # /dev/null is required in chroot env ++ mkdir /www/dev ++ cp /dev/null /www/dev ++ chmod 777 /www/dev/null + + echo -n "Starting $DESC..." + -- 2.16.6