|
|
ab30dd |
# Pass --with tests to rpmbuild to build composer-cli-tests
|
|
|
ab30dd |
%bcond_with tests
|
|
|
ab30dd |
# Pass --without signed to skip gpg signed tar.gz (DO NOT DO THAT IN PRODUCTION)
|
|
|
ab30dd |
%bcond_without signed
|
|
|
ab30dd |
|
|
|
ab30dd |
%global goipath github.com/osbuild/weldr-client/v2
|
|
|
ab30dd |
|
|
|
ab30dd |
Name: weldr-client
|
|
|
de19e9 |
Version: 35.9
|
|
|
de19e9 |
Release: 1%{?dist}
|
|
|
ab30dd |
# Upstream license specification: Apache-2.0
|
|
|
ab30dd |
License: ASL 2.0
|
|
|
ab30dd |
Summary: Command line utility to control osbuild-composer
|
|
|
de19e9 |
|
|
|
de19e9 |
%gometa
|
|
|
ab30dd |
Url: %{gourl}
|
|
|
ab30dd |
Source0: https://github.com/osbuild/weldr-client/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
|
|
ab30dd |
%if %{with signed}
|
|
|
ab30dd |
Source1: https://github.com/osbuild/weldr-client/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc
|
|
|
ab30dd |
Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/117E8C168EFE3A7F#/gpg-117E8C168EFE3A7F.key
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
Obsoletes: composer-cli < 35.0
|
|
|
ab30dd |
Provides: composer-cli = %{version}-%{release}
|
|
|
ab30dd |
|
|
|
de19e9 |
Requires: diffutils
|
|
|
ab30dd |
|
|
|
ab30dd |
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
|
|
ab30dd |
%if 0%{?fedora}
|
|
|
ab30dd |
BuildRequires: golang(github.com/BurntSushi/toml)
|
|
|
ab30dd |
BuildRequires: golang(github.com/spf13/cobra)
|
|
|
ab30dd |
# Required for tests and %check
|
|
|
ab30dd |
BuildRequires: golang(github.com/stretchr/testify/assert)
|
|
|
ab30dd |
BuildRequires: golang(github.com/stretchr/testify/require)
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
BuildRequires: git-core
|
|
|
ab30dd |
BuildRequires: make
|
|
|
ab30dd |
BuildRequires: gnupg2
|
|
|
ab30dd |
|
|
|
ab30dd |
|
|
|
ab30dd |
%description
|
|
|
ab30dd |
Command line utility to control osbuild-composer
|
|
|
ab30dd |
|
|
|
ab30dd |
%prep
|
|
|
ab30dd |
%if %{with signed}
|
|
|
ab30dd |
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
%if 0%{?rhel}
|
|
|
ab30dd |
%forgeautosetup -p1
|
|
|
ab30dd |
%else
|
|
|
ab30dd |
%goprep
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
%build
|
|
|
ab30dd |
export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} "
|
|
|
ab30dd |
|
|
|
ab30dd |
%if 0%{?rhel}
|
|
|
ab30dd |
GO_BUILD_PATH=$PWD/_build
|
|
|
ab30dd |
install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath})
|
|
|
ab30dd |
ln -fs $PWD $GO_BUILD_PATH/src/%{goipath}
|
|
|
ab30dd |
cd $GO_BUILD_PATH/src/%{goipath}
|
|
|
ab30dd |
install -m 0755 -vd _bin
|
|
|
ab30dd |
export PATH=$PWD/_bin${PATH:+:$PATH}
|
|
|
ab30dd |
export GOPATH=$GO_BUILD_PATH:%{gopath}
|
|
|
ab30dd |
export GOFLAGS=-mod=vendor
|
|
|
ab30dd |
%else
|
|
|
ab30dd |
export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"
|
|
|
ab30dd |
export GO111MODULE=off
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
%gobuild -o composer-cli %{goipath}/cmd/composer-cli
|
|
|
ab30dd |
|
|
|
ab30dd |
|
|
|
ab30dd |
## TODO
|
|
|
ab30dd |
##make man
|
|
|
ab30dd |
|
|
|
ab30dd |
%if %{with tests} || 0%{?rhel}
|
|
|
ab30dd |
export BUILDTAGS="integration"
|
|
|
ab30dd |
|
|
|
ab30dd |
# Build test binaries with `go test -c`, so that they can take advantage of
|
|
|
ab30dd |
# golang's testing package. The RHEL golang rpm macros don't support building them
|
|
|
ab30dd |
# directly. Thus, do it manually, taking care to also include a build id.
|
|
|
ab30dd |
#
|
|
|
ab30dd |
# On Fedora go modules have already been turned off, and the path set to the one into which
|
|
|
ab30dd |
# the golang-* packages install source code.
|
|
|
ab30dd |
export LDFLAGS="${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(od -N 20 -An -tx1 -w100 /dev/urandom | tr -d ' ')"
|
|
|
ab30dd |
go test -c -tags=integration -buildmode pie -compiler gc -ldflags="${LDFLAGS}" -o composer-cli-tests %{goipath}/weldr
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
%install
|
|
|
ab30dd |
make DESTDIR=%{buildroot} install
|
|
|
ab30dd |
|
|
|
ab30dd |
%if %{with tests} || 0%{?rhel}
|
|
|
ab30dd |
make DESTDIR=%{buildroot} install-tests
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
%check
|
|
|
ab30dd |
%if 0%{?fedora}
|
|
|
ab30dd |
export GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"
|
|
|
ab30dd |
export GO111MODULE=off
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
# Run the unit tests
|
|
|
ab30dd |
export LDFLAGS="-X %{goipath}/cmd/composer-cli/root.Version=%{version} "
|
|
|
ab30dd |
make test
|
|
|
ab30dd |
|
|
|
ab30dd |
|
|
|
ab30dd |
%files
|
|
|
ab30dd |
%license LICENSE
|
|
|
ab30dd |
%doc examples HACKING.md README.md
|
|
|
ab30dd |
%{_bindir}/composer-cli
|
|
|
ab30dd |
%dir %{_sysconfdir}/bash_completion.d
|
|
|
ab30dd |
%{_sysconfdir}/bash_completion.d/composer-cli
|
|
|
ab30dd |
%{_mandir}/man1/composer-cli*
|
|
|
ab30dd |
|
|
|
ab30dd |
%if %{with tests} || 0%{?rhel}
|
|
|
ab30dd |
%package tests
|
|
|
ab30dd |
Summary: Integration tests for composer-cli
|
|
|
ab30dd |
|
|
|
de19e9 |
Requires: createrepo_c
|
|
|
de19e9 |
|
|
|
ab30dd |
%description tests
|
|
|
ab30dd |
Integration tests to be run on a pristine-dedicated system to test the
|
|
|
ab30dd |
composer-cli package.
|
|
|
ab30dd |
|
|
|
ab30dd |
%files tests
|
|
|
ab30dd |
%license LICENSE
|
|
|
ab30dd |
%{_libexecdir}/tests/composer-cli/
|
|
|
ab30dd |
%endif
|
|
|
ab30dd |
|
|
|
ab30dd |
|
|
|
ab30dd |
%changelog
|
|
|
de19e9 |
* Wed Nov 30 2022 Brian C. Lane <bcl@redhat.com> - 35.9-1
|
|
|
de19e9 |
- Copy rhel-92.json test repository from osbuild-composer
|
|
|
de19e9 |
- Update osbuild-composer test repositories from osbuild-composer
|
|
|
de19e9 |
- New release: 35.9 (bcl)
|
|
|
de19e9 |
Resolves: rhbz#2164560
|
|
|
de19e9 |
- tests: Replace os.MkdirTemp with t.TempDir (bcl)
|
|
|
de19e9 |
- blueprint save: Allow overriding bad blueprint names (bcl)
|
|
|
de19e9 |
- tests: Clean up checking err in tests (bcl)
|
|
|
de19e9 |
- composer-cli: Implement blueprints diff (bcl)
|
|
|
de19e9 |
- saveBlueprint: Return the filename to the caller (bcl)
|
|
|
de19e9 |
- composer-cli: Add tests for using --commit with old servers (bcl)
|
|
|
de19e9 |
- weldr: Return error about the blueprints change route (bcl)
|
|
|
de19e9 |
- weldr: Save the http status code as part of APIResponse (bcl)
|
|
|
de19e9 |
- Add --commit support to blueprints save (bcl)
|
|
|
de19e9 |
- Add --commit to blueprints show (bcl)
|
|
|
de19e9 |
- gitleaks: Exclude the test password used in tests (bcl)
|
|
|
de19e9 |
- ci: add tags to AWS instances (tlavocat)
|
|
|
de19e9 |
- Update github.com/BurntSushi/toml to 1.2.1
|
|
|
de19e9 |
- Update github.com/stretchr/testify to 1.8.1
|
|
|
de19e9 |
- Update bump github.com/spf13/cobra to 1.6.1
|
|
|
de19e9 |
- New release: 35.8 (bcl)
|
|
|
de19e9 |
- completion: Remove providers from bash completion script (bcl)
|
|
|
de19e9 |
- completion: Filter out new headers from compose list (bcl)
|
|
|
de19e9 |
- docs: Remove unneeded Long descriptions (bcl)
|
|
|
de19e9 |
- docs: Use a custom help template (bcl)
|
|
|
de19e9 |
- docs: Add more command documentation (bcl)
|
|
|
de19e9 |
- cmdline: Add package glob support to modules list command (bcl)
|
|
|
de19e9 |
- workflow: Add govulncheck on go v1.18 (bcl)
|
|
|
de19e9 |
- tests: Update to use golangci-lint 1.49.0 (bcl)
|
|
|
de19e9 |
- New release: 35.7 (bcl)
|
|
|
de19e9 |
- spec: Move %%gometa macro above %%gourl (bcl)
|
|
|
de19e9 |
- weldr: When starting a compose pass size as bytes, not MiB (bcl)
|
|
|
de19e9 |
- tests: Use correct size value in bytes for test (bcl)
|
|
|
de19e9 |
- workflow: Add Go 1.18 to text matrix (bcl)
|
|
|
de19e9 |
- Replace deprecated ioutil functions (bcl)
|
|
|
de19e9 |
- New release: 35.6 (bcl)
|
|
|
de19e9 |
- tests: Update tests for osbuild-composer changes (bcl)
|
|
|
de19e9 |
- CMD: Compose status format (eloy.coto)
|
|
|
de19e9 |
- CMD: Compose list format (eloy.coto)
|
|
|
de19e9 |
- tests: Update tests to check for JSON list output (bcl)
|
|
|
de19e9 |
- composer-cli: Change JSON output to be a list of objects (bcl)
|
|
|
de19e9 |
- weldr: Simplify the old ComposeLog, etc. functions (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to blueprints freeze save command (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to blueprints save command (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to compose logs command (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to compose image command (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to compose metadata command (bcl)
|
|
|
de19e9 |
- composer-cli: Add --filename to compose results command (bcl)
|
|
|
de19e9 |
- weldr: Add saving to a new filename to GetFilePath function (bcl)
|
|
|
de19e9 |
- github: Fix issue with codecov and forced pushes in PRs (bcl)
|
|
|
de19e9 |
- Use golangci-lint 1.45.2 in workflow (bcl)
|
|
|
de19e9 |
- Run workflow tests for go 1.16.x and 1.17.x (bcl)
|
|
|
de19e9 |
- Move go.mod to go 1.16 (bcl)
|
|
|
de19e9 |
- workflows/trigger-gitlab: run Gitlab CI in new image-builder project (jrusz)
|
|
|
de19e9 |
- Update GitHub actions/setup-go to 3
|
|
|
de19e9 |
- Update GitHub actions/checkout to 3
|
|
|
de19e9 |
|
|
|
4c6c7a |
* Wed Aug 24 2022 Brian C. Lane <bcl@redhat.com> - 35.5-4
|
|
|
4c6c7a |
- tests: Add osbuild-composer repo file for RHEL 9.1
|
|
|
4c6c7a |
Related: rhbz#2118831
|
|
|
4c6c7a |
|
|
|
4c6c7a |
* Tue Aug 23 2022 Brian C. Lane <bcl@redhat.com> - 35.5-3
|
|
|
4c6c7a |
- tests: Update tests for osbuild composer changes
|
|
|
4c6c7a |
Resolves: rhbz#2118831
|
|
|
4c6c7a |
|
|
|
ab30dd |
* Wed Feb 16 2022 Brian C. Lane <bcl@redhat.com> - 35.5-2
|
|
|
ab30dd |
- Switch to tmt tests instead of STI and update repo urls
|
|
|
ab30dd |
Related: rhbz#2052601
|
|
|
ab30dd |
|
|
|
ab30dd |
* Tue Feb 15 2022 Brian C. Lane <bcl@redhat.com> - 35.5-1
|
|
|
ab30dd |
- New release: 35.5 (bcl)
|
|
|
ab30dd |
Resolves: rhbz#2052601
|
|
|
ab30dd |
- docs: Explain how to undo blueprints delete (bcl)
|
|
|
ab30dd |
- test: server status no longer returns devel (bcl)
|
|
|
ab30dd |
- Use GetFrozenBlueprintsTOML for blueprints freeze save (bcl)
|
|
|
ab30dd |
- Add a test for float uid/gid in frozen blueprint (bcl)
|
|
|
ab30dd |
- Use GetBlueprintsTOML for blueprints save (bcl)
|
|
|
ab30dd |
- test: Add a test for float uid/gid in saved blueprint (bcl)
|
|
|
ab30dd |
- build(deps): bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (49699333+dependabot[bot])
|
|
|
ab30dd |
- tests: trigger on push to main (jrusz)
|
|
|
ab30dd |
- build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (49699333+dependabot[bot])
|
|
|
ab30dd |
- ci: add keystore for sonarqube (jrusz)
|
|
|
ab30dd |
- spec: Switch to using %%gobuild macro on Fedora (bcl)
|
|
|
ab30dd |
- ci: change workflow name (jrusz)
|
|
|
ab30dd |
- ci: add gitlab-ci and sonarqube (jrusz)
|
|
|
ab30dd |
- doc: fix example links from the README (tdecacqu)
|
|
|
ab30dd |
- build(deps): bump actions/checkout from 2.3.4 to 2.4.0 (49699333+dependabot[bot])
|
|
|
ab30dd |
- ci: Enable Coverity Scan tool (atodorov)
|