SHA256
1
0
forked from cockpit/cockpit

- make package compatible with OBS version (bsc#1197224):

* move branding images to distribution-logos-SLE package
  * re-add dependency on distribution-logos
  * remove branding patch and assets (suse-microos-branding.patch,
    suse-microos-branding.tar.gz); moved to GitHub fork
  * remove local __python3 macro
  * apply SLE specific patches only on SLE

- add hide-pcp.patch to hide references to PCP (Performance
  Co-Pilot) and metric collection (bsc#1195943). The cockpit-pcp
  package is not included in SLE Micro 5.2 base and these parts
  require it.

- update to new LTS version from openSUSE:Factory
- port remove-pwscore.patch
  * remove dependency on pwscore (bsc#1182924)
  * remove password strenth indicator
- port branding changes as suse-microos "theme"
  * remove suse_cockpit_assets.tar.gz
  * add suse-microos-branding.tar.gz
  * remove branding_tests.patch
  * add suse-microos-branding.patch
- remove files not needed to build this version anymore
  * webpack-warnings-are-not-errors.patch
  * github_package.patch
  * nodejs_output_helper.bash
- remove cockpit.permissions workaround (bsc#1169614)

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:cockpit/cockpit?expand=0&rev=85
This commit is contained in:
Adam Majer 2022-03-18 13:56:13 +00:00 committed by Git OBS Bridge
parent b47deff511
commit aa8a3581a9
4 changed files with 153 additions and 1 deletions

View File

@ -1,9 +1,46 @@
-------------------------------------------------------------------
Tue Mar 15 13:42:38 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- make package compatible with OBS version (bsc#1197224):
* move branding images to distribution-logos-SLE package
* re-add dependency on distribution-logos
* remove branding patch and assets (suse-microos-branding.patch,
suse-microos-branding.tar.gz); moved to GitHub fork
* remove local __python3 macro
* apply SLE specific patches only on SLE
-------------------------------------------------------------------
Mon Feb 28 10:41:31 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- add hide-pcp.patch to hide references to PCP (Performance
Co-Pilot) and metric collection (bsc#1195943). The cockpit-pcp
package is not included in SLE Micro 5.2 base and these parts
require it.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 31 15:30:24 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com> Mon Jan 31 15:30:24 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- change self-signed cert group from cockpit-wsintance to - change self-signed cert group from cockpit-wsintance to
cockpit-ws on upgrade cockpit-ws on upgrade
-------------------------------------------------------------------
Mon Jan 31 08:26:46 UTC 2022 - Jacek Tomasiak <jtomasiak@suse.com>
- update to new LTS version from openSUSE:Factory
- port remove-pwscore.patch
* remove dependency on pwscore (bsc#1182924)
* remove password strenth indicator
- port branding changes as suse-microos "theme"
* remove suse_cockpit_assets.tar.gz
* add suse-microos-branding.tar.gz
* remove branding_tests.patch
* add suse-microos-branding.patch
- remove files not needed to build this version anymore
* webpack-warnings-are-not-errors.patch
* github_package.patch
* nodejs_output_helper.bash
- remove cockpit.permissions workaround (bsc#1169614)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jan 28 14:54:44 UTC 2022 - Adam Majer <adam.majer@suse.de> Fri Jan 28 14:54:44 UTC 2022 - Adam Majer <adam.majer@suse.de>

View File

@ -65,6 +65,9 @@ Source97: node_modules.spec.inc
%include %{_sourcedir}/node_modules.spec.inc %include %{_sourcedir}/node_modules.spec.inc
Patch0: cockpit-redhatfont.diff Patch0: cockpit-redhatfont.diff
Patch1: 0001-selinux-allow-login-to-read-motd-file.patch Patch1: 0001-selinux-allow-login-to-read-motd-file.patch
# SLE Micro specific patches
Patch100: remove-pwscore.patch
Patch101: hide-pcp.patch
# in RHEL 8 the source package is duplicated: cockpit (building basic packages like cockpit-{bridge,system}) # in RHEL 8 the source package is duplicated: cockpit (building basic packages like cockpit-{bridge,system})
# and cockpit-appstream (building optional packages like cockpit-{pcp}) # and cockpit-appstream (building optional packages like cockpit-{pcp})
@ -171,7 +174,14 @@ Recommends: subscription-manager-cockpit
%prep %prep
%setup -q -n cockpit-%{version} %setup -q -n cockpit-%{version}
%autopatch -p1 %patch0 -p1
%patch1 -p1
%if 0%{?sle_version}
%patch100 -p1
%patch101 -p1
%endif
cp %SOURCE1 tools/cockpit.pam cp %SOURCE1 tools/cockpit.pam
# #
local-npm-registry %{_sourcedir} install --also=dev --legacy-peer-deps local-npm-registry %{_sourcedir} install --also=dev --legacy-peer-deps
@ -443,7 +453,9 @@ Requires: cockpit-bridge >= %{version}-%{release}
Requires: shadow-utils Requires: shadow-utils
%endif %endif
Requires: grep Requires: grep
%if !0%{?sle_version}
Requires: /usr/bin/pwscore Requires: /usr/bin/pwscore
%endif
Requires: /usr/bin/date Requires: /usr/bin/date
Provides: cockpit-shell = %{version}-%{release} Provides: cockpit-shell = %{version}-%{release}
Provides: cockpit-systemd = %{version}-%{release} Provides: cockpit-systemd = %{version}-%{release}
@ -494,6 +506,8 @@ Recommends: system-logos
Suggests: sssd-dbus Suggests: sssd-dbus
%if 0%{?suse_version} %if 0%{?suse_version}
Requires(pre): permissions Requires(pre): permissions
Requires: distribution-logos
Requires: wallpaper-branding
%endif %endif
%description ws %description ws

35
hide-pcp.patch Normal file
View File

@ -0,0 +1,35 @@
diff --git a/pkg/metrics/metrics.jsx b/pkg/metrics/metrics.jsx
index 188aad7..a04b094 100644
--- a/pkg/metrics/metrics.jsx
+++ b/pkg/metrics/metrics.jsx
@@ -995,6 +995,7 @@ const PCPConfig = ({ buttonVariant, firewalldRequest, needsLogout, setNeedsLogou
return (
<>
<Button variant={buttonVariant} icon={<CogIcon />}
+ className="pf-u-display-none"
isDisabled={ invalidService(s_pmlogger) || invalidService(s_pmproxy) || invalidService(s_redis) || invalidService(s_redis_server) }
onClick={ () => {
setDialogLoggerValue(runningService(s_pmlogger));
@@ -1429,7 +1430,7 @@ export const Application = () => {
<PageSection>
<CurrentMetrics />
</PageSection>
- <PageSection>
+ <PageSection className="pf-u-display-none">
<MetricsHistory firewalldRequest={setFirewalldRequest}
needsLogout={needsLogout}
setNeedsLogout={setNeedsLogout} />
</PageSection>
diff --git a/pkg/metrics/metrics.scss b/pkg/metrics/metrics.scss
index 025a30b..b4763c2 100644
--- a/pkg/metrics/metrics.scss
+++ b/pkg/metrics/metrics.scss
@@ -2,6 +2,7 @@
@import "../lib/ct-card.scss";
@import "@patternfly/patternfly/components/Table/table.scss";
@import "@patternfly/patternfly/components/Toolbar/toolbar.scss";
+@import "@patternfly/patternfly/utilities/Display/display.scss";
#app {
section.pf-c-page__main-breadcrumb {

66
remove-pwscore.patch Normal file
View File

@ -0,0 +1,66 @@
Remove dependency on /usr/bin/pwscore that is part of libpwquality-tools
but we don't ship it in SLES
diff --git a/pkg/lib/cockpit-components-password.jsx b/pkg/lib/cockpit-components-password.jsx
index b97aab9..2241a75 100644
--- a/pkg/lib/cockpit-components-password.jsx
+++ b/pkg/lib/cockpit-components-password.jsx
@@ -18,7 +18,7 @@
*/
import cockpit from 'cockpit';
import React from 'react';
-import { FormGroup, Popover, Progress, ProgressSize, ProgressMeasureLocation, TextInput } from '@patternfly/react-core';
+import { FormGroup, Popover, TextInput } from '@patternfly/react-core';
import { HelpIcon } from '@patternfly/react-icons';
import './cockpit-components-password.scss';
@@ -27,6 +27,7 @@ const _ = cockpit.gettext;
export function password_quality(password, force) {
return new Promise((resolve, reject) => {
+ /*
cockpit.spawn('/usr/bin/pwscore', { err: "message" })
.input(password)
.done(function(content) {
@@ -42,6 +43,8 @@ export function password_quality(password, force) {
else
resolve({ value: 0 });
});
+ */
+ resolve({ message: _("pwscore not checked") });
});
}
@@ -53,6 +56,7 @@ export const PasswordFormFields = ({
error_password, error_password_confirm,
idPrefix, change
}) => {
+ /*
let variant;
if (password_strength === "")
variant = "default";
@@ -62,6 +66,7 @@ export const PasswordFormFields = ({
variant = "warning";
else
variant = "danger";
+ */
return (
<>
@@ -79,16 +84,7 @@ export const PasswordFormFields = ({
fieldId={idPrefix + "-pw1"}>
<TextInput className="check-passwords" type="password" id={idPrefix + "-pw1"}
value={password} onChange={value => change("password", value)} />
- <div>
- <Progress id={idPrefix + "-meter"}
- className={"ct-password-strength-meter " + variant}
- title={_("password quality")}
- size={ProgressSize.sm}
- measureLocation={ProgressMeasureLocation.none}
- variant={variant}
- value={Number.isInteger(password_strength) ? password_strength : 0} />
- <div id={idPrefix + "-password-meter-message"} className="pf-c-form__helper-text" aria-live="polite">{password_message}</div>
- </div>
+ <div id={idPrefix + "-password-meter-message"} className="pf-c-form__helper-text" aria-live="polite">{password_message}</div>
</FormGroup>
{password_confirm_label && <FormGroup label={password_confirm_label}