Skip to content

Commit

Permalink
adapt ran-npm makefile target
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisss404 committed Sep 8, 2023
1 parent bc44c2b commit 38cd74b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
21 changes: 21 additions & 0 deletions Makefile-adapt-ran-npm-target.patch.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- Makefile 2023-08-20 00:15:49.000000000 +0100
+++ Makefile_v2 2023-09-07 19:46:26.864885523 +0100
@@ -274,9 +274,7 @@
node_modules/.bin/prettier: .ran-npm
.ran-npm: package.json package-lock.json
@echo "npm version: $$(npm --version)"
- npm --version | grep "^$(NPM_VERSION)\." >/dev/null 2>&1
@echo "node version: $$(node --version)"
- node --version | grep "^v$(NODEJS_VERSION)\." >/dev/null 2>&1
@echo "open file descriptor limit (soft): $$(ulimit -Sn)"
@echo "open file descriptor limit (hard): $$(ulimit -Hn)"
@if curl --silent --output /dev/null --head '${ARTIFACT_STORAGE}/#browse/browse:npm-proxy'; then \
@@ -287,7 +285,7 @@
REGISTRY= ; \
echo "Installing from public registry" ; \
fi ; \
- npm ci --yes --audit=false --unsafe-perm $$REGISTRY
+ npm install
sed -i 's#"resolved": "https://artifacts.lan.tribe29.com/repository/npm-proxy/#"resolved": "https://registry.npmjs.org/#g' package-lock.json
touch node_modules/.bin/webpack node_modules/.bin/redoc-cli node_modules/.bin/prettier

11 changes: 0 additions & 11 deletions Makefile-replace-npm-clean-install-with-install.patch

This file was deleted.

16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,22 @@ The following sections show how to download and install the DEB packages availab
+ "http://archive.ubuntu.com/ubuntu/pool/universe/h/heirloom-mailx/heirloom-mailx_" + HEIRLOOMMAILX_VERSION + ".orig.tar.gz",
diff -u omd/packages/heirloom-mailx/heirloom-mailx_http.bzl omd/packages/heirloom-mailx/heirloom-mailx_http.bzl_v2 > ../heirloom-mailx-fix-source-url.patch

#### Reduce webpack memory consumption
#### Adapt makefile target ran-npm

cp Makefile Makefile_v2
vim Makefile_v2
+.ran-webpack: export NODE_OPTIONS := --max-old-space-size=2048
diff -u Makefile Makefile_v2 > ../Makefile-reduce-webpack-memory-consumption.patch
- npm --version | grep "^$(NPM_VERSION)\." >/dev/null 2>&1
- node --version | grep "^v$(NODEJS_VERSION)\." >/dev/null 2>&1
- npm ci --yes --audit=false --unsafe-perm $$REGISTRY
+ npm install
diff -u Makefile Makefile_v2 > ../Makefile-adapt-ran-npm-target.patch

#### Replace npm clean install with install
#### Reduce webpack memory consumption

cp Makefile Makefile_v2
vim Makefile_v2
- npm ci --yes --audit=false --unsafe-perm $$REGISTRY
+ npm install
diff -u Makefile Makefile_v2 > ../Makefile-replace-npm-clean-install-with-install.patch
+.ran-webpack: export NODE_OPTIONS := --max-old-space-size=2048
diff -u Makefile Makefile_v2 > ../Makefile-reduce-webpack-memory-consumption.patch

#### Remove module navicli

Expand Down
2 changes: 1 addition & 1 deletion build_check_mk_debian_32bit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ cd check-mk-raw-${CHECKMK_VERSION}.cre
patch -p0 < ../create_build_environment_variables-allow-empty-pathhash.patch
patch -p0 < ../defines.make-use-official-python-mirror.patch
patch -p0 < ../heirloom-mailx-fix-source-url.patch
patch -p0 < ../Makefile-adapt-ran-npm-target.patch
patch -p0 < ../Makefile-reduce-webpack-memory-consumption.patch
patch -p0 < ../Makefile-replace-npm-clean-install-with-install.patch
patch -p0 < ../omd-Makefile-remove-module-navicli.patch
patch -p0 < ../python-make-add-fno-semantic-interposition.patch
patch -p0 < ../python-make-set-arm-architecture.patch
Expand Down

0 comments on commit 38cd74b

Please sign in to comment.