lighttpd: prepare chroot enviroment for lighttpd 41/3541/1
authorLitao Gao <litao.gao@windriver.com>
Wed, 29 Apr 2020 07:14:36 +0000 (03:14 -0400)
committerLitao Gao <litao.gao@windriver.com>
Thu, 30 Apr 2020 05:03:26 +0000 (01:03 -0400)
cp /dev/null to /www/dev and set right permission

Issue-ID: INF-57
Change-Id: Ida56cd2cadf9457e8989f09d639a13c5c7dae13c
Signed-off-by: Litao Gao <litao.gao@windriver.com>
meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb
meta-stx/recipes-core/stx-config-files/files/lighttpd-init-script-chroot.patch [new file with mode: 0644]

index f18ca76..912d104 100644 (file)
@@ -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 (file)
index 0000000..d207006
--- /dev/null
@@ -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..."
+