commit ea0a362ea1f194726189bb7de058fb33bdbc82bc Author: MSVSphere Packaging Team Date: Fri Mar 29 16:38:10 2024 +0300 import weldr-client-35.12-2.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..354bd73 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/gpg-117E8C168EFE3A7F.key +SOURCES/weldr-client-35.12.tar.gz diff --git a/.weldr-client.metadata b/.weldr-client.metadata new file mode 100644 index 0000000..01d1371 --- /dev/null +++ b/.weldr-client.metadata @@ -0,0 +1,2 @@ +33eda006daafd903c8fff6a6b688430354063395 SOURCES/gpg-117E8C168EFE3A7F.key +f4e60fd289455634aadf7c3a114650cc81ad56d5 SOURCES/weldr-client-35.12.tar.gz diff --git a/SOURCES/weldr-client-35.12.tar.gz.asc b/SOURCES/weldr-client-35.12.tar.gz.asc new file mode 100644 index 0000000..97be88e --- /dev/null +++ b/SOURCES/weldr-client-35.12.tar.gz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEEtMa0UeT6i0IyyhkeEX6MFo7+On8FAmXT1z0ACgkQEX6MFo7+ +On/o0Qf/agOtNU3iAiPglHqUiMTb9r7qAdpN8hnMrOiMpV1LQ7IgZTuxiZrytbzg +S3CnOmyola7juNVzTq3aVejFWrI/oXHmYbYNcgC75NB7vIgi1BMjMltV6qf50LSe +BbAygzMp5f+9mkwrhIdnqK0PO+FmrMpMW/u5ye2acI+Aww52Q1QWtlgP6YnXyxT3 +g1BnT+M11BQzZd/F3moBnJDcgK242hPJb1XcxnMhB6kkTGJdghKPwPVh8Ah/2b+E +FcIa3XYfsz0P+6liI7vxvijrAbpRY4dC3tXBtkko88rSEcokfuD9ypo2NUE6A27H +eVcvOH3o94tvVwVCSpyrVDPqCtZT4Q== +=eTXF +-----END PGP SIGNATURE----- diff --git a/SPECS/weldr-client.spec b/SPECS/weldr-client.spec new file mode 100644 index 0000000..8baf446 --- /dev/null +++ b/SPECS/weldr-client.spec @@ -0,0 +1,256 @@ +# Pass --with tests to rpmbuild to build composer-cli-tests +%bcond_with tests +# Pass --without signed to skip gpg signed tar.gz (DO NOT DO THAT IN PRODUCTION) +%bcond_without signed + +%global goipath github.com/osbuild/weldr-client/v2 + +Name: weldr-client +Version: 35.12 +Release: 2%{?dist} +# Upstream license specification: Apache-2.0 +License: ASL 2.0 +Summary: Command line utility to control osbuild-composer + +%gometa +Url: %{gourl} +Source0: https://github.com/osbuild/weldr-client/releases/download/v%{version}/%{name}-%{version}.tar.gz +%if %{with signed} +Source1: https://github.com/osbuild/weldr-client/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc +Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/117E8C168EFE3A7F#/gpg-117E8C168EFE3A7F.key +%endif + +Obsoletes: composer-cli < 35.0 +Provides: composer-cli = %{version}-%{release} + +Requires: diffutils + +BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} +%if 0%{?fedora} +BuildRequires: golang(github.com/BurntSushi/toml) +BuildRequires: golang(github.com/spf13/cobra) +# Required for tests and %check +BuildRequires: golang(github.com/stretchr/testify/assert) +BuildRequires: golang(github.com/stretchr/testify/require) +%endif + +BuildRequires: git-core +BuildRequires: make +BuildRequires: gnupg2 + + +%description +Command line utility to control osbuild-composer + +%prep +%if %{with signed} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%endif +%if 0%{?rhel} +%forgeautosetup -p1 +%else +%goprep +%endif + +%build +export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} " + +%if 0%{?rhel} +GO_BUILD_PATH=$PWD/_build +install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath}) +ln -fs $PWD $GO_BUILD_PATH/src/%{goipath} +cd $GO_BUILD_PATH/src/%{goipath} +install -m 0755 -vd _bin +export PATH=$PWD/_bin${PATH:+:$PATH} +export GOPATH=$GO_BUILD_PATH:%{gopath} +export GOFLAGS=-mod=vendor +%else +export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}" +export GO111MODULE=off +%endif +%gobuild -o composer-cli %{goipath}/cmd/composer-cli + + +## TODO +##make man + +%if %{with tests} || 0%{?rhel} +export BUILDTAGS="integration" + +# Build test binaries with `go test -c`, so that they can take advantage of +# golang's testing package. The RHEL golang rpm macros don't support building them +# directly. Thus, do it manually, taking care to also include a build id. +# +# On Fedora go modules have already been turned off, and the path set to the one into which +# the golang-* packages install source code. +export LDFLAGS="${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')" +go test -c -tags=integration -buildmode pie -compiler gc -ldflags="${LDFLAGS}" -o composer-cli-tests %{goipath}/weldr +%endif + +%install +make DESTDIR=%{buildroot} install + +%if %{with tests} || 0%{?rhel} +make DESTDIR=%{buildroot} install-tests +%endif + +%check +%if 0%{?fedora} +export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}" +export GO111MODULE=off +%endif + +# Run the unit tests +export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} " +make test + + +%files +%license LICENSE +%doc examples HACKING.md README.md +%{_bindir}/composer-cli +%dir %{_sysconfdir}/bash_completion.d +%{_sysconfdir}/bash_completion.d/composer-cli +%{_mandir}/man1/composer-cli* + +%if %{with tests} || 0%{?rhel} +%package tests +Summary: Integration tests for composer-cli + +Requires: createrepo_c + +%description tests +Integration tests to be run on a pristine-dedicated system to test the +composer-cli package. + +%files tests +%license LICENSE +%{_libexecdir}/tests/composer-cli/ +%endif + + +%changelog +* Wed Feb 21 2024 Brian C. Lane - 35.12-2 +- Add centos 8 repos for testing + Related: RHEL-1770 + +* Wed Feb 21 2024 Brian C. Lane - 35.12-1 +- Copy rhel-8.10.json test repository from osbuild-composer +- New release: 35.12 (bcl) + Resolves: RHEL-1770 +- Add support for compose start warning messages (bcl) +- Update documentation urls for new locations (bcl) +- weldr: go fmt changes to a couple comments (bcl) +- weldr: Update ostree test for parentid with no url (bcl) +- Makefile: Turn off seccomp for build-in-podman (bcl) +- composer-cli: Update doc links (simon.steinbeiss) +- docs: fix typo/formatting in HACKING.md (idiez) +- Add release creation documentation (bcl) +- spec: Require createrepo_c for weldr-client-tests package (bcl) +- spec: migrate the license field to SPDX (ondrej) +- Go: Switch to go 1.19 (bcl) +- CI: Update terraform hash (bcl) +- Actions: add workflow for marking and closing stale issues and PRs (thozza) +- workflows: Stop using golint (bcl) +- workflows: Add Go 1.21 and 1.22 to test matrix (bcl) +- workflows: Update to golangci-lint 1.56.2 (bcl) +- workflow: Ignore govulncheck failures (bcl) +- workflow: Switch to testing on go 1.18, 1.19, 1.20 (bcl) +- build(deps): bump actions/setup-go from 3 to 5 (49699333+dependabot[bot]) +- build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.8.0 (49699333+dependabot[bot]) +- build(deps): bump actions/checkout from 3 to 4 (49699333+dependabot[bot]) +- build(deps): bump github.com/BurntSushi/toml from 1.2.1 to 1.3.2 (49699333+dependabot[bot]) +- build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.4 (49699333+dependabot[bot]) + +* Tue Feb 14 2023 Brian C. Lane - 35.9-2 +- tests: Remove default repos before running tests + Related: rhbz#2168666 + +* Wed Nov 30 2022 Brian C. Lane - 35.9-1 +- Copy rhel-88.json test repository from osbuild-composer +- Update osbuild-composer test repositories from osbuild-composer +- New release: 35.9 (bcl) + Resolves: rhbz#2168666 +- tests: Replace os.MkdirTemp with t.TempDir (bcl) +- blueprint save: Allow overriding bad blueprint names (bcl) +- tests: Clean up checking err in tests (bcl) +- composer-cli: Implement blueprints diff (bcl) +- saveBlueprint: Return the filename to the caller (bcl) +- composer-cli: Add tests for using --commit with old servers (bcl) +- weldr: Return error about the blueprints change route (bcl) +- weldr: Save the http status code as part of APIResponse (bcl) +- Add --commit support to blueprints save (bcl) +- Add --commit to blueprints show (bcl) +- gitleaks: Exclude the test password used in tests (bcl) +- ci: add tags to AWS instances (tlavocat) +- Update github.com/BurntSushi/toml to 1.2.1 +- Update github.com/stretchr/testify to 1.8.1 +- Update bump github.com/spf13/cobra to 1.6.1 +- New release: 35.8 (bcl) +- completion: Remove providers from bash completion script (bcl) +- completion: Filter out new headers from compose list (bcl) +- docs: Remove unneeded Long descriptions (bcl) +- docs: Use a custom help template (bcl) +- docs: Add more command documentation (bcl) +- cmdline: Add package glob support to modules list command (bcl) +- workflow: Add govulncheck on go v1.18 (bcl) +- tests: Update to use golangci-lint 1.49.0 (bcl) +- New release: 35.7 (bcl) +- spec: Move %%gometa macro above %%gourl (bcl) +- weldr: When starting a compose pass size as bytes, not MiB (bcl) +- tests: Use correct size value in bytes for test (bcl) +- workflow: Add Go 1.18 to text matrix (bcl) +- Replace deprecated ioutil functions (bcl) +- New release: 35.6 (bcl) +- tests: Update tests for osbuild-composer changes (bcl) +- CMD: Compose status format (eloy.coto) +- CMD: Compose list format (eloy.coto) +- tests: Update tests to check for JSON list output (bcl) +- composer-cli: Change JSON output to be a list of objects (bcl) +- weldr: Simplify the old ComposeLog, etc. functions (bcl) +- composer-cli: Add --filename to blueprints freeze save command (bcl) +- composer-cli: Add --filename to blueprints save command (bcl) +- composer-cli: Add --filename to compose logs command (bcl) +- composer-cli: Add --filename to compose image command (bcl) +- composer-cli: Add --filename to compose metadata command (bcl) +- composer-cli: Add --filename to compose results command (bcl) +- weldr: Add saving to a new filename to GetFilePath function (bcl) +- github: Fix issue with codecov and forced pushes in PRs (bcl) +- Use golangci-lint 1.45.2 in workflow (bcl) +- Run workflow tests for go 1.16.x and 1.17.x (bcl) +- Move go.mod to go 1.16 (bcl) +- workflows/trigger-gitlab: run Gitlab CI in new image-builder project (jrusz) +- Update GitHub actions/setup-go to 3 +- Update GitHub actions/checkout to 3 + +* Tue Aug 16 2022 Brian C. Lane - 35.5-4 +- tests: Update tests for osbuild composer changes + Resolves: rhbz#2118829 + +* Tue Aug 16 2022 Brian C. Lane - 35.5-3 +- tests: Update repositories so tests will run + Related: rhbz#2116773 + +* Tue Aug 16 2022 Brian C. Lane - 35.5-2 +- Rebuild with golang 1.18.4 for multiple golang CVEs + Resolves: rhbz#2116773 + +* Tue Feb 15 2022 Brian C. Lane - 35.5-1 +- New release: 35.5 (bcl) + Resolves: rhbz#2052604 +- docs: Explain how to undo blueprints delete (bcl) +- test: server status no longer returns devel (bcl) +- Use GetFrozenBlueprintsTOML for blueprints freeze save (bcl) +- Add a test for float uid/gid in frozen blueprint (bcl) +- Use GetBlueprintsTOML for blueprints save (bcl) +- test: Add a test for float uid/gid in saved blueprint (bcl) +- build(deps): bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (49699333+dependabot[bot]) +- tests: trigger on push to main (jrusz) +- build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (49699333+dependabot[bot]) +- ci: add keystore for sonarqube (jrusz) +- spec: Switch to using %%gobuild macro on Fedora (bcl) +- ci: change workflow name (jrusz) +- ci: add gitlab-ci and sonarqube (jrusz) +- doc: fix example links from the README (tdecacqu) +- build(deps): bump actions/checkout from 2.3.4 to 2.4.0 (49699333+dependabot[bot]) +- ci: Enable Coverity Scan tool (atodorov)