8000 Minor updates by abiosoft · Pull Request #1156 · abiosoft/colima · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Minor updates #1156

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

Merged
merged 3 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 5 additions & 37 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,16 @@ import (

"github.com/abiosoft/colima/cli"
"github.com/abiosoft/colima/environment"
"github.com/abiosoft/colima/util/downloader"
"github.com/coreos/go-semver/semver"
)

const (
version = "v0.6.0-2" // version of colima-core to use.
limaVersion = "v0.18.0" // minimum Lima version supported
baseURL = "https://github.com/abiosoft/colima-core/releases/download/" + version + "/"
)
const limaVersion = "v0.18.0" // minimum Lima version supported

type (
hostActions = environment.HostActions
guestActions = environment.GuestActions
)

func downloadSha(url string) *downloader.SHA {
return &downloader.SHA{
Size: 512,
URL: url + ".sha512sum",
}
}

// SetupBinfmt downloads and install binfmt
func SetupBinfmt(host hostActions, guest guestActions, arch environment.Arch) error {
qemuArch := environment.AARCH64
Expand All @@ -40,35 +28,15 @@ func SetupBinfmt(host hostActions, guest guestActions, arch environment.Arch) er
}

install := func() error {
if err := guest.Run("sh", "-c", "sudo QEMU_PRESERVE_ARGV0=1 /usr/bin/binfmt --install "+qemuArch.GoArch()); err != nil {
if err := guest.Run("sh", "-c", "sudo QEMU_PRESERVE_ARGV0=1 /usr/bin/binfmt --install 386,"+qemuArch.GoArch()); err != nil {
return fmt.Errorf("error installing binfmt: %w", err)
}
return nil
}

// ignore download and extract if previously installed
if err := guest.RunQuiet("command", "-v", "binfmt"); err == nil {
return install()
}

// download
url := baseURL + "binfmt-" + arch.Value().GoArch() + ".tar.gz"
dest := "/tmp/binfmt.tar.gz"
if err := downloader.DownloadToGuest(host, guest, downloader.Request{
URL: url,
SHA: downloadSha(url),
}, dest); err != nil {
return fmt.Errorf("error downloading binfmt: %w", err)
}

// extract
if err := guest.Run("sh", "-c",
strings.NewReplacer(
"{file}", dest,
"{qemu_arch}", string(qemuArch),
).Replace(`cd /tmp && tar xfz {file} && sudo chown root:root binfmt qemu-{qemu_arch} && sudo mv binfmt qemu-{qemu_arch} /usr/bin`),
); err != nil {
return fmt.Errorf("error extracting binfmt: %w", err)
// validate binfmt
if err := guest.RunQuiet("command", "-v", "binfmt"); err != nil {
return fmt.Errorf("binfmt not found: %w", err)
}

return install()
Expand Down
16 changes: 8 additions & 8 deletions embedded/images/images.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
arm64 none https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-none.qcow2 5f3fcf5abc0c59634271aba3a1c3c6b92cd2a8eaccf1ceb822deff3cee1d16e632a422222a20c6ffc568e2f2a6c4350a82848daa3d315e330da0ecde02fcc558 ubuntu-24.04-minimal-cloudimg-arm64-none.qcow2
arm64 docker https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2 e9b94a34241bba862b749ef29ec232aea8a436f33387aadc73ef2b5c0ae23ea2fb3818674aa23a3f5d49191c15829afa3055992abd9d4cdb0642eb5924fccf79 ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2
arm64 containerd https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-containerd.qcow2 b759467a75e4546fa91df9c8fc717a745118f854cad8cbb3d3229961cb8624234dc81c9fe283a65365c40327d435d19a474f3ebd54b5b85d9f50f41e73ae2b5a ubuntu-24.04-minimal-cloudimg-arm64-containerd.qcow2
arm64 incus https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-arm64-incus.qcow2 75356676d9901ed7d8fe34928697e70ca09e063d4e54bc131cb7d32d8470d6fc96288d3133bc5f8e08ea73268da01696399a2319ec8eff5c964ec8f72bdd4b77 ubuntu-24.04-minimal-cloudimg-arm64-incus.qcow2
amd64 none https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-amd64-none.qcow2 698512f6f602a935f3292c0387c494773f8ea4292d6fa293b3c05fc3d2331d1021f8364c19acf1a4f77463c1f60ce606049039945ad024fd13f946433cee679b ubuntu-24.04-minimal-cloudimg-amd64-none.qcow2
amd64 docker https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2 c1bfea144ab3475469f399e4ffb109aa0cc6f97c3b24f4b179ea5eee43fac95d293e54c0b618dd3a02fe1f1eb25aa92f19eda9f834c530fd6bd1b3cb395133bc ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2
amd64 containerd https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-amd64-containerd.qcow2 81f57ba9dcc6e881087c827e002de8a873838dd637640e07e9a26b009fb93d185c4cd6d7917b69ef1d100f4dc4f9e25306e54d6ff093b302161d83154b551316 ubuntu-24.04-minimal-cloudimg-amd64-containerd.qcow2
amd64 incus https://github.com/abiosoft/colima-core/releases/download/v0.7.1/ubuntu-24.04-minimal-cloudimg-amd64-incus.qcow2 4dc3c5f2da6ab5dda7ac2f8be9651c570d9a06d0adb5581b8eba2b392592a53a7db59c03e375fb707e3a9bc0a440e4bafb519e574aab6a336d5fec115a8747cc ubuntu-24.04-minimal-cloudimg-amd64-incus.qcow2
arm64 none https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-arm64-none.qcow2 7e63afa385d4e4fd760e35367c61c521efaedf930ac93830e68beb635c2691d266495052d99fc76c56c8c5134a3c31c26b20797b6d6d96f426628aa191543ad3 ubuntu-24.04-minimal-cloudimg-arm64-none.qcow2
arm64 docker https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2 c6d253678b449a6c17b44ca2dfa73ca9f3375c2d8c8f125bf32c74e0aaaa0534eb67c8c0d2bf5744344135b774359e96a6d058915d09b7b929a231c2bd31f038 ubuntu-24.04-minimal-cloudimg-arm64-docker.qcow2
arm64 containerd https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-arm64-containerd.qcow2 c731467c1cf2a6c84c1608005353c6e9f851e1c7985e99b4b112aed39be81226924f8af90e875ac3228397d4597136c585fc669e336785e9749824f1fc2acb48 ubuntu-24.04-minimal-cloudimg-arm64-containerd.qcow2
arm64 incus https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-arm64-incus.qcow2 dbd583b3385e3506aa161e17f3a368f4b5190365d9b73264ecbf09f285b38540ae8d52510159b037eb14bc83527a57d88eac53e88ecb7cc565cbef39928e5590 ubuntu-24.04-minimal-cloudimg-arm64-incus.qcow2
amd64 none https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-amd64-none.qcow2 a8cf07d803c2d89e120dffec9284a5ca079c4d3c7a7c9f5e80247d02685658d4ad804ef29e1cfa598c914cb966b96e7f4d7d9be94a2dca32018928b5516c906a ubuntu-24.04-minimal-cloudimg-amd64-none.qcow2
amd64 docker https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2 50ed3755f16d2f709a4b18e1ddb2dbbe798570777c602b1103220783396362c6f6b0160f18336e27038628b1223ae59066d788b883e1b153053a01a9b42fe5f0 ubuntu-24.04-minimal-cloudimg-amd64-docker.qcow2
amd64 containerd https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-amd64-containerd.qcow2 b601ab51da7bd1a63d7d4926674105eab890ea36880c55c3f9795422734d206263d99c01242c8e61ad3e845ae673cfd7a968ea17007c596974b0b552513cdb16 ubuntu-24.04-minimal-cloudimg-amd64-containerd.qcow2
amd64 incus https://github.com/abiosoft/colima-core/releases/download/v0.7.6/ubuntu-24.04-minimal-cloudimg-amd64-incus.qcow2 7c8c6b5c14dc43c51c85fdcdfe5740c23051ea5c94643c7aacce704c708ec38c5247cc7c6dff216d1d928c4abfec6fd3eaae141ed35d31417145c42ea57894f5 ubuntu-24.04-minimal-cloudimg-amd64-incus.qcow2
2 changes: 1 addition & 1 deletion embedded/images/images_sha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eux

BASE_URL=https://github.com/abiosoft/colima-core/releases/download
BASE_FILENAME=ubuntu-24.04-minimal-cloudimg
VERSION=v0.7.1
VERSION=v0.7.6
RUNTIMES="none docker containerd incus"
ARCHS="arm64 amd64"

Expand Down
Loading
0