Ignition 2.7.0

This commit is contained in:
Stephen Lowrie 2020-10-14 00:57:15 -05:00
parent e0fdfe16ef
commit 2c158893d7
4 changed files with 27 additions and 51 deletions

1
.gitignore vendored
View File

@ -48,3 +48,4 @@
/ignition-dracut-6b1d128.tar.gz
/ignition-0d6f3e5.tar.gz
/ignition-947598e.tar.gz
/ignition-5be43fd.tar.gz

View File

@ -1,42 +0,0 @@
From 34e18b247876eb9b42417ca2702b047f29670fca Mon Sep 17 00:00:00 2001
From: Benjamin Gilbert <bgilbert@redhat.com>
Date: Tue, 11 Aug 2020 08:11:58 -0400
Subject: [PATCH] blkid: fix invalid pointer cast in DumpDisk()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
LogicalSectorSize is a Go int (64 bits on 64-bit systems) and the
argument to blkid_get_logical_sector_size() is a C int * (pointer to
32 bits). The value fits in 32 bits and the field is initialized to
zero, so we get away with this on little-endian systems, but not on
s390x.
See also 76a71f08d3c1.
Reported-by: Jakub Čajka <jcajka@redhat.com>
---
internal/exec/util/blkid.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/internal/exec/util/blkid.go b/internal/exec/util/blkid.go
index 8e53e26c..3888ce54 100644
--- a/internal/exec/util/blkid.go
+++ b/internal/exec/util/blkid.go
@@ -147,10 +147,11 @@ func DumpDisk(device string) (DiskInfo, error) {
cDevice := C.CString(device)
defer C.free(unsafe.Pointer(cDevice))
- cSectorSizeRef := (*C.int)(unsafe.Pointer(&output.LogicalSectorSize))
- if err := cResultToErr(C.blkid_get_logical_sector_size(cDevice, cSectorSizeRef), device); err != nil {
+ var sectorSize C.int
+ if err := cResultToErr(C.blkid_get_logical_sector_size(cDevice, &sectorSize), device); err != nil {
return DiskInfo{}, err
}
+ output.LogicalSectorSize = int(sectorSize)
numParts := C.int(0)
cNumPartsRef := (*C.int)(unsafe.Pointer(&numParts))
--
2.25.4

View File

@ -49,7 +49,7 @@
# https://github.com/coreos/ignition
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}/v2
%global commit 947598ed908b374c50028f260eb52da9795a4ba4
%global commit 5be43fd39ddeed32efe90d69cec57e2cae3bd8a8
%global shortcommit %(c=%{commit}; echo ${c:0:7})
# define ldflags, buildflags, testflags here. The ldflags were
# taken from ./build. We will need to periodically check these
@ -60,15 +60,12 @@
%global dracutlibdir %{_prefix}/lib/dracut
Name: ignition
Version: 2.6.0
Release: 2.git%{shortcommit}%{?dist}
Version: 2.7.0
Release: 1.git%{shortcommit}%{?dist}
Summary: First boot installer and configuration tool
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
# Fix sector size detection on s390x
# https://github.com/coreos/ignition/pull/1070
Patch0: blkid-fix-invalid-pointer-cast-in-DumpDisk.patch
%define gopath %{_datadir}/gocode
ExcludeArch: ppc64
@ -247,6 +244,22 @@ Provides: bundled(golang(google.golang.org/genproto/googleapis/iam/v1)) = 0.0.0-
Provides: bundled(golang(google.golang.org/genproto/googleapis/rpc/code)) = 0.0.0-20200610104632.gita5b850bcf112
Provides: bundled(golang(google.golang.org/genproto/googleapis/rpc/status)) = 0.0.0-20200610104632.gita5b850bcf112
Provides: bundled(golang(google.golang.org/genproto/googleapis/type/expr)) = 0.0.0-20200610104632.gita5b850bcf112
Provides: bundled(golang(go.opencensus.io)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/internal)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/internal/tagencoding)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/metric/metricdata)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/metric/metricproducer)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/plugin/ochttp)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/plugin/ochttp/propagation/b3)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/resource)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/stats)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/stats/internal)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/stats/view)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/tag)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/trace)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/trace/internal)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/trace/propagation)) = 0.22.5
Provides: bundled(golang(go.opencensus.io/trace/tracestate)) = 0.22.5
%endif
@ -432,7 +445,6 @@ Ignition project's Github releases page.
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
# unpack source0 and apply patches
%setup -T -b 0 -q -n %{repo}-%{commit}
%patch0 -p1
%build
# Set up PWD as a proper import path for go
@ -550,6 +562,8 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%gotest %{import_path}/config/v3_0/types
%gotest %{import_path}/config/v3_1
%gotest %{import_path}/config/v3_1/types
%gotest %{import_path}/config/v3_2
%gotest %{import_path}/config/v3_2/types
%gotest %{import_path}/config/validate
%gotest %{import_path}/internal/exec/stages/files
%gotest %{import_path}/internal/exec/util
@ -563,7 +577,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%files
%license LICENSE
%doc README.md doc/
%doc README.md docs/
%{dracutlibdir}/modules.d/*
%{_prefix}/lib/systemd/system/*.service
@ -592,6 +606,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif
%changelog
* Wed Oct 14 2020 Stephen Lowrie <slowrie@redhat.com> - 2.7.0-1.git5be43fd
- New release
* Wed Aug 12 2020 Benjamin Gilbert <bgilbert@redhat.com> - 2.6.0-2.git947598e
- Fix sector size detection on s390x

View File

@ -1 +1 @@
SHA512 (ignition-947598e.tar.gz) = ffdaab6d3ab25c1d95515b14ba54c7ca5c6adcc98cb73e74b911caf6f082d8648dc35eddeb4886b8f87dd884b80084f1432b4707362e20e5ebe9bd498aeb4edd
SHA512 (ignition-5be43fd.tar.gz) = 6d3cbb966f95695201795d85e0c322d90f5f9e8dbd161f2cefdd819efc597fdc46791dba4cfc3c3965afb646cd635ba67d4268b2940f372dfd224fa8aaaf57b6