summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:24:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:24:09 +0000
commit45296c28f7260031283ede25480a094b6e3382d9 (patch)
treeb21c31a14bf20a2e74348174976e81d5c1dbb401 /debian/patches
parentAdding upstream version 2022.06.06. (diff)
downloadwireless-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')
-rw-r--r--debian/patches/dont_auto_create_keypair36
-rw-r--r--debian/patches/run-scripts-with-python-3.patch46
-rw-r--r--debian/patches/series2
3 files changed, 84 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):
diff --git a/debian/patches/run-scripts-with-python-3.patch b/debian/patches/run-scripts-with-python-3.patch
new file mode 100644
index 0000000..b35dfb4
--- /dev/null
+++ b/debian/patches/run-scripts-with-python-3.patch
@@ -0,0 +1,46 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Wed, 29 Jan 2020 13:31:51 +0000
+Subject: Run scripts with Python 3
+Bug-Debian: https://bugs.debian.org/938829
+
+All the Python scripts here are meant to be Python 3 compatible, but
+they still use "/usr/bin/env python" as their interpreter. Since
+Debian is deprecating Python 2 but not (yet) changing "python" to
+Python 3, change the shebang lines.
+
+---
+ db2bin.py | 2 +-
+ db2fw.py | 2 +-
+ dbparse.py | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/db2bin.py b/db2bin.py
+index d1b7fc6..3e781ca 100755
+--- a/db2bin.py
++++ b/db2bin.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from io import BytesIO, open
+ import struct
+diff --git a/db2fw.py b/db2fw.py
+index 3affd5a..84bfb1c 100755
+--- a/db2fw.py
++++ b/db2fw.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from io import BytesIO, open
+ import struct
+diff --git a/dbparse.py b/dbparse.py
+index 5f7e082..dfd15fd 100755
+--- a/dbparse.py
++++ b/dbparse.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from functools import total_ordering
+ import sys, math
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..224db78
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+dont_auto_create_keypair
+run-scripts-with-python-3.patch