From 45296c28f7260031283ede25480a094b6e3382d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 05:24:09 +0200 Subject: Adding debian version 2022.06.06-1. Signed-off-by: Daniel Baumann --- debian/patches/dont_auto_create_keypair | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 debian/patches/dont_auto_create_keypair (limited to 'debian/patches/dont_auto_create_keypair') diff --git a/debian/patches/dont_auto_create_keypair b/debian/patches/dont_auto_create_keypair new file mode 100644 index 0000000..ec01564 --- /dev/null +++ b/debian/patches/dont_auto_create_keypair @@ -0,0 +1,36 @@ +From: Ben Hutchings +Subject: [PATCH] Don't automatically create key-pairs + +If the private key is missing, this is probably an error in the build +configuration. Don't create a private key unless it's the only +explicit goal for make. + +Signed-off-by: Ben Hutchings + +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO + echo custom-user; \ + fi) + +-REGDB_PRIVKEY ?= ~/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem ++REGDB_PRIVKEY ?= $(HOME)/.wireless-regdb-$(REGDB_AUTHOR).key.priv.pem + REGDB_PUBKEY ?= $(REGDB_AUTHOR).key.pub.pem + REGDB_PUBCERT ?= $(REGDB_AUTHOR).x509.pem + +@@ -85,8 +85,15 @@ $(REGDB_PUBCERT): $(REGDB_PRIVKEY) + + + $(REGDB_PRIVKEY): ++ifeq ($(MAKECMDGOALS),$(REGDB_PRIVKEY)) + @echo "Generating private key for $(REGDB_AUTHOR)..." + openssl genrsa -out $(REGDB_PRIVKEY) 2048 ++else ++ @echo "No private key found. To generate a private key, run:" ++ @echo " make ~/.wireless-regdb-.key.priv.pem" ++ @echo "Your author-id is currently \"$(REGDB_AUTHOR)\"; set REGDB_AUTHOR to override this." ++ @exit 1 ++endif + + ifneq ($(shell test -e $(DISTRO_PRIVKEY) && echo yes),yes) + $(DISTRO_PRIVKEY): -- cgit v1.2.3