Merge pull request #4069 from AkihiroSuda/move-limactl-mcp

Makefile: move limactl-mcp from bin to libexec/lima
This commit is contained in:
Jan Dubois authored and GitHub committed 2025-09-23 16:17:37 -07:00
commit aad73df750
4 files changed
+22 -21

No files matched your search

+6 -4
View File
@@ -240,7 +240,7 @@ jobs:
- name: Make
run: make
- name: Install
run: make install
run: sudo make install
- name: Validate jsonschema
run: make schema-limayaml.json
- name: Validate templates
@@ -411,7 +411,7 @@ jobs:
- name: Make
run: make
- name: Install
run: make install
run: sudo make install
- name: "Adjust LIMACTL_CREATE_ARGS"
run: echo "LIMACTL_CREATE_ARGS=${LIMACTL_CREATE_ARGS} --vm-type=qemu --network=lima:shared" >>$GITHUB_ENV
- name: "Inject `no_timer_check` to kernel cmdline"
@@ -508,7 +508,7 @@ jobs:
- name: Make
run: make
- name: Install
run: make install
run: sudo make install
- name: Cache image used by templates/${{ matrix.template }}
uses: ./.github/actions/setup_cache_for_template
with:
@@ -546,7 +546,9 @@ jobs:
make binaries install
- name: Install Lima
# gomodjail depends on symbols
run: make KEEP_SYMBOLS=1 binaries install
run: |
make KEEP_SYMBOLS=1 binaries
sudo make install
- name: Cache image used by templates/default.yaml
uses: ./.github/actions/setup_cache_for_template
with:
-3
View File
@@ -16,9 +16,6 @@ ls:
# valid names are `show-ssh.go`, `show-ssh_windows.go` or `show-ssh_test.go`
.go: lowercase
docs:
.md: kebab-case
templates:
# _default and _images have leading underscores
.dir: lowercase
+12 -10
View File
@@ -112,7 +112,8 @@ help-targets:
@echo '- limactl : Build limactl, and lima'
@echo '- lima : Copy lima, and lima.bat'
@echo '- helpers : Copy nerdctl.lima, apptainer.lima, docker.lima, podman.lima, and kubectl.lima'
# TODO: move CLI plugins to _output/libexec/lima/
@echo
@echo 'Targets for files in _output/libexec/lima/:'
@echo '- limactl-plugins : Build limactl-* CLI plugins'
@echo
@echo 'Targets for files in _output/share/lima/:'
@@ -282,25 +283,26 @@ ifeq ($(GOOS),darwin)
codesign -f -v --entitlements vz.entitlements -s - $@
endif
limactl-plugins: _output/bin/limactl-mcp$(exe)
LIBEXEC_LIMA := _output/libexec/lima
_output/bin/limactl-mcp$(exe): $(call dependencies_for_cmd,limactl-mcp) $$(call force_build,$$@)
limactl-plugins: $(LIBEXEC_LIMA)/limactl-mcp$(exe)
$(LIBEXEC_LIMA)/limactl-mcp$(exe): $(call dependencies_for_cmd,limactl-mcp) $$(call force_build,$$@)
@mkdir -p $(LIBEXEC_LIMA)
$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/limactl-mcp
DRIVER_INSTALL_DIR := _output/libexec/lima
.PHONY: additional-drivers
additional-drivers:
@mkdir -p $(DRIVER_INSTALL_DIR)
@mkdir -p $(LIBEXEC_LIMA)
@for drv in $(ADDITIONAL_DRIVERS); do \
echo "Building $$drv as external"; \
if [ "$(GOOS)" = "windows" ]; then \
$(GO_BUILD) -o $(DRIVER_INSTALL_DIR)/lima-driver-$$drv.exe ./cmd/lima-driver-$$drv; \
$(GO_BUILD) -o $(LIBEXEC_LIMA)/lima-driver-$$drv.exe ./cmd/lima-driver-$$drv; \
else \
$(GO_BUILD) -o $(DRIVER_INSTALL_DIR)/lima-driver-$$drv ./cmd/lima-driver-$$drv; \
$(GO_BUILD) -o $(LIBEXEC_LIMA)/lima-driver-$$drv ./cmd/lima-driver-$$drv; \
fi; \
if [ "$$drv" = "vz" ] && [ "$(GOOS)" = "darwin" ]; then \
codesign -f -v --entitlements vz.entitlements -s - $(DRIVER_INSTALL_DIR)/lima-driver-vz; \
codesign -f -v --entitlements vz.entitlements -s - $(LIBEXEC_LIMA)/lima-driver-vz; \
fi; \
done
@@ -523,7 +525,6 @@ uninstall:
"$(DEST)/bin/lima" \
"$(DEST)/bin/lima$(bat)" \
"$(DEST)/bin/limactl$(exe)" \
"$(DEST)/bin/limactl-mcp$(exe)" \
"$(DEST)/bin/nerdctl.lima" \
"$(DEST)/bin/apptainer.lima" \
"$(DEST)/bin/docker.lima" \
@@ -533,6 +534,7 @@ uninstall:
"$(DEST)/share/man/man1/limactl"*".1" \
"$(DEST)/share/lima" \
"$(DEST)/share/doc/lima" \
"$(DEST)/libexec/lima/limactl-mcp$(exe)" \
"$(DEST)/libexec/lima/lima-driver-qemu$(exe)" \
"$(DEST)/libexec/lima/lima-driver-vz$(exe)" \
"$(DEST)/libexec/lima/lima-driver-wsl2$(exe)"
+4 -4
View File
@@ -24,7 +24,7 @@ function install_lima() {
git checkout "${ver}"
make clean
make
if [ -w "${PREFIX}/bin" ] && [ -w "${PREFIX}/share" ]; then
if [ -w "${PREFIX}/bin" ] && [ -w "${PREFIX}/share" ] && [ -w "${PREFIX}/libexec" ]; then
make install
else
sudo make install
@@ -34,15 +34,15 @@ function install_lima() {
function install_lima_binary() {
ver="$1"
tar="tar"
if [ ! -w "${PREFIX}/bin" ] || [ ! -w "${PREFIX}/share" ]; then
if [ ! -w "${PREFIX}/bin" ] || [ ! -w "${PREFIX}/share" ] || [ ! -w "${PREFIX}/libexec" ]; then
tar="sudo ${tar}"
fi
curl -fsSL "https://github.com/lima-vm/lima/releases/download/${ver}/lima-${ver:1}-$(uname -s)-$(uname -m).tar.gz" | ${tar} Cxzvm "${PREFIX}"
}
function uninstall_lima() {
files="${PREFIX}/bin/lima ${PREFIX}/bin/limactl ${PREFIX}/share/lima ${PREFIX}/share/doc/lima"
if [ -w "${PREFIX}/bin" ] && [ -w "${PREFIX}/share" ]; then
files="${PREFIX}/bin/lima ${PREFIX}/bin/limactl ${PREFIX}/share/lima ${PREFIX}/share/doc/lima ${PREFIX}/libexec/lima"
if [ -w "${PREFIX}/bin" ] && [ -w "${PREFIX}/share" ] && [ -w "${PREFIX}/libexec" ]; then
# shellcheck disable=SC2086
rm -rf $files
else