-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (22 loc) · 742 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (22 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
export GO_EXECUTABLE_PATH := $(shell which go)
fs-setup:
@mkdir -p /tmp/coso/rootfs
@tar -C /tmp/coso/rootfs -xzf assets/alpine-minirootfs-3.18.2-x86_64.tar.gz
@echo "alpine 3.18 x86_64 filesystem decompressed at /tmp/coso/rootfs"
net-setup:
@echo "building cosonet"
@cd cmd/cosonet/ && go build -o ../../bin/cosonet
@echo "moving cosonet to /usr/local/bin"
@sudo cp bin/cosonet /usr/local/bin
@echo "chown cosonet to the root user"
@sudo chown root:root /usr/local/bin/cosonet
@echo "apply the setuid bit for cosonet"
@sudo chmod 4755 /usr/local/bin/cosonet
@echo "Done!"
build:
@cd cmd/coso/ && go build -o ../../bin/coso
run: build
@./bin/coso
test:
@echo $$GO_EXECUTABLE_PATH
@sudo $$GO_EXECUTABLE_PATH test -v ./...