From d20a7e35d1301512af7a4c23afc1cce13ed4a711 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 26 Nov 2024 19:41:04 +0300 Subject: [PATCH] import weldr-client-35.11-4.el10 --- .gitignore | 2 + .weldr-client.metadata | 2 + SOURCES/weldr-client-35.11.tar.gz.asc | 11 ++ SPECS/weldr-client.spec | 150 ++++++++++++++++++++++++++ 4 files changed, 165 insertions(+) create mode 100644 .gitignore create mode 100644 .weldr-client.metadata create mode 100644 SOURCES/weldr-client-35.11.tar.gz.asc create mode 100644 SPECS/weldr-client.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..58ac3a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/gpg-117E8C168EFE3A7F.key +SOURCES/weldr-client-35.11.tar.gz diff --git a/.weldr-client.metadata b/.weldr-client.metadata new file mode 100644 index 0000000..c4ef0e4 --- /dev/null +++ b/.weldr-client.metadata @@ -0,0 +1,2 @@ +33eda006daafd903c8fff6a6b688430354063395 SOURCES/gpg-117E8C168EFE3A7F.key +c379b374c9f5adbaec24531770b7088a07c1ebe3 SOURCES/weldr-client-35.11.tar.gz diff --git a/SOURCES/weldr-client-35.11.tar.gz.asc b/SOURCES/weldr-client-35.11.tar.gz.asc new file mode 100644 index 0000000..83af156 --- /dev/null +++ b/SOURCES/weldr-client-35.11.tar.gz.asc @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEEtMa0UeT6i0IyyhkeEX6MFo7+On8FAmSCVqIACgkQEX6MFo7+ +On9Hdgf/ZpcS9b6fua0okyHmFiopJzaha1h9Gl0DXbpaJCoPhz9QwWqiDsxPXtBu +dDBhOLanewqFNKFe4y0GqHGPXIxLGrJxS1qpStzOdGj6WDywXnaO1TrFCerPOfk8 +EfnWlcuevhEwGUY3GtX4bcEUJVXXYR//PTu4dH/JnxYb8oR395uHm7vUda3pGY/G +dtG7fSMD+8fAnPFEEgPzoiskrg7S2lueQg1DISVRk7CxewOBrFDEU4KxU4V7+yqw +uYZfMwmViOprfTWVOmUumdiAqFs4cKFrpbLLOsuPCd+j8xZ6NMAyLDOxxyoUNhL+ +37pn544iBj0/vJAJOudgV9ViEG0XGQ== +=dIJO +-----END PGP SIGNATURE----- diff --git a/SPECS/weldr-client.spec b/SPECS/weldr-client.spec new file mode 100644 index 0000000..c192dfc --- /dev/null +++ b/SPECS/weldr-client.spec @@ -0,0 +1,150 @@ +# Pass --without tests to skip building composer-cli-tests +%bcond_without 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.11 +Release: 4%{?dist} +# Upstream license specification: Apache-2.0 +License: Apache-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 +* Mon Jun 24 2024 Troy Dawson - 35.11-4 +- Bump release for June 2024 mass rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 35.11-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 35.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 08 2023 Brian C. Lane - 35.11-1 +- New release: 35.11 (bcl) +- build(deps): bump github.com/BurntSushi/toml from 1.3.0 to 1.3.1 (49699333+dependabot[bot]) +- build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (49699333+dependabot[bot]) +- CI: Update terraform hash (bcl) +- build(deps): bump github.com/BurntSushi/toml from 1.2.1 to 1.3.0 (49699333+dependabot[bot]) +- build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (49699333+dependabot[bot]) +- docs: fix typo/formatting in HACKING.md (idiez) +- Add release creation documentation (bcl) \ No newline at end of file