diff --git a/build_frontend.sh b/build_frontend.sh index fa0fb8e..798bc9e 100755 --- a/build_frontend.sh +++ b/build_frontend.sh @@ -1,5 +1,11 @@ #!/bin/bash -eu +# Webpack needs more than the default 4GB RAM, and +# the OpenSSL legacy provider (https://github.com/webpack/webpack/issues/14532). +# The legacy provider can be removed once https://github.com/grafana/grafana/pull/53088 +# is released +export NODE_OPTIONS="--max_old_space_size=6144 --openssl-legacy-provider" + # Build the frontend yarn run build diff --git a/create_bundles_in_container.sh b/create_bundles_in_container.sh index 6f1b8fc..e7c982e 100755 --- a/create_bundles_in_container.sh +++ b/create_bundles_in_container.sh @@ -14,9 +14,6 @@ RUN dnf upgrade -y && \ # https://groups.google.com/g/golang-nuts/c/MVtHZUtZru4 ENV GOPROXY=https://proxy.golang.org,direct -# Webpack needs more than the default 4GB RAM -ENV NODE_OPTIONS=--max_old_space_size=6144 - WORKDIR /tmp/grafana-build COPY Makefile grafana.spec *.patch build_frontend.sh list_bundled_nodejs_packages.py . RUN mkdir bundles diff --git a/grafana.spec b/grafana.spec index 3997b89..ab263ac 100644 --- a/grafana.spec +++ b/grafana.spec @@ -827,7 +827,7 @@ chmod 640 %{_sysconfdir}/%{name}/ldap.toml %check # Test frontend %if %{compile_frontend} -node_modules/.bin/jest +yarn run jest %endif # Test backend