mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-20 22:11:39 +02:00
app-emulation/rkt: Bump to 1.30.0
This commit is contained in:
parent
534f6e78ac
commit
debde7b045
@ -1,68 +0,0 @@
|
||||
From ce936a91678b77a2b91440e0198c895519ca8b24 Mon Sep 17 00:00:00 2001
|
||||
From: Luca Bruno <luca.bruno@coreos.com>
|
||||
Date: Mon, 23 Oct 2017 08:49:09 +0000
|
||||
Subject: [PATCH] stage0/run: relax '--hosts-entry' parser
|
||||
|
||||
This tweaks the '--hosts-entry' CLI flag parser to accept multiple
|
||||
time the special value "host" when there are no other conflicting
|
||||
settings.
|
||||
---
|
||||
rkt/run.go | 14 +++++++-------
|
||||
tests/rkt_etc_hosts_test.go | 5 +++++
|
||||
2 files changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/rkt/run.go b/rkt/run.go
|
||||
index b852e13a6..ab4121475 100644
|
||||
--- a/rkt/run.go
|
||||
+++ b/rkt/run.go
|
||||
@@ -18,6 +18,7 @@ package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
+ "errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
@@ -643,13 +644,8 @@ func parseDNSFlags(flagHostsEntries, flagDNS, flagDNSSearch, flagDNSOpt []string
|
||||
// Parse out --hosts-entries, also looking for the magic value "host"
|
||||
for _, entry := range flagHostsEntries {
|
||||
if entry == "host" {
|
||||
- if len(flagHostsEntries) == 1 {
|
||||
- DNSConfMode.Hosts = "host"
|
||||
- } else {
|
||||
- return DNSConfMode, DNSConfig, &HostsEntries,
|
||||
- fmt.Errorf("cannot pass --hosts-entry=host with multiple hosts-entries")
|
||||
- }
|
||||
- break
|
||||
+ DNSConfMode.Hosts = "host"
|
||||
+ continue
|
||||
}
|
||||
for _, entry := range strings.Split(entry, ",") {
|
||||
vals := strings.SplitN(entry, "=", 2)
|
||||
@@ -677,6 +673,10 @@ func parseDNSFlags(flagHostsEntries, flagDNS, flagDNSSearch, flagDNSOpt []string
|
||||
}
|
||||
|
||||
if len(HostsEntries) > 0 {
|
||||
+ if DNSConfMode.Hosts == "host" {
|
||||
+ return DNSConfMode, DNSConfig, &HostsEntries,
|
||||
+ errors.New("cannot pass --hosts-entry=host with multiple hosts-entries")
|
||||
+ }
|
||||
DNSConfMode.Hosts = "stage0"
|
||||
}
|
||||
|
||||
diff --git a/tests/rkt_etc_hosts_test.go b/tests/rkt_etc_hosts_test.go
|
||||
index 374916834..b3967cf6e 100644
|
||||
--- a/tests/rkt_etc_hosts_test.go
|
||||
+++ b/tests/rkt_etc_hosts_test.go
|
||||
@@ -80,6 +80,11 @@ func TestEtcHosts(t *testing.T) {
|
||||
"--exec=/inspect -- -file-name=/etc/hosts -hash-file",
|
||||
sum,
|
||||
},
|
||||
+ { // Test that multiple '--hosts-entry=host' entries are fine
|
||||
+ "--hosts-entry=host --hosts-entry=host",
|
||||
+ "--exec=/inspect -- -file-name=/etc/hosts -hash-file",
|
||||
+ sum,
|
||||
+ },
|
||||
{ // test that we create our own
|
||||
"--hosts-entry=128.66.0.99=host1",
|
||||
"--exec=/inspect -- -file-name=/etc/hosts -read-file",
|
@ -20,7 +20,7 @@ if [[ "${PV}" == "9999" ]]; then
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
else
|
||||
KEYWORDS="amd64 arm64"
|
||||
CROS_WORKON_COMMIT="6de500a70706403c8c611d80491aea64019141b0" # v1.29.0
|
||||
CROS_WORKON_COMMIT="e04dd994baa1051f1205578d12d69eec83dbb905" # v1.30.0
|
||||
fi
|
||||
|
||||
PXE_VERSION="1478.0.0"
|
||||
@ -87,8 +87,6 @@ src_prepare() {
|
||||
die "CoreOS versions in ebuild and rkt build scripts are mismatched, expecting ${rkt_coreos_version}!"
|
||||
fi
|
||||
|
||||
epatch "${FILESDIR}/${PN}-1.29.0-allow-multiple-hosts-entry-host.patch"
|
||||
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user