Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the SUSE Manager version inspection before release #474

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shared/utils/serverinspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewServerInspector(scriptDir string) ServerInspector {
"cat /etc/*release | grep 'Uyuni release' | cut -d ' ' -f3 || true"),
types.NewInspectData(
"suse_manager_release",
"sed 's/.*(\\([0-9.]*\\)).*/\\1/g' /etc/susemanager-release || true"),
"sed 's/.*(\\([0-9.]\\+\\).*/\\1/g' /etc/susemanager-release || true"),
types.NewInspectData(
"fqdn",
"cat /etc/rhn/rhn.conf 2>/dev/null | grep 'java.hostname' | cut -d' ' -f3 || true"),
Expand Down
2 changes: 1 addition & 1 deletion shared/utils/serverinspector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestServerInspectorGenerate(t *testing.T) {
expected := `#!/bin/bash
# inspect.sh, generated by mgradm
echo "uyuni_release=$(cat /etc/*release | grep 'Uyuni release' | cut -d ' ' -f3 || true)" >> ` + dataPath + `
echo "suse_manager_release=$(sed 's/.*(\([0-9.]*\)).*/\1/g' /etc/susemanager-release || true)" >> ` + dataPath + `
echo "suse_manager_release=$(sed 's/.*(\([0-9.]\+\).*/\1/g' /etc/susemanager-release || true)" >> ` + dataPath + `
echo "fqdn=$(cat /etc/rhn/rhn.conf 2>/dev/null | grep 'java.hostname' | cut -d' ' -f3 || true)" >> ` + dataPath + `
echo "image_pg_version=$(rpm -qa --qf '%{VERSION}\n' 'name=postgresql[0-8][0-9]-server' | cut -d. -f1 | sort -n | tail -1 || true)" >> ` + dataPath + `
echo "current_pg_version=$((test -e /var/lib/pgsql/data/PG_VERSION && cat /var/lib/pgsql/data/PG_VERSION) || true)" >> ` + dataPath + `
Expand Down
2 changes: 2 additions & 0 deletions uyuni-tools.changes.cbosdo.suma-version-inspect
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix the SUSE Manager version detection with pre-release
milestones