From 953142efaa8e12f0b4cf540026fc99814e2d2d22 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Fri, 17 Dec 2021 10:09:03 +0000 Subject: [PATCH] import osbuild-composer-40-1.el8 --- .gitignore | 2 +- .osbuild-composer.metadata | 2 +- SPECS/osbuild-composer.spec | 20 +++++++++++++------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ee60a64..8fe098e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/osbuild-composer-38.tar.gz +SOURCES/osbuild-composer-40.tar.gz diff --git a/.osbuild-composer.metadata b/.osbuild-composer.metadata index 1276e53..457c9b7 100644 --- a/.osbuild-composer.metadata +++ b/.osbuild-composer.metadata @@ -1 +1 @@ -9698cbcd423729cdb5cbf41148cbc137fb030254 SOURCES/osbuild-composer-38.tar.gz +7d5fe0ccb1502ae71f0332bc50d0f489c4e1d92d SOURCES/osbuild-composer-40.tar.gz diff --git a/SPECS/osbuild-composer.spec b/SPECS/osbuild-composer.spec index d0c1a4f..3c8701a 100644 --- a/SPECS/osbuild-composer.spec +++ b/SPECS/osbuild-composer.spec @@ -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 - 40-1 +- New upstream release + * Fri Oct 15 2021 Achilleas Koutsou - 37-1 - New upstream release