diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:24:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 03:24:09 +0000 |
commit | 45296c28f7260031283ede25480a094b6e3382d9 (patch) | |
tree | b21c31a14bf20a2e74348174976e81d5c1dbb401 /debian/patches/dont_auto_create_keypair | |
parent | Adding upstream version 2022.06.06. (diff) | |
download | wireless-regdb-45296c28f7260031283ede25480a094b6e3382d9.tar.xz wireless-regdb-45296c28f7260031283ede25480a094b6e3382d9.zip |
Adding debian version 2022.06.06-1.debian/2022.06.06-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/dont_auto_create_keypair')
-rw-r--r-- | debian/patches/dont_auto_create_keypair | 36 |
1 files changed, 36 insertions, 0 deletions
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 <ben@decadent.org.uk> +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 <ben@decadent.org.uk> + +--- 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-<author-id>.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): |