From 2e94022092149d56ffe9b009f6fa98413446f62b Mon Sep 17 00:00:00 2001 From: Christian Melki Date: Fri, 23 Sep 2022 09:24:30 +0200 Subject: crda: Version bump. crda 4.14 -> 4.15. regdb 2022.06.06 -> 2022.08.12. Very minor fixes. crda is just a release tag on the latest commit, which is a couple of years already. * Forward patches. Minor changes to make them apply. Signed-off-by: Christian Melki Message-Id: <20220923072430.652471-1-christian.melki@t2data.com> Signed-off-by: Michael Olbrich --- patches/crda-4.14/0001-fix-linking-libreg.patch | 48 ---------------- ...002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch | 23 -------- ...-without-embedding-pubkey-data-into-crda-.patch | 66 ---------------------- .../0004-udev-Fix-rule-for-initial-setup.patch | 20 ------- patches/crda-4.14/series | 7 --- patches/crda-4.15/0001-fix-linking-libreg.patch | 48 ++++++++++++++++ ...002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch | 23 ++++++++ ...-without-embedding-pubkey-data-into-crda-.patch | 66 ++++++++++++++++++++++ .../0004-udev-Fix-rule-for-initial-setup.patch | 20 +++++++ patches/crda-4.15/series | 7 +++ rules/crda.make | 8 +-- 11 files changed, 168 insertions(+), 168 deletions(-) delete mode 100644 patches/crda-4.14/0001-fix-linking-libreg.patch delete mode 100644 patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch delete mode 100644 patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch delete mode 100644 patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch delete mode 100644 patches/crda-4.14/series create mode 100644 patches/crda-4.15/0001-fix-linking-libreg.patch create mode 100644 patches/crda-4.15/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch create mode 100644 patches/crda-4.15/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch create mode 100644 patches/crda-4.15/0004-udev-Fix-rule-for-initial-setup.patch create mode 100644 patches/crda-4.15/series diff --git a/patches/crda-4.14/0001-fix-linking-libreg.patch b/patches/crda-4.14/0001-fix-linking-libreg.patch deleted file mode 100644 index 8eae90bd3..000000000 --- a/patches/crda-4.14/0001-fix-linking-libreg.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Michael Olbrich -Date: Thu, 30 Jun 2016 12:20:16 +0200 -Subject: [PATCH] fix linking libreg - -Signed-off-by: Michael Olbrich -Signed-off-by: Marc Kleine-Budde ---- - Makefile | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index a3ead30371c9..2f485724c3be 100644 ---- a/Makefile -+++ b/Makefile -@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic - CFLAGS += -Wall -g - LDLIBREG += -lreg - LDLIBS += $(LDLIBREG) --LDLIBS += -lm -+LIBREGLIBS += -lm - LIBREG += libreg.so - LDFLAGS += -L ./ - -@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize - - ifeq ($(USE_OPENSSL),1) - CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` --LDLIBS += `pkg-config --libs openssl` -+LIBREGLIBS += `pkg-config --libs openssl` - - $(LIBREG): keys-ssl.c - - else - CFLAGS += -DUSE_GCRYPT --LDLIBS += -lgcrypt -+LIBREGLIBS += -lgcrypt - - $(LIBREG): keys-gcrypt.c - -@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) - - $(LIBREG): regdb.h reglib.h reglib.c - $(NQ) ' CC ' $@ -- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ -+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLIBS) - - install-libreg-headers: - $(NQ) ' INSTALL libreg-headers' diff --git a/patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch b/patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch deleted file mode 100644 index fac346892..000000000 --- a/patches/crda-4.14/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Ben Hutchings -Date: Sat, 23 Aug 2014 11:13:44 -0700 -Subject: [PATCH] Do not run ldconfig if DESTDIR is set - -Signed-off-by: Michael Olbrich ---- - Makefile | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/Makefile b/Makefile -index 2f485724c3be..b74d3b544bd9 100644 ---- a/Makefile -+++ b/Makefile -@@ -127,7 +127,9 @@ install-libreg: - $(NQ) ' INSTALL libreg' - $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) - $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ -+ifndef DESTDIR - $(Q)ldconfig -+endif - - %.o: %.c regdb.h $(LIBREG) - $(NQ) ' CC ' $@ diff --git a/patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch b/patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch deleted file mode 100644 index 5a55618e6..000000000 --- a/patches/crda-4.14/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Kel Modderman -Date: Fri, 16 Nov 2018 16:50:45 +0100 -Subject: [PATCH] Allow build without embedding pubkey data into crda/regdbdump - binaries - -Signed-off-by: Michael Olbrich ---- - Makefile | 5 +++++ - reglib.c | 6 ++++-- - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/Makefile b/Makefile -index b74d3b544bd9..9ce318484001 100644 ---- a/Makefile -+++ b/Makefile -@@ -42,7 +42,12 @@ ifeq ($(USE_OPENSSL),1) - CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` - LIBREGLIBS += `pkg-config --libs openssl` - -+ifeq ($(RUNTIME_PUBKEY_ONLY),1) -+CFLAGS += -DRUNTIME_PUBKEY_ONLY -+else -+CFLAGS += -DHAVE_KEYS_SSL - $(LIBREG): keys-ssl.c -+endif - - else - CFLAGS += -DUSE_GCRYPT -diff --git a/reglib.c b/reglib.c -index e00e9b8d4b44..87691022f9e7 100644 ---- a/reglib.c -+++ b/reglib.c -@@ -30,7 +30,7 @@ - - #include "reglib.h" - --#ifdef USE_OPENSSL -+#if defined(USE_OPENSSL) && defined(HAVE_KEYS_SSL) - #include "keys-ssl.c" - #endif - -@@ -83,7 +83,6 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) - { - RSA *rsa; - uint8_t hash[SHA_DIGEST_LENGTH]; -- unsigned int i; - int ok = 0; - DIR *pubkey_dir; - struct dirent *nextfile; -@@ -95,6 +94,8 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) - goto out; - } - -+#ifdef HAVE_KEYS_SSL -+ unsigned int i; - for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) { - rsa = RSA_new(); - if (!rsa) { -@@ -112,6 +113,7 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) - rsa->n = NULL; - RSA_free(rsa); - } -+#endif - if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) { - while (!ok && (nextfile = readdir(pubkey_dir))) { - snprintf(filename, PATH_MAX, "%s/%s", PUBKEY_DIR, diff --git a/patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch b/patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch deleted file mode 100644 index 551b84bf6..000000000 --- a/patches/crda-4.14/0004-udev-Fix-rule-for-initial-setup.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Markus Pargmann -Date: Thu, 17 Apr 2014 11:59:59 +0200 -Subject: [PATCH] udev: Fix rule for initial setup - -Signed-off-by: Markus Pargmann ---- - udev/regulatory.rules | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/udev/regulatory.rules b/udev/regulatory.rules -index 3d6add895784..98296961f0ed 100644 ---- a/udev/regulatory.rules -+++ b/udev/regulatory.rules -@@ -2,4 +2,5 @@ - # For more information see: - # http://wireless.kernel.org/en/developers/Regulatory/CRDA - --KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda" -+KERNEL=="regulatory*", ACTION=="add", SUBSYSTEM=="platform", ENV{COUNTRY}="00" -+KERNEL=="regulatory*", ACTION=="add|change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda" diff --git a/patches/crda-4.14/series b/patches/crda-4.14/series deleted file mode 100644 index fdaa19478..000000000 --- a/patches/crda-4.14/series +++ /dev/null @@ -1,7 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-fix-linking-libreg.patch -0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch -0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch -0004-udev-Fix-rule-for-initial-setup.patch -# dd65795471004db85b4dbc56ca3ee99c - git-ptx-patches magic diff --git a/patches/crda-4.15/0001-fix-linking-libreg.patch b/patches/crda-4.15/0001-fix-linking-libreg.patch new file mode 100644 index 000000000..6b566ba04 --- /dev/null +++ b/patches/crda-4.15/0001-fix-linking-libreg.patch @@ -0,0 +1,48 @@ +From: Michael Olbrich +Date: Thu, 30 Jun 2016 12:20:16 +0200 +Subject: [PATCH] fix linking libreg + +Signed-off-by: Michael Olbrich +Signed-off-by: Marc Kleine-Budde +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 6ca26f341dfa..832399dea8db 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic + CFLAGS += -Wall -g + LDLIBREG += -lreg + LDLIBS += $(LDLIBREG) +-LDLIBS += -lm ++LIBREGLIBS += -lm + LIBREG += libreg.so + LDFLAGS += -L ./ + +@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize + + ifeq ($(USE_OPENSSL),1) + CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` +-LDLIBS += `pkg-config --libs openssl` ++LIBREGLIBS += `pkg-config --libs openssl` + + $(LIBREG): keys-ssl.c + + else + CFLAGS += -DUSE_GCRYPT +-LDLIBS += -lgcrypt ++LIBREGLIBS += -lgcrypt + + $(LIBREG): keys-gcrypt.c + +@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) + + $(LIBREG): reglib.c regdb.h reglib.h + $(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< ++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(LIBREGLIBS) + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' diff --git a/patches/crda-4.15/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch b/patches/crda-4.15/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch new file mode 100644 index 000000000..8f40e0a89 --- /dev/null +++ b/patches/crda-4.15/0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch @@ -0,0 +1,23 @@ +From: Ben Hutchings +Date: Sat, 23 Aug 2014 11:13:44 -0700 +Subject: [PATCH] Do not run ldconfig if DESTDIR is set + +Signed-off-by: Michael Olbrich +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index 832399dea8db..4ba2ed5aadd8 100644 +--- a/Makefile ++++ b/Makefile +@@ -127,7 +127,9 @@ install-libreg: + $(NQ) ' INSTALL libreg' + $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) + $(Q)$(INSTALL) -m 644 $(LIBREG) $(DESTDIR)/$(LIBDIR)/ ++ifndef DESTDIR + $(Q)ldconfig ++endif + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/patches/crda-4.15/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch b/patches/crda-4.15/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch new file mode 100644 index 000000000..a5b9fb9f3 --- /dev/null +++ b/patches/crda-4.15/0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch @@ -0,0 +1,66 @@ +From: Kel Modderman +Date: Fri, 16 Nov 2018 16:50:45 +0100 +Subject: [PATCH] Allow build without embedding pubkey data into crda/regdbdump + binaries + +Signed-off-by: Michael Olbrich +--- + Makefile | 5 +++++ + reglib.c | 6 ++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 4ba2ed5aadd8..8f45630296d7 100644 +--- a/Makefile ++++ b/Makefile +@@ -42,7 +42,12 @@ ifeq ($(USE_OPENSSL),1) + CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` + LIBREGLIBS += `pkg-config --libs openssl` + ++ifeq ($(RUNTIME_PUBKEY_ONLY),1) ++CFLAGS += -DRUNTIME_PUBKEY_ONLY ++else ++CFLAGS += -DHAVE_KEYS_SSL + $(LIBREG): keys-ssl.c ++endif + + else + CFLAGS += -DUSE_GCRYPT +diff --git a/reglib.c b/reglib.c +index 4dee40151bd6..6f1edec4e154 100644 +--- a/reglib.c ++++ b/reglib.c +@@ -30,7 +30,7 @@ + + #include "reglib.h" + +-#ifdef USE_OPENSSL ++#if defined(USE_OPENSSL) && defined(HAVE_KEYS_SSL) + #include "keys-ssl.c" + #endif + +@@ -83,7 +83,6 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) + { + RSA *rsa; + uint8_t hash[SHA_DIGEST_LENGTH]; +- unsigned int i; + int ok = 0; + DIR *pubkey_dir; + struct dirent *nextfile; +@@ -95,6 +94,8 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) + goto out; + } + ++#ifdef HAVE_KEYS_SSL ++ unsigned int i; + for (i = 0; (i < sizeof(keys)/sizeof(keys[0])) && (!ok); i++) { + rsa = RSA_new(); + if (!rsa) { +@@ -112,6 +113,7 @@ int reglib_verify_db_signature(uint8_t *db, size_t dblen, size_t siglen) + rsa->n = NULL; + RSA_free(rsa); + } ++#endif + if (!ok && (pubkey_dir = opendir(PUBKEY_DIR))) { + while (!ok && (nextfile = readdir(pubkey_dir))) { + snprintf(filename, PATH_MAX, "%s/%s", PUBKEY_DIR, diff --git a/patches/crda-4.15/0004-udev-Fix-rule-for-initial-setup.patch b/patches/crda-4.15/0004-udev-Fix-rule-for-initial-setup.patch new file mode 100644 index 000000000..551b84bf6 --- /dev/null +++ b/patches/crda-4.15/0004-udev-Fix-rule-for-initial-setup.patch @@ -0,0 +1,20 @@ +From: Markus Pargmann +Date: Thu, 17 Apr 2014 11:59:59 +0200 +Subject: [PATCH] udev: Fix rule for initial setup + +Signed-off-by: Markus Pargmann +--- + udev/regulatory.rules | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/udev/regulatory.rules b/udev/regulatory.rules +index 3d6add895784..98296961f0ed 100644 +--- a/udev/regulatory.rules ++++ b/udev/regulatory.rules +@@ -2,4 +2,5 @@ + # For more information see: + # http://wireless.kernel.org/en/developers/Regulatory/CRDA + +-KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda" ++KERNEL=="regulatory*", ACTION=="add", SUBSYSTEM=="platform", ENV{COUNTRY}="00" ++KERNEL=="regulatory*", ACTION=="add|change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda" diff --git a/patches/crda-4.15/series b/patches/crda-4.15/series new file mode 100644 index 000000000..fdaa19478 --- /dev/null +++ b/patches/crda-4.15/series @@ -0,0 +1,7 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-fix-linking-libreg.patch +0002-Do-not-run-ldconfig-if-DESTDIR-is-set.patch +0003-Allow-build-without-embedding-pubkey-data-into-crda-.patch +0004-udev-Fix-rule-for-initial-setup.patch +# dd65795471004db85b4dbc56ca3ee99c - git-ptx-patches magic diff --git a/rules/crda.make b/rules/crda.make index 6a6aeacb8..e9c91a68e 100644 --- a/rules/crda.make +++ b/rules/crda.make @@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_CRDA) += crda # # Paths and names # -CRDA_VERSION := 4.14 -CRDA_MD5 := cac7ba8de3e2e6aa46918e0c76df7d67 +CRDA_VERSION := 4.15 +CRDA_MD5 := 30797103dfaae807b6ece1a695518dc1 CRDA := crda-$(CRDA_VERSION) CRDA_SUFFIX := tar.gz CRDA_URL := https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/$(CRDA).$(CRDA_SUFFIX) @@ -26,8 +26,8 @@ CRDA_LICENSE_FILES := \ file://LICENSE;md5=ef8b69b43141352d821fd66b64ff0ee7 \ file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe -CRDA_REGDB_VERSION := 2022.06.06 -CRDA_REGDB_MD5 := 49b1309ed4fb507eec382faf7564d235 +CRDA_REGDB_VERSION := 2022.08.12 +CRDA_REGDB_MD5 := 29447e6d5e9dc268bf229fd98bfaf958 CRDA_REGDB := wireless-regdb-$(CRDA_REGDB_VERSION) CRDA_REGDB_SUFFIX := tar.gz CRDA_REGDB_URL := \ -- cgit v1.2.3