- New release: 35.3 (bcl)

- spec: Adjust build methods for RHEL 8 (bcl)
- github: Run build-in-podman to test building package (bcl)
- spec: Use v2 module (bcl)
- Makefile: Use v2 module (bcl)
- Makefile: Add a build-in-podman target (bcl)
- tests: Add JSON and error result testing to status (bcl)
- tests: Add JSON and error result testing to sources (bcl)
- tests: Add JSON and error result testing to projects (bcl)
- tests: Add JSON and error result testing to modules (bcl)
- tests: Add JSON and error result testing to distros (bcl)
- tests: Add JSON and error result testing to compose (bcl)
- tests: Add JSON and error result testing to blueprints (bcl)
- test: Fix test client setup and output capture code (bcl)
- test: Close output capture in printwrap_test (bcl)
- test: reset the root flags on every ExecuteTest call (bcl)
- status: Use ExecutionErrors for API errors (bcl)
- sources: Use ExecutionErrors for API errors (bcl)
- projects: Use ExecutionErrors for API errors (bcl)
- modules: Use ExecutionErrors for API errors (bcl)
- distros: Use ExecutionErrors for API errors (bcl)
- compose: Use ExecutionErrors for API errors (bcl)
- blueprints: Use ExecutionErrors for API errors (bcl)
- composer-cli: Turn off normal command Stdout when --json is used (bcl)
- weldr: Fix Stringer interface on API messages (bcl)
- weldr: Clean up error message return code (bcl)
- weldr: Move Unmarshal error to error position (bcl)
- root: Add a helper function to print a list of errors (bcl)
- Use GetFilePath for ComposeImage (bcl)
- Use GetFilePath for ComposeResults (bcl)
- Use GetFilePath for ComposerMetadata (bcl)
- Use GetFilePath for ComposeLogs (bcl)
- weldr: Add GetFilePath to download a file to a path (bcl)
- Creating v2 module for breaking API changes (bcl)
- Makefile: Add update-mods target (bcl)
- vendor: Update the modules and vendor directory (bcl)
- Bump go version to 1.15 (bcl)
- Limit dependabot to 1 PR (bcl)
- Enable Dependabot service (atodorov)
- tests: Fix integration tests (bcl)
This commit is contained in:
Brian C. Lane 2021-10-04 14:34:04 -07:00
parent 2df426b6a2
commit 8bd25cf987
3 changed files with 64 additions and 39 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
/weldr-client-35.1.tar.gz /weldr-client-35.1.tar.gz
/weldr-client-35.2.tar.gz /weldr-client-35.2.tar.gz
/weldr-client-35.2.tar.gz.asc /weldr-client-35.2.tar.gz.asc
/weldr-client-35.3.tar.gz
/weldr-client-35.3.tar.gz.asc

View File

@ -1,3 +1,3 @@
SHA512 (weldr-client-35.2.tar.gz) = 15be056982683b9b8d5485ff9aa48dff237a48c3ee9d104c0de16898653facb0a63371a8d31bdf3fb19034022411c8d77e2358b22de52d23768cc7363f4926de SHA512 (weldr-client-35.3.tar.gz) = 1f2a79598dbd6d757a3c5ed26434f945659e0ee047a6f241f032325e19688f9722cbbb7e968e0858aa6d276b6d0013ef551b2957fda7b3f68c521a05e9e45ad7
SHA512 (weldr-client-35.2.tar.gz.asc) = 7aabc7faaedc8c1d87a7b182348aa11a52db8425c7327fe52c560d2a861643e27f6d53628d4261027b092198003f02f12ad3ccb98f8f4ce8ce9e1f39fd67b556 SHA512 (weldr-client-35.3.tar.gz.asc) = 257c806de93fe83e2bb305af97dd1e3676b83916b67cb5ce7d9ba7131084226bbfa0900ca6647464be6ad88ec2554561b86c4acab01f64b20e6ec61591b08747
SHA512 (gpg-117E8C168EFE3A7F.key) = 9c760460e3227848c99a1178828512056ac04f518f98bdab5ef36d2aa31c4e5dcda3800d7141cfaf7f2acd0f7f35d4b9971083b6f14f8a36231b74041d4ed88d SHA512 (gpg-117E8C168EFE3A7F.key) = 9c760460e3227848c99a1178828512056ac04f518f98bdab5ef36d2aa31c4e5dcda3800d7141cfaf7f2acd0f7f35d4b9971083b6f14f8a36231b74041d4ed88d

View File

@ -3,11 +3,11 @@
# Pass --without signed to skip gpg signed tar.gz (DO NOT DO THAT IN PRODUCTION) # Pass --without signed to skip gpg signed tar.gz (DO NOT DO THAT IN PRODUCTION)
%bcond_without signed %bcond_without signed
%global goipath github.com/osbuild/weldr-client %global goipath github.com/osbuild/weldr-client/v2
Name: weldr-client Name: weldr-client
Version: 35.2 Version: 35.3
Release: 2%{?dist} Release: 1%{?dist}
# Upstream license specification: Apache-2.0 # Upstream license specification: Apache-2.0
License: ASL 2.0 License: ASL 2.0
Summary: Command line utility to control osbuild-composer Summary: Command line utility to control osbuild-composer
@ -51,6 +51,8 @@ Command line utility to control osbuild-composer
%endif %endif
%build %build
export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} "
%if 0%{?rhel} %if 0%{?rhel}
GO_BUILD_PATH=$PWD/_build GO_BUILD_PATH=$PWD/_build
install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath}) install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath})
@ -60,33 +62,33 @@ install -m 0755 -vd _bin
export PATH=$PWD/_bin${PATH:+:$PATH} export PATH=$PWD/_bin${PATH:+:$PATH}
export GOPATH=$GO_BUILD_PATH:%{gopath} export GOPATH=$GO_BUILD_PATH:%{gopath}
export GOFLAGS=-mod=vendor export GOFLAGS=-mod=vendor
%gobuild -o composer-cli %{goipath}/cmd/composer-cli
%else %else
export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}" export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"
export GO111MODULE=off export GO111MODULE=off
make GOBUILDFLAGS="%{gobuildflags}" build
%endif %endif
export LDFLAGS="-X github.com/osbuild/weldr-client/cmd/composer-cli/root.Version=%{version} "
make GOBUILDFLAGS="%{gobuildflags}" build
## TODO ## TODO
##make man ##make man
%if %{with tests} || 0%{?rhel} %if %{with tests} || 0%{?rhel}
export BUILDTAGS="integration"
# Build test binaries with `go test -c`, so that they can take advantage of # Build test binaries with `go test -c`, so that they can take advantage of
# golang's testing package. The golang rpm macros don't support building them # 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. # directly. Thus, do it manually, taking care to also include a build id.
# #
# On Fedora, also turn off go modules and set the path to the one into which # On Fedora, also turn off go modules and set the path to the one into which
# the golang-* packages install source code. # the golang-* packages install source code.
%if 0%{?fedora} %if 0%{?rhel}
export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}" export LDFLAGS="${LDFLAGS:-} -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')"
export GO111MODULE=off go test -c -tags=integration -ldflags="${LDFLAGS}" -o composer-cli-tests %{goipath}/weldr
%endif %else
export LDFLAGS="-X github.com/osbuild/weldr-client/cmd/composer-cli/root.Version=%{version} "
export BUILDTAGS="integration"
make GOBUILDFLAGS="%{gobuildflags}" integration make GOBUILDFLAGS="%{gobuildflags}" integration
%endif %endif
%endif
%install %install
make DESTDIR=%{buildroot} install make DESTDIR=%{buildroot} install
@ -101,8 +103,10 @@ export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"
export GO111MODULE=off export GO111MODULE=off
%endif %endif
export LDFLAGS="-X github.com/osbuild/weldr-client/cmd/composer-cli/root.Version=%{version} " # Run the unit tests
make GOBUILDFLAGS="%{gotestflags}" test export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} "
make test
%files %files
%license LICENSE %license LICENSE
@ -127,25 +131,44 @@ composer-cli package.
%changelog %changelog
* Mon Aug 23 2021 Brian C. Lane <bcl@redhat.com> - 35.2-2 * Mon Oct 04 2021 Brian C. Lane <bcl@redhat.com> - 35.3-1
- Fix sources to include key and signature - New release: 35.3 (bcl)
- spec: Adjust build methods for RHEL 8 (bcl)
* Mon Aug 23 2021 Brian C. Lane <bcl@redhat.com> - 35.2-1 - github: Run build-in-podman to test building package (bcl)
- New release: 35.2 (bcl) - spec: Use v2 module (bcl)
- weldr: Use assert.Contains instead of IsStringInSlice (bcl) - Makefile: Use v2 module (bcl)
- Add missing projects depsolve command (bcl) - Makefile: Add a build-in-podman target (bcl)
- Add support for projects info --distro=DISTRO-NAME (bcl) - tests: Add JSON and error result testing to status (bcl)
- Add support for projects list --distro=DISTRO-NAME (bcl) - tests: Add JSON and error result testing to sources (bcl)
- Add support for modules info --distro=DISTRO-NAME (bcl) - tests: Add JSON and error result testing to projects (bcl)
- weldr: Add distros to testState (bcl) - tests: Add JSON and error result testing to modules (bcl)
- Add support for modules list --distro=DISTRO-NAME (bcl) - tests: Add JSON and error result testing to distros (bcl)
- weldr: Add AppendQuery helper function (bcl) - tests: Add JSON and error result testing to compose (bcl)
- Add support for compose types --distro=DISTRO-NAME (bcl) - tests: Add JSON and error result testing to blueprints (bcl)
- composer-cli: Add distros list command (bcl) - test: Fix test client setup and output capture code (bcl)
- weldr: Add ListDistros function and tests (bcl) - test: Close output capture in printwrap_test (bcl)
- Makefile: Add scratch-srpm and scratch-rpm targets (bcl) - test: reset the root flags on every ExecuteTest call (bcl)
- Print filename for compose results (bcl) - status: Use ExecutionErrors for API errors (bcl)
- ExcuteTests - return the correct error variables in case of errors (atodorov) - sources: Use ExecutionErrors for API errors (bcl)
- The rpm package should obsolete composer-cli from lorax (bcl) - projects: Use ExecutionErrors for API errors (bcl)
- tests: Enable CodeCov.io (atodorov) - modules: Use ExecutionErrors for API errors (bcl)
- actions: Install lint using GOPATH (bcl) - distros: Use ExecutionErrors for API errors (bcl)
- compose: Use ExecutionErrors for API errors (bcl)
- blueprints: Use ExecutionErrors for API errors (bcl)
- composer-cli: Turn off normal command Stdout when --json is used (bcl)
- weldr: Fix Stringer interface on API messages (bcl)
- weldr: Clean up error message return code (bcl)
- weldr: Move Unmarshal error to error position (bcl)
- root: Add a helper function to print a list of errors (bcl)
- Use GetFilePath for ComposeImage (bcl)
- Use GetFilePath for ComposeResults (bcl)
- Use GetFilePath for ComposerMetadata (bcl)
- Use GetFilePath for ComposeLogs (bcl)
- weldr: Add GetFilePath to download a file to a path (bcl)
- Creating v2 module for breaking API changes (bcl)
- Makefile: Add update-mods target (bcl)
- vendor: Update the modules and vendor directory (bcl)
- Bump go version to 1.15 (bcl)
- Limit dependabot to 1 PR (bcl)
- Enable Dependabot service (atodorov)
- tests: Fix integration tests (bcl)