From 0bf893ace63ed148eae97d066cabc568a7e5650c Mon Sep 17 00:00:00 2001 From: exploide Date: Sat, 16 Jul 2022 17:48:08 +0200 Subject: [PATCH] improved Makefile - set CGO_ENABLED=0 if not set otherwise to avoid glibc version incompatibilities, fixes #50 - set controllee key comment to empty string to avoid misleading default comment - removed stray ADDR variable --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4b764a8..3396bc1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,3 @@ -ADDR=localhost:2200 - - ifdef RSSH_HOMESERVER LDFLAGS += -X main.destination=$(RSSH_HOMESERVER) endif @@ -13,6 +10,10 @@ ifdef IGNORE LDFLAGS += -X main.ignoreInput=$(IGNORE) endif +ifndef CGO_ENABLED + export CGO_ENABLED=0 +endif + LDFLAGS += -X 'github.com/NHAS/reverse_ssh/internal.Version=$(shell git describe --tags)' @@ -40,7 +41,7 @@ server: .generate_keys: mkdir -p bin # Supress errors if user doesn't overwrite existing key - ssh-keygen -t ed25519 -N '' -f internal/client/keys/private_key || true + ssh-keygen -t ed25519 -N '' -C '' -f internal/client/keys/private_key || true # Avoid duplicate entries touch bin/authorized_controllee_keys @grep -q "$$(cat internal/client/keys/private_key.pub)" bin/authorized_controllee_keys || cat internal/client/keys/private_key.pub >> bin/authorized_controllee_keys