summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/webui/phosphor-webui%.bbappend
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-03 07:09:49 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-08 04:15:49 +0300
commit6fc2fcdd935604bfada0866b476c92228d8451c0 (patch)
treeb85ce09ea67733ff3dcfc4da193778dab2943f9f /meta-openpower/recipes-phosphor/webui/phosphor-webui%.bbappend
parent7f9302120aa92f56248a718cbfee59bcc3340e5c (diff)
downloadopenbmc-6fc2fcdd935604bfada0866b476c92228d8451c0.tar.xz
openpower: phosphor-webui: set append wildcard
For a recipe without a suffix piece, add wildcard to the append. Next will update the recipe. Then update the append again. (From meta-openpower rev: 07ce33c80e1261090f5120fb19c2088d8bd1a61c) Change-Id: I83dc58ad2b13eb331961bf2515fe0db8d81e37b5 Signed-off-by: Patrick Venture <venture@google.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openpower/recipes-phosphor/webui/phosphor-webui%.bbappend')
-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..17dd7397b
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/webui/phosphor-webui%.bbappend
@@ -0,0 +1,16 @@
+do_install_append_df-openpower () {
+
+# 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`' '{}' \;
+
+}