Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package hawk-apiserver for openSUSE:Factory
checked in at 2026-10-20 12:40:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hawk-apiserver (Old)
and /work/SRC/openSUSE:Factory/.hawk-apiserver.new.3698736 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hawk-apiserver"
Tue Oct 20 12:40:35 2026 rev:13 rq:1386248 version:0.2.4+git.1792406875.6ed758a
Changes:
--------
--- /work/SRC/openSUSE:Factory/hawk-apiserver/hawk-apiserver.changes
2026-08-25 13:19:19.712349405 +0200
+++
/work/SRC/openSUSE:Factory/.hawk-apiserver.new.3698736/hawk-apiserver.changes
2026-10-20 12:41:56.528579289 +0200
@@ -1,0 +2,6 @@
+Mon Oct 19 11:02:29 UTC 2026 - Aleksei Burlakov <[email protected]>
+
+- Vesion 0.2.4+git.1792406875.6ed758a:
+ * Doc: update HA documentation URLs (bsc#1280368)
+
+-------------------------------------------------------------------
Old:
----
hawk-apiserver-0.2.3+git.1787575068.680f9de.tar.gz
New:
----
hawk-apiserver-0.2.4+git.1792406875.6ed758a.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hawk-apiserver.spec ++++++
--- /var/tmp/diff_new_pack.91RxdK/_old 2026-10-20 12:41:57.274610512 +0200
+++ /var/tmp/diff_new_pack.91RxdK/_new 2026-10-20 12:41:57.276610596 +0200
@@ -19,7 +19,7 @@
%define www_base %{_datadir}/hawk
Name: hawk-apiserver
-Version: 0.2.3+git.1787575068.680f9de
+Version: 0.2.4+git.1792406875.6ed758a
Release: 0
Summary: Web server and API provider for Hawk
License: GPL-3.0-or-later
++++++ _service ++++++
--- /var/tmp/diff_new_pack.91RxdK/_old 2026-10-20 12:41:57.309611977 +0200
+++ /var/tmp/diff_new_pack.91RxdK/_new 2026-10-20 12:41:57.312612102 +0200
@@ -3,7 +3,7 @@
<param name="url">https://github.com/ClusterLabs/hawk-apiserver</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
- <param name="versionformat">0.2.3+git.%ct.%h</param>
+ <param name="versionformat">0.2.4+git.%ct.%h</param>
<param name="revision">master</param>
</service>
<service name="recompress" mode="disabled">
++++++ hawk-apiserver-0.2.3+git.1787575068.680f9de.tar.gz ->
hawk-apiserver-0.2.4+git.1792406875.6ed758a.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/api/cib.go
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/api/cib.go
--- old/hawk-apiserver-0.2.3+git.1787575068.680f9de/api/cib.go 2026-08-24
14:37:48.000000000 +0200
+++ new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/api/cib.go 2026-10-19
12:47:55.000000000 +0200
@@ -12,11 +12,17 @@
"os/exec"
"path"
"strings"
+
+ "github.com/ClusterLabs/hawk-apiserver/internal"
)
var Routehandler http.Handler // set from main
func renderTemplate(w http.ResponseWriter, name string, data map[string]any) {
+ if data == nil {
+ data = make(map[string]any)
+ }
+ data["AppConfig"] = internal.AppConfig
tmpl, err := template.ParseFiles(
"templates/layout.html",
fmt.Sprintf("templates/%s.html", name),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/internal/application_config.go
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/internal/application_config.go
---
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/internal/application_config.go
1970-01-01 01:00:00.000000000 +0100
+++
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/internal/application_config.go
2026-10-19 12:47:55.000000000 +0200
@@ -0,0 +1,48 @@
+package internal
+
+import (
+ "os"
+ "strings"
+)
+
+// OSRelease contains the distribution ID and VERSION_ID from /etc/os-release.
+type OSRelease struct {
+ ID string `json:"id"`
+ Version string `json:"version"`
+}
+
+// ApplicationConfig holds shared application settings exposed to Go-rendered
pages.P
+type ApplicationConfig struct {
+ OS OSRelease `json:"os"`
+}
+
+// AppConfig is initialized once at startup.
+var AppConfig = ApplicationConfig{
+ OS: readOSRelease(),
+}
+
+func readOSRelease() OSRelease {
+ contents, err := os.ReadFile("/etc/os-release")
+ if err != nil {
+ return OSRelease{}
+ }
+ return parseOSRelease(string(contents))
+}
+
+func parseOSRelease(contents string) OSRelease {
+ var release OSRelease
+ for _, line := range strings.Split(contents, "\n") {
+ key, value, ok := strings.Cut(line, "=")
+ if !ok {
+ continue
+ }
+ value = strings.Trim(strings.TrimSpace(value), "\"'")
+ switch key {
+ case "ID":
+ release.ID = value
+ case "VERSION_ID":
+ release.Version = value
+ }
+ }
+ return release
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/internal/application_config_test.go
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/internal/application_config_test.go
---
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/internal/application_config_test.go
1970-01-01 01:00:00.000000000 +0100
+++
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/internal/application_config_test.go
2026-10-19 12:47:55.000000000 +0200
@@ -0,0 +1,21 @@
+package internal
+
+import "testing"
+
+func TestParseOSRelease(t *testing.T) {
+ for _, test := range []struct {
+ name, contents string
+ want OSRelease
+ }{
+ {"quoted", "NAME=\"SUSE Linux Enterprise
Server\"\nID=\"sles\"\nVERSION_ID=\"15.6\"\n", OSRelease{"sles", "15.6"}},
+ {"unquoted", "ID=sles\nVERSION_ID=16.0\n", OSRelease{"sles",
"16.0"}},
+ {"single quotes", "ID='opensuse-leap'\nVERSION_ID='16.0'\n",
OSRelease{"opensuse-leap", "16.0"}},
+ {"missing", "# No distribution
information\nID_LIKE=sles\nVERSION=16\n", OSRelease{}},
+ } {
+ t.Run(test.name, func(t *testing.T) {
+ if got := parseOSRelease(test.contents); got !=
test.want {
+ t.Fatalf("got %+v, want %+v", got, test.want)
+ }
+ })
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/static/js/classes/HelpPopup.js
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/static/js/classes/HelpPopup.js
---
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/static/js/classes/HelpPopup.js
2026-08-24 14:37:48.000000000 +0200
+++
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/static/js/classes/HelpPopup.js
2026-10-19 12:47:55.000000000 +0200
@@ -25,47 +25,55 @@
const modalBody = document.createElement("div");
modalBody.className = "modal-body help";
+ const os = window.hawkConfig?.os || {};
+ const majorVersion = (os.version || "").split(".")[0];
+ const isSLES = os.id === "sles" && ["15", "16"].includes(majorVersion);
+ const docs = [
+ {
+ icon: "bug", style: "danger", title: "File a Bug Report",
+ desc: "Report a bug or request a feature!",
+ url: isSLES
+ ?
"https://bugzilla.suse.com/enter_bug.cgi?classification=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension"
+ : "https://github.com/ClusterLabs/hawk/issues/new"
+ },
+ {
+ icon: "newspaper", style: "success",
+ title: isSLES ? "Release Notes" : "News",
+ desc: isSLES
+ ? "Read the release notes for the SUSE High Availability Extension."
+ : "Visit the Hawk website for information about the latest release.",
+ url: isSLES
+ ? `https://www.suse.com/releasenotes/x86_64/SLE-HA/${majorVersion}/`
+ : "http://hawk-ui.github.io/"
+ },
+ {
+ icon: "book", style: "success", title: "Online Documentation",
+ desc: isSLES
+ ? "Read the most up-to-date documentation at the suse.com website."
+ : "Getting Started using Hawk",
+ url: isSLES
+ ? `https://documentation.suse.com/sle-ha/${majorVersion}/`
+ : "http://hawk-guide.readthedocs.io/en/latest/"
+ }
+ ];
+
modalBody.innerHTML = `
<ul class="media-list">
- <li class="media">
- <div class="media-body">
- <h4 class="media-heading">
- <div class="btn-group pull-right">
- <a target="_blank" class="btn btn-danger btn-lg" title="File a
Bug Report" href="https://github.com/ClusterLabs/hawk/issues/new">
- <i class="fas fa-bug fa-fw fa-lg"></i>
- </a>
- </div>
- File a Bug Report
- </h4>
- Report a bug or request a feature!
- </div>
- </li>
- <li class="media">
- <div class="media-body">
- <h4 class="media-heading">
- <div class="btn-group pull-right">
- <a target="_blank" class="btn btn-success btn-lg" title="News"
href="http://hawk-ui.github.io/">
- <i class="fas fa-newspaper fa-fw fa-lg"></i>
- </a>
- </div>
- News
- </h4>
- Visit the Hawk website for information about the latest release.
- </div>
- </li>
- <li class="media">
- <div class="media-body">
- <h4 class="media-heading">
- <div class="btn-group pull-right">
- <a target="_blank" class="btn btn-success btn-lg"
title="Online Documentation" href="http://hawk-guide.readthedocs.io/en/latest/">
- <i class="fas fa-book fa-fw fa-lg"></i>
- </a>
- </div>
- Online Documentation
- </h4>
- Getting Started using Hawk
- </div>
- </li>
+ ${docs.map(doc => `
+ <li class="media">
+ <div class="media-body">
+ <h4 class="media-heading">
+ <div class="btn-group pull-right">
+ <a target="_blank" rel="noopener noreferrer" class="btn
btn-${doc.style} btn-lg" title="${doc.title}" href="${doc.url}">
+ <i class="fas fa-${doc.icon} fa-fw fa-lg"></i>
+ </a>
+ </div>
+ ${doc.title}
+ </h4>
+ ${doc.desc}
+ </div>
+ </li>
+ `).join("")}
</ul>
`;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hawk-apiserver-0.2.3+git.1787575068.680f9de/templates/layout.html
new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/templates/layout.html
--- old/hawk-apiserver-0.2.3+git.1787575068.680f9de/templates/layout.html
2026-08-24 14:37:48.000000000 +0200
+++ new/hawk-apiserver-0.2.4+git.1792406875.6ed758a/templates/layout.html
2026-10-19 12:47:55.000000000 +0200
@@ -12,6 +12,7 @@
<link rel="stylesheet" href="/static/css/layout-modal.css">
<link rel="stylesheet" href="/static/css/layout-sidebar.css">
<script src="/static/js/classes/Popup.js"></script>
+ <script>window.hawkConfig = {{ .AppConfig }};</script>
<script src="/static/js/classes/HelpPopup.js"></script>
<script src="/static/js/classes/ClusterDetailsPopup.js"></script>
<script src="/static/js/constants.js"></script>
++++++ vendor.tar.gz ++++++