summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/webui
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-08-31 13:30:50 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-09-05 00:28:29 +0300
commitd3f78932cf6b3063caceacdae9ddd6ca30d48786 (patch)
tree765de745d26798d7a37340d2851b86b57cda7eb8 /meta-openpower/recipes-phosphor/webui
parentf1ade61b5994799a4cffca0c124b2ed36e640cbf (diff)
downloadopenbmc-d3f78932cf6b3063caceacdae9ddd6ca30d48786.tar.xz
meta-openpower: Move layer content from common/
Adopt a more conventional directory hierarchy. meta-openpower is still a _long_ way from suitable for hosting on yoctoproject.org but things like this don't help. (From meta-openpower rev: 2c8db5661cecd7e4cc20bcb96df76490e62cfb67) Change-Id: I415caaa28ec728f24e755ddb549012f24874fefe Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openpower/recipes-phosphor/webui')
-rw-r--r--meta-openpower/recipes-phosphor/webui/phosphor-webui.bbappend16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta-openpower/recipes-phosphor/webui/phosphor-webui.bbappend b/meta-openpower/recipes-phosphor/webui/phosphor-webui.bbappend
new file mode 100644
index 000000000..ea818947e
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/webui/phosphor-webui.bbappend
@@ -0,0 +1,16 @@
+do_install_append () {
+
+# The webui content is served as pre-compressed gzip content. While nginx can
+# handle this via the gzip_static directive (and we use that), the nginx
+# try_files directive (which we also use) searches the URI as-is. The suggested
+# workaround is to have an empty uncompressed file with the same name as the
+# compressed file. This does not impact the functionality of gzip_static.
+# So for eg if there's an index.html.gz, create an empty index.html. Same goes
+# for all the webui content.
+# https://serverfault.com/questions/571733/nginx-gzip-static-why-are-the-non-compressed-files-required
+# https://www.ruby-forum.com/topic/4402481
+# https://trac.nginx.org/nginx/ticket/1367
+
+find ${D}${datadir}/www -type f -name '*.gz' -exec sh -c 'touch `dirname "$0"`/`basename "$0" .gz`' '{}' \;
+
+}