From ff46f533e9c0f4a1d0a82b39ca25dbafa7f32a73 Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Jun 07 2019 15:34:40 +0000 Subject: Issue 50052 - Fix rpm.mk according to audit-ci change Description: Always run `npm ci` when we run node_modules install. It should be done because we always have to be sure about what we ship in the package is safe and stable. https://pagure.io/389-ds-base/issue/50052 Reviewed by: mreynolds (Thanks!) --- diff --git a/rpm.mk b/rpm.mk index fbb6076..1b2d02e 100644 --- a/rpm.mk +++ b/rpm.mk @@ -33,13 +33,13 @@ clean: rm -rf dist rm -rf rpmbuild -$(NODE_MODULES_TEST): +install-node-modules: cd src/cockpit/389-console; make -f node_modules.mk install -build-cockpit: $(NODE_MODULES_TEST) +build-cockpit: install-node-modules cd src/cockpit/389-console; make -f node_modules.mk build-cockpit-plugin -dist-bz2: $(NODE_MODULES_TEST) +dist-bz2: install-node-modules cd src/cockpit/389-console; \ rm -rf cockpit_dist; \ make -f node_modules.mk build-cockpit-plugin; \ @@ -54,7 +54,7 @@ dist-bz2: $(NODE_MODULES_TEST) local-archive: build-cockpit -mkdir -p dist/$(NAME_VERSION) - rsync -a --exclude=node_modules --exclude=dist --exclude=.git --exclude=rpmbuild . dist/$(NAME_VERSION) + rsync -a --exclude=node_modules --exclude=dist --exclude=__pycache__ --exclude=.git --exclude=rpmbuild . dist/$(NAME_VERSION) tarballs: local-archive -mkdir -p dist/sources diff --git a/src/cockpit/389-console/node_modules.mk b/src/cockpit/389-console/node_modules.mk index 9da5e18..307e8e3 100644 --- a/src/cockpit/389-console/node_modules.mk +++ b/src/cockpit/389-console/node_modules.mk @@ -1,5 +1,5 @@ install: package.json - test -f node_modules/webpack || npm ci + npm ci build-cockpit-plugin: webpack.config.js npm run audit-ci && npm run build && cp -r dist cockpit_dist