Ignition 2.3.0
This commit is contained in:
parent
c6f0f376ed
commit
8010f80671
2
.gitignore
vendored
2
.gitignore
vendored
@ -38,3 +38,5 @@
|
|||||||
/ignition-dracut-793d0ef.tar.gz
|
/ignition-dracut-793d0ef.tar.gz
|
||||||
/ignition-dracut-6136be3.tar.gz
|
/ignition-dracut-6136be3.tar.gz
|
||||||
/ignition-dracut-390779d.tar.gz
|
/ignition-dracut-390779d.tar.gz
|
||||||
|
/ignition-ee616d5.tar.gz
|
||||||
|
/ignition-dracut-7ff38d9.tar.gz
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
# https://github.com/coreos/ignition
|
# https://github.com/coreos/ignition
|
||||||
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
||||||
%global import_path %{provider_prefix}/v2
|
%global import_path %{provider_prefix}/v2
|
||||||
%global commit 2d3ff5862dc9c1dd0cc78e797f42a19964ac1f4c
|
%global commit ee616d5fb3d21babe288877e842ea137f3e68d0d
|
||||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
# define ldflags, buildflags, testflags here. The ldflags were
|
# define ldflags, buildflags, testflags here. The ldflags were
|
||||||
# taken from ./build. We will need to periodically check these
|
# taken from ./build. We will need to periodically check these
|
||||||
@ -67,22 +67,18 @@
|
|||||||
# https://github.com/coreos/ignition-dracut spec2x branch
|
# https://github.com/coreos/ignition-dracut spec2x branch
|
||||||
%global dracutprovider_prefix %{dracutprovider}.%{dracutprovider_tld}/%{dracutproject}/%{dracutrepo}
|
%global dracutprovider_prefix %{dracutprovider}.%{dracutprovider_tld}/%{dracutproject}/%{dracutrepo}
|
||||||
%global dracutimport_path %{dracutprovider_prefix}
|
%global dracutimport_path %{dracutprovider_prefix}
|
||||||
%global dracutcommit 390779da2c5b7595882a8426e2c9ec9c073c6da4
|
%global dracutcommit 7ff38d9716bf982e3f6495d85c6ce91aab72e88d
|
||||||
%global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7})
|
%global dracutshortcommit %(c=%{dracutcommit}; echo ${c:0:7})
|
||||||
|
|
||||||
|
|
||||||
Name: ignition
|
Name: ignition
|
||||||
Version: 2.2.1
|
Version: 2.3.0
|
||||||
Release: 5.git%{shortcommit}%{?dist}
|
Release: 1.git%{shortcommit}%{?dist}
|
||||||
Summary: First boot installer and configuration tool
|
Summary: First boot installer and configuration tool
|
||||||
License: ASL 2.0 and BSD
|
License: ASL 2.0 and BSD
|
||||||
URL: https://%{provider_prefix}
|
URL: https://%{provider_prefix}
|
||||||
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
||||||
Source1: https://%{dracutprovider_prefix}/archive/%{dracutcommit}/%{dracutrepo}-%{dracutshortcommit}.tar.gz
|
Source1: https://%{dracutprovider_prefix}/archive/%{dracutcommit}/%{dracutrepo}-%{dracutshortcommit}.tar.gz
|
||||||
# Upstream 73cbfa847e4319a202c360bd8cd447712d2067bc
|
|
||||||
Patch0: packet-fix-userdata-fetch.patch
|
|
||||||
# Upstream 4c2dcd547b01b2f13ced8d35263ded5fd67fa645
|
|
||||||
Patch1: packet-fix-metadata-fetch.patch
|
|
||||||
|
|
||||||
%define gopath %{_datadir}/gocode
|
%define gopath %{_datadir}/gocode
|
||||||
ExcludeArch: ppc64
|
ExcludeArch: ppc64
|
||||||
@ -132,69 +128,69 @@ BuildRequires: golang(golang.org/x/net/http/httpproxy)
|
|||||||
# Main package Provides (generated with go-mods-to-bundled-provides.py | sort)
|
# Main package Provides (generated with go-mods-to-bundled-provides.py | sort)
|
||||||
%if 0%{?with_bundled}
|
%if 0%{?with_bundled}
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awserr)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkio)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkuri)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/client/metadata)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/corehandlers)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/processcreds)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/processcreds)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/stscreds)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/csm)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/csm)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/defaults)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/ini)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/ec2metadata)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/endpoints)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/awsutil)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/request)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/session)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/signer/v4)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/ini)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/s3err)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/s3err)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkio)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkrand)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkuri)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/shareddefaults)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/rest)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/restxml)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/internal/sdkrand)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/aws/credentials/endpointcreds)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query)) = 1.19.11
|
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/aws/aws-sdk-go/private/protocol/query/queryutil)) = 1.19.11
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3iface)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/s3/s3manager)) = 1.19.11
|
||||||
|
Provides: bundled(golang(github.com/aws/aws-sdk-go/service/sts)) = 1.19.11
|
||||||
Provides: bundled(golang(github.com/coreos/go-semver/semver)) = 0.3.0
|
Provides: bundled(golang(github.com/coreos/go-semver/semver)) = 0.3.0
|
||||||
Provides: bundled(golang(github.com/coreos/go-systemd/unit)) = 0.0.0-20181031085051.git9002847aa142
|
Provides: bundled(golang(github.com/coreos/go-systemd/v22/dbus)) = 22.0.0
|
||||||
Provides: bundled(golang(github.com/coreos/go-systemd/dbus)) = 0.0.0-20181031085051.git9002847aa142
|
Provides: bundled(golang(github.com/coreos/go-systemd/v22/journal)) = 22.0.0
|
||||||
Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20190529201340.git22b159166068
|
Provides: bundled(golang(github.com/coreos/go-systemd/v22/unit)) = 22.0.0
|
||||||
Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20190529201340.git22b159166068
|
|
||||||
Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20190529201340.git22b159166068
|
|
||||||
Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20190529201340.git22b159166068
|
Provides: bundled(golang(github.com/coreos/vcontext/json)) = 0.0.0-20190529201340.git22b159166068
|
||||||
|
Provides: bundled(golang(github.com/coreos/vcontext/path)) = 0.0.0-20190529201340.git22b159166068
|
||||||
|
Provides: bundled(golang(github.com/coreos/vcontext/report)) = 0.0.0-20190529201340.git22b159166068
|
||||||
|
Provides: bundled(golang(github.com/coreos/vcontext/tree)) = 0.0.0-20190529201340.git22b159166068
|
||||||
Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20190529201340.git22b159166068
|
Provides: bundled(golang(github.com/coreos/vcontext/validate)) = 0.0.0-20190529201340.git22b159166068
|
||||||
Provides: bundled(golang(github.com/godbus/dbus)) = 0.0.0-20181025153459.git66d97aec3384
|
|
||||||
Provides: bundled(golang(github.com/google/renameio)) = 0.1.0
|
Provides: bundled(golang(github.com/google/renameio)) = 0.1.0
|
||||||
Provides: bundled(golang(github.com/google/uuid)) = 1.1.1
|
Provides: bundled(golang(github.com/google/uuid)) = 1.1.1
|
||||||
Provides: bundled(golang(github.com/pin/tftp)) = 2.1.0
|
Provides: bundled(golang(github.com/pin/tftp)) = 2.1.0
|
||||||
Provides: bundled(golang(github.com/pin/tftp/netascii)) = 2.1.0
|
Provides: bundled(golang(github.com/pin/tftp/netascii)) = 2.1.0
|
||||||
Provides: bundled(golang(github.com/stretchr/testify/assert)) = 1.3.0
|
Provides: bundled(golang(github.com/stretchr/testify/assert)) = 1.3.0
|
||||||
Provides: bundled(golang(github.com/vincent-petithory/dataurl)) = 0.0.0-20160330182126.git9a301d65acbb
|
Provides: bundled(golang(github.com/vincent-petithory/dataurl)) = 0.0.0-20160330182126.git9a301d65acbb
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcvmx)) = 0.0.0-20170707015358.git25eff159a728
|
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/vmcheck)) = 0.0.0-20170707015358.git25eff159a728
|
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcout)) = 0.0.0-20170707015358.git25eff159a728
|
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/bdoor)) = 0.0.0-20170707015358.git25eff159a728
|
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/bdoor)) = 0.0.0-20170707015358.git25eff159a728
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/message)) = 0.0.0-20170707015358.git25eff159a728
|
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/message)) = 0.0.0-20170707015358.git25eff159a728
|
||||||
|
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcout)) = 0.0.0-20170707015358.git25eff159a728
|
||||||
|
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/rpcvmx)) = 0.0.0-20170707015358.git25eff159a728
|
||||||
|
Provides: bundled(golang(github.com/vmware/vmw-guestinfo/vmcheck)) = 0.0.0-20170707015358.git25eff159a728
|
||||||
Provides: bundled(golang(github.com/vmware/vmw-ovflib)) = 0.0.0-20170608004843.git1f217b9dc714
|
Provides: bundled(golang(github.com/vmware/vmw-ovflib)) = 0.0.0-20170608004843.git1f217b9dc714
|
||||||
Provides: bundled(golang(golang.org/x/net/http/httpproxy)) = 0.0.0-20190228165749.git92fc7df08ae7
|
Provides: bundled(golang(golang.org/x/net/http/httpproxy)) = 0.0.0-20190228165749.git92fc7df08ae7
|
||||||
Provides: bundled(golang(golang.org/x/net/idna)) = 0.0.0-20190228165749.git92fc7df08ae7
|
Provides: bundled(golang(golang.org/x/net/idna)) = 0.0.0-20190228165749.git92fc7df08ae7
|
||||||
Provides: bundled(golang(golang.org/x/sys/unix)) = 0.0.0-20191110163157.gitd32e6e3b99c4
|
Provides: bundled(golang(golang.org/x/sys/unix)) = 0.0.0-20191110163157.gitd32e6e3b99c4
|
||||||
Provides: bundled(golang(golang.org/x/text/secure/bidirule)) = 0.3.0
|
Provides: bundled(golang(golang.org/x/text/secure/bidirule)) = 0.3.0
|
||||||
|
Provides: bundled(golang(golang.org/x/text/transform)) = 0.3.0
|
||||||
Provides: bundled(golang(golang.org/x/text/unicode/bidi)) = 0.3.0
|
Provides: bundled(golang(golang.org/x/text/unicode/bidi)) = 0.3.0
|
||||||
Provides: bundled(golang(golang.org/x/text/unicode/norm)) = 0.3.0
|
Provides: bundled(golang(golang.org/x/text/unicode/norm)) = 0.3.0
|
||||||
Provides: bundled(golang(golang.org/x/text/transform)) = 0.3.0
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
@ -380,8 +376,6 @@ Ignition project's Github releases page.
|
|||||||
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
# setup command reference: http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html
|
||||||
# unpack source0 and apply patches
|
# unpack source0 and apply patches
|
||||||
%setup -T -b 0 -q -n %{repo}-%{commit}
|
%setup -T -b 0 -q -n %{repo}-%{commit}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
# unpack source1 (dracut modules)
|
# unpack source1 (dracut modules)
|
||||||
%setup -T -D -a 1 -q -n %{repo}-%{commit}
|
%setup -T -D -a 1 -q -n %{repo}-%{commit}
|
||||||
@ -546,6 +540,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 05 2020 Benjamin Gilbert <bgilbert@redhat.com> - 2.3.0-1.gitee616d5
|
||||||
|
- New release
|
||||||
|
- Bump ignition-dracut
|
||||||
|
|
||||||
* Sun Apr 26 2020 Dusty Mabe <dusty@dustymabe.com> - 2.2.1-5.git2d3ff58
|
* Sun Apr 26 2020 Dusty Mabe <dusty@dustymabe.com> - 2.2.1-5.git2d3ff58
|
||||||
- Update to latest ignition-dracut for network fixes
|
- Update to latest ignition-dracut for network fixes
|
||||||
https://github.com/coreos/ignition-dracut/pull/174
|
https://github.com/coreos/ignition-dracut/pull/174
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
From 4c2dcd547b01b2f13ced8d35263ded5fd67fa645 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Gilbert <bgilbert@redhat.com>
|
|
||||||
Date: Sat, 28 Mar 2020 01:15:32 -0400
|
|
||||||
Subject: [PATCH 2/2] providers/packet: override Accept header fetching
|
|
||||||
instance metadata
|
|
||||||
|
|
||||||
Passing nil Headers is no longer sufficient to avoid the default Accept
|
|
||||||
header; we need to override it. Fixes 406 Not Acceptable error.
|
|
||||||
|
|
||||||
Fixes: 75d3e2da74ae ("Rework fetch/resource to automatically append required headers")
|
|
||||||
---
|
|
||||||
internal/providers/packet/packet.go | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/internal/providers/packet/packet.go b/internal/providers/packet/packet.go
|
|
||||||
index 8771734..613a6ba 100644
|
|
||||||
--- a/internal/providers/packet/packet.go
|
|
||||||
+++ b/internal/providers/packet/packet.go
|
|
||||||
@@ -71,8 +71,10 @@ func FetchConfig(f *resource.Fetcher) (types.Config, report.Report, error) {
|
|
||||||
func PostStatus(stageName string, f resource.Fetcher, errMsg error) error {
|
|
||||||
f.Logger.Info("POST message to Packet Timeline")
|
|
||||||
// fetch JSON from https://metadata.packet.net/metadata
|
|
||||||
+ headers := make(http.Header)
|
|
||||||
+ headers.Set("Accept", "*/*")
|
|
||||||
data, err := f.FetchToBuffer(metadataUrl, resource.FetchOptions{
|
|
||||||
- Headers: nil,
|
|
||||||
+ Headers: headers,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 73cbfa847e4319a202c360bd8cd447712d2067bc Mon Sep 17 00:00:00 2001
|
|
||||||
From: Benjamin Gilbert <bgilbert@redhat.com>
|
|
||||||
Date: Sat, 28 Mar 2020 01:07:54 -0400
|
|
||||||
Subject: [PATCH 1/2] resource/url: allow caller-specified headers to override
|
|
||||||
defaults
|
|
||||||
|
|
||||||
Set defaults first, then override them with caller-specified headers.
|
|
||||||
Fixes default Accept header causing 406 Not Acceptable when fetching
|
|
||||||
userdata on Packet.
|
|
||||||
|
|
||||||
Fixes: 75d3e2da74ae ("Rework fetch/resource to automatically append required headers")
|
|
||||||
---
|
|
||||||
internal/resource/url.go | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/internal/resource/url.go b/internal/resource/url.go
|
|
||||||
index c304758..d08964a 100644
|
|
||||||
--- a/internal/resource/url.go
|
|
||||||
+++ b/internal/resource/url.go
|
|
||||||
@@ -257,14 +257,14 @@ func (f *Fetcher) fetchFromHTTP(u url.URL, dest io.Writer, opts FetchOptions) er
|
|
||||||
// TODO use .Clone() when we have a new enough golang
|
|
||||||
// (With Rust, we'd have immutability and wouldn't need to defensively clone)
|
|
||||||
headers := make(http.Header)
|
|
||||||
- for k, va := range opts.Headers {
|
|
||||||
+ for k, va := range configHeaders {
|
|
||||||
for _, v := range va {
|
|
||||||
- headers.Add(k, v)
|
|
||||||
+ headers.Set(k, v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- for k, va := range configHeaders {
|
|
||||||
+ for k, va := range opts.Headers {
|
|
||||||
for _, v := range va {
|
|
||||||
- headers.Add(k, v)
|
|
||||||
+ headers.Set(k, v)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.24.1
|
|
||||||
|
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (ignition-2d3ff58.tar.gz) = 116450e0a4afb8a38fa0c0e925f7ee56ec6bab42b43cc5e314c882d74d44065be35bbf224cd45177ae788eb4be98181c0c19b3987a488d5d8ad6048e952ecbd1
|
SHA512 (ignition-ee616d5.tar.gz) = 179e916ff97b3a6cd98c49cde7f2fbb213afbca29c33a3e58d2ca9c52dd6f51129bb47c72aec82911f251d6c3e43867109dcf6f4b97429b8383f5fc81be04e3f
|
||||||
SHA512 (ignition-dracut-390779d.tar.gz) = a282b21e094b6660e52d0c7843f53426a76838907c5cb36508e4d7616d66eb519a8a7480bff69f2e2f17b973321a563b8fa9ec1565292b892973e9f07019c4cc
|
SHA512 (ignition-dracut-7ff38d9.tar.gz) = acbee4af287ec03b2044d0bf4592ace2f9e36d6daf66251dc1d9214f7f2aa93b92afe11142d0311d7c4b3292e01303ce87111a377f0b83b4116715ec23b31332
|
||||||
|
Loading…
Reference in New Issue
Block a user