import osbuild-composer-40-1.el8

This commit is contained in:
CentOS Sources 2021-12-17 10:09:03 +00:00 committed by Stepan Oksanichenko
parent 7abc789150
commit 953142efaa
3 changed files with 15 additions and 9 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/osbuild-composer-38.tar.gz
SOURCES/osbuild-composer-40.tar.gz

View File

@ -1 +1 @@
9698cbcd423729cdb5cbf41148cbc137fb030254 SOURCES/osbuild-composer-38.tar.gz
7d5fe0ccb1502ae71f0332bc50d0f489c4e1d92d SOURCES/osbuild-composer-40.tar.gz

View File

@ -4,7 +4,7 @@
%global goipath github.com/osbuild/osbuild-composer
Version: 38
Version: 40
%gometa
@ -113,6 +113,7 @@ sed -i "s/openapi3.Swagger/openapi3.T/;s/openapi3.NewSwaggerLoader().LoadSwagger
%endif
%build
export GOFLAGS="-buildmode=pie"
%if 0%{?rhel}
GO_BUILD_PATH=$PWD/_build
install -m 0755 -vd $(dirname $GO_BUILD_PATH/src/%{goipath})
@ -121,7 +122,7 @@ 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
export GOFLAGS+=" -mod=vendor"
%endif
# Set the commit hash so that composer can report what source version
@ -130,7 +131,7 @@ export GOFLAGS=-mod=vendor
%if %{?commit:1}0
export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/common.GitRev=%{commit}'"
%endif
export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/common.RpmVersion=%{name}-%{epoch}:%{version}-%{release}.%{_arch}'"
export LDFLAGS="${LDFLAGS} -X 'github.com/osbuild/osbuild-composer/internal/common.RpmVersion=%{name}-%{?epoch:%epoch:}%{version}-%{release}.%{_arch}'"
%gobuild -o _bin/osbuild-composer %{goipath}/cmd/osbuild-composer
%gobuild -o _bin/osbuild-worker %{goipath}/cmd/osbuild-worker
@ -159,6 +160,7 @@ go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-image-te
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-auth-tests %{goipath}/cmd/osbuild-auth-tests
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-koji-tests %{goipath}/cmd/osbuild-koji-tests
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-dbjobqueue-tests %{goipath}/cmd/osbuild-composer-dbjobqueue-tests
go test -c -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-composer-manifest-tests %{goipath}/cmd/osbuild-composer-manifest-tests
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/cloud-cleaner %{goipath}/cmd/cloud-cleaner
go build -tags=integration -ldflags="${TEST_LDFLAGS}" -o _bin/osbuild-mock-openid-provider %{goipath}/cmd/osbuild-mock-openid-provider
@ -224,6 +226,7 @@ install -m 0755 -vp _bin/osbuild-image-tests %{buildroot}%{_l
install -m 0755 -vp _bin/osbuild-auth-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp _bin/osbuild-koji-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp _bin/osbuild-composer-dbjobqueue-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp _bin/osbuild-composer-manifest-tests %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp _bin/cloud-cleaner %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp _bin/osbuild-mock-openid-provider %{buildroot}%{_libexecdir}/osbuild-composer-test/
install -m 0755 -vp tools/define-compose-url.sh %{buildroot}%{_libexecdir}/osbuild-composer-test/
@ -281,8 +284,9 @@ install -m 0644 -vp internal/jobqueue/dbjobqueue/schemas/* %{buildroot}%{_d
%endif
%check
export GOFLAGS="-buildmode=pie"
%if 0%{?rhel}
export GOFLAGS=-mod=vendor
export GOFLAGS+=" -mod=vendor"
export GOPATH=$PWD/_build:%{gopath}
# cd inside GOPATH, otherwise go with GO111MODULE=off ignores vendor directory
cd $PWD/_build/src/%{goipath}
@ -326,8 +330,8 @@ The core osbuild-composer binary. This is suitable both for spawning in containe
Summary: The worker for osbuild-composer
Requires: systemd
Requires: qemu-img
Requires: osbuild >= 37
Requires: osbuild-ostree >= 37
Requires: osbuild >= 41
Requires: osbuild-ostree >= 41
Requires: %{name}-dnf-json = %{version}-%{release}
# remove in F34
@ -355,7 +359,6 @@ if [ -d /run/systemd/system ]; then
systemctl stop "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
fi
%postun worker
# restart all the worker services
%systemd_postun_with_restart "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
@ -440,6 +443,9 @@ Integration tests to be run on a pristine-dedicated system to test the osbuild-c
%endif
%changelog
* Thu Dec 09 2021 Ondřej Budai <ondrej@budai.cz> - 40-1
- New upstream release
* Fri Oct 15 2021 Achilleas Koutsou <achilleas@redhat.com> - 37-1
- New upstream release