Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package cockpit-client-launcher for
openSUSE:Factory checked in at 2026-05-17 18:56:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cockpit-client-launcher (Old)
and /work/SRC/openSUSE:Factory/.cockpit-client-launcher.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cockpit-client-launcher"
Sun May 17 18:56:55 2026 rev:2 rq:1353571 version:361
Changes:
--------
---
/work/SRC/openSUSE:Factory/cockpit-client-launcher/cockpit-client-launcher.changes
2026-03-06 18:19:13.969749469 +0100
+++
/work/SRC/openSUSE:Factory/.cockpit-client-launcher.new.1966/cockpit-client-launcher.changes
2026-05-17 18:57:18.581489919 +0200
@@ -1,0 +2,9 @@
+Sun Apr 26 19:09:44 UTC 2026 - Bjørn Lie <[email protected]>
+
+- Update to version 361 (boo#1262600):
+ + Replace libwebkit2gtk3 and typelib-1_0-WebKit2-4_1 with
+ libwebkit2gtk4 and typelib-1_0-WebKit-6_0 Requires following
+ cockpits port to gtk4.
+ + Add typelib-1_0-Adw-1 Requires, new run-time dependency.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cockpit-client-launcher.spec ++++++
--- /var/tmp/diff_new_pack.otJief/_old 2026-05-17 18:57:19.665534145 +0200
+++ /var/tmp/diff_new_pack.otJief/_new 2026-05-17 18:57:19.669534309 +0200
@@ -15,7 +15,7 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: cockpit-client-launcher
-Version: 356
+Version: 361
Release: 0
Summary: Flatpak-free launcher for the Cockpit GTK client
License: LGPL-2.1-or-later
@@ -26,9 +26,9 @@
BuildRequires: hicolor-icon-theme
Requires: cockpit-ws
Requires: cockpit-system
-# Not so sure about this particular one
-Requires: libwebkit2gtk3
-Requires: typelib-1_0-WebKit2-4_1
+Requires: libwebkit2gtk4
+Requires: typelib-1_0-WebKit-6_0
+Requires: typelib-1_0-Adw-1
Requires: zenity
Recommends: cockpit-ws-selinux
BuildArch: noarch
++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.otJief/_old 2026-05-17 18:57:19.709535941 +0200
+++ /var/tmp/diff_new_pack.otJief/_new 2026-05-17 18:57:19.713536104 +0200
@@ -1,6 +1,6 @@
-mtime: 1772753612
-commit: 33d9a5476ffaaaa4495ff5c4c87915afc474bdc898af91d9cfad7c198401ee60
-url: https://src.opensuse.org/cockpit/cockpit-client-launcher.git
-revision: 33d9a5476ffaaaa4495ff5c4c87915afc474bdc898af91d9cfad7c198401ee60
+mtime: 1777463866
+commit: cf94e8377681c7a9e55003758f49c4f0f719e373cf410c8e45c893d5588484c3
+url: https://src.opensuse.org/cockpit/cockpit-client-launcher
+revision: cf94e8377681c7a9e55003758f49c4f0f719e373cf410c8e45c893d5588484c3
projectscmsync: https://src.opensuse.org/cockpit/_ObsPrj.git
++++++ build.specials.obscpio ++++++
++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore 2026-04-29 13:57:46.000000000 +0200
@@ -0,0 +1,5 @@
+*.obscpio
+*.osc
+_build.*
+_service:*
+.pbuild
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cockpit-client-launcher new/cockpit-client-launcher
--- old/cockpit-client-launcher 1970-01-01 01:00:00.000000000 +0100
+++ new/cockpit-client-launcher 2026-04-29 13:57:46.000000000 +0200
@@ -0,0 +1,195 @@
+#!/bin/bash
+#
+# cockpit-client-launcher
+#
+# Copyright (C) Lubos Kocman <[email protected]>
+# Copyright (C) 2026 openSUSE and contributors
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+
+set -euo pipefail
+
+SOCKET_UNIT="cockpit.socket"
+FIREWALL_PORT_DEFAULT="9090"
+ZENITY_BIN="${ZENITY_BIN:-zenity}"
+
+# Allow override for debugging
+port="${COCKPIT_CLIENT_PORT:-}"
+
+ICON_LOCAL="$(dirname "$0")/cockpit-icon-y2-colors.svg"
+ICON_SYSTEM="/usr/share/icons/hicolor/scalable/apps/cockpit-client-launcher.svg"
+
+if [[ -f "$ICON_LOCAL" ]]; then
+ ZENITY_ICON="$ICON_LOCAL"
+elif [[ -f "$ICON_SYSTEM" ]]; then
+ ZENITY_ICON="$ICON_SYSTEM"
+else
+ ZENITY_ICON="cockpit-client-launcher" # fallback to theme icon name
+fi
+
+have_zenity() {
+ command -v "$ZENITY_BIN" >/dev/null 2>&1
+}
+
+zenity_question() {
+ # args: title, width, text
+ local title="$1" width="$2" text="$3"
+ if ! have_zenity; then
+ return 1
+ fi
+ "$ZENITY_BIN" --question \
+ --window-icon="$ZENITY_ICON" \
+ --title="$title" \
+ --width="$width" \
+ --text="$text"
+}
+
+zenity_error() {
+ # args: title, width, text
+ local title="$1" width="$2" text="$3"
+ if ! have_zenity; then
+ echo "Error: $title" >&2
+ echo -e "$text" >&2
+ return 0
+ fi
+ "$ZENITY_BIN" --error \
+ --window-icon="$ZENITY_ICON" \
+ --title="$title" \
+ --width="$width" \
+ --text="$text"
+}
+
+socket_active() {
+ systemctl is-active --quiet "$SOCKET_UNIT"
+}
+
+start_socket_prompt() {
+ zenity_question \
+ "Start Cockpit?" \
+ 440 \
+ "Cockpit isn’t running.\n\nStart it now?\n\nYou may be asked for admin
authentication multiple times.\nOnce for cockpit socket enablement and later
for firewall configuration."
+}
+
+start_socket() {
+ if command -v pkexec >/dev/null 2>&1; then
+ pkexec systemctl enable --now "$SOCKET_UNIT"
+ return 0
+ fi
+
+ # Desktop launcher: don't rely on sudo prompting in a terminal
+ return 1
+}
+
+detect_port_from_socket() {
+ # sets global $port if detectable
+ local listen
+ listen="$(systemctl show "$SOCKET_UNIT" -p Listen --value 2>/dev/null ||
true)"
+ if [[ -z "$listen" ]]; then
+ return 0
+ fi
+
+ # Strip trailing " (Stream)" etc.
+ listen="${listen%% *}"
+
+ if [[ "$listen" =~ ^[0-9]+$ ]]; then
+ port="$listen"
+ else
+ port="${listen##*:}"
+ fi
+}
+
+firewalld_available() {
+ command -v firewall-cmd >/dev/null 2>&1
+}
+
+cockpit_exposed_in_firewalld() {
+ local p="${port:-$FIREWALL_PORT_DEFAULT}"
+
+ firewall-cmd --quiet --query-service=cockpit && return 0
+ firewall-cmd --quiet --query-port="${p}/tcp" && return 0
+ return 1
+}
+
+firewall_prompt_keep_open() {
+ # OK -> keep remote access
+ # Cancel -> switch to local-only (recommended)
+ "$ZENITY_BIN" \
+ --question \
+ --window-icon="$ZENITY_ICON" \
+ --title="Cockpit Network Access" \
+ --width=540 \
+ --ok-label="Allow Remote Access" \
+ --cancel-label="Local Only (Recommended)" \
+ --text="Cockpit can currently be accessed from other computers on this
network.\n\nHow would you like to use it?\n\nAllowing remote access lets other
machines connect to this system.\n\nKeeping it local-only is recommended for
most users."
+}
+
+close_cockpit_in_firewalld() {
+ # Single pkexec to avoid multiple password prompts.
+ # Best effort: try removing both service and port; ignore failures.
+ local p="${port:-$FIREWALL_PORT_DEFAULT}"
+
+ if command -v pkexec >/dev/null 2>&1; then
+ pkexec bash -c "
+ set -e
+ firewall-cmd --remove-service=cockpit --permanent >/dev/null 2>&1 || true
+ firewall-cmd --remove-port='${p}/tcp' --permanent >/dev/null 2>&1 || true
+ firewall-cmd --reload >/dev/null 2>&1
+ "
+ return 0
+ fi
+
+ return 1
+}
+
+started_by_launcher=0
+
+# --- Ensure cockpit socket is running (or ask to start it) ---
+if ! socket_active; then
+ if start_socket_prompt; then
+ if ! start_socket; then
+ zenity_error \
+ "Failed to start Cockpit" \
+ 520 \
+ "Could not start ${SOCKET_UNIT} (pkexec not available or authorization
failed).\n\nTry in a terminal:\n sudo systemctl enable --now
${SOCKET_UNIT}\n\nOr check:\n systemctl status ${SOCKET_UNIT}"
+ exit 1
+ fi
+ started_by_launcher=1
+ else
+ # User clicked No / cancelled.
+ exit 0
+ fi
+fi
+
+# --- Port detection (your original logic, wrapped) ---
+if [[ -z "$port" ]]; then
+ detect_port_from_socket
+fi
+
+port="${port:-$FIREWALL_PORT_DEFAULT}"
+
+# --- Network access choice: only if we started Cockpit just now ---
+if [[ "$started_by_launcher" -eq 1 ]]; then
+ if firewalld_available && have_zenity; then
+ if cockpit_exposed_in_firewalld; then
+ # OK => keep remote access (do nothing)
+ # Cancel => switch to local-only
+ if ! firewall_prompt_keep_open; then
+ if ! close_cockpit_in_firewalld; then
+ zenity_error \
+ "Network Access Not Changed" \
+ 520 \
+ "I couldn’t adjust the system settings (pkexec not available or
authorization failed).\n\nIf you want local-only access, run:\n sudo
firewall-cmd --remove-service=cockpit --permanent\n sudo firewall-cmd
--remove-port=${port}/tcp --permanent\n sudo firewall-cmd --reload"
+ fi
+ fi
+ fi
+ fi
+fi
+
+url="http://127.0.0.1:${port}/"
+exec /usr/libexec/cockpit-client --external-ws="$url" "$@"
\ No newline at end of file