Drop old patch files

This commit is contained in:
Benjamin Gilbert 2019-03-27 18:23:49 -04:00
parent d551c56f90
commit 0b9a765df3
2 changed files with 0 additions and 122 deletions

View File

@ -1,29 +0,0 @@
From 6e7a0683788906bb7ae21a708d5519481d6d058f Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
Date: Wed, 20 Mar 2019 16:14:29 -0400
Subject: [PATCH] stages/files: Also relabel subuid/subgid files
Those get touched by `useradd` and so we need relabeling if we added any
users or groups.
Closes: #762
---
internal/exec/stages/files/passwd.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/internal/exec/stages/files/passwd.go b/internal/exec/stages/files/passwd.go
index 1ae0f02..58fde2e 100644
--- a/internal/exec/stages/files/passwd.go
+++ b/internal/exec/stages/files/passwd.go
@@ -38,6 +38,8 @@ func (s *stage) createPasswd(config types.Config) error {
"/etc/group*",
"/etc/shadow*",
"/etc/gshadow*",
+ "/etc/subuid*",
+ "/etc/subgid*",
"/etc/.pwd.lock",
"/home",
"/root",
--
2.20.1

View File

@ -1,93 +0,0 @@
From 41faa514b2598386c3a0c8a90ebd207e282cd1d5 Mon Sep 17 00:00:00 2001
From: Michael Nguyen <mnguyen@redhat.com>
Date: Fri, 1 Mar 2019 12:10:47 -0500
Subject: [PATCH] support coreos.config.* and ignition.config.*
This is backwards compatibility work for spec2x following the changes
made in #663 to make options more distribution neutral.
ref: https://github.com/coreos/ignition/pull/663
---
internal/providers/cmdline/cmdline.go | 13 ++++++-------
internal/providers/vmware/vmware_amd64.go | 20 ++++++++++++++++----
2 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/internal/providers/cmdline/cmdline.go b/internal/providers/cmdline/cmdline.go
index 0bdba2d..1a393fb 100644
--- a/internal/providers/cmdline/cmdline.go
+++ b/internal/providers/cmdline/cmdline.go
@@ -32,7 +32,8 @@ import (
)
const (
- cmdlineUrlFlag = "coreos.config.url"
+ cmdlineUrlFlagLegacy = "coreos.config.url"
+ cmdlineUrlFlag = "ignition.config.url"
)
func FetchConfig(f resource.Fetcher) (types.Config, report.Report, error) {
@@ -83,12 +84,10 @@ func parseCmdline(cmdline []byte) (url string) {
parts := strings.SplitN(strings.TrimSpace(arg), "=", 2)
key := parts[0]
- if key != cmdlineUrlFlag {
- continue
- }
-
- if len(parts) == 2 {
- url = parts[1]
+ if key == cmdlineUrlFlagLegacy || key == cmdlineUrlFlag {
+ if len(parts) == 2 {
+ url = parts[1]
+ }
}
}
diff --git a/internal/providers/vmware/vmware_amd64.go b/internal/providers/vmware/vmware_amd64.go
index e26baf0..9c0ffc7 100644
--- a/internal/providers/vmware/vmware_amd64.go
+++ b/internal/providers/vmware/vmware_amd64.go
@@ -54,6 +54,8 @@ func fetchRawConfig(f resource.Fetcher) (config, error) {
var ovfData string
var ovfEncoding string
+ var ovfDataKey string
+ var ovfEncodingKey string
ovfEnv, err := info.String("ovfenv", "")
if err != nil {
@@ -65,17 +67,27 @@ func fetchRawConfig(f resource.Fetcher) (config, error) {
f.Logger.Warning("failed to parse OVF environment: %v. Continuing...", err)
}
- ovfData = env.Properties["guestinfo.coreos.config.data"]
- ovfEncoding = env.Properties["guestinfo.coreos.config.data.encoding"]
+ if _, ok := env.Properties["guestinfo.coreos.config.data"]; ok {
+ ovfDataKey = "guestinfo.coreos.config.data"
+ ovfEncodingKey = "guestinfo.coreos.config.data.encoding"
+ } else if _, ok := env.Properties["guestinfo.ignition.config.data"]; ok {
+ ovfDataKey = "guestinfo.ignition.config.data"
+ ovfEncodingKey = "guestinfo.ignition.config.data.encoding"
+ } else {
+ f.Logger.Debug("failed to find guestinfo ignition properties")
+ }
+
+ ovfData = env.Properties[ovfDataKey]
+ ovfEncoding = env.Properties[ovfEncodingKey]
}
- data, err := info.String("coreos.config.data", ovfData)
+ data, err := info.String(ovfDataKey[len("guestinfo."):], ovfData)
if err != nil {
f.Logger.Debug("failed to fetch config: %v", err)
return config{}, err
}
- encoding, err := info.String("coreos.config.data.encoding", ovfEncoding)
+ encoding, err := info.String(ovfEncodingKey[len("guestinfo."):], ovfEncoding)
if err != nil {
f.Logger.Debug("failed to fetch config encoding: %v", err)
return config{}, err
--
2.19.1