-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add ArchLinux support #33
Conversation
420a3ea
to
08887aa
Compare
os/linux/archlinux.go
Outdated
) | ||
|
||
// ArchlinuxARM provides OS support for ArchlinuxARM systems | ||
type ArchlinuxARM struct { |
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.
Probably should just be ArchLinux as it will be detected as well and things here should work with the non-arm arch as well.
os/linux/archlinux.go
Outdated
|
||
// InstallPackage installs packages via pacman | ||
func (c ArchlinuxARM) InstallPackage(h os.Host, s ...string) error { | ||
return h.Execf("pacman -S --noconfirm %s", strings.Join(s, " ")) |
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.
Needs sudo
, maybe add --noprogressbar
to get a bit cleaner log output.
return h.Execf("pacman -S --noconfirm %s", strings.Join(s, " ")) | |
return h.Execf("sudo pacman -S --noconfirm --noprogressbar %s", strings.Join(s, " ")) |
resolver.go
Outdated
versionNeeded := true | ||
if os.IDLike == "arch" { | ||
versionNeeded = false | ||
} | ||
|
||
if os.ID == "" || (versionNeeded && os.Version == "") { |
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 think a more future proof solution would be to change the switch-case thing above to set the version to something like 0.0.0
.
case "ID_LIKE":
os.IDLike = unquote(fields[1])
if os.IDLike == "arch" {
os.Version = "0.0.0"
}
Signed-off-by: erdii <[email protected]>
08887aa
to
f0ba043
Compare
Heyo @kke 👋 |
sibling PR: k0sproject/k0sctl#183