diff --git a/.gitignore b/.gitignore index 62ae47b..6478ce9 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,3 @@ /weldr-client-35.13.tar.gz.asc /weldr-client-35.14.tar.gz /weldr-client-35.14.tar.gz.asc -/weldr-client-36.0.tar.gz -/weldr-client-36.0.tar.gz.asc -/weldr-client-36.1.tar.gz -/weldr-client-36.1.tar.gz.asc diff --git a/0001-Fix-non-constant-log-strings.patch b/0001-Fix-non-constant-log-strings.patch new file mode 100644 index 0000000..092378f --- /dev/null +++ b/0001-Fix-non-constant-log-strings.patch @@ -0,0 +1,116 @@ +From 4d588ce64de6f9b17c95820f65fed7781e028c13 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Mon, 27 Jan 2025 09:36:07 -0800 +Subject: [PATCH] Fix non-constant log strings + +go v1.24 will fail to build when non-constant strings are passed to the +format field. Fix this now that that it doesn't become an issue when +switching to v1.24 +--- + cmd/composer-cli/blueprints/diff.go | 20 ++++++++++---------- + cmd/composer-cli/root/root.go | 2 +- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/cmd/composer-cli/blueprints/diff.go b/cmd/composer-cli/blueprints/diff.go +index 9b4f139..14299e2 100644 +--- a/cmd/composer-cli/blueprints/diff.go ++++ b/cmd/composer-cli/blueprints/diff.go +@@ -43,24 +43,24 @@ func diff(cmd *cobra.Command, args []string) (rcErr error) { + if root.JSONOutput { + err := getBlueprintJSON(args[0], args[1]) + if err != nil { +- return root.ExecutionError(cmd, err.Error()) ++ return root.ExecutionError(cmd, "%s", err.Error()) + } + + err = getBlueprintJSON(args[0], args[2]) + if err != nil { +- return root.ExecutionError(cmd, err.Error()) ++ return root.ExecutionError(cmd, "%s", err.Error()) + } + return nil + } + + fromBlueprint, err := getBlueprint(args[0], args[1]) + if err != nil { +- return root.ExecutionError(cmd, err.Error()) ++ return root.ExecutionError(cmd, "%s", err.Error()) + } + + toBlueprint, err := getBlueprint(args[0], args[2]) + if err != nil { +- return root.ExecutionError(cmd, err.Error()) ++ return root.ExecutionError(cmd, "%s", err.Error()) + } + + // Everything after args[2] is passed to diff +@@ -86,7 +86,7 @@ func getBlueprint(name, commit string) (string, error) { + return "", err + } + if resp != nil && !resp.Status { +- return "", fmt.Errorf(strings.Join(resp.AllErrors(), ", ")) ++ return "", fmt.Errorf("%s", strings.Join(resp.AllErrors(), ", ")) + } + if len(bps) == 0 { + return "", fmt.Errorf("no blueprints") +@@ -99,7 +99,7 @@ func getBlueprint(name, commit string) (string, error) { + return "", err + } + if len(resp) > 0 { +- return "", fmt.Errorf(resp[0].String()) ++ return "", fmt.Errorf("%s", resp[0].String()) + } + if len(bps) < 1 { + return "", fmt.Errorf("no blueprints") +@@ -116,7 +116,7 @@ func getBlueprint(name, commit string) (string, error) { + return "", err + } + if resp != nil && !resp.Status { +- return "", fmt.Errorf(strings.Join(resp.AllErrors(), ", ")) ++ return "", fmt.Errorf("%s", strings.Join(resp.AllErrors(), ", ")) + } + return bp, nil + } +@@ -192,7 +192,7 @@ func getBlueprintJSON(name, commit string) error { + return err + } + if len(resp) > 0 { +- return fmt.Errorf(resp[0].String()) ++ return fmt.Errorf("%s", resp[0].String()) + } + if len(bps) == 0 { + return fmt.Errorf("no blueprints") +@@ -205,7 +205,7 @@ func getBlueprintJSON(name, commit string) error { + return err + } + if len(resp) > 0 { +- return fmt.Errorf(resp[0].String()) ++ return fmt.Errorf("%s", resp[0].String()) + } + if len(bps) < 1 { + return fmt.Errorf("no blueprints") +@@ -222,7 +222,7 @@ func getBlueprintJSON(name, commit string) error { + return err + } + if resp != nil && !resp.Status { +- return fmt.Errorf(strings.Join(resp.AllErrors(), ", ")) ++ return fmt.Errorf("%s", strings.Join(resp.AllErrors(), ", ")) + } + return nil + } +diff --git a/cmd/composer-cli/root/root.go b/cmd/composer-cli/root/root.go +index ca98c72..9e4d1c0 100644 +--- a/cmd/composer-cli/root/root.go ++++ b/cmd/composer-cli/root/root.go +@@ -180,7 +180,7 @@ func ExecutionError(cmd *cobra.Command, format string, a ...interface{}) error { + } + cmd.SilenceErrors = true // cobra will not print errors returned from commands after this + cmd.SilenceUsage = true // cobra will not print usage on errors after this +- return fmt.Errorf(s) ++ return fmt.Errorf("%s", s) + } + + // ExecutionErrors prints a list of errors to stderr, then calls ExecutionError +-- +2.48.1 + diff --git a/0001-tests-Skip-checking-arch-when-testing-sent-body.patch b/0001-tests-Skip-checking-arch-when-testing-sent-body.patch deleted file mode 100644 index affb1aa..0000000 --- a/0001-tests-Skip-checking-arch-when-testing-sent-body.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6815aa4a2a0b2bd376d0f6e072580a9c60086e3e Mon Sep 17 00:00:00 2001 -From: "Brian C. Lane" -Date: Thu, 14 Aug 2025 09:26:25 -0700 -Subject: [PATCH] tests: Skip checking arch when testing sent body - -The host architecture is included in the body of the request, skip -checking for the specific arch in order to keep the tests architecture -independent. - -Related: RHEL-60137 ---- - cmd/composer-cli/projects/info_test.go | 4 +++- - cmd/composer-cli/projects/list_test.go | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/cmd/composer-cli/projects/info_test.go b/cmd/composer-cli/projects/info_test.go -index 3f9a85f..dd2a78c 100644 ---- a/cmd/composer-cli/projects/info_test.go -+++ b/cmd/composer-cli/projects/info_test.go -@@ -457,7 +457,9 @@ func TestCmdProjectsInfoCloud(t *testing.T) { - sentBody, err := io.ReadAll(mcc.Req.Body) - assert.Nil(t, mcc.Req.Body.Close()) - require.Nil(t, err) -- assert.Contains(t, string(sentBody), `{"distribution":"homer","architecture":"x86_64","packages":["tmux"]}`) -+ // NOTE: sentBody also contains arch specific architecture, skip checking that. -+ assert.Contains(t, string(sentBody), `"distribution":"homer"`) -+ assert.Contains(t, string(sentBody), `"packages":["tmux"]`) - assert.Equal(t, "application/json", mcc.Req.Header.Get("Content-Type")) - assert.Equal(t, "/api/image-builder-composer/v2/search/packages", mcc.Req.URL.Path) - } -diff --git a/cmd/composer-cli/projects/list_test.go b/cmd/composer-cli/projects/list_test.go -index b809224..386b793 100644 ---- a/cmd/composer-cli/projects/list_test.go -+++ b/cmd/composer-cli/projects/list_test.go -@@ -363,7 +363,9 @@ func TestCmdProjectsListCloud(t *testing.T) { - sentBody, err := io.ReadAll(mcc.Req.Body) - assert.Nil(t, mcc.Req.Body.Close()) - require.Nil(t, err) -- assert.Contains(t, string(sentBody), `{"distribution":"homer","architecture":"x86_64","packages":["*"]}`) -+ // NOTE: sentBody also contains arch specific architecture, skip checking that. -+ assert.Contains(t, string(sentBody), `"distribution":"homer"`) -+ assert.Contains(t, string(sentBody), `"packages":["*"]`) - assert.Equal(t, "application/json", mcc.Req.Header.Get("Content-Type")) - assert.Equal(t, "/api/image-builder-composer/v2/search/packages", mcc.Req.URL.Path) - } --- -2.50.1 - diff --git a/sources b/sources index 9a05ef2..953c1d2 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (weldr-client-36.1.tar.gz) = 52bac9879b73e3137d434a9c46a2914e0446ed63db14c9176cbd2a47aaf10a757a905a138401208958631237d354a7689035fd5a68297720431b212151eabd4d -SHA512 (weldr-client-36.1.tar.gz.asc) = 0d0fd65355356aaac2eb8052c182f619d8d7da5c6af164d7b3da97b2fc0b4435d6e4cff2b81914e99e8f094a518432dd0b769e28fba4c90b8a9453326d6b3f1a -SHA512 (gpg-117E8C168EFE3A7F.key) = cbbf218fe4427bd16f64b60cafd8c98bc3b073c25cfe2c19f03405ebfbf88ac05f0a3fa4e44afbbc514616b426008bc1e76b4e3ea49825a6ece4ad63638bb52b +SHA512 (weldr-client-35.14.tar.gz) = 9cfb2524b42a9e9ef46e22d90506d2081a3bd1c0bfc35e19a51d527a81ef11c909eced24343a3d65ac6dbc7601a14278094bc514a41a5e584bd3ec7ca03ec55b +SHA512 (weldr-client-35.14.tar.gz.asc) = 0a808bacfc3abca065696e193ba244318e9b1baf727dfb2a3ae65b9496854d2fc063f1ddb68ad2d9f1774f8ce6203b1c93656b1fb85b5772e40286fbcb995651 +SHA512 (gpg-117E8C168EFE3A7F.key) = b5c5a30e2b7997af89f00f153930c03ef165ba4abef223db94818a42d536350622c21e581b6a9ebfb9e6476b8c8d84d4ea549d6c7990482315fd914f4544bcf2 diff --git a/weldr-client.spec b/weldr-client.spec index 82def08..96954e1 100644 --- a/weldr-client.spec +++ b/weldr-client.spec @@ -6,8 +6,8 @@ %global goipath github.com/osbuild/weldr-client/v2 Name: weldr-client -Version: 36.1 -Release: 1%{?dist} +Version: 35.14 +Release: 3%{?dist} # Upstream license specification: Apache-2.0 License: Apache-2.0 Summary: Command line utility to control osbuild-composer @@ -20,6 +20,8 @@ Source1: https://github.com/osbuild/weldr-client/releases/download/v%{version} Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/117E8C168EFE3A7F#/gpg-117E8C168EFE3A7F.key %endif +Patch0001: 0001-Fix-non-constant-log-strings.patch + Obsoletes: composer-cli < 35.0 Provides: composer-cli = %{version}-%{release} @@ -50,6 +52,7 @@ Command line utility to control osbuild-composer %forgeautosetup -p1 %else %goprep +%autopatch -p1 %endif %build @@ -130,12 +133,26 @@ composer-cli package. %changelog -* Wed Oct 15 2025 Brian C. Lane - 36.1-1 -- New release: 36.1 (bcl) -- build(deps): bump actions/setup-go from 5 to 6 (49699333+dependabot[bot]) -- build(deps): bump github.com/spf13/cobra from 1.9.1 to 1.10.1 (49699333+dependabot[bot]) -- test: iot-qcow2-image does not support packages (bcl) -- test: qcow2 renamed to server-qcow2 (bcl) -- build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1 (49699333+dependabot[bot]) -- build(deps): bump actions/checkout from 4 to 5 (49699333+dependabot[bot]) -- tests: Use current host arch in info and list tests (bcl) \ No newline at end of file +* Mon Jan 27 2025 Brian C. Lane - 35.14-3 +- Fix non-constant log strings + Resolves: rhbz#2341535 + +* Sun Jan 19 2025 Fedora Release Engineering - 35.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Tue Nov 12 2024 Brian C. Lane - 35.14-1 +- New release: 35.14 (bcl) +- tests: Remove openstack (bcl) +- readme: project links (lukas) +- Makefile: implement "fully source containers" HMS-3883 (florian.schueller) +- README: fix anchor typo (florian.schueller) +- README: fix compatibility with docusaurus (florian.schueller) +- go.mod: Use go 1.21 (bcl) +- workflows: Use go 1.21.x for govuln tests (bcl) +- build(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (49699333+dependabot[bot]) +- build(deps): bump github.com/BurntSushi/toml from 1.3.2 to 1.4.0 (49699333+dependabot[bot]) +- Makefile: dnf5 builddep accepts .spec files without --spec (bcl) +- Containerfile: Install dnf5-plugins for builddep support (bcl) +- bash: Add status show to bash completion (bcl) +- go.mod: Use go 1.20 (bcl) +- bash: Add wait command to bash completion (bcl)