-
Notifications
You must be signed in to change notification settings - Fork 1.5k
CORS-4275: Add Windows support #10041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # the following files will be injected into the bootstrap node (CoreOS) as-is, | ||
| # which must be in Unix line endings (LF) | ||
| data/data/bootstrap/systemd/**/*.service text eol=lf | ||
| data/data/bootstrap/systemd/**/*.socket text eol=lf | ||
| data/data/bootstrap/systemd/**/*.conf text eol=lf | ||
| data/data/bootstrap/files/** text eol=lf | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -316,14 +316,14 @@ func (a *Ignition) Generate(ctx context.Context, dependencies asset.Parents) err | |
|
|
||
| // add ZTP manifests to manifestPath | ||
| for _, file := range agentManifests.FileList { | ||
| manifestFile := ignition.FileFromBytes(filepath.Join(manifestPath, filepath.Base(file.Filename)), | ||
| manifestFile := ignition.FileFromBytes(path.Join(manifestPath, filepath.Base(file.Filename)), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it would be helpful to add context, for instance in the commit message, about why this change is needed. it's not obvious to me how this relates to windows support
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added in the commit messages and PR decription |
||
| "root", 0600, file.Data) | ||
| config.Storage.Files = append(config.Storage.Files, manifestFile) | ||
| } | ||
|
|
||
| // add AgentConfig if provided | ||
| if agentConfigAsset.Config != nil { | ||
| agentConfigFile := ignition.FileFromBytes(filepath.Join(manifestPath, filepath.Base(agentConfigAsset.File.Filename)), | ||
| agentConfigFile := ignition.FileFromBytes(path.Join(manifestPath, filepath.Base(agentConfigAsset.File.Filename)), | ||
| "root", 0600, agentConfigAsset.File.Data) | ||
| config.Storage.Files = append(config.Storage.Files, agentConfigFile) | ||
| } | ||
|
|
@@ -588,7 +588,7 @@ func addMacAddressToHostnameMappings( | |
| } | ||
| for _, host := range agentHostsAsset.Hosts { | ||
| if host.Hostname != "" { | ||
| file := ignition.FileFromBytes(filepath.Join(hostnamesPath, | ||
| file := ignition.FileFromBytes(path.Join(hostnamesPath, | ||
| strings.ToLower(filepath.Base(host.Interfaces[0].MacAddress))), | ||
| "root", 0600, []byte(host.Hostname)) | ||
| config.Storage.Files = append(config.Storage.Files, file) | ||
|
|
@@ -602,8 +602,8 @@ func addHostConfig(config *igntypes.Config, agentHosts *agentconfig.AgentHosts) | |
| return err | ||
| } | ||
|
|
||
| for path, content := range confs { | ||
| hostConfigFile := ignition.FileFromBytes(filepath.Join("/etc/assisted/hostconfig", path), "root", 0644, content) | ||
| for pathName, content := range confs { | ||
| hostConfigFile := ignition.FileFromBytes(path.Join("/etc/assisted/hostconfig", pathName), "root", 0644, content) | ||
| config.Storage.Files = append(config.Storage.Files, hostConfigFile) | ||
| } | ||
| return nil | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ import ( | |
| "encoding/json" | ||
| "fmt" | ||
| "os" | ||
| "path" | ||
|
|
||
| "github.com/pkg/errors" | ||
| "github.com/sirupsen/logrus" | ||
|
|
@@ -18,10 +19,8 @@ import ( | |
|
|
||
| var ( | ||
| _ asset.WritableAsset = (*CVOIgnore)(nil) | ||
| ) | ||
|
|
||
| const ( | ||
| cvoOverridesFilename = "manifests/cvo-overrides.yaml" | ||
| cvoOverridesFilename = path.Join("manifests", "cvo-overrides.yaml") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change is on purpose, changing
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| originalOverridesFilename = "original_cvo_overrides.patch" | ||
| ) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to the other comment, it would be helpful to add context, in a commit message and/or commit on why we need this file and how it relates to windows support (I assume it's specifically to handle windows new lines?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comments in
.gitattribute. This is to ensure the file checked out always have Unix line ending, since these files are used in CoreOS.