From 5d73df67ee0731f372df9a4a0464182a6411e1fe Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Oct 2018 10:23:01 +0100 Subject: [PATCH 001/942] Bump React and chrome-remote-interface NPM dependencies Closes #49 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ae2f5a8..43c1761 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@babel/preset-react": "^7.0.0", "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0", - "chrome-remote-interface": "^0.25.5", + "chrome-remote-interface": "^0.26.1", "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", "css-loader": "^0.28.11", @@ -44,7 +44,7 @@ "dependencies": { "@babel/polyfill": "^7.0.0", "node-sass": "^4.9.0", - "react": "^16.4.2", - "react-dom": "^16.4.2" + "react": "^16.6.0", + "react-dom": "^16.6.0" } } From bb541d7506ae2b0f2fad4955dfea47f0a9005916 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 8 Nov 2018 13:47:06 +0100 Subject: [PATCH 002/942] Bump Cockpit test API to 181 No API changes. Closes #52 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6bd672c..5f959c4 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 176 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 181 git checkout --force FETCH_HEAD -- test/common git reset test/common From 9e09cfb77f2ce847eb984c17d21bf30a4be1361a Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Thu, 8 Nov 2018 13:02:03 +0200 Subject: [PATCH 003/942] Ask the Cockpit Bots to propose updates for NPM modules --- .tasks | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 .tasks diff --git a/.tasks b/.tasks new file mode 100755 index 0000000..8da62e5 --- /dev/null +++ b/.tasks @@ -0,0 +1,7 @@ +#!/bin/sh + +# Open issues for things that need doing on a regular basis +bots/npm-trigger + +# Find those issues and propose to do them +bots/issue-scan From c87b2839c11eaac09e80f0b1f33910dea16db5e1 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Thu, 22 Nov 2018 10:56:00 +0200 Subject: [PATCH 004/942] Use specific versions in package.json The Cockpit Bots will now propose updates. Closes #54 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 43c1761..5a1cde2 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,9 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "^7.0.0", - "node-sass": "^4.9.0", - "react": "^16.6.0", - "react-dom": "^16.6.0" + "@babel/polyfill": "7.0.0", + "node-sass": "4.9.0", + "react": "16.6.0", + "react-dom": "16.6.0" } } From 64d820c44f43a8e6271f663e9666b8d7448a74ce Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Mon, 3 Dec 2018 22:13:16 +0200 Subject: [PATCH 005/942] package.json: Update react package dependency (#66) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a1cde2..56b66d9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dependencies": { "@babel/polyfill": "7.0.0", "node-sass": "4.9.0", - "react": "16.6.0", + "react": "16.6.3", "react-dom": "16.6.0" } } From 4b3c740283d97d5de4c1113bd385dc1a3dd39d12 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Thu, 6 Dec 2018 23:06:22 +0200 Subject: [PATCH 006/942] package.json: Update node-sass package dependency Closes #68 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56b66d9..64ccf10 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "@babel/polyfill": "7.0.0", - "node-sass": "4.9.0", + "node-sass": "4.10.0", "react": "16.6.3", "react-dom": "16.6.0" } From 02d631a18aff06b5591ce84a248858ab29fda0ba Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Tue, 11 Dec 2018 16:15:13 +0200 Subject: [PATCH 007/942] package.json: Update node-sass package dependency Closes #69 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64ccf10..10b2312 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "@babel/polyfill": "7.0.0", - "node-sass": "4.10.0", + "node-sass": "4.11.0", "react": "16.6.3", "react-dom": "16.6.0" } From e107a82f2a8cff720b1b2a822b3b68f37077da73 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Fri, 14 Dec 2018 18:12:21 +0200 Subject: [PATCH 008/942] package.json: Update react-dom package dependency Closes #70 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 10b2312..3488462 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,6 @@ "@babel/polyfill": "7.0.0", "node-sass": "4.11.0", "react": "16.6.3", - "react-dom": "16.6.0" + "react-dom": "16.6.3" } } From f475fff8f707bbea238080c8f2f2913c5059ebb4 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Sun, 23 Dec 2018 21:49:08 +0200 Subject: [PATCH 009/942] package.json: Update react-dom package dependency (#74) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3488462..fdf1f31 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,6 @@ "@babel/polyfill": "7.0.0", "node-sass": "4.11.0", "react": "16.6.3", - "react-dom": "16.6.3" + "react-dom": "16.7.0" } } From 00a9ba681401389b98ff65d52dfb22e12c450b27 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Fri, 28 Dec 2018 10:09:52 +0200 Subject: [PATCH 010/942] package.json: Update react package dependency (#75) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fdf1f31..bcf5a60 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "dependencies": { "@babel/polyfill": "7.0.0", "node-sass": "4.11.0", - "react": "16.6.3", + "react": "16.7.0", "react-dom": "16.7.0" } } From a501ebb2bf4ea58d5d82e8a5f959fc3057f45d3f Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Mon, 31 Dec 2018 14:11:37 +0200 Subject: [PATCH 011/942] package.json: Update @babel/polyfill package dependency (#76) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bcf5a60..3db5ca9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.0.0", + "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", "react": "16.7.0", "react-dom": "16.7.0" From 7b67b091f1672e82e3013b579958959c4af9c4bc Mon Sep 17 00:00:00 2001 From: Kirill Glebov Date: Thu, 17 Jan 2019 16:45:15 +0100 Subject: [PATCH 012/942] Add cockpit dependency Closes #67 --- cockpit-starter-kit.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 53e8b70..4aa289b 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -7,6 +7,8 @@ License: LGPLv2+ Source: cockpit-starter-kit-%{version}.tar.gz BuildArch: noarch +Requires: cockpit-system + %define debug_package %{nil} %description From 81096b95ca3dc74ef7a21453e42588a4692a1224 Mon Sep 17 00:00:00 2001 From: bmustiata Date: Mon, 28 Jan 2019 14:22:46 +0100 Subject: [PATCH 013/942] Support watching for changing code Closes #93 --- Makefile | 3 +++ README.md | 10 ++++++++++ package.json | 1 + 3 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 5f959c4..99381ed 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,9 @@ dist/po.%.js: po/%.po $(NODE_MODULES_TEST) $(WEBPACK_TEST): $(NODE_MODULES_TEST) $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS)) NODE_ENV=$(NODE_ENV) npm run build +watch: + NODE_ENV=$(NODE_ENV) npm run watch + clean: rm -rf dist/ [ ! -e cockpit-$(PACKAGE_NAME).spec.in ] || rm -f cockpit-$(PACKAGE_NAME).spec diff --git a/README.md b/README.md index 1f408d0..981e800 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,16 @@ ln -s `pwd`/dist ~/.local/share/cockpit/starter-kit After changing the code and running `make` again, reload the Cockpit page in your browser. +You can also use +[watch mode](https://webpack.js.org/guides/development/#using-watch-mode) to +automatically update the webpack on every code change with + + $ npm run watch + +or + + $ make watch + # Running eslint Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check diff --git a/package.json b/package.json index 3db5ca9..193d4b1 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "author": "", "license": "LGPL-2.1", "scripts": { + "watch": "webpack --watch", "build": "webpack", "eslint": "eslint --ext .jsx --ext .es6 src/", "eslint:fix": "eslint --fix --ext .jsx --ext .es6 src/" From 891480366c4e99e07c83251af9104e4475bb4c29 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 29 Jan 2019 11:54:51 +0100 Subject: [PATCH 014/942] Bump Cockpit test API to 185 No API changes. Closes #89 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 99381ed..6019e33 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 181 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 185 git checkout --force FETCH_HEAD -- test/common git reset test/common From 2a2f99b6f008b6309d5bfb4344cc2fa2a364b2cc Mon Sep 17 00:00:00 2001 From: Bogdan Mustiata Date: Sun, 27 Jan 2019 15:24:08 +0100 Subject: [PATCH 015/942] React to hostname changes Closes #94 --- src/app.jsx | 7 +++---- test/check-application | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index 55f1c88..a2441ef 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -28,10 +28,9 @@ export class Application extends React.Component { super(); this.state = { 'hostname': _("Unknown") }; - cockpit.file('/etc/hostname').read() - .done((content) => { - this.setState({ 'hostname': content.trim() }); - }); + cockpit.file('/etc/hostname').watch(content => { + this.setState({ 'hostname': content.trim() }); + }); } render() { diff --git a/test/check-application b/test/check-application index 40431e2..749427e 100755 --- a/test/check-application +++ b/test/check-application @@ -28,6 +28,11 @@ class TestApplication(testlib.MachineCase): b.wait_present(".container-fluid p") b.wait_text(".container-fluid p", "Running on " + hostname) + # change current hostname + m.execute("echo new-%s > /etc/hostname" % hostname) + # verify new hostname name + b.wait_text(".container-fluid p", "Running on new-" + hostname) + # change language to German b.switch_to_top() b.click("#content-user-name") From f6430895c7fe3b5db80d349c31e234c86666b64d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 6 Feb 2019 09:48:55 +0100 Subject: [PATCH 016/942] Move to latest eslint standard plugin This fixes the three warnings that recently started to appear: [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard-react") [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "node_modules/eslint-config-standard-jsx/index.js") [ESLINT_LEGACY_OBJECT_REST_SPREAD] DeprecationWarning: The 'parserOptions.ecmaFeatures.experimentalObjectRestSpread' option is deprecated. Use 'parserOptions.ecmaVersion' instead. (found in "standard") Closes #99 --- .eslintrc.json | 2 +- package.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3b7538e..e63e3a3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,8 @@ "extends": ["eslint:recommended", "standard", "standard-react"], "parser": "babel-eslint", "parserOptions": { + "ecmaVersion": "7", "ecmaFeatures": { - "experimentalObjectRestSpread": true, "jsx": true }, "sourceType": "module" diff --git a/package.json b/package.json index 193d4b1..9cd9b34 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,15 @@ "copy-webpack-plugin": "^4.5.2", "css-loader": "^0.28.11", "eslint": "^5.4.0", - "eslint-config-standard": "^11.0.0", - "eslint-config-standard-react": "^6.0.0", + "eslint-config-standard": "^12.0.0", + "eslint-config-standard-react": "^7.0.2", "eslint-loader": "^2.1.0", "eslint-plugin-flowtype": "^2.50.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-node": "^7.0.1", "eslint-plugin-promise": "^4.0.0", - "eslint-plugin-react": "^6.9.0", - "eslint-plugin-standard": "^3.1.0", + "eslint-plugin-react": "^7.12.4", + "eslint-plugin-standard": "^4.0.0", "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", From 1dd8711512910f3cbf552864df8b1ea63fd4f1d6 Mon Sep 17 00:00:00 2001 From: Kyrylo Gliebov Date: Tue, 15 Jan 2019 14:59:17 +0100 Subject: [PATCH 017/942] Add app-data-validate for metainfo.xml Closes #82 --- Makefile | 1 + org.cockpit-project.starter-kit.metainfo.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 6019e33..d6048e9 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,7 @@ devel-install: $(WEBPACK_TEST) # ship a stub node_modules/ so that `make` works without re-running `npm install` dist-gzip: NODE_ENV=production dist-gzip: all cockpit-$(PACKAGE_NAME).spec + if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi mv node_modules node_modules.release mkdir -p $(NODE_MODULES_TEST) touch -r package.json $(NODE_MODULES_TEST) diff --git a/org.cockpit-project.starter-kit.metainfo.xml b/org.cockpit-project.starter-kit.metainfo.xml index ad720d8..a4d7ea2 100644 --- a/org.cockpit-project.starter-kit.metainfo.xml +++ b/org.cockpit-project.starter-kit.metainfo.xml @@ -1,3 +1,4 @@ + org.cockpit-project.starter-kit CC0-1.0 From d6e4c6be6e42e9b4fa56b70231dbe855e92565fa Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Fri, 8 Feb 2019 14:08:35 +0200 Subject: [PATCH 018/942] package.json: Update react-dom package dependency Closes #100 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9cd9b34..86bd47e 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", "react": "16.7.0", - "react-dom": "16.7.0" + "react-dom": "16.8.1" } } From 3ae93bd04e31b6cf1e26f3f3d81cfb1cb371fa7c Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Mon, 11 Feb 2019 15:07:49 +0200 Subject: [PATCH 019/942] package.json: Update react package dependency Closes #101 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86bd47e..0721264 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", - "react": "16.7.0", + "react": "16.8.1", "react-dom": "16.8.1" } } From a0d4171cc85c76623d8030b54c308ec5defa2996 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 12 Feb 2019 09:37:42 +0100 Subject: [PATCH 020/942] Validate AppStream metainfo during RPM build This is a requirement in the Fedora packaging guidelines: https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/#_app_data_validate_usage Closes #102 --- cockpit-starter-kit.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 4aa289b..e7a2c5f 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -6,6 +6,7 @@ License: LGPLv2+ Source: cockpit-starter-kit-%{version}.tar.gz BuildArch: noarch +BuildRequires: libappstream-glib Requires: cockpit-system @@ -19,6 +20,7 @@ Cockpit Starter Kit Example Module %install %make_install +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* %files %{_datadir}/cockpit/* From e9db4448c95cae2b8d081fd11c4f415c3a10bf00 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Feb 2019 12:01:18 +0100 Subject: [PATCH 021/942] Bump Cockpit test API to 187 No API changes. Closes #103 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d6048e9..c8f828d 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 185 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 187 git checkout --force FETCH_HEAD -- test/common git reset test/common From 0d1ca2d5a71b6982a36a9c5bf638de1ef4ed2493 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Sun, 17 Feb 2019 22:00:39 +0200 Subject: [PATCH 022/942] package.json: Update react-dom package dependency Closes #105 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0721264..33f100d 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", "react": "16.8.1", - "react-dom": "16.8.1" + "react-dom": "16.8.2" } } From d634cdd4625dcc22cc0d3c4cfb72bc97175a78ab Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Thu, 21 Feb 2019 00:30:10 +0200 Subject: [PATCH 023/942] package.json: Update react package dependency Closes #106 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33f100d..c71ab8d 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", - "react": "16.8.1", + "react": "16.8.2", "react-dom": "16.8.2" } } From 20cc5a28942beeb8c21445a30ea90d6d8f801e77 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Sun, 24 Feb 2019 09:08:08 +0200 Subject: [PATCH 024/942] package.json: Update react package dependency Closes #120 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c71ab8d..d444b5e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", - "react": "16.8.2", + "react": "16.8.3", "react-dom": "16.8.2" } } From 32f0e20ddbb6d0af304548f7e5712feb4693dfb0 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Wed, 27 Feb 2019 09:10:24 +0200 Subject: [PATCH 025/942] package.json: Update react-dom package dependency Closes #131 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d444b5e..1f3180a 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", "react": "16.8.3", - "react-dom": "16.8.2" + "react-dom": "16.8.3" } } From afda681f4afcb70cbaa5473e2825998dd85a556c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 4 Mar 2019 09:11:29 +0100 Subject: [PATCH 026/942] tasks: Minimize races filing issues for bots We don't need to file or check for these issues on every iteration through the .tasks script. These will count as "work done" and thus skip the sleep (even though the "work" lasts only a split-second), and are prone to creating duplicates. Similar to https://github.com/cockpit-project/cockpit/commit/af2e934a Closes #147 --- .tasks | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.tasks b/.tasks index 8da62e5..7fdc60d 100755 --- a/.tasks +++ b/.tasks @@ -1,7 +1,16 @@ #!/bin/sh -# Open issues for things that need doing on a regular basis -bots/npm-trigger +# When run automated, randomize to minimize stampeding herd +if [ -t 0 ]; then + chance=10 +else + chance=$(shuf -i 0-10 -n 1) +fi + +if [ $chance -gt 9 ]; then + # Open issues for things that need doing on a regular basis + bots/npm-trigger +fi # Find those issues and propose to do them bots/issue-scan From 220b7d7c4f3f8b1f88e501be564b1014d47c46e1 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Mon, 11 Mar 2019 08:53:00 +0200 Subject: [PATCH 027/942] package.json: Update react-dom package dependency Closes #150 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1f3180a..bd119b5 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", "react": "16.8.3", - "react-dom": "16.8.3" + "react-dom": "16.8.4" } } From 88f759d3e7aa67153b9d8e81f475651193e52b3f Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Thu, 14 Mar 2019 09:03:48 +0200 Subject: [PATCH 028/942] package.json: Update react package dependency Closes #151 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd119b5..35ec58e 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.2.5", "node-sass": "4.11.0", - "react": "16.8.3", + "react": "16.8.4", "react-dom": "16.8.4" } } From d4808563b534cebeabd7d2400c6b96cfed32194e Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Wed, 20 Mar 2019 08:40:28 +0200 Subject: [PATCH 029/942] package.json: Update @babel/polyfill package dependency Closes #153 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 35ec58e..0872601 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.2.5", + "@babel/polyfill": "7.4.0", "node-sass": "4.11.0", "react": "16.8.4", "react-dom": "16.8.4" From 0f9b7e1e46b52337020282a033e21a2916391438 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Sun, 24 Mar 2019 00:31:07 +0200 Subject: [PATCH 030/942] package.json: Update react-dom package dependency Closes #154 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0872601..1cac141 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.4.0", "node-sass": "4.11.0", "react": "16.8.4", - "react-dom": "16.8.4" + "react-dom": "16.8.5" } } From dd18561c589b3e6a93503ce65578abeb01ba658b Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Wed, 27 Mar 2019 09:25:31 +0200 Subject: [PATCH 031/942] package.json: Update react package dependency Closes #155 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1cac141..79a0df6 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.4.0", "node-sass": "4.11.0", - "react": "16.8.4", + "react": "16.8.5", "react-dom": "16.8.5" } } From ca20146dbebc81e161719b99bdc0e85ffe29cd73 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Sat, 30 Mar 2019 20:52:08 +0200 Subject: [PATCH 032/942] package.json: Update react package dependency Closes #156 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79a0df6..3df816c 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "@babel/polyfill": "7.4.0", "node-sass": "4.11.0", - "react": "16.8.5", + "react": "16.8.6", "react-dom": "16.8.5" } } From 026275122feef83f34ceddf3000d06aec29ad108 Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Tue, 2 Apr 2019 22:12:44 +0300 Subject: [PATCH 033/942] package.json: Update react-dom package dependency Closes #157 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3df816c..c9a5f0f 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "@babel/polyfill": "7.4.0", "node-sass": "4.11.0", "react": "16.8.6", - "react-dom": "16.8.5" + "react-dom": "16.8.6" } } From d3c41370c9dd034bf839652a737b600cde20991f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 3 Apr 2019 09:45:03 +0200 Subject: [PATCH 034/942] Bump Cockpit test API to 190 No API changes. Closes #158 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c8f828d..cb0eb9e 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 187 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 190 git checkout --force FETCH_HEAD -- test/common git reset test/common From fa7a430847f0ff8ac7a2491c79b67361311b8bee Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 3 Apr 2019 16:59:13 +0200 Subject: [PATCH 035/942] test: Remove redundant wait_present() calls (#159) These are obsolete since https://github.com/cockpit-project/cockpit/commit/b1722f5b5d0 Bump cockpit test API accordingly. Closes #159 --- Makefile | 2 +- test/check-application | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cb0eb9e..61d6c1e 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 190 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 191 git checkout --force FETCH_HEAD -- test/common git reset test/common diff --git a/test/check-application b/test/check-application index 749427e..2ad5d68 100755 --- a/test/check-application +++ b/test/check-application @@ -20,12 +20,10 @@ class TestApplication(testlib.MachineCase): self.login_and_go("/starter-kit") # verify expected heading - b.wait_present(".container-fluid h2") b.wait_text(".container-fluid h2", "Starter Kit") # verify expected host name hostname = m.execute("hostname").strip() - b.wait_present(".container-fluid p") b.wait_text(".container-fluid p", "Running on " + hostname) # change current hostname From 018ec9d43cd807a079faacb1d1e3e34ffa605229 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Fri, 5 Apr 2019 18:19:46 +0000 Subject: [PATCH 036/942] package.json: Update @babel/polyfill package dependency Closes #160 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9a5f0f..96b0724 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.4.0", + "@babel/polyfill": "7.4.3", "node-sass": "4.11.0", "react": "16.8.6", "react-dom": "16.8.6" From 418a690b9eee2b346da7f61473141f060706b689 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 27 Apr 2019 11:47:23 +0000 Subject: [PATCH 037/942] package.json: Update @babel/polyfill package dependency Closes #167 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 96b0724..e07df03 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.4.3", + "@babel/polyfill": "7.4.4", "node-sass": "4.11.0", "react": "16.8.6", "react-dom": "16.8.6" From 107ed4f82e8938351e047ef3837b251fb602f22f Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 1 May 2019 08:05:13 +0000 Subject: [PATCH 038/942] package.json: Update node-sass package dependency Closes #168 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e07df03..74319a6 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ }, "dependencies": { "@babel/polyfill": "7.4.4", - "node-sass": "4.11.0", + "node-sass": "4.12.0", "react": "16.8.6", "react-dom": "16.8.6" } From 989e8c930159ae4c2e0815357bf23a67388b749b Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Jun 2019 08:23:52 +0200 Subject: [PATCH 039/942] Bump Cockpit test API to 195 No API changes. Closes #181 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 61d6c1e..f0fb253 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 191 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 195 git checkout --force FETCH_HEAD -- test/common git reset test/common From acc7de2d6d8574ffb3d2ae54b0f09768e0582575 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 12 Jun 2019 09:54:42 +0200 Subject: [PATCH 040/942] cockpituous: Fix srpm Release: Use release-srpm's `-V` option [1] so that the generated srpm will get a proper changelog and Release "1" instead of "2". [1] https://github.com/cockpit-project/cockpituous/commit/abb2bdb5 Closes #184 --- cockpituous-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockpituous-release b/cockpituous-release index b876779..19bcb99 100644 --- a/cockpituous-release +++ b/cockpituous-release @@ -12,7 +12,7 @@ RELEASE_SPEC="cockpit-starter-kit.spec" RELEASE_SRPM="_release/srpm" job release-source -job release-srpm +job release-srpm -V # Once you have a Fedora package and add the https://pagure.io/user/cockpit # user to your project's maintainers, you can also upload to Fedora automatically: From d900a7231d95fb18a1badeab668870c2a0da1018 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 11:58:18 +0200 Subject: [PATCH 041/942] tasks: Drop issue-scan This is now done by webhooks and AMQP. Closes #195 --- .tasks | 3 --- 1 file changed, 3 deletions(-) diff --git a/.tasks b/.tasks index 7fdc60d..2026460 100755 --- a/.tasks +++ b/.tasks @@ -11,6 +11,3 @@ if [ $chance -gt 9 ]; then # Open issues for things that need doing on a regular basis bots/npm-trigger fi - -# Find those issues and propose to do them -bots/issue-scan From 077eba3ede2cd88ba447dd65947bc6392b2d7369 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:17:13 +0200 Subject: [PATCH 042/942] Update to current eslint This has a new rule `quote-props`, adjust the code accordingly: 29:24 error Unnecessarily quoted property 'hostname' found quote-props 32:29 error Unnecessarily quoted property 'hostname' found quote-props --- package.json | 16 ++++++++-------- src/app.jsx | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 74319a6..3597de6 100644 --- a/package.json +++ b/package.json @@ -22,15 +22,15 @@ "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", "css-loader": "^0.28.11", - "eslint": "^5.4.0", - "eslint-config-standard": "^12.0.0", + "eslint": "^6.0.1", + "eslint-config-standard": "^13.0.0", "eslint-config-standard-react": "^7.0.2", - "eslint-loader": "^2.1.0", - "eslint-plugin-flowtype": "^2.50.0", - "eslint-plugin-import": "^2.14.0", - "eslint-plugin-node": "^7.0.1", - "eslint-plugin-promise": "^4.0.0", - "eslint-plugin-react": "^7.12.4", + "eslint-loader": "^2.2.1", + "eslint-plugin-flowtype": "^3.11.1", + "eslint-plugin-import": "^2.18.0", + "eslint-plugin-node": "^9.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-react": "^7.14.2", "eslint-plugin-standard": "^4.0.0", "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7", diff --git a/src/app.jsx b/src/app.jsx index a2441ef..1f671a9 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -26,10 +26,10 @@ const _ = cockpit.gettext; export class Application extends React.Component { constructor() { super(); - this.state = { 'hostname': _("Unknown") }; + this.state = { hostname: _("Unknown") }; cockpit.file('/etc/hostname').watch(content => { - this.setState({ 'hostname': content.trim() }); + this.setState({ hostname: content.trim() }); }); } From eea86c986f7e03863f8b0e3c41b46bef576c3505 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:19:53 +0200 Subject: [PATCH 043/942] Explicitly specify browser compatibility in babel We do this in cockpit and cockpit-ostree. --- .babelrc | 4 ---- webpack.config.js | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 7 deletions(-) delete mode 100644 .babelrc diff --git a/.babelrc b/.babelrc deleted file mode 100644 index d0ef093..0000000 --- a/.babelrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "presets": ["@babel/env", - "@babel/preset-react"] -} diff --git a/webpack.config.js b/webpack.config.js index fce4863..ee6a182 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -95,6 +95,24 @@ if (production) { })); } +var babel_loader = { + loader: "babel-loader", + options: { + presets: [ + ["@babel/env", { + "targets": { + "chrome": "57", + "firefox": "52", + "safari": "10.3", + "edge": "16", + "opera": "44" + } + }], + "@babel/preset-react" + ] + } +} + module.exports = { mode: production ? 'production' : 'development', entry: info.entries, @@ -117,17 +135,17 @@ module.exports = { }, { exclude: /node_modules/, - loader: 'babel-loader', + use: babel_loader, test: /\.js$/ }, { exclude: /node_modules/, - loader: 'babel-loader', + use: babel_loader, test: /\.jsx$/ }, { exclude: /node_modules/, - loader: 'babel-loader', + use: babel_loader, test: /\.es6$/ }, { From 1fc1923021965ecb91374d857c10e8c832a9574d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:23:22 +0200 Subject: [PATCH 044/942] Rename *.es6 to *.js *.es6 isn't standard naming, that was just an old cockpit-ism. All files are treated as ES6. --- Makefile | 2 +- README.md | 2 +- package.json | 4 ++-- src/{index.es6 => index.js} | 0 webpack.config.js | 22 +++------------------- 5 files changed, 7 insertions(+), 23 deletions(-) rename src/{index.es6 => index.js} (100%) diff --git a/Makefile b/Makefile index f0fb253..f28d50b 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ LINGUAS=$(basename $(notdir $(wildcard po/*.po))) po/POTFILES.js.in: mkdir -p $(dir $@) - find src/ -name '*.js' -o -name '*.jsx' -o -name '*.es6' > $@ + find src/ -name '*.js' -o -name '*.jsx' > $@ po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \ diff --git a/README.md b/README.md index 981e800..4700153 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ or # Running eslint Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check -JavaScript code style in `.jsx` and `.es6` files. +JavaScript code style in `.js` and `.jsx` files. The linter is executed within every build as a webpack preloader. diff --git a/package.json b/package.json index 3597de6..85701f1 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "scripts": { "watch": "webpack --watch", "build": "webpack", - "eslint": "eslint --ext .jsx --ext .es6 src/", - "eslint:fix": "eslint --fix --ext .jsx --ext .es6 src/" + "eslint": "eslint --ext .js --ext .jsx src/", + "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" }, "devDependencies": { "@babel/core": "^7.0.0", diff --git a/src/index.es6 b/src/index.js similarity index 100% rename from src/index.es6 rename to src/index.js diff --git a/webpack.config.js b/webpack.config.js index ee6a182..eb78ca1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -22,7 +22,7 @@ var production = process.env.NODE_ENV === 'production'; var info = { entries: { "index": [ - "./index.es6" + "./index.js" ] }, files: [ @@ -125,28 +125,12 @@ module.exports = { enforce: 'pre', exclude: /node_modules/, loader: 'eslint-loader', - test: /\.jsx$/ - }, - { - enforce: 'pre', - exclude: /node_modules/, - loader: 'eslint-loader', - test: /\.es6$/ + test: /\.(js|jsx)$/ }, { exclude: /node_modules/, use: babel_loader, - test: /\.js$/ - }, - { - exclude: /node_modules/, - use: babel_loader, - test: /\.jsx$/ - }, - { - exclude: /node_modules/, - use: babel_loader, - test: /\.es6$/ + test: /\.(js|jsx)$/ }, { exclude: /node_modules/, From 8fab928dcb311dc02729d7b1fdf1f24e61fdfc95 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:39:32 +0200 Subject: [PATCH 045/942] Update babel to 7.5, and actually enable polyfills MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @babel/polyfill is deprecated in ≥ 7.4 [1], and we never actually used it as we forgot to import it [2]. Move to core-js/stable. [1] https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2 [2] https://babeljs.io/docs/en/babel-polyfill#usage-in-node-browserify-webpack --- package.json | 6 +++--- src/index.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 85701f1..2e99f7d 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" }, "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/preset-env": "^7.0.0", + "@babel/core": "^7.5.4", + "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0", @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@babel/polyfill": "7.4.4", + "core-js": "^3.1.4", "node-sass": "4.12.0", "react": "16.8.6", "react-dom": "16.8.6" diff --git a/src/index.js b/src/index.js index cb3ca05..0a0e535 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,8 @@ * along with Cockpit; If not, see . */ +import "core-js/stable"; + import React from 'react'; import ReactDOM from 'react-dom'; import { Application } from './app.jsx'; From 0cf6704708b73f807e24497fb311564f110f6a4c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:44:26 +0200 Subject: [PATCH 046/942] Bump css-loader to current version This also updates to a newer js-yaml, which addresses the current two `npm audit` issues: - https://npmjs.com/advisories/788 - https://npmjs.com/advisories/813 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2e99f7d..2b927da 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "chrome-remote-interface": "^0.26.1", "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", - "css-loader": "^0.28.11", + "css-loader": "^3.0.0", "eslint": "^6.0.1", "eslint-config-standard": "^13.0.0", "eslint-config-standard-react": "^7.0.2", From 35011e4709d71df9e077f622085c18c2f5d7a240 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Jul 2019 13:46:18 +0200 Subject: [PATCH 047/942] Drop source map They are large and just for debugging. If they are needed, they should move into a separate -debugsource package, but this seems a bit overkill as a default. Closes #197 --- cockpit-starter-kit.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index e7a2c5f..48f5b17 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -22,6 +22,9 @@ Cockpit Starter Kit Example Module %make_install appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* +# drop source maps, they are large and just for debugging +find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs rm --verbose + %files %{_datadir}/cockpit/* %{_datadir}/metainfo/* From 97ab5e35b6da432ed70bc2b93b586363d05d4c5f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 31 Jul 2019 14:09:50 +0200 Subject: [PATCH 048/942] Fix AppStream ID Cockpit renamed its ID to "org.cockpit_project.cockpit" to conform to the AppStream spec [1]. Follow suit and also fix our own IDs to not contain hyphens. [1] https://github.com/cockpit-project/cockpit/commit/4a9ffe669c Closes #204 --- org.cockpit-project.starter-kit.metainfo.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.cockpit-project.starter-kit.metainfo.xml b/org.cockpit-project.starter-kit.metainfo.xml index a4d7ea2..3545eca 100644 --- a/org.cockpit-project.starter-kit.metainfo.xml +++ b/org.cockpit-project.starter-kit.metainfo.xml @@ -1,6 +1,6 @@ - org.cockpit-project.starter-kit + org.cockpit_project.starter_kit CC0-1.0 Starter Kit @@ -11,6 +11,6 @@ Scaffolding for a cockpit module.

- cockpit.desktop + org.cockpit_project.cockpit cockpit-starter-kit From 044b8da55af5ed3cd4c5db92b71f350b41465cee Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Wed, 21 Aug 2019 17:50:44 +0200 Subject: [PATCH 049/942] eslintrc: Set "root" to true Eslint shimmies up directories looking for more eslintrcs. As make-checkout now clones projects in a subdirectory of cockpit, this can result in some strange interactions. https://eslint.org/docs/user-guide/configuring Closes #212 --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index e63e3a3..b1fe5d2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,4 +1,5 @@ { + "root": true, "env": { "browser": true, "es6": true From d0a2ebcf0e477851860bad8b9c8022669a158670 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 28 Aug 2019 14:52:21 +0000 Subject: [PATCH 050/942] package.json: Update react package dependency Closes #216 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b927da..dec6969 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "core-js": "^3.1.4", "node-sass": "4.12.0", - "react": "16.8.6", + "react": "16.9.0", "react-dom": "16.8.6" } } From e557e1d45a3496100652123b667d9079ee04e796 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 31 Aug 2019 17:26:28 +0000 Subject: [PATCH 051/942] package.json: Update react-dom package dependency Closes #217 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dec6969..e1110ed 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "core-js": "^3.1.4", "node-sass": "4.12.0", "react": "16.9.0", - "react-dom": "16.8.6" + "react-dom": "16.9.0" } } From 171a30a691f1d3d8833e8fc7744d228afcbbbf44 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Sep 2019 08:33:51 +0200 Subject: [PATCH 052/942] Bump eslint to latest version No source code changes necessary. --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e1110ed..07f283a 100644 --- a/package.json +++ b/package.json @@ -16,22 +16,22 @@ "@babel/core": "^7.5.4", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", - "babel-eslint": "^9.0.0", + "babel-eslint": "^10.0.3", "babel-loader": "^8.0.0", "chrome-remote-interface": "^0.26.1", "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", "css-loader": "^3.0.0", - "eslint": "^6.0.1", - "eslint-config-standard": "^13.0.0", - "eslint-config-standard-react": "^7.0.2", - "eslint-loader": "^2.2.1", - "eslint-plugin-flowtype": "^3.11.1", - "eslint-plugin-import": "^2.18.0", - "eslint-plugin-node": "^9.1.0", + "eslint": "^6.3.0", + "eslint-config-standard": "^14.1.0", + "eslint-config-standard-react": "^9.2.0", + "eslint-loader": "^3.0.0", + "eslint-plugin-flowtype": "^4.3.0", + "eslint-plugin-import": "^2.18.2", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.14.2", - "eslint-plugin-standard": "^4.0.0", + "eslint-plugin-react": "^7.14.3", + "eslint-plugin-standard": "^4.0.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", From 1dbe7337f425838b501e567adef44e283f149b24 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Sep 2019 08:34:29 +0200 Subject: [PATCH 053/942] Fix core-js npm dependency We want pinned-down versions for runtime dependencies, and update them with our bots. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07f283a..66dccf6 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "^3.1.4", + "core-js": "3.2.1", "node-sass": "4.12.0", "react": "16.9.0", "react-dom": "16.9.0" From e7fc85c1b0ae6b62aade0ea5cfc588f3ee54d313 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Sep 2019 08:39:03 +0200 Subject: [PATCH 054/942] Bump chrome-remote-interface npm dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66dccf6..f6cb31f 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "@babel/preset-react": "^7.0.0", "babel-eslint": "^10.0.3", "babel-loader": "^8.0.0", - "chrome-remote-interface": "^0.26.1", + "chrome-remote-interface": "^0.28.0", "compression-webpack-plugin": "^1.1.11", "copy-webpack-plugin": "^4.5.2", "css-loader": "^3.0.0", From 25b970ec6b54e2433ad09eacc3ff3067b25cebcf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Sep 2019 08:39:23 +0200 Subject: [PATCH 055/942] Bump cockpit test API to 202 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f28d50b..a73b823 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 195 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 202 git checkout --force FETCH_HEAD -- test/common git reset test/common From b4cb5fe5c91ffdac9e8b5c7c6633a21b0ca7b66d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Sep 2019 08:48:53 +0200 Subject: [PATCH 056/942] Bump po2json npm dependency This gets rid of a deprecated transitive dependency: deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info. Closes #221 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6cb31f..66310b9 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", - "po2json": "^0.4.5", + "po2json": "^1.0.0-alpha", "sass-loader": "^7.0.3", "sizzle": "^2.3.3", "stdio": "^0.2.7", From bfc4039b3e1171b596889f48473f9a0492c2f85f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 12 Sep 2019 10:47:58 +0200 Subject: [PATCH 057/942] Use and ship package-lock.json npm install has been generating package-lock.json [1] for long enough for us to start relying on it. Replace the unreliable and hacky `$NODE_MODULES_TEST` file with just comparing package.json against package-lock.json to decide when to run npm install. This will finally avoid unnecessary `npm install` runs, but start to run these when git switching branches that have a different package.json. Ship package-lock.json in release tarballs, so that node_modules/ can be reconstructed exactly as it was when making the release. [1] https://docs.npmjs.com/files/package-lock.json Closes #222 --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a73b823..dbc77c0 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,8 @@ TEST_OS = centos-7 endif export TEST_OS VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) -# one example directory from `npm install` to check if that already ran -NODE_MODULES_TEST=node_modules/po2json +# stamp file to check if/when npm install ran +NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran WEBPACK_TEST=dist/index.html @@ -85,18 +85,18 @@ devel-install: $(WEBPACK_TEST) ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) # when building a distribution tarball, call webpack with a 'production' environment -# ship a stub node_modules/ so that `make` works without re-running `npm install` +# we don't ship node_modules for license and compactness reasons; we ship a +# pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that +# node_modules/ can be reconstructed if necessary) dist-gzip: NODE_ENV=production dist-gzip: all cockpit-$(PACKAGE_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi mv node_modules node_modules.release - mkdir -p $(NODE_MODULES_TEST) touch -r package.json $(NODE_MODULES_TEST) touch dist/* tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in \ - $$(git ls-files) cockpit-$(PACKAGE_NAME).spec dist/ node_modules - rm -rf node_modules + $$(git ls-files) package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ mv node_modules.release node_modules srpm: dist-gzip cockpit-$(PACKAGE_NAME).spec From 0afad278ebf89c44369bf495ae8105280722e6ea Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 12 Sep 2019 11:08:07 +0200 Subject: [PATCH 058/942] Fix updating of node_modules/ `npm install` does not update/touch an already existing package-lock.json. Thus after make touch package.json make a subsequent `make` would still run `npm install`. To fix this, remove package-lock.json before `npm install`, so that (1) package-lock.json always gets touched and thus the make rule actually works, and (2) during development we always get up to date packages (we only really want the "locking" behaviour for building from release tarballs). Also run `npm prune` so that switching between git trees with added/removed modules works correctly. Closes #223 --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index dbc77c0..08059db 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,9 @@ test/common: git reset test/common $(NODE_MODULES_TEST): package.json + # if it exists already, npm install won't update it; force that so that we always get up-to-date packages + rm -f package-lock.json npm install + npm prune .PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po From 0d636daa4790b1e79d48a132c45b07ff09b83e4e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 12 Sep 2019 11:31:42 +0200 Subject: [PATCH 059/942] Fix building under NODE_ENV=production This is meant to only control webpack. But `npm install` skips installing `devDependencies` under `NODE_ENV=production`, which breaks the package build. So always unset it for npm. This fixes `NODE_ENV=production make` in a clean tree. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 08059db..ecc861f 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,8 @@ test/common: $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages rm -f package-lock.json - npm install - npm prune + # unset NODE_ENV, skips devDependencies otherwise + env -u NODE_ENV npm install + env -u NODE_ENV npm prune .PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po From 95b2aff0b87fa53472dde90d5e7d20e1af1e32e3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 23 Sep 2019 17:28:30 +0200 Subject: [PATCH 060/942] Makefile: Update bots target for moved GitHub project Cockpit bots are in their own project now. Make the target phony so that `make bots` updates an existing checkout. Closes #228 --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ecc861f..1f6afca 100644 --- a/Makefile +++ b/Makefile @@ -133,12 +133,14 @@ vm: $(VM_IMAGE) check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common TEST_AUDIT_NO_SELINUX=1 test/check-application -# checkout Cockpit's bots/ directory for standard test VM images and API to launch them -# must be from cockpit's master, as only that has current and existing images; but testvm.py API is stable +# checkout Cockpit's bots for standard test VM images and API to launch them +# must be from master, as only that has current and existing images; but testvm.py API is stable bots: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git - git checkout --force FETCH_HEAD -- bots/ - git reset bots + if [ ! -d bots ]; then \ + git clone --depth=1 https://github.com/cockpit-project/bots.git; \ + else \ + cd bots && git fetch && git reset --hard origin/master; \ + fi # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time @@ -154,4 +156,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po +.PHONY: all bots clean install devel-install dist-gzip srpm rpm check vm update-po From b57fe40296c9750ebcd6918a8e38973186e654ab Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 28 Sep 2019 13:18:20 +0000 Subject: [PATCH 061/942] package.json: Update react package dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 66310b9..fe80ac2 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "core-js": "3.2.1", "node-sass": "4.12.0", - "react": "16.9.0", + "react": "16.10.0", "react-dom": "16.9.0" } } From 24311984e88867a26f6522974be31934e40ba971 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 27 Sep 2019 15:28:30 +0200 Subject: [PATCH 062/942] Makefile: Fix image-customize call for multiple rpms Ensure that we only install the current rpm into the VM. If there are older ones in the build tree, image-customize otherwise fails. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1f6afca..061ce0c 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ rpm: dist-gzip cockpit-$(PACKAGE_NAME).spec # build a VM with locally built rpm installed $(VM_IMAGE): rpm bots rm -f $(VM_IMAGE) $(VM_IMAGE).qcow2 - bots/image-customize -v -i cockpit -i `pwd`/cockpit-$(PACKAGE_NAME)-*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS) + bots/image-customize -v -i cockpit -i `pwd`/cockpit-$(PACKAGE_NAME)-*$(VERSION)*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS) # convenience target for the above vm: $(VM_IMAGE) From d43845c1a352768c1a08100573755b274fb1be92 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 1 Oct 2019 23:00:07 +0200 Subject: [PATCH 063/942] Makefile: Don't clobber an existing bots checkout Commit 95b2aff0 was a thinko -- for our CI we *don't* want our test to clobber a pre-existing bots/ checkout, as we often use this to run tests against an updated image or to validate a changes to the bots project. On developer machines, bots may also be a symlink to an actual bots directory in development, so don't clobber that. Closes #232 --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 061ce0c..31f7c5d 100644 --- a/Makefile +++ b/Makefile @@ -136,11 +136,7 @@ check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common # checkout Cockpit's bots for standard test VM images and API to launch them # must be from master, as only that has current and existing images; but testvm.py API is stable bots: - if [ ! -d bots ]; then \ - git clone --depth=1 https://github.com/cockpit-project/bots.git; \ - else \ - cd bots && git fetch && git reset --hard origin/master; \ - fi + [ -d bots ] || git clone --depth=1 https://github.com/cockpit-project/bots.git # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time From 0a0fc145609474884d7ab9f8df590bfa95328aeb Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 2 Oct 2019 09:09:44 +0000 Subject: [PATCH 064/942] package.json: Update react-dom package dependency Closes #234 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe80ac2..9f7d879 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "core-js": "3.2.1", "node-sass": "4.12.0", "react": "16.10.0", - "react-dom": "16.9.0" + "react-dom": "16.10.1" } } From bd0fea40f2dd44b49e44a891afd6ebb5a6959e57 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 2 Oct 2019 09:11:55 +0200 Subject: [PATCH 065/942] Support CI testing against a bots project PR * If `$COCKPIT_BOTS_REF` is set, check out that bots version instead of master. * Use git cache in $XDG_CACHE_HOME if available. Our CI uses that to save downloads, and it does not get in the way for local developers. * Stop making "bots" a phony target, and drop the now unnecessary `[ -d bots ]` check. Closes #233 --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 31f7c5d..9c108b9 100644 --- a/Makefile +++ b/Makefile @@ -135,8 +135,11 @@ check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common # checkout Cockpit's bots for standard test VM images and API to launch them # must be from master, as only that has current and existing images; but testvm.py API is stable +# support CI testing against a bots change bots: - [ -d bots ] || git clone --depth=1 https://github.com/cockpit-project/bots.git + git clone --quiet --reference-if-able $${XDG_CACHE_HOME:-$$HOME/.cache}/cockpit-project/bots https://github.com/cockpit-project/bots.git + if [ -n "$$COCKPIT_BOTS_REF" ]; then git -C bots fetch --quiet --depth=1 origin "$$COCKPIT_BOTS_REF"; git -C bots checkout --quiet FETCH_HEAD; fi + @echo "checked out bots/ ref $$(git -C bots rev-parse HEAD)" # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time @@ -152,4 +155,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all bots clean install devel-install dist-gzip srpm rpm check vm update-po +.PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po From e4420fd02ef6f9f5c16dd455e36758cf63d7e11d Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 5 Oct 2019 10:56:33 +0000 Subject: [PATCH 066/942] package.json: Update react-dom package dependency Closes #235 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f7d879..bd32cae 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "core-js": "3.2.1", "node-sass": "4.12.0", "react": "16.10.0", - "react-dom": "16.10.1" + "react-dom": "16.10.2" } } From b9925f29c5a451cbdbf406f2619e26f4f02a218d Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 9 Oct 2019 19:44:42 +0000 Subject: [PATCH 067/942] package.json: Update react package dependency Closes #236 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd32cae..6f7131b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "dependencies": { "core-js": "3.2.1", "node-sass": "4.12.0", - "react": "16.10.0", + "react": "16.10.2", "react-dom": "16.10.2" } } From 31d628cffcb169eeb483afa541a38a2dd013f0d9 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 16 Oct 2019 08:10:49 +0000 Subject: [PATCH 068/942] package.json: Update core-js package dependency Closes #238 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f7131b..cc9e88a 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.2.1", + "core-js": "3.3.2", "node-sass": "4.12.0", "react": "16.10.2", "react-dom": "16.10.2" From 024b1a2b165857dddef328605c6426e6c43e1935 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 16 Oct 2019 11:00:17 +0200 Subject: [PATCH 069/942] Add eslint rules for React hooks These make components with simple state (only a few variables) easier to read and maintain. See https://reactjs.org/docs/hooks-intro.html for details. Hook are available since React 16.8, and we already depend on 16.10. We can't use hooks in our actual code, as our only `Application` component needs a constructor. But this enables the ESLint plugin to guide developers to the right path if they use hooks. Closes #239 --- .eslintrc.json | 5 ++++- package.json | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index b1fe5d2..e660dc9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,7 @@ }, "sourceType": "module" }, - "plugins": ["flowtype", "react"], + "plugins": ["flowtype", "react", "react-hooks"], "rules": { "indent": ["error", 4, { @@ -28,6 +28,9 @@ "react/jsx-indent": ["error", 4], "semi": ["error", "always", { "omitLastInOneLineBlock": true }], + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "error", + "camelcase": "off", "comma-dangle": "off", "curly": "off", diff --git a/package.json b/package.json index cc9e88a..8b00bcd 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-react": "^7.14.3", + "eslint-plugin-react-hooks": "^2.1.2", "eslint-plugin-standard": "^4.0.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7", From bab6d4e8dd9e81babcbbdf42c53f8c2f723e95c7 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Tue, 22 Oct 2019 08:26:41 +0000 Subject: [PATCH 070/942] package.json: Update core-js package dependency Closes #241 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8b00bcd..55a2741 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.3.2", + "core-js": "3.3.3", "node-sass": "4.12.0", "react": "16.10.2", "react-dom": "16.10.2" From 4900daba390ff2321da46f3830fd2ff2781263f0 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sun, 27 Oct 2019 09:54:07 +0000 Subject: [PATCH 071/942] package.json: Update react-dom package dependency Closes #242 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55a2741..4c233fe 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "core-js": "3.3.3", "node-sass": "4.12.0", "react": "16.10.2", - "react-dom": "16.10.2" + "react-dom": "16.11.0" } } From bded1d1d5f3f22bc8064684e8ecbbd2acb43b6e7 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 30 Oct 2019 17:54:57 +0000 Subject: [PATCH 072/942] package.json: Update node-sass package dependency Closes #243 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4c233fe..94f0820 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "core-js": "3.3.3", - "node-sass": "4.12.0", + "node-sass": "4.13.0", "react": "16.10.2", "react-dom": "16.11.0" } From 6258ec67053e187a0e1af5e8aeff807a2e9fa71f Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sun, 3 Nov 2019 01:11:39 +0000 Subject: [PATCH 073/942] package.json: Update react package dependency Closes #244 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94f0820..b2b27a0 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "core-js": "3.3.3", "node-sass": "4.13.0", - "react": "16.10.2", + "react": "16.11.0", "react-dom": "16.11.0" } } From e0a48cc9e067005854b3d81e85d8b3fc9ecb4d5e Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 6 Nov 2019 11:31:58 +0000 Subject: [PATCH 074/942] package.json: Update core-js package dependency Closes #245 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2b27a0..d95b31c 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.3.3", + "core-js": "3.3.6", "node-sass": "4.13.0", "react": "16.11.0", "react-dom": "16.11.0" From 5c76af9747feaf4f7c38b65dfe074df680d70be1 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 9 Nov 2019 12:27:25 +0000 Subject: [PATCH 075/942] package.json: Update core-js package dependency Closes #246 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d95b31c..46ed2db 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.3.6", + "core-js": "3.4.0", "node-sass": "4.13.0", "react": "16.11.0", "react-dom": "16.11.0" From daaa8630a09c15ab59bf06d4e15b617d5ec47618 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Tue, 12 Nov 2019 16:01:48 +0000 Subject: [PATCH 076/942] package.json: Update core-js package dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46ed2db..2c78b4b 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.0", + "core-js": "3.4.1", "node-sass": "4.13.0", "react": "16.11.0", "react-dom": "16.11.0" From 13e75d37a34734cbb062fdcb1870ae9a639de5bc Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Fri, 15 Nov 2019 17:08:35 +0000 Subject: [PATCH 077/942] package.json: Update react package dependency Closes #248 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c78b4b..9bfb182 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "core-js": "3.4.1", "node-sass": "4.13.0", - "react": "16.11.0", + "react": "16.12.0", "react-dom": "16.11.0" } } From 37094da03a7a17d052cc847d52a157c9afcfa124 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Tue, 19 Nov 2019 11:36:47 +0000 Subject: [PATCH 078/942] package.json: Update react-dom package dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bfb182..af0a6ef 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "core-js": "3.4.1", "node-sass": "4.13.0", "react": "16.12.0", - "react-dom": "16.11.0" + "react-dom": "16.12.0" } } From 31b696106652c9084fee28f369b7743222dd6330 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Mon, 25 Nov 2019 11:47:58 +0000 Subject: [PATCH 079/942] package.json: Update core-js package dependency Closes #250 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index af0a6ef..0610702 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.1", + "core-js": "3.4.2", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From eb00b27a0e68571c41553925314b2c0e29410087 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Thu, 28 Nov 2019 13:25:36 +0000 Subject: [PATCH 080/942] package.json: Update core-js package dependency Closes #251 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0610702..b655356 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.2", + "core-js": "3.4.5", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 3e56d25c50765ba14e34352e3cdd3cb46bd08176 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 4 Dec 2019 17:36:41 +0000 Subject: [PATCH 081/942] package.json: Update core-js package dependency Closes #253 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b655356..11e1cc8 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.5", + "core-js": "3.4.7", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 0778b5f56417b933f381fe486de12eeab1ad58d5 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 11 Dec 2019 16:50:57 +0000 Subject: [PATCH 082/942] package.json: Update core-js package dependency Closes #255 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 11e1cc8..3a3b77e 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.7", + "core-js": "3.4.8", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From c5506892964c063bc97b02c0a11a4b344a0704e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Maru=C5=A1=C3=A1k?= Date: Thu, 12 Dec 2019 19:57:24 +0100 Subject: [PATCH 083/942] Bump version of test API Closes #256 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9c108b9..fbda17a 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 202 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 208 git checkout --force FETCH_HEAD -- test/common git reset test/common From 06206df7f3f0f42e7de09592e115803a52d3d069 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 14 Dec 2019 22:20:18 +0000 Subject: [PATCH 084/942] package.json: Update core-js package dependency Closes #257 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3a3b77e..ed79efe 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.4.8", + "core-js": "3.5.0", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From b0c2094b8bed0c862b5309ef17c42e375e2880bc Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 21 Dec 2019 11:26:52 +0000 Subject: [PATCH 085/942] package.json: Update core-js package dependency Closes #259 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ed79efe..a47e36d 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.5.0", + "core-js": "3.6.0", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 53fd7a27a9ea7f7dc33257720727122609a9646f Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Fri, 27 Dec 2019 17:37:12 +0000 Subject: [PATCH 086/942] package.json: Update core-js package dependency Closes #261 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a47e36d..76107bf 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.6.0", + "core-js": "3.6.1", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 10a168e282c9650134ade8dbb8776f1262322def Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 8 Jan 2020 22:03:41 +0000 Subject: [PATCH 087/942] package.json: Update core-js package dependency Closes #265 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 76107bf..4253ea9 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.6.1", + "core-js": "3.6.2", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 4f51ce190bdb8aea3ab24e8c4179cce5e9c1b703 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 11 Jan 2020 22:42:41 +0000 Subject: [PATCH 088/942] package.json: Update core-js package dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4253ea9..973c11f 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.6.2", + "core-js": "3.6.3", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From c953db6dee5f563ca1277634a3ba63f21f934dd8 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 15 Jan 2020 09:36:37 +0000 Subject: [PATCH 089/942] package.json: Update core-js package dependency Closes #267 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 973c11f..582adcd 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.6.3", + "core-js": "3.6.4", "node-sass": "4.13.0", "react": "16.12.0", "react-dom": "16.12.0" From 7ec06ca6dc29f14c2acc7422643a0d0b509cb869 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 18 Jan 2020 10:15:56 +0000 Subject: [PATCH 090/942] package.json: Update node-sass package dependency Closes #268 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 582adcd..7ac34ff 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "core-js": "3.6.4", - "node-sass": "4.13.0", + "node-sass": "4.13.1", "react": "16.12.0", "react-dom": "16.12.0" } From 23e8eb1591e84ad0bd2b647e680e7f3bfe53898c Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Mon, 27 Jan 2020 21:16:30 +0100 Subject: [PATCH 091/942] Replace 'extract-text-webpack-plugin' with 'mini-css-extract-plugin' It looks like Webpack is deprecating extract-text-webpack-plugin in favor of mini-css-extract-plugin. Discussion can be found here: webpack-contrib/extract-text-webpack-plugin#731 Closes #271 --- package.json | 2 +- webpack.config.js | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7ac34ff..c95967c 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "eslint-plugin-react": "^7.14.3", "eslint-plugin-react-hooks": "^2.1.2", "eslint-plugin-standard": "^4.0.1", - "extract-text-webpack-plugin": "^4.0.0-beta.0", + "mini-css-extract-plugin": "^0.9.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", "po2json": "^1.0.0-alpha", diff --git a/webpack.config.js b/webpack.config.js index eb78ca1..01973c4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,6 @@ const path = require("path"); const copy = require("copy-webpack-plugin"); -const extract = require("extract-text-webpack-plugin"); +const extract = require("mini-css-extract-plugin"); const fs = require("fs"); const webpack = require("webpack"); const CompressionPlugin = require("compression-webpack-plugin"); @@ -79,7 +79,7 @@ info.files = files; var plugins = [ new copy(info.files), - new extract("[name].css") + new extract({filename: "[name].css"}) ]; /* Only minimize when in production mode */ @@ -134,8 +134,17 @@ module.exports = { }, { exclude: /node_modules/, - loader: extract.extract('css-loader!sass-loader'), - test: /\.scss$/ + test: /\.scss$/, + use: [ + extract.loader, + { + loader: 'css-loader', + options: { url: false } + }, + { + loader: 'sass-loader', + } + ] } ] }, From ec85d30d0fdd1b5a3076485140f5ee1c4c3a5530 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Mon, 3 Feb 2020 10:55:05 +0100 Subject: [PATCH 092/942] manifest2po: Parse also keywords --- po/manifest2po | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/po/manifest2po b/po/manifest2po index 4d26db3..2dc691c 100755 --- a/po/manifest2po +++ b/po/manifest2po @@ -87,6 +87,17 @@ function process_manifest(manifest) { process_menu(manifest.tools); } +function process_keywords(keywords) { + keywords.forEach(v => { + v.matches.forEach(keyword => + push({ + msgid: keyword, + locations: [ filename ] + }) + ); + }); +} + function process_menu(menu) { for (var m in menu) { if (menu[m].label) { @@ -95,6 +106,8 @@ function process_menu(menu) { locations: [ filename ] }); } + if (menu[m].keywords) + process_keywords(menu[m].keywords); } } From d9a67b1f86ee68a29960cc755574e31bb83d0eb4 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Mon, 3 Feb 2020 10:55:29 +0100 Subject: [PATCH 093/942] manifest2po: Parse also documentation Closes #275 --- po/manifest2po | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/po/manifest2po b/po/manifest2po index 2dc691c..5376ef8 100755 --- a/po/manifest2po +++ b/po/manifest2po @@ -98,6 +98,15 @@ function process_keywords(keywords) { }); } +function process_docs(docs) { + docs.forEach(doc => { + push({ + msgid: doc.label, + locations: [ filename ] + }) + }); +} + function process_menu(menu) { for (var m in menu) { if (menu[m].label) { @@ -108,6 +117,8 @@ function process_menu(menu) { } if (menu[m].keywords) process_keywords(menu[m].keywords); + if (menu[m].docs) + process_docs(menu[m].docs); } } From fb8c3389abfafbb53de9daae4f2ea39bc8defa6f Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 29 Feb 2020 19:32:39 +0000 Subject: [PATCH 094/942] package.json: Update react package dependency Closes #286 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c95967c..07fbe94 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "core-js": "3.6.4", "node-sass": "4.13.1", - "react": "16.12.0", + "react": "16.13.0", "react-dom": "16.12.0" } } From a711f04195e670b93e95f00c897a108998ff516f Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Tue, 3 Mar 2020 20:28:09 +0000 Subject: [PATCH 095/942] package.json: Update react-dom package dependency Closes #287 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07fbe94..a87cb4b 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "core-js": "3.6.4", "node-sass": "4.13.1", "react": "16.13.0", - "react-dom": "16.12.0" + "react-dom": "16.13.0" } } From 696ef20f323cef83e845ccf1997a2e9c1ad599a3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 10 Mar 2020 09:47:16 +0100 Subject: [PATCH 096/942] Bump cockpit test API to 213 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fbda17a..e8c8c2c 100644 --- a/Makefile +++ b/Makefile @@ -144,7 +144,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest relese, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 208 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 213 git checkout --force FETCH_HEAD -- test/common git reset test/common From b0bf8afa48c3ea52b993225a6ec292f7e626def0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 10 Mar 2020 10:05:32 +0100 Subject: [PATCH 097/942] test: Trim package installation We don't need the full cockpit metapackage with cockpit-docker, etc. The starter-kit RPM will already pull in cockpit-system, so we just need cockpit-ws. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e8c8c2c..50dbf53 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ rpm: dist-gzip cockpit-$(PACKAGE_NAME).spec # build a VM with locally built rpm installed $(VM_IMAGE): rpm bots rm -f $(VM_IMAGE) $(VM_IMAGE).qcow2 - bots/image-customize -v -i cockpit -i `pwd`/cockpit-$(PACKAGE_NAME)-*$(VERSION)*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS) + bots/image-customize -v -i cockpit-ws -i `pwd`/cockpit-$(PACKAGE_NAME)-*$(VERSION)*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS) # convenience target for the above vm: $(VM_IMAGE) From 38bd17faef5a823ddf4931d2fd76b194aee8ff1d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 10 Mar 2020 10:34:35 +0100 Subject: [PATCH 098/942] Make cockpit-starter-kit.spec.in rpmspec compliant Use `%{VERSION}` as version macro instead of `@VERSION@`, so that the .spec.in file is syntactically a correct spec file that can be parsed with `rpmspec`. --- Makefile | 2 +- cockpit-starter-kit.spec.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 50dbf53..ff74dc7 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ dist/po.%.js: po/%.po $(NODE_MODULES_TEST) # %.spec: %.spec.in - sed -e 's/@VERSION@/$(VERSION)/g' $< > $@ + sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ $(WEBPACK_TEST): $(NODE_MODULES_TEST) $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS)) NODE_ENV=$(NODE_ENV) npm run build diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 48f5b17..0207242 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -1,5 +1,5 @@ Name: cockpit-starter-kit -Version: @VERSION@ +Version: %{VERSION} Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPLv2+ From 115e5a885ffb4811ab7860c6288e1a94715515be Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 10 Mar 2020 10:50:08 +0100 Subject: [PATCH 099/942] Makefile: Use proper file dependencies Avoid phony dependencies, as they break timestamp comparison and thus always cause rebuilding of the tarball, rpm, and (the very expensive) VM for each `make check`, even if only the tests (or nothing at all) changed. Use `rpmspec` to predict the name of the built rpm. Use the .spec.in file directly, as we can't depend on the generated .spec file in the variable definition. Closes #290 --- Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index ff74dc7..7caed7d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ ifeq ($(TEST_OS),) TEST_OS = centos-7 endif export TEST_OS +TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz +RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-starter-kit.spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -84,12 +86,14 @@ devel-install: $(WEBPACK_TEST) mkdir -p ~/.local/share/cockpit ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) +dist-gzip: $(TARFILE) + # when building a distribution tarball, call webpack with a 'production' environment # we don't ship node_modules for license and compactness reasons; we ship a # pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that # node_modules/ can be reconstructed if necessary) -dist-gzip: NODE_ENV=production -dist-gzip: all cockpit-$(PACKAGE_NAME).spec +$(TARFILE): NODE_ENV=production +$(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi mv node_modules node_modules.release touch -r package.json $(NODE_MODULES_TEST) @@ -99,13 +103,15 @@ dist-gzip: all cockpit-$(PACKAGE_NAME).spec $$(git ls-files) package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ mv node_modules.release node_modules -srpm: dist-gzip cockpit-$(PACKAGE_NAME).spec +srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_srcrpmdir `pwd`" \ cockpit-$(PACKAGE_NAME).spec -rpm: dist-gzip cockpit-$(PACKAGE_NAME).spec +rpm: $(RPMFILE) + +$(RPMFILE): $(TARFILE) cockpit-$(PACKAGE_NAME).spec mkdir -p "`pwd`/output" mkdir -p "`pwd`/rpmbuild" rpmbuild -bb \ @@ -119,11 +125,13 @@ rpm: dist-gzip cockpit-$(PACKAGE_NAME).spec find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \; rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" + # sanity check + test -e "$(RPMFILE)" # build a VM with locally built rpm installed -$(VM_IMAGE): rpm bots +$(VM_IMAGE): $(RPMFILE) bots rm -f $(VM_IMAGE) $(VM_IMAGE).qcow2 - bots/image-customize -v -i cockpit-ws -i `pwd`/cockpit-$(PACKAGE_NAME)-*$(VERSION)*.noarch.rpm -s $(CURDIR)/test/vm.install $(TEST_OS) + bots/image-customize -v -i cockpit-ws -i `pwd`/$(RPMFILE) -s $(CURDIR)/test/vm.install $(TEST_OS) # convenience target for the above vm: $(VM_IMAGE) From d544bda27102b25dcd02e8bdda9823e8bdb2228d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 10 Mar 2020 11:20:37 +0100 Subject: [PATCH 100/942] test: Use test scenario for selecting browser Similar to what cockpit-composer does. This is rather simplistic, but does fine until we need more complex scenarios. Also use plain shell in test/run, there are no bashisms. Closes #291 --- test/run | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/run b/test/run index 46a2d01..ed43e3a 100755 --- a/test/run +++ b/test/run @@ -1,4 +1,8 @@ -#! /bin/bash +#! /bin/sh +set -eu + # This is the expected entry point for Cockpit CI; will be called without -# arguments but with an appropriate $TEST_OS +# arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO + +[ -z "${TEST_SCENARIO:-}" ] || export TEST_BROWSER="$TEST_SCENARIO" make check From 1d0fd48e2d2c8c82f3a0f5586573ee4817b90d4a Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sun, 22 Mar 2020 14:01:12 +0000 Subject: [PATCH 101/942] package.json: Update react package dependency Closes #296 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a87cb4b..ddd5f18 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "dependencies": { "core-js": "3.6.4", "node-sass": "4.13.1", - "react": "16.13.0", + "react": "16.13.1", "react-dom": "16.13.0" } } From 7836502c6b0cbb43734be01331c7cee41356fa33 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 28 Mar 2020 19:38:31 +0000 Subject: [PATCH 102/942] package.json: Update react-dom package dependency Closes #298 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ddd5f18..a3cc6c0 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "core-js": "3.6.4", "node-sass": "4.13.1", "react": "16.13.1", - "react-dom": "16.13.0" + "react-dom": "16.13.1" } } From 30f646bfa18c3919c6977eb30f1fa8d1e0c05e8e Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Fri, 10 Apr 2020 01:48:40 +0000 Subject: [PATCH 103/942] package.json: Update core-js package dependency Closes #302 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a3cc6c0..750d2a0 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "core-js": "3.6.4", + "core-js": "3.6.5", "node-sass": "4.13.1", "react": "16.13.1", "react-dom": "16.13.1" From 744c1ddb6e96a27b723f50c088c2134fd705a918 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 25 Apr 2020 07:28:41 +0000 Subject: [PATCH 104/942] package.json: Update node-sass package dependency --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 750d2a0..cc09737 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "core-js": "3.6.5", - "node-sass": "4.13.1", + "node-sass": "4.14.0", "react": "16.13.1", "react-dom": "16.13.1" } From ccc8d7fc8973af5f9e7c62f8430bdeb9c250f131 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Thu, 7 May 2020 22:18:37 +0000 Subject: [PATCH 105/942] package.json: Update node-sass package dependency Closes #311 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc09737..d9ab2b1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "core-js": "3.6.5", - "node-sass": "4.14.0", + "node-sass": "4.14.1", "react": "16.13.1", "react-dom": "16.13.1" } From 8adad168747fc1032a1ea7976a7aa886ea893469 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Sat, 23 May 2020 07:51:00 +0200 Subject: [PATCH 106/942] Bump up version of test/common There has been a lot of improvements since 213 and also due to new privilege escalation this is need. Closes #317 --- Makefile | 4 ++-- test/vm.install | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7caed7d..ae129f5 100644 --- a/Makefile +++ b/Makefile @@ -150,9 +150,9 @@ bots: @echo "checked out bots/ ref $$(git -C bots rev-parse HEAD)" # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag -# when you start a new project, use the latest relese, and update it from time to time +# when you start a new project, use the latest release, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 213 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 219 git checkout --force FETCH_HEAD -- test/common git reset test/common diff --git a/test/vm.install b/test/vm.install index 55e548d..5241745 100644 --- a/test/vm.install +++ b/test/vm.install @@ -10,3 +10,6 @@ if type firewall-cmd >/dev/null 2>&1; then firewall-cmd --add-service=cockpit --permanent fi systemctl enable cockpit.socket + +# HACK: See https://github.com/cockpit-project/cockpit/issues/14133 +mkdir -p /usr/share/cockpit/packagekit From 96514e279e540c5a1cbea06f4a4ab29b42ddaf3a Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Thu, 28 May 2020 10:01:31 +0200 Subject: [PATCH 107/942] main: Stop importing patternfly.css * Stop importing cockpit's base1/patternfly.css This is deprecated API and will be dropped at some point, in favor of projects shipping their own CSS. Install and import the styles from PF4 now. * Use webpack based string replacement for removing the font-face rules from PF4 Doing the seddery in Makefile breaks `npm run build`, webpack watching, and is generally brittle. Do the font replacement hacking with `string-replace-loader`, which fits into webpack much more nicely. There is still some potential simplification by not duplicating the entire scss loader chain. Co-authored-by: Martin Pitt Closes #315 --- package.json | 7 ++-- src/app.jsx | 20 +++++++---- src/index.html | 3 +- src/index.js | 10 ++++++ src/lib/_fonts.scss | 36 +++++++++++++++++++ src/lib/patternfly-4-cockpit.scss | 14 ++++++++ src/lib/patternfly-4-overrides.scss | 43 ++++++++++++++++++++++ test/check-application | 8 ++--- webpack.config.js | 56 ++++++++++++++++++++++++++--- 9 files changed, 178 insertions(+), 19 deletions(-) create mode 100644 src/lib/_fonts.scss create mode 100644 src/lib/patternfly-4-cockpit.scss create mode 100644 src/lib/patternfly-4-overrides.scss diff --git a/package.json b/package.json index d9ab2b1..9a7cdee 100644 --- a/package.json +++ b/package.json @@ -33,19 +33,22 @@ "eslint-plugin-react": "^7.14.3", "eslint-plugin-react-hooks": "^2.1.2", "eslint-plugin-standard": "^4.0.1", - "mini-css-extract-plugin": "^0.9.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", + "mini-css-extract-plugin": "^0.9.0", + "node-sass": "4.14.1", "po2json": "^1.0.0-alpha", "sass-loader": "^7.0.3", "sizzle": "^2.3.3", "stdio": "^0.2.7", + "string-replace-loader": "^2.3.0", "webpack": "^4.17.1", "webpack-cli": "^3.1.0" }, "dependencies": { + "@patternfly/patternfly": "^2.71.6", + "@patternfly/react-core": "^3.158.1", "core-js": "3.6.5", - "node-sass": "4.14.1", "react": "16.13.1", "react-dom": "16.13.1" } diff --git a/src/app.jsx b/src/app.jsx index 1f671a9..9f17f50 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -19,6 +19,7 @@ import cockpit from 'cockpit'; import React from 'react'; +import { Alert, Card, CardHead, CardHeader, CardHeadMain, Title } from '@patternfly/react-core'; import './app.scss'; const _ = cockpit.gettext; @@ -35,12 +36,19 @@ export class Application extends React.Component { render() { return ( -
-

Starter Kit

-

- { cockpit.format(_("Running on $0"), this.state.hostname) } -

-
+ + + + Starter Kit + + + + + + ); } } diff --git a/src/index.html b/src/index.html index 5182d9b..62a2bf0 100644 --- a/src/index.html +++ b/src/index.html @@ -22,7 +22,6 @@ along with this package; If not, see . - @@ -30,7 +29,7 @@ along with this package; If not, see . - +
diff --git a/src/index.js b/src/index.js index 0a0e535..85fa0c4 100644 --- a/src/index.js +++ b/src/index.js @@ -17,11 +17,21 @@ * along with Cockpit; If not, see . */ +import "./lib/patternfly-4-cockpit.scss"; + import "core-js/stable"; import React from 'react'; import ReactDOM from 'react-dom'; import { Application } from './app.jsx'; +/* + * PF4 overrides need to come after the JSX components imports because + * these are importing CSS stylesheets that we are overriding + * Having the overrides here will ensure that when mini-css-extract-plugin will extract the CSS + * out of the dist/index.js and since it will maintain the order of the imported CSS, + * the overrides will be correctly in the end of our stylesheet. + */ +import "./lib/patternfly-4-overrides.scss"; document.addEventListener("DOMContentLoaded", function () { ReactDOM.render(React.createElement(Application, {}), document.getElementById('app')); diff --git a/src/lib/_fonts.scss b/src/lib/_fonts.scss new file mode 100644 index 0000000..b3cb18a --- /dev/null +++ b/src/lib/_fonts.scss @@ -0,0 +1,36 @@ +/* + * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/src/base1/_fonts.scss + */ + +@mixin printRedHatFont( +$weightValue: 400, +$weightName: "Regular", +$familyName: "RedHatText", +$style: "normal", +$relative: true +) { + $filePath: "../../static/fonts" + "/" + $familyName + "-" + $weightName; + @font-face { + font-family: $familyName; + src: url('#{$filePath}.woff2') format('woff2'); + font-style: #{$style}; + font-weight: $weightValue; + text-rendering: optimizeLegibility; + } +} + +@include printRedHatFont(700, "Bold", $familyName: "RedHatDisplay"); +@include printRedHatFont(700, "BoldItalic", $style: "italic", $familyName: "RedHatDisplay"); +@include printRedHatFont(300, "Black", $familyName: "RedHatDisplay"); +@include printRedHatFont(300, "BlackItalic", $style: "italic", $familyName: "RedHatDisplay"); +@include printRedHatFont(300, "Italic", $style: "italic", $familyName: "RedHatDisplay"); +@include printRedHatFont(400, "Medium", $familyName: "RedHatDisplay"); +@include printRedHatFont(400, "MediumItalic", $style: "italic", $familyName: "RedHatDisplay"); +@include printRedHatFont(300, "Regular", $familyName: "RedHatDisplay"); + +@include printRedHatFont(300, "Bold"); +@include printRedHatFont(300, "BoldItalic", $style: "italic"); +@include printRedHatFont(300, "Italic"); +@include printRedHatFont(700, "Medium"); +@include printRedHatFont(700, "MediumItalic", $style: "italic"); +@include printRedHatFont(400, "Regular"); diff --git a/src/lib/patternfly-4-cockpit.scss b/src/lib/patternfly-4-cockpit.scss new file mode 100644 index 0000000..40da84e --- /dev/null +++ b/src/lib/patternfly-4-cockpit.scss @@ -0,0 +1,14 @@ +/* + * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/src/base1/patternfly-4-cockpit.scss + */ + +/* Set fake font and icon path variables - we are going to indentify these through + * string replacement and remove the relevant font-face declarations + */ +$pf-global--font-path: 'patternfly-fonts-fake-path'; +$pf-global--fonticon-path: 'patternfly-icons-fake-path'; +$pf-global--disable-fontawesome: true !default; // Disable Font Awesome 5 Free +@import '@patternfly/patternfly/patternfly-base.scss'; + +/* Import our own fonts since the PF4 font-face rules are filtered out with patternfly.sed */ +@import "./fonts"; diff --git a/src/lib/patternfly-4-overrides.scss b/src/lib/patternfly-4-overrides.scss new file mode 100644 index 0000000..a02cb95 --- /dev/null +++ b/src/lib/patternfly-4-overrides.scss @@ -0,0 +1,43 @@ +/* + * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/pkg/lib/patternfly-4-overrides.scss + */ + +/*** PF4 overrides ***/ + +/* WORKAROUND: Override word-break bug */ +/* See: https://github.com/patternfly/patternfly-next/issues/2325 */ +.pf-c-table td { + word-break: normal; + overflow-wrap: break-word; +} + +/* WORKAROUND: Dropdown (PF4): Caret is not properly aligned bug */ +/* See: https://github.com/patternfly/patternfly/issues/2715 */ +/* Align the icons inside of all dropdown toggles. */ +/* Part 1 of 2 */ +.pf-c-dropdown__toggle-button { + display: flex; + align-items: center; +} + +/* Make split button dropdowns the same height as their sibling. */ +/* Part 2 of 2 */ +.pf-m-split-button { + align-items: stretch; +} + +/* WORKAROUND: Navigation problems with Tertiary Nav widget on mobile */ +/* See: https://github.com/patternfly/patternfly-design/issues/840 */ +/* Helper mod to wrap pf-c-nav__tertiary */ +.ct-m-nav__tertiary-wrap { + flex-wrap: wrap; + + .pf-c-nav__scroll-button { + display: none; + } +} + +/* Helper mod to center pf-c-nav__tertiary when it wraps */ +.ct-m-nav__tertiary-center { + justify-content: center; +} diff --git a/test/check-application b/test/check-application index 2ad5d68..c4068b2 100755 --- a/test/check-application +++ b/test/check-application @@ -20,16 +20,16 @@ class TestApplication(testlib.MachineCase): self.login_and_go("/starter-kit") # verify expected heading - b.wait_text(".container-fluid h2", "Starter Kit") + b.wait_text("h2.pf-c-title", "Starter Kit") # verify expected host name hostname = m.execute("hostname").strip() - b.wait_text(".container-fluid p", "Running on " + hostname) + b.wait_in_text("h4.pf-c-alert__title", "Running on " + hostname) # change current hostname m.execute("echo new-%s > /etc/hostname" % hostname) # verify new hostname name - b.wait_text(".container-fluid p", "Running on new-" + hostname) + b.wait_in_text("h4.pf-c-alert__title", "Running on new-" + hostname) # change language to German b.switch_to_top() @@ -48,7 +48,7 @@ class TestApplication(testlib.MachineCase): b.go("/starter-kit") b.enter_page("/starter-kit") # page label (from js) should be translated - b.wait_in_text(".container-fluid p", "Läuft auf") + b.wait_in_text("h4.pf-c-alert__title", "Läuft auf") if __name__ == '__main__': testlib.test_main() diff --git a/webpack.config.js b/webpack.config.js index 01973c4..dccce9d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -115,6 +115,9 @@ var babel_loader = { module.exports = { mode: production ? 'production' : 'development', + resolve: { + modules: [ nodedir ], + }, entry: info.entries, externals: externals, output: output, @@ -132,20 +135,63 @@ module.exports = { use: babel_loader, test: /\.(js|jsx)$/ }, + /* HACK: remove unwanted fonts from PatternFly's css */ { - exclude: /node_modules/, - test: /\.scss$/, + test: /patternfly-4-cockpit.scss$/, use: [ extract.loader, { loader: 'css-loader', - options: { url: false } + options: { + sourceMap: true, + url: false + } + }, + { + loader: 'string-replace-loader', + options: { + multiple: [ + { + search: /src:url\("patternfly-icons-fake-path\/pficon[^}]*/g, + replace: "src:url('fonts/patternfly.woff')format('woff');", + }, + { + search: /@font-face[^}]*patternfly-fonts-fake-path[^}]*}/g, + replace: '', + }, + ] + }, }, { loader: 'sass-loader', - } + options: { + sourceMap: true, + outputStyle: 'compressed', + }, + }, ] - } + }, + { + test: /\.s?css$/, + exclude: /patternfly-4-cockpit.scss/, + use: [ + extract.loader, + { + loader: 'css-loader', + options: { + sourceMap: true, + url: false + } + }, + { + loader: 'sass-loader', + options: { + sourceMap: true, + outputStyle: 'compressed', + }, + }, + ] + }, ] }, plugins: plugins From c083e8a7cfe817d38a7db01d2368b1899f0e9a12 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 28 May 2020 10:14:12 +0200 Subject: [PATCH 108/942] package.json: Fix versions Use ^ for node-sass, it's a development dependency. Drop the ^ for patternfly, as these are runtime dependencies controlled by our npm-update bot. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9a7cdee..339e787 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "htmlparser": "^1.7.7", "jed": "^1.1.1", "mini-css-extract-plugin": "^0.9.0", - "node-sass": "4.14.1", + "node-sass": "^4.14.1", "po2json": "^1.0.0-alpha", "sass-loader": "^7.0.3", "sizzle": "^2.3.3", @@ -46,8 +46,8 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@patternfly/patternfly": "^2.71.6", - "@patternfly/react-core": "^3.158.1", + "@patternfly/patternfly": "2.71.6", + "@patternfly/react-core": "3.158.1", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From c039821e185cc2078501aeb073f6ba0925dc185b Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 28 May 2020 10:18:30 +0200 Subject: [PATCH 109/942] README: Bump fedora version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4700153..09e4e5b 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ the VM, possibly with extra options for tracing and halting on test failures You can also run the test against a different Cockpit image, for example: - TEST_OS=fedora-28 make check + TEST_OS=fedora-32 make check # Vagrant From 4166f0a5d4aec7e398989a6b35d71c5a51a06cd8 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 28 May 2020 10:32:17 +0200 Subject: [PATCH 110/942] Use cockpit 220's test runner This will format the test output as TAP and thus provide nice log.html output. Closes #320 --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ae129f5..f8bfec0 100644 --- a/Makefile +++ b/Makefile @@ -138,8 +138,9 @@ vm: $(VM_IMAGE) echo $(VM_IMAGE) # run the browser integration tests; skip check for SELinux denials +# this will run all tests/check-* and format them as TAP check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common - TEST_AUDIT_NO_SELINUX=1 test/check-application + TEST_AUDIT_NO_SELINUX=1 test/common/run-tests # checkout Cockpit's bots for standard test VM images and API to launch them # must be from master, as only that has current and existing images; but testvm.py API is stable @@ -152,7 +153,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest release, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 219 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 220 git checkout --force FETCH_HEAD -- test/common git reset test/common From 5660330c4c34b6a14bc563c094bd152c18da166e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 29 May 2020 11:16:35 +0200 Subject: [PATCH 111/942] Drop Vagrantfile Nobody in the development team has ever really used that, it needs a ton of dependencies, and doesn't work in toolbox/Silverblue. Our own vm-run/image-customize etc. machinery is efficient enough, and proven to work. Closes #321 --- README.md | 8 -------- Vagrantfile | 30 ------------------------------ 2 files changed, 38 deletions(-) delete mode 100644 Vagrantfile diff --git a/README.md b/README.md index 09e4e5b..ceff4cc 100644 --- a/README.md +++ b/README.md @@ -80,14 +80,6 @@ You can also run the test against a different Cockpit image, for example: TEST_OS=fedora-32 make check -# Vagrant - -This directory contains a Vagrantfile that installs and starts cockpit on a -Fedora 26 cloud image. Run `vagrant up` to start it and `vagrant rsync` to -synchronize the `dist` directory to `/usr/local/share/cockit/starter-kit`. Use -`vagrant rsync-auto` to automatically sync when contents of the `dist` -directory change. - # Customizing After cloning the Starter Kit you should rename the files, package names, and diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index c446c94..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,30 +0,0 @@ -Vagrant.configure(2) do |config| - config.vm.box = "fedora/28-cloud-base" - config.vm.network "forwarded_port", guest: 9090, host: 9090 - - if Dir.glob("dist/*").length == 0 - config.vm.post_up_message = "NOTE: Distribution directory is empty. Run `make` to see your module show up in cockpit" - end - - config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder "dist/", "/usr/local/share/cockpit/" + File.basename(Dir.pwd), type: "rsync", create: true - - config.vm.provider "libvirt" do |libvirt| - libvirt.memory = 1024 - end - - config.vm.provider "virtualbox" do |virtualbox| - virtualbox.memory = 1024 - end - - config.vm.provision "shell", inline: <<-EOF - set -eu - - sudo dnf install -y cockpit - - printf "[WebService]\nAllowUnencrypted=true\n" > /etc/cockpit/cockpit.conf - - systemctl enable cockpit.socket - systemctl start cockpit.socket - EOF -end From 820549d86240a2c98cbbc72b2ca673a61b7154d1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 2 Jun 2020 08:44:49 +0200 Subject: [PATCH 112/942] test: Adjust to new navigation in Cockpit 220 The parent element `#navbar-dropdown` exists in both old and new versions. Closes #325 --- test/check-application | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/check-application b/test/check-application index c4068b2..38a28ae 100755 --- a/test/check-application +++ b/test/check-application @@ -33,7 +33,7 @@ class TestApplication(testlib.MachineCase): # change language to German b.switch_to_top() - b.click("#content-user-name") + b.click("#navbar-dropdown") b.click(".display-language-menu a") b.wait_popup('display-language') b.set_val("#display-language select", "de-de") From f2644bff9bd49363aa76ff69ddffe37f7bc72d0d Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sat, 13 Jun 2020 10:43:41 +0000 Subject: [PATCH 113/942] package.json: Update @patternfly/react-core package dependency Closes #329 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 339e787..cc88222 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "dependencies": { "@patternfly/patternfly": "2.71.6", - "@patternfly/react-core": "3.158.1", + "@patternfly/react-core": "3.158.3", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From 96dfac3862755cdbf2929b9f94cb60ef718ef693 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Tue, 23 Jun 2020 14:31:39 +0000 Subject: [PATCH 114/942] package.json: Update @patternfly/patternfly package dependency Closes #332 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc88222..17d3709 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "webpack-cli": "^3.1.0" }, "dependencies": { - "@patternfly/patternfly": "2.71.6", + "@patternfly/patternfly": "2.71.7", "@patternfly/react-core": "3.158.3", "core-js": "3.6.5", "react": "16.13.1", From f2a11ba1deecb44cf9944eafddd2aabf9f888aee Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Jun 2020 22:16:55 +0200 Subject: [PATCH 115/942] npm: Bump development dependencies Closes #334 --- package.json | 15 ++++++++------- webpack.config.js | 10 +++++++--- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 17d3709..10b4645 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-eslint": "^10.0.3", - "babel-loader": "^8.0.0", + "babel-loader": "^8.0.6", "chrome-remote-interface": "^0.28.0", - "compression-webpack-plugin": "^1.1.11", - "copy-webpack-plugin": "^4.5.2", + "compression-webpack-plugin": "^3.0.0", + "copy-webpack-plugin": "^5.0.3", "css-loader": "^3.0.0", "eslint": "^6.3.0", "eslint-config-standard": "^14.1.0", @@ -30,7 +30,7 @@ "eslint-plugin-import": "^2.18.2", "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.14.3", + "eslint-plugin-react": "^7.16.0", "eslint-plugin-react-hooks": "^2.1.2", "eslint-plugin-standard": "^4.0.1", "htmlparser": "^1.7.7", @@ -38,12 +38,13 @@ "mini-css-extract-plugin": "^0.9.0", "node-sass": "^4.14.1", "po2json": "^1.0.0-alpha", - "sass-loader": "^7.0.3", + "qunit": "^2.9.3", + "sass-loader": "^8.0.2", "sizzle": "^2.3.3", "stdio": "^0.2.7", "string-replace-loader": "^2.3.0", - "webpack": "^4.17.1", - "webpack-cli": "^3.1.0" + "webpack": "^4.35.3", + "webpack-cli": "^3.3.5" }, "dependencies": { "@patternfly/patternfly": "2.71.7", diff --git a/webpack.config.js b/webpack.config.js index dccce9d..2b2f3e3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -88,13 +88,13 @@ if (production) { output.filename = "[name].min.js"; plugins.unshift(new CompressionPlugin({ - asset: "[path].gz[query]", test: /\.(js|html)$/, minRatio: 0.9, deleteOriginalAssets: true })); } +/* keep this in sync with cockpit.git */ var babel_loader = { loader: "babel-loader", options: { @@ -165,8 +165,10 @@ module.exports = { { loader: 'sass-loader', options: { + sassOptions: { + outputStyle: 'compressed', + }, sourceMap: true, - outputStyle: 'compressed', }, }, ] @@ -186,8 +188,10 @@ module.exports = { { loader: 'sass-loader', options: { + sassOptions: { + outputStyle: 'compressed', + }, sourceMap: true, - outputStyle: 'compressed', }, }, ] From 2bb8e01d2d6bef6d715f508503c6a22963458f00 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 21 Jul 2020 10:33:48 +0200 Subject: [PATCH 116/942] Port to PatternFly 4.x Closes #343 --- package.json | 4 ++-- src/app.jsx | 14 +++++--------- test/check-application | 8 ++++---- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 10b4645..0388d71 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "2.71.7", - "@patternfly/react-core": "3.158.3", + "@patternfly/patternfly": "4.23.3", + "@patternfly/react-core": "4.32.1", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" diff --git a/src/app.jsx b/src/app.jsx index 9f17f50..fd9d3df 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -19,7 +19,7 @@ import cockpit from 'cockpit'; import React from 'react'; -import { Alert, Card, CardHead, CardHeader, CardHeadMain, Title } from '@patternfly/react-core'; +import { Alert, Card, CardTitle, CardBody } from '@patternfly/react-core'; import './app.scss'; const _ = cockpit.gettext; @@ -37,17 +37,13 @@ export class Application extends React.Component { render() { return ( - - - Starter Kit - - - + Starter Kit + - + ); } diff --git a/test/check-application b/test/check-application index 38a28ae..826e0ad 100755 --- a/test/check-application +++ b/test/check-application @@ -20,16 +20,16 @@ class TestApplication(testlib.MachineCase): self.login_and_go("/starter-kit") # verify expected heading - b.wait_text("h2.pf-c-title", "Starter Kit") + b.wait_text(".pf-c-card__title", "Starter Kit") # verify expected host name hostname = m.execute("hostname").strip() - b.wait_in_text("h4.pf-c-alert__title", "Running on " + hostname) + b.wait_in_text(".pf-c-alert__title", "Running on " + hostname) # change current hostname m.execute("echo new-%s > /etc/hostname" % hostname) # verify new hostname name - b.wait_in_text("h4.pf-c-alert__title", "Running on new-" + hostname) + b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname) # change language to German b.switch_to_top() @@ -48,7 +48,7 @@ class TestApplication(testlib.MachineCase): b.go("/starter-kit") b.enter_page("/starter-kit") # page label (from js) should be translated - b.wait_in_text("h4.pf-c-alert__title", "Läuft auf") + b.wait_in_text(".pf-c-alert__title", "Läuft auf") if __name__ == '__main__': testlib.test_main() From 49a721354c6ed79dfc49ed36756d265a1a2c3264 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 23 Jul 2020 18:04:54 +0200 Subject: [PATCH 117/942] Exclude node_modules from webpack watching This recently started to overflow inotify, and we don't need that -- it's fine to restart webpack when changing package.json, and it happens rarely enough. Closes #345 --- webpack.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 2b2f3e3..9929619 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -118,6 +118,9 @@ module.exports = { resolve: { modules: [ nodedir ], }, + watchOptions: { + ignored: /node_modules/, + }, entry: info.entries, externals: externals, output: output, From cd778dbe123c48d7540c34e261b2ec31097ec350 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Aug 2020 11:58:12 +0200 Subject: [PATCH 118/942] Bump Cockpit test API to 224 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f8bfec0..0273d5a 100644 --- a/Makefile +++ b/Makefile @@ -153,7 +153,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest release, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 220 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 224 git checkout --force FETCH_HEAD -- test/common git reset test/common From 7aa26f19ad35d3647fcf143dfb90cc8015aab344 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Aug 2020 11:59:26 +0200 Subject: [PATCH 119/942] travis: Move to Ubuntu 20.04 LTS Trusty, aka 14.04 LTS, is not officially supported any more. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e5d53fc..2b45223 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: bionic sudo: false language: node_js node_js: From fc4333b50e2eafd097c996320d7b2684109cd404 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Aug 2020 12:01:19 +0200 Subject: [PATCH 120/942] Makefile: Don't hardcode starter-kit in variable --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0273d5a..1325afa 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ TEST_OS = centos-7 endif export TEST_OS TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz -RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-starter-kit.spec.in).rpm +RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json From be1f24b8bc88a9a0747c37bf68b02df532b18aaf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 5 Aug 2020 12:01:49 +0200 Subject: [PATCH 121/942] metainfo: Fix launchable and update description `` must coincide with the actual URL path defined by the manifest. Remove the period from ``, as the spec [1] suggests. [1] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#sect-Metadata-GenericComponent Closes #350 --- org.cockpit-project.starter-kit.metainfo.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/org.cockpit-project.starter-kit.metainfo.xml b/org.cockpit-project.starter-kit.metainfo.xml index 3545eca..fb09a1a 100644 --- a/org.cockpit-project.starter-kit.metainfo.xml +++ b/org.cockpit-project.starter-kit.metainfo.xml @@ -3,14 +3,12 @@ org.cockpit_project.starter_kit CC0-1.0 Starter Kit - - Scaffolding for a cockpit module. - + Scaffolding for a cockpit module

Scaffolding for a cockpit module.

org.cockpit_project.cockpit - cockpit-starter-kit + starter-kit From 427f85795a16c1974e5ba7541e510b4005da0d81 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 19 Aug 2020 15:44:42 +0000 Subject: [PATCH 122/942] package.json: Update @patternfly/react-core package dependency Closes #355 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0388d71..9325ea1 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.23.3", - "@patternfly/react-core": "4.32.1", + "@patternfly/react-core": "4.40.4", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From 33d1b4425d7166de0efb5cc38dff3bd27b9c9564 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Thu, 27 Aug 2020 12:42:22 +0000 Subject: [PATCH 123/942] package.json: Update @patternfly/patternfly package dependency Closes #358 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9325ea1..1e16b2e 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.23.3", + "@patternfly/patternfly": "4.35.2", "@patternfly/react-core": "4.40.4", "core-js": "3.6.5", "react": "16.13.1", From 0ec0856e0e93eb6e029390814d20d739b7ea312e Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Sun, 30 Aug 2020 15:49:49 +0000 Subject: [PATCH 124/942] package.json: Update @patternfly/react-core package dependency Closes #359 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e16b2e..589477d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.35.2", - "@patternfly/react-core": "4.40.4", + "@patternfly/react-core": "4.47.0", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From 203604a463f900cfef0980a629ddfe9fb14c39ad Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Mon, 24 Aug 2020 11:47:44 +0200 Subject: [PATCH 125/942] Copy patternfly import files from cockpit project automatically Closes #357 --- .gitignore | 1 + .travis.yml | 3 +- Makefile | 11 ++++++-- src/index.js | 4 +-- src/lib/_fonts.scss | 36 ------------------------ src/lib/patternfly-4-cockpit.scss | 14 ---------- src/lib/patternfly-4-overrides.scss | 43 ----------------------------- 7 files changed, 13 insertions(+), 99 deletions(-) delete mode 100644 src/lib/_fonts.scss delete mode 100644 src/lib/patternfly-4-cockpit.scss delete mode 100644 src/lib/patternfly-4-overrides.scss diff --git a/.gitignore b/.gitignore index 32b6401..b28fd69 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,6 @@ Test*FAIL* bots/ test/common/ test/images/ +src/lib/patternfly/ *.pot POTFILES* diff --git a/.travis.yml b/.travis.yml index 2b45223..403be86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,4 @@ language: node_js node_js: - "8" script: - - npm install - - npm run build + - make diff --git a/Makefile b/Makefile index 1325afa..ead3972 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ dist/po.%.js: po/%.po $(NODE_MODULES_TEST) %.spec: %.spec.in sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ -$(WEBPACK_TEST): $(NODE_MODULES_TEST) $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS)) +$(WEBPACK_TEST): $(NODE_MODULES_TEST) src/lib/patternfly/_fonts.scss $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS)) NODE_ENV=$(NODE_ENV) npm run build watch: @@ -100,7 +100,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec touch dist/* tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in \ - $$(git ls-files) package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ + $$(git ls-files) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ mv node_modules.release node_modules srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec @@ -157,6 +157,13 @@ test/common: git checkout --force FETCH_HEAD -- test/common git reset test/common +src/lib/patternfly/_fonts.scss: + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227 + mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly + git checkout --force FETCH_HEAD -- pkg/lib/patternfly + git restore --staged pkg/lib/patternfly + mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib + $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages rm -f package-lock.json diff --git a/src/index.js b/src/index.js index 85fa0c4..b718ab6 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,7 @@ * along with Cockpit; If not, see . */ -import "./lib/patternfly-4-cockpit.scss"; +import "./lib/patternfly/patternfly-4-cockpit.scss"; import "core-js/stable"; @@ -31,7 +31,7 @@ import { Application } from './app.jsx'; * out of the dist/index.js and since it will maintain the order of the imported CSS, * the overrides will be correctly in the end of our stylesheet. */ -import "./lib/patternfly-4-overrides.scss"; +import "./lib/patternfly/patternfly-4-overrides.scss"; document.addEventListener("DOMContentLoaded", function () { ReactDOM.render(React.createElement(Application, {}), document.getElementById('app')); diff --git a/src/lib/_fonts.scss b/src/lib/_fonts.scss deleted file mode 100644 index b3cb18a..0000000 --- a/src/lib/_fonts.scss +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/src/base1/_fonts.scss - */ - -@mixin printRedHatFont( -$weightValue: 400, -$weightName: "Regular", -$familyName: "RedHatText", -$style: "normal", -$relative: true -) { - $filePath: "../../static/fonts" + "/" + $familyName + "-" + $weightName; - @font-face { - font-family: $familyName; - src: url('#{$filePath}.woff2') format('woff2'); - font-style: #{$style}; - font-weight: $weightValue; - text-rendering: optimizeLegibility; - } -} - -@include printRedHatFont(700, "Bold", $familyName: "RedHatDisplay"); -@include printRedHatFont(700, "BoldItalic", $style: "italic", $familyName: "RedHatDisplay"); -@include printRedHatFont(300, "Black", $familyName: "RedHatDisplay"); -@include printRedHatFont(300, "BlackItalic", $style: "italic", $familyName: "RedHatDisplay"); -@include printRedHatFont(300, "Italic", $style: "italic", $familyName: "RedHatDisplay"); -@include printRedHatFont(400, "Medium", $familyName: "RedHatDisplay"); -@include printRedHatFont(400, "MediumItalic", $style: "italic", $familyName: "RedHatDisplay"); -@include printRedHatFont(300, "Regular", $familyName: "RedHatDisplay"); - -@include printRedHatFont(300, "Bold"); -@include printRedHatFont(300, "BoldItalic", $style: "italic"); -@include printRedHatFont(300, "Italic"); -@include printRedHatFont(700, "Medium"); -@include printRedHatFont(700, "MediumItalic", $style: "italic"); -@include printRedHatFont(400, "Regular"); diff --git a/src/lib/patternfly-4-cockpit.scss b/src/lib/patternfly-4-cockpit.scss deleted file mode 100644 index 40da84e..0000000 --- a/src/lib/patternfly-4-cockpit.scss +++ /dev/null @@ -1,14 +0,0 @@ -/* - * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/src/base1/patternfly-4-cockpit.scss - */ - -/* Set fake font and icon path variables - we are going to indentify these through - * string replacement and remove the relevant font-face declarations - */ -$pf-global--font-path: 'patternfly-fonts-fake-path'; -$pf-global--fonticon-path: 'patternfly-icons-fake-path'; -$pf-global--disable-fontawesome: true !default; // Disable Font Awesome 5 Free -@import '@patternfly/patternfly/patternfly-base.scss'; - -/* Import our own fonts since the PF4 font-face rules are filtered out with patternfly.sed */ -@import "./fonts"; diff --git a/src/lib/patternfly-4-overrides.scss b/src/lib/patternfly-4-overrides.scss deleted file mode 100644 index a02cb95..0000000 --- a/src/lib/patternfly-4-overrides.scss +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Keep in sync with https://github.com/cockpit-project/cockpit/tree/master/pkg/lib/patternfly-4-overrides.scss - */ - -/*** PF4 overrides ***/ - -/* WORKAROUND: Override word-break bug */ -/* See: https://github.com/patternfly/patternfly-next/issues/2325 */ -.pf-c-table td { - word-break: normal; - overflow-wrap: break-word; -} - -/* WORKAROUND: Dropdown (PF4): Caret is not properly aligned bug */ -/* See: https://github.com/patternfly/patternfly/issues/2715 */ -/* Align the icons inside of all dropdown toggles. */ -/* Part 1 of 2 */ -.pf-c-dropdown__toggle-button { - display: flex; - align-items: center; -} - -/* Make split button dropdowns the same height as their sibling. */ -/* Part 2 of 2 */ -.pf-m-split-button { - align-items: stretch; -} - -/* WORKAROUND: Navigation problems with Tertiary Nav widget on mobile */ -/* See: https://github.com/patternfly/patternfly-design/issues/840 */ -/* Helper mod to wrap pf-c-nav__tertiary */ -.ct-m-nav__tertiary-wrap { - flex-wrap: wrap; - - .pf-c-nav__scroll-button { - display: none; - } -} - -/* Helper mod to center pf-c-nav__tertiary when it wraps */ -.ct-m-nav__tertiary-center { - justify-content: center; -} From cfced1900069ed816abd253938508c29e729b47d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 7 Sep 2020 14:36:21 +0200 Subject: [PATCH 126/942] Makefile: Serialize git cloning targets The `bots`, `test/common`, and `src/lib/patternfly` targets cannot be run in parallel, as they compete for the git lock. Serialize them by adding arbitrary dependencies to them. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index ead3972..e28e42e 100644 --- a/Makefile +++ b/Makefile @@ -164,6 +164,10 @@ src/lib/patternfly/_fonts.scss: git restore --staged pkg/lib/patternfly mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib +# force serialization of the targets that call git, as they compete for the git lock +bots: test/common +test/common: src/lib/patternfly/_fonts.scss + $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages rm -f package-lock.json From 080b20af94b10887f946d9bc98cd64f890bd02b1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 8 Sep 2020 18:53:12 +0200 Subject: [PATCH 127/942] Ensure application CSS has priority over library CSS Import our application CSS as the very last thing, so that it can properly override PatternFly variables. Before, our application CSS could land in the first third of dist/index.css *before* PatternFly's definitions, so that the latter overrode the former [1]. This is a long-standing bug in mini-css-extract-plugin ([2] and countless things that point to it) with `NODE_ENV=production` builds. As a workaround, make sure that app.scss is the absolutely last imported CSS, instead of "almost last". It is still conceptually correct for the application CSS to be able to override patternfly-4-overrides.scss. Closes #362 [1] https://github.com/martinpitt/performance-graphs/issues/10 [2] https://github.com/webpack-contrib/mini-css-extract-plugin/issues/188 --- src/app.jsx | 1 - src/index.js | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.jsx b/src/app.jsx index fd9d3df..c88d25e 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -20,7 +20,6 @@ import cockpit from 'cockpit'; import React from 'react'; import { Alert, Card, CardTitle, CardBody } from '@patternfly/react-core'; -import './app.scss'; const _ = cockpit.gettext; diff --git a/src/index.js b/src/index.js index b718ab6..11a1c9c 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,7 @@ import { Application } from './app.jsx'; * the overrides will be correctly in the end of our stylesheet. */ import "./lib/patternfly/patternfly-4-overrides.scss"; +import './app.scss'; document.addEventListener("DOMContentLoaded", function () { ReactDOM.render(React.createElement(Application, {}), document.getElementById('app')); From d7f9b03f3afbd279479a0ee324d2a3b16d5a3577 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Mon, 21 Sep 2020 12:19:25 +0200 Subject: [PATCH 128/942] test: Bump test/common to 228 On the login page the `Reuse password` checkbox was dropped and that makes all the tests to fail. See https://github.com/cockpit-project/cockpit/commit/ef97e7e9a28a Closes #366 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e28e42e..48f60b2 100644 --- a/Makefile +++ b/Makefile @@ -153,7 +153,7 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest release, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 224 + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 228 git checkout --force FETCH_HEAD -- test/common git reset test/common From 0a47c6f034cb81b71c441a44ec4a92d1343b5853 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Mon, 21 Sep 2020 07:14:27 +0000 Subject: [PATCH 129/942] package.json: Update @patternfly/react-core package dependency Closes #368 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 589477d..c28ff62 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.35.2", - "@patternfly/react-core": "4.47.0", + "@patternfly/react-core": "4.50.2", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From 661ca771b384e2a6e8685d99b2dba8c85a3e698f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 22 Sep 2020 07:51:54 +0200 Subject: [PATCH 130/942] Makefile: Replace `git restore` command This is a relatively recent git feature which is not present in e.g. Debian 9 yet. Use `git reset` instead, like in the test/common rule. Fixes #369 Closes #370 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48f60b2..47c2ec7 100644 --- a/Makefile +++ b/Makefile @@ -161,7 +161,7 @@ src/lib/patternfly/_fonts.scss: git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227 mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly git checkout --force FETCH_HEAD -- pkg/lib/patternfly - git restore --staged pkg/lib/patternfly + git reset -- pkg/lib/patternfly mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib # force serialization of the targets that call git, as they compete for the git lock From 6bd2f3ed94f86b3e5459947178bddbeb9473b263 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 21 Sep 2020 12:55:35 +0200 Subject: [PATCH 131/942] Makefile: Serialize git commands using flock We previously made directories depend on files for the synthetic serialization of git commands. git does not track directories, and time stamps across repos (starter-kit vs. bots) work rather poorly -- for example, this broke "bots" being a symlink to a previously existing checkout. Use file locking instead, which is a more direct way of ensuring that there is only one git operation that affects the current checkout. We don't need to flock bots/, as that's an independent git repository. Closes #371 --- Makefile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 47c2ec7..e81978a 100644 --- a/Makefile +++ b/Makefile @@ -153,21 +153,19 @@ bots: # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # when you start a new project, use the latest release, and update it from time to time test/common: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 228 - git checkout --force FETCH_HEAD -- test/common - git reset test/common + flock Makefile sh -ec '\ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 228; \ + git checkout --force FETCH_HEAD -- test/common; \ + git reset test/common' src/lib/patternfly/_fonts.scss: - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227 - mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly - git checkout --force FETCH_HEAD -- pkg/lib/patternfly - git reset -- pkg/lib/patternfly + flock Makefile sh -ec '\ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227; \ + mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly; \ + git checkout --force FETCH_HEAD -- pkg/lib/patternfly; \ + git reset -- pkg/lib/patternfly' mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib -# force serialization of the targets that call git, as they compete for the git lock -bots: test/common -test/common: src/lib/patternfly/_fonts.scss - $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages rm -f package-lock.json From 44b94eb59d85a82be8a8a13e5e2b77008f9a0958 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Thu, 24 Sep 2020 10:52:27 +0000 Subject: [PATCH 132/942] package.json: Update @patternfly/patternfly package dependency Closes #372 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c28ff62..ccb987c 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.35.2", + "@patternfly/patternfly": "4.42.2", "@patternfly/react-core": "4.50.2", "core-js": "3.6.5", "react": "16.13.1", From e4dc9d71184f283baa0041c7898485874013637a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 28 Sep 2020 07:35:03 +0200 Subject: [PATCH 133/942] travis: Move to current LTS node.js Version 8 is ancient and not supported any more, see https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ Newer versions of copy-webpack-plugin don't work any more with 8. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 403be86..97c7f91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,6 @@ dist: bionic sudo: false language: node_js node_js: - - "8" + - "lts/*" script: - make From a5ade152a811a48fec6af2b0a003757f7c36707b Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 28 Sep 2020 06:54:59 +0200 Subject: [PATCH 134/942] npm: Upgrade webpack related development dependencies compression-webpack-plugin fixes https://www.npmjs.com/advisories/1548 Adjust to new copy-webpack-plugin API. Thew new modules now create dist/index.html.gz in `NODE_ENV=production` mode, so switch `WEBPACK_TEST` to index.css instead (which remains uncompressed in both modes). --- Makefile | 2 +- package.json | 12 ++++++------ webpack.config.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e81978a..813e9d6 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran -WEBPACK_TEST=dist/index.html +WEBPACK_TEST=dist/index.css all: $(WEBPACK_TEST) diff --git a/package.json b/package.json index ccb987c..3188d64 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "babel-eslint": "^10.0.3", "babel-loader": "^8.0.6", "chrome-remote-interface": "^0.28.0", - "compression-webpack-plugin": "^3.0.0", - "copy-webpack-plugin": "^5.0.3", - "css-loader": "^3.0.0", + "compression-webpack-plugin": "^6.0.0", + "copy-webpack-plugin": "^6.1.0", + "css-loader": "^4.3.0", "eslint": "^6.3.0", "eslint-config-standard": "^14.1.0", "eslint-config-standard-react": "^9.2.0", @@ -35,13 +35,13 @@ "eslint-plugin-standard": "^4.0.1", "htmlparser": "^1.7.7", "jed": "^1.1.1", - "mini-css-extract-plugin": "^0.9.0", + "mini-css-extract-plugin": "^0.11.0", "node-sass": "^4.14.1", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", - "sass-loader": "^8.0.2", + "sass-loader": "^10.0.2", "sizzle": "^2.3.3", - "stdio": "^0.2.7", + "stdio": "^2.1.0", "string-replace-loader": "^2.3.0", "webpack": "^4.35.3", "webpack-cli": "^3.3.5" diff --git a/webpack.config.js b/webpack.config.js index 9929619..a0d9904 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -78,7 +78,7 @@ info.files.forEach(function(value) { info.files = files; var plugins = [ - new copy(info.files), + new copy({ patterns: info.files }), new extract({filename: "[name].css"}) ]; From 8f93db2234763a2d7ed2d5beaab56ff5b8ed8a69 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 28 Sep 2020 07:09:40 +0200 Subject: [PATCH 135/942] npm: Upgrade eslint to current major versions Closes #373 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 3188d64..29a11a6 100644 --- a/package.json +++ b/package.json @@ -22,16 +22,16 @@ "compression-webpack-plugin": "^6.0.0", "copy-webpack-plugin": "^6.1.0", "css-loader": "^4.3.0", - "eslint": "^6.3.0", - "eslint-config-standard": "^14.1.0", + "eslint": "^7.10.0", + "eslint-config-standard": "^14.1.1", "eslint-config-standard-react": "^9.2.0", - "eslint-loader": "^3.0.0", - "eslint-plugin-flowtype": "^4.3.0", - "eslint-plugin-import": "^2.18.2", - "eslint-plugin-node": "^10.0.0", + "eslint-loader": "^4.0.2", + "eslint-plugin-flowtype": "^5.2.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.16.0", - "eslint-plugin-react-hooks": "^2.1.2", + "eslint-plugin-react": "^7.21.2", + "eslint-plugin-react-hooks": "^4.1.2", "eslint-plugin-standard": "^4.0.1", "htmlparser": "^1.7.7", "jed": "^1.1.1", From 6f8cd78783614a1182347fd08512eca5a3329fc9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 29 Sep 2020 11:46:41 +0200 Subject: [PATCH 136/942] Use standard "translate" marker in HTML Cockpit's test-static-code complains about `translatable`, so let's use the correct attribute to avoid spreading it further. --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 62a2bf0..40e2687 100644 --- a/src/index.html +++ b/src/index.html @@ -17,7 +17,7 @@ along with this package; If not, see . --> - Cockpit Starter Kit + Cockpit Starter Kit From cbedf06704c162b590365ee814636ead69bffb90 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 29 Sep 2020 12:04:13 +0200 Subject: [PATCH 137/942] Fix building PO template The current version failed with Option "--directory" requires 1 arguments, but 0 were provided In the current stdio npm module version, getopt() now requires a `default:` attribute, otherwise it considers the options as required. Also sync PO helpers with current cockpit. Add PO template build to travis check, to make sure that it keeps working. Closes #375 --- .travis.yml | 1 + po/html2po | 4 ++-- po/manifest2po | 16 ++++++++++++---- po/po2json | 8 ++++---- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97c7f91..db62cff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,3 +5,4 @@ node_js: - "lts/*" script: - make + - make po/starter-kit.pot diff --git a/po/html2po b/po/html2po index 2c92897..8b34fa0 100755 --- a/po/html2po +++ b/po/html2po @@ -45,9 +45,9 @@ try { } var opts = stdio.getopt({ - directory: { key: "d", args: 1, description: "Base directory for input files" }, + directory: { key: "d", args: 1, description: "Base directory for input files", default: "." }, output: { key: "o", args: 1, description: "Output file" }, - from: { key: "f", args: 1, description: "File containing list of input files" }, + from: { key: "f", args: 1, description: "File containing list of input files", default: "" }, }); if (!opts.from && opts.args.length < 1) { diff --git a/po/manifest2po b/po/manifest2po index 5376ef8..9fc9ee5 100755 --- a/po/manifest2po +++ b/po/manifest2po @@ -26,9 +26,9 @@ try { } var opts = stdio.getopt({ - directory: { key: "d", args: 1, description: "Base directory for input files" }, + directory: { key: "d", args: 1, description: "Base directory for input files", default: "." }, output: { key: "o", args: 1, description: "Output file" }, - from: { key: "f", args: 1, description: "File containing list of input files" }, + from: { key: "f", args: 1, description: "File containing list of input files", default: "" }, }); if (!opts.from && opts.args.length < 1) { @@ -70,11 +70,19 @@ function step() { if (path.basename(filename) != "manifest.json") return step(); - fs.readFile(filename, { encoding: "utf-8"}, function(err, data) { + /* Qualify the filename if necessary */ + var full = filename; + if (opts.directory) + full = path.join(opts.directory, filename); + + fs.readFile(full, { encoding: "utf-8"}, function(err, data) { if (err) fatal(err.message); - process_manifest(JSON.parse(data)); + // There are variables which when not substituted can cause JSON.parse to fail + // Dummy replace them. None variable is going to be translated anyway + safe_data = data.replace(/\@.+?\@/gi, 1); + process_manifest(JSON.parse(safe_data)); return step(); }); diff --git a/po/po2json b/po/po2json index d2185a4..67cedde 100755 --- a/po/po2json +++ b/po/po2json @@ -46,10 +46,10 @@ function prepareHeader(header) { } /* A function for the front end */ - statement = header["plural-forms"]; + statement = header["plural-forms"]; if (statement[statement.length - 1] != ';') statement += ';'; - ret = 'function(n) {\nvar nplurals, plural;\n' + statement + '\nreturn plural;\n}'; + ret = 'function(n) {\nvar nplurals, plural;\n' + statement + '\nreturn plural;\n}'; /* Added back in later */ delete header["plural-forms"]; @@ -72,7 +72,7 @@ function prepareHeader(header) { /* Parse and process the po data */ function parse() { filename = opts.args[0]; - po2json.parseFile(opts.args[0], { "fuzzy": true }, function(err, jsonData) { + po2json.parseFile(opts.args[0], { "fuzzy": false }, function(err, jsonData) { var plurals, pos; if (err) @@ -117,7 +117,7 @@ function finish(data) { if (opts.output) { fs.writeFile(opts.output, data, function(err) { if (err) - fatal(err.message); + fatal(err.message); process.exit(0); }); } else { From 499eca014beaa5bfe519503c94ea4bdb66273c70 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Wed, 7 Oct 2020 11:53:33 +0000 Subject: [PATCH 138/942] package.json: Update @patternfly/react-core package dependency Closes #378 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 29a11a6..e6ed79d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.42.2", - "@patternfly/react-core": "4.50.2", + "@patternfly/react-core": "4.63.3", "core-js": "3.6.5", "react": "16.13.1", "react-dom": "16.13.1" From 2a51e057d771d4ad5944532472a9da3c7cc09ae9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 13 Oct 2020 08:04:37 +0200 Subject: [PATCH 139/942] Show how to run the release in GitHub workflow Enter the new world of GitHub actions [1]/GitLab pipelines [2]. This simplifies our end of the infrastructure considerably: * No need any more to set up webhooks, all the relevant configuration is right in the workflow file. * Does not need any infrastructure on our side any more, and thus works for third-party projects. They just need to set up their own secrets. * GitHub automatically provides a temporary `GITHUB_TOKEN` with sufficient write access to the project to publish a release, so we don't need to carry around that secret. Thus if your project only releases to GitHub, there is zero secrets management. Also adjust cockpituous-release a bit (update Fedora version, fix project name copy-pasta), point to the action workflow and necessary secrets. Closes #380 --- .github/workflows/release.yml.disabled | 35 ++++++++++++++++++++++++++ README.md | 10 ++++---- cockpituous-release | 20 +++++++++------ 3 files changed, 53 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/release.yml.disabled diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled new file mode 100644 index 0000000..e2249d0 --- /dev/null +++ b/.github/workflows/release.yml.disabled @@ -0,0 +1,35 @@ +name: release +on: + push: + tags: + # this is a glob, not a regexp + - '[0-9]*' +jobs: + cockpituous: + runs-on: ubuntu-latest + container: + image: docker.io/cockpit/release + steps: + - name: Set up configuration and secrets + run: | + # override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh + export HOME=$(getent passwd $(id -u) | cut -f6 -d:) + + # secrets come from https://github.com/organizations/ORGNAME/settings/secrets or https://github.com/OWNER/REPO/settings/secrets + # see https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets + echo '${{ secrets.SSH_KNOWN_HOSTS }}' > ~/.ssh/known_hosts + echo '${{ secrets.FEDPKG_SSH_PUBLIC }}' > ~/.ssh/id_rsa.pub + echo '${{ secrets.FEDPKG_SSH_PRIVATE }}' > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + # FIXME: Set your Fedora user account name here + echo 'yourfedorauser' > ~/.config/bodhi-user + echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token + echo '${{ secrets.COPR_TOKEN }}' > ~/.config/copr + echo '${{ secrets.FEDORA_PASSWORD }}' > ~/.fedora-password + + - name: Run cockpituous + run: | + # override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh + export HOME=$(getent passwd $(id -u) | cut -f6 -d:) + cd /build + release-runner -r https://github.com/$GITHUB_REPOSITORY -t $(basename $GITHUB_REF) ./cockpituous-release diff --git a/README.md b/README.md index ceff4cc..aa94315 100644 --- a/README.md +++ b/README.md @@ -96,12 +96,12 @@ that. [Cockpituous release](https://github.com/cockpit-project/cockpituous/tree aims to fully automate project releases to GitHub, Fedora, Ubuntu, COPR, Docker Hub, and other places. The intention is that the only manual step for releasing a project is to create a signed tag for the version number; pushing the tag -then triggers a GitHub webhook that calls a set of release scripts (on -Cockpit's CI infrastructure). +then triggers a [GitHub action](https://github.com/features/actions) that calls a set of release scripts. -starter-kit includes an example [cockpitous release script](./cockpituous-release) -that builds an upstream release tarball and source RPM. Please see the above -cockpituous documentation for details. +starter-kit includes an example [cockpitous release script](./cockpituous-release), +with detailed comments how to use it. There is also an +[example GitHub release action](.github/workflows/release.yml.disabled) to set +up secrets and run cockpituous. # Further reading diff --git a/cockpituous-release b/cockpituous-release index 19bcb99..f53ec27 100644 --- a/cockpituous-release +++ b/cockpituous-release @@ -1,4 +1,4 @@ -# This is a script run to release welder-web through Cockpituous: +# This is a script run to release this project through Cockpituous: # https://github.com/cockpit-project/cockpituous/tree/master/release # Anything that start with 'job' may run in a way that it SIGSTOP's @@ -6,6 +6,9 @@ # order to complete its work. # # Check cockpituous documentation for available release targets. +# +# This gets run through a GitHub action: enable and adjust +# .github/workflows/release.yml.disabled once you are ready. RELEASE_SOURCE="_release/source" RELEASE_SPEC="cockpit-starter-kit.spec" @@ -14,18 +17,21 @@ RELEASE_SRPM="_release/srpm" job release-source job release-srpm -V -# Once you have a Fedora package and add the https://pagure.io/user/cockpit -# user to your project's maintainers, you can also upload to Fedora automatically: +# Once you have a Fedora package, can upload to Fedora automatically: Provide the +# secrets in .github/workflows/release.yml on GitHub, and enable the following: -## Authenticate for pushing into Fedora dist-git (works in Cockpituous release container) -# cat ~/.fedora-password | kinit cockpit@FEDORAPROJECT.ORG +## Authenticate for pushing into Fedora dist-git +# cat ~/.fedora-password | kinit yourfedorauser@FEDORAPROJECT.ORG ## Do fedora builds for the tag, using tarball # job release-koji -k master -# job release-koji f29 -# job release-bodhi F29 +# job release-koji f33 +# job release-bodhi F33 # These are likely the first of your release targets; but run them after Fedora uploads, # so that failures there will fail the release early, before publishing on GitHub +# this needs no explicit secrets, just the GitHub action provided default one # job release-github + +# This needs secrets.COPR_TOKEN in .github/workflows/release.yml # job release-copr @myorg/myrepo From b6a10e5cfecf95a849ded2aeb7b0ba4d5ed3f5ea Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Mon, 12 Oct 2020 21:40:28 +0000 Subject: [PATCH 140/942] package.json: Update @patternfly/patternfly package dependency Closes #379 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e6ed79d..1b12514 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.42.2", + "@patternfly/patternfly": "4.50.4", "@patternfly/react-core": "4.63.3", "core-js": "3.6.5", "react": "16.13.1", From 7838cb70a9f3360e28490237707f3d32e5156c1a Mon Sep 17 00:00:00 2001 From: Cockpit Bots Date: Fri, 16 Oct 2020 22:07:15 +0200 Subject: [PATCH 141/942] package.json: Update react package dependency (#381) Closes #381 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1b12514..94e6947 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@patternfly/patternfly": "4.50.4", "@patternfly/react-core": "4.63.3", "core-js": "3.6.5", - "react": "16.13.1", + "react": "16.14.0", "react-dom": "16.13.1" } } From 8e16b06df2463cf4fe01aa931a680bf9bf2d18c2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Oct 2020 09:08:08 +0200 Subject: [PATCH 142/942] Run npm-update in a GitHub workflow This avoids a lot of moving parts in our infrastructure (webhook, npm-trigger roundtrip, tasks container), works in exactly the same way for independent third-party projects, and does not need *any* secret other than the automatically provided GitHub token. Let this run early every morning, roughly similar frequency as cockpituous used to do. Also add a manual trigger, so that we get a button to run it on demand. Closes #384 --- .github/workflows/npm-update.yml | 25 +++++++++++++++++++++++++ .tasks | 13 ------------- README.md | 8 ++++++++ 3 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/npm-update.yml delete mode 100755 .tasks diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml new file mode 100644 index 0000000..446e4df --- /dev/null +++ b/.github/workflows/npm-update.yml @@ -0,0 +1,25 @@ +name: npm-update +on: + schedule: + - cron: '0 2 * * *' + # can be run manually on https://github.com/cockpit-project/starter-kit/actions + workflow_dispatch: +jobs: + npm-update: + runs-on: ubuntu-latest + steps: + - name: Set up dependencies + run: sudo apt-get install -y npm make + + - name: Set up configuration and secrets + run: | + printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig + echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token + + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run npm-update bot + run: | + make bots + bots/npm-update diff --git a/.tasks b/.tasks deleted file mode 100755 index 2026460..0000000 --- a/.tasks +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -# When run automated, randomize to minimize stampeding herd -if [ -t 0 ]; then - chance=10 -else - chance=$(shuf -i 0-10 -n 1) -fi - -if [ $chance -gt 9 ]; then - # Open issues for things that need doing on a regular basis - bots/npm-trigger -fi diff --git a/README.md b/README.md index aa94315..1a4e6a2 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,14 @@ with detailed comments how to use it. There is also an [example GitHub release action](.github/workflows/release.yml.disabled) to set up secrets and run cockpituous. +# Automated maintenance + +It is important to keep your [NPM modules](./package.json) up to date, to keep +up with security updates and bug fixes. This is done with the +[npm-update bot script](https://github.com/cockpit-project/bots/blob/master/npm-update) +which is run weekly or upon [manual request](https://github.com/cockpit-project/starter-kit/actions) through the +[npm-update.yml](.github/workflows/npm-update.yml) [GitHub action](https://github.com/features/actions). + # Further reading * The [Starter Kit announcement](http://cockpit-project.org/blog/cockpit-starter-kit.html) From 29fb8b5c9844f0fd8b6ff149355c843ca3951434 Mon Sep 17 00:00:00 2001 From: Cockpituous Date: Mon, 19 Oct 2020 22:06:45 +0000 Subject: [PATCH 143/942] package.json: Update react-dom package dependency Closes #383 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94e6947..e6fafc9 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,6 @@ "@patternfly/react-core": "4.63.3", "core-js": "3.6.5", "react": "16.14.0", - "react-dom": "16.13.1" + "react-dom": "16.14.0" } } From 3703120a2338314820e5824e7e4cd676937028e8 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Wed, 28 Oct 2020 10:15:32 +0100 Subject: [PATCH 144/942] Makefile: Bump test/common to 230 Closes #385 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 813e9d6..a19c08e 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 228; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 230; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' From ea1377da1c9b6dd0b43216fd7339769889ace3eb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 17 Oct 2020 12:03:13 +0200 Subject: [PATCH 145/942] Travis: Move to Ubuntu 20.04 LTS --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index db62cff..ef8d75c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: bionic +dist: focal sudo: false language: node_js node_js: From 233b5cfe04142fb33d0f0c54b05206a85108ba7c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 17 Oct 2020 11:33:52 +0200 Subject: [PATCH 146/942] Use sassc instead of node-sass node-sass is a compiled ELF module, which is problematic for distributions that want to rebuild everything from source. The sassc CLI program is packaged everywhere, and both use the same libsass library. So drop node-sass and sass-loader, and replace it with a simple loader wrapper around sassc. This also saves 122 npm packages (16 MB in node_modules/). Closes #382 --- .travis.yml | 4 ++++ package.json | 2 -- src/lib/sassc-loader.js | 25 +++++++++++++++++++++++++ webpack.config.js | 23 +++++------------------ 4 files changed, 34 insertions(+), 20 deletions(-) create mode 100644 src/lib/sassc-loader.js diff --git a/.travis.yml b/.travis.yml index ef8d75c..bee776c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,10 @@ sudo: false language: node_js node_js: - "lts/*" +addons: + apt: + packages: + - sassc script: - make - make po/starter-kit.pot diff --git a/package.json b/package.json index e6fafc9..b197446 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,8 @@ "htmlparser": "^1.7.7", "jed": "^1.1.1", "mini-css-extract-plugin": "^0.11.0", - "node-sass": "^4.14.1", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", - "sass-loader": "^10.0.2", "sizzle": "^2.3.3", "stdio": "^2.1.0", "string-replace-loader": "^2.3.0", diff --git a/src/lib/sassc-loader.js b/src/lib/sassc-loader.js new file mode 100644 index 0000000..19ff806 --- /dev/null +++ b/src/lib/sassc-loader.js @@ -0,0 +1,25 @@ +const fs = require('fs'); +const path = require('path'); +const childProcess = require('child_process'); + +/* source is not used. This must be the first loader in the chain, using this.resource, so that sassc can include the scss file's directory in the include path */ +module.exports = function() { + this.cacheable(); + + const workdir = fs.mkdtempSync("sassc-loader."); + const out = path.join(workdir, "output.css"); + + childProcess.execFileSync( + 'sassc', + ['--load-path=node_modules', '--style=compressed', '--sourcemap', this.resource, out], + { stdio: ['pipe', 'stdio', 'stdio'] }); + + const css = fs.readFileSync(out, 'utf8'); + const cssmap = fs.readFileSync(out + ".map", 'utf8'); + + fs.unlinkSync(out); + fs.unlinkSync(out + ".map"); + fs.rmdirSync(workdir); + + this.callback(null, css, cssmap); +}; diff --git a/webpack.config.js b/webpack.config.js index a0d9904..386ea37 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -118,6 +118,9 @@ module.exports = { resolve: { modules: [ nodedir ], }, + resolveLoader: { + modules: [ nodedir, path.resolve(__dirname, 'src/lib') ], + }, watchOptions: { ignored: /node_modules/, }, @@ -165,15 +168,7 @@ module.exports = { ] }, }, - { - loader: 'sass-loader', - options: { - sassOptions: { - outputStyle: 'compressed', - }, - sourceMap: true, - }, - }, + 'sassc-loader', ] }, { @@ -188,15 +183,7 @@ module.exports = { url: false } }, - { - loader: 'sass-loader', - options: { - sassOptions: { - outputStyle: 'compressed', - }, - sourceMap: true, - }, - }, + 'sassc-loader', ] }, ] From fcab1935972cd99256438295a6f43762bf57397e Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 28 Oct 2020 02:30:09 +0000 Subject: [PATCH 147/942] package.json: Update @patternfly/patternfly package dependency Closes #387 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b197446..df79c5b 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.50.4", + "@patternfly/patternfly": "4.59.1", "@patternfly/react-core": "4.63.3", "core-js": "3.6.5", "react": "16.14.0", From 180dde395e1e55832c401484285611bd121d4608 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 27 Oct 2020 06:10:07 +0100 Subject: [PATCH 148/942] Makefile: Fix PO template generation dependencies *2po tools need the npm modules installed. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a19c08e..5f9e22b 100644 --- a/Makefile +++ b/Makefile @@ -38,10 +38,10 @@ po/POTFILES.html.in: mkdir -p $(dir $@) find src -name '*.html' > $@ -po/$(PACKAGE_NAME).html.pot: po/POTFILES.html.in +po/$(PACKAGE_NAME).html.pot: po/POTFILES.html.in $(NODE_MODULES_TEST) po/html2po -f $^ -o $@ -po/$(PACKAGE_NAME).manifest.pot: +po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot From 0ea06f92357da0794c89d085b5331ab2f1ce7364 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 26 Oct 2020 13:43:53 +0100 Subject: [PATCH 149/942] Run integration tests in Travis Travis now offers /dev/kvm, and its machines are powerful enough to run our browser integration tests, at least for small projects. Building an RPM on the Ubuntu host environment is a bit tricky, as there are no installed RPMs. Thus ignore the BuildRequires, and install appstream-util explicitly. In the future, the rpm/deb build should happen inside the VM (like Cockpit does). Add two scenarios for current Fedora and CentOS 8. Switch to the "minimal" environment to make the test easier to reproduce locally and more explicit. Closes #386 --- .travis.yml | 29 ++++++++++++++++++++++++----- README.md | 7 +++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index bee776c..3527496 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,31 @@ dist: focal -sudo: false -language: node_js -node_js: - - "lts/*" +sudo: true +language: minimal addons: apt: packages: + - appstream-util + - chromium-browser + - curl + - git + - libvirt-daemon-system + - npm + - python3-libvirt + - qemu-kvm + - qemu-utils + - rpm - sassc +env: + - TEST_OS=fedora-33 + - TEST_OS=centos-8-stream script: - - make + # HACK: /dev/kvm is root:kvm 0660 by default + - sudo chmod 666 /dev/kvm + + # test PO template generation - make po/starter-kit.pot + + # FIXME: build rpm inside VM; no installed rpms on Travis Ubuntu environment + - sed -i '/^BuildRequires:/d' *.spec.in + + - TEST_JOBS=$(nproc) make check diff --git a/README.md b/README.md index 1a4e6a2..5f191b6 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,13 @@ You can also run the test against a different Cockpit image, for example: TEST_OS=fedora-32 make check +These tests can be run in [Travis CI](https://travis-ci.com/). The included +[travis.yml](./.travis.yml) runs the integration tests for two operating +systems (Fedora and CentOS 8). Note that if/once your project grows bigger, or +gets frequent changes, you likely need to move to a paid account, or different +infrastructure with more capacity. Talk to the +[Cockpit developers](https://cockpit-project.org/) if you are interested in that. + # Customizing After cloning the Starter Kit you should rename the files, package names, and From 7dacf49b9a15f9e0f0cc603c049b339cf5c9a915 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 30 Oct 2020 02:17:04 +0000 Subject: [PATCH 150/942] package.json: Update @patternfly/react-core package dependency Closes #389 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df79c5b..d7b8d35 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.59.1", - "@patternfly/react-core": "4.63.3", + "@patternfly/react-core": "4.75.2", "core-js": "3.6.5", "react": "16.14.0", "react-dom": "16.14.0" From 92f009d4893f2062120eca5a9ff5f3c4761cdc46 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 7 Nov 2020 02:19:27 +0000 Subject: [PATCH 151/942] package.json: Update core-js package dependency Closes #392 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d7b8d35..f37093c 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@patternfly/patternfly": "4.59.1", "@patternfly/react-core": "4.75.2", - "core-js": "3.6.5", + "core-js": "3.7.0", "react": "16.14.0", "react-dom": "16.14.0" } From b49d1d48dc640793e2005f1245f9578ed5d0c819 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 19 Nov 2020 02:20:44 +0000 Subject: [PATCH 152/942] package.json: Update @patternfly/react-core package dependency Closes #393 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f37093c..4a2357c 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.59.1", - "@patternfly/react-core": "4.75.2", + "@patternfly/react-core": "4.79.2", "core-js": "3.7.0", "react": "16.14.0", "react-dom": "16.14.0" From 5f3c5c8436e41e6552a6813f21ec0591c4f00f7a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 20 Nov 2020 02:22:35 +0000 Subject: [PATCH 153/942] package.json: Update @patternfly/patternfly package dependency Closes #394 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a2357c..3deb8f1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.59.1", + "@patternfly/patternfly": "4.65.6", "@patternfly/react-core": "4.79.2", "core-js": "3.7.0", "react": "16.14.0", From c1c2d83b819d8629d8e841ce00d8770126d509bb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 25 Nov 2020 20:02:04 +0100 Subject: [PATCH 154/942] Bump test/common dependency to 233 This gets rid of the hack for . --- Makefile | 2 +- test/vm.install | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5f9e22b..8893a65 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 230; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 233; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' diff --git a/test/vm.install b/test/vm.install index 5241745..55e548d 100644 --- a/test/vm.install +++ b/test/vm.install @@ -10,6 +10,3 @@ if type firewall-cmd >/dev/null 2>&1; then firewall-cmd --add-service=cockpit --permanent fi systemctl enable cockpit.socket - -# HACK: See https://github.com/cockpit-project/cockpit/issues/14133 -mkdir -p /usr/share/cockpit/packagekit From d3d1df553347329a0d03eab6f6dd9d0fbf49430b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 26 Nov 2020 02:23:28 +0000 Subject: [PATCH 155/942] package.json: Update core-js package dependency Closes #397 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3deb8f1..9c98c7d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@patternfly/patternfly": "4.65.6", "@patternfly/react-core": "4.79.2", - "core-js": "3.7.0", + "core-js": "3.8.0", "react": "16.14.0", "react-dom": "16.14.0" } From 8ea62cb4d7e2ee5e0f31fb9dd159425d5d9b8e32 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 22 Nov 2020 12:11:12 +0100 Subject: [PATCH 156/942] webpack: Drop unnecessary output settings The default of `path` and `sourceMapFilename` are already what we want, no need to set them explicitly. The `output.filename` is already `[name].js`, and it's totally not important to name the file differently in production mode (it will then just be `index.js.gz`, compared to index.js in development mode). --- webpack.config.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 386ea37..28723ce 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,7 +12,6 @@ var externals = { /* These can be overridden, typically from the Makefile.am */ const srcdir = (process.env.SRCDIR || __dirname) + path.sep + "src"; const builddir = (process.env.SRCDIR || __dirname); -const distdir = builddir + path.sep + "dist"; const section = process.env.ONLYDIR || null; const nodedir = path.resolve((process.env.SRCDIR || __dirname), "node_modules"); @@ -31,12 +30,6 @@ var info = { ], }; -var output = { - path: distdir, - filename: "[name].js", - sourceMapFilename: "[file].map", -}; - /* * Note that we're avoiding the use of path.join as webpack and nodejs * want relative paths that start with ./ explicitly. @@ -84,9 +77,6 @@ var plugins = [ /* Only minimize when in production mode */ if (production) { - /* Rename output files when minimizing */ - output.filename = "[name].min.js"; - plugins.unshift(new CompressionPlugin({ test: /\.(js|html)$/, minRatio: 0.9, @@ -126,7 +116,6 @@ module.exports = { }, entry: info.entries, externals: externals, - output: output, devtool: "source-map", module: { rules: [ From 8aad356edb107cab09931ea85f381ea9f1248513 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 22 Nov 2020 12:19:38 +0100 Subject: [PATCH 157/942] webpack: Simplify externals declaration This is simple enough to be inline, and it's also not meant to be expanded: `cockpit` is the only legit external symbol, everything else ought to be bundled. --- webpack.config.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 28723ce..9ce0c4b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,10 +5,6 @@ const fs = require("fs"); const webpack = require("webpack"); const CompressionPlugin = require("compression-webpack-plugin"); -var externals = { - "cockpit": "cockpit", -}; - /* These can be overridden, typically from the Makefile.am */ const srcdir = (process.env.SRCDIR || __dirname) + path.sep + "src"; const builddir = (process.env.SRCDIR || __dirname); @@ -115,7 +111,8 @@ module.exports = { ignored: /node_modules/, }, entry: info.entries, - externals: externals, + // cockpit.js gets included via - + From 88fe99361be4f5ff3e646901f054fad749d7caa1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 26 Dec 2020 08:29:49 +0100 Subject: [PATCH 182/942] Simplify translation template `this.po` is not being used anywhere, so drop the whole `!loaded` code path. There is no defer mechanism, so `po.js` *must* be loaded after cockpit.js. Let's trigger a crash instead of silently dropping translations, to make such a bug obvious in manual and automatic tests. --- po/po.empty.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/po/po.empty.js b/po/po.empty.js index b27dad9..7c2d480 100644 --- a/po/po.empty.js +++ b/po/po.empty.js @@ -1,14 +1,2 @@ -(function (root, data) { - var loaded, module; - - /* Load into Cockpit locale */ - if (typeof cockpit === 'object') { - cockpit.locale(data) - loaded = true; - } - - if (!loaded) - root.po = data; - -/* The syntax of this line is important by po2json */ -}(this, {"":{"language":"en"}})); +/* The syntax of this line is important for po2json */ +cockpit.locale({"":{"language":"en"}}); From 07017f79d865281553fff0c258448a0a72c154ea Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 30 Dec 2020 10:08:48 +0100 Subject: [PATCH 183/942] Eliminate POTFILES.*.in files The `find` is so cheap that there is little point in the POTFILES.*.in indirection. --- Makefile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 8aac539..02338d2 100644 --- a/Makefile +++ b/Makefile @@ -21,25 +21,17 @@ all: $(WEBPACK_TEST) LINGUAS=$(basename $(notdir $(wildcard po/*.po))) -po/POTFILES.js.in: - mkdir -p $(dir $@) - find src/ -name '*.js' -o -name '*.jsx' > $@ - -po/$(PACKAGE_NAME).js.pot: po/POTFILES.js.in +po/$(PACKAGE_NAME).js.pot: xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \ --keyword=_:1,1t --keyword=_:1c,2,1t --keyword=C_:1c,2 \ --keyword=N_ --keyword=NC_:1c,2 \ --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 --files-from=$^ + --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') -po/POTFILES.html.in: - mkdir -p $(dir $@) - find src -name '*.html' > $@ - -po/$(PACKAGE_NAME).html.pot: po/POTFILES.html.in $(NODE_MODULES_TEST) - po/html2po -f $^ -o $@ +po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) + po/html2po -o $@ $$(find src -name '*.html') po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ From 7f6ef51c12a75591aa635ae125bf8e20f23e0027 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 5 Jan 2021 14:52:59 +0100 Subject: [PATCH 184/942] Build translations with webpack Convert the `po2json` script into a webpack plugin, and integrate the (now trivial) po.empty.js template. This is the last step for building the entire dist/ directory with `npm run build` (i.e. a tool that web developers are familiar with), and not having a split webpack+make toolchain any more. --- Makefile | 7 +- po/po.empty.js | 2 - po/po2json | 127 ----------------------------------- src/lib/cockpit-po-plugin.js | 74 ++++++++++++++++++++ webpack.config.js | 8 ++- 5 files changed, 81 insertions(+), 137 deletions(-) delete mode 100644 po/po.empty.js delete mode 100755 po/po2json create mode 100644 src/lib/cockpit-po-plugin.js diff --git a/Makefile b/Makefile index 02338d2..22361c7 100644 --- a/Makefile +++ b/Makefile @@ -45,11 +45,6 @@ update-po: po/$(PACKAGE_NAME).pot msgmerge --output-file=po/$$lang.po po/$$lang.po $<; \ done -dist/po.%.js: po/%.po $(NODE_MODULES_TEST) - mkdir -p $(dir $@) - po/po2json -m po/po.empty.js -o $@.js.tmp $< - mv $@.js.tmp $@ - # # Build/Install/dist # @@ -57,7 +52,7 @@ dist/po.%.js: po/%.po $(NODE_MODULES_TEST) %.spec: %.spec.in sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ -$(WEBPACK_TEST): $(NODE_MODULES_TEST) src/lib/patternfly/_fonts.scss $(shell find src/ -type f) package.json webpack.config.js $(patsubst %,dist/po.%.js,$(LINGUAS)) +$(WEBPACK_TEST): $(NODE_MODULES_TEST) src/lib/patternfly/_fonts.scss $(shell find src/ -type f) package.json webpack.config.js NODE_ENV=$(NODE_ENV) npm run build watch: diff --git a/po/po.empty.js b/po/po.empty.js deleted file mode 100644 index 7c2d480..0000000 --- a/po/po.empty.js +++ /dev/null @@ -1,2 +0,0 @@ -/* The syntax of this line is important for po2json */ -cockpit.locale({"":{"language":"en"}}); diff --git a/po/po2json b/po/po2json deleted file mode 100755 index 690d7d0..0000000 --- a/po/po2json +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env node - -function fatal(message, code) { - console.log((filename || "html2po") + ": " + message); - process.exit(code || 1); -} - -function usage() { - console.log("usage: po2json [--module=template.js] [--output=output.js] input"); - process.exit(2); -} - -var fs, po2json, Jed, stdio; - -try { - fs = require('fs'); - po2json = require('po2json'); - Jed = require('jed'); - stdio = require('stdio'); -} catch(ex) { - fatal(ex.message, 127); /* missing looks for this */ -} - -var argi = 2; -var filename = null; - -var opts = stdio.getopt({ - module: { key: "m", args: 1, description: "Module template to include", default: "" }, - output: { key: "o", args: 1, description: "Output file", default: "" }, -}); - -if (!opts.args || opts.args.length != 1) { - usage(); -} - -parse(); - -function prepareHeader(header) { - var body, statement, plurals = header["plural-forms"], ret = null; - if (plurals) { - try { - /* Check that the plural forms isn't being sneaky since we build a function here */ - Jed.PF.parse(plurals); - } catch(ex) { - fatal("bad plural forms: " + ex.message, 1); - } - - /* A function for the front end */ - statement = header["plural-forms"]; - if (statement[statement.length - 1] != ';') - statement += ';'; - ret = 'function(n) {\nvar nplurals, plural;\n' + statement + '\nreturn plural;\n}'; - - /* Added back in later */ - delete header["plural-forms"]; - } - - /* We don't need to be transferring this */ - delete header["project-id-version"]; - delete header["report-msgid-bugs-to"]; - delete header["pot-creation-date"]; - delete header["po-revision-date"]; - delete header["last-translator"]; - delete header["language-team"]; - delete header["mime-version"]; - delete header["content-type"]; - delete header["content-transfer-encoding"]; - - return ret; -} - -/* Parse and process the po data */ -function parse() { - filename = opts.args[0]; - po2json.parseFile(opts.args[0], { "fuzzy": false }, function(err, jsonData) { - var plurals, pos; - - if (err) - fatal(err.message); - - var header = jsonData[""]; - if (header) - plurals = prepareHeader(header); - - var data = JSON.stringify(jsonData, null, 1); - - /* We know the brace in is the location to insert our function */ - if (plurals) { - pos = data.indexOf('{', 1); - data = data.substr(0, pos + 1) + "'plural-forms':" + String(plurals) + "," + data.substr(pos + 1); - } - - if (data == JSON.stringify({})) - finish(""); - else - wrap(data); - }); -} - -/* Wrap the data if desired */ -function wrap(data) { - if (opts.module) { - filename = opts.module; - fs.readFile(opts.module, { encoding: "utf-8" }, function(err, template) { - if (err) - fatal(err.message); - data = template.replace('{"":{"language":"en"}}', data); - finish(data); - }); - } else { - finish(data); - } -} - -/* Write it out */ -function finish(data) { - if (opts.output) { - fs.writeFile(opts.output, data, function(err) { - if (err) - fatal(err.message); - process.exit(0); - }); - } else { - process.stdout.write(data); - process.exit(0); - } -} diff --git a/src/lib/cockpit-po-plugin.js b/src/lib/cockpit-po-plugin.js new file mode 100644 index 0000000..4cf0f28 --- /dev/null +++ b/src/lib/cockpit-po-plugin.js @@ -0,0 +1,74 @@ +const path = require("path"); +const glob = require("glob"); +const po2json = require('po2json'); +const Jed = require('jed'); + +module.exports = class { + apply(compiler) { + compiler.hooks.emit.tapPromise( + 'CockpitPoPlugin', + compilation => Promise.all(glob.sync('po/*.po').map(f => this.buildFile(f, compilation))) + ); + } + + prepareHeader(header) { + if (!header) + return null; + + var body, statement, ret = null; + const plurals = header["plural-forms"]; + + if (plurals) { + try { + /* Check that the plural forms isn't being sneaky since we build a function here */ + Jed.PF.parse(plurals); + } catch(ex) { + fatal("bad plural forms: " + ex.message, 1); + } + + /* A function for the front end */ + statement = header["plural-forms"]; + if (statement[statement.length - 1] != ';') + statement += ';'; + ret = 'function(n) {\nvar nplurals, plural;\n' + statement + '\nreturn plural;\n}'; + + /* Added back in later */ + delete header["plural-forms"]; + } + + /* We don't need to be transferring this */ + delete header["project-id-version"]; + delete header["report-msgid-bugs-to"]; + delete header["pot-creation-date"]; + delete header["po-revision-date"]; + delete header["last-translator"]; + delete header["language-team"]; + delete header["mime-version"]; + delete header["content-type"]; + delete header["content-transfer-encoding"]; + + return ret; + } + + buildFile(po_file, compilation) { + return new Promise((resolve, reject) => { + const jsonData = po2json.parseFileSync(po_file); + const plurals = this.prepareHeader(jsonData[""]); + + let output = JSON.stringify(jsonData, null, 1); + + // We know the brace in is the location to insert our function + if (plurals) { + pos = output.indexOf('{', 1); + output = output.substr(0, pos + 1) + "'plural-forms':" + String(plurals) + "," + output.substr(pos + 1); + } + + // wrap JSON output into cockpit.locale() call + output = 'cockpit.locale(' + output + ');\n'; + + const lang = path.basename(po_file).slice(0, -3) + compilation.assets['po.' + lang + '.js'] = { source: () => output, size: () => output.length }; + resolve(); + }); + }; +}; diff --git a/webpack.config.js b/webpack.config.js index 92035c3..f02c0b9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,11 +1,14 @@ const path = require("path"); const childProcess = require('child_process'); + const copy = require("copy-webpack-plugin"); const extract = require("mini-css-extract-plugin"); const TerserJSPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); -const webpack = require("webpack"); const CompressionPlugin = require("compression-webpack-plugin"); +const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); + +const webpack = require("webpack"); const nodedir = path.resolve((process.env.SRCDIR || __dirname), "node_modules"); @@ -20,7 +23,8 @@ const copy_files = [ const plugins = [ new copy({ patterns: copy_files }), - new extract({filename: "[name].css"}) + new extract({filename: "[name].css"}), + new CockpitPoPlugin(), ]; /* Only minimize when in production mode */ From e418cba057114553dd81626b3ae9dde902436625 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Jan 2021 08:11:22 +0100 Subject: [PATCH 185/942] cockpit-po-plugin: Fix crash with plural forms Declare the `pos` variable. Fixes regression introduced in commit 7f6ef51c12a7. Add plural forms to German translations to exercise this code path. --- po/de.po | 1 + src/lib/cockpit-po-plugin.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/po/de.po b/po/de.po index cc551d7..91b4e60 100644 --- a/po/de.po +++ b/po/de.po @@ -12,6 +12,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1\n" #: src/index.html:20 msgid "Cockpit Starter Kit" diff --git a/src/lib/cockpit-po-plugin.js b/src/lib/cockpit-po-plugin.js index 4cf0f28..221a6ca 100644 --- a/src/lib/cockpit-po-plugin.js +++ b/src/lib/cockpit-po-plugin.js @@ -59,7 +59,7 @@ module.exports = class { // We know the brace in is the location to insert our function if (plurals) { - pos = output.indexOf('{', 1); + const pos = output.indexOf('{', 1); output = output.substr(0, pos + 1) + "'plural-forms':" + String(plurals) + "," + output.substr(pos + 1); } From 786fd20df5e08a2db5e656c95e3fbfb4adad3a09 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 20 Jan 2021 03:22:50 +0000 Subject: [PATCH 186/942] package.json: Update core-js package dependency Closes #415 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2c14522..321d411 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dependencies": { "@patternfly/patternfly": "4.70.2", "@patternfly/react-core": "4.84.4", - "core-js": "3.8.2", + "core-js": "3.8.3", "react": "16.14.0", "react-dom": "16.14.0" } From bb064229967f8f1d65c160646ef3ef081cfa62e7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 22 Jan 2021 16:04:35 +0100 Subject: [PATCH 187/942] Use Cockpit webpack helpers from cockpit.git Drop the cockpit-po-plugin.js and sassc-loader.js code copies, and check them out from a stable cockpit tag, similarly to how we already get the PatternFly CSS. --- .gitignore | 2 +- Makefile | 18 +++++---- src/lib/cockpit-po-plugin.js | 74 ------------------------------------ src/lib/sassc-loader.js | 25 ------------ 4 files changed, 11 insertions(+), 108 deletions(-) delete mode 100644 src/lib/cockpit-po-plugin.js delete mode 100644 src/lib/sassc-loader.js diff --git a/.gitignore b/.gitignore index b28fd69..59b5f3d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ Test*FAIL* bots/ test/common/ test/images/ -src/lib/patternfly/ +src/lib/ *.pot POTFILES* diff --git a/Makefile b/Makefile index 22361c7..5e8353c 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran WEBPACK_TEST=dist/manifest.json +# one example file in src/lib to check if it was already checked out +LIB_TEST=src/lib/cockpit-po-plugin.js all: $(WEBPACK_TEST) @@ -52,7 +54,7 @@ update-po: po/$(PACKAGE_NAME).pot %.spec: %.spec.in sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ -$(WEBPACK_TEST): $(NODE_MODULES_TEST) src/lib/patternfly/_fonts.scss $(shell find src/ -type f) package.json webpack.config.js +$(WEBPACK_TEST): $(NODE_MODULES_TEST) $(LIB_TEST) $(shell find src/ -type f) package.json webpack.config.js NODE_ENV=$(NODE_ENV) npm run build watch: @@ -87,7 +89,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec touch dist/* tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in \ - $$(git ls-files) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ + $$(git ls-files) $(LIB_TEST) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ mv node_modules.release node_modules srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec @@ -145,13 +147,13 @@ test/common: git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' -src/lib/patternfly/_fonts.scss: +# checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag +$(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 227; \ - mkdir -p pkg/lib/patternfly && git add pkg/lib/patternfly; \ - git checkout --force FETCH_HEAD -- pkg/lib/patternfly; \ - git reset -- pkg/lib/patternfly' - mkdir -p src/lib && mv pkg/lib/patternfly src/lib/patternfly && rmdir -p pkg/lib + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 236; \ + git checkout --force FETCH_HEAD -- pkg/lib; \ + git reset -- pkg/lib' + mv pkg/lib src/ && rmdir -p pkg $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages diff --git a/src/lib/cockpit-po-plugin.js b/src/lib/cockpit-po-plugin.js deleted file mode 100644 index 221a6ca..0000000 --- a/src/lib/cockpit-po-plugin.js +++ /dev/null @@ -1,74 +0,0 @@ -const path = require("path"); -const glob = require("glob"); -const po2json = require('po2json'); -const Jed = require('jed'); - -module.exports = class { - apply(compiler) { - compiler.hooks.emit.tapPromise( - 'CockpitPoPlugin', - compilation => Promise.all(glob.sync('po/*.po').map(f => this.buildFile(f, compilation))) - ); - } - - prepareHeader(header) { - if (!header) - return null; - - var body, statement, ret = null; - const plurals = header["plural-forms"]; - - if (plurals) { - try { - /* Check that the plural forms isn't being sneaky since we build a function here */ - Jed.PF.parse(plurals); - } catch(ex) { - fatal("bad plural forms: " + ex.message, 1); - } - - /* A function for the front end */ - statement = header["plural-forms"]; - if (statement[statement.length - 1] != ';') - statement += ';'; - ret = 'function(n) {\nvar nplurals, plural;\n' + statement + '\nreturn plural;\n}'; - - /* Added back in later */ - delete header["plural-forms"]; - } - - /* We don't need to be transferring this */ - delete header["project-id-version"]; - delete header["report-msgid-bugs-to"]; - delete header["pot-creation-date"]; - delete header["po-revision-date"]; - delete header["last-translator"]; - delete header["language-team"]; - delete header["mime-version"]; - delete header["content-type"]; - delete header["content-transfer-encoding"]; - - return ret; - } - - buildFile(po_file, compilation) { - return new Promise((resolve, reject) => { - const jsonData = po2json.parseFileSync(po_file); - const plurals = this.prepareHeader(jsonData[""]); - - let output = JSON.stringify(jsonData, null, 1); - - // We know the brace in is the location to insert our function - if (plurals) { - const pos = output.indexOf('{', 1); - output = output.substr(0, pos + 1) + "'plural-forms':" + String(plurals) + "," + output.substr(pos + 1); - } - - // wrap JSON output into cockpit.locale() call - output = 'cockpit.locale(' + output + ');\n'; - - const lang = path.basename(po_file).slice(0, -3) - compilation.assets['po.' + lang + '.js'] = { source: () => output, size: () => output.length }; - resolve(); - }); - }; -}; diff --git a/src/lib/sassc-loader.js b/src/lib/sassc-loader.js deleted file mode 100644 index aeffd6a..0000000 --- a/src/lib/sassc-loader.js +++ /dev/null @@ -1,25 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const childProcess = require('child_process'); - -/* source is not used. This must be the first loader in the chain, using this.resource, so that sassc can include the scss file's directory in the include path */ -module.exports = function() { - this.cacheable(); - - const workdir = fs.mkdtempSync("sassc-loader."); - const out = path.join(workdir, "output.css"); - - childProcess.execFileSync( - 'sassc', - ['--load-path=node_modules', '--style=compressed', '--sourcemap', this.resource, out], - { stdio: ['pipe', 'inherit', 'inherit'] }); - - const css = fs.readFileSync(out, 'utf8'); - const cssmap = fs.readFileSync(out + ".map", 'utf8'); - - fs.unlinkSync(out); - fs.unlinkSync(out + ".map"); - fs.rmdirSync(workdir); - - this.callback(null, css, cssmap); -}; From 4c3d90d3b3a3d6f40358ecdceca001b31b9f4d99 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 26 Jan 2021 05:25:40 +0100 Subject: [PATCH 188/942] Run tests on Cirrus CI, drop Travis (#416) Travis stopped handing out free credits since their plan changes last November, so tests have not run since then. Cirrus CI offers an API similar to Travis, and also explicitly supports /dev/kvm access. Eventually we want to use the cockpit/tasks container directly. But we can't fix the /dev/kvm permissions inside that as `sudo` does not work in that. Once we fix that, the setup will become much cheaper and simpler. --- .cirrus.yml | 23 +++++++++++++++++++++++ .travis.yml | 31 ------------------------------- README.md | 20 +++++++++++++------- 3 files changed, 36 insertions(+), 38 deletions(-) create mode 100644 .cirrus.yml delete mode 100644 .travis.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 0000000..df2a5d6 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,23 @@ +container: + # We should use quay.io/cockpit/tasks here and avoid package installation, but we can't currently run sudo in that container to fix /dev/kvm permissions + image: docker.io/fedora + kvm: true + # increase this if you have many tests that benefit from parallelism + cpu: 1 + +test_task: + env: + matrix: + - TEST_OS: fedora-33 + - TEST_OS: centos-8-stream + + setup_script: + - chmod 666 /dev/kvm + - dnf install -y chromium-headless curl git libappstream-glib libvirt-daemon-kvm libvirt-client libvirt-python3 make npm rpm-build rpmdevtools sassc tar + - useradd build + - chown -R build:build . + + # test PO template generation + pot_build_script: su -c 'make po/starter-kit.pot' build + + check_script: su -c "TEST_JOBS=$(nproc) TEST_OS=$TEST_OS make check" build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3527496..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -dist: focal -sudo: true -language: minimal -addons: - apt: - packages: - - appstream-util - - chromium-browser - - curl - - git - - libvirt-daemon-system - - npm - - python3-libvirt - - qemu-kvm - - qemu-utils - - rpm - - sassc -env: - - TEST_OS=fedora-33 - - TEST_OS=centos-8-stream -script: - # HACK: /dev/kvm is root:kvm 0660 by default - - sudo chmod 666 /dev/kvm - - # test PO template generation - - make po/starter-kit.pot - - # FIXME: build rpm inside VM; no installed rpms on Travis Ubuntu environment - - sed -i '/^BuildRequires:/d' *.spec.in - - - TEST_JOBS=$(nproc) make check diff --git a/README.md b/README.md index 5f191b6..33bd097 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Violations of some rules can be fixed automatically by: Rules configuration can be found in the `.eslintrc.json` file. -# Automated Testing +# Running tests locally Run `make check` to build an RPM, install it into a standard Cockpit test VM (centos-7 by default), and run the test/check-application integration test on @@ -80,12 +80,18 @@ You can also run the test against a different Cockpit image, for example: TEST_OS=fedora-32 make check -These tests can be run in [Travis CI](https://travis-ci.com/). The included -[travis.yml](./.travis.yml) runs the integration tests for two operating -systems (Fedora and CentOS 8). Note that if/once your project grows bigger, or -gets frequent changes, you likely need to move to a paid account, or different -infrastructure with more capacity. Talk to the -[Cockpit developers](https://cockpit-project.org/) if you are interested in that. +# Running tests in CI + +These tests can be run in [Cirrus CI](https://cirrus-ci.org/), on their free +[Linux Containers](https://cirrus-ci.org/guide/linux/) environment which +explicitly supports `/dev/kvm`. Please see [Quick +Start](https://cirrus-ci.org/guide/quick-start/) how to set up Cirrus CI for +your project after forking from starter-kit. + +The included [.cirrus.yml](./.cirrus.yml) runs the integration tests for two +operating systems (Fedora and CentOS 8). Note that if/once your project grows +bigger, or gets frequent changes, you may need to move to a paid account, or +different infrastructure with more capacity. # Customizing From e031456805d769883b994339f9b8ee988fa94f19 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 26 Jan 2021 07:59:19 +0100 Subject: [PATCH 189/942] tests: Use cockpit/tasks container in Cirrus CI This avoids the lengthy (and potentially brittle) installation of dependencies and having to create an unprivileged user. Since [1] the tasks container can now fix /dev/kvm permissions. [1] https://github.com/cockpit-project/cockpituous/pull/366 --- .cirrus.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index df2a5d6..4a0c6df 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,6 +1,8 @@ container: - # We should use quay.io/cockpit/tasks here and avoid package installation, but we can't currently run sudo in that container to fix /dev/kvm permissions - image: docker.io/fedora + # official cockpit CI container, with cockpit related build and test dependencies + # if you want to use your own, see the documentation about required packages: + # https://github.com/cockpit-project/cockpit/blob/master/HACKING.md#getting-the-development-dependencies + image: quay.io/cockpit/tasks kvm: true # increase this if you have many tests that benefit from parallelism cpu: 1 @@ -11,13 +13,9 @@ test_task: - TEST_OS: fedora-33 - TEST_OS: centos-8-stream - setup_script: - - chmod 666 /dev/kvm - - dnf install -y chromium-headless curl git libappstream-glib libvirt-daemon-kvm libvirt-client libvirt-python3 make npm rpm-build rpmdevtools sassc tar - - useradd build - - chown -R build:build . + fix_kvm_script: sudo chmod 666 /dev/kvm # test PO template generation - pot_build_script: su -c 'make po/starter-kit.pot' build + pot_build_script: make po/starter-kit.pot - check_script: su -c "TEST_JOBS=$(nproc) TEST_OS=$TEST_OS make check" build + check_script: TEST_JOBS=$(nproc) TEST_OS=$TEST_OS make check From dfeb49484c2853685871bc14830626a0187a0470 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 28 Jan 2021 02:39:34 +0000 Subject: [PATCH 190/942] package.json: Update @patternfly package dependencies Closes #418 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 321d411..b80df38 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.70.2", - "@patternfly/react-core": "4.84.4", + "@patternfly/patternfly": "4.80.3", + "@patternfly/react-core": "4.90.2", "core-js": "3.8.3", "react": "16.14.0", "react-dom": "16.14.0" From 71a321cc2831345881c87f1b768c713dac07b3e0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 1 Feb 2021 11:25:15 +0100 Subject: [PATCH 191/942] Enable webpack watch progress Without that, `npm run watch` is entirely silent after the first build, and does not give any feedback when a build starts, and even more importantly, when it's done. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b80df38..1cd790c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "", "license": "LGPL-2.1", "scripts": { - "watch": "webpack --watch", + "watch": "webpack --watch --progress", "build": "webpack", "eslint": "eslint --ext .js --ext .jsx src/", "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" From 6f04071d885ae4f2479a87ca4baf88b6e4945e33 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Tue, 9 Feb 2021 13:58:15 +0100 Subject: [PATCH 192/942] Introduce a github action which builds a cockpit preview when requested It currently reacts to /livetest comments on PRs and builds cockpit from the PR's checkout. Then serves it on logs.cockpit-project.org on a port specified on a follow-up comment to the /livetest. Cockpit developers can now utilize this workflow to review a PR without having to pull and compile the code locally. --- .github/workflows/livetest.yml.disabled | 101 ++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/livetest.yml.disabled diff --git a/.github/workflows/livetest.yml.disabled b/.github/workflows/livetest.yml.disabled new file mode 100644 index 0000000..42a1f80 --- /dev/null +++ b/.github/workflows/livetest.yml.disabled @@ -0,0 +1,101 @@ +name: Live test cockpit from PRs +# Triggered when a repository collaborator comments /livetest on a PR +# This is currently configured to run on cockpit-project org. +# If your project lives somewhere else than the github cockpit-project organization, +# you need to set up your own relay host, add a secret with the private SSH key, and +# adjust the RELAY_HOST env variable and SINK_SSHRELAY_PRIVATE secret name. + +on: + issue_comment: + types: [created] + +jobs: + pr-info: + runs-on: ubuntu-20.04 + steps: + - name: Query author repository permissions + uses: octokit/request-action@v2.x + id: user_permission + with: + route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # restrict /livetest to users with admin or write permission for the repository + # see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user + # store output if user is allowed in allowed_user job output so it has to be checked in downstream job + - name: Check if user does have correct permissions + if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) + id: check_user_perm + run: | + echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'" + echo "::set-output name=allowed_user::true" + + outputs: + allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }} + + live-test: + needs: pr-info + if: needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/livetest') + runs-on: ubuntu-20.04 + env: + RELAY_HOST: logs.cockpit-project.org + steps: + - name: Install dependencies + run: | + sudo apt update + sudo apt install -y cockpit-system cockpit-ws nodejs npm sassc make + + - name: Clone repository + uses: actions/checkout@v2 + with: + # need this to also fetch tags + fetch-depth: 0 + + - name: Compile and install the project + run: make && sudo make install + + - name: Create a new test user + # WARNING: if you want to add this users to sudoers make sure to propertly delete the SINK_SSHRELAY_PRIVATE + run: sudo useradd --create-home livetest; echo livetest:foobar | sudo chpasswd + + - name: Get the commit SHA that triggered the workflow + id: get_commit_sha + run: | + echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Get ssh gateway port to forward to + id: remote_port + env: + SHA_SHORT: "${{ steps.get_commit_sha.outputs.sha_short }}" + run: | + echo ::set-output name=SSH_GATEWAY_PORT::$((16#$SHA_SHORT % 32768 + 1500)) + + - name: Write a comment on the PR with link to the cockpit instance + uses: actions/github-script@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Cockpit preview: https://${{ env.RELAY_HOST }}:${{ steps.remote_port.outputs.SSH_GATEWAY_PORT }}' + }) + + - name: Create an SSH private key from the secret + run: | + sudo touch /run/SINK_SSHRELAY_PRIVATE && sudo chown $(id -u):$(id -g) /run/SINK_SSHRELAY_PRIVATE + echo "${{ secrets.SINK_SSHRELAY_PRIVATE }}" > /run/SINK_SSHRELAY_PRIVATE + chmod 600 /run/SINK_SSHRELAY_PRIVATE + mkdir -p ~/.ssh && ssh-keyscan -H ${{ env.RELAY_HOST }} > ~/.ssh/known_hosts + + - name: Forward cockpit port 9090 to a server we can access + run: ssh -f -R ':${{ steps.remote_port.outputs.SSH_GATEWAY_PORT }}':localhost:9090 -i /run/SINK_SSHRELAY_PRIVATE -o ExitOnForwardFailure=yes sshgw@${{ env.RELAY_HOST }} 'sleep infinity' + + - name: Block workflow from finishing + run: sleep 4h + + - name: Cleanup ssh process + if: ${{ always() }} + run: pkill ssh || true From 6abb6b194412004ac7c8713975ed00fce5876fa3 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 17 Feb 2021 02:25:47 +0000 Subject: [PATCH 193/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #422 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1cd790c..4679811 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.80.3", - "@patternfly/react-core": "4.90.2", + "@patternfly/patternfly": "4.87.2", + "@patternfly/react-core": "4.97.1", "core-js": "3.8.3", "react": "16.14.0", "react-dom": "16.14.0" From de806efe168abe7328c3bc6a28cad72f0c07cb13 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 18 Feb 2021 02:37:30 +0000 Subject: [PATCH 194/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #423 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4679811..9084ff2 100644 --- a/package.json +++ b/package.json @@ -47,8 +47,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.87.2", - "@patternfly/react-core": "4.97.1", + "@patternfly/patternfly": "4.87.3", + "@patternfly/react-core": "4.97.2", "core-js": "3.8.3", "react": "16.14.0", "react-dom": "16.14.0" From 350621b443a5730d85bf5f5eb6e7eec167f173e1 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 19 Feb 2021 02:37:38 +0000 Subject: [PATCH 195/942] package.json: Update core-js Closes #424 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9084ff2..386bcbc 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "dependencies": { "@patternfly/patternfly": "4.87.3", "@patternfly/react-core": "4.97.2", - "core-js": "3.8.3", + "core-js": "3.9.0", "react": "16.14.0", "react-dom": "16.14.0" } From 66c6e9640650622d3b7d157cccc4e66dde3689f3 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Wed, 24 Feb 2021 10:48:36 +0100 Subject: [PATCH 196/942] livetest: fix cloning of repo Previously it was checking out origin/master not the PR's branch. --- .github/workflows/livetest.yml.disabled | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/livetest.yml.disabled b/.github/workflows/livetest.yml.disabled index 42a1f80..3130783 100644 --- a/.github/workflows/livetest.yml.disabled +++ b/.github/workflows/livetest.yml.disabled @@ -46,11 +46,28 @@ jobs: sudo apt update sudo apt install -y cockpit-system cockpit-ws nodejs npm sassc make - - name: Clone repository - uses: actions/checkout@v2 + - uses: actions/github-script@v3 + id: get-pr with: - # need this to also fetch tags + script: | + const request = { + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number + } + core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) + try { + const result = await github.pulls.get(request) + return result.data + } catch (err) { + core.setFailed(`Request failed with error ${err}`) + } + + - uses: actions/checkout@v2 + with: + repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }} fetch-depth: 0 + ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }} - name: Compile and install the project run: make && sudo make install From 4171293c48566a826b26c6f02810a822efeb958d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 25 Feb 2021 06:24:04 +0100 Subject: [PATCH 197/942] Drop unused version numbers from package.json and manifest This field was introduced in https://github.com/cockpit-project/cockpit/pull/4964 as "purely informational for now", and isn't even parsed by cockpit. package.json's version would only be relevant for publishing NPM modules, but cockpit pages are not that. Neither starter-kit itself nor our derived projects like cockpit-podman or cockpit-composer have ever maintained these two fields, so just get rid of them. This makes the git tag the single source of truth for the version number. Fixes #200 --- package.json | 1 - src/manifest.json | 1 - 2 files changed, 2 deletions(-) diff --git a/package.json b/package.json index 386bcbc..880ca82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "name": "starter-kit", - "version": "0.1.0", "description": "Scaffolding for a cockpit module", "main": "index.js", "repository": "git@github.com:cockpit/starter-kit.git", diff --git a/src/manifest.json b/src/manifest.json index 3e2454a..3a45f56 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,5 +1,4 @@ { - "version": "0.1", "requires": { "cockpit": "137" }, From b000d6b3745575d06e0bb44c23fced4842fea05f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 25 Feb 2021 07:58:34 +0100 Subject: [PATCH 198/942] Bump cockpit component library to 238 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5e8353c..cf5324d 100644 --- a/Makefile +++ b/Makefile @@ -150,7 +150,7 @@ test/common: # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 236; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 238; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg From 6b40f35e0492c01e4793669a1e9ec6115d3ebbb9 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 1 Mar 2021 02:35:37 +0000 Subject: [PATCH 199/942] package.json: Update core-js Closes #430 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 880ca82..30f95ce 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.87.3", "@patternfly/react-core": "4.97.2", - "core-js": "3.9.0", + "core-js": "3.9.1", "react": "16.14.0", "react-dom": "16.14.0" } From d4c81c9152ff26384f3ffc4f9eaf6d2d764e2ed7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 25 Feb 2021 10:34:16 +0100 Subject: [PATCH 200/942] Bump cockpit test API to 239 Replace the deprecated wait_present(). --- Makefile | 2 +- test/check-application | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cf5324d..82f6260 100644 --- a/Makefile +++ b/Makefile @@ -143,7 +143,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 233; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 239; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' diff --git a/test/check-application b/test/check-application index 58e8841..dac2039 100755 --- a/test/check-application +++ b/test/check-application @@ -47,7 +47,7 @@ class TestApplication(testlib.MachineCase): b.expect_load() # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) b.reload(ignore_cache=True) - b.wait_present("#content") + b.wait_visible("#content") # menu label (from manifest) should be translated b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") From f02f0fd08f048401d4c17d71591798a4d8e5f16c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Mar 2021 07:23:12 +0100 Subject: [PATCH 201/942] Move default TEST_OS to centos-8-stream We don't run centos-7 in CI any more, and thus can't guarantee that it works. --- Makefile | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 82f6260..fde1e12 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PACKAGE_NAME := $(shell awk '/"name":/ {gsub(/[",]/, "", $$2); print $$2}' package.json) VERSION := $(shell T=$$(git describe 2>/dev/null) || T=1; echo $$T | tr '-' '.') ifeq ($(TEST_OS),) -TEST_OS = centos-7 +TEST_OS = centos-8-stream endif export TEST_OS TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz diff --git a/README.md b/README.md index 33bd097..8a52ec3 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Rules configuration can be found in the `.eslintrc.json` file. # Running tests locally Run `make check` to build an RPM, install it into a standard Cockpit test VM -(centos-7 by default), and run the test/check-application integration test on +(centos-8-stream by default), and run the test/check-application integration test on it. This uses Cockpit's Chrome DevTools Protocol based browser tests, through a Python API abstraction. Note that this API is not guaranteed to be stable, so if you run into failures and don't want to adjust tests, consider checking out @@ -74,11 +74,11 @@ After the test VM is prepared, you can manually run the test without rebuilding the VM, possibly with extra options for tracing and halting on test failures (for interactive debugging): - TEST_OS=centos-7 test/check-application -tvs + TEST_OS=centos-8-stream test/check-application -tvs You can also run the test against a different Cockpit image, for example: - TEST_OS=fedora-32 make check + TEST_OS=fedora-34 make check # Running tests in CI From 603308d4242aa8b6176adaf98fc6971bb960f0c0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Mar 2021 08:37:49 +0100 Subject: [PATCH 202/942] test: Make tests nondestructive So that they can run in Packit and Fedora dist-git gating. --- test/check-application | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/check-application b/test/check-application index dac2039..60e545c 100755 --- a/test/check-application +++ b/test/check-application @@ -12,7 +12,9 @@ sys.path.append(os.path.join(TEST_DIR, "common")) sys.path.append(os.path.join(os.path.dirname(TEST_DIR), "bots/machine")) import testlib - +# Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and RHEL dist-git gating +# They must not permanently change any file or configuration on the system in a way that influences other tests. +@testlib.nondestructive class TestApplication(testlib.MachineCase): def testBasic(self): b = self.browser @@ -27,7 +29,7 @@ class TestApplication(testlib.MachineCase): b.wait_in_text(".pf-c-alert__title", "Running on " + hostname) # change current hostname - m.execute("echo new-%s > /etc/hostname" % hostname) + self.write_file("/etc/hostname", "new-" + hostname) # verify new hostname name b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname) From 09823650e222da09ab054e10e910af2c804fe1ef Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Mar 2021 07:40:35 +0100 Subject: [PATCH 203/942] Add FMF test metadata and scripts Copy and adjust the browser.sh and run-test.sh scripts from cockpit-podman, which we have used in Fedora/RHEL dist-git gating and packit tests for a while. --- .fmf/version | 1 + plans/all.fmf | 6 +++++ test/browser/browser.sh | 56 ++++++++++++++++++++++++++++++++++++++++ test/browser/main.fmf | 13 ++++++++++ test/browser/run-test.sh | 25 ++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/all.fmf create mode 100755 test/browser/browser.sh create mode 100644 test/browser/main.fmf create mode 100755 test/browser/run-test.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/all.fmf b/plans/all.fmf new file mode 100644 index 0000000..2bce34a --- /dev/null +++ b/plans/all.fmf @@ -0,0 +1,6 @@ +summary: + Run all tests +discover: + how: fmf +execute: + how: tmt diff --git a/test/browser/browser.sh b/test/browser/browser.sh new file mode 100755 index 0000000..7457dc9 --- /dev/null +++ b/test/browser/browser.sh @@ -0,0 +1,56 @@ +#!/bin/sh +set -eux + +TESTS="$(realpath $(dirname "$0"))" +if [ -d source ]; then + # path for standard-test-source + SOURCE="$(pwd)/source" +else + SOURCE="$(realpath $TESTS/../..)" +fi +LOGS="$(pwd)/logs" +mkdir -p "$LOGS" +chmod a+w "$LOGS" + +# install browser; on RHEL, use chromium from epel +# HACK: chromium-headless ought to be enough, but version 88 has a crash: https://bugs.chromium.org/p/chromium/issues/detail?id=1170634 +if ! rpm -q chromium; then + if grep -q 'ID=.*rhel' /etc/os-release; then + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + dnf config-manager --enable epel + fi + dnf install -y chromium +fi + +# create user account for logging in +if ! id admin 2>/dev/null; then + useradd -c Administrator -G wheel admin + echo admin:foobar | chpasswd +fi + +# set root's password +echo root:foobar | chpasswd + +# avoid sudo lecture during tests +su -c 'echo foobar | sudo --stdin whoami' - admin + +# create user account for running the test +if ! id runtest 2>/dev/null; then + useradd -c 'Test runner' runtest + # allow test to set up things on the machine + mkdir -p /root/.ssh + curl https://raw.githubusercontent.com/cockpit-project/bots/master/machine/identity.pub >> /root/.ssh/authorized_keys + chmod 600 /root/.ssh/authorized_keys +fi +chown -R runtest "$SOURCE" + +# disable core dumps, we rather investigate them upstream where test VMs are accessible +echo core > /proc/sys/kernel/core_pattern + +systemctl enable --now cockpit.socket + +# Run tests as unprivileged user +su - -c "env SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest + +RC=$(cat $LOGS/exitcode) +exit ${RC:-1} diff --git a/test/browser/main.fmf b/test/browser/main.fmf new file mode 100644 index 0000000..ea9acb6 --- /dev/null +++ b/test/browser/main.fmf @@ -0,0 +1,13 @@ +summary: + Run browser integration tests on the host +require: + - cockpit-starter-kit + - cockpit-ws + - cockpit-system + - git + - libvirt-python3 + - make + - npm + - python3 +test: ./browser.sh +duration: 60m diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh new file mode 100755 index 0000000..a3c7585 --- /dev/null +++ b/test/browser/run-test.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -eux + +# tests need cockpit's bots/ libraries and test infrastructure +cd $SOURCE +git init +make bots test/common + +# only install a subset to save time/space +rm -f package-lock.json # otherwise the command below installs *everything*, argh +npm install chrome-remote-interface sizzle + +. /etc/os-release +export TEST_OS="${ID}-${VERSION_ID/./-}" +export TEST_AUDIT_NO_SELINUX=1 + +EXCLUDES="" + +RC=0 +test/common/run-tests --nondestructive --machine 127.0.0.1:22 --browser 127.0.0.1:9090 $EXCLUDES || RC=$? + +echo $RC > "$LOGS/exitcode" +cp --verbose Test* "$LOGS" || true +# deliver test result via exitcode file +exit 0 From a26f4048c28bc96c5c329b018f3b502a189958e2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 4 Mar 2021 07:30:37 +0100 Subject: [PATCH 204/942] packit: Enable RPM builds and Fedora testing Teach `make dist-gzip` to print the tarball name as last line, and use it as `create-archive` action. Add a `make print-version` command which packit can use. The builtin default only works if there is at least one git tag, which is not the case for starter-kit (which is never released). --- Makefile | 6 +++++- README.md | 10 ++++++++++ packit.yaml | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 packit.yaml diff --git a/Makefile b/Makefile index fde1e12..dfc75c7 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,11 @@ devel-install: $(WEBPACK_TEST) mkdir -p ~/.local/share/cockpit ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) +print-version: + @echo "$(VERSION)" + dist-gzip: $(TARFILE) + @ls -1 $(TARFILE) # when building a distribution tarball, call webpack with a 'production' environment # we don't ship node_modules for license and compactness reasons; we ship a @@ -162,4 +166,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install dist-gzip srpm rpm check vm update-po +.PHONY: all clean install devel-install print-version dist-gzip srpm rpm check vm update-po diff --git a/README.md b/README.md index 8a52ec3..52aec3f 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,16 @@ operating systems (Fedora and CentOS 8). Note that if/once your project grows bigger, or gets frequent changes, you may need to move to a paid account, or different infrastructure with more capacity. +Tests also run in [Packit](https://packit.dev/) for all currently supported +Fedora releases; see the [packit.yaml](./packit.yaml) control file. You need to +[enable Packit-as-a-service](https://packit.dev/docs/packit-as-a-service/) in your GitHub project to use this. +To run the tests in the exact same way for upstream pull requests and for +[Fedora package update gating](https://docs.fedoraproject.org/en-US/ci/), the +tests are wrapped in the [FMF metadata format](https://github.com/psss/fmf) +for using with the [tmt test management tool](https://docs.fedoraproject.org/en-US/ci/tmt/). +Note that Packit tests can *not* run their own virtual machine images, thus +they only run [@nondestructive tests](https://github.com/martinpitt/cockpit/blob/master/test/common/testlib.py). + # Customizing After cloning the Starter Kit you should rename the files, package names, and diff --git a/packit.yaml b/packit.yaml new file mode 100644 index 0000000..b5cdb0f --- /dev/null +++ b/packit.yaml @@ -0,0 +1,19 @@ +# Enable RPM builds and running integration tests in PRs through https://packit.dev/ +# To use this, enable Packit-as-a-service in GitHub: https://packit.dev/docs/packit-as-a-service/ +# See https://packit.dev/docs/configuration/ for the format of this file + +specfile_path: cockpit-starter-kit.spec +actions: + post-upstream-clone: make cockpit-starter-kit.spec + # reduce memory consumption of webpack in sandcastle container + # https://github.com/packit/sandcastle/pull/92 + # https://medium.com/the-node-js-collection/node-js-memory-management-in-container-environments-7eb8409a74e8 + create-archive: make NODE_OPTIONS=--max-old-space-size=500 dist-gzip + # starter-kit.git has no release tags; your project can drop this once you have a release + get-current-version: make print-version +jobs: + - job: tests + trigger: pull_request + metadata: + targets: + - fedora-all From 957e7f157c84f25030e039bcc2ed128784eb571a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 10 Mar 2021 02:37:39 +0000 Subject: [PATCH 205/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #434 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 30f95ce..a3017d4 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.87.3", - "@patternfly/react-core": "4.97.2", + "@patternfly/patternfly": "4.90.5", + "@patternfly/react-core": "4.101.3", "core-js": "3.9.1", "react": "16.14.0", "react-dom": "16.14.0" From 58cfb84de29686b177395d445cbb59b40931e87e Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 1 Apr 2021 02:29:26 +0000 Subject: [PATCH 206/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #441 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a3017d4..8e9f690 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^3.3.5" }, "dependencies": { - "@patternfly/patternfly": "4.90.5", - "@patternfly/react-core": "4.101.3", + "@patternfly/patternfly": "4.96.2", + "@patternfly/react-core": "4.106.1", "core-js": "3.9.1", "react": "16.14.0", "react-dom": "16.14.0" From 28d6b456cbb403a59e4276dae89b24dd76d6c3df Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 2 Apr 2021 02:30:56 +0000 Subject: [PATCH 207/942] package.json: Update @patternfly/react-core Closes #442 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e9f690..22f4dc1 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.96.2", - "@patternfly/react-core": "4.106.1", + "@patternfly/react-core": "4.106.2", "core-js": "3.9.1", "react": "16.14.0", "react-dom": "16.14.0" From a8eeeefd58afb2b95e37e1ac3639fc32d1cfdbac Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 3 Apr 2021 02:25:22 +0000 Subject: [PATCH 208/942] package.json: Update core-js Closes #443 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22f4dc1..0a42e5d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.96.2", "@patternfly/react-core": "4.106.2", - "core-js": "3.9.1", + "core-js": "3.10.0", "react": "16.14.0", "react-dom": "16.14.0" } From 70351d90817790b09a54c48a6320b5fe4b5ffc68 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 8 Apr 2021 02:29:00 +0000 Subject: [PATCH 209/942] package.json: Update core-js Closes #444 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a42e5d..051cbd8 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.96.2", "@patternfly/react-core": "4.106.2", - "core-js": "3.10.0", + "core-js": "3.10.1", "react": "16.14.0", "react-dom": "16.14.0" } From 1744ec2f5dad017272bfe1723dfd020c9ebcb157 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Apr 2021 07:59:04 +0200 Subject: [PATCH 210/942] Ignore src/lib for eslint This code comes from cockpit.git. Newer ESLint versions have a lot of complaints about it, but in starter-kit we can't do anything about these directly. Let's keep the stricter ESLint settings instead of ignoring a lot more warnings to cover src/lib. --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index 8d87b1d..8faa0e3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ node_modules/* +src/lib/* From 04d6c566c77b58f0f087bee9a8ad33c4193d1762 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Apr 2021 08:03:58 +0200 Subject: [PATCH 211/942] eslint: Drop some disabled but desirable warnings Project authors can/should decide about these by themselves. --- .eslintrc.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e660dc9..05bf33b 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,12 +42,7 @@ "react/jsx-indent-props": "off", "react/prop-types": "off", "space-before-function-paren": "off", - "standard/no-callback-literal": "off", - - "eqeqeq": "off", - "import/no-webpack-loader-syntax": "off", - "object-property-newline": "off", - "react/jsx-no-bind": "off" + "standard/no-callback-literal": "off" }, "globals": { "require": false, From e449e945646ec673b84f8375f486645864b79664 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Apr 2021 08:06:00 +0200 Subject: [PATCH 212/942] Move babel config into separate file This works better with the current eslint loader, as then eslint and babel can look at the same configuration. See . This is similar to .eslintrc.json. --- .babelrc.json | 14 ++++++++++++++ webpack.config.js | 21 +-------------------- 2 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 .babelrc.json diff --git a/.babelrc.json b/.babelrc.json new file mode 100644 index 0000000..dfe57f2 --- /dev/null +++ b/.babelrc.json @@ -0,0 +1,14 @@ +{ + "presets": [ + ["@babel/env", { + "targets": { + "chrome": "57", + "firefox": "52", + "safari": "10.3", + "edge": "16", + "opera": "44" + } + }], + "@babel/preset-react" + ] +} diff --git a/webpack.config.js b/webpack.config.js index f02c0b9..00295cb 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -35,25 +35,6 @@ if (production) { })); } -/* keep this in sync with cockpit.git */ -const babel_loader = { - loader: "babel-loader", - options: { - presets: [ - ["@babel/env", { - "targets": { - "chrome": "57", - "firefox": "52", - "safari": "10.3", - "edge": "16", - "opera": "44" - } - }], - "@babel/preset-react" - ] - } -} - /* check if sassc is available, to avoid unintelligible error messages */ try { childProcess.execFileSync('sassc', ['--version'], { stdio: ['pipe', 'inherit', 'inherit'] }); @@ -100,7 +81,7 @@ module.exports = { }, { exclude: /node_modules/, - use: babel_loader, + use: "babel-loader", test: /\.(js|jsx)$/ }, /* HACK: remove unwanted fonts from PatternFly's css */ From 0e608d562a04195ec9d5197ea2b0a5a1149d046f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Apr 2021 08:10:54 +0200 Subject: [PATCH 213/942] Use current babel/eslint integration Fixes these `npm install` warnings: > deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. > deprecated eslint-loader@4.0.2: This loader has been deprecated. Please use eslint-webpack-plugin --- .eslintrc.json | 2 +- package.json | 4 ++-- webpack.config.js | 8 ++------ 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 05bf33b..4572422 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "es6": true }, "extends": ["eslint:recommended", "standard", "standard-react"], - "parser": "babel-eslint", + "parser": "@babel/eslint-parser", "parserOptions": { "ecmaVersion": "7", "ecmaFeatures": { diff --git a/package.json b/package.json index 051cbd8..e4945eb 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ }, "devDependencies": { "@babel/core": "^7.5.4", + "@babel/eslint-parser": "^7.13.14", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", - "babel-eslint": "^10.0.3", "babel-loader": "^8.0.6", "chrome-remote-interface": "^0.28.0", "compression-webpack-plugin": "^6.0.0", @@ -24,7 +24,6 @@ "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", "eslint-config-standard-react": "^9.2.0", - "eslint-loader": "^4.0.2", "eslint-plugin-flowtype": "^5.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", @@ -32,6 +31,7 @@ "eslint-plugin-react": "^7.21.2", "eslint-plugin-react-hooks": "^4.1.2", "eslint-plugin-standard": "^4.0.1", + "eslint-webpack-plugin": "^2.5.3", "htmlparser": "^1.7.7", "jed": "^1.1.1", "mini-css-extract-plugin": "^0.11.0", diff --git a/webpack.config.js b/webpack.config.js index 00295cb..6f556bc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ const extract = require("mini-css-extract-plugin"); const TerserJSPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const CompressionPlugin = require("compression-webpack-plugin"); +const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); const webpack = require("webpack"); @@ -24,6 +25,7 @@ const copy_files = [ const plugins = [ new copy({ patterns: copy_files }), new extract({filename: "[name].css"}), + new ESLintPlugin({ extensions: ["js", "jsx"] }), new CockpitPoPlugin(), ]; @@ -73,12 +75,6 @@ module.exports = { module: { rules: [ - { - enforce: 'pre', - exclude: /node_modules/, - loader: 'eslint-loader', - test: /\.(js|jsx)$/ - }, { exclude: /node_modules/, use: "babel-loader", From 45b8c2a45afd5fcff88cba54ffd79d58ecb60cbf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 8 Apr 2021 10:28:34 +0200 Subject: [PATCH 214/942] spec: Don't fail if there are no map files --- cockpit-starter-kit.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 8447cfe..f73012f 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -24,7 +24,7 @@ Cockpit Starter Kit Example Module appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* # drop source maps, they are large and just for debugging -find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs rm --verbose +find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose %files %{_datadir}/cockpit/* From c52136c051448463af5a9e869c332f0d8e0ffca0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 8 Apr 2021 10:07:50 +0200 Subject: [PATCH 215/942] Move to webpack 5 We don't need to explicitly mention TerserJSPlugin any more (from commit 6b8611), as webpack 5 can now extend the `minimizer:` list with the special `...` syntax. This gets rid of several `npm install` warnings: deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. as well as 10 MB of node_modules. --- package.json | 9 ++++----- webpack.config.js | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e4945eb..04686d9 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "compression-webpack-plugin": "^6.0.0", "copy-webpack-plugin": "^6.1.0", "css-loader": "^4.3.0", + "css-minimizer-webpack-plugin": "^1.3.0", "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", "eslint-config-standard-react": "^9.2.0", @@ -35,15 +36,13 @@ "htmlparser": "^1.7.7", "jed": "^1.1.1", "mini-css-extract-plugin": "^0.11.0", - "optimize-css-assets-webpack-plugin": "^5.0.3", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", "sizzle": "^2.3.3", "stdio": "^2.1.0", - "string-replace-loader": "^2.3.0", - "terser-webpack-plugin": "^2.0.1", - "webpack": "^4.35.3", - "webpack-cli": "^3.3.5" + "string-replace-loader": "^3.0.0", + "webpack": "^5.31.0", + "webpack-cli": "^4.6.0" }, "dependencies": { "@patternfly/patternfly": "4.96.2", diff --git a/webpack.config.js b/webpack.config.js index 6f556bc..46daef5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,8 +3,7 @@ const childProcess = require('child_process'); const copy = require("copy-webpack-plugin"); const extract = require("mini-css-extract-plugin"); -const TerserJSPlugin = require('terser-webpack-plugin'); -const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); @@ -70,7 +69,7 @@ module.exports = { optimization: { minimize: production, - minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})], + minimizer: [`...`, new CssMinimizerPlugin()], }, module: { From 2624dbb89143272014adae620668c711639fb86d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 9 Apr 2021 16:10:40 +0200 Subject: [PATCH 216/942] Build and ship LICENSE file Bring back terser-webpack-plugin from commit c52136c051448 and re-enable it. It builds the autogenerated dist/index.js.LICENSE.txt which is quite important for shipping distribution packages -- c-{podman,machines} both do this. Backport https://github.com/cockpit-project/cockpit-podman/commit/95021c336ed to make sure that the webpack for the release tarball is *actually* built in production mode. --- Makefile | 2 +- cockpit-starter-kit.spec.in | 2 ++ package.json | 1 + webpack.config.js | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dfc75c7..1a7c91b 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ dist-gzip: $(TARFILE) # we don't ship node_modules for license and compactness reasons; we ship a # pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that # node_modules/ can be reconstructed if necessary) -$(TARFILE): NODE_ENV=production +$(TARFILE): export NODE_ENV=production $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi mv node_modules node_modules.release diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index f73012f..32520fd 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -27,6 +27,8 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose %files +%doc README.md +%license LICENSE dist/index.js.LICENSE.txt %{_datadir}/cockpit/* %{_datadir}/metainfo/* diff --git a/package.json b/package.json index 04686d9..93c11cd 100644 --- a/package.json +++ b/package.json @@ -41,6 +41,7 @@ "sizzle": "^2.3.3", "stdio": "^2.1.0", "string-replace-loader": "^3.0.0", + "terser-webpack-plugin": "^2.0.1", "webpack": "^5.31.0", "webpack-cli": "^4.6.0" }, diff --git a/webpack.config.js b/webpack.config.js index 46daef5..e2caf5f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -3,6 +3,7 @@ const childProcess = require('child_process'); const copy = require("copy-webpack-plugin"); const extract = require("mini-css-extract-plugin"); +const TerserJSPlugin = require('terser-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); @@ -69,7 +70,7 @@ module.exports = { optimization: { minimize: production, - minimizer: [`...`, new CssMinimizerPlugin()], + minimizer: [new TerserJSPlugin(), new CssMinimizerPlugin()], }, module: { From d02579694d34a30a1c6c98a151407ffd14363bd0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 19 Apr 2021 09:06:10 +0200 Subject: [PATCH 217/942] test: Adjust to language selector change in Cockpit 242 See https://github.com/cockpit-project/cockpit/commit/bf1f645208 --- test/check-application | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/check-application b/test/check-application index 60e545c..4227c2d 100755 --- a/test/check-application +++ b/test/check-application @@ -38,9 +38,12 @@ class TestApplication(testlib.MachineCase): b.click("#navbar-dropdown") b.click(".display-language-menu a") b.wait_popup('display-language') - # the dialog changed in cockpit 233 + # the dialog changed several times cockpit_version = float(m.execute("cockpit-bridge --version | sed -n '/Version:/ s/^.*: //p'").strip()) - if cockpit_version >= 233: + if cockpit_version >= 242: + b.click("#display-language-modal [data-value='de-de'] button") + b.click("#display-language-modal button.pf-m-primary") + elif cockpit_version >= 233: b.set_val("#display-language-modal select", "de-de") b.click("#display-language-modal button.pf-m-primary") else: From b5610000b538d57a080ccac37cbb9398a0d47b03 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 19 Apr 2021 10:12:44 +0200 Subject: [PATCH 218/942] fmf: Add glibc-langpack-de test dependency The tests switch to German, make sure that the corresponding locale exists. Otherwise, tests will run into unexpected messages like "invalid or unusable locale: de_DE.UTF-8". --- test/browser/main.fmf | 1 + 1 file changed, 1 insertion(+) diff --git a/test/browser/main.fmf b/test/browser/main.fmf index ea9acb6..a08584c 100644 --- a/test/browser/main.fmf +++ b/test/browser/main.fmf @@ -5,6 +5,7 @@ require: - cockpit-ws - cockpit-system - git + - glibc-langpack-de - libvirt-python3 - make - npm From 180a48caaaab33c1a124803a3b927675448af4f2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 19 Apr 2021 08:32:12 +0200 Subject: [PATCH 219/942] Bump cockpit test/common and lib to 242 https://github.com/martinpitt/cockpit/commit/731fdf82c0 fixed the deprecation warning in cockpit-po-plugin: > node:37175) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: > Compilation.assets will be frozen in future, all modifications are > deprecated. > BREAKING CHANGE: No more changes should happen to Compilation.assets > after sealing the Compilation. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1a7c91b..2bb5dfb 100644 --- a/Makefile +++ b/Makefile @@ -147,14 +147,14 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 239; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 242; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 238; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 242; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg From 1d7aad7c5292bf860f72a24d7eaaaba8f594d8ae Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Tue, 20 Apr 2021 02:24:13 +0000 Subject: [PATCH 220/942] package.json: Update core-js Closes #450 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93c11cd..118d40c 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.96.2", "@patternfly/react-core": "4.106.2", - "core-js": "3.10.1", + "core-js": "3.10.2", "react": "16.14.0", "react-dom": "16.14.0" } From 6356bc70b270effc372c02a97afadbb5db47e6a2 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 22 Apr 2021 02:25:39 +0000 Subject: [PATCH 221/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #451 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 118d40c..4ad4f69 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.96.2", - "@patternfly/react-core": "4.106.2", + "@patternfly/patternfly": "4.102.1", + "@patternfly/react-core": "4.115.1", "core-js": "3.10.2", "react": "16.14.0", "react-dom": "16.14.0" From 178ad4bc9e416d6e83b586845b03f68997b540ba Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 23 Apr 2021 02:29:26 +0000 Subject: [PATCH 222/942] package.json: Update core-js Closes #452 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ad4f69..be57c80 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.1", "@patternfly/react-core": "4.115.1", - "core-js": "3.10.2", + "core-js": "3.11.0", "react": "16.14.0", "react-dom": "16.14.0" } From 702712355c30eb0f88b85ac2f8bc82aab6015d04 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 24 Apr 2021 02:26:57 +0000 Subject: [PATCH 223/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #453 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index be57c80..5c88e5a 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.102.1", - "@patternfly/react-core": "4.115.1", + "@patternfly/patternfly": "4.102.2", + "@patternfly/react-core": "4.115.2", "core-js": "3.11.0", "react": "16.14.0", "react-dom": "16.14.0" From 1b5f96e9dca84f3287d507690ec2a2239e962895 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 29 Apr 2021 02:24:55 +0000 Subject: [PATCH 224/942] package.json: Update core-js Closes #454 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c88e5a..b5301f9 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.2", "@patternfly/react-core": "4.115.2", - "core-js": "3.11.0", + "core-js": "3.11.1", "react": "16.14.0", "react-dom": "16.14.0" } From a29384eebd50e8ade10b32a197f29e213ae54ad1 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Tue, 4 May 2021 02:44:18 +0000 Subject: [PATCH 225/942] package.json: Update core-js Closes #455 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5301f9..44d41f9 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.2", "@patternfly/react-core": "4.115.2", - "core-js": "3.11.1", + "core-js": "3.11.2", "react": "16.14.0", "react-dom": "16.14.0" } From f4d2ee2ecc69dd2fd06752d6e1df645bed69efc8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 6 May 2021 02:42:21 +0000 Subject: [PATCH 226/942] package.json: Update core-js Closes #456 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44d41f9..e997bfe 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.2", "@patternfly/react-core": "4.115.2", - "core-js": "3.11.2", + "core-js": "3.11.3", "react": "16.14.0", "react-dom": "16.14.0" } From 53455d58b3e49141b4b74158913268af2b91fcc4 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 7 May 2021 02:47:25 +0000 Subject: [PATCH 227/942] package.json: Update core-js Closes #457 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e997bfe..7479bf5 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.2", "@patternfly/react-core": "4.115.2", - "core-js": "3.11.3", + "core-js": "3.12.0", "react": "16.14.0", "react-dom": "16.14.0" } From a10984bcf08156a936224bbd3f4e0451c4d25729 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sun, 9 May 2021 02:44:55 +0000 Subject: [PATCH 228/942] package.json: Update core-js Closes #458 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7479bf5..34f4170 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.102.2", "@patternfly/react-core": "4.115.2", - "core-js": "3.12.0", + "core-js": "3.12.1", "react": "16.14.0", "react-dom": "16.14.0" } From 22edb6591ba0bfed2dba38adde87979b10f0994a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 19 May 2021 02:48:50 +0000 Subject: [PATCH 229/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #459 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 34f4170..290152f 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.102.2", - "@patternfly/react-core": "4.115.2", + "@patternfly/patternfly": "4.103.6", + "@patternfly/react-core": "4.121.1", "core-js": "3.12.1", "react": "16.14.0", "react-dom": "16.14.0" From 09bc3dca4c6624ce8ef3710b1d660b824a24989f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 26 May 2021 03:36:09 +0000 Subject: [PATCH 230/942] package.json: Update core-js Closes #460 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 290152f..9b558e7 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.103.6", "@patternfly/react-core": "4.121.1", - "core-js": "3.12.1", + "core-js": "3.13.0", "react": "16.14.0", "react-dom": "16.14.0" } From 261922a9c1f5a900ba7d696637f19e2c1a2582c4 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sun, 30 May 2021 04:48:39 +0000 Subject: [PATCH 231/942] package.json: Update core-js Closes #462 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b558e7..736a613 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.103.6", "@patternfly/react-core": "4.121.1", - "core-js": "3.13.0", + "core-js": "3.13.1", "react": "16.14.0", "react-dom": "16.14.0" } From 0edc3e6c53805194e1413a9a918bb0076e44fce8 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sun, 30 May 2021 19:49:06 +0200 Subject: [PATCH 232/942] packit: Build in development mode With recent NPM/sandcastle versions, production mode and its additional optimizations don't fit any more into the 768 MB RAM of sandcastle containers. Build in development mode, which skips the optimization steps. Taken from https://github.com/cockpit-project/cockpit-podman/commit/7000b4460e6ac --- packit.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packit.yaml b/packit.yaml index b5cdb0f..33ec1ab 100644 --- a/packit.yaml +++ b/packit.yaml @@ -5,10 +5,15 @@ specfile_path: cockpit-starter-kit.spec actions: post-upstream-clone: make cockpit-starter-kit.spec - # reduce memory consumption of webpack in sandcastle container + # build in development mode; production mode uses too much memory for limited + # sandcastle containers; also reduce memory consumption of webpack # https://github.com/packit/sandcastle/pull/92 # https://medium.com/the-node-js-collection/node-js-memory-management-in-container-environments-7eb8409a74e8 - create-archive: make NODE_OPTIONS=--max-old-space-size=500 dist-gzip + create-archive: + - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 + # dummy LICENSE.txt, as terser did not run + - touch dist/index.js.LICENSE.txt + - make dist-gzip # starter-kit.git has no release tags; your project can drop this once you have a release get-current-version: make print-version jobs: From efce4f7f95115ec5b9e0a3464f0a233c28a57682 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sun, 6 Jun 2021 03:42:06 +0000 Subject: [PATCH 233/942] package.json: Update core-js Closes #464 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 736a613..6a32664 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.103.6", "@patternfly/react-core": "4.121.1", - "core-js": "3.13.1", + "core-js": "3.14.0", "react": "16.14.0", "react-dom": "16.14.0" } From caf8e908ebc0ef6953883f63338b3a6996472152 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 9 Jun 2021 02:54:09 +0000 Subject: [PATCH 234/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #465 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6a32664..cbd1661 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.103.6", - "@patternfly/react-core": "4.121.1", + "@patternfly/patternfly": "4.108.2", + "@patternfly/react-core": "4.128.2", "core-js": "3.14.0", "react": "16.14.0", "react-dom": "16.14.0" From 7ddabca32a0d6a979e2858b51b3ee6577d4bdd5f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 21 Jun 2021 02:40:25 +0000 Subject: [PATCH 235/942] package.json: Update core-js Closes #467 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cbd1661..a0f6785 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.108.2", "@patternfly/react-core": "4.128.2", - "core-js": "3.14.0", + "core-js": "3.15.0", "react": "16.14.0", "react-dom": "16.14.0" } From 835395fc18988cbbd71b9cfe159ac4f36502dc27 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 24 Jun 2021 02:22:21 +0000 Subject: [PATCH 236/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #468 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a0f6785..563ab49 100644 --- a/package.json +++ b/package.json @@ -46,8 +46,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.108.2", - "@patternfly/react-core": "4.128.2", + "@patternfly/patternfly": "4.115.2", + "@patternfly/react-core": "4.135.0", "core-js": "3.15.0", "react": "16.14.0", "react-dom": "16.14.0" From 50ae23e5ad1531084cec2b2fde978dccf192f9b8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 25 Jun 2021 02:35:00 +0000 Subject: [PATCH 237/942] package.json: Update core-js Closes #470 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 563ab49..5a63378 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.115.2", "@patternfly/react-core": "4.135.0", - "core-js": "3.15.0", + "core-js": "3.15.1", "react": "16.14.0", "react-dom": "16.14.0" } From 37a64010bfd0c9df18465802a25ef210c270316d Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 30 Jun 2021 02:34:41 +0000 Subject: [PATCH 238/942] package.json: Update core-js Closes #471 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a63378..80c09e2 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dependencies": { "@patternfly/patternfly": "4.115.2", "@patternfly/react-core": "4.135.0", - "core-js": "3.15.1", + "core-js": "3.15.2", "react": "16.14.0", "react-dom": "16.14.0" } From 37b2ee5056583cd654f59cc67f6b04643694fa57 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Mon, 5 Jul 2021 09:56:03 +0200 Subject: [PATCH 239/942] =?UTF-8?q?various:=20master=20=E2=86=92=20main=20?= =?UTF-8?q?updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cockpit/ bots/ and cockpituous/ all use the 'main' branch now. --- .cirrus.yml | 2 +- Makefile | 2 +- README.md | 8 ++++---- cockpituous-release | 4 ++-- test/browser/browser.sh | 2 +- test/check-application | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4a0c6df..92aabeb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ container: # official cockpit CI container, with cockpit related build and test dependencies # if you want to use your own, see the documentation about required packages: - # https://github.com/cockpit-project/cockpit/blob/master/HACKING.md#getting-the-development-dependencies + # https://github.com/cockpit-project/cockpit/blob/main/HACKING.md#getting-the-development-dependencies image: quay.io/cockpit/tasks kvm: true # increase this if you have many tests that benefit from parallelism diff --git a/Makefile b/Makefile index 2bb5dfb..fc61ece 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common TEST_AUDIT_NO_SELINUX=1 test/common/run-tests # checkout Cockpit's bots for standard test VM images and API to launch them -# must be from master, as only that has current and existing images; but testvm.py API is stable +# must be from main, as only that has current and existing images; but testvm.py API is stable # support CI testing against a bots change bots: git clone --quiet --reference-if-able $${XDG_CACHE_HOME:-$$HOME/.cache}/cockpit-project/bots https://github.com/cockpit-project/bots.git diff --git a/README.md b/README.md index 52aec3f..7b9e3c2 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Run `make check` to build an RPM, install it into a standard Cockpit test VM it. This uses Cockpit's Chrome DevTools Protocol based browser tests, through a Python API abstraction. Note that this API is not guaranteed to be stable, so if you run into failures and don't want to adjust tests, consider checking out -Cockpit's test/common from a tag instead of master (see the `test/common` +Cockpit's test/common from a tag instead of main (see the `test/common` target in `Makefile`). After the test VM is prepared, you can manually run the test without rebuilding @@ -101,7 +101,7 @@ To run the tests in the exact same way for upstream pull requests and for tests are wrapped in the [FMF metadata format](https://github.com/psss/fmf) for using with the [tmt test management tool](https://docs.fedoraproject.org/en-US/ci/tmt/). Note that Packit tests can *not* run their own virtual machine images, thus -they only run [@nondestructive tests](https://github.com/martinpitt/cockpit/blob/master/test/common/testlib.py). +they only run [@nondestructive tests](https://github.com/martinpitt/cockpit/blob/main/test/common/testlib.py). # Customizing @@ -115,7 +115,7 @@ change: # Automated release Once your cloned project is ready for a release, you should consider automating -that. [Cockpituous release](https://github.com/cockpit-project/cockpituous/tree/master/release) +that. [Cockpituous release](https://github.com/cockpit-project/cockpituous/tree/main/release) aims to fully automate project releases to GitHub, Fedora, Ubuntu, COPR, Docker Hub, and other places. The intention is that the only manual step for releasing a project is to create a signed tag for the version number; pushing the tag @@ -130,7 +130,7 @@ up secrets and run cockpituous. It is important to keep your [NPM modules](./package.json) up to date, to keep up with security updates and bug fixes. This is done with the -[npm-update bot script](https://github.com/cockpit-project/bots/blob/master/npm-update) +[npm-update bot script](https://github.com/cockpit-project/bots/blob/main/npm-update) which is run weekly or upon [manual request](https://github.com/cockpit-project/starter-kit/actions) through the [npm-update.yml](.github/workflows/npm-update.yml) [GitHub action](https://github.com/features/actions). diff --git a/cockpituous-release b/cockpituous-release index f53ec27..7aebbf1 100644 --- a/cockpituous-release +++ b/cockpituous-release @@ -1,5 +1,5 @@ # This is a script run to release this project through Cockpituous: -# https://github.com/cockpit-project/cockpituous/tree/master/release +# https://github.com/cockpit-project/cockpituous/tree/main/release # Anything that start with 'job' may run in a way that it SIGSTOP's # itself when preliminary preparition and then gets a SIGCONT in @@ -23,7 +23,7 @@ job release-srpm -V ## Authenticate for pushing into Fedora dist-git # cat ~/.fedora-password | kinit yourfedorauser@FEDORAPROJECT.ORG ## Do fedora builds for the tag, using tarball -# job release-koji -k master +# job release-koji -k main # job release-koji f33 # job release-bodhi F33 diff --git a/test/browser/browser.sh b/test/browser/browser.sh index 7457dc9..4a48f9e 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -39,7 +39,7 @@ if ! id runtest 2>/dev/null; then useradd -c 'Test runner' runtest # allow test to set up things on the machine mkdir -p /root/.ssh - curl https://raw.githubusercontent.com/cockpit-project/bots/master/machine/identity.pub >> /root/.ssh/authorized_keys + curl https://raw.githubusercontent.com/cockpit-project/bots/main/machine/identity.pub >> /root/.ssh/authorized_keys chmod 600 /root/.ssh/authorized_keys fi chown -R runtest "$SOURCE" diff --git a/test/check-application b/test/check-application index 4227c2d..b149d16 100755 --- a/test/check-application +++ b/test/check-application @@ -1,6 +1,6 @@ #!/usr/bin/python3 # Run this with --help to see available options for tracing and debugging -# See https://github.com/cockpit-project/cockpit/blob/master/test/common/testlib.py +# See https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py # "class Browser" and "class MachineCase" for the available API. import os From cfaa74f76175f9669eff3e0d9d050e5441aa5351 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 6 Jul 2021 09:02:39 +0200 Subject: [PATCH 240/942] test: Fix host name lookup (#473) Our code reads /etc/hostname. Do the same in the test, as the runtime sethostname(2) (set by hostnamed) and static host name may be different. --- test/check-application | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/check-application b/test/check-application index b149d16..2a13ce3 100755 --- a/test/check-application +++ b/test/check-application @@ -25,7 +25,7 @@ class TestApplication(testlib.MachineCase): b.wait_text(".pf-c-card__title", "Starter Kit") # verify expected host name - hostname = m.execute("hostname").strip() + hostname = m.execute("cat /etc/hostname").strip() b.wait_in_text(".pf-c-alert__title", "Running on " + hostname) # change current hostname From 4d9dd8c11ee65eb5371da77ca55f83b73bf41ee5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 6 Jul 2021 07:55:40 +0200 Subject: [PATCH 241/942] workflows: Run release workflow in release environment This partitions secrets and limits their potential exposure/leakage. This environment can be created with github-upload-action-secrets in [1]. [1] https://github.com/cockpit-project/bots/pull/2164 --- .github/workflows/release.yml.disabled | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index 0f611bb..98e2409 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -7,6 +7,7 @@ on: jobs: cockpituous: runs-on: ubuntu-latest + environment: release container: image: ghcr.io/cockpit-project/release steps: From 28466f72177a690798b7e62639573dc467624726 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 23 Jul 2021 07:24:35 +0200 Subject: [PATCH 242/942] webpack: Move from sassc to Dart sass Fixes #475 --- .github/workflows/livetest.yml.disabled | 2 +- package.json | 2 ++ webpack.config.js | 38 ++++++++++++++----------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/livetest.yml.disabled b/.github/workflows/livetest.yml.disabled index 3130783..37d4ea4 100644 --- a/.github/workflows/livetest.yml.disabled +++ b/.github/workflows/livetest.yml.disabled @@ -44,7 +44,7 @@ jobs: - name: Install dependencies run: | sudo apt update - sudo apt install -y cockpit-system cockpit-ws nodejs npm sassc make + sudo apt install -y cockpit-system cockpit-ws nodejs npm make - uses: actions/github-script@v3 id: get-pr diff --git a/package.json b/package.json index 80c09e2..5480494 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,8 @@ "mini-css-extract-plugin": "^0.11.0", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", + "sass": "^1.35.2", + "sass-loader": "^12.1.0", "sizzle": "^2.3.3", "stdio": "^2.1.0", "string-replace-loader": "^3.0.0", diff --git a/webpack.config.js b/webpack.config.js index e2caf5f..8b5aa1d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,4 @@ const path = require("path"); -const childProcess = require('child_process'); const copy = require("copy-webpack-plugin"); const extract = require("mini-css-extract-plugin"); @@ -37,22 +36,11 @@ if (production) { })); } -/* check if sassc is available, to avoid unintelligible error messages */ -try { - childProcess.execFileSync('sassc', ['--version'], { stdio: ['pipe', 'inherit', 'inherit'] }); -} catch (e) { - if (e.code === 'ENOENT') { - console.error("ERROR: You need to install the 'sassc' package to build this project."); - process.exit(1); - } else { - throw e; - } -} - module.exports = { mode: production ? 'production' : 'development', resolve: { - modules: [ nodedir ], + modules: [ nodedir, path.resolve(__dirname, 'src/lib') ], + alias: { 'font-awesome': path.resolve(nodedir, 'font-awesome-sass/assets/stylesheets') }, }, resolveLoader: { modules: [ nodedir, path.resolve(__dirname, 'src/lib') ], @@ -90,7 +78,7 @@ module.exports = { options: { sourceMap: true, url: false, - } + }, }, { loader: 'string-replace-loader', @@ -107,7 +95,15 @@ module.exports = { ] }, }, - 'sassc-loader', + { + loader: 'sass-loader', + options: { + sourceMap: !production, + sassOptions: { + outputStyle: production ? 'compressed' : undefined, + }, + }, + }, ] }, { @@ -122,7 +118,15 @@ module.exports = { url: false } }, - 'sassc-loader', + { + loader: 'sass-loader', + options: { + sourceMap: !production, + sassOptions: { + outputStyle: production ? 'compressed' : undefined, + }, + }, + }, ] }, ] From a509dde986e4d4ea02a5d9ce4c1bd1bd85e99047 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 23 Jul 2021 07:39:58 +0200 Subject: [PATCH 243/942] Update terser-webpack-plugin Following our other projects. --- cockpit-starter-kit.spec.in | 2 +- package.json | 2 +- packit.yaml | 2 +- webpack.config.js | 13 ++++++++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 32520fd..49c06fe 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -28,7 +28,7 @@ find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm %files %doc README.md -%license LICENSE dist/index.js.LICENSE.txt +%license LICENSE dist/index.js.LICENSE.txt.gz %{_datadir}/cockpit/* %{_datadir}/metainfo/* diff --git a/package.json b/package.json index 5480494..a36448f 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "sizzle": "^2.3.3", "stdio": "^2.1.0", "string-replace-loader": "^3.0.0", - "terser-webpack-plugin": "^2.0.1", + "terser-webpack-plugin": "^5.1.4", "webpack": "^5.31.0", "webpack-cli": "^4.6.0" }, diff --git a/packit.yaml b/packit.yaml index 33ec1ab..1b0e37f 100644 --- a/packit.yaml +++ b/packit.yaml @@ -12,7 +12,7 @@ actions: create-archive: - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 # dummy LICENSE.txt, as terser did not run - - touch dist/index.js.LICENSE.txt + - touch dist/index.js.LICENSE.txt.gz - make dist-gzip # starter-kit.git has no release tags; your project can drop this once you have a release get-current-version: make print-version diff --git a/webpack.config.js b/webpack.config.js index 8b5aa1d..5f4737b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -58,7 +58,18 @@ module.exports = { optimization: { minimize: production, - minimizer: [new TerserJSPlugin(), new CssMinimizerPlugin()], + minimizer: [ + new TerserJSPlugin({ + extractComments: { + condition: true, + filename: `[file].LICENSE.txt?query=[query]&filebase=[base]`, + banner(licenseFile) { + return `License information can be found in ${licenseFile}`; + }, + }, + }), + new CssMinimizerPlugin() + ], }, module: { From 8b7b3f246b8d1b3efc465152c33d62ce83d03edf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 23 Jul 2021 07:49:09 +0200 Subject: [PATCH 244/942] npm: Bump CSS loader --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a36448f..691465d 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "chrome-remote-interface": "^0.28.0", "compression-webpack-plugin": "^6.0.0", "copy-webpack-plugin": "^6.1.0", - "css-loader": "^4.3.0", - "css-minimizer-webpack-plugin": "^1.3.0", + "css-loader": "^5.2.0", + "css-minimizer-webpack-plugin": "^3.0.1", "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", "eslint-config-standard-react": "^9.2.0", From 0016765d016148f218e0b61c8b014fb31a7ff879 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 23 Jul 2021 08:18:34 +0200 Subject: [PATCH 245/942] Bump cockpit test API to 249 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fc61ece..98ba84c 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 242; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 249; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' From 3d227bcb36e67043d157d3a94f47fb29f8289b93 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 23 Jul 2021 08:23:42 +0200 Subject: [PATCH 246/942] Bump Cockpit pkg/lib to 249 Cockpit 247 changed cockpit-po-plugin.js to always expect a line number in msgid references [1]. Also sync manifest2po from Cockpit 249 to generate that reference for manifests, so that they keep getting included into the translation js. [1] https://github.com/cockpit-project/cockpit/commit/0ecc3a705d0cd6064 --- Makefile | 2 +- po/de.po | 2 +- po/manifest2po | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 98ba84c..baaee7c 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ test/common: # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 242; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 249; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg diff --git a/po/de.po b/po/de.po index 91b4e60..8d86d06 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgstr "Cockpit Bausatz" msgid "Running on $0" msgstr "Läuft auf $0" -#: src/manifest.json +#: src/manifest.json:0 msgid "Starter Kit" msgstr "Bausatz" diff --git a/po/manifest2po b/po/manifest2po index 9fc9ee5..46fa744 100755 --- a/po/manifest2po +++ b/po/manifest2po @@ -100,7 +100,7 @@ function process_keywords(keywords) { v.matches.forEach(keyword => push({ msgid: keyword, - locations: [ filename ] + locations: [ filename + ":0" ] }) ); }); @@ -110,7 +110,7 @@ function process_docs(docs) { docs.forEach(doc => { push({ msgid: doc.label, - locations: [ filename ] + locations: [ filename + ":0" ] }) }); } @@ -120,7 +120,7 @@ function process_menu(menu) { if (menu[m].label) { push({ msgid: menu[m].label, - locations: [ filename ] + locations: [ filename + ":0" ] }); } if (menu[m].keywords) From e44d170dab038becf5f0d68464e16d1ed201d2f7 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 31 Jul 2021 02:32:02 +0000 Subject: [PATCH 247/942] package.json: Update core-js Closes #478 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 691465d..5073c5e 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.115.2", "@patternfly/react-core": "4.135.0", - "core-js": "3.15.2", + "core-js": "3.16.0", "react": "16.14.0", "react-dom": "16.14.0" } From 61c708974a0e0ec135f424e420de803c201007b8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 6 Aug 2021 02:30:52 +0000 Subject: [PATCH 248/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #479 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5073c5e..db864f4 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.115.2", - "@patternfly/react-core": "4.135.0", + "@patternfly/patternfly": "4.125.3", + "@patternfly/react-core": "4.147.0", "core-js": "3.16.0", "react": "16.14.0", "react-dom": "16.14.0" From 40f3121e90770dd6fb6a05661b845f77038cb361 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 9 Aug 2021 02:29:30 +0000 Subject: [PATCH 249/942] package.json: Update core-js Closes #480 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db864f4..0fba7a1 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.125.3", "@patternfly/react-core": "4.147.0", - "core-js": "3.16.0", + "core-js": "3.16.1", "react": "16.14.0", "react-dom": "16.14.0" } From 91043e26c59def09b22dcb2acceed22baf71a509 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 18 Aug 2021 02:29:12 +0000 Subject: [PATCH 250/942] package.json: Update core-js Closes #481 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0fba7a1..e310396 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.125.3", "@patternfly/react-core": "4.147.0", - "core-js": "3.16.1", + "core-js": "3.16.2", "react": "16.14.0", "react-dom": "16.14.0" } From 92d7e38d49b14a6845c6941f31215de8a9458e1b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 25 Aug 2021 02:30:06 +0000 Subject: [PATCH 251/942] package.json: Update core-js Closes #482 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e310396..2a980db 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.125.3", "@patternfly/react-core": "4.147.0", - "core-js": "3.16.2", + "core-js": "3.16.3", "react": "16.14.0", "react-dom": "16.14.0" } From a84bd78b618204f44bcd2c86a729c6e29ac06071 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 27 Aug 2021 02:31:32 +0000 Subject: [PATCH 252/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #483 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2a980db..dcebf44 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.125.3", - "@patternfly/react-core": "4.147.0", + "@patternfly/patternfly": "4.132.2", + "@patternfly/react-core": "4.152.4", "core-js": "3.16.3", "react": "16.14.0", "react-dom": "16.14.0" From 78ea4a529ac34606899da9d409ef59b77e062704 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 30 Aug 2021 02:29:41 +0000 Subject: [PATCH 253/942] package.json: Update core-js Closes #484 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dcebf44..9bd8836 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.132.2", "@patternfly/react-core": "4.152.4", - "core-js": "3.16.3", + "core-js": "3.16.4", "react": "16.14.0", "react-dom": "16.14.0" } From fb4c4346c99f554ba118bb91bc872ae76e12e40d Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 2 Sep 2021 02:29:35 +0000 Subject: [PATCH 254/942] package.json: Update core-js Closes #485 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9bd8836..bfd1089 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.132.2", "@patternfly/react-core": "4.152.4", - "core-js": "3.16.4", + "core-js": "3.17.1", "react": "16.14.0", "react-dom": "16.14.0" } From c1f8802da6bef51b1924ce070afa8a021db12ba3 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 3 Sep 2021 02:30:47 +0000 Subject: [PATCH 255/942] package.json: Update core-js Closes #486 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bfd1089..ebcfbd4 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.132.2", "@patternfly/react-core": "4.152.4", - "core-js": "3.17.1", + "core-js": "3.17.2", "react": "16.14.0", "react-dom": "16.14.0" } From a44ef8bb61d560620d7f4f624dfcdec5ae483709 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 3 Sep 2021 07:16:33 +0200 Subject: [PATCH 256/942] cirrus CI: Move to Fedora 35 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 92aabeb..118fb21 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ container: test_task: env: matrix: - - TEST_OS: fedora-33 + - TEST_OS: fedora-35 - TEST_OS: centos-8-stream fix_kvm_script: sudo chmod 666 /dev/kvm From 0134d26783cf215c180091cb2a60876fa393a645 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 10 Sep 2021 02:31:52 +0000 Subject: [PATCH 257/942] package.json: Update core-js Closes #489 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ebcfbd4..9f60e60 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.132.2", "@patternfly/react-core": "4.152.4", - "core-js": "3.17.2", + "core-js": "3.17.3", "react": "16.14.0", "react-dom": "16.14.0" } From 03d8324c193028a6f9f96b929e71eaf85eb85ae8 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 3 Sep 2021 07:50:39 +0200 Subject: [PATCH 258/942] Makefile: Avoid moving node_modules/ during dist build This is ugly as it races with other make targets which expect node_modules/ to exist. It's also unnecessary, we can just tell tar to ignore node_modules/. --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index baaee7c..6bd204a 100644 --- a/Makefile +++ b/Makefile @@ -88,13 +88,11 @@ dist-gzip: $(TARFILE) $(TARFILE): export NODE_ENV=production $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi - mv node_modules node_modules.release touch -r package.json $(NODE_MODULES_TEST) touch dist/* tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ - --exclude cockpit-$(PACKAGE_NAME).spec.in \ + --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ $$(git ls-files) $(LIB_TEST) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ - mv node_modules.release node_modules srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec rpmbuild -bs \ From e49b2747bcc91a9e4e64fce699c664ead5728c14 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 8 Sep 2021 14:20:43 +0200 Subject: [PATCH 259/942] Makefile: Avoid `npm` dependency for building webpack Avoid the indirection, and directly call webpack. This avoids adding an `npm` build dependency if/when the RPM wants to rebuild the webpack during package build. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6bd204a..b3ece23 100644 --- a/Makefile +++ b/Makefile @@ -55,10 +55,10 @@ update-po: po/$(PACKAGE_NAME).pot sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ $(WEBPACK_TEST): $(NODE_MODULES_TEST) $(LIB_TEST) $(shell find src/ -type f) package.json webpack.config.js - NODE_ENV=$(NODE_ENV) npm run build + NODE_ENV=$(NODE_ENV) node_modules/.bin/webpack watch: - NODE_ENV=$(NODE_ENV) npm run watch + NODE_ENV=$(NODE_ENV) node_modules/.bin/webpack --watch clean: rm -rf dist/ From 94194c51870348f7ec9f5ff86b9330d90ade3e42 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 3 Sep 2021 09:32:31 +0200 Subject: [PATCH 260/942] Makefile: Ship full src/lib/ in release tarballs Otherwise it is incomplete and can't be rebuilt. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b3ece23..68b904a 100644 --- a/Makefile +++ b/Makefile @@ -92,7 +92,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec touch dist/* tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ - $$(git ls-files) $(LIB_TEST) src/lib/patternfly/*.scss package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ + $$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec rpmbuild -bs \ From 26be6c8540244c42bb5c48d2bd5563c645bb0fee Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 2 Sep 2021 15:59:29 +0200 Subject: [PATCH 261/942] Add a `make node-cache` The node_modules cache tarball will be published as release artifact, to make sure that any release can be rebuilt in a reproducible way. Cockpituous' release-source will call this if available: https://github.com/cockpit-project/cockpituous/pull/438 --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68b904a..48a8c69 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ TEST_OS = centos-8-stream endif export TEST_OS TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz +NODE_CACHE=cockpit-$(PACKAGE_NAME)-node-$(VERSION).tar.xz RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran @@ -94,6 +95,11 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ $$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ +$(NODE_CACHE): $(NODE_MODULES_TEST) + tar --xz -cf $@ node_modules + +node-cache: $(NODE_CACHE) + srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec rpmbuild -bs \ --define "_sourcedir `pwd`" \ @@ -164,4 +170,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist-gzip srpm rpm check vm update-po +.PHONY: all clean install devel-install print-version dist-gzip node-cache srpm rpm check vm update-po From 4ca75f143c40794ee22799da4780cc2154c757c6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 9 Sep 2021 14:17:55 +0200 Subject: [PATCH 262/942] Move to xz dist tarballs For consistency with the already xz'ed node tarball. Rename the oddly named `dist-gzip` target to the standard `dist`. --- .gitignore | 2 +- Makefile | 8 ++++---- README.md | 2 +- cockpit-starter-kit.spec.in | 2 +- packit.yaml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 59b5f3d..3eaef89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *~ *.retry -*.tar.gz +*.tar.xz *.rpm node_modules/ dist/ diff --git a/Makefile b/Makefile index 48a8c69..e8aa2a5 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ ifeq ($(TEST_OS),) TEST_OS = centos-8-stream endif export TEST_OS -TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz +TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz NODE_CACHE=cockpit-$(PACKAGE_NAME)-node-$(VERSION).tar.xz RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) @@ -79,7 +79,7 @@ devel-install: $(WEBPACK_TEST) print-version: @echo "$(VERSION)" -dist-gzip: $(TARFILE) +dist: $(TARFILE) @ls -1 $(TARFILE) # when building a distribution tarball, call webpack with a 'production' environment @@ -91,7 +91,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi touch -r package.json $(NODE_MODULES_TEST) touch dist/* - tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ + tar --xz -cf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ $$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ @@ -170,4 +170,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist-gzip node-cache srpm rpm check vm update-po +.PHONY: all clean install devel-install print-version dist node-cache srpm rpm check vm update-po diff --git a/README.md b/README.md index 7b9e3c2..73d76b3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ make `make install` compiles and installs the package in `/usr/share/cockpit/`. The convenience targets `srpm` and `rpm` build the source and binary rpms, -respectively. Both of these make use of the `dist-gzip` target, which is used +respectively. Both of these make use of the `dist` target, which is used to generate the distribution tarball. In `production` mode, source files are automatically minified and compressed. Set `NODE_ENV=production` if you want to duplicate this behavior. diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 49c06fe..76379ff 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPLv2+ -Source: cockpit-starter-kit-%{version}.tar.gz +Source: cockpit-starter-kit-%{version}.tar.xz BuildArch: noarch BuildRequires: make BuildRequires: libappstream-glib diff --git a/packit.yaml b/packit.yaml index 1b0e37f..ad67ffe 100644 --- a/packit.yaml +++ b/packit.yaml @@ -13,7 +13,7 @@ actions: - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 # dummy LICENSE.txt, as terser did not run - touch dist/index.js.LICENSE.txt.gz - - make dist-gzip + - make dist # starter-kit.git has no release tags; your project can drop this once you have a release get-current-version: make print-version jobs: From 9574611768d66728983835a77437851cfcc67ca9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 3 Sep 2021 09:39:04 +0200 Subject: [PATCH 263/942] Rebuild webpack during RPM build This is necessary to comply with Fedora's packaging policy: https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/ Include the node cache in the source rpm, unpack it into the main source dir, and force a webpack rebuild in `%build`. --- Makefile | 4 ++-- cockpit-starter-kit.spec.in | 12 ++++++++++-- packit.yaml | 7 ++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e8aa2a5..d9adb8d 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ $(NODE_CACHE): $(NODE_MODULES_TEST) node-cache: $(NODE_CACHE) -srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec +srpm: $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_srcrpmdir `pwd`" \ @@ -108,7 +108,7 @@ srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec rpm: $(RPMFILE) -$(RPMFILE): $(TARFILE) cockpit-$(PACKAGE_NAME).spec +$(RPMFILE): $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec mkdir -p "`pwd`/output" mkdir -p "`pwd`/rpmbuild" rpmbuild -bb \ diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 76379ff..60d6b18 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -4,8 +4,10 @@ Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPLv2+ -Source: cockpit-starter-kit-%{version}.tar.xz +Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-%{version}.tar.xz +Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-node-%{version}.tar.xz BuildArch: noarch +BuildRequires: nodejs BuildRequires: make BuildRequires: libappstream-glib @@ -17,7 +19,13 @@ Requires: cockpit-system Cockpit Starter Kit Example Module %prep -%setup -n cockpit-starter-kit +%setup -q -n cockpit-starter-kit +%setup -q -a 1 -n cockpit-starter-kit + +%build +# ignore pre-built webpack in release tarball and rebuild it +rm -rf dist +NODE_ENV=production make %install %make_install diff --git a/packit.yaml b/packit.yaml index ad67ffe..eab91f3 100644 --- a/packit.yaml +++ b/packit.yaml @@ -4,7 +4,12 @@ specfile_path: cockpit-starter-kit.spec actions: - post-upstream-clone: make cockpit-starter-kit.spec + post-upstream-clone: + post-upstream-clone: + - make cockpit-starter-kit.spec + # replace Source1 manually, as create-archive: can't handle multiple tarballs + - make node-cache + - sh -c 'sed -i "/^Source1:/ s/https:.*/$(ls *-node*.tar.xz)/" cockpit-*.spec' # build in development mode; production mode uses too much memory for limited # sandcastle containers; also reduce memory consumption of webpack # https://github.com/packit/sandcastle/pull/92 From 6ff3b7d6bcf2ba78b5d2c70ff3f6a5076e5837e5 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 13 Sep 2021 18:38:32 +0200 Subject: [PATCH 264/942] .gitignore: add tmp directory Include to tmp/ directory to be ignored, it usually contains temporary vm-run images. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3eaef89..7e82360 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ test/images/ src/lib/ *.pot POTFILES* +tmp/ From 64b83498aaafcaf2b40fb857cf75919c6158cdb4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 16 Sep 2021 08:53:20 +0200 Subject: [PATCH 265/942] Makefile: Avoid cockpit-po-plugin.js hardlink in dist tarball Drop the redundant `$(LIB_TEST)` from the tar file list; it is src/lib/cockpit-po-plugin.js, which is already contained in src/lib, and tar turns that into an unsightly hardlink. See https://github.com/cockpit-project/cockpit-machines/issues/379 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d9adb8d..818cdd9 100644 --- a/Makefile +++ b/Makefile @@ -93,7 +93,7 @@ $(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec touch dist/* tar --xz -cf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ - $$(git ls-files) $(LIB_TEST) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ + $$(git ls-files) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) tar --xz -cf $@ node_modules From cd0b88682d17115cfeb65921d92a54a497d19536 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 16 Sep 2021 09:05:13 +0200 Subject: [PATCH 266/942] Bump cockpit lib and test framework to 253 No changes necessary. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 818cdd9..b869d58 100644 --- a/Makefile +++ b/Makefile @@ -151,14 +151,14 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 249; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 253; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 249; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 253; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg From a5f319b804e3e066e27295fe7e812ee2d4fdcbe1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 16 Sep 2021 09:12:35 +0200 Subject: [PATCH 267/942] spec: Avoid repeating package name Use rpm's `%{name}` macro instead. This makes it easier for forks to keep the spec file in sync. --- cockpit-starter-kit.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index 60d6b18..ae9f021 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -4,8 +4,8 @@ Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module License: LGPLv2+ -Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-%{version}.tar.xz -Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/cockpit-starter-kit-node-%{version}.tar.xz +Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz +Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz BuildArch: noarch BuildRequires: nodejs BuildRequires: make @@ -19,8 +19,8 @@ Requires: cockpit-system Cockpit Starter Kit Example Module %prep -%setup -q -n cockpit-starter-kit -%setup -q -a 1 -n cockpit-starter-kit +%setup -q -n %{name} +%setup -q -a 1 -n %{name} %build # ignore pre-built webpack in release tarball and rebuild it From aa1b3cb713dec3ebbda7c9600540621bf54b0369 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 20 Sep 2021 02:32:09 +0000 Subject: [PATCH 268/942] package.json: Update core-js Closes #494 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9f60e60..0f53b5f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.132.2", "@patternfly/react-core": "4.152.4", - "core-js": "3.17.3", + "core-js": "3.18.0", "react": "16.14.0", "react-dom": "16.14.0" } From a8e052a78d3c1dde929c0dc2a6ac99f24e8acf51 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Tue, 21 Sep 2021 02:31:34 +0000 Subject: [PATCH 269/942] package.json: Update @patternfly/react-core, @patternfly/patternfly Closes #495 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0f53b5f..6952be7 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.132.2", - "@patternfly/react-core": "4.152.4", + "@patternfly/patternfly": "4.135.2", + "@patternfly/react-core": "4.157.3", "core-js": "3.18.0", "react": "16.14.0", "react-dom": "16.14.0" From 3220617fec508aabbbc226a87a165c21fb72e913 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 21 Sep 2021 08:33:25 +0200 Subject: [PATCH 270/942] webpack: Avoid md4 hash for OpenSSL 3 compatibility CentOS/RHEL 9 switched to OpenSSL 3, which does not support the `md4` hash any more. webpack 5 hardcodes that in no less than 21 places, so monkey-patch `crypto.createHash()` to substitute sha256 for md4. Hack to work around https://github.com/webpack/webpack/issues/13572 --- webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 5f4737b..0cc78d3 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,6 +8,11 @@ const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); +// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all over the place: https://github.com/webpack/webpack/issues/13572 +const crypto = require("crypto"); +const crypto_orig_createHash = crypto.createHash; +crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); + const webpack = require("webpack"); const nodedir = path.resolve((process.env.SRCDIR || __dirname), "node_modules"); From 7dc9fda24155c1cfccc1b218d09abe71d4483848 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 21 Sep 2021 09:56:52 +0200 Subject: [PATCH 271/942] eslint: Enable no-var rule `var` has broken/unexpected scoping in JavaScript, and can lead to subtle errors. It's preferable and safer to use `const` whenever possible, and `let` where necessary. There are no usages of `var` in starter-kit right now, so just enable the rule to ensure that it stays that way. --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index 4572422..eaa27d8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,6 +23,7 @@ "ignoredNodes": [ "JSXAttribute" ] }], "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }], + "no-var": "error", "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], "react/jsx-indent": ["error", 4], From 6e2d0dd01c3bb25e6e6287004e51fc36eef787ca Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 27 Sep 2021 02:32:11 +0000 Subject: [PATCH 272/942] package.json: Update core-js Closes #498 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6952be7..fb5aae9 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.135.2", "@patternfly/react-core": "4.157.3", - "core-js": "3.18.0", + "core-js": "3.18.1", "react": "16.14.0", "react-dom": "16.14.0" } From 11da2d284b4ef5dc84fd8d9ffcf1daea5c60430b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 6 Oct 2021 02:32:07 +0000 Subject: [PATCH 273/942] package.json: Update core-js Closes #499 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fb5aae9..4e11d66 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.135.2", "@patternfly/react-core": "4.157.3", - "core-js": "3.18.1", + "core-js": "3.18.2", "react": "16.14.0", "react-dom": "16.14.0" } From 0bc01714ee7d2e40ec305eeac18919c5a6241d04 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Oct 2021 09:15:46 +0200 Subject: [PATCH 274/942] fmf: Run tests with firefox Chromium has started to crash in current Fedora, and is not easily available in RHEL. Install bzip2 to unpack the nightly tarball. --- test/browser/browser.sh | 17 +++++++---------- test/browser/main.fmf | 1 + 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index 4a48f9e..ca90003 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -12,15 +12,12 @@ LOGS="$(pwd)/logs" mkdir -p "$LOGS" chmod a+w "$LOGS" -# install browser; on RHEL, use chromium from epel -# HACK: chromium-headless ought to be enough, but version 88 has a crash: https://bugs.chromium.org/p/chromium/issues/detail?id=1170634 -if ! rpm -q chromium; then - if grep -q 'ID=.*rhel' /etc/os-release; then - dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - dnf config-manager --enable epel - fi - dnf install -y chromium -fi +# install firefox (available everywhere in Fedora and RHEL); install the package to pull in all the dependencies +# we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) +dnf install --disablerepo=fedora-cisco-openh264 -y firefox +# install nightly for Chrome DevTools Protocol support +curl --location 'https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US' | tar -C /usr/local/lib/ -xj +ln -s /usr/local/lib/firefox/firefox /usr/local/bin/ # create user account for logging in if ! id admin 2>/dev/null; then @@ -50,7 +47,7 @@ echo core > /proc/sys/kernel/core_pattern systemctl enable --now cockpit.socket # Run tests as unprivileged user -su - -c "env SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest +su - -c "env TEST_BROWSER=firefox SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest RC=$(cat $LOGS/exitcode) exit ${RC:-1} diff --git a/test/browser/main.fmf b/test/browser/main.fmf index a08584c..8302e30 100644 --- a/test/browser/main.fmf +++ b/test/browser/main.fmf @@ -4,6 +4,7 @@ require: - cockpit-starter-kit - cockpit-ws - cockpit-system + - bzip2 - git - glibc-langpack-de - libvirt-python3 From 5d15bdac5c7c2ee72f768f0a5fd6ac8715711c13 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Oct 2021 09:22:41 +0200 Subject: [PATCH 275/942] fmf: Dependency installation robustification Sync some improvements from cockpit-machines: * Unbreak running `tmt` in local trees with an already existing ./bots symlink. * Don't install all NPM packages, only chrome-remote-interface and sizzle. * Disable detection of affected tests, taking too long for real projects. --- test/browser/run-test.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index a3c7585..97bdcbd 100755 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -4,11 +4,21 @@ set -eux # tests need cockpit's bots/ libraries and test infrastructure cd $SOURCE git init +rm -f bots # common local case: existing bots symlink make bots test/common -# only install a subset to save time/space -rm -f package-lock.json # otherwise the command below installs *everything*, argh -npm install chrome-remote-interface sizzle +# support running from clean git tree +if [ ! -d node_modules/chrome-remote-interface ]; then + # copy package.json temporarily otherwise npm might try to install the dependencies from it + rm -f package-lock.json # otherwise the command below installs *everything*, argh + mv package.json .package.json + # only install a subset to save time/space + npm install chrome-remote-interface sizzle + mv .package.json package.json +fi + +# disable detection of affected tests; testing takes too long as there is no parallelization +mv .git dot-git . /etc/os-release export TEST_OS="${ID}-${VERSION_ID/./-}" From 72c15c4b82436a4623ead4ab91ba245716c91be9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Oct 2021 09:25:01 +0200 Subject: [PATCH 276/942] packit: Enable CentOS Stream 8 --- packit.yaml | 1 + test/browser/run-test.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/packit.yaml b/packit.yaml index eab91f3..4a8f605 100644 --- a/packit.yaml +++ b/packit.yaml @@ -27,3 +27,4 @@ jobs: metadata: targets: - fedora-all + - centos-stream-8 diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index 97bdcbd..0aee3c6 100755 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -24,6 +24,10 @@ mv .git dot-git export TEST_OS="${ID}-${VERSION_ID/./-}" export TEST_AUDIT_NO_SELINUX=1 +if [ "$TEST_OS" = "centos-8" ]; then + TEST_OS=centos-8-stream +fi + EXCLUDES="" RC=0 From 8074af0fbdf2484bd4e2bf47015bae721834e63e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 7 Oct 2021 09:50:36 +0200 Subject: [PATCH 277/942] fmf: Only install git-core We don't need all the bells and whistles of the full git package. --- test/browser/main.fmf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/main.fmf b/test/browser/main.fmf index 8302e30..d2dddd6 100644 --- a/test/browser/main.fmf +++ b/test/browser/main.fmf @@ -5,7 +5,7 @@ require: - cockpit-ws - cockpit-system - bzip2 - - git + - git-core - glibc-langpack-de - libvirt-python3 - make From 0abeda35284b84e49780aeca6e0df3fcfaafb737 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 12 Oct 2021 06:26:17 +0200 Subject: [PATCH 278/942] webpack: Use default resolve path for npm 7 compatibility npm 7 changed how it resolves dependencies, and starter-kit fails to build with lots of unresolved peer dependencies of PatternFly. With an absolute path, `resolve.modules` will only look in that directory; the default is a relative path "node_modules" that just works [1]. Use that default, as we don't use `$SRCDIR` in this project anyway. [1] https://webpack.js.org/configuration/resolve/#resolvemodules --- webpack.config.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 0cc78d3..600e5ee 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,8 +15,6 @@ crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sh const webpack = require("webpack"); -const nodedir = path.resolve((process.env.SRCDIR || __dirname), "node_modules"); - /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; @@ -44,11 +42,11 @@ if (production) { module.exports = { mode: production ? 'production' : 'development', resolve: { - modules: [ nodedir, path.resolve(__dirname, 'src/lib') ], - alias: { 'font-awesome': path.resolve(nodedir, 'font-awesome-sass/assets/stylesheets') }, + modules: [ "node_modules", path.resolve(__dirname, 'src/lib') ], + alias: { 'font-awesome': 'font-awesome-sass/assets/stylesheets' }, }, resolveLoader: { - modules: [ nodedir, path.resolve(__dirname, 'src/lib') ], + modules: [ "node_modules", path.resolve(__dirname, 'src/lib') ], }, watchOptions: { ignored: /node_modules/, From 4e0dce1ca60978a3b8ab0d4768dc907ea890da91 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 13 Oct 2021 02:34:58 +0000 Subject: [PATCH 279/942] package.json: Update core-js Closes #502 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4e11d66..645bd98 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.135.2", "@patternfly/react-core": "4.157.3", - "core-js": "3.18.2", + "core-js": "3.18.3", "react": "16.14.0", "react-dom": "16.14.0" } From 0a022058692061b21f8b8ecf287dd1b341a31561 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 15 Oct 2021 02:33:08 +0000 Subject: [PATCH 280/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #503 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 645bd98..73b8dc7 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.135.2", - "@patternfly/react-core": "4.157.3", + "@patternfly/patternfly": "4.144.5", + "@patternfly/react-core": "4.162.3", "core-js": "3.18.3", "react": "16.14.0", "react-dom": "16.14.0" From f8024eb1f02af57de13128c93ad88f0c355e8ebd Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Tue, 26 Oct 2021 02:32:08 +0000 Subject: [PATCH 281/942] package.json: Update core-js Closes #504 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 73b8dc7..23ac0a3 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.144.5", "@patternfly/react-core": "4.162.3", - "core-js": "3.18.3", + "core-js": "3.19.0", "react": "16.14.0", "react-dom": "16.14.0" } From a302255b3a3569cfcf4b325ef0393cbc37849d1c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 30 Oct 2021 02:32:29 +0000 Subject: [PATCH 282/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #505 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 23ac0a3..27b83a7 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.144.5", - "@patternfly/react-core": "4.162.3", + "@patternfly/patternfly": "4.151.4", + "@patternfly/react-core": "4.168.8", "core-js": "3.19.0", "react": "16.14.0", "react-dom": "16.14.0" From 3536eafd5a4b44925c41c54360ec5d1839b34d7f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 3 Nov 2021 02:32:26 +0000 Subject: [PATCH 283/942] package.json: Update core-js Closes #506 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27b83a7..a1ed7e2 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.151.4", "@patternfly/react-core": "4.168.8", - "core-js": "3.19.0", + "core-js": "3.19.1", "react": "16.14.0", "react-dom": "16.14.0" } From c04d951964a67ac7a1205d97f3fd333e2ad47ba3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 16 Nov 2021 11:01:23 +0100 Subject: [PATCH 284/942] packit: Run tests on CentOS 9 stream --- packit.yaml | 1 + test/browser/run-test.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packit.yaml b/packit.yaml index 4a8f605..15f9f1e 100644 --- a/packit.yaml +++ b/packit.yaml @@ -28,3 +28,4 @@ jobs: targets: - fedora-all - centos-stream-8 + - centos-stream-9 diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index 0aee3c6..99b8029 100755 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -24,8 +24,8 @@ mv .git dot-git export TEST_OS="${ID}-${VERSION_ID/./-}" export TEST_AUDIT_NO_SELINUX=1 -if [ "$TEST_OS" = "centos-8" ]; then - TEST_OS=centos-8-stream +if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then + TEST_OS="${TEST_OS}-stream" fi EXCLUDES="" From 833326148fe07c5f64519f9537865b8a27f6f537 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Fri, 19 Nov 2021 02:35:00 +0000 Subject: [PATCH 285/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #509 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a1ed7e2..c40915d 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.6.0" }, "dependencies": { - "@patternfly/patternfly": "4.151.4", - "@patternfly/react-core": "4.168.8", + "@patternfly/patternfly": "4.159.1", + "@patternfly/react-core": "4.175.4", "core-js": "3.19.1", "react": "16.14.0", "react-dom": "16.14.0" From 5966735547a7e8a39693b64c438c0eb5efd7b1bb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 19 Nov 2021 09:37:33 +0100 Subject: [PATCH 286/942] po: Pick up also strings with specified context Strings like `_("Context", "String to translate")` were not picked up. Taken from https://github.com/cockpit-project/cockpit/commit/ba95d680d2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b869d58..dc2cf09 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ LINGUAS=$(basename $(notdir $(wildcard po/*.po))) po/$(PACKAGE_NAME).js.pot: xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \ - --keyword=_:1,1t --keyword=_:1c,2,1t --keyword=C_:1c,2 \ + --keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \ --keyword=N_ --keyword=NC_:1c,2 \ --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ From 4820c2b7403a3efa870d33c0f661d861f3835c56 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Nov 2021 08:48:05 +0100 Subject: [PATCH 287/942] test: Adjust language changing for Cockpit 258 That version rewrote the Shell in React, the ids/classes changed. --- test/check-application | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/check-application b/test/check-application index 2a13ce3..7adf2cd 100755 --- a/test/check-application +++ b/test/check-application @@ -34,12 +34,17 @@ class TestApplication(testlib.MachineCase): b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname) # change language to German + # the menu and dialog changed several times b.switch_to_top() - b.click("#navbar-dropdown") - b.click(".display-language-menu a") - b.wait_popup('display-language') - # the dialog changed several times cockpit_version = float(m.execute("cockpit-bridge --version | sed -n '/Version:/ s/^.*: //p'").strip()) + if cockpit_version >= 258: + b.click("#toggle-menu") + b.click(".display-language-menu") + b.wait_popup('display-language-modal') + else: + b.click("#navbar-dropdown") + b.click(".display-language-menu a") + b.wait_popup('display-language') if cockpit_version >= 242: b.click("#display-language-modal [data-value='de-de'] button") b.click("#display-language-modal button.pf-m-primary") From 67c1c065e913b0c7714215131bf64fc69b3a5856 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Nov 2021 06:50:32 +0100 Subject: [PATCH 288/942] package.json: Drop core-js starter-kit does not use it directly, and none of our derived projects have it. --- package.json | 1 - src/index.js | 2 -- 2 files changed, 3 deletions(-) diff --git a/package.json b/package.json index c40915d..41e5068 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "dependencies": { "@patternfly/patternfly": "4.159.1", "@patternfly/react-core": "4.175.4", - "core-js": "3.19.1", "react": "16.14.0", "react-dom": "16.14.0" } diff --git a/src/index.js b/src/index.js index 11a1c9c..a0e5c45 100644 --- a/src/index.js +++ b/src/index.js @@ -19,8 +19,6 @@ import "./lib/patternfly/patternfly-4-cockpit.scss"; -import "core-js/stable"; - import React from 'react'; import ReactDOM from 'react-dom'; import { Application } from './app.jsx'; From 11ff944f2ccad1e9a2dd1bce892415577ff2ba2e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Nov 2021 06:57:45 +0100 Subject: [PATCH 289/942] package.json: Update various development packages These work without any source changes. Don't update copy-webpack-plugin to the latest 10 major release, but keep it at 9. 10 breaks compatibility with node.js 10, but that is still the default in CentOS 8 stream (and we can't select the newer modules in the spec or packit.yml). --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 41e5068..0f73892 100644 --- a/package.json +++ b/package.json @@ -17,10 +17,10 @@ "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.6", - "chrome-remote-interface": "^0.28.0", - "compression-webpack-plugin": "^6.0.0", - "copy-webpack-plugin": "^6.1.0", - "css-loader": "^5.2.0", + "chrome-remote-interface": "^0.31.0", + "compression-webpack-plugin": "^9.0.0", + "copy-webpack-plugin": "^9.0.0", + "css-loader": "^6.5.0", "css-minimizer-webpack-plugin": "^3.0.1", "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", @@ -35,7 +35,7 @@ "eslint-webpack-plugin": "^2.5.3", "htmlparser": "^1.7.7", "jed": "^1.1.1", - "mini-css-extract-plugin": "^0.11.0", + "mini-css-extract-plugin": "^2.4.5", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", "sass": "^1.35.2", From 150e59c54890774b9a9a1f4c67ca5c2d30a3b11f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Nov 2021 07:14:45 +0100 Subject: [PATCH 290/942] package.json: Update React to 17 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0f73892..ef8ba5f 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@patternfly/patternfly": "4.159.1", "@patternfly/react-core": "4.175.4", - "react": "16.14.0", - "react-dom": "16.14.0" + "react": "17.0.2", + "react-dom": "17.0.2" } } From aa8308c3800defe77aaa6d4c1b5a326fb600f156 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 29 Nov 2021 09:58:18 +0100 Subject: [PATCH 291/942] test: Drop obsolete language switcher cases The oldest release which we support is 251 from RHEL/CentOS 8.5, so we don't need the older cases any more. Also move to MachineCase.system_before(). --- test/check-application | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/test/check-application b/test/check-application index 7adf2cd..3b7ec27 100755 --- a/test/check-application +++ b/test/check-application @@ -34,26 +34,18 @@ class TestApplication(testlib.MachineCase): b.wait_in_text(".pf-c-alert__title", "Running on new-" + hostname) # change language to German - # the menu and dialog changed several times b.switch_to_top() - cockpit_version = float(m.execute("cockpit-bridge --version | sed -n '/Version:/ s/^.*: //p'").strip()) - if cockpit_version >= 258: - b.click("#toggle-menu") - b.click(".display-language-menu") - b.wait_popup('display-language-modal') - else: + # the menu and dialog changed several times + if self.system_before(258): b.click("#navbar-dropdown") b.click(".display-language-menu a") b.wait_popup('display-language') - if cockpit_version >= 242: - b.click("#display-language-modal [data-value='de-de'] button") - b.click("#display-language-modal button.pf-m-primary") - elif cockpit_version >= 233: - b.set_val("#display-language-modal select", "de-de") - b.click("#display-language-modal button.pf-m-primary") else: - b.set_val("#display-language select", "de-de") - b.click("#display-language-select-button") + b.click("#toggle-menu") + b.click(".display-language-menu") + b.wait_popup('display-language-modal') + b.click("#display-language-modal [data-value='de-de'] button") + b.click("#display-language-modal button.pf-m-primary") b.expect_load() # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) b.reload(ignore_cache=True) From db6397050a92d2295c8c4d3a95c5e23c8b372011 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 14 Dec 2021 08:47:04 +0100 Subject: [PATCH 292/942] webpack: Drop unused import See https://github.com/cockpit-project/cockpit-podman/issues/855 --- webpack.config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 600e5ee..667a58c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,8 +13,6 @@ const crypto = require("crypto"); const crypto_orig_createHash = crypto.createHash; crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); -const webpack = require("webpack"); - /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; From 7e2f3d2b5ca7142a336c763588da4e334c0d261a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 14 Dec 2021 09:13:48 +0100 Subject: [PATCH 293/942] webpack: Drop obsolete md4 hash hack webpack 5.54 solved this properly, bump the dependency. --- package.json | 4 ++-- webpack.config.js | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index ef8ba5f..ae24af9 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "stdio": "^2.1.0", "string-replace-loader": "^3.0.0", "terser-webpack-plugin": "^5.1.4", - "webpack": "^5.31.0", - "webpack-cli": "^4.6.0" + "webpack": "^5.54.0", + "webpack-cli": "^4.9.1" }, "dependencies": { "@patternfly/patternfly": "4.159.1", diff --git a/webpack.config.js b/webpack.config.js index 667a58c..5c2bdd4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,11 +8,6 @@ const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); -// HACK: OpenSSL 3 does not support md4 any more, but webpack hardcodes it all over the place: https://github.com/webpack/webpack/issues/13572 -const crypto = require("crypto"); -const crypto_orig_createHash = crypto.createHash; -crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); - /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; From 7be9253229b71c98cfd0771a38c226d8d01f05e1 Mon Sep 17 00:00:00 2001 From: Garrett LeSage Date: Tue, 14 Dec 2021 11:56:23 +0100 Subject: [PATCH 294/942] Fix spelling error found by codespell --- .github/workflows/livetest.yml.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/livetest.yml.disabled b/.github/workflows/livetest.yml.disabled index 37d4ea4..097a5c0 100644 --- a/.github/workflows/livetest.yml.disabled +++ b/.github/workflows/livetest.yml.disabled @@ -73,7 +73,7 @@ jobs: run: make && sudo make install - name: Create a new test user - # WARNING: if you want to add this users to sudoers make sure to propertly delete the SINK_SSHRELAY_PRIVATE + # WARNING: if you want to add this users to sudoers make sure to properly delete the SINK_SSHRELAY_PRIVATE run: sudo useradd --create-home livetest; echo livetest:foobar | sudo chpasswd - name: Get the commit SHA that triggered the workflow From 9e162423ebac0bb9dcc0769000fee1a873cd9f5d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 15 Dec 2021 07:50:02 +0100 Subject: [PATCH 295/942] fmf: Go back to firefox distro version By now the packaged firefox contains CDP. This makes the tests more robust against CDP breakage in nightly. --- test/browser/browser.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index ca90003..ce9509d 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -12,12 +12,9 @@ LOGS="$(pwd)/logs" mkdir -p "$LOGS" chmod a+w "$LOGS" -# install firefox (available everywhere in Fedora and RHEL); install the package to pull in all the dependencies +# install firefox (available everywhere in Fedora and RHEL) # we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) dnf install --disablerepo=fedora-cisco-openh264 -y firefox -# install nightly for Chrome DevTools Protocol support -curl --location 'https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US' | tar -C /usr/local/lib/ -xj -ln -s /usr/local/lib/firefox/firefox /usr/local/bin/ # create user account for logging in if ! id admin 2>/dev/null; then From 2e17e9a79ba35e5ebc25b857fbd6b9113ea3ebfc Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 15 Dec 2021 02:37:27 +0000 Subject: [PATCH 296/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #518 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ae24af9..04d0c43 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.159.1", - "@patternfly/react-core": "4.175.4", + "@patternfly/patternfly": "4.164.2", + "@patternfly/react-core": "4.181.1", "react": "17.0.2", "react-dom": "17.0.2" } From ba3913caa0b7ade66a79789b3c3e1debf9f04822 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 15 Dec 2021 11:07:33 +0100 Subject: [PATCH 297/942] fmf: Work around missing /etc/nsswitch.conf in Fedora Rawhide Upgrading glibc in Rawhide now (semi-intentionally) removes /etc/nsswitch.conf, but does not enforce installing a new enough pam/authselect to ensure that it gets re-added. This breaks resolving "localhost". Reported as https://bugzilla.redhat.com/show_bug.cgi?id=2033020 --- test/browser/browser.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index ce9509d..cd88a9a 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -12,6 +12,9 @@ LOGS="$(pwd)/logs" mkdir -p "$LOGS" chmod a+w "$LOGS" +# HACK: https://bugzilla.redhat.com/show_bug.cgi?id=2033020 +dnf update -y pam || true + # install firefox (available everywhere in Fedora and RHEL) # we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) dnf install --disablerepo=fedora-cisco-openh264 -y firefox From 9662fb2ffc656547e2f918e86bd05e4734e61db4 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 4 Jan 2022 13:20:03 +0100 Subject: [PATCH 298/942] Add ability to rsync artifacts to a remote machine Use the CockpitRsyncWebpack plugin to optionally rsync build code to a remote machine, the destination is determined by looking at the package.json's name field. --- Makefile | 2 +- README.md | 6 ++++++ webpack.config.js | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc2cf09..9590ee8 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ test/common: # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 253; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git e224a0296cd25a448d70810a4c114bac574b82dd; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg diff --git a/README.md b/README.md index 73d76b3..488b781 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,12 @@ or $ make watch +When developing against a virtual machine, webpack can also automatically upload +the code changes by setting the `RSYNC` environment variable to +the remote hostname. + + $ RSYNC=c make watch + # Running eslint Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check diff --git a/webpack.config.js b/webpack.config.js index 5c2bdd4..2e0bd0b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,4 @@ +const fs = require("fs"); const path = require("path"); const copy = require("copy-webpack-plugin"); @@ -7,10 +8,14 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); +const CockpitRsyncPlugin = require("./src/lib/cockpit-rsync-plugin"); /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; +// Obtain package name from package.json +const packageJson = JSON.parse(fs.readFileSync('package.json')); + // Non-JS files which are copied verbatim to dist/ const copy_files = [ "./src/index.html", @@ -22,6 +27,7 @@ const plugins = [ new extract({filename: "[name].css"}), new ESLintPlugin({ extensions: ["js", "jsx"] }), new CockpitPoPlugin(), + new CockpitRsyncPlugin({dest: packageJson.name}), ]; /* Only minimize when in production mode */ From a9b9484166fe8b6a3cfe9051a46748303be0ccc7 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 17 Jan 2022 10:25:45 +0100 Subject: [PATCH 299/942] webpack: Fail on eslint warnings Ensures we don't merge code with eslint warnings. --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 2e0bd0b..d7eebca 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -25,7 +25,10 @@ const copy_files = [ const plugins = [ new copy({ patterns: copy_files }), new extract({filename: "[name].css"}), - new ESLintPlugin({ extensions: ["js", "jsx"] }), + new ESLintPlugin({ + extensions: ["js", "jsx"], + failOnWarning: true, + }), new CockpitPoPlugin(), new CockpitRsyncPlugin({dest: packageJson.name}), ]; From 96e9c669adc541301387a25a3b315dae44e0d541 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 17 Jan 2022 11:01:18 +0100 Subject: [PATCH 300/942] npm: Lock mini-css-extract-plugin at version 2.4.5 2.5 has an unintended API breakage: https://github.com/webpack-contrib/mini-css-extract-plugin/issues/896 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04d0c43..f11aa06 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-webpack-plugin": "^2.5.3", "htmlparser": "^1.7.7", "jed": "^1.1.1", - "mini-css-extract-plugin": "^2.4.5", + "mini-css-extract-plugin": "~2.4.5", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", "sass": "^1.35.2", From e066d630c6ea47c6f9a9dde1fa2f96f3ab56bc05 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 29 Jan 2022 02:30:46 +0000 Subject: [PATCH 301/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #523 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f11aa06..bc70155 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.164.2", - "@patternfly/react-core": "4.181.1", + "@patternfly/patternfly": "4.171.1", + "@patternfly/react-core": "4.192.15", "react": "17.0.2", "react-dom": "17.0.2" } From 9fce37f2155968d227b7af49f32a12550f07b116 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:38:22 +0100 Subject: [PATCH 302/942] fmf: Don't install weak firefox dependencies firefox pulls in half a desktop, we don't need any of these for a headless test. This reduces the number packages from 133 (459 MB) to 66 (365 MB). --- test/browser/browser.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index cd88a9a..e68e449 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -17,7 +17,7 @@ dnf update -y pam || true # install firefox (available everywhere in Fedora and RHEL) # we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) -dnf install --disablerepo=fedora-cisco-openh264 -y firefox +dnf install --disablerepo=fedora-cisco-openh264 -y --setopt=install_weak_deps=False firefox # create user account for logging in if ! id admin 2>/dev/null; then From e0cb0f9a32e09219a873544400c7b42f0aeac647 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:40:39 +0100 Subject: [PATCH 303/942] package.json: Bump mini-css-extract-plugin version Update to the latest version. This reverts the hack in commit 96e9c669adc5413, the API was fixed in 2.5.1. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bc70155..9affe2b 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-webpack-plugin": "^2.5.3", "htmlparser": "^1.7.7", "jed": "^1.1.1", - "mini-css-extract-plugin": "~2.4.5", + "mini-css-extract-plugin": "^2.5.3", "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", "sass": "^1.35.2", From 8eaa689491d285feeefa807db8e76fffb586d08f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:41:38 +0100 Subject: [PATCH 304/942] Bump cockpit lib and test to 262 Create test/reference-image as required by testlib 261. --- Makefile | 4 ++-- test/reference-image | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 test/reference-image diff --git a/Makefile b/Makefile index 9590ee8..9b6b686 100644 --- a/Makefile +++ b/Makefile @@ -151,14 +151,14 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 253; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 262; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git e224a0296cd25a448d70810a4c114bac574b82dd; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 262; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg diff --git a/test/reference-image b/test/reference-image new file mode 100644 index 0000000..c06d46d --- /dev/null +++ b/test/reference-image @@ -0,0 +1 @@ +fedora-35 From 0493621504e58c2e116def56791950497887665c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:50:59 +0100 Subject: [PATCH 305/942] Makefile: Factorize rpm name --- Makefile | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 9b6b686..4130c9c 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ # extract name from package.json PACKAGE_NAME := $(shell awk '/"name":/ {gsub(/[",]/, "", $$2); print $$2}' package.json) +RPM_NAME := cockpit-$(PACKAGE_NAME) VERSION := $(shell T=$$(git describe 2>/dev/null) || T=1; echo $$T | tr '-' '.') ifeq ($(TEST_OS),) TEST_OS = centos-8-stream endif export TEST_OS -TARFILE=cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz -NODE_CACHE=cockpit-$(PACKAGE_NAME)-node-$(VERSION).tar.xz -RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q cockpit-$(PACKAGE_NAME).spec.in).rpm +TARFILE=$(RPM_NAME)-$(VERSION).tar.xz +NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz +RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q $(RPM_NAME).spec.in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -63,7 +64,7 @@ watch: clean: rm -rf dist/ - [ ! -e cockpit-$(PACKAGE_NAME).spec.in ] || rm -f cockpit-$(PACKAGE_NAME).spec + rm -f $(RPM_NAME).spec install: $(WEBPACK_TEST) mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) @@ -87,28 +88,28 @@ dist: $(TARFILE) # pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that # node_modules/ can be reconstructed if necessary) $(TARFILE): export NODE_ENV=production -$(TARFILE): $(WEBPACK_TEST) cockpit-$(PACKAGE_NAME).spec +$(TARFILE): $(WEBPACK_TEST) $(RPM_NAME).spec if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi touch -r package.json $(NODE_MODULES_TEST) touch dist/* - tar --xz -cf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.xz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \ - --exclude cockpit-$(PACKAGE_NAME).spec.in --exclude node_modules \ - $$(git ls-files) src/lib package-lock.json cockpit-$(PACKAGE_NAME).spec dist/ + tar --xz -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ + --exclude $(RPM_NAME).spec.in --exclude node_modules \ + $$(git ls-files) src/lib package-lock.json $(RPM_NAME).spec dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) tar --xz -cf $@ node_modules node-cache: $(NODE_CACHE) -srpm: $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec +srpm: $(TARFILE) $(NODE_CACHE) $(RPM_NAME).spec rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_srcrpmdir `pwd`" \ - cockpit-$(PACKAGE_NAME).spec + $(RPM_NAME).spec rpm: $(RPMFILE) -$(RPMFILE): $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec +$(RPMFILE): $(TARFILE) $(NODE_CACHE) $(RPM_NAME).spec mkdir -p "`pwd`/output" mkdir -p "`pwd`/rpmbuild" rpmbuild -bb \ @@ -118,7 +119,7 @@ $(RPMFILE): $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec --define "_srcrpmdir `pwd`" \ --define "_rpmdir `pwd`/output" \ --define "_buildrootdir `pwd`/build" \ - cockpit-$(PACKAGE_NAME).spec + $(RPM_NAME).spec find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \; rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" From 799d8f5cc9400b75842d1bb3c5961f982780f433 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:53:35 +0100 Subject: [PATCH 306/942] Move spec file into packaging/ This is cleaner once projects add debian and arch packaging. Factorize the spec name/path in the Makefile. --- Makefile | 21 ++++++++++--------- .../cockpit-starter-kit.spec.in | 0 2 files changed, 11 insertions(+), 10 deletions(-) rename cockpit-starter-kit.spec.in => packaging/cockpit-starter-kit.spec.in (100%) diff --git a/Makefile b/Makefile index 4130c9c..9ae9f3d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,8 @@ endif export TEST_OS TARFILE=$(RPM_NAME)-$(VERSION).tar.xz NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz -RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q $(RPM_NAME).spec.in).rpm +SPEC=$(RPM_NAME).spec +RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q packaging/$(SPEC).in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -53,7 +54,7 @@ update-po: po/$(PACKAGE_NAME).pot # Build/Install/dist # -%.spec: %.spec.in +%.spec: packaging/%.spec.in sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ $(WEBPACK_TEST): $(NODE_MODULES_TEST) $(LIB_TEST) $(shell find src/ -type f) package.json webpack.config.js @@ -64,7 +65,7 @@ watch: clean: rm -rf dist/ - rm -f $(RPM_NAME).spec + rm -f $(SPEC) install: $(WEBPACK_TEST) mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) @@ -88,28 +89,28 @@ dist: $(TARFILE) # pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that # node_modules/ can be reconstructed if necessary) $(TARFILE): export NODE_ENV=production -$(TARFILE): $(WEBPACK_TEST) $(RPM_NAME).spec +$(TARFILE): $(WEBPACK_TEST) $(SPEC) if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi touch -r package.json $(NODE_MODULES_TEST) touch dist/* tar --xz -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ - --exclude $(RPM_NAME).spec.in --exclude node_modules \ - $$(git ls-files) src/lib package-lock.json $(RPM_NAME).spec dist/ + --exclude packaging/$(SPEC).in --exclude node_modules \ + $$(git ls-files) src/lib package-lock.json $(SPEC) dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) tar --xz -cf $@ node_modules node-cache: $(NODE_CACHE) -srpm: $(TARFILE) $(NODE_CACHE) $(RPM_NAME).spec +srpm: $(TARFILE) $(NODE_CACHE) $(SPEC) rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_srcrpmdir `pwd`" \ - $(RPM_NAME).spec + $(SPEC) rpm: $(RPMFILE) -$(RPMFILE): $(TARFILE) $(NODE_CACHE) $(RPM_NAME).spec +$(RPMFILE): $(TARFILE) $(NODE_CACHE) $(SPEC) mkdir -p "`pwd`/output" mkdir -p "`pwd`/rpmbuild" rpmbuild -bb \ @@ -119,7 +120,7 @@ $(RPMFILE): $(TARFILE) $(NODE_CACHE) $(RPM_NAME).spec --define "_srcrpmdir `pwd`" \ --define "_rpmdir `pwd`/output" \ --define "_buildrootdir `pwd`/build" \ - $(RPM_NAME).spec + $(SPEC) find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \; rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" diff --git a/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in similarity index 100% rename from cockpit-starter-kit.spec.in rename to packaging/cockpit-starter-kit.spec.in From b2662eeebdb623395ca7d6ccacdd1c2746db7c42 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 4 Feb 2022 06:57:26 +0100 Subject: [PATCH 307/942] Use image-customize --build to build/install distribution packages This centralizes/factorizes the rpm package builds, and builds RPM packages in the VM instead of on the host, which is cleaner. It also paves the way for supporting Debian and arch builds. Drop the `make srpm` rule, as it's not very useful. Keep the `make rpm` rule, as sometimes developers do this manually. This might be replaced later on with another image-customize feature which copies the built rpm out of the VM. --- Makefile | 24 ++++++++---------------- test/vm.install | 4 ++-- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 9ae9f3d..aab874c 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ export TEST_OS TARFILE=$(RPM_NAME)-$(VERSION).tar.xz NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz SPEC=$(RPM_NAME).spec -RPMFILE=$(shell rpmspec -D"VERSION $(VERSION)" -q packaging/$(SPEC).in).rpm VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -102,15 +101,8 @@ $(NODE_CACHE): $(NODE_MODULES_TEST) node-cache: $(NODE_CACHE) -srpm: $(TARFILE) $(NODE_CACHE) $(SPEC) - rpmbuild -bs \ - --define "_sourcedir `pwd`" \ - --define "_srcrpmdir `pwd`" \ - $(SPEC) - -rpm: $(RPMFILE) - -$(RPMFILE): $(TARFILE) $(NODE_CACHE) $(SPEC) +# convenience target for developers +rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) mkdir -p "`pwd`/output" mkdir -p "`pwd`/rpmbuild" rpmbuild -bb \ @@ -124,13 +116,13 @@ $(RPMFILE): $(TARFILE) $(NODE_CACHE) $(SPEC) find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \; rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" - # sanity check - test -e "$(RPMFILE)" -# build a VM with locally built rpm installed -$(VM_IMAGE): $(RPMFILE) bots +# build a VM with locally built distro pkgs installed +$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots rm -f $(VM_IMAGE) $(VM_IMAGE).qcow2 - bots/image-customize -v -i cockpit-ws -i `pwd`/$(RPMFILE) -s $(CURDIR)/test/vm.install $(TEST_OS) + bots/image-customize --verbose --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ + --install cockpit-ws \ + --script $(CURDIR)/test/vm.install $(TEST_OS) # convenience target for the above vm: $(VM_IMAGE) @@ -172,4 +164,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist node-cache srpm rpm check vm update-po +.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po diff --git a/test/vm.install b/test/vm.install index 55e548d..7f3d134 100644 --- a/test/vm.install +++ b/test/vm.install @@ -1,6 +1,6 @@ #!/bin/sh -# image-customize script to enable cockpit in test VMs -# The application RPM will be installed separately +# image-customize script to prepare a bots VM for testing this application +# The application package will be installed separately set -eu # don't force https:// (self-signed cert) From 07784820fd7a5747773f91f0c9e5283dc7155bf9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 7 Feb 2022 14:44:37 +0100 Subject: [PATCH 308/942] .gitignore: Ignore ./bots symlink as well On developer systems, bots is commonly a symlink to a shared checkout, accept non-directories as well. Also, only ignore it at the top level of the project directory. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7e82360..0eebb31 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ dist/ /.vagrant package-lock.json Test*FAIL* -bots/ +/bots test/common/ test/images/ src/lib/ From e4732583a9372453c3e6e833bd69c97b5f5fa996 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 8 Feb 2022 10:06:04 +0100 Subject: [PATCH 309/942] Use image-customize's new --fresh function See https://github.com/cockpit-project/bots/commit/468ee1b39e2 This avoids hardcoding the test image overlay paths. --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index aab874c..7096d67 100644 --- a/Makefile +++ b/Makefile @@ -119,8 +119,7 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) # build a VM with locally built distro pkgs installed $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots - rm -f $(VM_IMAGE) $(VM_IMAGE).qcow2 - bots/image-customize --verbose --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ + bots/image-customize --verbose --fresh --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --install cockpit-ws \ --script $(CURDIR)/test/vm.install $(TEST_OS) From fdba1dc96c3eb577593b33cadfbc12245d1ff29e Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Fri, 11 Feb 2022 14:43:28 +0100 Subject: [PATCH 310/942] Bump up eslint-config-standard-react and add fix for the new warnings This started giving errors like: 22:10 error 'Alert' is defined but never used no-unused-vars Use eslint-plugin-react to improve the JSX usage, not just to silence this error. --- .eslintrc.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index eaa27d8..9888bd8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "browser": true, "es6": true }, - "extends": ["eslint:recommended", "standard", "standard-react"], + "extends": ["eslint:recommended", "standard", "standard-react", "plugin:react/recommended"], "parser": "@babel/eslint-parser", "parserOptions": { "ecmaVersion": "7", diff --git a/package.json b/package.json index 9affe2b..001d032 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "css-minimizer-webpack-plugin": "^3.0.1", "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", - "eslint-config-standard-react": "^9.2.0", + "eslint-config-standard-react": "^11.0.1", "eslint-plugin-flowtype": "^5.2.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", From 67640c7088eb72b5d6d1eaa771d957d8dfda80e4 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Fri, 11 Feb 2022 15:26:17 +0100 Subject: [PATCH 311/942] Install eslint-plugin-standard-jsx to align with what main cockpit repo does --- .eslintrc.json | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9888bd8..a1e52bc 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "browser": true, "es6": true }, - "extends": ["eslint:recommended", "standard", "standard-react", "plugin:react/recommended"], + "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react"], "parser": "@babel/eslint-parser", "parserOptions": { "ecmaVersion": "7", diff --git a/package.json b/package.json index 001d032..399c2d0 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "css-minimizer-webpack-plugin": "^3.0.1", "eslint": "^7.10.0", "eslint-config-standard": "^14.1.1", + "eslint-config-standard-jsx": "^10.0.0", "eslint-config-standard-react": "^11.0.1", "eslint-plugin-flowtype": "^5.2.0", "eslint-plugin-import": "^2.22.1", From ea8b60624349d2ff3524e26d1db61a7d58de9938 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 15 Feb 2022 11:41:07 +0100 Subject: [PATCH 312/942] cockpituous: Update example koji/bodhi configs We use the "rawhide" branch, "main" is just an alias (and less descriptive). Also bump the release to Fedora 36. --- cockpituous-release | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cockpituous-release b/cockpituous-release index 7aebbf1..86e26a5 100644 --- a/cockpituous-release +++ b/cockpituous-release @@ -23,9 +23,9 @@ job release-srpm -V ## Authenticate for pushing into Fedora dist-git # cat ~/.fedora-password | kinit yourfedorauser@FEDORAPROJECT.ORG ## Do fedora builds for the tag, using tarball -# job release-koji -k main -# job release-koji f33 -# job release-bodhi F33 +# job release-koji rawhide +# job release-koji f36 +# job release-bodhi F36 # These are likely the first of your release targets; but run them after Fedora uploads, # so that failures there will fail the release early, before publishing on GitHub From 052eb5d57a6d659edff30ad7ae8d60d0f2855408 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Mon, 21 Feb 2022 13:52:37 +0100 Subject: [PATCH 313/942] Allow disabling eslint checks for development purposes Sometimes developers want to quickly check if something work and there is no need to style to eslint liking. --- webpack.config.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index d7eebca..63e5dc6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -13,6 +13,9 @@ const CockpitRsyncPlugin = require("./src/lib/cockpit-rsync-plugin"); /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; +/* development options for faster iteration */ +const eslint = process.env.ESLINT !== '0'; + // Obtain package name from package.json const packageJson = JSON.parse(fs.readFileSync('package.json')); @@ -25,14 +28,14 @@ const copy_files = [ const plugins = [ new copy({ patterns: copy_files }), new extract({filename: "[name].css"}), - new ESLintPlugin({ - extensions: ["js", "jsx"], - failOnWarning: true, - }), new CockpitPoPlugin(), new CockpitRsyncPlugin({dest: packageJson.name}), ]; +if (eslint) { + plugins.push(new ESLintPlugin({ extensions: ["js", "jsx"], failOnWarning: true, })); +} + /* Only minimize when in production mode */ if (production) { plugins.unshift(new CompressionPlugin({ From 90ae15d81248ea7f92818e8054bab8b288572b80 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 22 Feb 2022 12:14:07 +0100 Subject: [PATCH 314/942] test: Prepare VM image without networking This ensures that we stay independent from any changes that go on in online repositories, and our mock/pbuilders are sufficiently pre-cached. Drop the explicit install of `cockpit-ws` -- all our bots images have it pre-installed. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7096d67..68e84c1 100644 --- a/Makefile +++ b/Makefile @@ -118,9 +118,10 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) rm -r "`pwd`/output" "`pwd`/build" # build a VM with locally built distro pkgs installed +# disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots - bots/image-customize --verbose --fresh --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ - --install cockpit-ws \ + bots/image-customize --verbose --no-network --fresh \ + --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --script $(CURDIR)/test/vm.install $(TEST_OS) # convenience target for the above From 3d0f11368014aaf5037deaa8d769738e736aee12 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 24 Feb 2022 02:40:31 +0000 Subject: [PATCH 315/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #533 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 399c2d0..0de8563 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.171.1", - "@patternfly/react-core": "4.192.15", + "@patternfly/patternfly": "4.179.1", + "@patternfly/react-core": "4.198.5", "react": "17.0.2", "react-dom": "17.0.2" } From e10a8702a7f5011fd006eb77d96089cf56fb4a3a Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 8 Mar 2022 19:44:38 +0100 Subject: [PATCH 316/942] spec: drop the debug_package %define The generated RPM is noarch, so by definition has no binaries to extract debug symbols from. Hence, drop the %define that makes RPM not error out in case there are no debug symbols around (usually in archful binaries). --- packaging/cockpit-starter-kit.spec.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index ae9f021..7a0093c 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -13,8 +13,6 @@ BuildRequires: libappstream-glib Requires: cockpit-system -%define debug_package %{nil} - %description Cockpit Starter Kit Example Module From 19300113fc17c1064d3942b189ce75084a75a823 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 9 Mar 2022 08:27:20 +0100 Subject: [PATCH 317/942] po: do not hardcode the domain name Use $(PACKAGE_NAME) to represent the current project. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 68e84c1..442fc22 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ all: $(WEBPACK_TEST) LINGUAS=$(basename $(notdir $(wildcard po/*.po))) po/$(PACKAGE_NAME).js.pot: - xgettext --default-domain=cockpit --output=$@ --language=C --keyword= \ + xgettext --default-domain=$(PACKAGE_NAME) --output=$@ --language=C --keyword= \ --keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \ --keyword=N_ --keyword=NC_:1c,2 \ --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ From b5969c1c9b48f4f5d5dcefdbb306c61741cd2b78 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 8 Mar 2022 18:56:06 +0100 Subject: [PATCH 318/942] po: extract messages also for metainfo files Recent versions of gettext know how to extract messages also from XML files such as AppStream metadata. Hence, extract their messages, and append them together with the global message catalog. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 442fc22..37defb7 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,10 @@ po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ -po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot +po/$(PACKAGE_NAME).metainfo.pot: org.cockpit-project.$(PACKAGE_NAME).metainfo.xml + xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< + +po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot msgcat --sort-output --output-file=$@ $^ # Update translations against current PO template From 4377c4fe19ebe373da2a8d77fa2d75f12ca3dc17 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 8 Mar 2022 19:07:20 +0100 Subject: [PATCH 319/942] po: merge translations for metainfo file When installing the module, instead of copying the metainfo file to the destination, merge the available translations for it. Since this is done at install time, add gettext as BuildRequires for the RPM packaging; add libappstream-glib-devel as well only on RHEL/CentOS 8, since it contains the metainfo.its for gettext in order to handle .metainfo.xml files. This requires a LINGUAS file with the list of translations currently available: this is the way msgfmt picks the available languages to merge. Generate it dynamically from the list of available .po files. --- .gitignore | 1 + Makefile | 10 ++++++++-- packaging/cockpit-starter-kit.spec.in | 4 ++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0eebb31..e45fe25 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ src/lib/ *.pot POTFILES* tmp/ +/po/LINGUAS diff --git a/Makefile b/Makefile index 37defb7..7b3b841 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,9 @@ po/$(PACKAGE_NAME).metainfo.pot: org.cockpit-project.$(PACKAGE_NAME).metainfo.xm po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot msgcat --sort-output --output-file=$@ $^ +po/LINGUAS: + echo $(LINGUAS) | tr ' ' '\n' > $@ + # Update translations against current PO template update-po: po/$(PACKAGE_NAME).pot for lang in $(LINGUAS); do \ @@ -68,12 +71,15 @@ watch: clean: rm -rf dist/ rm -f $(SPEC) + rm -f po/LINGUAS -install: $(WEBPACK_TEST) +install: $(WEBPACK_TEST) po/LINGUAS mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) mkdir -p $(DESTDIR)/usr/share/metainfo/ - cp org.cockpit-project.$(PACKAGE_NAME).metainfo.xml $(DESTDIR)/usr/share/metainfo/ + msgfmt --xml -d po \ + --template org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \ + -o $(DESTDIR)/usr/share/metainfo/org.cockpit-project.$(PACKAGE_NAME).metainfo.xml # this requires a built source tree and avoids having to install anything system-wide devel-install: $(WEBPACK_TEST) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 7a0093c..8afadd9 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -10,6 +10,10 @@ BuildArch: noarch BuildRequires: nodejs BuildRequires: make BuildRequires: libappstream-glib +BuildRequires: gettext +%if 0%{?rhel} && 0%{?rhel} <= 8 +BuildRequires: libappstream-glib-devel +%endif Requires: cockpit-system From 6c123f94ec97d0367ad48695813c59603bb3b6c0 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 9 Mar 2022 16:12:30 +0100 Subject: [PATCH 320/942] po: Update German translations This validates the i18n for the AppStream metadata introduced in commit 4377c4fe19. --- po/de.po | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/po/de.po b/po/de.po index 8d86d06..0394e91 100644 --- a/po/de.po +++ b/po/de.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: starter-kit 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-08-29 00:14+0200\n" +"POT-Creation-Date: 2022-03-09 16:09+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,11 +18,19 @@ msgstr "" msgid "Cockpit Starter Kit" msgstr "Cockpit Bausatz" -#: src/app.jsx:42 +#: src/app.jsx:43 msgid "Running on $0" msgstr "Läuft auf $0" -#: src/manifest.json:0 +#: org.cockpit-project.starter-kit.metainfo.xml:6 +msgid "Scaffolding for a cockpit module" +msgstr "Gerüst für ein Cockpit-Modul" + +#: org.cockpit-project.starter-kit.metainfo.xml:8 +msgid "Scaffolding for a cockpit module." +msgstr "Gerüst für ein Cockpit-Modul." + +#: src/manifest.json:0 org.cockpit-project.starter-kit.metainfo.xml:5 msgid "Starter Kit" msgstr "Bausatz" From e0a1fb8a2b0eb4a0473229aaf3ccc45272c11888 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 10 Mar 2022 07:33:58 +0100 Subject: [PATCH 321/942] Makefile: factorize AppStream filename in own variable Makes it easier to read, and also to modify for modules outside the cockpit-project org. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7b3b841..78770d5 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ export TEST_OS TARFILE=$(RPM_NAME)-$(VERSION).tar.xz NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz SPEC=$(RPM_NAME).spec +APPSTREAMFILE=org.cockpit-project.$(PACKAGE_NAME).metainfo.xml VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -40,7 +41,7 @@ po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ -po/$(PACKAGE_NAME).metainfo.pot: org.cockpit-project.$(PACKAGE_NAME).metainfo.xml +po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot @@ -78,8 +79,8 @@ install: $(WEBPACK_TEST) po/LINGUAS cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) mkdir -p $(DESTDIR)/usr/share/metainfo/ msgfmt --xml -d po \ - --template org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \ - -o $(DESTDIR)/usr/share/metainfo/org.cockpit-project.$(PACKAGE_NAME).metainfo.xml + --template $(APPSTREAMFILE) \ + -o $(DESTDIR)/usr/share/metainfo/$(APPSTREAMFILE) # this requires a built source tree and avoids having to install anything system-wide devel-install: $(WEBPACK_TEST) From 9d4c08ff2af1e790bdb2aa6e78bdaaa89d16edfb Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Thu, 10 Mar 2022 14:16:51 +0100 Subject: [PATCH 322/942] packit: build SRPM in Copr and be able to specify the precise list of deps needed to create the SRPM Details: https://packit.dev/posts/copr-srpms/ Signed-off-by: Tomas Tomecek --- packit.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packit.yaml b/packit.yaml index 15f9f1e..2d24d21 100644 --- a/packit.yaml +++ b/packit.yaml @@ -3,6 +3,9 @@ # See https://packit.dev/docs/configuration/ for the format of this file specfile_path: cockpit-starter-kit.spec +srpm_build_deps: +- make +- npm actions: post-upstream-clone: post-upstream-clone: From 3dc7c804a0c03456c413bcceb7b9b69d1864f530 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 12 Mar 2022 02:37:10 +0000 Subject: [PATCH 323/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #540 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0de8563..dd3b60a 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.179.1", - "@patternfly/react-core": "4.198.5", + "@patternfly/patternfly": "4.183.1", + "@patternfly/react-core": "4.198.19", "react": "17.0.2", "react-dom": "17.0.2" } From 80b8949192f88550e5236d2a213b3a02f87e0508 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 17 Mar 2022 07:13:02 +0100 Subject: [PATCH 324/942] Makefile: allow setup of integration tests w/o running them Add a convenience target in Makefile to perform all the setup targets for integration tests without actually running them. --- Makefile | 6 +++++- README.md | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 78770d5..baf00b5 100644 --- a/Makefile +++ b/Makefile @@ -138,9 +138,13 @@ $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots vm: $(VM_IMAGE) echo $(VM_IMAGE) +# convenience target to setup all the bits needed for the integration tests +# without actually running them +prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common + # run the browser integration tests; skip check for SELinux denials # this will run all tests/check-* and format them as TAP -check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common +check: prepare-check TEST_AUDIT_NO_SELINUX=1 test/common/run-tests # checkout Cockpit's bots for standard test VM images and API to launch them diff --git a/README.md b/README.md index 488b781..a2cb534 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,10 @@ the VM, possibly with extra options for tracing and halting on test failures TEST_OS=centos-8-stream test/check-application -tvs +It is possible to setup the test environment without running the tests: + + TEST_OS=centos-8-stream make prepare-check + You can also run the test against a different Cockpit image, for example: TEST_OS=fedora-34 make check From e2d599532314d19d76f77bdca8dd4109c6e9e4b2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 17 Mar 2022 08:40:15 +0100 Subject: [PATCH 325/942] Quiesce mock Drop the image-customize `--verbose` option. mock is incredibly blabbery about its internals otherwise, and seeing the build log isn't particularly interesting. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index baf00b5..758aade 100644 --- a/Makefile +++ b/Makefile @@ -130,7 +130,7 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) # build a VM with locally built distro pkgs installed # disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots - bots/image-customize --verbose --no-network --fresh \ + bots/image-customize --no-network --fresh \ --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --script $(CURDIR)/test/vm.install $(TEST_OS) From 2f92610f28d058fe5794bdc0ec74dcd56ed22778 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 17 Mar 2022 08:41:31 +0100 Subject: [PATCH 326/942] Bump cockpit lib and test API to 265 Drop the obsolete expect_load(). --- Makefile | 4 ++-- test/check-application | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 758aade..8f34372 100644 --- a/Makefile +++ b/Makefile @@ -159,14 +159,14 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 262; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 265; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' # checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag $(LIB_TEST): flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 262; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 265; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' mv pkg/lib src/ && rmdir -p pkg diff --git a/test/check-application b/test/check-application index 3b7ec27..68b9cd0 100755 --- a/test/check-application +++ b/test/check-application @@ -46,7 +46,6 @@ class TestApplication(testlib.MachineCase): b.wait_popup('display-language-modal') b.click("#display-language-modal [data-value='de-de'] button") b.click("#display-language-modal button.pf-m-primary") - b.expect_load() # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) b.reload(ignore_cache=True) b.wait_visible("#content") From 8862b2b49798d938d882513bc4303d4ebbf842f3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 17 Mar 2022 10:29:20 +0100 Subject: [PATCH 327/942] test: Restrict language switching reload hack to affected browser/version This was fixed in Cockpit 265, and has only ever affected Chromium, not Firefox. Restrict the hack accordingly, to make sure this does not regress again. --- test/check-application | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/check-application b/test/check-application index 68b9cd0..828e590 100755 --- a/test/check-application +++ b/test/check-application @@ -46,8 +46,9 @@ class TestApplication(testlib.MachineCase): b.wait_popup('display-language-modal') b.click("#display-language-modal [data-value='de-de'] button") b.click("#display-language-modal button.pf-m-primary") - # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) - b.reload(ignore_cache=True) + if self.system_before(265) and b.cdp.browser.name == "chromium": + # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) + b.reload(ignore_cache=True) b.wait_visible("#content") # menu label (from manifest) should be translated b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") From 65bf109faddebef69d0348b058729cc2327b4208 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 17 Mar 2022 10:31:12 +0100 Subject: [PATCH 328/942] test: Add quirk for cockpit 265 shell menu translation regression [1] regressed the translations of menu labels for external projects. This will get fixed in the next version [2]. Adjust the tests to not break with Cockpit version == 265. [1] https://github.com/cockpit-project/cockpit/commit/af5678b0be5547 [2] https://github.com/cockpit-project/cockpit/pull/17145 --- test/check-application | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/check-application b/test/check-application index 828e590..6e51c90 100755 --- a/test/check-application +++ b/test/check-application @@ -51,7 +51,9 @@ class TestApplication(testlib.MachineCase): b.reload(ignore_cache=True) b.wait_visible("#content") # menu label (from manifest) should be translated - b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") + # HACK: This regressed in cockpit 265, see https://github.com/cockpit-project/cockpit/pull/17145 + if self.system_before(265) or not self.system_before(266): + b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") b.go("/starter-kit") b.enter_page("/starter-kit") From a46b26a8ff249b3b7ec4aa2eeb484c2837cbb814 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 18 Mar 2022 08:33:47 +0100 Subject: [PATCH 329/942] Makefile: depend on test/vm.install for the VM image target Make sure to recreate the VM image in case the test/vm.install script changes. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f34372..11d95ba 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) # build a VM with locally built distro pkgs installed # disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed -$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots +$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install bots/image-customize --no-network --fresh \ --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --script $(CURDIR)/test/vm.install $(TEST_OS) From c2d704e130392a44840fd67b1d8626d8c3be6ccc Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 22 Mar 2022 12:44:03 +0100 Subject: [PATCH 330/942] Makefile: add convenience 'srpm' target Add a simple 'srpm' target that builds the src.rpm file for the current project. Partially reverts commit b2662eeebdb623395ca7d6ccacdd1c2746db7c42 (at least to bring the 'srpm' target back). --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 11d95ba..d661cbc 100644 --- a/Makefile +++ b/Makefile @@ -111,6 +111,13 @@ $(NODE_CACHE): $(NODE_MODULES_TEST) node-cache: $(NODE_CACHE) +# convenience target for developers +srpm: $(TARFILE) $(NODE_CACHE) $(SPEC) + rpmbuild -bs \ + --define "_sourcedir `pwd`" \ + --define "_srcrpmdir `pwd`" \ + $(SPEC) + # convenience target for developers rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) mkdir -p "`pwd`/output" From 0e0d5bedc5fbcd6ed1261d9dbbb43d70346a4812 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 23 Mar 2022 14:54:30 +0100 Subject: [PATCH 331/942] po: ignore js/jsx/html files under src/lib Cockpit's PF/React/build library (pkg/lib from cockpit.git) is checked out as src/lib, so exclude it from the search of js/jsx, and html sources for the extraction of i18n messages. This avoids the cockpit messages in case the message extraction is performed in a source tree after build. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d661cbc..4bd7605 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,10 @@ po/$(PACKAGE_NAME).js.pot: --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') + --from-code=UTF-8 $$(find src/ \( -name '*.js' -o -name '*.jsx' \) \! -path 'src/lib/*') po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) - po/html2po -o $@ $$(find src -name '*.html') + po/html2po -o $@ $$(find src -name '*.html' \! -path 'src/lib/*') po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ From 29abcaab98e8eb31cc1f32fadcba434ec247872e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 24 Mar 2022 10:05:18 +0100 Subject: [PATCH 332/942] Makefile: set reproducible args for tar When creating the tarballs for sources and node modules, apply some hardening to the tar compression to remove some variances that may cause the tarballs to not be reproducible; in particular: - set fixed modes, and ownership - set the mtime from the author's timestamp of the top-level commit - sort the files by name --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4bd7605..82b58ec 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,8 @@ NODE_MODULES_TEST=package-lock.json WEBPACK_TEST=dist/manifest.json # one example file in src/lib to check if it was already checked out LIB_TEST=src/lib/cockpit-po-plugin.js +# common arguments for tar, mostly to make the generated tarballs reproducible +TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0 all: $(WEBPACK_TEST) @@ -102,12 +104,12 @@ $(TARFILE): $(WEBPACK_TEST) $(SPEC) if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi touch -r package.json $(NODE_MODULES_TEST) touch dist/* - tar --xz -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ + tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ --exclude packaging/$(SPEC).in --exclude node_modules \ $$(git ls-files) src/lib package-lock.json $(SPEC) dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) - tar --xz -cf $@ node_modules + tar --xz $(TAR_ARGS) -cf $@ node_modules node-cache: $(NODE_CACHE) From 9357e55fc684ed9779de38df495f7a2aa4022885 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 30 Mar 2022 12:02:27 +0200 Subject: [PATCH 333/942] Makefile: add convenience 'print-vm' target Add a simple convenience target that prints the filename of the test image without creating it beforehand. This can be useful to know what is the expected filename, so it is possible to provide an own test image instead of the generated one. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82b58ec..9121d98 100644 --- a/Makefile +++ b/Makefile @@ -147,6 +147,10 @@ $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install vm: $(VM_IMAGE) echo $(VM_IMAGE) +# convenience target to print the filename of the test image +print-vm: + echo $(VM_IMAGE) + # convenience target to setup all the bits needed for the integration tests # without actually running them prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common @@ -187,4 +191,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po +.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po print-vm From fde873e0bdeeddfa14bee46cf20c9cfec74e7abf Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 30 Mar 2022 17:47:53 +0200 Subject: [PATCH 334/942] Makefile: add convenience 'devel-uninstall' target Add a simple convenience target to "undo" what the devel-install did (creating a symlink to ~/.local/share/cockpit), i.e. simply removing that symlink. Suggested by: Christopher Snyder --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9121d98..1f06bf8 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,11 @@ devel-install: $(WEBPACK_TEST) mkdir -p ~/.local/share/cockpit ln -s `pwd`/dist ~/.local/share/cockpit/$(PACKAGE_NAME) +# assumes that there was symlink set up using the above devel-install target, +# and removes it +devel-uninstall: + rm -f ~/.local/share/cockpit/$(PACKAGE_NAME) + print-version: @echo "$(VERSION)" @@ -191,4 +196,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po print-vm +.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po print-vm devel-uninstall From 731bf264053fe6afd05c3c58e6cd6cad9dbe9ce9 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 31 Mar 2022 09:46:48 +0200 Subject: [PATCH 335/942] README: mention devel-install & devel-uninstall --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2cb534..edc1ea7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ automatically minified and compressed. Set `NODE_ENV=production` if you want to duplicate this behavior. For development, you usually want to run your module straight out of the git -tree. To do that, link that to the location were `cockpit-bridge` looks for packages: +tree. To do that, run `make devel-install`, which links your checkout to the +location were cockpit-bridge looks for packages. If you prefer to do +this manually: ``` mkdir -p ~/.local/share/cockpit @@ -49,6 +51,11 @@ the remote hostname. $ RSYNC=c make watch +To "uninstall" the locally installed version, run `make devel-uninstall`, or +remove manually the symlink: + + rm ~/.local/share/cockpit/starter-kit + # Running eslint Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check From e3fba6c5c6dae2e3ec852345baa7795721612254 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 1 Apr 2022 15:19:47 +0200 Subject: [PATCH 336/942] README: fix some links - use https when possible (mostly for cockpit-project.org URLs) - fix the references to the cockpit and tmt official repositories - update one packit.dev URL --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index edc1ea7..874a23c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cockpit Starter Kit -Scaffolding for a [Cockpit](http://www.cockpit-project.org) module. +Scaffolding for a [Cockpit](https://cockpit-project.org/) module. # Getting and building the source @@ -112,13 +112,13 @@ different infrastructure with more capacity. Tests also run in [Packit](https://packit.dev/) for all currently supported Fedora releases; see the [packit.yaml](./packit.yaml) control file. You need to -[enable Packit-as-a-service](https://packit.dev/docs/packit-as-a-service/) in your GitHub project to use this. +[enable Packit-as-a-service](https://packit.dev/docs/packit-service/) in your GitHub project to use this. To run the tests in the exact same way for upstream pull requests and for [Fedora package update gating](https://docs.fedoraproject.org/en-US/ci/), the -tests are wrapped in the [FMF metadata format](https://github.com/psss/fmf) +tests are wrapped in the [FMF metadata format](https://github.com/teemtee/fmf) for using with the [tmt test management tool](https://docs.fedoraproject.org/en-US/ci/tmt/). Note that Packit tests can *not* run their own virtual machine images, thus -they only run [@nondestructive tests](https://github.com/martinpitt/cockpit/blob/main/test/common/testlib.py). +they only run [@nondestructive tests](https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py). # Customizing @@ -153,7 +153,7 @@ which is run weekly or upon [manual request](https://github.com/cockpit-project/ # Further reading - * The [Starter Kit announcement](http://cockpit-project.org/blog/cockpit-starter-kit.html) + * The [Starter Kit announcement](https://cockpit-project.org/blog/cockpit-starter-kit.html) blog post explains the rationale for this project. - * [Cockpit Deployment and Developer documentation](http://cockpit-project.org/guide/latest/) - * [Make your project easily discoverable](http://cockpit-project.org/blog/making-a-cockpit-application.html) + * [Cockpit Deployment and Developer documentation](https://cockpit-project.org/guide/latest/) + * [Make your project easily discoverable](https://cockpit-project.org/blog/making-a-cockpit-application.html) From ce263cc4b2aea9bd562eee162063108633d7ed64 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 4 Apr 2022 14:04:45 +0200 Subject: [PATCH 337/942] metainfo: add few more URLs/references Even if this module is a template, add a couple more of keys to the AppStream XML file; this way other projects can get few more hints. --- org.cockpit-project.starter-kit.metainfo.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.cockpit-project.starter-kit.metainfo.xml b/org.cockpit-project.starter-kit.metainfo.xml index fb09a1a..8e19746 100644 --- a/org.cockpit-project.starter-kit.metainfo.xml +++ b/org.cockpit-project.starter-kit.metainfo.xml @@ -11,4 +11,7 @@ org.cockpit_project.cockpit starter-kit + https://github.com/cockpit-project/starter-kit + https://github.com/cockpit-project/starter-kit/issues + cockpit-devel_AT_lists.fedorahosted.org From b2379f78e203aab0028d8548b39f5f0bd2b27d2a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 5 Apr 2022 15:57:07 +0200 Subject: [PATCH 338/942] workflows: Drop livetest We have not used that in a long time, and it stopped working a while ago. --- .github/workflows/livetest.yml.disabled | 118 ------------------------ 1 file changed, 118 deletions(-) delete mode 100644 .github/workflows/livetest.yml.disabled diff --git a/.github/workflows/livetest.yml.disabled b/.github/workflows/livetest.yml.disabled deleted file mode 100644 index 097a5c0..0000000 --- a/.github/workflows/livetest.yml.disabled +++ /dev/null @@ -1,118 +0,0 @@ -name: Live test cockpit from PRs -# Triggered when a repository collaborator comments /livetest on a PR -# This is currently configured to run on cockpit-project org. -# If your project lives somewhere else than the github cockpit-project organization, -# you need to set up your own relay host, add a secret with the private SSH key, and -# adjust the RELAY_HOST env variable and SINK_SSHRELAY_PRIVATE secret name. - -on: - issue_comment: - types: [created] - -jobs: - pr-info: - runs-on: ubuntu-20.04 - steps: - - name: Query author repository permissions - uses: octokit/request-action@v2.x - id: user_permission - with: - route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # restrict /livetest to users with admin or write permission for the repository - # see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user - # store output if user is allowed in allowed_user job output so it has to be checked in downstream job - - name: Check if user does have correct permissions - if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) - id: check_user_perm - run: | - echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'" - echo "::set-output name=allowed_user::true" - - outputs: - allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }} - - live-test: - needs: pr-info - if: needs.pr-info.outputs.allowed_user == 'true' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/livetest') - runs-on: ubuntu-20.04 - env: - RELAY_HOST: logs.cockpit-project.org - steps: - - name: Install dependencies - run: | - sudo apt update - sudo apt install -y cockpit-system cockpit-ws nodejs npm make - - - uses: actions/github-script@v3 - id: get-pr - with: - script: | - const request = { - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.issue.number - } - core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) - try { - const result = await github.pulls.get(request) - return result.data - } catch (err) { - core.setFailed(`Request failed with error ${err}`) - } - - - uses: actions/checkout@v2 - with: - repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }} - fetch-depth: 0 - ref: ${{ fromJSON(steps.get-pr.outputs.result).head.ref }} - - - name: Compile and install the project - run: make && sudo make install - - - name: Create a new test user - # WARNING: if you want to add this users to sudoers make sure to properly delete the SINK_SSHRELAY_PRIVATE - run: sudo useradd --create-home livetest; echo livetest:foobar | sudo chpasswd - - - name: Get the commit SHA that triggered the workflow - id: get_commit_sha - run: | - echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - - name: Get ssh gateway port to forward to - id: remote_port - env: - SHA_SHORT: "${{ steps.get_commit_sha.outputs.sha_short }}" - run: | - echo ::set-output name=SSH_GATEWAY_PORT::$((16#$SHA_SHORT % 32768 + 1500)) - - - name: Write a comment on the PR with link to the cockpit instance - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Cockpit preview: https://${{ env.RELAY_HOST }}:${{ steps.remote_port.outputs.SSH_GATEWAY_PORT }}' - }) - - - name: Create an SSH private key from the secret - run: | - sudo touch /run/SINK_SSHRELAY_PRIVATE && sudo chown $(id -u):$(id -g) /run/SINK_SSHRELAY_PRIVATE - echo "${{ secrets.SINK_SSHRELAY_PRIVATE }}" > /run/SINK_SSHRELAY_PRIVATE - chmod 600 /run/SINK_SSHRELAY_PRIVATE - mkdir -p ~/.ssh && ssh-keyscan -H ${{ env.RELAY_HOST }} > ~/.ssh/known_hosts - - - name: Forward cockpit port 9090 to a server we can access - run: ssh -f -R ':${{ steps.remote_port.outputs.SSH_GATEWAY_PORT }}':localhost:9090 -i /run/SINK_SSHRELAY_PRIVATE -o ExitOnForwardFailure=yes sshgw@${{ env.RELAY_HOST }} 'sleep infinity' - - - name: Block workflow from finishing - run: sleep 4h - - - name: Cleanup ssh process - if: ${{ always() }} - run: pkill ssh || true From 7a0968bd8c8a00ee6a84df91771585617eaa212e Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Sat, 9 Apr 2022 02:54:21 +0000 Subject: [PATCH 339/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #553 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dd3b60a..517abbe 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.183.1", - "@patternfly/react-core": "4.198.19", + "@patternfly/patternfly": "4.185.2", + "@patternfly/react-core": "4.202.20", "react": "17.0.2", "react-dom": "17.0.2" } From e069cbbfbdaf7422cbe2a6b02712e6b7556a0b46 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 11 Apr 2022 06:46:45 +0200 Subject: [PATCH 340/942] spec: Don't run eslint It's useless there -- any style error that may happen there has already slipped through the upstream release, and at RPM build time there is nothing that can be done about it. It just wastes time. This allows us to bump eslint to a newer version which is incompatible with the older node.js on RHEL/CentOS 8. --- packaging/cockpit-starter-kit.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 8afadd9..72c9f41 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -27,7 +27,7 @@ Cockpit Starter Kit Example Module %build # ignore pre-built webpack in release tarball and rebuild it rm -rf dist -NODE_ENV=production make +ESLINT=0 NODE_ENV=production make %install %make_install From fe1a9a387f4da3662717b6250c74c96c9472ba08 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Sat, 9 Apr 2022 08:05:34 +0200 Subject: [PATCH 341/942] package.json: bump eslint to ^8.0.0 and all eslint-x dependencies So as to satisfy the new eslint peer dependency. In addition drop eslint-config-standard-react as it does not release anymore, and eslint 8.x is not compatible with the available last release. https://github.com/standard/eslint-config-standard-react/pull/69 Replace it with https://github.com/facebook/create-react-app#readme which is actively maintained. Lastly drop the deprecated https://github.com/standard/eslint-plugin-standard --- .eslintrc.json | 2 +- package.json | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index a1e52bc..f2b0ea2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "browser": true, "es6": true }, - "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react"], + "extends": ["eslint:recommended", "standard", "standard-jsx", "react-app"], "parser": "@babel/eslint-parser", "parserOptions": { "ecmaVersion": "7", diff --git a/package.json b/package.json index 517abbe..3f38977 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@babel/core": "^7.5.4", - "@babel/eslint-parser": "^7.13.14", + "@babel/eslint-parser": "^7.17.0", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.6", @@ -22,18 +22,17 @@ "copy-webpack-plugin": "^9.0.0", "css-loader": "^6.5.0", "css-minimizer-webpack-plugin": "^3.0.1", - "eslint": "^7.10.0", - "eslint-config-standard": "^14.1.1", - "eslint-config-standard-jsx": "^10.0.0", - "eslint-config-standard-react": "^11.0.1", - "eslint-plugin-flowtype": "^5.2.0", - "eslint-plugin-import": "^2.22.1", + "eslint": "^8.13.0", + "eslint-config-react-app": "^7.0.0", + "eslint-config-standard": "^17.0.0-1", + "eslint-config-standard-jsx": "^11.0.0-1", + "eslint-plugin-flowtype": "^8.0.3", + "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-react": "^7.21.2", - "eslint-plugin-react-hooks": "^4.1.2", - "eslint-plugin-standard": "^4.0.1", - "eslint-webpack-plugin": "^2.5.3", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.29.4", + "eslint-plugin-react-hooks": "^4.4.0", + "eslint-webpack-plugin": "^3.1.1", "htmlparser": "^1.7.7", "jed": "^1.1.1", "mini-css-extract-plugin": "^2.5.3", From ff9ec35cb373d2b3207c4c1fe0c10fded8afe62a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Tue, 12 Apr 2022 03:04:53 +0000 Subject: [PATCH 342/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #556 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3f38977..54e5fc4 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.185.2", - "@patternfly/react-core": "4.202.20", + "@patternfly/patternfly": "4.186.1", + "@patternfly/react-core": "4.202.25", "react": "17.0.2", "react-dom": "17.0.2" } From b1fb98b43655a974d235d970086f5efb201c93da Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 13 Apr 2022 03:08:12 +0000 Subject: [PATCH 343/942] package.json: Update @patternfly/react-core Closes #557 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54e5fc4..cd1ba95 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.186.1", - "@patternfly/react-core": "4.202.25", + "@patternfly/react-core": "4.202.29", "react": "17.0.2", "react-dom": "17.0.2" } From e91487b5582357c46a3c14972b54b236f71c7b78 Mon Sep 17 00:00:00 2001 From: Matej Marusak Date: Wed, 13 Apr 2022 09:51:05 +0200 Subject: [PATCH 344/942] workflows: Split npm-update to PF and non PF tasks Run PF update every Monday and anything else try to update on Tue, Thu and Sat. --- .github/workflows/npm-update-pf.yml | 27 +++++++++++++++++++++++++++ .github/workflows/npm-update.yml | 4 ++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/npm-update-pf.yml diff --git a/.github/workflows/npm-update-pf.yml b/.github/workflows/npm-update-pf.yml new file mode 100644 index 0000000..9313874 --- /dev/null +++ b/.github/workflows/npm-update-pf.yml @@ -0,0 +1,27 @@ +name: npm-update-pf +on: + schedule: + - cron: '0 2 * * 1' + # can be run manually on https://github.com/cockpit-project/starter-kit/actions + workflow_dispatch: +jobs: + npm-update: + runs-on: ubuntu-20.04 + steps: + - name: Set up dependencies + run: | + sudo apt update + sudo apt install -y npm make + + - name: Set up configuration and secrets + run: | + printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig + echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token + + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run npm-update bot + run: | + make bots + bots/npm-update @patternfly diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml index c3b45f5..1f169b0 100644 --- a/.github/workflows/npm-update.yml +++ b/.github/workflows/npm-update.yml @@ -1,7 +1,7 @@ name: npm-update on: schedule: - - cron: '0 2 * * *' + - cron: '0 2 * * 2,4,6' # can be run manually on https://github.com/cockpit-project/starter-kit/actions workflow_dispatch: jobs: @@ -24,4 +24,4 @@ jobs: - name: Run npm-update bot run: | make bots - bots/npm-update + bots/npm-update ~@patternfly From 5cf73c315a76035328c04ffd55555b4781c98b71 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 18 Apr 2022 03:14:59 +0000 Subject: [PATCH 345/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #560 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cd1ba95..59d6332 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.186.1", - "@patternfly/react-core": "4.202.29", + "@patternfly/patternfly": "4.190.0", + "@patternfly/react-core": "4.203.0", "react": "17.0.2", "react-dom": "17.0.2" } From a937b82cd2dc578c978fd88ffc1f056f47672942 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 19 Apr 2022 11:01:05 +0200 Subject: [PATCH 346/942] test: Bump Cockpit test API to 267, use --track-naughties option run-tests recently got a new `--track-naughties` option [1] to explicitly enable updating known issues on GitHub. Enable it for CI runs, and leave it disabled for local runs and PackIt, as in these cases we don't want to try and talk to GitHub. [1] https://github.com/cockpit-project/cockpit/commit/7ef88e80ce613c --- Makefile | 4 ++-- test/run | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1f06bf8..43b78f5 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,7 @@ prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common # run the browser integration tests; skip check for SELinux denials # this will run all tests/check-* and format them as TAP check: prepare-check - TEST_AUDIT_NO_SELINUX=1 test/common/run-tests + TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} # checkout Cockpit's bots for standard test VM images and API to launch them # must be from main, as only that has current and existing images; but testvm.py API is stable @@ -177,7 +177,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 265; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 267; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' diff --git a/test/run b/test/run index ed43e3a..b2cd769 100755 --- a/test/run +++ b/test/run @@ -5,4 +5,5 @@ set -eu # arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO [ -z "${TEST_SCENARIO:-}" ] || export TEST_BROWSER="$TEST_SCENARIO" +export RUN_TESTS_OPTIONS=--track-naughties make check From 3aff8acad1b198cba4119960405d69799a73ff40 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 21 Apr 2022 14:21:12 +0200 Subject: [PATCH 347/942] webpack: Always regenerate and clean up dist/ By default, webpack does not clean up dist/, so when you e.g. touch the code and rebuild with `NODE_ENV=devel`, the old compressed assets from a previous `production` build were left in place, and cockpit could serve the old wrong ones. Enable the `clean` output option to fix this [1]. Also force the rewrite of all files with `compareBeforeEmit: false`, so that the time stamps actually get updated on a webpack run. This fixes `make` rules and unnecessary rebuilds when nothing changed. Fixes #563 [1] https://webpack.js.org/configuration/output/#outputclean --- webpack.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 63e5dc6..0745388 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -63,6 +63,8 @@ module.exports = { externals: { "cockpit": "cockpit" }, devtool: "source-map", stats: "errors-warnings", + // always regenerate dist/, so make rules work + output: { clean: true, compareBeforeEmit: false }, optimization: { minimize: production, From c990f74d734e5d4c42e6224b4de3035aca6a80ba Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 25 Apr 2022 03:13:48 +0000 Subject: [PATCH 348/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #567 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 59d6332..b9b9f0a0 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.190.0", - "@patternfly/react-core": "4.203.0", + "@patternfly/patternfly": "4.192.1", + "@patternfly/react-core": "4.206.3", "react": "17.0.2", "react-dom": "17.0.2" } From 0ece83483d4a33ba58d93f9641711a18c5543f8b Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 27 Apr 2022 04:16:18 +0200 Subject: [PATCH 349/942] Makefile: avoid spurious echo Disable the printing of the echo commands that write the filename of the VM image for tests in the 'vm' and 'print-vm' targets. This makes it possible to use their outputs, especially the 'print-vm' target. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 43b78f5..4062940 100644 --- a/Makefile +++ b/Makefile @@ -150,11 +150,11 @@ $(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install # convenience target for the above vm: $(VM_IMAGE) - echo $(VM_IMAGE) + @echo $(VM_IMAGE) # convenience target to print the filename of the test image print-vm: - echo $(VM_IMAGE) + @echo $(VM_IMAGE) # convenience target to setup all the bits needed for the integration tests # without actually running them From bdd376e9e09c1b1f082ad17189b51920cd5194d4 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 2 May 2022 03:55:36 +0000 Subject: [PATCH 350/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #569 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9b9f0a0..c8f0e51 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.192.1", - "@patternfly/react-core": "4.206.3", + "@patternfly/patternfly": "4.192.3", + "@patternfly/react-core": "4.207.0", "react": "17.0.2", "react-dom": "17.0.2" } From c639ffc276091295be20ae9053fc967cd38a0907 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 3 May 2022 09:20:03 +0200 Subject: [PATCH 351/942] Move example COPR release to packit This replaces the cockpituous job. --- .github/workflows/release.yml.disabled | 1 - README.md | 19 +++++++++++-------- cockpituous-release | 3 --- packit.yaml | 11 +++++++++++ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index 98e2409..ed7b334 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -25,7 +25,6 @@ jobs: # FIXME: Set your Fedora user account name here echo 'yourfedorauser' > ~/.config/bodhi-user echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - echo '${{ secrets.COPR_TOKEN }}' > ~/.config/copr echo '${{ secrets.FEDORA_PASSWORD }}' > ~/.fedora-password - name: Run cockpituous diff --git a/README.md b/README.md index 874a23c..23feb35 100644 --- a/README.md +++ b/README.md @@ -133,15 +133,18 @@ change: Once your cloned project is ready for a release, you should consider automating that. [Cockpituous release](https://github.com/cockpit-project/cockpituous/tree/main/release) -aims to fully automate project releases to GitHub, Fedora, Ubuntu, COPR, Docker -Hub, and other places. The intention is that the only manual step for releasing -a project is to create a signed tag for the version number; pushing the tag -then triggers a [GitHub action](https://github.com/features/actions) that calls a set of release scripts. +and [Packit](https://packit.dev/) aim to fully automate project releases to +GitHub, Fedora, Ubuntu, COPR, Docker Hub, and other places. The intention is +that the only manual step for releasing a project is to create a signed tag for +the version number; pushing the tag then triggers a [GitHub +action](https://github.com/features/actions) that calls a set of release +scripts. -starter-kit includes an example [cockpitous release script](./cockpituous-release), -with detailed comments how to use it. There is also an -[example GitHub release action](.github/workflows/release.yml.disabled) to set -up secrets and run cockpituous. +starter-kit includes an example [cockpitous release script](./cockpituous-release) + +and a [packit.yaml](./packit.yaml) control file with detailed comments how to +use it. There is also an [example GitHub release action](.github/workflows/release.yml.disabled) +to set up secrets and run cockpituous. # Automated maintenance diff --git a/cockpituous-release b/cockpituous-release index 86e26a5..aca4f08 100644 --- a/cockpituous-release +++ b/cockpituous-release @@ -32,6 +32,3 @@ job release-srpm -V # this needs no explicit secrets, just the GitHub action provided default one # job release-github - -# This needs secrets.COPR_TOKEN in .github/workflows/release.yml -# job release-copr @myorg/myrepo diff --git a/packit.yaml b/packit.yaml index 2d24d21..ff4fdc7 100644 --- a/packit.yaml +++ b/packit.yaml @@ -32,3 +32,14 @@ jobs: - fedora-all - centos-stream-8 - centos-stream-9 + + # Build releases in COPR: https://packit.dev/docs/configuration/#copr_build + #- job: copr_build + # trigger: release + # metadata: + # owner: your_copr_login + # project: your_copr_project + # preserve_project: True + # targets: + # - fedora-all + # - centos-stream-9-x86_64 From 0763174e158b5be77ebae32f2dbe43fd31411fc6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 9 May 2022 03:21:20 +0000 Subject: [PATCH 352/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #572 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index c8f0e51..7b41358 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.192.3", - "@patternfly/react-core": "4.207.0", + "@patternfly/patternfly": "4.194.1", + "@patternfly/react-core": "4.211.3", "react": "17.0.2", "react-dom": "17.0.2" } From b47bb4714ac8a77459a4656012fae2308b857670 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 17 Sep 2021 06:40:51 +0200 Subject: [PATCH 353/942] spec: use nodejs-devel on Fedora According to the Fedora guidelines, nodejs-devel is needed for using nodejs modules: https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_buildrequires Since this applies only on Fedora, and that nodejs-devel may not even exist on other distros (e.g. CentOS 9 Stream), then limit the nodejs-devel requirement only to Fedora, keep using nodejs unconditionally everywhere. --- packaging/cockpit-starter-kit.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 72c9f41..ef8ea6b 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -7,6 +7,9 @@ License: LGPLv2+ Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz BuildArch: noarch +%if 0%{?fedora} +BuildRequires: nodejs-devel +%endif BuildRequires: nodejs BuildRequires: make BuildRequires: libappstream-glib From 0c954dbf499d93511d0988601bc00f442ab198b2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 17 Sep 2021 06:42:45 +0200 Subject: [PATCH 354/942] spec: Set ExclusiveArch: This forces the package build to happen on a koji builder which actually supports node. It's pointless at runtime (as the code runs in a browser, not through node), but in practice, `nodejs_arches` encompasses all supported Fedora/RHEL architectures anyway. https://docs.fedoraproject.org/en-US/packaging-guidelines/Node.js/#_exclusivearch --- packaging/cockpit-starter-kit.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index ef8ea6b..fdda0f5 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -7,6 +7,7 @@ License: LGPLv2+ Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch %if 0%{?fedora} BuildRequires: nodejs-devel %endif From bee838088d09bc6d73b87e19b26df188266bfc6d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 17 Sep 2021 06:54:25 +0200 Subject: [PATCH 355/942] spec: Clean up pre-existing dist/ in %prep By convention. See https://bugzilla.redhat.com/show_bug.cgi?id=1969450 --- packaging/cockpit-starter-kit.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index fdda0f5..244e2cb 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -27,10 +27,10 @@ Cockpit Starter Kit Example Module %prep %setup -q -n %{name} %setup -q -a 1 -n %{name} - -%build # ignore pre-built webpack in release tarball and rebuild it rm -rf dist + +%build ESLINT=0 NODE_ENV=production make %install From f86c02c60ebb3e87d5ecf62ed0456b20a6d983f4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 17 Sep 2021 07:44:47 +0200 Subject: [PATCH 356/942] spec: Add an empty %check section Add a comment where and how the package is being tested, to show that it's not simply a forgotten section. --- packaging/cockpit-starter-kit.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 244e2cb..1502e95 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -40,6 +40,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* # drop source maps, they are large and just for debugging find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose +%check +# this can't be meaningfully tested during package build; tests happen through +# FMF (see plans/all.fmf) during package gating + %files %doc README.md %license LICENSE dist/index.js.LICENSE.txt.gz From e3f668b58453af52602188338d2f729cb77d9f8e Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 12 May 2022 16:21:33 +0200 Subject: [PATCH 357/942] spec: use %autosetup Replace the two %setup calls with %autosetup; the second call was even redoing the first. Reported by Neal Gompa, thanks! --- packaging/cockpit-starter-kit.spec.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 1502e95..47052bf 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -25,8 +25,7 @@ Requires: cockpit-system Cockpit Starter Kit Example Module %prep -%setup -q -n %{name} -%setup -q -a 1 -n %{name} +%autosetup -n %{name} -a 1 # ignore pre-built webpack in release tarball and rebuild it rm -rf dist From a6508f5d9935cc51a61e2d554d0ccf1c12f34881 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 12 May 2022 16:23:54 +0200 Subject: [PATCH 358/942] spec: move AppStream validation to %check https://docs.fedoraproject.org/en-US/packaging-guidelines/AppData/ suggests that can be in either; it is slightly more logical in %check. Reported by Neal Gompa, thanks! --- packaging/cockpit-starter-kit.spec.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 47052bf..278c5b7 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -34,12 +34,13 @@ ESLINT=0 NODE_ENV=production make %install %make_install -appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* # drop source maps, they are large and just for debugging find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose %check +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/* + # this can't be meaningfully tested during package build; tests happen through # FMF (see plans/all.fmf) during package gating From c185d34ceef8bc51658d09c181c6758432031333 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 16 May 2022 03:02:16 +0000 Subject: [PATCH 359/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #576 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7b41358..569912b 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.194.1", - "@patternfly/react-core": "4.211.3", + "@patternfly/patternfly": "4.194.4", + "@patternfly/react-core": "4.214.2", "react": "17.0.2", "react-dom": "17.0.2" } From 5cbfb7bf11d07197af942d3f361d56e2829e74bc Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 23 May 2022 03:22:22 +0000 Subject: [PATCH 360/942] package.json: Update @patternfly/react-core Closes #578 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 569912b..1d87d66 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.194.4", - "@patternfly/react-core": "4.214.2", + "@patternfly/react-core": "4.216.0", "react": "17.0.2", "react-dom": "17.0.2" } From 52ebda2575c562be8b6bb580e50b222159f19d3f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 6 Jun 2022 03:20:49 +0000 Subject: [PATCH 361/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #580 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d87d66..133d3fc 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.194.4", - "@patternfly/react-core": "4.216.0", + "@patternfly/patternfly": "4.196.7", + "@patternfly/react-core": "4.221.5", "react": "17.0.2", "react-dom": "17.0.2" } From 03a6cc94a3accfcbaa16e27fa7d4e0e5c18d4c6d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 6 Jun 2022 15:32:39 +0200 Subject: [PATCH 362/942] Pick up cockpit test API fix for Firefox 101 See https://github.com/cockpit-project/cockpit/pull/17429 . This fixes tests with Firefox version 101. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4062940..d817de0 100644 --- a/Makefile +++ b/Makefile @@ -177,7 +177,7 @@ bots: # when you start a new project, use the latest release, and update it from time to time test/common: flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 267; \ + git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 80483286d5e7bffd1b7583a499e1b7e04d55f1f3; \ git checkout --force FETCH_HEAD -- test/common; \ git reset test/common' From 51292fbc25f98dbf9a3513307ea6eae1510182f8 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 7 Jun 2022 09:13:33 +0200 Subject: [PATCH 363/942] packit: Drop obsolete sandcastle hack Since commit 9d4c08ff2af, SRPM builds happen in COPR, so we can drop the sandcastle hack. Also drop the duplicated `post-upstream-clone` key. --- packit.yaml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packit.yaml b/packit.yaml index ff4fdc7..4f364c9 100644 --- a/packit.yaml +++ b/packit.yaml @@ -7,21 +7,12 @@ srpm_build_deps: - make - npm actions: - post-upstream-clone: post-upstream-clone: - make cockpit-starter-kit.spec # replace Source1 manually, as create-archive: can't handle multiple tarballs - make node-cache - sh -c 'sed -i "/^Source1:/ s/https:.*/$(ls *-node*.tar.xz)/" cockpit-*.spec' - # build in development mode; production mode uses too much memory for limited - # sandcastle containers; also reduce memory consumption of webpack - # https://github.com/packit/sandcastle/pull/92 - # https://medium.com/the-node-js-collection/node-js-memory-management-in-container-environments-7eb8409a74e8 - create-archive: - - make NODE_ENV=development NODE_OPTIONS=--max-old-space-size=500 - # dummy LICENSE.txt, as terser did not run - - touch dist/index.js.LICENSE.txt.gz - - make dist + create-archive: make dist # starter-kit.git has no release tags; your project can drop this once you have a release get-current-version: make print-version jobs: From 607fbae9d2e6e430644e94e2d3e80bd37e641927 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 7 Jun 2022 09:15:21 +0200 Subject: [PATCH 364/942] packit: Fix indentation Use standard indentation for lists underneath a dictionary key. Leave some space between the larger top-level keys. --- packit.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packit.yaml b/packit.yaml index 4f364c9..b7a7e96 100644 --- a/packit.yaml +++ b/packit.yaml @@ -3,9 +3,11 @@ # See https://packit.dev/docs/configuration/ for the format of this file specfile_path: cockpit-starter-kit.spec + srpm_build_deps: -- make -- npm + - make + - npm + actions: post-upstream-clone: - make cockpit-starter-kit.spec @@ -15,6 +17,7 @@ actions: create-archive: make dist # starter-kit.git has no release tags; your project can drop this once you have a release get-current-version: make print-version + jobs: - job: tests trigger: pull_request @@ -32,5 +35,5 @@ jobs: # project: your_copr_project # preserve_project: True # targets: - # - fedora-all - # - centos-stream-9-x86_64 + # - fedora-all + # - centos-stream-9-x86_64 From f5faff051b690f3571c1f24a8856901235f549f7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 7 Jun 2022 09:35:28 +0200 Subject: [PATCH 365/942] Move release from cockpituous to action-release and packit This gets rid of our "release" environment with high-profile secrets, and the cockpituous/release infra. The upstream release uses our shared https://github.com/cockpit-project/action-release/ action. --- .github/workflows/release.yml.disabled | 45 +++++++++++++------------- README.md | 28 +++++++++------- cockpituous-release | 34 ------------------- packit.yaml | 22 +++++++++++++ 4 files changed, 61 insertions(+), 68 deletions(-) delete mode 100644 cockpituous-release diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index ed7b334..e680fe8 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -1,3 +1,6 @@ +# Create a GitHub upstream release. Replace "TARNAME" with your project tarball +# name and enable this by dropping the ".disabled" suffix from the file name. +# See README.md. name: release on: push: @@ -5,31 +8,27 @@ on: # this is a glob, not a regexp - '[0-9]*' jobs: - cockpituous: + source: runs-on: ubuntu-latest - environment: release container: - image: ghcr.io/cockpit-project/release + image: ghcr.io/cockpit-project/unit-tests + options: --user root + permissions: + # create GitHub release + contents: write steps: - - name: Set up configuration and secrets - run: | - # override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh - export HOME=$(getent passwd $(id -u) | cut -f6 -d:) + - name: Clone repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 - # secrets come from https://github.com/organizations/ORGNAME/settings/secrets or https://github.com/OWNER/REPO/settings/secrets - # see https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets - echo '${{ secrets.SSH_KNOWN_HOSTS }}' > ~/.ssh/known_hosts - echo '${{ secrets.FEDPKG_SSH_PUBLIC }}' > ~/.ssh/id_rsa.pub - echo '${{ secrets.FEDPKG_SSH_PRIVATE }}' > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - # FIXME: Set your Fedora user account name here - echo 'yourfedorauser' > ~/.config/bodhi-user - echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - echo '${{ secrets.FEDORA_PASSWORD }}' > ~/.fedora-password + - name: Workaround for https://github.com/actions/checkout/pull/697 + run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags) - - name: Run cockpituous - run: | - # override GitHub's bind mount from host, we don't want anything from there and it interferes with ssh - export HOME=$(getent passwd $(id -u) | cut -f6 -d:) - cd /build - release-runner -r https://github.com/$GITHUB_REPOSITORY -t $(basename $GITHUB_REF) ./cockpituous-release + - name: Build release + run: make dist + + - name: Publish GitHub release + uses: cockpit-project/action-release@62db9d9850a1adec300500d84035c4f523fd5290 + with: + filename: "TARNAME-${{ github.ref_name }}.tar.xz" diff --git a/README.md b/README.md index 23feb35..dede86d 100644 --- a/README.md +++ b/README.md @@ -132,19 +132,25 @@ change: # Automated release Once your cloned project is ready for a release, you should consider automating -that. [Cockpituous release](https://github.com/cockpit-project/cockpituous/tree/main/release) -and [Packit](https://packit.dev/) aim to fully automate project releases to -GitHub, Fedora, Ubuntu, COPR, Docker Hub, and other places. The intention is -that the only manual step for releasing a project is to create a signed tag for -the version number; pushing the tag then triggers a [GitHub -action](https://github.com/features/actions) that calls a set of release -scripts. +that. The intention is that the only manual step for releasing a project is to create +a signed tag for the version number, which includes a summary of the noteworthy +changes: -starter-kit includes an example [cockpitous release script](./cockpituous-release) +``` +123 -and a [packit.yaml](./packit.yaml) control file with detailed comments how to -use it. There is also an [example GitHub release action](.github/workflows/release.yml.disabled) -to set up secrets and run cockpituous. +- this new feature +- fix bug #123 +``` + +Pushing the release tag triggers the [release.yml](.github/workflows/release.yml.disabled) +[GitHub action](https://github.com/features/actions) workflow. This creates the +official release tarball and publishes as upstream release to GitHub. The +workflow is disabled by default -- to use it, edit the file as per the comment +at the top, and rename it to just `*.yml`. + +The Fedora and COPR releases are done with [Packit](https://packit.dev/), +see the [packit.yaml](./packit.yaml) control file. # Automated maintenance diff --git a/cockpituous-release b/cockpituous-release deleted file mode 100644 index aca4f08..0000000 --- a/cockpituous-release +++ /dev/null @@ -1,34 +0,0 @@ -# This is a script run to release this project through Cockpituous: -# https://github.com/cockpit-project/cockpituous/tree/main/release - -# Anything that start with 'job' may run in a way that it SIGSTOP's -# itself when preliminary preparition and then gets a SIGCONT in -# order to complete its work. -# -# Check cockpituous documentation for available release targets. -# -# This gets run through a GitHub action: enable and adjust -# .github/workflows/release.yml.disabled once you are ready. - -RELEASE_SOURCE="_release/source" -RELEASE_SPEC="cockpit-starter-kit.spec" -RELEASE_SRPM="_release/srpm" - -job release-source -job release-srpm -V - -# Once you have a Fedora package, can upload to Fedora automatically: Provide the -# secrets in .github/workflows/release.yml on GitHub, and enable the following: - -## Authenticate for pushing into Fedora dist-git -# cat ~/.fedora-password | kinit yourfedorauser@FEDORAPROJECT.ORG -## Do fedora builds for the tag, using tarball -# job release-koji rawhide -# job release-koji f36 -# job release-bodhi F36 - -# These are likely the first of your release targets; but run them after Fedora uploads, -# so that failures there will fail the release early, before publishing on GitHub - -# this needs no explicit secrets, just the GitHub action provided default one -# job release-github diff --git a/packit.yaml b/packit.yaml index b7a7e96..bcba1b0 100644 --- a/packit.yaml +++ b/packit.yaml @@ -3,6 +3,8 @@ # See https://packit.dev/docs/configuration/ for the format of this file specfile_path: cockpit-starter-kit.spec +# use the nicely formatted release description from our upstream release, instead of git shortlog +copy_upstream_release_description: true srpm_build_deps: - make @@ -37,3 +39,23 @@ jobs: # targets: # - fedora-all # - centos-stream-9-x86_64 + + # Build releases in Fedora: https://packit.dev/docs/configuration/#propose_downstream + #- job: propose_downstream + # trigger: release + # metadata: + # dist_git_branches: + # - fedora-all + + #- job: koji_build + # trigger: commit + # metadata: + # dist_git_branches: + # - fedora-all + + #- job: bodhi_update + # trigger: commit + # metadata: + # dist_git_branches: + # # rawhide updates are created automatically + # - fedora-branched From c069d7b223caa9c30ad0a697ad6a29748bc4c232 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 7 Jun 2022 16:17:56 +0200 Subject: [PATCH 366/942] packaging: Drop unnecessary cockpit-system dependency All cockpit extensions should only require the bridge, at least as long as they are independent from any other page (which is usually the case). We still need cockpit-system for the tests (thus keep it in test/browser/main.fmf), but it is perfectly reasonable to look at a particular Cockpit page via the "remote hosts" panel, cockpit-desktop, or Cockpit Client. --- packaging/cockpit-starter-kit.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 278c5b7..78195c4 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -19,7 +19,7 @@ BuildRequires: gettext BuildRequires: libappstream-glib-devel %endif -Requires: cockpit-system +Requires: cockpit-bridge %description Cockpit Starter Kit Example Module From c09e9ce49dded4d83dd96a3dfeab1916c6e96d15 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 13 Jun 2022 03:37:04 +0000 Subject: [PATCH 367/942] package.json: Update @patternfly/react-core Closes #584 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 133d3fc..93d9684 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.196.7", - "@patternfly/react-core": "4.221.5", + "@patternfly/react-core": "4.221.13", "react": "17.0.2", "react-dom": "17.0.2" } From 3a278b6d27162ec79c8eb1d6b4c7626cc49e5c60 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 13 Jun 2022 07:18:31 +0200 Subject: [PATCH 368/942] cirrus: Run tests with Firefox The GKE container only has the default 64 MiB /dev/shm, which is not enough for Chromium. It cannot be remounted from inside the container, and chromium's `--disable-dev-shm-usage` option does not actually work, so run the tests with Firefox instead. --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 118fb21..1775e60 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -18,4 +18,5 @@ test_task: # test PO template generation pot_build_script: make po/starter-kit.pot - check_script: TEST_JOBS=$(nproc) TEST_OS=$TEST_OS make check + # chromium has too little /dev/shm, and we can't make that bigger + check_script: TEST_BROWSER=firefox TEST_JOBS=$(nproc) TEST_OS=$TEST_OS make check From 358232f1fb40191aef641187aee7f4403caf77a8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 20 Jun 2022 03:17:08 +0000 Subject: [PATCH 369/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #586 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 93d9684..119c572 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.196.7", - "@patternfly/react-core": "4.221.13", + "@patternfly/patternfly": "4.200.0", + "@patternfly/react-core": "4.222.14", "react": "17.0.2", "react-dom": "17.0.2" } From d41744c085feef3d1f69c899644af842a0a213c6 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 27 Jun 2022 06:41:22 +0200 Subject: [PATCH 370/942] packaging: Disable webpack rebuild in RHEL/CentOS 8 RHEL 8 has node 10, which is too old for current jest-worker/eslint/stylelint NPM modules. The webpack rebuild during RPM build was introduced to satisfy Fedora packaging policy, but it's not a requirement on RHEL 8. So just disable it there. --- packaging/cockpit-starter-kit.spec.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 78195c4..fafc3c1 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -11,7 +11,7 @@ ExclusiveArch: %{nodejs_arches} noarch %if 0%{?fedora} BuildRequires: nodejs-devel %endif -BuildRequires: nodejs +BuildRequires: nodejs BuildRequires: make BuildRequires: libappstream-glib BuildRequires: gettext @@ -27,7 +27,10 @@ Cockpit Starter Kit Example Module %prep %autosetup -n %{name} -a 1 # ignore pre-built webpack in release tarball and rebuild it +# but keep it in RHEL/CentOS-8, as that has a too old nodejs +%if ! 0%{?rhel} || 0%{?rhel} >= 9 rm -rf dist +%endif %build ESLINT=0 NODE_ENV=production make From adc3643052e1061ed96a6d8c10859e6cab920544 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 27 Jun 2022 03:51:06 +0000 Subject: [PATCH 371/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #587 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 119c572..6d80085 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.200.0", - "@patternfly/react-core": "4.222.14", + "@patternfly/patternfly": "4.202.1", + "@patternfly/react-core": "4.223.3", "react": "17.0.2", "react-dom": "17.0.2" } From b3a95656688695f8282229c6c811dc06cc7977af Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 06:57:10 +0200 Subject: [PATCH 372/942] build: don't move pkg/lib/ to src/lib/ Keep pkg/lib in the same location as it is in the cockpit repository, and adjust the include path accordingly. This makes the production of the .pot file somewhat more deterministic: previously, it would either include or not include the strings from pkg/lib depending on if it had been checked out or not. Now it never includes them. Cherry-picked from cockpit-podman commit a70630be2139a. --- .eslintignore | 2 +- .gitignore | 2 +- Makefile | 11 +++++------ src/index.js | 4 ++-- webpack.config.js | 8 ++++---- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.eslintignore b/.eslintignore index 8faa0e3..85f5a45 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,2 @@ node_modules/* -src/lib/* +pkg/lib/* diff --git a/.gitignore b/.gitignore index e45fe25..f02bb78 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ Test*FAIL* /bots test/common/ test/images/ -src/lib/ +pkg *.pot POTFILES* tmp/ diff --git a/Makefile b/Makefile index d817de0..0c9ff5b 100644 --- a/Makefile +++ b/Makefile @@ -15,8 +15,8 @@ VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran WEBPACK_TEST=dist/manifest.json -# one example file in src/lib to check if it was already checked out -LIB_TEST=src/lib/cockpit-po-plugin.js +# one example file in pkg/lib to check if it was already checked out +LIB_TEST=pkg/lib/cockpit-po-plugin.js # common arguments for tar, mostly to make the generated tarballs reproducible TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0 @@ -35,10 +35,10 @@ po/$(PACKAGE_NAME).js.pot: --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 $$(find src/ \( -name '*.js' -o -name '*.jsx' \) \! -path 'src/lib/*') + --from-code=UTF-8 $$(find src/ \( -name '*.js' -o -name '*.jsx' \)) po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) - po/html2po -o $@ $$(find src -name '*.html' \! -path 'src/lib/*') + po/html2po -o $@ $$(find src -name '*.html') po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ @@ -111,7 +111,7 @@ $(TARFILE): $(WEBPACK_TEST) $(SPEC) touch dist/* tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ --exclude packaging/$(SPEC).in --exclude node_modules \ - $$(git ls-files) src/lib package-lock.json $(SPEC) dist/ + $$(git ls-files) pkg/lib package-lock.json $(SPEC) dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) tar --xz $(TAR_ARGS) -cf $@ node_modules @@ -187,7 +187,6 @@ $(LIB_TEST): git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 265; \ git checkout --force FETCH_HEAD -- pkg/lib; \ git reset -- pkg/lib' - mv pkg/lib src/ && rmdir -p pkg $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages diff --git a/src/index.js b/src/index.js index a0e5c45..2d90d61 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,7 @@ * along with Cockpit; If not, see . */ -import "./lib/patternfly/patternfly-4-cockpit.scss"; +import "patternfly/patternfly-4-cockpit.scss"; import React from 'react'; import ReactDOM from 'react-dom'; @@ -29,7 +29,7 @@ import { Application } from './app.jsx'; * out of the dist/index.js and since it will maintain the order of the imported CSS, * the overrides will be correctly in the end of our stylesheet. */ -import "./lib/patternfly/patternfly-4-overrides.scss"; +import "patternfly/patternfly-4-overrides.scss"; import './app.scss'; document.addEventListener("DOMContentLoaded", function () { diff --git a/webpack.config.js b/webpack.config.js index 0745388..c1210ff 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,8 +7,8 @@ const TerserJSPlugin = require('terser-webpack-plugin'); const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); -const CockpitPoPlugin = require("./src/lib/cockpit-po-plugin"); -const CockpitRsyncPlugin = require("./src/lib/cockpit-rsync-plugin"); +const CockpitPoPlugin = require("./pkg/lib/cockpit-po-plugin"); +const CockpitRsyncPlugin = require("./pkg/lib/cockpit-rsync-plugin"); /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; @@ -47,11 +47,11 @@ if (production) { module.exports = { mode: production ? 'production' : 'development', resolve: { - modules: [ "node_modules", path.resolve(__dirname, 'src/lib') ], + modules: [ "node_modules", path.resolve(__dirname, 'pkg/lib') ], alias: { 'font-awesome': 'font-awesome-sass/assets/stylesheets' }, }, resolveLoader: { - modules: [ "node_modules", path.resolve(__dirname, 'src/lib') ], + modules: [ "node_modules", path.resolve(__dirname, 'pkg/lib') ], }, watchOptions: { ignored: /node_modules/, From 06dd57278455b67898b8f425a63aa15d989a421f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 07:09:39 +0200 Subject: [PATCH 373/942] Makefile: simplify cockpit repo checkout code Replace the two rules for test/common and pkg/lib with a single rule based on `git-archive`, avoiding the use of racy `FETCH_HEAD` and side-effecting `git-checkout`. This lets us drop the `flock` call, and introduces some logic to avoid the fetch in case we already have it. We'll hardcode shas from here on out: it's more secure (ie: tamperproof), and more performant (since we don't have to check the ref if we already have the object), in addition to being easier to work with in terms of the required git commands. Use pkg/lib/cockpit.js as a stamp file. This rule will make it easier to expand to more files in the future. One drawback is that when we want to update files from the cockpit/ repository, we'll now need to do it in lock-step: using new API from testlib will force us to adjust to PatternFly changes, for example. Cherry-picked from cockpit-podman commit cfc05e730d6f5d. --- .gitignore | 1 + Makefile | 47 ++++++++++++++++++++++++----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index f02bb78..aa13142 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ pkg POTFILES* tmp/ /po/LINGUAS +/tools diff --git a/Makefile b/Makefile index 0c9ff5b..bc9f429 100644 --- a/Makefile +++ b/Makefile @@ -16,12 +16,32 @@ NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran WEBPACK_TEST=dist/manifest.json # one example file in pkg/lib to check if it was already checked out -LIB_TEST=pkg/lib/cockpit-po-plugin.js +COCKPIT_REPO_STAMP=pkg/lib/cockpit-po-plugin.js # common arguments for tar, mostly to make the generated tarballs reproducible TAR_ARGS = --sort=name --mtime "@$(shell git show --no-patch --format='%at')" --mode=go=rX,u+rw,a-s --numeric-owner --owner=0 --group=0 all: $(WEBPACK_TEST) +# checkout common files from Cockpit repository required to build this project; +# this has no API stability guarantee, so check out a stable tag when you start +# a new project, use the latest release, and update it from time to time +COCKPIT_REPO_FILES = \ + pkg/lib \ + test/common \ + tools/git-utils.sh \ + tools/make-bots \ + $(NULL) + +COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git +COCKPIT_REPO_COMMIT = 5a37c1966cbd0adddab9e453b2c1c854c0f7a2ba # 272 + +$(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) +COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' +$(COCKPIT_REPO_STAMP): Makefile + @git rev-list --quiet --objects $(COCKPIT_REPO_TREE) -- 2>/dev/null || \ + git fetch --no-tags --no-write-fetch-head --depth=1 $(COCKPIT_REPO_URL) $(COCKPIT_REPO_COMMIT) + git archive $(COCKPIT_REPO_TREE) -- tools/git-utils.sh $(COCKPIT_REPO_FILES) | tar x + # # i18n # @@ -65,7 +85,7 @@ update-po: po/$(PACKAGE_NAME).pot %.spec: packaging/%.spec.in sed -e 's/%{VERSION}/$(VERSION)/g' $< > $@ -$(WEBPACK_TEST): $(NODE_MODULES_TEST) $(LIB_TEST) $(shell find src/ -type f) package.json webpack.config.js +$(WEBPACK_TEST): $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) $(shell find src/ -type f) package.json webpack.config.js NODE_ENV=$(NODE_ENV) node_modules/.bin/webpack watch: @@ -166,27 +186,8 @@ check: prepare-check TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} # checkout Cockpit's bots for standard test VM images and API to launch them -# must be from main, as only that has current and existing images; but testvm.py API is stable -# support CI testing against a bots change -bots: - git clone --quiet --reference-if-able $${XDG_CACHE_HOME:-$$HOME/.cache}/cockpit-project/bots https://github.com/cockpit-project/bots.git - if [ -n "$$COCKPIT_BOTS_REF" ]; then git -C bots fetch --quiet --depth=1 origin "$$COCKPIT_BOTS_REF"; git -C bots checkout --quiet FETCH_HEAD; fi - @echo "checked out bots/ ref $$(git -C bots rev-parse HEAD)" - -# checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag -# when you start a new project, use the latest release, and update it from time to time -test/common: - flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 80483286d5e7bffd1b7583a499e1b7e04d55f1f3; \ - git checkout --force FETCH_HEAD -- test/common; \ - git reset test/common' - -# checkout Cockpit's PF/React/build library; again this has no API stability guarantee, so check out a stable tag -$(LIB_TEST): - flock Makefile sh -ec '\ - git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 265; \ - git checkout --force FETCH_HEAD -- pkg/lib; \ - git reset -- pkg/lib' +bots: tools/make-bots + tools/make-bots $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages From 89fe84ead166556a729b723829d2654bc52803f1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 07:16:34 +0200 Subject: [PATCH 374/942] Makefile: Drop update-po rule This is not called from anywhere, and does not match the contemporary workflow where PO files are pulled from weblate. --- Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Makefile b/Makefile index bc9f429..a1c6fd3 100644 --- a/Makefile +++ b/Makefile @@ -72,12 +72,6 @@ po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po po/LINGUAS: echo $(LINGUAS) | tr ' ' '\n' > $@ -# Update translations against current PO template -update-po: po/$(PACKAGE_NAME).pot - for lang in $(LINGUAS); do \ - msgmerge --output-file=po/$$lang.po po/$$lang.po $<; \ - done - # # Build/Install/dist # @@ -196,4 +190,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist node-cache rpm check vm update-po print-vm devel-uninstall +.PHONY: all clean install devel-install print-version dist node-cache rpm check vm print-vm devel-uninstall From e38a1c39068a5d9c8d1e329abe4ce966e538706c Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 07:19:53 +0200 Subject: [PATCH 375/942] Bump Cockpit API to include Python 3.11 compatibility fix This will fix tests on Rawhide. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a1c6fd3..203078e 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 5a37c1966cbd0adddab9e453b2c1c854c0f7a2ba # 272 +COCKPIT_REPO_COMMIT = 4ac3051d86db4f9061e35ce0584b688b1c8115e4 # 272 + PR#17505 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From ebe52bcdb7a6bbaa0f09afd0ff7e5aeb60c76efa Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 07:27:35 +0200 Subject: [PATCH 376/942] build: use translation tools from pkg/lib Use the html2po and manifest2po tools that we already check out from cockpit repo pkg/lib. These tools switched to a new argument parser library (`argparse`) in cockpit-project/cockpit#16271, so add it to our package.json and drop `stdio`. Drop our old copies. I checked the result of building `po/starter-kit.pot` before and after the change, and aside from the timestamp, it's identical. Cherry-picked from cockpit-podman commit bf53f801b17ba6. --- Makefile | 10 +- package.json | 2 +- po/html2po | 264 ------------------------------------------------- po/manifest2po | 193 ------------------------------------ 4 files changed, 6 insertions(+), 463 deletions(-) delete mode 100755 po/html2po delete mode 100755 po/manifest2po diff --git a/Makefile b/Makefile index 203078e..9577545 100644 --- a/Makefile +++ b/Makefile @@ -55,13 +55,13 @@ po/$(PACKAGE_NAME).js.pot: --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ --keyword=ngettext:1,2,3t --keyword=ngettext:1c,2,3,4t \ --keyword=gettextCatalog.getString:1,3c --keyword=gettextCatalog.getPlural:2,3,4c \ - --from-code=UTF-8 $$(find src/ \( -name '*.js' -o -name '*.jsx' \)) + --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') -po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) - po/html2po -o $@ $$(find src -name '*.html') +po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) + pkg/lib/html2po -o $@ $$(find src -name '*.html') -po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) - po/manifest2po src/manifest.json -o $@ +po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) + pkg/lib/manifest2po src/manifest.json -o $@ po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< diff --git a/package.json b/package.json index 6d80085..e099ce4 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@babel/eslint-parser": "^7.17.0", "@babel/preset-env": "^7.5.4", "@babel/preset-react": "^7.0.0", + "argparse": "^2.0.1", "babel-loader": "^8.0.6", "chrome-remote-interface": "^0.31.0", "compression-webpack-plugin": "^9.0.0", @@ -41,7 +42,6 @@ "sass": "^1.35.2", "sass-loader": "^12.1.0", "sizzle": "^2.3.3", - "stdio": "^2.1.0", "string-replace-loader": "^3.0.0", "terser-webpack-plugin": "^5.1.4", "webpack": "^5.54.0", diff --git a/po/html2po b/po/html2po deleted file mode 100755 index 8b34fa0..0000000 --- a/po/html2po +++ /dev/null @@ -1,264 +0,0 @@ -#!/usr/bin/env node - -/* - * Extracts translatable strings from HTML files in the following forms: - * - * String - * String - * String - * - * - * Supports the following Glade compatible forms: - * - * String - * String - * - * Supports the following angular-gettext compatible forms: - * - * String - * Singular - * - * Note that some of the use of the translated may not support all the strings - * depending on the code actually using these strings to translate the HTML. - */ - - -function fatal(message, code) { - console.log((filename || "html2po") + ": " + message); - process.exit(code || 1); -} - -function usage() { - console.log("usage: html2po input output"); - process.exit(2); -} - -var fs, htmlparser, path, stdio; - -try { - fs = require('fs'); - path = require('path'); - htmlparser = require('htmlparser'); - stdio = require('stdio'); -} catch (ex) { - fatal(ex.message, 127); /* missing looks for this */ -} - -var opts = stdio.getopt({ - directory: { key: "d", args: 1, description: "Base directory for input files", default: "." }, - output: { key: "o", args: 1, description: "Output file" }, - from: { key: "f", args: 1, description: "File containing list of input files", default: "" }, -}); - -if (!opts.from && opts.args.length < 1) { - usage(); -} - -var input = opts.args; -var entries = { }; - -/* Filename being parsed and offset of line number */ -var filename = null; -var offsets = 0; - -/* The HTML parser we're using */ -var handler = new htmlparser.DefaultHandler(function(error, dom) { - if (error) - fatal(error); - else - walk(dom); -}); - -prepare(); - -/* Decide what input files to process */ -function prepare() { - if (opts.from) { - fs.readFile(opts.from, { encoding: "utf-8"}, function(err, data) { - if (err) - fatal(err.message); - input = data.split("\n").filter(function(value) { - return !!value; - }).concat(input); - step(); - }); - } else { - step(); - } -} - -/* Now process each file in turn */ -function step() { - filename = input.shift(); - if (filename === undefined) { - finish(); - return; - } - - /* Qualify the filename if necessary */ - var full = filename; - if (opts.directory) - full = path.join(opts.directory, filename); - - fs.readFile(full, { encoding: "utf-8"}, function(err, data) { - if (err) - fatal(err.message); - - var parser = new htmlparser.Parser(handler, { includeLocation: true }); - parser.parseComplete(data); - step(); - }); -} - -/* Process an array of nodes */ -function walk(children) { - if (!children) - return; - - children.forEach(function(child) { - var line = (child.location || { }).line || 0; - var offset = line - 1; - - /* Scripts get their text processed as HTML */ - if (child.type == 'script' && child.children) { - var parser = new htmlparser.Parser(handler, { includeLocation: true }); - - /* Make note of how far into the outer HTML file we are */ - offsets += offset; - - child.children.forEach(function(node) { - parser.parseChunk(node.raw); - }); - parser.done(); - - offsets -= offset; - - /* Tags get extracted as usual */ - } else if (child.type == 'tag') { - tag(child); - } - }); -} - -/* Process a single loaded tag */ -function tag(node) { - - var tasks, line, entry; - var attrs = node.attribs || { }; - var nest = true; - - /* Extract translate strings */ - if ("translate" in attrs || "translatable" in attrs) { - tasks = (attrs["translate"] || attrs["translatable"] || "yes").split(" "); - - /* Calculate the line location taking into account nested parsing */ - line = (node.location || { })["line"] || 0; - line += offsets; - - entry = { - msgctxt: attrs['translate-context'] || attrs['context'], - msgid_plural: attrs['translate-plural'], - locations: [ filename + ":" + line ] - }; - - /* For each thing listed */ - tasks.forEach(function(task) { - var copy = Object.assign({}, entry); - - /* The element text itself */ - if (task == "yes" || task == "translate") { - copy.msgid = extract(node.children); - nest = false; - - /* An attribute */ - } else if (task) { - copy.msgid = attrs[task]; - } - - if (copy.msgid) - push(copy); - }); - } - - /* Walk through all the children */ - if (nest) - walk(node.children); -} - -/* Push an entry onto the list */ -function push(entry) { - var key = entry.msgid + "\0" + entry.msgid_plural + "\0" + entry.msgctxt; - var prev = entries[key]; - if (prev) { - prev.locations = prev.locations.concat(entry.locations); - } else { - entries[key] = entry; - } -} - -/* Extract the given text */ -function extract(children) { - if (!children) - return null; - - var i, len, node, str = []; - children.forEach(function(node) { - if (node.type == 'tag' && node.children) - str.push(extract(node.children)) - else if (node.type == 'text' && node.data) - str.push(node.data); - }); - - return str.join(""); -} - -/* Escape a string for inclusion in po file */ -function escape(string) { - var bs = string.split('\\').join('\\\\').split('"').join('\\"'); - return bs.split("\n").map(function(line) { - return '"' + line + '"'; - }).join("\n"); -} - -/* Finish by writing out the strings */ -function finish() { - var result = [ - 'msgid ""', - 'msgstr ""', - '"Project-Id-Version: PACKAGE_VERSION\\n"', - '"MIME-Version: 1.0\\n"', - '"Content-Type: text/plain; charset=UTF-8\\n"', - '"Content-Transfer-Encoding: 8bit\\n"', - '"X-Generator: Cockpit html2po\\n"', - '', - ]; - - var msgid, entry; - for (msgid in entries) { - entry = entries[msgid]; - result.push('#: ' + entry.locations.join(" ")); - if (entry.msgctxt) - result.push('msgctxt ' + escape(entry.msgctxt)); - result.push('msgid ' + escape(entry.msgid)); - if (entry.msgid_plural) { - result.push('msgid_plural ' + escape(entry.msgid_plural)); - result.push('msgstr[0] ""'); - result.push('msgstr[1] ""'); - } else { - result.push('msgstr ""'); - } - result.push(''); - } - - var data = result.join('\n'); - if (!opts.output) { - process.stdout.write(data); - process.exit(0); - } else { - fs.writeFile(opts.output, data, function(err) { - if (err) - fatal(err.message); - process.exit(0); - }); - } -} diff --git a/po/manifest2po b/po/manifest2po deleted file mode 100755 index 46fa744..0000000 --- a/po/manifest2po +++ /dev/null @@ -1,193 +0,0 @@ -#!/usr/bin/env node - -/* - * Extracts translatable strings from manifest.json files. - * - */ - -function fatal(message, code) { - console.log((filename || "manifest2po") + ": " + message); - process.exit(code || 1); -} - -function usage() { - console.log("usage: manifest2po [-o output] input..."); - process.exit(2); -} - -var fs, path, stdio; - -try { - fs = require('fs'); - path = require('path'); - stdio = require('stdio'); -} catch (ex) { - fatal(ex.message, 127); /* missing looks for this */ -} - -var opts = stdio.getopt({ - directory: { key: "d", args: 1, description: "Base directory for input files", default: "." }, - output: { key: "o", args: 1, description: "Output file" }, - from: { key: "f", args: 1, description: "File containing list of input files", default: "" }, -}); - -if (!opts.from && opts.args.length < 1) { - usage(); -} - -var input = opts.args; -var entries = { }; - -/* Filename being parsed */ -var filename = null; - -prepare(); - -/* Decide what input files to process */ -function prepare() { - if (opts.from) { - fs.readFile(opts.from, { encoding: "utf-8"}, function(err, data) { - if (err) - fatal(err.message); - input = data.split("\n").filter(function(value) { - return !!value; - }).concat(input); - step(); - }); - } else { - step(); - } -} - -/* Now process each file in turn */ -function step() { - filename = input.shift(); - if (filename === undefined) { - finish(); - return; - } - - if (path.basename(filename) != "manifest.json") - return step(); - - /* Qualify the filename if necessary */ - var full = filename; - if (opts.directory) - full = path.join(opts.directory, filename); - - fs.readFile(full, { encoding: "utf-8"}, function(err, data) { - if (err) - fatal(err.message); - - // There are variables which when not substituted can cause JSON.parse to fail - // Dummy replace them. None variable is going to be translated anyway - safe_data = data.replace(/\@.+?\@/gi, 1); - process_manifest(JSON.parse(safe_data)); - - return step(); - }); -} - -function process_manifest(manifest) { - if (manifest.menu) - process_menu(manifest.menu); - if (manifest.tools) - process_menu(manifest.tools); -} - -function process_keywords(keywords) { - keywords.forEach(v => { - v.matches.forEach(keyword => - push({ - msgid: keyword, - locations: [ filename + ":0" ] - }) - ); - }); -} - -function process_docs(docs) { - docs.forEach(doc => { - push({ - msgid: doc.label, - locations: [ filename + ":0" ] - }) - }); -} - -function process_menu(menu) { - for (var m in menu) { - if (menu[m].label) { - push({ - msgid: menu[m].label, - locations: [ filename + ":0" ] - }); - } - if (menu[m].keywords) - process_keywords(menu[m].keywords); - if (menu[m].docs) - process_docs(menu[m].docs); - } -} - -/* Push an entry onto the list */ -function push(entry) { - var key = entry.msgid + "\0" + entry.msgid_plural + "\0" + entry.msgctxt; - var prev = entries[key]; - if (prev) { - prev.locations = prev.locations.concat(entry.locations); - } else { - entries[key] = entry; - } -} - -/* Escape a string for inclusion in po file */ -function escape(string) { - var bs = string.split('\\').join('\\\\').split('"').join('\\"'); - return bs.split("\n").map(function(line) { - return '"' + line + '"'; - }).join("\n"); -} - -/* Finish by writing out the strings */ -function finish() { - var result = [ - 'msgid ""', - 'msgstr ""', - '"Project-Id-Version: PACKAGE_VERSION\\n"', - '"MIME-Version: 1.0\\n"', - '"Content-Type: text/plain; charset=UTF-8\\n"', - '"Content-Transfer-Encoding: 8bit\\n"', - '"X-Generator: Cockpit manifest2po\\n"', - '', - ]; - - var msgid, entry; - for (msgid in entries) { - entry = entries[msgid]; - result.push('#: ' + entry.locations.join(" ")); - if (entry.msgctxt) - result.push('msgctxt ' + escape(entry.msgctxt)); - result.push('msgid ' + escape(entry.msgid)); - if (entry.msgid_plural) { - result.push('msgid_plural ' + escape(entry.msgid_plural)); - result.push('msgstr[0] ""'); - result.push('msgstr[1] ""'); - } else { - result.push('msgstr ""'); - } - result.push(''); - } - - var data = result.join('\n'); - if (!opts.output) { - process.stdout.write(data); - process.exit(0); - } else { - fs.writeFile(opts.output, data, function(err) { - if (err) - fatal(err.message); - process.exit(0); - }); - } -} From 9c7a341fe7eabdf9e4cce15e8145e183f34cdb0d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 07:52:15 +0200 Subject: [PATCH 377/942] Makefile: Some noise cleanup - Generalize NODE_MODULES_TEST comment to apply for both direct `npm install` and git checkouts. - Drop obsolete touch commands from dist tarfile build. - Consistently use NODE_MODULES_TEST constant. - Better sorting of .PHONY, and add missing prepare-check. This reduces the diff to cockpit-podman. --- Makefile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9577545..25c5220 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz SPEC=$(RPM_NAME).spec APPSTREAMFILE=org.cockpit-project.$(PACKAGE_NAME).metainfo.xml VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) -# stamp file to check if/when npm install ran +# stamp file to check for node_modules/ NODE_MODULES_TEST=package-lock.json # one example file in dist/ from webpack to check if that already ran WEBPACK_TEST=dist/manifest.json @@ -121,11 +121,9 @@ dist: $(TARFILE) $(TARFILE): export NODE_ENV=production $(TARFILE): $(WEBPACK_TEST) $(SPEC) if type appstream-util >/dev/null 2>&1; then appstream-util validate-relax --nonet *.metainfo.xml; fi - touch -r package.json $(NODE_MODULES_TEST) - touch dist/* tar --xz $(TAR_ARGS) -cf $(TARFILE) --transform 's,^,$(RPM_NAME)/,' \ --exclude packaging/$(SPEC).in --exclude node_modules \ - $$(git ls-files) pkg/lib package-lock.json $(SPEC) dist/ + $$(git ls-files) $(COCKPIT_REPO_FILES) $(NODE_MODULES_TEST) $(SPEC) dist/ $(NODE_CACHE): $(NODE_MODULES_TEST) tar --xz $(TAR_ARGS) -cf $@ node_modules @@ -190,4 +188,4 @@ $(NODE_MODULES_TEST): package.json env -u NODE_ENV npm install env -u NODE_ENV npm prune -.PHONY: all clean install devel-install print-version dist node-cache rpm check vm print-vm devel-uninstall +.PHONY: all clean install devel-install devel-uninstall print-version dist node-cache rpm prepare-check check vm print-vm From 0772f2c615512b2a344f7ce0ee8d2312761ad7cf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 30 Jun 2022 09:19:39 +0200 Subject: [PATCH 378/942] Makefile: Stop disting git-utils.sh twice It is already contained in COCKPIT_REPO_FILES. Also fix a typo. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 25c5220..734a90a 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' $(COCKPIT_REPO_STAMP): Makefile @git rev-list --quiet --objects $(COCKPIT_REPO_TREE) -- 2>/dev/null || \ git fetch --no-tags --no-write-fetch-head --depth=1 $(COCKPIT_REPO_URL) $(COCKPIT_REPO_COMMIT) - git archive $(COCKPIT_REPO_TREE) -- tools/git-utils.sh $(COCKPIT_REPO_FILES) | tar x + git archive $(COCKPIT_REPO_TREE) -- $(COCKPIT_REPO_FILES) | tar x # # i18n @@ -116,7 +116,7 @@ dist: $(TARFILE) # when building a distribution tarball, call webpack with a 'production' environment # we don't ship node_modules for license and compactness reasons; we ship a -# pre-built dist/ (so it's not necessary) and ship packge-lock.json (so that +# pre-built dist/ (so it's not necessary) and ship package-lock.json (so that # node_modules/ can be reconstructed if necessary) $(TARFILE): export NODE_ENV=production $(TARFILE): $(WEBPACK_TEST) $(SPEC) From eebc1cb170fc40da0a40c50fba4f4c961910c1e2 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 4 Jul 2022 03:50:39 +0000 Subject: [PATCH 379/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #591 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e099ce4..bc85a26 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.202.1", - "@patternfly/react-core": "4.223.3", + "@patternfly/patternfly": "4.202.2", + "@patternfly/react-core": "4.224.2", "react": "17.0.2", "react-dom": "17.0.2" } From 26ec9f69949cb31c5b717c1d92f63c5637382e93 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 11 Jul 2022 03:38:59 +0000 Subject: [PATCH 380/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #592 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index bc85a26..746a2b7 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.202.2", - "@patternfly/react-core": "4.224.2", + "@patternfly/patternfly": "4.203.2", + "@patternfly/react-core": "4.224.12", "react": "17.0.2", "react-dom": "17.0.2" } From 6b659f1e74046547beb2cb80ddd6a3cb4705b0f0 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 15 Jul 2022 14:29:07 +0200 Subject: [PATCH 381/942] packit.yml: drop deprecated metadata key The packit docs no longer mention the metadata key as required. https://packit.dev/docs/configuration/#supported-jobs --- packit.yaml | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/packit.yaml b/packit.yaml index bcba1b0..3fd4283 100644 --- a/packit.yaml +++ b/packit.yaml @@ -23,8 +23,7 @@ actions: jobs: - job: tests trigger: pull_request - metadata: - targets: + targets: - fedora-all - centos-stream-8 - centos-stream-9 @@ -32,30 +31,26 @@ jobs: # Build releases in COPR: https://packit.dev/docs/configuration/#copr_build #- job: copr_build # trigger: release - # metadata: - # owner: your_copr_login - # project: your_copr_project - # preserve_project: True - # targets: - # - fedora-all - # - centos-stream-9-x86_64 + # owner: your_copr_login + # project: your_copr_project + # preserve_project: True + # targets: + # - fedora-all + # - centos-stream-9-x86_64 # Build releases in Fedora: https://packit.dev/docs/configuration/#propose_downstream #- job: propose_downstream # trigger: release - # metadata: - # dist_git_branches: - # - fedora-all + # dist_git_branches: + # - fedora-all #- job: koji_build # trigger: commit - # metadata: - # dist_git_branches: - # - fedora-all + # dist_git_branches: + # - fedora-all #- job: bodhi_update # trigger: commit - # metadata: - # dist_git_branches: - # # rawhide updates are created automatically - # - fedora-branched + # dist_git_branches: + # # rawhide updates are created automatically + # - fedora-branched From 0e2591ee93fe1e924069a3af7df8dc2af0196bdc Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 18 Jul 2022 03:47:07 +0000 Subject: [PATCH 382/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #594 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 746a2b7..f0e2456 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.203.2", - "@patternfly/react-core": "4.224.12", + "@patternfly/patternfly": "4.203.4", + "@patternfly/react-core": "4.225.4", "react": "17.0.2", "react-dom": "17.0.2" } From ee366ca5311addebcae7e672e0d8f382a7da78cd Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 19 Jul 2022 17:37:05 +0200 Subject: [PATCH 383/942] Add CSS linting through stylelint Include CSS linting by default for our CSS/SCSS files, originally introduced in cockpit. The stylelint configuration is copied from 760a4628282e02fbcef3. --- .stylelintrc.json | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 23 +++++++++++++++++++++++ package.json | 9 +++++++-- webpack.config.js | 10 ++++++++++ 4 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 .stylelintrc.json diff --git a/.stylelintrc.json b/.stylelintrc.json new file mode 100644 index 0000000..352fbe6 --- /dev/null +++ b/.stylelintrc.json @@ -0,0 +1,38 @@ +{ + "extends": "stylelint-config-standard-scss", + "rules": { + "declaration-colon-newline-after": null, + "selector-list-comma-newline-after": null, + + "at-rule-empty-line-before": null, + "declaration-colon-space-before": null, + "declaration-empty-line-before": null, + "custom-property-empty-line-before": null, + "comment-empty-line-before": null, + "scss/double-slash-comment-empty-line-before": null, + "scss/dollar-variable-colon-space-after": null, + + "custom-property-pattern": null, + "declaration-block-no-duplicate-properties": null, + "declaration-block-no-redundant-longhand-properties": null, + "declaration-block-no-shorthand-property-overrides": null, + "declaration-block-single-line-max-declarations": null, + "font-family-no-duplicate-names": null, + "function-url-quotes": null, + "indentation": null, + "keyframes-name-pattern": null, + "max-line-length": null, + "no-descending-specificity": null, + "no-duplicate-selectors": null, + "scss/at-extend-no-missing-placeholder": null, + "scss/at-import-partial-extension": null, + "scss/at-mixin-pattern": null, + "scss/comment-no-empty": null, + "scss/dollar-variable-pattern": null, + "scss/double-slash-comment-whitespace-inside": null, + "scss/no-global-function-names": null, + "scss/operator-no-unspaced": null, + "selector-class-pattern": null, + "selector-id-pattern": null + } +} diff --git a/README.md b/README.md index dede86d..a0524bb 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,29 @@ Violations of some rules can be fixed automatically by: Rules configuration can be found in the `.eslintrc.json` file. +## Running stylelint + +Cockpit uses [Stylelint](https://stylelint.io/) to automatically check CSS code +style in `.css` and `scss` files. + +The linter is executed within every build as a webpack preloader. + +For developer convenience, the Stylelint can be started explicitly by: + + $ npm run stylelint + +Violations of some rules can be fixed automatically by: + + $ npm run stylelint:fix + +Rules configuration can be found in the `.stylelintrc.json` file. + +During fast iterative development, you can also choose to not run stylelint. +This speeds up the build and avoids build failures due to e. g. ill-formatted +css or other issues: + + $ make STYLELINT=0 + # Running tests locally Run `make check` to build an RPM, install it into a standard Cockpit test VM diff --git a/package.json b/package.json index f0e2456..a40263a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "watch": "webpack --watch --progress", "build": "webpack", "eslint": "eslint --ext .js --ext .jsx src/", - "eslint:fix": "eslint --fix --ext .js --ext .jsx src/" + "eslint:fix": "eslint --fix --ext .js --ext .jsx src/", + "stylelint": "stylelint src/*{.css,scss}", + "stylelint:fix": "stylelint --fix src/*{.css,scss}" }, "devDependencies": { "@babel/core": "^7.5.4", @@ -43,6 +45,7 @@ "sass-loader": "^12.1.0", "sizzle": "^2.3.3", "string-replace-loader": "^3.0.0", + "stylelint": "^14.9.1", "terser-webpack-plugin": "^5.1.4", "webpack": "^5.54.0", "webpack-cli": "^4.9.1" @@ -51,6 +54,8 @@ "@patternfly/patternfly": "4.203.4", "@patternfly/react-core": "4.225.4", "react": "17.0.2", - "react-dom": "17.0.2" + "react-dom": "17.0.2", + "stylelint-config-standard-scss": "^5.0.0", + "stylelint-webpack-plugin": "^3.3.0" } } diff --git a/webpack.config.js b/webpack.config.js index c1210ff..6ddfde2 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,6 +9,7 @@ const CompressionPlugin = require("compression-webpack-plugin"); const ESLintPlugin = require('eslint-webpack-plugin'); const CockpitPoPlugin = require("./pkg/lib/cockpit-po-plugin"); const CockpitRsyncPlugin = require("./pkg/lib/cockpit-rsync-plugin"); +const StylelintPlugin = require('stylelint-webpack-plugin'); /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; @@ -16,6 +17,9 @@ const production = process.env.NODE_ENV === 'production'; /* development options for faster iteration */ const eslint = process.env.ESLINT !== '0'; +/* Default to disable csslint for faster production builds */ +const stylelint = process.env.STYLELINT ? (process.env.STYLELINT !== '0') : !production; + // Obtain package name from package.json const packageJson = JSON.parse(fs.readFileSync('package.json')); @@ -36,6 +40,12 @@ if (eslint) { plugins.push(new ESLintPlugin({ extensions: ["js", "jsx"], failOnWarning: true, })); } +if (stylelint) { + plugins.push(new StylelintPlugin({ + context: "src/", + })); +} + /* Only minimize when in production mode */ if (production) { plugins.unshift(new CompressionPlugin({ From 109fa373096e11d6b3cff456822f4e48bb3067ca Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 20 Jul 2022 14:48:53 +0200 Subject: [PATCH 384/942] test: Drop obsolete fallbacks for cockpit < 266 CentOS 8 Stream has version 270, that's the oldest version that we support. --- test/check-application | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/test/check-application b/test/check-application index 6e51c90..376cf6f 100755 --- a/test/check-application +++ b/test/check-application @@ -36,24 +36,14 @@ class TestApplication(testlib.MachineCase): # change language to German b.switch_to_top() # the menu and dialog changed several times - if self.system_before(258): - b.click("#navbar-dropdown") - b.click(".display-language-menu a") - b.wait_popup('display-language') - else: - b.click("#toggle-menu") - b.click(".display-language-menu") - b.wait_popup('display-language-modal') + b.click("#toggle-menu") + b.click(".display-language-menu") + b.wait_popup('display-language-modal') b.click("#display-language-modal [data-value='de-de'] button") b.click("#display-language-modal button.pf-m-primary") - if self.system_before(265) and b.cdp.browser.name == "chromium": - # HACK: work around language switching in Chrome not working in current session (Cockpit issue #8160) - b.reload(ignore_cache=True) b.wait_visible("#content") # menu label (from manifest) should be translated - # HACK: This regressed in cockpit 265, see https://github.com/cockpit-project/cockpit/pull/17145 - if self.system_before(265) or not self.system_before(266): - b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") + b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") b.go("/starter-kit") b.enter_page("/starter-kit") From 652b06d9006f04f004e8d1dc32f130f1f0cf5c51 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 20 Jul 2022 15:57:07 +0200 Subject: [PATCH 385/942] test: Check that window title is translated This is actually kind of surprising: We never call cockpit.translate() anywhere. --- test/check-application | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/check-application b/test/check-application index 376cf6f..4dd87f1 100755 --- a/test/check-application +++ b/test/check-application @@ -44,6 +44,8 @@ class TestApplication(testlib.MachineCase): b.wait_visible("#content") # menu label (from manifest) should be translated b.wait_text("#host-apps a[href='/starter-kit']", "Bausatz") + # window title should be translated; this is not considered as "visible" + self.assertIn("Bausatz", b.call_js_func("ph_text", "head title")) b.go("/starter-kit") b.enter_page("/starter-kit") From 433975df398de391cb6b2b8401dba4619c61e03a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 20 Jul 2022 16:05:50 +0200 Subject: [PATCH 386/942] Bump Cockpit API to 273 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 734a90a..581873c 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 4ac3051d86db4f9061e35ce0584b688b1c8115e4 # 272 + PR#17505 +COCKPIT_REPO_COMMIT = 33639ff7015841747032b4158cebd4a3b3f36333 # 273 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 73f24087ab10bca2cbab4776d3057fd0a2d14b77 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 21 Jul 2022 07:26:04 +0200 Subject: [PATCH 387/942] package.json: Move stylelint to devDependencies --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a40263a..650a1c7 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,8 @@ "sizzle": "^2.3.3", "string-replace-loader": "^3.0.0", "stylelint": "^14.9.1", + "stylelint-config-standard-scss": "^5.0.0", + "stylelint-webpack-plugin": "^3.3.0", "terser-webpack-plugin": "^5.1.4", "webpack": "^5.54.0", "webpack-cli": "^4.9.1" @@ -54,8 +56,6 @@ "@patternfly/patternfly": "4.203.4", "@patternfly/react-core": "4.225.4", "react": "17.0.2", - "react-dom": "17.0.2", - "stylelint-config-standard-scss": "^5.0.0", - "stylelint-webpack-plugin": "^3.3.0" + "react-dom": "17.0.2" } } From a22972abba88833c2268cd18d81560219a253ca7 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 25 Jul 2022 03:48:10 +0000 Subject: [PATCH 388/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #599 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 650a1c7..2c1452c 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.203.4", - "@patternfly/react-core": "4.225.4", + "@patternfly/patternfly": "4.204.2", + "@patternfly/react-core": "4.225.9", "react": "17.0.2", "react-dom": "17.0.2" } From 3d7d84684c040ae6812d89cf9295d060bc3f9250 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 1 Aug 2022 04:05:41 +0000 Subject: [PATCH 389/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #600 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2c1452c..e3136c9 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.204.2", - "@patternfly/react-core": "4.225.9", + "@patternfly/patternfly": "4.206.1", + "@patternfly/react-core": "4.228.0", "react": "17.0.2", "react-dom": "17.0.2" } From aed931ec1c0732001f52f7bc2f48698575cb7b3b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 8 Aug 2022 03:41:07 +0000 Subject: [PATCH 390/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #601 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e3136c9..c72fce1 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.206.1", - "@patternfly/react-core": "4.228.0", + "@patternfly/patternfly": "4.206.3", + "@patternfly/react-core": "4.231.5", "react": "17.0.2", "react-dom": "17.0.2" } From 633e3257aed46ea443ede09ffb2fdb153240c01f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 15 Aug 2022 03:58:48 +0000 Subject: [PATCH 391/942] package.json: Update @patternfly/react-core Closes #602 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c72fce1..8f24a14 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.206.3", - "@patternfly/react-core": "4.231.5", + "@patternfly/react-core": "4.231.8", "react": "17.0.2", "react-dom": "17.0.2" } From 57d7c73d6e32c24f3141329f61627bcdc644ceb4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 14 Sep 2022 07:08:45 +0200 Subject: [PATCH 392/942] Install into /usr/local/ by default /usr is package manager territory, and not even writable on OSTree based systems such as Fedora CoreOS or RHEL Edge. This has been common and good practice in autotools for decades. You can still override this with `make install PREFIX=...`. Use that in the RPM spec file. --- Makefile | 9 +++++---- README.md | 2 +- packaging/cockpit-starter-kit.spec.in | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 581873c..240f1d6 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ export TEST_OS TARFILE=$(RPM_NAME)-$(VERSION).tar.xz NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz SPEC=$(RPM_NAME).spec +PREFIX ?= /usr/local APPSTREAMFILE=org.cockpit-project.$(PACKAGE_NAME).metainfo.xml VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check for node_modules/ @@ -91,12 +92,12 @@ clean: rm -f po/LINGUAS install: $(WEBPACK_TEST) po/LINGUAS - mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) - cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) - mkdir -p $(DESTDIR)/usr/share/metainfo/ + mkdir -p $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) + cp -r dist/* $(DESTDIR)$(PREFIX)/share/cockpit/$(PACKAGE_NAME) + mkdir -p $(DESTDIR)$(PREFIX)/share/metainfo/ msgfmt --xml -d po \ --template $(APPSTREAMFILE) \ - -o $(DESTDIR)/usr/share/metainfo/$(APPSTREAMFILE) + -o $(DESTDIR)$(PREFIX)/share/metainfo/$(APPSTREAMFILE) # this requires a built source tree and avoids having to install anything system-wide devel-install: $(WEBPACK_TEST) diff --git a/README.md b/README.md index a0524bb..536fbe7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ make # Installing -`make install` compiles and installs the package in `/usr/share/cockpit/`. The +`make install` compiles and installs the package in `/usr/local/share/cockpit/`. The convenience targets `srpm` and `rpm` build the source and binary rpms, respectively. Both of these make use of the `dist` target, which is used to generate the distribution tarball. In `production` mode, source files are diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index fafc3c1..ad5539f 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -36,7 +36,7 @@ rm -rf dist ESLINT=0 NODE_ENV=production make %install -%make_install +%make_install PREFIX=/usr # drop source maps, they are large and just for debugging find %{buildroot}%{_datadir}/cockpit/ -name '*.map' | xargs --no-run-if-empty rm --verbose From ddf9eb312c757c19d6b9c728daf7c19a95c7d7d6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 31 Oct 2022 03:47:54 +0000 Subject: [PATCH 393/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #606 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8f24a14..f65a849 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.206.3", - "@patternfly/react-core": "4.231.8", + "@patternfly/patternfly": "4.219.2", + "@patternfly/react-core": "4.258.3", "react": "17.0.2", "react-dom": "17.0.2" } From 284cb7dad0457cfcfe5b2813dbb962572c703e62 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 31 Oct 2022 06:16:24 +0100 Subject: [PATCH 394/942] cirrus: Move to Fedora 37 There is no Fedora 35 image any more. --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1775e60..93c72b3 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ container: test_task: env: matrix: - - TEST_OS: fedora-35 + - TEST_OS: fedora-37 - TEST_OS: centos-8-stream fix_kvm_script: sudo chmod 666 /dev/kvm From cba96f4f64f62eb2af2e4ed0a76ceae66b5a0df5 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 7 Nov 2022 03:36:13 +0000 Subject: [PATCH 395/942] package.json: Update @patternfly/react-core Closes #608 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f65a849..43eeceb 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.219.2", - "@patternfly/react-core": "4.258.3", + "@patternfly/react-core": "4.258.6", "react": "17.0.2", "react-dom": "17.0.2" } From 312cd70994784bf66c54d82a7e34cd2066fd6b1f Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 14 Nov 2022 03:27:17 +0000 Subject: [PATCH 396/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #609 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 43eeceb..316bb21 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.219.2", - "@patternfly/react-core": "4.258.6", + "@patternfly/patternfly": "4.221.1", + "@patternfly/react-core": "4.261.0", "react": "17.0.2", "react-dom": "17.0.2" } From 75a89373bab580e5a0678ddb0b45784beaa00fa8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 21 Nov 2022 03:16:50 +0000 Subject: [PATCH 397/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #611 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 316bb21..569ac65 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.221.1", - "@patternfly/react-core": "4.261.0", + "@patternfly/patternfly": "4.221.2", + "@patternfly/react-core": "4.264.0", "react": "17.0.2", "react-dom": "17.0.2" } From e770d6b442930f3c82e9bea4814dcaaedd8a2b87 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 28 Nov 2022 02:57:11 +0000 Subject: [PATCH 398/942] package.json: Update @patternfly/patternfly Closes #612 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 569ac65..a074200 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.221.2", + "@patternfly/patternfly": "4.221.3", "@patternfly/react-core": "4.264.0", "react": "17.0.2", "react-dom": "17.0.2" From 7e22c859fd1cb9155d86d08caae6706a50af3b02 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 5 Dec 2022 02:41:59 +0000 Subject: [PATCH 399/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #613 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a074200..b9b44a0 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.221.3", - "@patternfly/react-core": "4.264.0", + "@patternfly/patternfly": "4.222.0", + "@patternfly/react-core": "4.265.0", "react": "17.0.2", "react-dom": "17.0.2" } From e4068d0f8ddba4056ccf390d7f19d62ba8a73e9c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 12 Dec 2022 02:48:45 +0000 Subject: [PATCH 400/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #614 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9b44a0..99b3d15 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.222.0", - "@patternfly/react-core": "4.265.0", + "@patternfly/patternfly": "4.222.4", + "@patternfly/react-core": "4.267.5", "react": "17.0.2", "react-dom": "17.0.2" } From 753b877dd8b24f24bc926653dba9dd9a1f4c2ec2 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 19 Dec 2022 02:34:00 +0000 Subject: [PATCH 401/942] package.json: Update @patternfly/react-core Closes #615 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 99b3d15..0e569b5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.222.4", - "@patternfly/react-core": "4.267.5", + "@patternfly/react-core": "4.267.6", "react": "17.0.2", "react-dom": "17.0.2" } From c1e3e22790aaab02eee91e8dd4ea44b21aa8f7ec Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 26 Dec 2022 02:37:19 +0000 Subject: [PATCH 402/942] package.json: Update @patternfly/react-core Closes #616 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e569b5..873c3c5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.222.4", - "@patternfly/react-core": "4.267.6", + "@patternfly/react-core": "4.267.7", "react": "17.0.2", "react-dom": "17.0.2" } From 7e3cef6686bb4207fdbfef0092862087d635281e Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 9 Jan 2023 02:39:09 +0000 Subject: [PATCH 403/942] package.json: Update @patternfly/react-core Closes #617 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 873c3c5..a0d8e7a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.222.4", - "@patternfly/react-core": "4.267.7", + "@patternfly/react-core": "4.267.14", "react": "17.0.2", "react-dom": "17.0.2" } From 11619773418d08b0d80ced18ebff87c982c35663 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 16 Jan 2023 02:43:05 +0000 Subject: [PATCH 404/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #618 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a0d8e7a..4bbdd0e 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.222.4", - "@patternfly/react-core": "4.267.14", + "@patternfly/patternfly": "4.223.0", + "@patternfly/react-core": "4.271.1", "react": "17.0.2", "react-dom": "17.0.2" } From dff02e793f9c61112c2673fe92fdcbd48065bedb Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 23 Jan 2023 02:40:14 +0000 Subject: [PATCH 405/942] package.json: Update @patternfly/patternfly, @patternfly/react-core Closes #619 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4bbdd0e..7d781b8 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "webpack-cli": "^4.9.1" }, "dependencies": { - "@patternfly/patternfly": "4.223.0", - "@patternfly/react-core": "4.271.1", + "@patternfly/patternfly": "4.224.2", + "@patternfly/react-core": "4.276.2", "react": "17.0.2", "react-dom": "17.0.2" } From 030d64ba48ba7613affbb678149d8b065774250a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 30 Jan 2023 02:38:38 +0000 Subject: [PATCH 406/942] package.json: Update @patternfly/react-core Closes #620 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7d781b8..690cf26 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "dependencies": { "@patternfly/patternfly": "4.224.2", - "@patternfly/react-core": "4.276.2", + "@patternfly/react-core": "4.276.6", "react": "17.0.2", "react-dom": "17.0.2" } From 03d02f398a4d92926e81ae92c04fa25411243004 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Mon, 30 Jan 2023 17:00:33 +0100 Subject: [PATCH 407/942] build: add support for /pybridge scenario Build the Python bridge from the cockpit project and install it into the VM so we can run tests against it. --- Makefile | 20 +++++++++++++++++++- test/run | 3 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 240f1d6..ec04280 100644 --- a/Makefile +++ b/Makefile @@ -154,10 +154,28 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" +ifeq ("$(TEST_SCENARIO)","pybridge") +COCKPIT_PYBRIDGE_REF = main +COCKPIT_WHEEL = cockpit-0-py3-none-any.whl + +$(COCKPIT_WHEEL): + # aka: pip wheel git+https://github.com/cockpit-project/cockpit.git@${COCKPIT_PYBRIDGE_REF} + rm -rf tmp/pybridge + git init tmp/pybridge + git -C tmp/pybridge remote add origin https://github.com/cockpit-project/cockpit + git -C tmp/pybridge fetch --depth=1 origin ${COCKPIT_PYBRIDGE_REF} + git -C tmp/pybridge reset --hard FETCH_HEAD + cp "$$(tmp/pybridge/tools/make-wheel)" $@ + +VM_DEPENDS = $(COCKPIT_WHEEL) +VM_CUSTOMIZE_FLAGS = --install $(COCKPIT_WHEEL) +endif + # build a VM with locally built distro pkgs installed # disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed -$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install +$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install $(VM_DEPENDS) bots/image-customize --no-network --fresh \ + $(VM_CUSTOMIZE_FLAGS) \ --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --script $(CURDIR)/test/vm.install $(TEST_OS) diff --git a/test/run b/test/run index b2cd769..5b532b8 100755 --- a/test/run +++ b/test/run @@ -4,6 +4,7 @@ set -eu # This is the expected entry point for Cockpit CI; will be called without # arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO -[ -z "${TEST_SCENARIO:-}" ] || export TEST_BROWSER="$TEST_SCENARIO" +TEST_SCENARIO="${TEST_SCENARIO:-}" +[ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox export RUN_TESTS_OPTIONS=--track-naughties make check From 3cb5cb96de5b3c734fc9856149f0bcf2f5d5c0de Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Wed, 8 Feb 2023 13:42:53 +0100 Subject: [PATCH 408/942] .github: update release action workflow Our latest action-release workflow no longer uses a deprecated github-script version. --- .github/workflows/release.yml.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index e680fe8..4f33c66 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -29,6 +29,6 @@ jobs: run: make dist - name: Publish GitHub release - uses: cockpit-project/action-release@62db9d9850a1adec300500d84035c4f523fd5290 + uses: cockpit-project/action-release@88d994da62d1451c7073e26748c18413fcdf46e9 with: filename: "TARNAME-${{ github.ref_name }}.tar.xz" From 681366e9909e65ab4c5fc4ebe96fefcdcef1a3ee Mon Sep 17 00:00:00 2001 From: shawly Date: Fri, 10 Feb 2023 20:25:15 +0100 Subject: [PATCH 409/942] Add dark-theme-support Fixes #610 --- Makefile | 2 +- src/index.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec04280..27841ad 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 33639ff7015841747032b4158cebd4a3b3f36333 # 273 +COCKPIT_REPO_COMMIT = bc5ea7cc137ffc2f4de23976ac3893896a837c0d # 285 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' diff --git a/src/index.js b/src/index.js index 2d90d61..f440812 100644 --- a/src/index.js +++ b/src/index.js @@ -17,6 +17,7 @@ * along with Cockpit; If not, see . */ +import "cockpit-dark-theme"; import "patternfly/patternfly-4-cockpit.scss"; import React from 'react'; From b5267a376f16c8371e6ecf358be4729bbaa3933c Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 14 Feb 2023 10:23:43 +0100 Subject: [PATCH 410/942] README: document RSYNC_DEVEL env variable --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 536fbe7..37afbc8 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,12 @@ the remote hostname. $ RSYNC=c make watch +When developing against a remote host as a normal user, `RSYNC_DEVEL` can be +set to upload code changes to `~/.local/share/cockpit/` instead of +`/usr/local`. + + $ RSYNC_DEVEL=example.com make watch + To "uninstall" the locally installed version, run `make devel-uninstall`, or remove manually the symlink: From 1f4e0fac2436ee65644962fa0748d7dff28df0ed Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 14 Feb 2023 10:27:27 +0100 Subject: [PATCH 411/942] Makefile: bump REPO_COMMIT to include RSYNC_DEVEL support --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 27841ad..80cdf28 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = bc5ea7cc137ffc2f4de23976ac3893896a837c0d # 285 +COCKPIT_REPO_COMMIT = 173bb62c36044f23092fbe1d30f6b21177a74980 # 285 + 173bb62c36044f23092fbe1d30f6b21177a74980 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 4990d6a1039d8f0cbe51c8936c2ef1ec3afe771b Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 17 Feb 2023 19:27:02 +0100 Subject: [PATCH 412/942] build: Move to a webpack module Cockpit recently changed to an ESM build system [1]. Bump COCKPIT_REPO_COMMIT to that and follow suit. This does not work with old node.js 10 any more which is still the default in RHEL 8. Install the newer version 16 instead. [1] https://github.com/cockpit-project/cockpit/pull/18366 --- Makefile | 6 +++--- package.json | 1 + test/browser/browser.sh | 5 +++++ webpack.config.js | 42 +++++++++++++++++++++-------------------- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 80cdf28..b91bad5 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 173bb62c36044f23092fbe1d30f6b21177a74980 # 285 + 173bb62c36044f23092fbe1d30f6b21177a74980 +COCKPIT_REPO_COMMIT = 54f2fd58a3645c4a222e2b1b9b5f1b9321bed998 # 285 + Move to a webpack module $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' @@ -59,10 +59,10 @@ po/$(PACKAGE_NAME).js.pot: --from-code=UTF-8 $$(find src/ -name '*.js' -o -name '*.jsx') po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) - pkg/lib/html2po -o $@ $$(find src -name '*.html') + pkg/lib/html2po.js -o $@ $$(find src -name '*.html') po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) - pkg/lib/manifest2po src/manifest.json -o $@ + pkg/lib/manifest2po.js src/manifest.json -o $@ po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< diff --git a/package.json b/package.json index 690cf26..b016060 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "starter-kit", "description": "Scaffolding for a cockpit module", + "type": "module", "main": "index.js", "repository": "git@github.com:cockpit/starter-kit.git", "author": "", diff --git a/test/browser/browser.sh b/test/browser/browser.sh index e68e449..2ebdd7b 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -19,6 +19,11 @@ dnf update -y pam || true # we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) dnf install --disablerepo=fedora-cisco-openh264 -y --setopt=install_weak_deps=False firefox +# nodejs 10 is too old for current Cockpit test API +if grep -q platform:el8 /etc/os-release; then + dnf module switch-to -y nodejs:16 +fi + # create user account for logging in if ! id admin 2>/dev/null; then useradd -c Administrator -G wheel admin diff --git a/webpack.config.js b/webpack.config.js index 6ddfde2..bdf5394 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,15 @@ -const fs = require("fs"); -const path = require("path"); +import fs from "fs"; -const copy = require("copy-webpack-plugin"); -const extract = require("mini-css-extract-plugin"); -const TerserJSPlugin = require('terser-webpack-plugin'); -const CssMinimizerPlugin = require('css-minimizer-webpack-plugin'); -const CompressionPlugin = require("compression-webpack-plugin"); -const ESLintPlugin = require('eslint-webpack-plugin'); -const CockpitPoPlugin = require("./pkg/lib/cockpit-po-plugin"); -const CockpitRsyncPlugin = require("./pkg/lib/cockpit-rsync-plugin"); -const StylelintPlugin = require('stylelint-webpack-plugin'); +import copy from "copy-webpack-plugin"; +import extract from "mini-css-extract-plugin"; +import TerserJSPlugin from 'terser-webpack-plugin'; +import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; +import CompressionPlugin from "compression-webpack-plugin"; +import ESLintPlugin from 'eslint-webpack-plugin'; +import StylelintPlugin from 'stylelint-webpack-plugin'; + +import CockpitPoPlugin from "./pkg/lib/cockpit-po-plugin.js"; +import CockpitRsyncPlugin from "./pkg/lib/cockpit-rsync-plugin.js"; /* A standard nodejs and webpack pattern */ const production = process.env.NODE_ENV === 'production'; @@ -31,9 +31,9 @@ const copy_files = [ const plugins = [ new copy({ patterns: copy_files }), - new extract({filename: "[name].css"}), + new extract({ filename: "[name].css" }), new CockpitPoPlugin(), - new CockpitRsyncPlugin({dest: packageJson.name}), + new CockpitRsyncPlugin({ dest: packageJson.name }), ]; if (eslint) { @@ -42,7 +42,7 @@ if (eslint) { if (stylelint) { plugins.push(new StylelintPlugin({ - context: "src/", + context: "src/", })); } @@ -54,14 +54,14 @@ if (production) { })); } -module.exports = { +const config = { mode: production ? 'production' : 'development', resolve: { - modules: [ "node_modules", path.resolve(__dirname, 'pkg/lib') ], + modules: ["node_modules", 'pkg/lib'], alias: { 'font-awesome': 'font-awesome-sass/assets/stylesheets' }, }, resolveLoader: { - modules: [ "node_modules", path.resolve(__dirname, 'pkg/lib') ], + modules: ["node_modules", 'pkg/lib'], }, watchOptions: { ignored: /node_modules/, @@ -70,7 +70,7 @@ module.exports = { index: "./src/index.js", }, // cockpit.js gets included via - + diff --git a/test/run b/test/run index 5b532b8..32a21df 100755 --- a/test/run +++ b/test/run @@ -7,4 +7,8 @@ set -eu TEST_SCENARIO="${TEST_SCENARIO:-}" [ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox export RUN_TESTS_OPTIONS=--track-naughties + +# linters are off by default for production builds, but we want to run them in CI +export LINT=1 + make check diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 8a003ae..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,168 +0,0 @@ -import fs from "fs"; - -import copy from "copy-webpack-plugin"; -import extract from "mini-css-extract-plugin"; -import TerserJSPlugin from 'terser-webpack-plugin'; -import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'; -import CompressionPlugin from "compression-webpack-plugin"; -import ESLintPlugin from 'eslint-webpack-plugin'; -import StylelintPlugin from 'stylelint-webpack-plugin'; - -import { CockpitPoWebpackPlugin } from './pkg/lib/cockpit-po-plugin.js'; -import { CockpitRsyncWebpackPlugin } from "./pkg/lib/cockpit-rsync-plugin.js"; - -/* A standard nodejs and webpack pattern */ -const production = process.env.NODE_ENV === 'production'; - -/* development options for faster iteration */ -const eslint = process.env.ESLINT !== '0'; - -/* Default to disable csslint for faster production builds */ -const stylelint = process.env.STYLELINT ? (process.env.STYLELINT !== '0') : !production; - -// Obtain package name from package.json -const packageJson = JSON.parse(fs.readFileSync('package.json')); - -// Non-JS files which are copied verbatim to dist/ -const copy_files = [ - "./src/index.html", - "./src/manifest.json", -]; - -const plugins = [ - new copy({ patterns: copy_files }), - new extract({ filename: "[name].css" }), - new CockpitPoWebpackPlugin(), - new CockpitRsyncWebpackPlugin({ dest: packageJson.name }), -]; - -if (eslint) { - plugins.push(new ESLintPlugin({ extensions: ["js", "jsx"], failOnWarning: true, })); -} - -if (stylelint) { - plugins.push(new StylelintPlugin({ - context: "src/", - })); -} - -/* Only minimize when in production mode */ -if (production) { - plugins.unshift(new CompressionPlugin({ - test: /\.(js|html|css)$/, - deleteOriginalAssets: true - })); -} - -const config = { - mode: production ? 'production' : 'development', - resolve: { - modules: ["node_modules", 'pkg/lib'], - alias: { 'font-awesome': 'font-awesome-sass/assets/stylesheets' }, - }, - resolveLoader: { - modules: ["node_modules", 'pkg/lib'], - }, - watchOptions: { - ignored: /node_modules/, - }, - entry: { - index: "./src/index.js", - }, - // cockpit.js gets included via - +
From 4c405168a84748681b3f4ec248813c983da4d6b8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 25 May 2023 02:27:22 +0000 Subject: [PATCH 443/942] Makefile: Update Cockpit lib to 3ca979d542a4d6cf865f2132e0bdf1b0 Closes #656 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aa4f227..20b8afe 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 3796031af41bdf58602f9c6561300969db22cb99 # 292 + latest PF5 adjustments +COCKPIT_REPO_COMMIT = 3ca979d542a4d6cf865f2132e0bdf1b06c49d07f # 292 + 56 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 12a648b6e47a45567460a92db638caffc1e65213 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Thu, 25 May 2023 21:50:00 +0200 Subject: [PATCH 444/942] patternfly-5-overrides should be auto-imported by the page.scss file page.scss sould be imported by all pages. --- src/app.scss | 2 ++ src/index.js | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/app.scss b/src/app.scss index 87b46f4..6d2c5d8 100644 --- a/src/app.scss +++ b/src/app.scss @@ -1,3 +1,5 @@ +@use "page.scss"; + p { font-weight: bold; } diff --git a/src/index.js b/src/index.js index 41f01bc..3cb37d9 100644 --- a/src/index.js +++ b/src/index.js @@ -23,14 +23,6 @@ import "patternfly/patternfly-5-cockpit.scss"; import React from 'react'; import ReactDOM from 'react-dom'; import { Application } from './app.jsx'; -/* - * PF4 overrides need to come after the JSX components imports because - * these are importing CSS stylesheets that we are overriding - * Having the overrides here will ensure that when mini-css-extract-plugin will extract the CSS - * out of the dist/index.js and since it will maintain the order of the imported CSS, - * the overrides will be correctly in the end of our stylesheet. - */ -import "patternfly/patternfly-5-overrides.scss"; import './app.scss'; document.addEventListener("DOMContentLoaded", function () { From 2215aa3bf801224eb5975fc0f53cd9201e3863ec Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Fri, 26 May 2023 14:41:33 +0200 Subject: [PATCH 445/942] Makefile: bump our test/common dependency ... and make use of the new pywrap feature from our test. Use the same eslint and stylelint plugin configuration as the cockpit main repo. Co-authored-by: Katerina Koukiou --- .eslintrc.json | 7 ++----- Makefile | 8 +++----- package.json | 4 +++- test/check-application | 10 ++-------- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7818ff7..1918f1a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,12 +4,9 @@ "browser": true, "es6": true }, - "extends": ["eslint:recommended", "standard", "standard-jsx", "react-app"], + "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react"], "parserOptions": { - "ecmaVersion": "7", - "ecmaFeatures": { - "jsx": true - }, + "ecmaVersion": "2022", "sourceType": "module" }, "plugins": ["flowtype", "react", "react-hooks"], diff --git a/Makefile b/Makefile index 20b8afe..9de0ea7 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,10 @@ all: $(DIST_TEST) COCKPIT_REPO_FILES = \ pkg/lib \ test/common \ - tools/git-utils.sh \ - tools/make-bots \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 3ca979d542a4d6cf865f2132e0bdf1b06c49d07f # 292 + 56 commits +COCKPIT_REPO_COMMIT = 63eee8e92dafcbfffe32f7018cbda7c2e7a2642f # 292-75-g63eee8e92 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' @@ -192,8 +190,8 @@ check: prepare-check TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} # checkout Cockpit's bots for standard test VM images and API to launch them -bots: tools/make-bots - tools/make-bots +bots: $(COCKPIT_REPO_STAMP) + test/common/make-bots $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages diff --git a/package.json b/package.json index 0781678..dd26754 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,16 @@ "esbuild-sass-plugin": "^2.8.0", "esbuild-wasm": "^0.17.16", "eslint": "^8.13.0", - "eslint-config-react-app": "^7.0.0", "eslint-config-standard": "^17.0.0-1", "eslint-config-standard-jsx": "^11.0.0-1", + "eslint-config-standard-react": "^13.0.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.4.0", + "eslint-plugin-standard": "^5.0.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", "po2json": "^1.0.0-alpha", @@ -39,6 +40,7 @@ "sass": "^1.61.0", "sizzle": "^2.3.3", "stylelint": "^14.9.1", + "stylelint-config-standard": "^25.0.0", "stylelint-config-standard-scss": "^5.0.0", "stylelint-formatter-pretty": "^3.2.0" }, diff --git a/test/check-application b/test/check-application index b5503c5..3d583ea 100755 --- a/test/check-application +++ b/test/check-application @@ -1,15 +1,9 @@ -#!/usr/bin/python3 +#!/usr/bin/python3 -cimport os, sys; os.execv(os.path.dirname(sys.argv[1]) + "/common/pywrap", sys.argv) + # Run this with --help to see available options for tracing and debugging # See https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py # "class Browser" and "class MachineCase" for the available API. -import os -import sys - -# import Cockpit's machinery for test VMs and its browser test API -TEST_DIR = os.path.dirname(__file__) -sys.path.append(os.path.join(TEST_DIR, "common")) -sys.path.append(os.path.join(os.path.dirname(TEST_DIR), "bots/machine")) import testlib # Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and RHEL dist-git gating From c1910ea39ca0765f2e3f3b364a866cd85dcf6b23 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 1 Jun 2023 03:05:39 +0000 Subject: [PATCH 446/942] Makefile: Update Cockpit lib to 06aba4d08e6017abed05a3cc3e3bbb49276bc0d1 Closes #660 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9de0ea7..aeb85ee 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 63eee8e92dafcbfffe32f7018cbda7c2e7a2642f # 292-75-g63eee8e92 +COCKPIT_REPO_COMMIT = 06aba4d08e6017abed05a3cc3e3bbb49276bc0d1 # 292 + 80 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 1eb8b05dfacaff1787054f723a79b9ce2d94508e Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 8 Jun 2023 02:47:42 +0000 Subject: [PATCH 447/942] Makefile: Update Cockpit lib to efcf647c8580388d907af512c6c4727c Closes #663 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aeb85ee..dbef91e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 06aba4d08e6017abed05a3cc3e3bbb49276bc0d1 # 292 + 80 commits +COCKPIT_REPO_COMMIT = efcf647c8580388d907af512c6c4727c95609c58 # 293 + 21 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 11fc72590221cfd23f8165b49047c0eb372e45a3 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 15 Jun 2023 02:35:10 +0000 Subject: [PATCH 448/942] Makefile: Update Cockpit lib to 536834c40ad3e2390a52fb87583f0730 Closes #665 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dbef91e..1c84d97 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = efcf647c8580388d907af512c6c4727c95609c58 # 293 + 21 commits +COCKPIT_REPO_COMMIT = 536834c40ad3e2390a52fb87583f07302e2a29a4 # 294 + 14 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From ddd7763d62b64e2ed11b2f0a19ecdbd3c41140c6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 22 Jun 2023 02:37:08 +0000 Subject: [PATCH 449/942] Makefile: Update Cockpit lib to 393f9888a5727cbb06bcb70175e82064 Closes #667 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c84d97..352b1fe 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 536834c40ad3e2390a52fb87583f07302e2a29a4 # 294 + 14 commits +COCKPIT_REPO_COMMIT = 393f9888a5727cbb06bcb70175e82064d8ad938e # 294.1 + 49 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From d3b9064d635eca0b7b2ff1edca58b1a4f37062e8 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 22 Jun 2023 06:50:33 +0200 Subject: [PATCH 450/942] package.json: Bump esbuild and esbuild-sass-plugin esbuild-sass-plugin 2.10 got released as compatible with 2.8, but it is not compatible any more with esbuild 0.17.18. Bump both. --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index dd26754..2d64215 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "devDependencies": { "argparse": "^2.0.1", "chrome-remote-interface": "^0.32.1", - "esbuild": "^0.17.15", + "esbuild": "^0.18.6", "esbuild-plugin-copy": "^2.1.1", "esbuild-plugin-replace": "^1.3.0", - "esbuild-sass-plugin": "^2.8.0", - "esbuild-wasm": "^0.17.16", + "esbuild-sass-plugin": "^2.10.0", + "esbuild-wasm": "^0.18.6", "eslint": "^8.13.0", "eslint-config-standard": "^17.0.0-1", "eslint-config-standard-jsx": "^11.0.0-1", From 27ad7ce5a7cf3a98d218fe307de50e9e1fdeecad Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 29 Jun 2023 02:49:13 +0000 Subject: [PATCH 451/942] Makefile: Update Cockpit lib to 3d2d07cb751b141b6bd6ee9a3d423081 Closes #669 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 352b1fe..a0889aa 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 393f9888a5727cbb06bcb70175e82064d8ad938e # 294.1 + 49 commits +COCKPIT_REPO_COMMIT = 3d2d07cb751b141b6bd6ee9a3d4230815eb6dad9 # 295 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 88625acc33a885441e5820fd8f7f68af7dde1aac Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 6 Jul 2023 02:55:13 +0000 Subject: [PATCH 452/942] Makefile: Update Cockpit lib to 6e0e545679bad03beb29c5526e2f4fe5 Closes #671 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a0889aa..34dd9ea 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 3d2d07cb751b141b6bd6ee9a3d4230815eb6dad9 # 295 + 1 commits +COCKPIT_REPO_COMMIT = 6e0e545679bad03beb29c5526e2f4fe5a6b4a422 # 295 + 36 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From ee9ab10aeb8ef66fa6e6bd1dd0d6cdc4355a123c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 13 Jul 2023 02:54:48 +0000 Subject: [PATCH 453/942] Makefile: Update Cockpit lib to 1336ce350d88d385870ba56405136df7 Closes #673 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 34dd9ea..663d18a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 6e0e545679bad03beb29c5526e2f4fe5a6b4a422 # 295 + 36 commits +COCKPIT_REPO_COMMIT = 1336ce350d88d385870ba56405136df7a55ae73f # 296 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 6ece59c917298c7f49062bc26a3aeaaa0e24937f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 18 Jul 2023 05:28:44 +0200 Subject: [PATCH 454/942] package.json: Bump stylelint to 15 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2d64215..ac825b4 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,9 @@ "qunit": "^2.9.3", "sass": "^1.61.0", "sizzle": "^2.3.3", - "stylelint": "^14.9.1", - "stylelint-config-standard": "^25.0.0", - "stylelint-config-standard-scss": "^5.0.0", + "stylelint": "^15.10.1", + "stylelint-config-standard": "^34.0.0", + "stylelint-config-standard-scss": "^10.0.0", "stylelint-formatter-pretty": "^3.2.0" }, "dependencies": { From 39e0f576cad7caaf9f6547a1c1753308696beee5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 18 Jul 2023 05:30:11 +0200 Subject: [PATCH 455/942] package.json: Update to React 18 Update to the new root creation function. --- package.json | 4 ++-- src/index.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ac825b4..d6263ea 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@patternfly/react-core": "5.0.0-alpha.115", "@patternfly/react-styles": "5.0.0-alpha.16", "@patternfly/react-icons": "5.0.0-alpha.19", - "react": "17.0.2", - "react-dom": "17.0.2" + "react": "18.2.0", + "react-dom": "18.2.0" } } diff --git a/src/index.js b/src/index.js index 3cb37d9..ff4aa0d 100644 --- a/src/index.js +++ b/src/index.js @@ -21,10 +21,10 @@ import "cockpit-dark-theme"; import "patternfly/patternfly-5-cockpit.scss"; import React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import { Application } from './app.jsx'; import './app.scss'; -document.addEventListener("DOMContentLoaded", function () { - ReactDOM.render(React.createElement(Application, {}), document.getElementById('app')); +document.addEventListener("DOMContentLoaded", () => { + createRoot(document.getElementById("app")).render(); }); From 36fc246711a7c287c32d211b5be61d07a2cbc2e6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 20 Jul 2023 02:27:41 +0000 Subject: [PATCH 456/942] Makefile: Update Cockpit lib to 4693a536e3262d3254d848daed251ef3 Closes #676 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 663d18a..e039d12 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 1336ce350d88d385870ba56405136df7a55ae73f # 296 +COCKPIT_REPO_COMMIT = 4693a536e3262d3254d848daed251ef385ae5017 # 296 + 30 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 3d75eb66d7559c5cf2f761f061147382af2f72d0 Mon Sep 17 00:00:00 2001 From: Tomas Matus Date: Thu, 20 Jul 2023 12:10:37 +0200 Subject: [PATCH 457/942] build.js: Fix LINT env variable check --- build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.js b/build.js index 6b62d01..2c6eb5d 100755 --- a/build.js +++ b/build.js @@ -20,7 +20,7 @@ const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')).default; const production = process.env.NODE_ENV === 'production'; const watchMode = process.env.ESBUILD_WATCH === "true"; // linters dominate the build time, so disable them for production builds by default, but enable in watch mode -const lint = process.env.LINT ? (process.env.LINT !== 0) : (watchMode || !production); +const lint = process.env.LINT ? (process.env.LINT !== '0') : (watchMode || !production); // List of directories to use when using import statements const nodePaths = ['pkg/lib']; const outdir = 'dist'; From dd38010b9c7c9cc0f5661ba3d22ff67e6ab9c95f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 26 Jul 2023 09:03:05 +0200 Subject: [PATCH 458/942] packaging: Update spec License: to SPDX format --- packaging/cockpit-starter-kit.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 44d6952..003875a 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -2,7 +2,7 @@ Name: cockpit-starter-kit Version: %{VERSION} Release: 1%{?dist} Summary: Cockpit Starter Kit Example Module -License: LGPLv2+ +License: LGPL-2.1-or-later Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz From 3b14e613908567bc4989970a8d0339a3e7e64535 Mon Sep 17 00:00:00 2001 From: Tomas Matus Date: Tue, 25 Jul 2023 11:32:09 +0200 Subject: [PATCH 459/942] build.js: support flags Adds flags to build.js to use rsync, disable linting and use watch mode. --- Makefile | 2 +- README.md | 4 ++-- build.js | 28 +++++++++++++++------------ packaging/cockpit-starter-kit.spec.in | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index e039d12..f5c138b 100644 --- a/Makefile +++ b/Makefile @@ -83,7 +83,7 @@ $(DIST_TEST): $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) $(shell find src/ -type NODE_ENV=$(NODE_ENV) ./build.js watch: $(NODE_MODULES_TEST) $(COCKPIT_REPO_STAMP) - NODE_ENV=$(NODE_ENV) npm run watch + NODE_ENV=$(NODE_ENV) ./build.js --watch clean: rm -rf dist/ diff --git a/README.md b/README.md index 0ac7bc4..24730e9 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ You can also use [watch mode](https://esbuild.github.io/api/#watch) to automatically update the bundle on every code change with - $ npm run watch + $ ./build.js -w or @@ -110,7 +110,7 @@ During fast iterative development, you can also choose to not run eslint/styleli This speeds up the build and avoids build failures due to e. g. ill-formatted css or other issues: - $ make LINT=0 + $ ./build.js -es # Running tests locally diff --git a/build.js b/build.js index 2c6eb5d..8fca807 100755 --- a/build.js +++ b/build.js @@ -14,13 +14,21 @@ import { esbuildStylesPlugins } from './pkg/lib/esbuild-common.js'; import { eslintPlugin } from './pkg/lib/esbuild-eslint-plugin.js'; import { stylelintPlugin } from './pkg/lib/esbuild-stylelint-plugin.js'; +const production = process.env.NODE_ENV === 'production'; const useWasm = os.arch() !== 'x64'; const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')).default; +const lintDefault = process.env.LINT ? process.env.LINT === '0' : production; + +const parser = (await import('argparse')).default.ArgumentParser(); +parser.add_argument('-r', '--rsync', { help: "rsync bundles to ssh target after build", metavar: "HOST" }); +parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable watch mode", default: process.env.ESBUILD_WATCH === "true" }); +parser.add_argument('-e', '--no-eslint', { action: 'store_true', help: "Disable eslint linting", default: lintDefault }); +parser.add_argument('-s', '--no-stylelint', { action: 'store_true', help: "Disable stylelint linting", default: lintDefault }); +const args = parser.parse_args(); + +if (args.rsync) + process.env.RSYNC = args.rsync; -const production = process.env.NODE_ENV === 'production'; -const watchMode = process.env.ESBUILD_WATCH === "true"; -// linters dominate the build time, so disable them for production builds by default, but enable in watch mode -const lint = process.env.LINT ? (process.env.LINT !== '0') : (watchMode || !production); // List of directories to use when using import statements const nodePaths = ['pkg/lib']; const outdir = 'dist'; @@ -87,12 +95,8 @@ const context = await esbuild.context({ target: ['es2020'], plugins: [ cleanPlugin(), - ...lint - ? [ - stylelintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(css?|scss?)$') }), - eslintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(jsx?|js?)$') }) - ] - : [], + ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(css?|scss?)$') })], + ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(jsx?|js?)$') })], // Esbuild will only copy assets that are explicitly imported and used // in the code. This is a problem for index.html and manifest.json which are not imported copy({ @@ -112,12 +116,12 @@ const context = await esbuild.context({ try { await context.rebuild(); } catch (e) { - if (!watchMode) + if (!args.watch) process.exit(1); // ignore errors in watch mode } -if (watchMode) { +if (args.watch) { const on_change = async path => { console.log("change detected:", path); await context.cancel(); diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 003875a..c6b43a3 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -32,7 +32,7 @@ rm -rf dist %endif %build -ESLINT=0 NODE_ENV=production make +LINT=0 NODE_ENV=production make %install %make_install PREFIX=/usr From cfb3a18f44be3b4cd265244d39043bc00df66c46 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 27 Jul 2023 02:19:42 +0000 Subject: [PATCH 460/942] Makefile: Update Cockpit lib to 97bd80971984cf6ce2b4faba1cad79fc Closes #681 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f5c138b..baa612b 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 4693a536e3262d3254d848daed251ef385ae5017 # 296 + 30 commits +COCKPIT_REPO_COMMIT = 97bd80971984cf6ce2b4faba1cad79fcb921e068 # 297 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From bd2ac26df61d4e6dc836bffb7b854cecb1822ec8 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 6 Jun 2023 13:44:41 +0200 Subject: [PATCH 461/942] Drop sizzle test dependency --- package.json | 1 - test/browser/run-test.sh | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index d6263ea..488c325 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,6 @@ "po2json": "^1.0.0-alpha", "qunit": "^2.9.3", "sass": "^1.61.0", - "sizzle": "^2.3.3", "stylelint": "^15.10.1", "stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^10.0.0", diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index 99b8029..0377c13 100755 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -13,7 +13,7 @@ if [ ! -d node_modules/chrome-remote-interface ]; then rm -f package-lock.json # otherwise the command below installs *everything*, argh mv package.json .package.json # only install a subset to save time/space - npm install chrome-remote-interface sizzle + npm install chrome-remote-interface mv .package.json package.json fi From 826c1e29ce650d4eb56f960fb3c3cb03a2e201e4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 1 Aug 2023 20:21:50 +0200 Subject: [PATCH 462/942] Revert "build: add support for /pybridge scenario" We don't need this any more, the pybridge landed in all planned distributions. Do keep the more explicit and correct handling of `$TEST_BROWSER` in test/run, though. This reverts commit 03d02f398a4d92926e81ae92c04fa25411243004. --- Makefile | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Makefile b/Makefile index baa612b..f503f28 100644 --- a/Makefile +++ b/Makefile @@ -153,22 +153,10 @@ rpm: $(TARFILE) $(NODE_CACHE) $(SPEC) rm -r "`pwd`/rpmbuild" rm -r "`pwd`/output" "`pwd`/build" -ifeq ("$(TEST_SCENARIO)","pybridge") -COCKPIT_PYBRIDGE_REF = main -COCKPIT_WHEEL = cockpit-0-py3-none-any.whl - -$(COCKPIT_WHEEL): - pip wheel git+https://github.com/cockpit-project/cockpit.git@${COCKPIT_PYBRIDGE_REF} - -VM_DEPENDS = $(COCKPIT_WHEEL) -VM_CUSTOMIZE_FLAGS = --install $(COCKPIT_WHEEL) -endif - # build a VM with locally built distro pkgs installed # disable networking, VM images have mock/pbuilder with the common build dependencies pre-installed -$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install $(VM_DEPENDS) +$(VM_IMAGE): $(TARFILE) $(NODE_CACHE) bots test/vm.install bots/image-customize --no-network --fresh \ - $(VM_CUSTOMIZE_FLAGS) \ --upload $(NODE_CACHE):/var/tmp/ --build $(TARFILE) \ --script $(CURDIR)/test/vm.install $(TEST_OS) From 65e3e488f0aecb668f1af921284c9e92dc48035a Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 1 Aug 2023 20:43:47 +0200 Subject: [PATCH 463/942] package.json: drop deprecated eslint-plugin-standard eslint-config-standard no longer requires it since 16.0.0. --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 488c325..2ba659e 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.4.0", - "eslint-plugin-standard": "^5.0.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", "po2json": "^1.0.0-alpha", @@ -46,8 +45,8 @@ "dependencies": { "@patternfly/patternfly": "5.0.0-alpha.64", "@patternfly/react-core": "5.0.0-alpha.115", - "@patternfly/react-styles": "5.0.0-alpha.16", "@patternfly/react-icons": "5.0.0-alpha.19", + "@patternfly/react-styles": "5.0.0-alpha.16", "react": "18.2.0", "react-dom": "18.2.0" } From b0ffbac6c10465bd8be4ec1096369e77f82802fe Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 3 Aug 2023 02:21:53 +0000 Subject: [PATCH 464/942] Makefile: Update Cockpit lib to d7126448b1e74e59f75157389225289d Closes #685 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f503f28..bf15ba4 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 97bd80971984cf6ce2b4faba1cad79fcb921e068 # 297 +COCKPIT_REPO_COMMIT = d7126448b1e74e59f75157389225289dc34c3fd5 # 297 + 19 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 79e5693042af9fb96f965cafd3845355fe8fce9b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 7 Aug 2023 08:09:15 +0000 Subject: [PATCH 465/942] package.json: Update @patternfly/patternfly, @patternfly/react-core, @patternfly/react-icons, @patternfly/react-styles Closes #687 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2ba659e..f6dee7e 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,10 @@ "stylelint-formatter-pretty": "^3.2.0" }, "dependencies": { - "@patternfly/patternfly": "5.0.0-alpha.64", - "@patternfly/react-core": "5.0.0-alpha.115", - "@patternfly/react-icons": "5.0.0-alpha.19", - "@patternfly/react-styles": "5.0.0-alpha.16", + "@patternfly/patternfly": "5.0.2", + "@patternfly/react-core": "5.0.0", + "@patternfly/react-icons": "5.0.0", + "@patternfly/react-styles": "5.0.0", "react": "18.2.0", "react-dom": "18.2.0" } From 468cf21f4f5f1ef1cf69af39d3a18d763996e49a Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 10 Aug 2023 02:29:09 +0000 Subject: [PATCH 466/942] Makefile: Update Cockpit lib to 4133eb93dc20f00db996d1fefdd5fcbf Closes #688 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf15ba4..4fc4e1e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = d7126448b1e74e59f75157389225289dc34c3fd5 # 297 + 19 commits +COCKPIT_REPO_COMMIT = 4133eb93dc20f00db996d1fefdd5fcbfd1d6b320 # 298 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 2f641b6af6c6f40903f9e669dd114c1123beee5c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 17 Aug 2023 02:10:10 +0000 Subject: [PATCH 467/942] Makefile: Update Cockpit lib to 2838422bbada17686c77e5f3be0fb604 Closes #689 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4fc4e1e..ba8649d 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 4133eb93dc20f00db996d1fefdd5fcbfd1d6b320 # 298 +COCKPIT_REPO_COMMIT = 2838422bbada17686c77e5f3be0fb604a44f8e1e # 298 + 5 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 680cfe814c6b57f0a160d3698e4ed672bba38823 Mon Sep 17 00:00:00 2001 From: Tomas Matus Date: Thu, 17 Aug 2023 09:12:42 +0200 Subject: [PATCH 468/942] package.json: bump esbuild to version 0.19.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f6dee7e..14fd0af 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "devDependencies": { "argparse": "^2.0.1", "chrome-remote-interface": "^0.32.1", - "esbuild": "^0.18.6", + "esbuild": "^0.19.1", "esbuild-plugin-copy": "^2.1.1", "esbuild-plugin-replace": "^1.3.0", "esbuild-sass-plugin": "^2.10.0", - "esbuild-wasm": "^0.18.6", + "esbuild-wasm": "^0.19.1", "eslint": "^8.13.0", "eslint-config-standard": "^17.0.0-1", "eslint-config-standard-jsx": "^11.0.0-1", From 139d73a03bcc6618a6503c564544a41f99aba827 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 24 Aug 2023 02:11:41 +0000 Subject: [PATCH 469/942] Makefile: Update Cockpit lib to 47bc4c586a15da553223a0a87f5a09ce Closes #690 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ba8649d..6becfea 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 2838422bbada17686c77e5f3be0fb604a44f8e1e # 298 + 5 commits +COCKPIT_REPO_COMMIT = 47bc4c586a15da553223a0a87f5a09cebe82356f # 299 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 9544f572203caaddcb32bc958ea27e31058d54fa Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 26 Aug 2023 07:44:51 +0200 Subject: [PATCH 470/942] fmf: Plumb through $TEST_* variables for unexpected messages This will allow us to control the value from test plans, in particular for disabling at least some unexpected message checks for reverse dependency testing. We don't want to disable unexpected messages in general for fmf, as we are looking for exactly these in e.g. selinux-policy reverse dependency tests. Move from `su` to `runtest`, as with the former it's impossible to plumb through variables with non-trivial characters, as they cannot be quoted. Taken from https://github.com/cockpit-project/cockpit-podman/commit/c38692fa4ce66 --- Makefile | 4 ++-- plans/all.fmf | 4 ++++ test/browser/browser.sh | 10 +++++++--- test/browser/run-test.sh | 5 ++++- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6becfea..9abe999 100644 --- a/Makefile +++ b/Makefile @@ -172,10 +172,10 @@ print-vm: # without actually running them prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common -# run the browser integration tests; skip check for SELinux denials +# run the browser integration tests # this will run all tests/check-* and format them as TAP check: prepare-check - TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} + test/common/run-tests ${RUN_TESTS_OPTIONS} # checkout Cockpit's bots for standard test VM images and API to launch them bots: $(COCKPIT_REPO_STAMP) diff --git a/plans/all.fmf b/plans/all.fmf index 2bce34a..689393e 100644 --- a/plans/all.fmf +++ b/plans/all.fmf @@ -4,3 +4,7 @@ discover: how: fmf execute: how: tmt + +# Let's handle them upstream only, don't break Fedora/RHEL reverse dependency gating +environment: + TEST_AUDIT_NO_SELINUX: 1 diff --git a/test/browser/browser.sh b/test/browser/browser.sh index d5f594e..e88aa23 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -1,9 +1,11 @@ #!/bin/sh set -eux +export TEST_BROWSER=${TEST_BROWSER:-firefox} + TESTS="$(realpath $(dirname "$0"))" -SOURCE="$(realpath $TESTS/../..)" -LOGS="$(pwd)/logs" +export SOURCE="$(realpath $TESTS/../..)" +export LOGS="$(pwd)/logs" mkdir -p "$LOGS" chmod a+w "$LOGS" @@ -47,7 +49,9 @@ echo core > /proc/sys/kernel/core_pattern systemctl enable --now cockpit.socket # Run tests as unprivileged user -su - -c "env TEST_BROWSER=firefox SOURCE=$SOURCE LOGS=$LOGS $TESTS/run-test.sh" runtest +# once we drop support for RHEL 8, use this: +# runuser -u runtest --whitelist-environment=TEST_BROWSER,TEST_ALLOW_JOURNAL_MESSAGES,TEST_AUDIT_NO_SELINUX,SOURCE,LOGS $TESTS/run-test.sh +runuser -u runtest --preserve-environment env USER=runtest HOME=$(getent passwd runtest | cut -f6 -d:) $TESTS/run-test.sh RC=$(cat $LOGS/exitcode) exit ${RC:-1} diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index 0377c13..bec6e46 100755 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -22,7 +22,6 @@ mv .git dot-git . /etc/os-release export TEST_OS="${ID}-${VERSION_ID/./-}" -export TEST_AUDIT_NO_SELINUX=1 if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then TEST_OS="${TEST_OS}-stream" @@ -30,6 +29,10 @@ fi EXCLUDES="" +# make it easy to check in logs +echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}" +echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}" + RC=0 test/common/run-tests --nondestructive --machine 127.0.0.1:22 --browser 127.0.0.1:9090 $EXCLUDES || RC=$? From 4cc0530c86f75f5e2edeb892229c9ad9c2ad0b39 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 26 Aug 2023 07:47:17 +0200 Subject: [PATCH 471/942] cirrus: Move from Fedora 37 to 39 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 93c72b3..e49a77b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ container: test_task: env: matrix: - - TEST_OS: fedora-37 + - TEST_OS: fedora-39 - TEST_OS: centos-8-stream fix_kvm_script: sudo chmod 666 /dev/kvm From d339fe5a3c27276ae868d2036356b34d560b8867 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 31 Aug 2023 02:13:18 +0000 Subject: [PATCH 472/942] Makefile: Update Cockpit lib to 9a2a4d94269561ad6fce5501eece6d84 Closes #692 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9abe999..7746fd4 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 47bc4c586a15da553223a0a87f5a09cebe82356f # 299 + 1 commits +COCKPIT_REPO_COMMIT = 9a2a4d94269561ad6fce5501eece6d84ae085476 # 299 + 41 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 2a10bd66ec7de7985a5d1913a8cc4d7e14b6ce78 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 4 Sep 2023 15:00:09 +0200 Subject: [PATCH 473/942] package.json: document the required nodejs version To avoid issues about not being able to run make / npm install. This sadly only produces a warning, but that hint might be good enough. ``` $ npm install npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: undefined, npm WARN EBADENGINE required: { node: '>= 18' }, npm WARN EBADENGINE current: { node: 'v16.20.2', npm: '9.8.1' } npm WARN EBADENGINE } ``` Fixes #693 --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 14fd0af..107a1d3 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "repository": "git@github.com:cockpit/starter-kit.git", "author": "", "license": "LGPL-2.1", + "engines": { + "node": ">= 16" + }, "scripts": { "watch": "ESBUILD_WATCH='true' ./build.js", "build": "./build.js", From 5fe2c956583da6f5c663f465434d47758edd0ec4 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 7 Sep 2023 02:13:04 +0000 Subject: [PATCH 474/942] Makefile: Update Cockpit lib to 280d74e6fb6efd0f46224f273caf2854 Closes #695 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7746fd4..b956c2a 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 9a2a4d94269561ad6fce5501eece6d84ae085476 # 299 + 41 commits +COCKPIT_REPO_COMMIT = 280d74e6fb6efd0f46224f273caf28543a2194da # 300 + 2 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 5f6b8d09f942213ae6c72da79ba47539c251147c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 11 Sep 2023 02:20:13 +0000 Subject: [PATCH 475/942] package.json: Update @patternfly/patternfly, @patternfly/react-core, @patternfly/react-icons, @patternfly/react-styles Closes #696 --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 107a1d3..03c87d0 100644 --- a/package.json +++ b/package.json @@ -46,10 +46,10 @@ "stylelint-formatter-pretty": "^3.2.0" }, "dependencies": { - "@patternfly/patternfly": "5.0.2", - "@patternfly/react-core": "5.0.0", - "@patternfly/react-icons": "5.0.0", - "@patternfly/react-styles": "5.0.0", + "@patternfly/patternfly": "5.0.4", + "@patternfly/react-core": "5.0.1", + "@patternfly/react-icons": "5.0.1", + "@patternfly/react-styles": "5.0.1", "react": "18.2.0", "react-dom": "18.2.0" } From dfff5fc36497b7561e32d8040b81824c9b10fdc5 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 14 Sep 2023 02:13:08 +0000 Subject: [PATCH 476/942] Makefile: Update Cockpit lib to 9c73bec7e1dc2395a00aa0c510fd7210 Closes #697 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b956c2a..776c7ca 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 280d74e6fb6efd0f46224f273caf28543a2194da # 300 + 2 commits +COCKPIT_REPO_COMMIT = 9c73bec7e1dc2395a00aa0c510fd7210b6c96a16 # 300.1 + 42 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 558703a24bb3620971f5b610961d6420f7a79677 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Thu, 10 Feb 2022 15:36:09 +0100 Subject: [PATCH 477/942] github: replace npm-update workflow with dependabot https://docs.github.com/en/code-security/dependabot/working-with-dependabot --- .github/dependabot.yml | 19 ++++++++++++++++++ .github/workflows/npm-update-pf.yml | 30 ----------------------------- .github/workflows/npm-update.yml | 30 ----------------------------- 3 files changed, 19 insertions(+), 60 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/npm-update-pf.yml delete mode 100644 .github/workflows/npm-update.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e216947 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,19 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + groups: + eslint: + patterns: + - "eslint*" + esbuild: + patterns: + - "esbuild*" + stylelint: + patterns: + - "stylelint*" + patternfly: + patterns: + - "@patternfly*" diff --git a/.github/workflows/npm-update-pf.yml b/.github/workflows/npm-update-pf.yml deleted file mode 100644 index e07f20f..0000000 --- a/.github/workflows/npm-update-pf.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: npm-update-pf -on: - schedule: - - cron: '0 2 * * 1' - # can be run manually on https://github.com/cockpit-project/starter-kit/actions - workflow_dispatch: -jobs: - npm-update: - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - name: Set up dependencies - run: | - sudo apt update - sudo apt install -y npm make - - - name: Set up configuration and secrets - run: | - printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig - echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - - - name: Clone repository - uses: actions/checkout@v3 - - - name: Run npm-update bot - run: | - make bots - bots/npm-update @patternfly diff --git a/.github/workflows/npm-update.yml b/.github/workflows/npm-update.yml deleted file mode 100644 index 4b06dee..0000000 --- a/.github/workflows/npm-update.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: npm-update -on: - schedule: - - cron: '0 2 * * 2,4,6' - # can be run manually on https://github.com/cockpit-project/starter-kit/actions - workflow_dispatch: -jobs: - npm-update: - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - name: Set up dependencies - run: | - sudo apt update - sudo apt install -y npm make - - - name: Set up configuration and secrets - run: | - printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig - echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - - - name: Clone repository - uses: actions/checkout@v3 - - - name: Run npm-update bot - run: | - make bots - bots/npm-update ~@patternfly From 3d8c8b53d387f87faff3a05d29f000c09620e1ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:38:24 +0000 Subject: [PATCH 478/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss). - [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases) - [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v10.0.0...v11.0.0) --- updated-dependencies: - dependency-name: stylelint-config-standard-scss dependency-type: direct:development update-type: version-update:semver-major dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 03c87d0..4bf42e9 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "sass": "^1.61.0", "stylelint": "^15.10.1", "stylelint-config-standard": "^34.0.0", - "stylelint-config-standard-scss": "^10.0.0", + "stylelint-config-standard-scss": "^11.0.0", "stylelint-formatter-pretty": "^3.2.0" }, "dependencies": { From a5ab5255a7909643c310428357bfe076a2d83acd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 14:38:42 +0000 Subject: [PATCH 479/942] build(deps-dev): bump chrome-remote-interface from 0.32.2 to 0.33.0 Bumps [chrome-remote-interface](https://github.com/cyrus-and/chrome-remote-interface) from 0.32.2 to 0.33.0. - [Commits](https://github.com/cyrus-and/chrome-remote-interface/compare/v0.32.2...v0.33.0) --- updated-dependencies: - dependency-name: chrome-remote-interface dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bf42e9..d661231 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "argparse": "^2.0.1", - "chrome-remote-interface": "^0.32.1", + "chrome-remote-interface": "^0.33.0", "esbuild": "^0.19.1", "esbuild-plugin-copy": "^2.1.1", "esbuild-plugin-replace": "^1.3.0", From d97e375a4d849c8865bef6742b9a5f0972abd03a Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 15 Sep 2023 19:14:42 +0200 Subject: [PATCH 480/942] package.json: Pin down devDependencies With dependabot now regularly updating our devDependencies, it makes more sense to pin them down instead of using the `^` syntax. --- package.json | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index d661231..48ecc74 100644 --- a/package.json +++ b/package.json @@ -18,32 +18,32 @@ "stylelint:fix": "stylelint --fix src/*{.css,scss}" }, "devDependencies": { - "argparse": "^2.0.1", - "chrome-remote-interface": "^0.33.0", - "esbuild": "^0.19.1", - "esbuild-plugin-copy": "^2.1.1", - "esbuild-plugin-replace": "^1.3.0", - "esbuild-sass-plugin": "^2.10.0", - "esbuild-wasm": "^0.19.1", - "eslint": "^8.13.0", - "eslint-config-standard": "^17.0.0-1", - "eslint-config-standard-jsx": "^11.0.0-1", - "eslint-config-standard-react": "^13.0.0", - "eslint-plugin-flowtype": "^8.0.3", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.29.4", - "eslint-plugin-react-hooks": "^4.4.0", - "htmlparser": "^1.7.7", - "jed": "^1.1.1", - "po2json": "^1.0.0-alpha", - "qunit": "^2.9.3", - "sass": "^1.61.0", - "stylelint": "^15.10.1", - "stylelint-config-standard": "^34.0.0", - "stylelint-config-standard-scss": "^11.0.0", - "stylelint-formatter-pretty": "^3.2.0" + "argparse": "2.0.1", + "chrome-remote-interface": "0.33.0", + "esbuild": "0.19.3", + "esbuild-plugin-copy": "2.1.1", + "esbuild-plugin-replace": "1.4.0", + "esbuild-sass-plugin": "2.15.0", + "esbuild-wasm": "0.19.3", + "eslint": "8.49.0", + "eslint-config-standard": "17.1.0", + "eslint-config-standard-jsx": "11.0.0", + "eslint-config-standard-react": "13.0.0", + "eslint-plugin-flowtype": "8.0.3", + "eslint-plugin-import": "2.26.0", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "6.0.0", + "eslint-plugin-react": "7.33.2", + "eslint-plugin-react-hooks": "4.6.0", + "htmlparser": "1.7.7", + "jed": "1.1.1", + "po2json": "1.0.0-alpha", + "qunit": "2.19.4", + "sass": "1.67.0", + "stylelint": "15.10.1", + "stylelint-config-standard": "34.0.0", + "stylelint-config-standard-scss": "11.0.0", + "stylelint-formatter-pretty": "3.2.0" }, "dependencies": { "@patternfly/patternfly": "5.0.4", From 64b8f4e21af6e034b9309f75aeee21065b1c180b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 08:19:35 +0000 Subject: [PATCH 481/942] build(deps-dev): bump the stylelint group with 2 updates Bumps the stylelint group with 2 updates: [stylelint](https://github.com/stylelint/stylelint) and [stylelint-formatter-pretty](https://github.com/mrcgrtz/stylelint-formatter-pretty). Updates `stylelint` from 15.10.1 to 15.10.3 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/15.10.1...15.10.3) Updates `stylelint-formatter-pretty` from 3.2.0 to 3.2.1 - [Release notes](https://github.com/mrcgrtz/stylelint-formatter-pretty/releases) - [Commits](https://github.com/mrcgrtz/stylelint-formatter-pretty/compare/v3.2.0...v3.2.1) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-patch dependency-group: stylelint - dependency-name: stylelint-formatter-pretty dependency-type: direct:development update-type: version-update:semver-patch dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 48ecc74..76f8687 100644 --- a/package.json +++ b/package.json @@ -40,10 +40,10 @@ "po2json": "1.0.0-alpha", "qunit": "2.19.4", "sass": "1.67.0", - "stylelint": "15.10.1", + "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", - "stylelint-formatter-pretty": "3.2.0" + "stylelint-formatter-pretty": "3.2.1" }, "dependencies": { "@patternfly/patternfly": "5.0.4", From 982468f443215fe9734eaa78a769ec11530df438 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 08:18:41 +0000 Subject: [PATCH 482/942] build(deps-dev): bump the eslint group with 2 updates Bumps the eslint group with 2 updates: [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) and [eslint-plugin-promise](https://github.com/eslint-community/eslint-plugin-promise). Updates `eslint-plugin-import` from 2.26.0 to 2.28.1 - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.26.0...v2.28.1) Updates `eslint-plugin-promise` from 6.0.0 to 6.1.1 - [Release notes](https://github.com/eslint-community/eslint-plugin-promise/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-promise/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-promise/compare/v6.0.0...v6.1.1) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-promise dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 76f8687..64de2fd 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,9 @@ "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", "eslint-plugin-flowtype": "8.0.3", - "eslint-plugin-import": "2.26.0", + "eslint-plugin-import": "2.28.1", "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "6.0.0", + "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", "htmlparser": "1.7.7", From bb9a4e87dcbd23bd2a9b1476f8500e018fd580e9 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 18 Sep 2023 12:35:45 +0200 Subject: [PATCH 483/942] package.json: drop po2json The cockpit-po-plugin was reworked to use gettext-parser directly instead of po2json in 1e92eb6815eb48aab590790ecd67. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64de2fd..ac47141 100644 --- a/package.json +++ b/package.json @@ -35,9 +35,9 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", + "gettext-parser": "2.0.0", "htmlparser": "1.7.7", "jed": "1.1.1", - "po2json": "1.0.0-alpha", "qunit": "2.19.4", "sass": "1.67.0", "stylelint": "15.10.3", From e65de63f7cd3fe688f2efa090a689fbbcc111d00 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 08:13:16 +0000 Subject: [PATCH 484/942] build(deps-dev): bump gettext-parser from 2.0.0 to 7.0.1 Bumps [gettext-parser](https://github.com/smhg/gettext-parser) from 2.0.0 to 7.0.1. - [Release notes](https://github.com/smhg/gettext-parser/releases) - [Changelog](https://github.com/smhg/gettext-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/smhg/gettext-parser/compare/v2.0.0...v7.0.1) --- updated-dependencies: - dependency-name: gettext-parser dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Makefile | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 776c7ca..8e7fd57 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 9c73bec7e1dc2395a00aa0c510fd7210b6c96a16 # 300.1 + 42 commits +COCKPIT_REPO_COMMIT = 6022b0d0a7cbb4df3f7d3f48cf75ea2ea43fabaa # 301 + gettext-parser 7 adjustment $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' diff --git a/package.json b/package.json index ac47141..56629a5 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "gettext-parser": "2.0.0", + "gettext-parser": "7.0.1", "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.19.4", From b4b27bb0e07947ea847fe345b9d1d62f4662d3fe Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 21 Sep 2023 02:13:15 +0000 Subject: [PATCH 485/942] Makefile: Update Cockpit lib to ce07ea7372c63cefdb81954044e4477d Closes #706 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e7fd57..8b6e0d1 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 6022b0d0a7cbb4df3f7d3f48cf75ea2ea43fabaa # 301 + gettext-parser 7 adjustment +COCKPIT_REPO_COMMIT = ce07ea7372c63cefdb81954044e4477d970520b8 # 301 + 2 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 4f688bfbf8f7be42b6418f79bec4edadc2309730 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 08:17:49 +0000 Subject: [PATCH 486/942] build(deps-dev): bump sass from 1.67.0 to 1.68.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.67.0 to 1.68.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.67.0...1.68.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 56629a5..4db602e 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.19.4", - "sass": "1.67.0", + "sass": "1.68.0", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From ac77bafede2784030d1f0f7aa0fc72cfd35eaf92 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 22 Sep 2023 10:12:40 +0200 Subject: [PATCH 487/942] Add ruff configuration Apply our standard set of rules from our cockpit projects, and fix some minor fallout: ``` test/check-application:7:1: I001 [*] Import block is un-sorted or un-formatted test/check-application:9:119: E501 Line too long (122 > 118 characters) ``` Run ruff in CI to ensure we don't break it. --- pyproject.toml | 42 ++++++++++++++++++++++++++++++++++++++++++ test/check-application | 6 ++++-- test/run | 2 ++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6e1a119 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[tool.ruff] +select = [ + "A", # flake8-builtins + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "D300", # pydocstyle: Forbid ''' in docstrings + "E", # pycodestyle + "EXE", # flake8-executable + "F", # pyflakes + "FBT", # flake8-boolean-trap + "G", # flake8-logging-format + "I", # isort + "ICN", # flake8-import-conventions + "ISC", # flake8-implicit-str-concat + "PLE", # pylint errors + "PGH", # pygrep-hooks + "RSE", # flake8-raise + "RUF", # ruff rules + "T10", # flake8-debugger + "TCH", # flake8-type-checking + "UP032", # f-string + "W", # warnings (mostly whitespace) + "YTT", # flake8-2020 +] +exclude = [ + ".git/", + "modules/", + "node_modules/", +] +ignore = [ + "FBT002", # Boolean default value in function definition + "FBT003", # Boolean positional value in function call +] +line-length = 118 +src = [] + +[tool.ruff.flake8-pytest-style] +fixture-parentheses = false +mark-parentheses = false + +[tool.ruff.isort] +known-first-party = ["cockpit"] diff --git a/test/check-application b/test/check-application index 3d583ea..4725aad 100755 --- a/test/check-application +++ b/test/check-application @@ -6,8 +6,10 @@ import testlib -# Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and RHEL dist-git gating -# They must not permanently change any file or configuration on the system in a way that influences other tests. + +# Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and +# RHEL dist-git gating. They must not permanently change any file or configuration on the system in a +# way that influences other tests. @testlib.nondestructive class TestApplication(testlib.MachineCase): def testBasic(self): diff --git a/test/run b/test/run index 32a21df..576d364 100755 --- a/test/run +++ b/test/run @@ -12,3 +12,5 @@ export RUN_TESTS_OPTIONS=--track-naughties export LINT=1 make check + +ruff check test/check* From cd270e9dddd6827b64feea130a039eba5e0c493b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:56:22 +0000 Subject: [PATCH 488/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4db602e..73289ed 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.15.0", "esbuild-wasm": "0.19.3", - "eslint": "8.49.0", + "eslint": "8.50.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 6a16bb437f532516a2c4edc0e9345d0ef872f27e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:56:47 +0000 Subject: [PATCH 489/942] build(deps-dev): bump qunit from 2.19.4 to 2.20.0 Bumps [qunit](https://github.com/qunitjs/qunit) from 2.19.4 to 2.20.0. - [Release notes](https://github.com/qunitjs/qunit/releases) - [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md) - [Commits](https://github.com/qunitjs/qunit/compare/2.19.4...2.20.0) --- updated-dependencies: - dependency-name: qunit dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 73289ed..07d6886 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "gettext-parser": "7.0.1", "htmlparser": "1.7.7", "jed": "1.1.1", - "qunit": "2.19.4", + "qunit": "2.20.0", "sass": "1.68.0", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", From f71f5d85d74c82569d048f3adfacbcb3f805b5e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:09:23 +0000 Subject: [PATCH 490/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.3 to 0.19.4 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.3...v0.19.4) Updates `esbuild-wasm` from 0.19.3 to 0.19.4 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.3...v0.19.4) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 07d6886..2ac21df 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.3", + "esbuild": "0.19.4", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.15.0", - "esbuild-wasm": "0.19.3", + "esbuild-wasm": "0.19.4", "eslint": "8.50.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 9db8c8cba8707ac12d95956a6a80a6497ac02d72 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 28 Sep 2023 09:49:26 +0000 Subject: [PATCH 491/942] Makefile: Update Cockpit lib to 03d004dc95b75ab9fc92176a04cd9c19 Closes #714 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b6e0d1..0c9c33c 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = ce07ea7372c63cefdb81954044e4477d970520b8 # 301 + 2 commits +COCKPIT_REPO_COMMIT = 03d004dc95b75ab9fc92176a04cd9c1983f7edfa # 301 + 45 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 95198a22eee8f3bfd33d2a86288e3efd56acf0d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 08:48:16 +0000 Subject: [PATCH 492/942] build(deps-dev): bump the esbuild group with 1 update Bumps the esbuild group with 1 update: [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin). - [Release notes](https://github.com/glromeo/esbuild-sass-plugin/releases) - [Commits](https://github.com/glromeo/esbuild-sass-plugin/compare/v2.15.0...v2.16.0) --- updated-dependencies: - dependency-name: esbuild-sass-plugin dependency-type: direct:development update-type: version-update:semver-minor dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ac21df..6670009 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "esbuild": "0.19.4", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", - "esbuild-sass-plugin": "2.15.0", + "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.4", "eslint": "8.50.0", "eslint-config-standard": "17.1.0", From ab04f35fc79f04e924e2a7fdef7364ec69c54c7b Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 2 Oct 2023 19:15:13 +0200 Subject: [PATCH 493/942] package.json: drop flowtype plugin None of the Cockpit projects use flowtype's type annotation. --- .eslintrc.json | 2 +- package.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 1918f1a..c0d51d5 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,7 +9,7 @@ "ecmaVersion": "2022", "sourceType": "module" }, - "plugins": ["flowtype", "react", "react-hooks"], + "plugins": ["react", "react-hooks"], "rules": { "indent": ["error", 4, { diff --git a/package.json b/package.json index 6670009..f3ce288 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", - "eslint-plugin-flowtype": "8.0.3", "eslint-plugin-import": "2.28.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", From 755a62219d22a73d7e5277d960a25424455b1d85 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 5 Oct 2023 02:17:22 +0000 Subject: [PATCH 494/942] Makefile: Update Cockpit lib to da4d19f5740b71616e5cecb74d270c42 Closes #717 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0c9c33c..71d883b 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 03d004dc95b75ab9fc92176a04cd9c1983f7edfa # 301 + 45 commits +COCKPIT_REPO_COMMIT = da4d19f5740b71616e5cecb74d270c42dced7caf # 301 + 77 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 8c7b0601873003bcc1c3c1c26b0b524d5afa11b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 08:55:53 +0000 Subject: [PATCH 495/942] build(deps-dev): bump sass from 1.68.0 to 1.69.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.68.0 to 1.69.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.68.0...1.69.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3ce288..dba8a9e 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.68.0", + "sass": "1.69.0", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From a4c1134ea67ba482556158dfc4015624c6d407c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 09:00:16 +0000 Subject: [PATCH 496/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.50.0...v8.51.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dba8a9e..9975d0b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.4", - "eslint": "8.50.0", + "eslint": "8.51.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 6f57d08e276a74959fb936b723c27ee856868b4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:06:18 +0000 Subject: [PATCH 497/942] build(deps-dev): bump sass from 1.69.0 to 1.69.1 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.0 to 1.69.1. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.0...1.69.1) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9975d0b..9d15e01 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.0", + "sass": "1.69.1", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From d0c9c62cb3f30613aa76605b9ba9663a868dd496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:07:59 +0000 Subject: [PATCH 498/942] build(deps): bump the patternfly group with 4 updates Bumps the patternfly group with 4 updates: [@patternfly/patternfly](https://github.com/patternfly/patternfly), [@patternfly/react-core](https://github.com/patternfly/patternfly-react), [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) and @patternfly/react-styles. Updates `@patternfly/patternfly` from 5.0.4 to 5.1.0 - [Release notes](https://github.com/patternfly/patternfly/releases) - [Changelog](https://github.com/patternfly/patternfly/blob/main/release.config.js) - [Commits](https://github.com/patternfly/patternfly/compare/patch-v5.0.4...v5.1.0) Updates `@patternfly/react-core` from 5.0.1 to 5.1.1 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.0.1...@patternfly/react-core@5.1.1) Updates `@patternfly/react-icons` from 5.0.1 to 5.1.1 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@5.0.1...@patternfly/react-icons@5.1.1) Updates `@patternfly/react-styles` from 5.0.1 to 5.1.1 --- updated-dependencies: - dependency-name: "@patternfly/patternfly" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly - dependency-name: "@patternfly/react-icons" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly - dependency-name: "@patternfly/react-styles" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- Makefile | 2 +- package.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 71d883b..5d16a61 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = da4d19f5740b71616e5cecb74d270c42dced7caf # 301 + 77 commits +COCKPIT_REPO_COMMIT = 9ee07a9856d6800f0c52ebe75b8b97e034199406 # 301 + PF5.1 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' diff --git a/package.json b/package.json index 9d15e01..adafa5a 100644 --- a/package.json +++ b/package.json @@ -45,10 +45,10 @@ "stylelint-formatter-pretty": "3.2.1" }, "dependencies": { - "@patternfly/patternfly": "5.0.4", - "@patternfly/react-core": "5.0.1", - "@patternfly/react-icons": "5.0.1", - "@patternfly/react-styles": "5.0.1", + "@patternfly/patternfly": "5.1.0", + "@patternfly/react-core": "5.1.1", + "@patternfly/react-icons": "5.1.1", + "@patternfly/react-styles": "5.1.1", "react": "18.2.0", "react-dom": "18.2.0" } From c5e2d64aabccce92f4f739f86e90245f8d0a2ad4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:02:04 +0000 Subject: [PATCH 499/942] build(deps-dev): bump sass from 1.69.1 to 1.69.2 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.1 to 1.69.2. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.1...1.69.2) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index adafa5a..49f22bb 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.1", + "sass": "1.69.2", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From bb4c60ee3ad57643d4c123c796952460dd47af09 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 6 Oct 2023 07:20:42 +0200 Subject: [PATCH 500/942] dependabot: Run in our evenings, reduce limit So far the daily updates tend to run in our mornings between 7:00 and 8:00, which blocks our CI for a long time, and thus collides with developers sending PRs. Move them to the evening instead, when they can use the quiet bots time. Also reduce the number of parallel PRs from 5 to 3. Parallel ones always need to be rebased, and thus are very expensive. We still want to be able to have a complicated PatternFly PR open for several days without blocking other updates. --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e216947..198d50c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,10 @@ updates: directory: "/" schedule: interval: "daily" + # run these when most of our developers don't work, don't DoS our CI over the day + time: "22:00" + timezone: "Europe/Berlin" + open-pull-requests-limit: 3 groups: eslint: patterns: From 63e294e1ac211d1d43ebb5ee515336e7f12fad38 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 12 Oct 2023 02:13:20 +0000 Subject: [PATCH 501/942] Makefile: Update Cockpit lib to 953a6eeb9be2b6cd1c5c95fce7c0db19 Closes #724 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d16a61..ccb71ae 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 9ee07a9856d6800f0c52ebe75b8b97e034199406 # 301 + PF5.1 +COCKPIT_REPO_COMMIT = 953a6eeb9be2b6cd1c5c95fce7c0db19749bc72f # 302 + 21 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 879696b800c6e13883afe549e22d8916b0eb938a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:25:26 +0000 Subject: [PATCH 502/942] build(deps-dev): bump sass from 1.69.2 to 1.69.3 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.2 to 1.69.3. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.2...1.69.3) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49f22bb..ad5b1d0 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.2", + "sass": "1.69.3", "stylelint": "15.10.3", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From ec7f3fee51805d2a291c68cad4c5825816adc7e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:43:21 +0000 Subject: [PATCH 503/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.4 to 0.19.5 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.4...v0.19.5) Updates `esbuild-wasm` from 0.19.4 to 0.19.5 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.4...v0.19.5) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ad5b1d0..c4bc7fd 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.4", + "esbuild": "0.19.5", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.4", + "esbuild-wasm": "0.19.5", "eslint": "8.51.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From b9bf822b8e12dee718b6553a8bb0970697204107 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 20:43:43 +0000 Subject: [PATCH 504/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint](https://github.com/stylelint/stylelint). - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/15.10.3...15.11.0) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4bc7fd..c320595 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "jed": "1.1.1", "qunit": "2.20.0", "sass": "1.69.3", - "stylelint": "15.10.3", + "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", "stylelint-formatter-pretty": "3.2.1" From e22c365f17b6cd3def5b37ae0af3556d96a125d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:37:12 +0000 Subject: [PATCH 505/942] build(deps-dev): bump sass from 1.69.3 to 1.69.4 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.3 to 1.69.4. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.3...1.69.4) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c320595..453fecb 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.3", + "sass": "1.69.4", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From 872700ea413625106482e56ef8dd7e5d336ef806 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 19 Oct 2023 02:15:07 +0000 Subject: [PATCH 506/942] Makefile: Update Cockpit lib to 5ac51ecd0d5c4739d0478bee88efb8fb Closes #729 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ccb71ae..678cc85 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 953a6eeb9be2b6cd1c5c95fce7c0db19749bc72f # 302 + 21 commits +COCKPIT_REPO_COMMIT = 5ac51ecd0d5c4739d0478bee88efb8fb06f0988e # 303 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From cd7bfb04f8a60adf0248f5fd8d26f642a005dc4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:50:06 +0000 Subject: [PATCH 507/942] build(deps-dev): bump the eslint group with 2 updates Bumps the eslint group with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import). Updates `eslint` from 8.51.0 to 8.52.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0) Updates `eslint-plugin-import` from 2.28.1 to 2.29.0 - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.1...v2.29.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 453fecb..e507fde 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,11 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.5", - "eslint": "8.51.0", + "eslint": "8.52.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", - "eslint-plugin-import": "2.28.1", + "eslint-plugin-import": "2.29.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", From 704eb3d779d1316130d353742674741929832cc9 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 26 Oct 2023 02:13:37 +0000 Subject: [PATCH 508/942] Makefile: Update Cockpit lib to 118d89a84afdccda8d799579b68fee28 Closes #731 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 678cc85..e68e2cd 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 5ac51ecd0d5c4739d0478bee88efb8fb06f0988e # 303 +COCKPIT_REPO_COMMIT = 118d89a84afdccda8d799579b68fee2808d96a30 # 303 + 38 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 32da391853bd3d64acc1dba020a3836dff1ef038 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 20:40:24 +0000 Subject: [PATCH 509/942] build(deps-dev): bump sass from 1.69.4 to 1.69.5 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.4 to 1.69.5. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.4...1.69.5) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e507fde..b32344f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.4", + "sass": "1.69.5", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.0.0", From a7443ffebf46eed9b8b1876ca08e51a9b77a7071 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 30 Oct 2023 11:06:19 +0100 Subject: [PATCH 510/942] stylelint: handle stylelint-scss deprecation stylelint-sccs deprecated at-import-partial-leading-underscore in a minor version update while stylelint-config-recommended-scss still enables it causing an error when running stylelint. --- .stylelintrc.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.stylelintrc.json b/.stylelintrc.json index 352fbe6..aa78cdb 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -26,6 +26,8 @@ "no-duplicate-selectors": null, "scss/at-extend-no-missing-placeholder": null, "scss/at-import-partial-extension": null, + "scss/at-import-no-partial-leading-underscore": null, + "scss/load-no-partial-leading-underscore": true, "scss/at-mixin-pattern": null, "scss/comment-no-empty": null, "scss/dollar-variable-pattern": null, From 3a09ad65915095b28d8733446ddf158ae07831ac Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 2 Nov 2023 02:14:51 +0000 Subject: [PATCH 511/942] Makefile: Update Cockpit lib to 228c5e4cef8d2c6b22123542b4931f97 Closes #734 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e68e2cd..35620ff 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 118d89a84afdccda8d799579b68fee2808d96a30 # 303 + 38 commits +COCKPIT_REPO_COMMIT = 228c5e4cef8d2c6b22123542b4931f97a6996457 # 304 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From a3c66ea865819b00131425d396a3ff97165acc11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 21:39:33 +0000 Subject: [PATCH 512/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss). - [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases) - [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v11.0.0...v11.1.0) --- updated-dependencies: - dependency-name: stylelint-config-standard-scss dependency-type: direct:development update-type: version-update:semver-minor dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b32344f..102e200 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "sass": "1.69.5", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", - "stylelint-config-standard-scss": "11.0.0", + "stylelint-config-standard-scss": "11.1.0", "stylelint-formatter-pretty": "3.2.1" }, "dependencies": { From ac8999df11e3b292df3f41bc13fdfe663fca105d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:10:31 +0000 Subject: [PATCH 513/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v8.53.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 102e200..895c65b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.5", - "eslint": "8.52.0", + "eslint": "8.53.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 439fc281aa01441bf4695e838aea4e48097502f3 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 9 Nov 2023 02:16:55 +0000 Subject: [PATCH 514/942] Makefile: Update Cockpit lib to 5ec1a3ad4c1b544c9935b680333b07d5 Closes #737 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 35620ff..8bedbbc 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 228c5e4cef8d2c6b22123542b4931f97a6996457 # 304 + 1 commits +COCKPIT_REPO_COMMIT = 5ec1a3ad4c1b544c9935b680333b07d54f42661e # 304 + 29 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From c91cfe9f57e899495e296243cecab22bdcb50234 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 16 Nov 2023 02:21:10 +0000 Subject: [PATCH 515/942] Makefile: Update Cockpit lib to 9da922928c1b1ea8489e12ba5ba6ecfd Closes #738 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8bedbbc..462da7c 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 5ec1a3ad4c1b544c9935b680333b07d54f42661e # 304 + 29 commits +COCKPIT_REPO_COMMIT = 9da922928c1b1ea8489e12ba5ba6ecfdbe0f5bf3 # 305 + 8 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 943a6a4d59579d65ab29c910783df693706fd7ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:53:19 +0000 Subject: [PATCH 516/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.5 to 0.19.6 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.5...v0.19.6) Updates `esbuild-wasm` from 0.19.5 to 0.19.6 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.5...v0.19.6) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 895c65b..a2c4ef0 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.5", + "esbuild": "0.19.6", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.5", + "esbuild-wasm": "0.19.6", "eslint": "8.53.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 5a9a99da1287e324293740e8c92c13c0f6687d69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 05:29:46 +0000 Subject: [PATCH 517/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.54.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2c4ef0..6c6c570 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.6", - "eslint": "8.53.0", + "eslint": "8.54.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 746d6a69f6949a31cda62e5c12d52e95d565af2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 21:39:53 +0000 Subject: [PATCH 518/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.6 to 0.19.7 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.6...v0.19.7) Updates `esbuild-wasm` from 0.19.6 to 0.19.7 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.6...v0.19.7) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6c6c570..280c6da 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.6", + "esbuild": "0.19.7", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.6", + "esbuild-wasm": "0.19.7", "eslint": "8.54.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 9c8a2b22313428f444b7a4cac074431906457e53 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 23 Nov 2023 02:20:06 +0000 Subject: [PATCH 519/942] Makefile: Update Cockpit lib to 82952585929e8ecec53d9debf1f14b0c Closes #743 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 462da7c..6a88afa 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 9da922928c1b1ea8489e12ba5ba6ecfdbe0f5bf3 # 305 + 8 commits +COCKPIT_REPO_COMMIT = 82952585929e8ecec53d9debf1f14b0cd293601d # 305 + 32 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 646093441a97c5f279de7da008ac187b69dc084c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Nov 2023 22:06:11 +0000 Subject: [PATCH 520/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.7 to 0.19.8 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.7...v0.19.8) Updates `esbuild-wasm` from 0.19.7 to 0.19.8 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.7...v0.19.8) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 280c6da..0d28689 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.7", + "esbuild": "0.19.8", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.7", + "esbuild-wasm": "0.19.8", "eslint": "8.54.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 85158720cdd8164e7ba7d6f21c531066cfb09d78 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 30 Nov 2023 02:20:51 +0000 Subject: [PATCH 521/942] Makefile: Update Cockpit lib to de7ab98dc9aee629f5108c697d6dfffc Closes #745 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6a88afa..ca51945 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 82952585929e8ecec53d9debf1f14b0cd293601d # 305 + 32 commits +COCKPIT_REPO_COMMIT = de7ab98dc9aee629f5108c697d6dfffcdefb74ae # 306 + 2 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 446bf39f88c23f3d0d58aae91527d4e00798c410 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 21:43:06 +0000 Subject: [PATCH 522/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.54.0...v8.55.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d28689..9dabeeb 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.8", - "eslint": "8.54.0", + "eslint": "8.55.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 47784c883e8373052b60938c4f3ef1fd871a1075 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:22:29 +0000 Subject: [PATCH 523/942] build(deps): bump the patternfly group with 3 updates Bumps the patternfly group with 3 updates: [@patternfly/react-core](https://github.com/patternfly/patternfly-react), [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) and @patternfly/react-styles. Updates `@patternfly/react-core` from 5.1.1 to 5.1.2 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.1.1...@patternfly/react-core@5.1.2) Updates `@patternfly/react-icons` from 5.1.1 to 5.1.2 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@5.1.1...@patternfly/react-icons@5.1.2) Updates `@patternfly/react-styles` from 5.1.1 to 5.1.2 --- updated-dependencies: - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly - dependency-name: "@patternfly/react-icons" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly - dependency-name: "@patternfly/react-styles" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9dabeeb..5fd1b5f 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,9 @@ }, "dependencies": { "@patternfly/patternfly": "5.1.0", - "@patternfly/react-core": "5.1.1", - "@patternfly/react-icons": "5.1.1", - "@patternfly/react-styles": "5.1.1", + "@patternfly/react-core": "5.1.2", + "@patternfly/react-icons": "5.1.2", + "@patternfly/react-styles": "5.1.2", "react": "18.2.0", "react-dom": "18.2.0" } From 46ad3e5895261286e05489f54b89da9b803c8886 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 7 Dec 2023 02:21:44 +0000 Subject: [PATCH 524/942] Makefile: Update Cockpit lib to 05fc2d8f0670c3d53375b52065ace5f3 Closes #748 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ca51945..5940837 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = de7ab98dc9aee629f5108c697d6dfffcdefb74ae # 306 + 2 commits +COCKPIT_REPO_COMMIT = 05fc2d8f0670c3d53375b52065ace5f39c0322e5 # 306 + 15 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 3f7eff39102c619def293a66cd03248afa380048 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:22:12 +0000 Subject: [PATCH 525/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.8 to 0.19.9 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.8...v0.19.9) Updates `esbuild-wasm` from 0.19.8 to 0.19.9 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.8...v0.19.9) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5fd1b5f..df51352 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.8", + "esbuild": "0.19.9", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.8", + "esbuild-wasm": "0.19.9", "eslint": "8.55.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 535bcb5e45046c12f26d303a5644bdbc7f004d8b Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 14 Dec 2023 02:20:14 +0000 Subject: [PATCH 526/942] Makefile: Update Cockpit lib to d39a2fba817c2df32cdc7094661f28f2 Closes #753 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5940837..8e31b8f 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 05fc2d8f0670c3d53375b52065ace5f39c0322e5 # 306 + 15 commits +COCKPIT_REPO_COMMIT = d39a2fba817c2df32cdc7094661f28f20a969d06 # 306 + 48 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 46fb9f9ee835caba48973963403b6fb2362bdda6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 21:13:01 +0000 Subject: [PATCH 527/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import). - [Release notes](https://github.com/import-js/eslint-plugin-import/releases) - [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.0...v2.29.1) --- updated-dependencies: - dependency-name: eslint-plugin-import dependency-type: direct:development update-type: version-update:semver-patch dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index df51352..133860c 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", - "eslint-plugin-import": "2.29.0", + "eslint-plugin-import": "2.29.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", From 3c7072d3ccb5076325345620aa4a1d516cdfbee8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 21:47:43 +0000 Subject: [PATCH 528/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). Updates `eslint` from 8.55.0 to 8.56.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 133860c..1599f8a 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.0", "esbuild-wasm": "0.19.9", - "eslint": "8.55.0", + "eslint": "8.56.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From adc6b46e617d852200fa596c043c9dc71f75435c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 22:00:45 +0000 Subject: [PATCH 529/942] build(deps-dev): bump the esbuild group with 3 updates Bumps the esbuild group with 3 updates: [esbuild](https://github.com/evanw/esbuild), [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.9 to 0.19.10 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.9...v0.19.10) Updates `esbuild-sass-plugin` from 2.16.0 to 2.16.1 - [Release notes](https://github.com/glromeo/esbuild-sass-plugin/releases) - [Commits](https://github.com/glromeo/esbuild-sass-plugin/compare/v2.16.0...v2.16.1) Updates `esbuild-wasm` from 0.19.9 to 0.19.10 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.9...v0.19.10) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-sass-plugin dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1599f8a..2a2ef90 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.9", + "esbuild": "0.19.10", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", - "esbuild-sass-plugin": "2.16.0", - "esbuild-wasm": "0.19.9", + "esbuild-sass-plugin": "2.16.1", + "esbuild-wasm": "0.19.10", "eslint": "8.56.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From 441c699e0866aaa0e00e913f34e5252e7d4a5bb8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 21 Dec 2023 02:19:55 +0000 Subject: [PATCH 530/942] Makefile: Update Cockpit lib to 5a872683db3d00a27064d24ab7e1011b Closes #757 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8e31b8f..e1ae85e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = d39a2fba817c2df32cdc7094661f28f20a969d06 # 306 + 48 commits +COCKPIT_REPO_COMMIT = 5a872683db3d00a27064d24ab7e1011b7fd46baa # 307 + 20 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 0d67d23124cd772dc9b9a1854759465825ab5ff8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:16:20 +0000 Subject: [PATCH 531/942] build(deps-dev): bump sass from 1.69.5 to 1.69.6 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.5 to 1.69.6. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.5...1.69.6) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a2ef90..49426e3 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.5", + "sass": "1.69.6", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.1.0", From a747ab97752f8734fb908dd9c30b45f9f2add69d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:15:52 +0000 Subject: [PATCH 532/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.10 to 0.19.11 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.10...v0.19.11) Updates `esbuild-wasm` from 0.19.10 to 0.19.11 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.10...v0.19.11) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 49426e3..72694cb 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.10", + "esbuild": "0.19.11", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.1", - "esbuild-wasm": "0.19.10", + "esbuild-wasm": "0.19.11", "eslint": "8.56.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From ef4b3ed99131a193ade3ab100a00b7e5273bf7e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 21:20:40 +0000 Subject: [PATCH 533/942] build(deps-dev): bump sass from 1.69.6 to 1.69.7 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.6 to 1.69.7. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.6...1.69.7) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72694cb..0e06bda 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.6", + "sass": "1.69.7", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.1.0", From 348bcbcdfc2589b8d727ad2c7924aea43a5c22dd Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 4 Jan 2024 02:20:02 +0000 Subject: [PATCH 534/942] Makefile: Update Cockpit lib to cf2485d79da7fb9be262eaa4ca5ef91e Closes #764 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e1ae85e..e90413b 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 5a872683db3d00a27064d24ab7e1011b7fd46baa # 307 + 20 commits +COCKPIT_REPO_COMMIT = cf2485d79da7fb9be262eaa4ca5ef91e57a03a75 # 308 + 5 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 903218ba186c4aef363e7faf1589c6c4265c48da Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 11 Jan 2024 02:22:50 +0000 Subject: [PATCH 535/942] Makefile: Update Cockpit lib to 8fb879870c889ba7da202cc7b077006a Closes #766 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e90413b..658c719 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = cf2485d79da7fb9be262eaa4ca5ef91e57a03a75 # 308 + 5 commits +COCKPIT_REPO_COMMIT = 8fb879870c889ba7da202cc7b077006aa0cc93cf # 308 + 23 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From dcea555d070710dd14e55625dff3a9550063c93c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 18 Jan 2024 02:22:34 +0000 Subject: [PATCH 536/942] Makefile: Update Cockpit lib to e2f3e9eb7c3635e7ac3ddf751c6bb3ff Closes #767 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 658c719..db2a892 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 8fb879870c889ba7da202cc7b077006aa0cc93cf # 308 + 23 commits +COCKPIT_REPO_COMMIT = e2f3e9eb7c3635e7ac3ddf751c6bb3ff5351062e # 308 + 40 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 42ff9dbce60a7964dd5ff5037df9c79da81cbe15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:55:41 +0000 Subject: [PATCH 537/942] build(deps-dev): bump sass from 1.69.7 to 1.70.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.69.7 to 1.70.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.69.7...1.70.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e06bda..ac1dbdf 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", - "sass": "1.69.7", + "sass": "1.70.0", "stylelint": "15.11.0", "stylelint-config-standard": "34.0.0", "stylelint-config-standard-scss": "11.1.0", From 471073a2c4aad41233f8b3c4b412ba94efa161f4 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 22 Jan 2024 16:59:00 +0100 Subject: [PATCH 538/942] .gitignore: merge back changes from Cockpit In machines/podman and Cockpit we sorted and re-organised the gitignore file. In navigator I noticed that starter-kit did not have these changes yet and so we had to re-apply them so let's fix it in the source. --- .gitignore | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index aa13142..b64ad81 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,33 @@ -*~ -*.retry -*.tar.xz +# Please keep this file sorted (LC_COLLATE=C.UTF-8), +# grouped into the 3 categories below: +# - general patterns (match in all directories) +# - patterns to match files at the toplevel +# - patterns to match files in subdirs + +# general patterns +*.pyc *.rpm -node_modules/ -dist/ -/*.spec -/.vagrant -package-lock.json -Test*FAIL* + +# toplevel (/...) +/Test*.html +/Test*.json +/Test*.log +/Test*.png /bots -test/common/ -test/images/ -pkg -*.pot -POTFILES* -tmp/ -/po/LINGUAS -/tools +/cockpit-*.tar.xz +/cockpit-navigator.spec +/dist/ +/package-lock.json +/pkg/ +/node_modules/ +/tmp/ +/tools/ + +# subdirs (/subdir/...) +/packaging/arch/PKGBUILD +/packaging/debian/changelog +/po/*.pot + /po/LINGUAS +/test/common/ +/test/images/ +/test/static-code From 58e40f033fc575bbe54df5c37238ef306550f7a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jan 2024 21:41:55 +0000 Subject: [PATCH 539/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.11 to 0.19.12 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.11...v0.19.12) Updates `esbuild-wasm` from 0.19.11 to 0.19.12 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.11...v0.19.12) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ac1dbdf..25054b2 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.11", + "esbuild": "0.19.12", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "2.16.1", - "esbuild-wasm": "0.19.11", + "esbuild-wasm": "0.19.12", "eslint": "8.56.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From ff488f37aeb42556ec993ae24dff141b9256c773 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Tue, 23 Jan 2024 18:04:13 +0100 Subject: [PATCH 540/942] Makefile: have xgettext extract translator comments --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index db2a892..0e6cfc2 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ LINGUAS=$(basename $(notdir $(wildcard po/*.po))) po/$(PACKAGE_NAME).js.pot: xgettext --default-domain=$(PACKAGE_NAME) --output=$@ --language=C --keyword= \ + --add-comments=Translators: \ --keyword=_:1,1t --keyword=_:1c,2,2t --keyword=C_:1c,2 \ --keyword=N_ --keyword=NC_:1c,2 \ --keyword=gettext:1,1t --keyword=gettext:1c,2,2t \ From 52402605e62070317cf695d3c2de73a967c29b30 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 25 Jan 2024 02:24:43 +0000 Subject: [PATCH 541/942] Makefile: Update Cockpit lib to 190e121e99afbd7f4cfe7850f7d9028e Closes #773 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e6cfc2..6efbced 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = e2f3e9eb7c3635e7ac3ddf751c6bb3ff5351062e # 308 + 40 commits +COCKPIT_REPO_COMMIT = 190e121e99afbd7f4cfe7850f7d9028e0190abdd # 309 + 27 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 1e0de37846b688824470a5a0c3a6d48ed818e6a0 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Fri, 26 Jan 2024 10:47:04 +0100 Subject: [PATCH 542/942] .gitignore: improvements --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b64ad81..a439cd4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,9 @@ /Test*.html /Test*.json /Test*.log +/Test*.log.gz /Test*.png +/*.whl /bots /cockpit-*.tar.xz /cockpit-navigator.spec From 8739b660ec73c1e38fbb903edfac30ff7d039585 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 1 Feb 2024 02:17:27 +0000 Subject: [PATCH 543/942] Makefile: Update Cockpit lib to fca64d4b989ceadabbfda311b971a414 Closes #777 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6efbced..cbd7a8d 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 190e121e99afbd7f4cfe7850f7d9028e0190abdd # 309 + 27 commits +COCKPIT_REPO_COMMIT = fca64d4b989ceadabbfda311b971a41490aa2187 # 310 + 2 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From f9f2da6974875469b7ae3f9c6ec914cde53916f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 21:28:20 +0000 Subject: [PATCH 544/942] build(deps): bump the patternfly group with 1 update Bumps the patternfly group with 1 update: [@patternfly/patternfly](https://github.com/patternfly/patternfly). Updates `@patternfly/patternfly` from 5.1.0 to 5.2.0 - [Release notes](https://github.com/patternfly/patternfly/releases) - [Changelog](https://github.com/patternfly/patternfly/blob/main/release.config.js) - [Commits](https://github.com/patternfly/patternfly/compare/v5.1.0...v5.2.0) --- updated-dependencies: - dependency-name: "@patternfly/patternfly" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25054b2..aff54f5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "stylelint-formatter-pretty": "3.2.1" }, "dependencies": { - "@patternfly/patternfly": "5.1.0", + "@patternfly/patternfly": "5.2.0", "@patternfly/react-core": "5.1.2", "@patternfly/react-icons": "5.1.2", "@patternfly/react-styles": "5.1.2", From 8337901d34859dc8e5f8b9922f1cbfc5f38297a5 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Mon, 5 Feb 2024 15:54:25 +0100 Subject: [PATCH 545/942] pyproject: adjust to new ruff settings layout --- pyproject.toml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6e1a119..4e8b03f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,13 @@ [tool.ruff] +exclude = [ + ".git/", + "modules/", + "node_modules/", +] +line-length = 118 +src = [] + +[tool.ruff.lint] select = [ "A", # flake8-builtins "B", # flake8-bugbear @@ -22,21 +31,14 @@ select = [ "W", # warnings (mostly whitespace) "YTT", # flake8-2020 ] -exclude = [ - ".git/", - "modules/", - "node_modules/", -] ignore = [ "FBT002", # Boolean default value in function definition "FBT003", # Boolean positional value in function call ] -line-length = 118 -src = [] -[tool.ruff.flake8-pytest-style] +[tool.ruff.lint.flake8-pytest-style] fixture-parentheses = false mark-parentheses = false -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["cockpit"] From 0b93fd600eef9afeca17b6862c111adac4185225 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 21:43:06 +0000 Subject: [PATCH 546/942] build(deps): bump the patternfly group with 3 updates Bumps the patternfly group with 3 updates: [@patternfly/react-core](https://github.com/patternfly/patternfly-react), [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) and @patternfly/react-styles. Updates `@patternfly/react-core` from 5.1.2 to 5.2.0 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.1.2...@patternfly/react-core@5.2.0) Updates `@patternfly/react-icons` from 5.1.2 to 5.2.0 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@5.1.2...@patternfly/react-icons@5.2.0) Updates `@patternfly/react-styles` from 5.1.2 to 5.2.0 --- updated-dependencies: - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly - dependency-name: "@patternfly/react-icons" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly - dependency-name: "@patternfly/react-styles" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index aff54f5..85ac1c8 100644 --- a/package.json +++ b/package.json @@ -46,9 +46,9 @@ }, "dependencies": { "@patternfly/patternfly": "5.2.0", - "@patternfly/react-core": "5.1.2", - "@patternfly/react-icons": "5.1.2", - "@patternfly/react-styles": "5.1.2", + "@patternfly/react-core": "5.2.0", + "@patternfly/react-icons": "5.2.0", + "@patternfly/react-styles": "5.2.0", "react": "18.2.0", "react-dom": "18.2.0" } From 9acbd4f157a8a0f7f830bbae672090bd0318efa6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Wed, 7 Feb 2024 13:04:33 +0000 Subject: [PATCH 547/942] Makefile: Update Cockpit lib to bc12d5e116b56ebc5509fde7191a2ac5 Closes #784 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cbd7a8d..a8d1ab2 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = fca64d4b989ceadabbfda311b971a41490aa2187 # 310 + 2 commits +COCKPIT_REPO_COMMIT = bc12d5e116b56ebc5509fde7191a2ac5c09b1018 # 310.1 + 17 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 39014f29e830e665fef9a784eda7ddc0d6948cd4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 16:35:06 +0100 Subject: [PATCH 548/942] flake8: Add config Use our standard "max line length 118" config from other projects. --- .flake8 | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..cf4c387 --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 118 From ad0a653f82d36d5e2a5f56d0df1db4a9e4f1eb7f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 16:43:38 +0100 Subject: [PATCH 549/942] build.js: Fix escape characters Spotted by ESLint when calling it on build.js itself (which the esbuild integration didn't). --- build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 8fca807..87bdae4 100755 --- a/build.js +++ b/build.js @@ -95,8 +95,8 @@ const context = await esbuild.context({ target: ['es2020'], plugins: [ cleanPlugin(), - ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(css?|scss?)$') })], - ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '\/src\/.*\.(jsx?|js?)$') })], + ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(css?|scss?)$') })], + ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(jsx?|js?)$') })], // Esbuild will only copy assets that are explicitly imported and used // in the code. This is a problem for index.html and manifest.json which are not imported copy({ From 5d2840449aaec5c579949ed1f00c1d92e6083caf Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 16:31:04 +0100 Subject: [PATCH 550/942] Use Cockpit's shared static code checks These will soon take over ESLint and stylelint, plus they also cover ruff and other goodies for the Python part. This supersedes the explicit ruff call. This is already being used by cockpit-{podman,machines,navigator} etc. --- Makefile | 4 ++++ test/run | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8d1ab2..cc3a7ad 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ all: $(DIST_TEST) COCKPIT_REPO_FILES = \ pkg/lib \ test/common \ + test/static-code \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git @@ -178,6 +179,9 @@ prepare-check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common check: prepare-check test/common/run-tests ${RUN_TESTS_OPTIONS} +codecheck: test/static-code $(NODE_MODULES_TEST) + test/static-code + # checkout Cockpit's bots for standard test VM images and API to launch them bots: $(COCKPIT_REPO_STAMP) test/common/make-bots diff --git a/test/run b/test/run index 576d364..1b9cfab 100755 --- a/test/run +++ b/test/run @@ -11,6 +11,5 @@ export RUN_TESTS_OPTIONS=--track-naughties # linters are off by default for production builds, but we want to run them in CI export LINT=1 +make codecheck make check - -ruff check test/check* From bf4889042aa98f288e87cfbf054d90d07d6cc45c Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Wed, 7 Feb 2024 10:40:32 +0100 Subject: [PATCH 551/942] github: allow dependeabot to update github workflow actions Github usually updates their actions once a while and then warns about a node env getting deprecated in runs. Which is not super easily spotted by a developer until it's too late, so let's like npm let dependabot handle updating. --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 198d50c..d17ec69 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,3 +21,9 @@ updates: patternfly: patterns: - "@patternfly*" + + - package-ecosystem: "github-actions" + directory: "/" + open-pull-requests-limit: 3 + schedule: + interval: "weekly" From 8256d6f18f17b2fde04f462f53487d6c1e0bbfda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 18:00:33 +0000 Subject: [PATCH 552/942] build(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/cockpit-lib-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cockpit-lib-update.yml b/.github/workflows/cockpit-lib-update.yml index 2f9de38..d3dfa70 100644 --- a/.github/workflows/cockpit-lib-update.yml +++ b/.github/workflows/cockpit-lib-update.yml @@ -22,7 +22,7 @@ jobs: echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token - name: Clone repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run cockpit-lib-update run: | From 15be8835955f81c212a56cc262cb51a8b2914e0e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 18:51:46 +0100 Subject: [PATCH 553/942] Move eslint/stylelint to static-code tests stylelint 16 causes a deadlock/crash in esbuild [1]. There's no movement on that issue, and we want stylelint 16 to be able to support the Browser Baseline 2023. Follow https://github.com/cockpit-project/cockpit/commit/1a28b31828e and move the linters into test/static-code. This also starts to lint files which are outside of esbuild's realm, such as documentation and examples. [1] https://github.com/evanw/esbuild/issues/3542 --- Makefile | 2 +- README.md | 10 ++-------- build.js | 9 --------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index cc3a7ad..10dd33e 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = bc12d5e116b56ebc5509fde7191a2ac5c09b1018 # 310.1 + 17 commits +COCKPIT_REPO_COMMIT = 1a28b31828e309aa2aba6076b1bcc5ee841ac8ea # 310.1 + 30 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' diff --git a/README.md b/README.md index 24730e9..575477d 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ remove manually the symlink: Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check JavaScript code style in `.js` and `.jsx` files. -eslint is executed within every build. +eslint is executed as part of `test/static-code`, aka. `make codecheck`. For developer convenience, the ESLint can be started explicitly by: @@ -94,7 +94,7 @@ Rules configuration can be found in the `.eslintrc.json` file. Cockpit uses [Stylelint](https://stylelint.io/) to automatically check CSS code style in `.css` and `scss` files. -styleint is executed within every build. +styleint is executed as part of `test/static-code`, aka. `make codecheck`. For developer convenience, the Stylelint can be started explicitly by: @@ -106,12 +106,6 @@ Violations of some rules can be fixed automatically by: Rules configuration can be found in the `.stylelintrc.json` file. -During fast iterative development, you can also choose to not run eslint/stylelint. -This speeds up the build and avoids build failures due to e. g. ill-formatted -css or other issues: - - $ ./build.js -es - # Running tests locally Run `make check` to build an RPM, install it into a standard Cockpit test VM diff --git a/build.js b/build.js index 87bdae4..4210743 100755 --- a/build.js +++ b/build.js @@ -11,19 +11,14 @@ import { cockpitCompressPlugin } from './pkg/lib/esbuild-compress-plugin.js'; import { cockpitPoEsbuildPlugin } from './pkg/lib/cockpit-po-plugin.js'; import { cockpitRsyncEsbuildPlugin } from './pkg/lib/cockpit-rsync-plugin.js'; import { esbuildStylesPlugins } from './pkg/lib/esbuild-common.js'; -import { eslintPlugin } from './pkg/lib/esbuild-eslint-plugin.js'; -import { stylelintPlugin } from './pkg/lib/esbuild-stylelint-plugin.js'; const production = process.env.NODE_ENV === 'production'; const useWasm = os.arch() !== 'x64'; const esbuild = (await import(useWasm ? 'esbuild-wasm' : 'esbuild')).default; -const lintDefault = process.env.LINT ? process.env.LINT === '0' : production; const parser = (await import('argparse')).default.ArgumentParser(); parser.add_argument('-r', '--rsync', { help: "rsync bundles to ssh target after build", metavar: "HOST" }); parser.add_argument('-w', '--watch', { action: 'store_true', help: "Enable watch mode", default: process.env.ESBUILD_WATCH === "true" }); -parser.add_argument('-e', '--no-eslint', { action: 'store_true', help: "Disable eslint linting", default: lintDefault }); -parser.add_argument('-s', '--no-stylelint', { action: 'store_true', help: "Disable stylelint linting", default: lintDefault }); const args = parser.parse_args(); if (args.rsync) @@ -55,8 +50,6 @@ function notifyEndPlugin() { }; } -const cwd = process.cwd(); - // similar to fs.watch(), but recursively watches all subdirectories function watch_dirs(dir, on_change) { const callback = (ev, dir, fname) => { @@ -95,8 +88,6 @@ const context = await esbuild.context({ target: ['es2020'], plugins: [ cleanPlugin(), - ...args.no_stylelint ? [] : [stylelintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(css?|scss?)$') })], - ...args.no_eslint ? [] : [eslintPlugin({ filter: new RegExp(cwd + '/src/.*\\.(jsx?|js?)$') })], // Esbuild will only copy assets that are explicitly imported and used // in the code. This is a problem for index.html and manifest.json which are not imported copy({ From cb6a2b84cac6752c4feab11fe22d0472c0c5e5f9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 19:26:55 +0100 Subject: [PATCH 554/942] fmf: Fix saving of artifacts These need to be copied into `$TMT_TEST_DATA`. We already did this in derived projects like cockpit-podman, but forgot it here. --- test/browser/browser.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index e88aa23..1534d93 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -5,7 +5,7 @@ export TEST_BROWSER=${TEST_BROWSER:-firefox} TESTS="$(realpath $(dirname "$0"))" export SOURCE="$(realpath $TESTS/../..)" -export LOGS="$(pwd)/logs" +export LOGS="${TMT_TEST_DATA:-$(pwd)/logs}" mkdir -p "$LOGS" chmod a+w "$LOGS" From 8bdaa90430227b5379cd86c1afe2ba6d96943071 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 8 Feb 2024 02:12:41 +0000 Subject: [PATCH 555/942] Makefile: Update Cockpit lib to d2a0a971cde5af5353691ee030620be0 Closes #789 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 10dd33e..70263f7 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 1a28b31828e309aa2aba6076b1bcc5ee841ac8ea # 310.1 + 30 commits +COCKPIT_REPO_COMMIT = d2a0a971cde5af5353691ee030620be06c2dbc67 # 310.2 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From a0f5432f4e1d639513d5b1a233db1d8a9136944e Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 22:24:05 +0100 Subject: [PATCH 556/942] Drop remaining vestiges of `$LINT` This got removed in commit 15be8835955f. --- packaging/cockpit-starter-kit.spec.in | 2 +- test/run | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index c6b43a3..1235526 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -32,7 +32,7 @@ rm -rf dist %endif %build -LINT=0 NODE_ENV=production make +NODE_ENV=production make %install %make_install PREFIX=/usr diff --git a/test/run b/test/run index 1b9cfab..5c14f0d 100755 --- a/test/run +++ b/test/run @@ -8,8 +8,5 @@ TEST_SCENARIO="${TEST_SCENARIO:-}" [ "${TEST_SCENARIO}" = "${TEST_SCENARIO##firefox}" ] || export TEST_BROWSER=firefox export RUN_TESTS_OPTIONS=--track-naughties -# linters are off by default for production builds, but we want to run them in CI -export LINT=1 - make codecheck make check From 09c6e956acf77c1e1788b3b043bfe7140defc36f Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 7 Feb 2024 22:28:07 +0100 Subject: [PATCH 557/942] stylelintrc: Drop rules not known in stylelint 16 --- .stylelintrc.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index aa78cdb..0133e2c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,11 +1,7 @@ { "extends": "stylelint-config-standard-scss", "rules": { - "declaration-colon-newline-after": null, - "selector-list-comma-newline-after": null, - "at-rule-empty-line-before": null, - "declaration-colon-space-before": null, "declaration-empty-line-before": null, "custom-property-empty-line-before": null, "comment-empty-line-before": null, @@ -19,9 +15,7 @@ "declaration-block-single-line-max-declarations": null, "font-family-no-duplicate-names": null, "function-url-quotes": null, - "indentation": null, "keyframes-name-pattern": null, - "max-line-length": null, "no-descending-specificity": null, "no-duplicate-selectors": null, "scss/at-extend-no-missing-placeholder": null, From 93ba03c847bd484c6151203f46aac67add30b491 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:59:10 +0000 Subject: [PATCH 558/942] build(deps-dev): bump the stylelint group with 4 updates Bumps the stylelint group with 4 updates: [stylelint](https://github.com/stylelint/stylelint), [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard), [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) and [stylelint-formatter-pretty](https://github.com/mrcgrtz/stylelint-formatter-pretty). Updates `stylelint` from 15.11.0 to 16.2.1 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/15.11.0...16.2.1) Updates `stylelint-config-standard` from 34.0.0 to 36.0.0 - [Release notes](https://github.com/stylelint/stylelint-config-standard/releases) - [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint-config-standard/compare/34.0.0...36.0.0) Updates `stylelint-config-standard-scss` from 11.1.0 to 13.0.0 - [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases) - [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v11.1.0...v13.0.0) Updates `stylelint-formatter-pretty` from 3.2.1 to 4.0.0 - [Release notes](https://github.com/mrcgrtz/stylelint-formatter-pretty/releases) - [Commits](https://github.com/mrcgrtz/stylelint-formatter-pretty/compare/v3.2.1...v4.0.0) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-major dependency-group: stylelint - dependency-name: stylelint-config-standard dependency-type: direct:development update-type: version-update:semver-major dependency-group: stylelint - dependency-name: stylelint-config-standard-scss dependency-type: direct:development update-type: version-update:semver-major dependency-group: stylelint - dependency-name: stylelint-formatter-pretty dependency-type: direct:development update-type: version-update:semver-major dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 85ac1c8..59ef5cf 100644 --- a/package.json +++ b/package.json @@ -39,10 +39,10 @@ "jed": "1.1.1", "qunit": "2.20.0", "sass": "1.70.0", - "stylelint": "15.11.0", - "stylelint-config-standard": "34.0.0", - "stylelint-config-standard-scss": "11.1.0", - "stylelint-formatter-pretty": "3.2.1" + "stylelint": "16.2.1", + "stylelint-config-standard": "36.0.0", + "stylelint-config-standard-scss": "13.0.0", + "stylelint-formatter-pretty": "4.0.0" }, "dependencies": { "@patternfly/patternfly": "5.2.0", From 5966bc24be31a29a7f646fad6ff20b67ad418018 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 9 Feb 2024 08:34:14 +0100 Subject: [PATCH 559/942] .github: don't run integration tests on actions changes --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d17ec69..4258f34 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -25,5 +25,7 @@ updates: - package-ecosystem: "github-actions" directory: "/" open-pull-requests-limit: 3 + labels: + - "no-test" schedule: interval: "weekly" From a27c372d94bf3451c40080c1f4fd394f8473fd0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:37:37 +0000 Subject: [PATCH 560/942] build(deps-dev): bump gettext-parser from 7.0.1 to 8.0.0 Bumps [gettext-parser](https://github.com/smhg/gettext-parser) from 7.0.1 to 8.0.0. - [Release notes](https://github.com/smhg/gettext-parser/releases) - [Changelog](https://github.com/smhg/gettext-parser/blob/master/CHANGELOG.md) - [Commits](https://github.com/smhg/gettext-parser/compare/v7.0.1...v8.0.0) --- updated-dependencies: - dependency-name: gettext-parser dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 59ef5cf..43da30c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-react": "7.33.2", "eslint-plugin-react-hooks": "4.6.0", - "gettext-parser": "7.0.1", + "gettext-parser": "8.0.0", "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.0", From 2ac690907b5559cb975316afe1595499675157d0 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 15 Feb 2024 02:13:56 +0000 Subject: [PATCH 561/942] Makefile: Update Cockpit lib to 2aebbbf2cc0302f21287bd278f5a3161 Closes #793 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 70263f7..ae6dfa9 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = d2a0a971cde5af5353691ee030620be06c2dbc67 # 310.2 + 1 commits +COCKPIT_REPO_COMMIT = 2aebbbf2cc0302f21287bd278f5a3161aa149cbb # 311 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 34419c05209c5e452366124ea9ac1455ce5e4f5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 16 Feb 2024 21:32:28 +0000 Subject: [PATCH 562/942] build(deps-dev): bump qunit from 2.20.0 to 2.20.1 Bumps [qunit](https://github.com/qunitjs/qunit) from 2.20.0 to 2.20.1. - [Release notes](https://github.com/qunitjs/qunit/releases) - [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md) - [Commits](https://github.com/qunitjs/qunit/compare/2.20.0...2.20.1) --- updated-dependencies: - dependency-name: qunit dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 43da30c..980533a 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "gettext-parser": "8.0.0", "htmlparser": "1.7.7", "jed": "1.1.1", - "qunit": "2.20.0", + "qunit": "2.20.1", "sass": "1.70.0", "stylelint": "16.2.1", "stylelint-config-standard": "36.0.0", From d0178514d55c6572c3f23f7134a5d3295cbd10a5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 17 Feb 2024 05:39:21 +0000 Subject: [PATCH 563/942] build(deps-dev): bump sass from 1.70.0 to 1.71.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.70.0 to 1.71.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.70.0...1.71.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 980533a..7ae6ba5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.1", - "sass": "1.70.0", + "sass": "1.71.0", "stylelint": "16.2.1", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.0.0", From 6e1427493ade2e34a0ce1119dd5be778af9df6df Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 20 Feb 2024 11:39:37 +0100 Subject: [PATCH 564/942] workflows: Switch release to cockpit/tasks container The unit-tests container was dropped in https://github.com/cockpit-project/cockpit/commit/f16f1fc14b88c Also switch the template to current actions/checkout version. --- .github/workflows/release.yml.disabled | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index 5a5d46a..a7bbf6b 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -11,14 +11,14 @@ jobs: source: runs-on: ubuntu-latest container: - image: ghcr.io/cockpit-project/unit-tests + image: quay.io/cockpit/tasks:latest options: --user root permissions: # create GitHub release contents: write steps: - name: Clone repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From 1f061ae26ce6054dc37d2d39797ac4988536f2b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 21:34:25 +0000 Subject: [PATCH 565/942] build(deps-dev): bump sass from 1.71.0 to 1.71.1 Bumps [sass](https://github.com/sass/dart-sass) from 1.71.0 to 1.71.1. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.71.0...1.71.1) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ae6ba5..9e7d25b 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.1", - "sass": "1.71.0", + "sass": "1.71.1", "stylelint": "16.2.1", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.0.0", From 159979ac04171fb86d44e52fbca2280b41052246 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 22 Feb 2024 02:12:52 +0000 Subject: [PATCH 566/942] Makefile: Update Cockpit lib to d8c2edc8a2e611f4b65285434bad0f08 Closes #799 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ae6dfa9..e112c47 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 2aebbbf2cc0302f21287bd278f5a3161aa149cbb # 311 + 1 commits +COCKPIT_REPO_COMMIT = d8c2edc8a2e611f4b65285434bad0f08ebff140a # 311.1 + 6 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 531000589e6039ba667ef81dac75ac261b525510 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 05:46:58 +0000 Subject: [PATCH 567/942] build(deps-dev): bump the esbuild group with 3 updates Bumps the esbuild group with 3 updates: [esbuild](https://github.com/evanw/esbuild), [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.19.12 to 0.20.1 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.12...v0.20.1) Updates `esbuild-sass-plugin` from 2.16.1 to 3.1.0 - [Release notes](https://github.com/glromeo/esbuild-sass-plugin/releases) - [Commits](https://github.com/glromeo/esbuild-sass-plugin/compare/v2.16.1...v3.1.0) Updates `esbuild-wasm` from 0.19.12 to 0.20.1 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.19.12...v0.20.1) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-minor dependency-group: esbuild - dependency-name: esbuild-sass-plugin dependency-type: direct:development update-type: version-update:semver-major dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-minor dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9e7d25b..f489dac 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.19.12", + "esbuild": "0.20.1", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", - "esbuild-sass-plugin": "2.16.1", - "esbuild-wasm": "0.19.12", + "esbuild-sass-plugin": "3.1.0", + "esbuild-wasm": "0.20.1", "eslint": "8.56.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From e4d9c4d647680e90f0dc7eb704955f72e5344d98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 22:04:19 +0000 Subject: [PATCH 568/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint](https://github.com/eslint/eslint). Updates `eslint` from 8.56.0 to 8.57.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f489dac..10c4349 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "3.1.0", "esbuild-wasm": "0.20.1", - "eslint": "8.56.0", + "eslint": "8.57.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", "eslint-config-standard-react": "13.0.0", From 0009f07a2c538447ec060b5f01ab14f7a17c4c7d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 27 Feb 2024 10:38:57 +0100 Subject: [PATCH 569/942] workflows: Bump action-release to get github-script@v7 This gets rid of the obsolete node.js 16. See https://github.com/cockpit-project/action-release/commit/7d2e2657382e8 --- .github/workflows/release.yml.disabled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index a7bbf6b..20609b8 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -33,6 +33,6 @@ jobs: run: make dist - name: Publish GitHub release - uses: cockpit-project/action-release@88d994da62d1451c7073e26748c18413fcdf46e9 + uses: cockpit-project/action-release@7d2e2657382e8d34f88a24b5987f2b81ea165785 with: filename: "TARNAME-${{ github.ref_name }}.tar.xz" From 4cdfc7396f1478d22aaad4d92df7f089c0b04ff6 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 29 Feb 2024 02:12:00 +0000 Subject: [PATCH 570/942] Makefile: Update Cockpit lib to a39755f742308052110e4c0de3732338 Closes #803 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e112c47..ed84a80 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = d8c2edc8a2e611f4b65285434bad0f08ebff140a # 311.1 + 6 commits +COCKPIT_REPO_COMMIT = a39755f742308052110e4c0de3732338bfeb1b53 # 312 + 1 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 70fe05f53f3685e4892dfeb3d9e13b971253a560 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:30:21 +0000 Subject: [PATCH 571/942] build(deps): bump the patternfly group with 4 updates Bumps the patternfly group with 4 updates: [@patternfly/patternfly](https://github.com/patternfly/patternfly), [@patternfly/react-core](https://github.com/patternfly/patternfly-react), [@patternfly/react-icons](https://github.com/patternfly/patternfly-react) and @patternfly/react-styles. Updates `@patternfly/patternfly` from 5.2.0 to 5.2.1 - [Release notes](https://github.com/patternfly/patternfly/releases) - [Changelog](https://github.com/patternfly/patternfly/blob/main/release.config.js) - [Commits](https://github.com/patternfly/patternfly/compare/v5.2.0...patch-v5.2.1) Updates `@patternfly/react-core` from 5.2.0 to 5.2.1 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0...@patternfly/react-core@5.2.1) Updates `@patternfly/react-icons` from 5.2.0 to 5.2.1 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-icons@5.2.0...@patternfly/react-icons@5.2.1) Updates `@patternfly/react-styles` from 5.2.0 to 5.2.1 --- updated-dependencies: - dependency-name: "@patternfly/patternfly" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly - dependency-name: "@patternfly/react-icons" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly - dependency-name: "@patternfly/react-styles" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 10c4349..f2a5b60 100644 --- a/package.json +++ b/package.json @@ -45,10 +45,10 @@ "stylelint-formatter-pretty": "4.0.0" }, "dependencies": { - "@patternfly/patternfly": "5.2.0", - "@patternfly/react-core": "5.2.0", - "@patternfly/react-icons": "5.2.0", - "@patternfly/react-styles": "5.2.0", + "@patternfly/patternfly": "5.2.1", + "@patternfly/react-core": "5.2.1", + "@patternfly/react-icons": "5.2.1", + "@patternfly/react-styles": "5.2.1", "react": "18.2.0", "react-dom": "18.2.0" } From 4cf8165a98641c18e5c6c5f21759c1e89d0f1672 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 21:26:26 +0000 Subject: [PATCH 572/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react). Updates `eslint-plugin-react` from 7.33.2 to 7.34.0 - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.2...v7.34.0) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2a5b60..2693977 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "eslint-plugin-import": "2.29.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", - "eslint-plugin-react": "7.33.2", + "eslint-plugin-react": "7.34.0", "eslint-plugin-react-hooks": "4.6.0", "gettext-parser": "8.0.0", "htmlparser": "1.7.7", From 8607984b41cebd667cdb6b2f691e9b83a6364c71 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 7 Mar 2024 02:04:34 +0000 Subject: [PATCH 573/942] Makefile: Update Cockpit lib to 50fc1b962eeefefc9926ece8e4891477 Closes #806 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ed84a80..f222bc2 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = a39755f742308052110e4c0de3732338bfeb1b53 # 312 + 1 commits +COCKPIT_REPO_COMMIT = 50fc1b962eeefefc9926ece8e4891477a88a4454 # 312 + 22 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From d21beed19c3d00cc43915494752186e702021e4d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Fri, 8 Mar 2024 14:30:57 +0100 Subject: [PATCH 574/942] =?UTF-8?q?README.md:=20npm-update=20=E2=86=92=20d?= =?UTF-8?q?ependabot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 575477d..2bcb919 100644 --- a/README.md +++ b/README.md @@ -188,10 +188,9 @@ see the [packit.yaml](./packit.yaml) control file. # Automated maintenance It is important to keep your [NPM modules](./package.json) up to date, to keep -up with security updates and bug fixes. This is done with the -[npm-update bot script](https://github.com/cockpit-project/bots/blob/main/npm-update) -which is run weekly or upon [manual request](https://github.com/cockpit-project/starter-kit/actions) through the -[npm-update.yml](.github/workflows/npm-update.yml) [GitHub action](https://github.com/features/actions). +up with security updates and bug fixes. This happens with +[dependabot](https://github.com/dependabot), +see [configuration file](.github/dependabot.yml). # Further reading From 8299216e27c4751a651536541c0a0aed38368a93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 21:45:56 +0000 Subject: [PATCH 575/942] build(deps): bump the patternfly group with 1 update Bumps the patternfly group with 1 update: [@patternfly/react-core](https://github.com/patternfly/patternfly-react). Updates `@patternfly/react-core` from 5.2.1 to 5.2.2 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.1...@patternfly/react-core@5.2.2) --- updated-dependencies: - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2693977..1051788 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@patternfly/patternfly": "5.2.1", - "@patternfly/react-core": "5.2.1", + "@patternfly/react-core": "5.2.2", "@patternfly/react-icons": "5.2.1", "@patternfly/react-styles": "5.2.1", "react": "18.2.0", From a6ef3a1643014cf9af30c183a67ac0d3d5403ab7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 13 Mar 2024 07:21:40 +0100 Subject: [PATCH 576/942] lint: Ignore test functions in vulture These aren't unused, but discovered/enumerated by `unittest` or `pytest`. --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4e8b03f..67c7a58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,8 @@ mark-parentheses = false [tool.ruff.lint.isort] known-first-party = ["cockpit"] + +[tool.vulture] +ignore_names = [ + "test[A-Z0-9]*", +] From e69dcaa75f8f27955a793b91bed423e45cf7a01e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:56:04 +0000 Subject: [PATCH 577/942] build(deps-dev): bump the esbuild group with 1 update Bumps the esbuild group with 1 update: [esbuild-sass-plugin](https://github.com/glromeo/esbuild-sass-plugin). Updates `esbuild-sass-plugin` from 3.1.0 to 3.2.0 - [Release notes](https://github.com/glromeo/esbuild-sass-plugin/releases) - [Commits](https://github.com/glromeo/esbuild-sass-plugin/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: esbuild-sass-plugin dependency-type: direct:development update-type: version-update:semver-minor dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1051788..7b1bfbf 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "esbuild": "0.20.1", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", - "esbuild-sass-plugin": "3.1.0", + "esbuild-sass-plugin": "3.2.0", "esbuild-wasm": "0.20.1", "eslint": "8.57.0", "eslint-config-standard": "17.1.0", From c7c00f7211ca864634ea12f49981e7ac1b5c31bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:24:45 +0000 Subject: [PATCH 578/942] build(deps-dev): bump sass from 1.71.1 to 1.72.0 Bumps [sass](https://github.com/sass/dart-sass) from 1.71.1 to 1.72.0. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.71.1...1.72.0) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b1bfbf..e0d8688 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.1", - "sass": "1.71.1", + "sass": "1.72.0", "stylelint": "16.2.1", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.0.0", From 8ce48d52c9163ae348037be34230b340e97cb5b8 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 14 Mar 2024 02:13:03 +0000 Subject: [PATCH 579/942] Makefile: Update Cockpit lib to 4f224656598382176c010352bdb28911 Closes #811 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f222bc2..ee4ee5b 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 50fc1b962eeefefc9926ece8e4891477a88a4454 # 312 + 22 commits +COCKPIT_REPO_COMMIT = 4f224656598382176c010352bdb28911b8fcc6aa # 313 + 5 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From a05671f903fd8a9e68df1508ca20122af86f6444 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Mar 2024 21:48:59 +0000 Subject: [PATCH 580/942] build(deps-dev): bump the esbuild group with 2 updates Bumps the esbuild group with 2 updates: [esbuild](https://github.com/evanw/esbuild) and [esbuild-wasm](https://github.com/evanw/esbuild). Updates `esbuild` from 0.20.1 to 0.20.2 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.20.1...v0.20.2) Updates `esbuild-wasm` from 0.20.1 to 0.20.2 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.20.1...v0.20.2) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild - dependency-name: esbuild-wasm dependency-type: direct:development update-type: version-update:semver-patch dependency-group: esbuild ... Signed-off-by: dependabot[bot] --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e0d8688..524e828 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "devDependencies": { "argparse": "2.0.1", "chrome-remote-interface": "0.33.0", - "esbuild": "0.20.1", + "esbuild": "0.20.2", "esbuild-plugin-copy": "2.1.1", "esbuild-plugin-replace": "1.4.0", "esbuild-sass-plugin": "3.2.0", - "esbuild-wasm": "0.20.1", + "esbuild-wasm": "0.20.2", "eslint": "8.57.0", "eslint-config-standard": "17.1.0", "eslint-config-standard-jsx": "11.0.0", From e1127949362d95e381d834bafcd036a91c2932b9 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Thu, 14 Mar 2024 17:59:51 +0100 Subject: [PATCH 581/942] .cockpit-ci: pin tasks container version --- .cockpit-ci/container | 1 + 1 file changed, 1 insertion(+) create mode 100644 .cockpit-ci/container diff --git a/.cockpit-ci/container b/.cockpit-ci/container new file mode 100644 index 0000000..5748dfd --- /dev/null +++ b/.cockpit-ci/container @@ -0,0 +1 @@ +quay.io/cockpit/tasks:2024-03-15 From 2e8b932ece7f6167728b95c67676176c03398d2f Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Thu, 14 Mar 2024 17:54:22 +0100 Subject: [PATCH 582/942] test/browser: run tests inside the tasks container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This simplifies the "outside" setup quite a bit and gives us the same tasks container that test runs on the Cockpit CI run under. This change also implicitly changes the test browser to chromium (which is no longer an issue — we just use it from the tasks container). --- test/browser/browser.sh | 51 ++++++++++++++-------------------------- test/browser/main.fmf | 7 +----- test/browser/run-test.sh | 15 ++++++++---- test/vm.install | 3 ++- 4 files changed, 30 insertions(+), 46 deletions(-) mode change 100755 => 100644 test/browser/run-test.sh diff --git a/test/browser/browser.sh b/test/browser/browser.sh index 1534d93..9db41ab 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -1,25 +1,14 @@ -#!/bin/sh set -eux -export TEST_BROWSER=${TEST_BROWSER:-firefox} - -TESTS="$(realpath $(dirname "$0"))" -export SOURCE="$(realpath $TESTS/../..)" -export LOGS="${TMT_TEST_DATA:-$(pwd)/logs}" -mkdir -p "$LOGS" -chmod a+w "$LOGS" +cd "${0%/*}/../.." # HACK: https://bugzilla.redhat.com/show_bug.cgi?id=2033020 dnf update -y pam || true -# install firefox (available everywhere in Fedora and RHEL) -# we don't need the H.264 codec, and it is sometimes not available (rhbz#2005760) -dnf install --disablerepo=fedora-cisco-openh264 -y --setopt=install_weak_deps=False firefox - -# nodejs 10 is too old for current Cockpit test API -if grep -q platform:el8 /etc/os-release; then - dnf module switch-to -y nodejs:16 -fi +# allow test to set up things on the machine +mkdir -p /root/.ssh +curl https://raw.githubusercontent.com/cockpit-project/bots/main/machine/identity.pub >> /root/.ssh/authorized_keys +chmod 600 /root/.ssh/authorized_keys # create user account for logging in if ! id admin 2>/dev/null; then @@ -33,25 +22,19 @@ echo root:foobar | chpasswd # avoid sudo lecture during tests su -c 'echo foobar | sudo --stdin whoami' - admin -# create user account for running the test -if ! id runtest 2>/dev/null; then - useradd -c 'Test runner' runtest - # allow test to set up things on the machine - mkdir -p /root/.ssh - curl https://raw.githubusercontent.com/cockpit-project/bots/main/machine/identity.pub >> /root/.ssh/authorized_keys - chmod 600 /root/.ssh/authorized_keys -fi -chown -R runtest "$SOURCE" - # disable core dumps, we rather investigate them upstream where test VMs are accessible echo core > /proc/sys/kernel/core_pattern -systemctl enable --now cockpit.socket +sh test/vm.install -# Run tests as unprivileged user -# once we drop support for RHEL 8, use this: -# runuser -u runtest --whitelist-environment=TEST_BROWSER,TEST_ALLOW_JOURNAL_MESSAGES,TEST_AUDIT_NO_SELINUX,SOURCE,LOGS $TESTS/run-test.sh -runuser -u runtest --preserve-environment env USER=runtest HOME=$(getent passwd runtest | cut -f6 -d:) $TESTS/run-test.sh - -RC=$(cat $LOGS/exitcode) -exit ${RC:-1} +# Run tests in the cockpit tasks container, as unprivileged user +CONTAINER="$(cat .cockpit-ci/container)" +exec podman \ + run \ + --rm \ + --shm-size=1024m \ + --security-opt=label=disable \ + --volume="${TMT_TEST_DATA}":/logs:rw,U --env=LOGS=/logs \ + --volume="$(pwd)":/source:rw,U --env=SOURCE=/source \ + "${CONTAINER}" \ + sh /source/test/browser/run-test.sh diff --git a/test/browser/main.fmf b/test/browser/main.fmf index d2dddd6..1e575ab 100644 --- a/test/browser/main.fmf +++ b/test/browser/main.fmf @@ -2,14 +2,9 @@ summary: Run browser integration tests on the host require: - cockpit-starter-kit + - podman - cockpit-ws - cockpit-system - - bzip2 - - git-core - glibc-langpack-de - - libvirt-python3 - - make - - npm - - python3 test: ./browser.sh duration: 60m diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh old mode 100755 new mode 100644 index bec6e46..c67193e --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -1,8 +1,8 @@ -#!/bin/sh set -eux +cd "${SOURCE}" + # tests need cockpit's bots/ libraries and test infrastructure -cd $SOURCE git init rm -f bots # common local case: existing bots symlink make bots test/common @@ -33,10 +33,15 @@ EXCLUDES="" echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}" echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}" +GATEWAY="$(python3 -c 'import socket; print(socket.gethostbyname("_gateway"))')" RC=0 -test/common/run-tests --nondestructive --machine 127.0.0.1:22 --browser 127.0.0.1:9090 $EXCLUDES || RC=$? +./test/common/run-tests \ + --nondestructive \ + --machine "${GATEWAY}":22 \ + --browser "${GATEWAY}":9090 \ + $EXCLUDES \ +|| RC=$? echo $RC > "$LOGS/exitcode" cp --verbose Test* "$LOGS" || true -# deliver test result via exitcode file -exit 0 +exit $RC diff --git a/test/vm.install b/test/vm.install index 7f3d134..7df33c4 100644 --- a/test/vm.install +++ b/test/vm.install @@ -1,9 +1,10 @@ #!/bin/sh # image-customize script to prepare a bots VM for testing this application # The application package will be installed separately -set -eu +set -eux # don't force https:// (self-signed cert) +mkdir -p /etc/cockpit printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf if type firewall-cmd >/dev/null 2>&1; then From bef2163e9b00e5973c6da746f5394b425b8513c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 22:03:01 +0000 Subject: [PATCH 583/942] build(deps-dev): bump the eslint group with 1 update Bumps the eslint group with 1 update: [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react). Updates `eslint-plugin-react` from 7.34.0 to 7.34.1 - [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases) - [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.34.1/CHANGELOG.md) - [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.34.0...v7.34.1) --- updated-dependencies: - dependency-name: eslint-plugin-react dependency-type: direct:development update-type: version-update:semver-patch dependency-group: eslint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 524e828..833446d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "eslint-plugin-import": "2.29.1", "eslint-plugin-node": "11.1.0", "eslint-plugin-promise": "6.1.1", - "eslint-plugin-react": "7.34.0", + "eslint-plugin-react": "7.34.1", "eslint-plugin-react-hooks": "4.6.0", "gettext-parser": "8.0.0", "htmlparser": "1.7.7", From 84608a1680211e1eacd9521dde9b7374bb75d6a7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 16 Mar 2024 09:13:00 +0100 Subject: [PATCH 584/942] fmf: Go back to running the tests with Firefox That brings back Firefox coverage, and also avoids OOM errors with Chromium. This was already applied to our other projects. --- test/browser/run-test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index c67193e..d50becb 100644 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -27,6 +27,9 @@ if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then TEST_OS="${TEST_OS}-stream" fi +# Chromium sometimes gets OOM killed on testing farm +export TEST_BROWSER=firefox + EXCLUDES="" # make it easy to check in logs From 7b1315a3ca762e26f0295f5bb217b71250820930 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 16 Mar 2024 09:14:30 +0100 Subject: [PATCH 585/942] test: More precise firewall configuration Only enable cockpit in the firewall if it is actually running, not merely installed. --- test/vm.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vm.install b/test/vm.install index 7df33c4..84f26f7 100644 --- a/test/vm.install +++ b/test/vm.install @@ -7,7 +7,7 @@ set -eux mkdir -p /etc/cockpit printf "[WebService]\\nAllowUnencrypted=true\\n" > /etc/cockpit/cockpit.conf -if type firewall-cmd >/dev/null 2>&1; then +if systemctl is-active -q firewalld.service; then firewall-cmd --add-service=cockpit --permanent fi systemctl enable cockpit.socket From ee5e9bd243d2274e230583a4562e422dfae08c38 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Sat, 16 Mar 2024 10:51:04 +0100 Subject: [PATCH 586/942] fmf: Use correct os-release With commit 2e8b932e, run-test.sh now runs inside the cockpit/tasks container, and its os-release is irrelevant. Read the host's os-release instead to compute a correct `$TEST_OS`. --- test/browser/browser.sh | 1 + test/browser/run-test.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index 9db41ab..db0d7ba 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -36,5 +36,6 @@ exec podman \ --security-opt=label=disable \ --volume="${TMT_TEST_DATA}":/logs:rw,U --env=LOGS=/logs \ --volume="$(pwd)":/source:rw,U --env=SOURCE=/source \ + --volume=/usr/lib/os-release:/run/host/usr/lib/os-release:ro \ "${CONTAINER}" \ sh /source/test/browser/run-test.sh diff --git a/test/browser/run-test.sh b/test/browser/run-test.sh index d50becb..e1b5fa0 100644 --- a/test/browser/run-test.sh +++ b/test/browser/run-test.sh @@ -20,7 +20,7 @@ fi # disable detection of affected tests; testing takes too long as there is no parallelization mv .git dot-git -. /etc/os-release +. /run/host/usr/lib/os-release export TEST_OS="${ID}-${VERSION_ID/./-}" if [ "${TEST_OS#centos-}" != "$TEST_OS" ]; then From 58df999d8240aca52f6aaa0454e67319d7a04313 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Mon, 18 Mar 2024 11:34:35 +0100 Subject: [PATCH 587/942] misc: move to new tasks container location --- .cirrus.yml | 2 +- .github/workflows/release.yml.disabled | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index e49a77b..128f8f9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,7 +2,7 @@ container: # official cockpit CI container, with cockpit related build and test dependencies # if you want to use your own, see the documentation about required packages: # https://github.com/cockpit-project/cockpit/blob/main/HACKING.md#getting-the-development-dependencies - image: quay.io/cockpit/tasks + image: ghcr.io/cockpit-project/tasks kvm: true # increase this if you have many tests that benefit from parallelism cpu: 1 diff --git a/.github/workflows/release.yml.disabled b/.github/workflows/release.yml.disabled index 20609b8..161b184 100644 --- a/.github/workflows/release.yml.disabled +++ b/.github/workflows/release.yml.disabled @@ -11,7 +11,7 @@ jobs: source: runs-on: ubuntu-latest container: - image: quay.io/cockpit/tasks:latest + image: ghcr.io/cockpit-project/tasks:latest options: --user root permissions: # create GitHub release From bd2bc6a9117d84a73d09f56c849074a52ac52d20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 21:30:58 +0000 Subject: [PATCH 588/942] build(deps): bump the patternfly group with 1 update Bumps the patternfly group with 1 update: [@patternfly/react-core](https://github.com/patternfly/patternfly-react). Updates `@patternfly/react-core` from 5.2.2 to 5.2.3 - [Release notes](https://github.com/patternfly/patternfly-react/releases) - [Commits](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.2...@patternfly/react-core@5.2.3) --- updated-dependencies: - dependency-name: "@patternfly/react-core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: patternfly ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 833446d..0c5dd32 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ }, "dependencies": { "@patternfly/patternfly": "5.2.1", - "@patternfly/react-core": "5.2.2", + "@patternfly/react-core": "5.2.3", "@patternfly/react-icons": "5.2.1", "@patternfly/react-styles": "5.2.1", "react": "18.2.0", From 3c734e03ac3b52a82ffe2023e6a64fcc30519503 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Tue, 19 Mar 2024 10:37:34 +0100 Subject: [PATCH 589/942] workflows: add tasks-container-update workflow This workflow tries to update our cockpit CI container on a weekly interval. --- .github/workflows/tasks-container-update.yml | 34 ++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tasks-container-update.yml diff --git a/.github/workflows/tasks-container-update.yml b/.github/workflows/tasks-container-update.yml new file mode 100644 index 0000000..d0498bd --- /dev/null +++ b/.github/workflows/tasks-container-update.yml @@ -0,0 +1,34 @@ +name: tasks-container-update +on: + schedule: + - cron: '0 2 * * 4' + # can be run manually on https://github.com/cockpit-project/starter-kit/actions + workflow_dispatch: +jobs: + tasks-container-update: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + statuses: write + container: + image: quay.io/cockpit/tasks + options: --user root + steps: + - name: Set up configuration and secrets + run: | + printf '[user]\n\tname = Cockpit Project\n\temail=cockpituous@gmail.com\n' > ~/.gitconfig + mkdir -p ~/.config + echo '${{ secrets.GITHUB_TOKEN }}' > ~/.config/github-token + + - name: Clone repository + uses: actions/checkout@v4 + + # https://github.blog/2022-04-12-git-security-vulnerability-announced/ + - name: Pacify git's permission check + run: git config --global --add safe.directory /__w/starter-kit/starter-kit + + - name: Run tasks-container-update + run: | + make bots + bots/tasks-container-update From fed47aff8959aa34c46fbba6ba1c9a8f81313f68 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 21 Mar 2024 02:15:15 +0000 Subject: [PATCH 590/942] Makefile: Update Cockpit lib to 5ff98a2117e2815f7560e31d67bb1be6 Closes #819 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ee4ee5b..69c9fe8 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 4f224656598382176c010352bdb28911b8fcc6aa # 313 + 5 commits +COCKPIT_REPO_COMMIT = 5ff98a2117e2815f7560e31d67bb1be69ed2e33e # 313 + 29 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 6cb34f6fe3f1bdbe3b521c0a52b27a1a87bd992c Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 21 Mar 2024 02:20:40 +0000 Subject: [PATCH 591/942] .cockpit-ci: Update CI container to :2024-03-18 Closes #820 --- .cockpit-ci/container | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cockpit-ci/container b/.cockpit-ci/container index 5748dfd..3bd05f6 100644 --- a/.cockpit-ci/container +++ b/.cockpit-ci/container @@ -1 +1 @@ -quay.io/cockpit/tasks:2024-03-15 +ghcr.io/cockpit-project/tasks:2024-03-18 From 4218c056adc11828ab11b4393c3899d77142baed Mon Sep 17 00:00:00 2001 From: Miika Alikirri Date: Fri, 22 Mar 2024 17:15:02 +0200 Subject: [PATCH 592/942] spec: Support SUSE specic BuildRequires --- packaging/cockpit-starter-kit.spec.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/cockpit-starter-kit.spec.in b/packaging/cockpit-starter-kit.spec.in index 1235526..2295055 100644 --- a/packaging/cockpit-starter-kit.spec.in +++ b/packaging/cockpit-starter-kit.spec.in @@ -7,10 +7,17 @@ License: LGPL-2.1-or-later Source0: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/cockpit-project/starter-kit/releases/download/%{version}/%{name}-node-%{version}.tar.xz BuildArch: noarch +%if ! 0%{?suse_version} ExclusiveArch: %{nodejs_arches} noarch +%endif BuildRequires: nodejs BuildRequires: make +%if 0%{?suse_version} +# Suse's package has a different name +BuildRequires: appstream-glib +%else BuildRequires: libappstream-glib +%endif BuildRequires: gettext %if 0%{?rhel} && 0%{?rhel} <= 8 BuildRequires: libappstream-glib-devel From f41cd549994e0a51cf065dde50bcacaf3f89ffbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:51:41 +0000 Subject: [PATCH 593/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint](https://github.com/stylelint/stylelint). Updates `stylelint` from 16.2.1 to 16.3.0 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.2.1...16.3.0) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-minor dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c5dd32..ce8caeb 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "jed": "1.1.1", "qunit": "2.20.1", "sass": "1.72.0", - "stylelint": "16.2.1", + "stylelint": "16.3.0", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.0.0", "stylelint-formatter-pretty": "4.0.0" From bd082383cf8d6a34f74fda7f19ca11d2b295721d Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 26 Mar 2024 09:53:07 +0100 Subject: [PATCH 594/942] workflows: Move tasks-container-update to Sunday night We previously ran tasks-container-update and cockpit-lib-update at the same time, which sometimes collides. Move it to the night between Sunday and Monday instead, so that we have the updates ready for us to inspect when we start our week. --- .github/workflows/tasks-container-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tasks-container-update.yml b/.github/workflows/tasks-container-update.yml index d0498bd..059a4e2 100644 --- a/.github/workflows/tasks-container-update.yml +++ b/.github/workflows/tasks-container-update.yml @@ -1,7 +1,7 @@ name: tasks-container-update on: schedule: - - cron: '0 2 * * 4' + - cron: '0 2 * * 1' # can be run manually on https://github.com/cockpit-project/starter-kit/actions workflow_dispatch: jobs: From 488ffa663768e0619eaadb1c90606492023faabb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 21:42:26 +0000 Subject: [PATCH 595/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint](https://github.com/stylelint/stylelint). Updates `stylelint` from 16.3.0 to 16.3.1 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.3.0...16.3.1) --- updated-dependencies: - dependency-name: stylelint dependency-type: direct:development update-type: version-update:semver-patch dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce8caeb..18e042e 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "jed": "1.1.1", "qunit": "2.20.1", "sass": "1.72.0", - "stylelint": "16.3.0", + "stylelint": "16.3.1", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.0.0", "stylelint-formatter-pretty": "4.0.0" From ef66b4c697d693c5f1df6dc4fcd353d1679b1207 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 28 Mar 2024 02:17:20 +0000 Subject: [PATCH 596/942] Makefile: Update Cockpit lib to f2cc9e1a360e69dc55b8f9f26f367eb4 Closes #827 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 69c9fe8..03f4ec5 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 5ff98a2117e2815f7560e31d67bb1be69ed2e33e # 313 + 29 commits +COCKPIT_REPO_COMMIT = f2cc9e1a360e69dc55b8f9f26f367eb4c17ecb5b # 313 + 60 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From b0368f13d7bf3039f528be6ddaae1414f7e0d739 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 2 Apr 2024 15:34:42 +0200 Subject: [PATCH 597/942] workflows: Run tasks-container-update.yml in quay.io/cockpit/tasks The quay.io location is obsolete, the image moved to GitHub registry. --- .github/workflows/tasks-container-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tasks-container-update.yml b/.github/workflows/tasks-container-update.yml index 059a4e2..f572569 100644 --- a/.github/workflows/tasks-container-update.yml +++ b/.github/workflows/tasks-container-update.yml @@ -12,7 +12,7 @@ jobs: pull-requests: write statuses: write container: - image: quay.io/cockpit/tasks + image: ghcr.io/cockpit-project/tasks options: --user root steps: - name: Set up configuration and secrets From 4286f7352e320571f00844bf0f6c7e3e10e747f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 21:04:02 +0000 Subject: [PATCH 598/942] build(deps-dev): bump the stylelint group with 1 update Bumps the stylelint group with 1 update: [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss). Updates `stylelint-config-standard-scss` from 13.0.0 to 13.1.0 - [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases) - [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v13.0.0...v13.1.0) --- updated-dependencies: - dependency-name: stylelint-config-standard-scss dependency-type: direct:development update-type: version-update:semver-minor dependency-group: stylelint ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 18e042e..2a51126 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "sass": "1.72.0", "stylelint": "16.3.1", "stylelint-config-standard": "36.0.0", - "stylelint-config-standard-scss": "13.0.0", + "stylelint-config-standard-scss": "13.1.0", "stylelint-formatter-pretty": "4.0.0" }, "dependencies": { From 64cb49b1e4a709a50d2d13d5c2d91033482ef9ca Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Wed, 3 Apr 2024 14:26:45 +0300 Subject: [PATCH 599/942] tmt: Pass TEST_* environment into test container So that things like TEST_AUDIT_NO_SELINUX can be set from the outside. --- test/browser/browser.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/browser/browser.sh b/test/browser/browser.sh index db0d7ba..bed75cf 100755 --- a/test/browser/browser.sh +++ b/test/browser/browser.sh @@ -34,6 +34,7 @@ exec podman \ --rm \ --shm-size=1024m \ --security-opt=label=disable \ + --env='TEST_*' \ --volume="${TMT_TEST_DATA}":/logs:rw,U --env=LOGS=/logs \ --volume="$(pwd)":/source:rw,U --env=SOURCE=/source \ --volume=/usr/lib/os-release:/run/host/usr/lib/os-release:ro \ From 1e4ef630b805ff2567a73feddf8fedc0a5b2e848 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 4 Apr 2024 02:16:31 +0000 Subject: [PATCH 600/942] Makefile: Update Cockpit lib to 4c4356e4ddbd9e716b5f364a5c4fed74 Closes #831 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 03f4ec5..e230307 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = f2cc9e1a360e69dc55b8f9f26f367eb4c17ecb5b # 313 + 60 commits +COCKPIT_REPO_COMMIT = 4c4356e4ddbd9e716b5f364a5c4fed748589595a # 314 + 7 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 91ce204039c22ff1e9c3e8cc6c48253a4475084f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 20:41:07 +0000 Subject: [PATCH 601/942] build(deps-dev): bump sass from 1.72.0 to 1.74.1 Bumps [sass](https://github.com/sass/dart-sass) from 1.72.0 to 1.74.1. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.72.0...1.74.1) --- updated-dependencies: - dependency-name: sass dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a51126..6ed78c5 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "htmlparser": "1.7.7", "jed": "1.1.1", "qunit": "2.20.1", - "sass": "1.72.0", + "sass": "1.74.1", "stylelint": "16.3.1", "stylelint-config-standard": "36.0.0", "stylelint-config-standard-scss": "13.1.0", From f1640e01cf9097a88584716b2fe3523af49d8401 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Mon, 8 Apr 2024 02:19:28 +0000 Subject: [PATCH 602/942] cockpit-ci: Update container to 2024-04-06 Closes #833 --- .cockpit-ci/container | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cockpit-ci/container b/.cockpit-ci/container index 3bd05f6..1991315 100644 --- a/.cockpit-ci/container +++ b/.cockpit-ci/container @@ -1 +1 @@ -ghcr.io/cockpit-project/tasks:2024-03-18 +ghcr.io/cockpit-project/tasks:2024-04-06 From 391301e19ade7af3423543b4fa893a8631af74d2 Mon Sep 17 00:00:00 2001 From: Cockpit Project Date: Thu, 11 Apr 2024 02:17:25 +0000 Subject: [PATCH 603/942] Makefile: Update Cockpit lib to 3ec539a4e0f78dab6ef77f88aa717d4d Closes #835 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e230307..3e35602 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 4c4356e4ddbd9e716b5f364a5c4fed748589595a # 314 + 7 commits +COCKPIT_REPO_COMMIT = 3ec539a4e0f78dab6ef77f88aa717d4d7a448fbd # 315 + 2 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' From 095edc5f7e5236c53d0c0fc002aadf72ea8e4229 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 11 Apr 2024 10:59:52 +0200 Subject: [PATCH 604/942] test: More precise dropdown selector Cockpit 315 changed the session menu from the deprecated PF Dropdown to the new one, via cockpit-components-dropdown. `DropdownItem` now renders the class name into *both* the `
  • ` and the `