diff --git a/testing/devpod/0001-devpod-code-oss-binary.patch b/testing/devpod/0001-devpod-code-oss-binary.patch new file mode 100644 index 00000000000..2f3c0ef620f --- /dev/null +++ b/testing/devpod/0001-devpod-code-oss-binary.patch @@ -0,0 +1,13 @@ +diff --git a/pkg/ide/vscode/open.go b/pkg/ide/vscode/open.go +index 18aae60d..927c1cce 100644 +--- a/pkg/ide/vscode/open.go ++++ b/pkg/ide/vscode/open.go +@@ -122,6 +122,8 @@ func findCLI(flavor Flavor) string { + if flavor == FlavorStable { + if command.Exists("code") { + return "code" ++ } else if command.Exists("code-oss") { ++ return "code-oss" + } else if runtime.GOOS == "darwin" && command.Exists("/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code") { + return "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" + } diff --git a/testing/devpod/0002-devpod-busybox-base64-decode.patch b/testing/devpod/0002-devpod-busybox-base64-decode.patch new file mode 100644 index 00000000000..994c6bf2864 --- /dev/null +++ b/testing/devpod/0002-devpod-busybox-base64-decode.patch @@ -0,0 +1,11 @@ +diff --git a/pkg/options/resolve_test.go b/pkg/options/resolve_test.go +index 5a38cccb..9bb0f197 100644 +--- a/pkg/options/resolve_test.go ++++ b/pkg/options/resolve_test.go +@@ -700,5 +700,5 @@ func optionsToSubCommand(optionDefinitions config.OptionDefinitions) string { + out, _ := json.Marshal(&provider.SubOptions{ + Options: optionDefinitions, + }) +- return fmt.Sprintf("echo '%s' | base64 --decode", base64.StdEncoding.EncodeToString(out)) ++ return fmt.Sprintf("echo '%s' | base64 -d", base64.StdEncoding.EncodeToString(out)) + } diff --git a/testing/devpod/APKBUILD b/testing/devpod/APKBUILD new file mode 100644 index 00000000000..dafd90f89ee --- /dev/null +++ b/testing/devpod/APKBUILD @@ -0,0 +1,38 @@ +maintainer="Bart Ribbers " +pkgname=devpod +pkgver=0.5.21 +pkgrel=0 +pkgdesc="Codespaces but open-source, client-only, and unopinionated" +url="https://github.com/loft-sh/devpod" +# ppc64le blocked by undefined references +# armhf, armv7, x86, loongarch64 and riscv64 blocked by -race not being supported +arch="x86_64 aarch64 s390x" +license="MPL-2.0" +makedepends="go" +checkdepends=" + bash + docker + " +source="$pkgname-$pkgver.tar.gz::https://github.com/loft-sh/devpod/archive/refs/tags/v$pkgver.tar.gz + 0001-devpod-code-oss-binary.patch + 0002-devpod-busybox-base64-decode.patch + " + +build() { + go build -trimpath -v -o devpod-cli +} + +check() { + ./hack/unit-tests.sh +} + +package() { + install -Dm755 devpod-cli "$pkgdir"/usr/bin/devpod-cli + ln -s /usr/bin/devpod-cli "$pkgdir"/usr/bin/devpod +} + +sha512sums=" +8d77c0619cbd9c73ccf37f377e4589274b2276344590fa8bc6749e8bb1ae31696f5235dd0b4aea4896e51412c31a9148fc2d0c35f7430c3c6024dac847f3747a devpod-0.5.21.tar.gz +1cb7c5f4802ff2157de3183372f6bc09900bf9f2a7db49eb8cb470d74c26ee72f4c6f279cd3513aaaa2e97845c638c996f25a1a72f4f34d18b85157ec0b07dd6 0001-devpod-code-oss-binary.patch +ca3d9bc0fdc00eb2e60484803d502f00e280e291b134cd784ebf627f7d60938f405c89539d45e980c31db2752736f1fb8afe08380ea3fe1cbc20f40c81cdad3e 0002-devpod-busybox-base64-decode.patch +"