Hello community, here is the log from the commit of package crda for openSUSE:Factory checked in at 2020-12-03 18:41:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/crda (Old) and /work/SRC/openSUSE:Factory/.crda.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "crda" Thu Dec 3 18:41:35 2020 rev:29 rq:852376 version:4.14 Changes: -------- --- /work/SRC/openSUSE:Factory/crda/crda.changes 2020-03-27 00:22:03.992158609 +0100 +++ /work/SRC/openSUSE:Factory/.crda.new.5913/crda.changes 2020-12-03 18:43:03.446183742 +0100 @@ -1,0 +2,31 @@ +Tue Dec 1 14:56:43 UTC 2020 - Dr. Werner Fink <wer...@suse.de> + +- Correct upstream URL and upstream release URL + +------------------------------------------------------------------- +Mon Nov 30 13:40:28 UTC 2020 - Dr. Werner Fink <wer...@suse.de> + +- Add patch crda-default.patch as well as template file crda.default + for /usr/etc/default/crda to support WLAN USB dongles as well as + mostly raspberry WLAN drivers not knowing about kernel builtin + support for WLAN regular country domains (boo#1179308) + +------------------------------------------------------------------- +Tue Nov 17 13:43:31 UTC 2020 - Ludwig Nussel <lnus...@suse.de> + +- prepare usrmerge (boo#1029961) + +------------------------------------------------------------------- +Mon Aug 17 17:34:41 CEST 2020 - r...@suse.de + +- update to 4.14 and update home URL to use the github project + - fix keys defined but not used error +- add patch from upstream + crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch + - add URLs to README +- add patch from upstream + crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch + - add legacy note to README + - ## CRDA is no longer needed as of kernel v4.15 + +------------------------------------------------------------------- Old: ---- crda-3.18.tar.xz New: ---- crda-4.14.tar.gz crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch crda-default.patch crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch crda.default ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ crda.spec ++++++ --- /var/tmp/diff_new_pack.PRiAND/_old 2020-12-03 18:43:04.282184846 +0100 +++ /var/tmp/diff_new_pack.PRiAND/_new 2020-12-03 18:43:04.286184852 +0100 @@ -23,10 +23,11 @@ Summary: 802.11 central regulatory domain agent License: SUSE-Copyleft-Next-0.3.0 Group: Hardware/Wifi -URL: http://linuxwireless.org/en/developers/Regulatory/CRDA -Version: 3.18 +URL: https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA +Version: 4.14 Release: 0 -Source: http://kernel.org/pub/software/network/crda/crda-%{version}.tar.xz +Source0: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/crda-%{version}.tar.gz +Source1: crda.default BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: libgcrypt-devel BuildRequires: pkg-config @@ -39,7 +40,14 @@ Supplements: kernel >= 2.6.29 # PATCH-FIX-OPENSUSE gcc6-fix-errors.patch -- Fix errors seen by GCC6. Patch0: gcc6-fix-errors.patch +# PATCH-FIX-OPENSUSE python2 is gone, port to python3 Patch1: crda-python3.patch +# PATCH-FIX-UPSTREAM crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch +Patch2: crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch +# PATCH-FIX-UPSTREAM crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch +Patch3: crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch +# PATCH-FIX-SUSE crda-default.patch +Patch4: crda-default.patch %description The crda binary provides access to the wireless-regdb to the kernel @@ -49,6 +57,9 @@ %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 # make install calls 'ldconfig' and fails if it cannot run it... ln -s /bin/true ldconfig @@ -60,10 +71,12 @@ # to find ldconfig... export PATH=.:$PATH make DESTDIR=$RPM_BUILD_ROOT SBINDIR=%{_sbindir}/ UDEV_RULE_DIR=%{_udevrulesdir} LIBDIR=%{_libdir} install -#UsrMerge +mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}/default +install -m 644 %{S:1} %{buildroot}%{_prefix}%{_sysconfdir}/default/%{name} +%if !0%{?usrmerged} mkdir $RPM_BUILD_ROOT/sbin ln -sf %{_sbindir}/{crda,regdbdump} $RPM_BUILD_ROOT/sbin -#EndUserMerge +%endif # clean up unneeded stuff... rm -r %{buildroot}/usr/include/reglib @@ -73,10 +86,15 @@ %_sbindir/crda %_sbindir/regdbdump %_libdir/libreg.so -#UsrMerge +%if !0%{?usrmerged} /sbin/crda /sbin/regdbdump -#EndUserMerge +%endif +%if 0%{?suse_version} < 1550 +%dir %{_prefix}%{_sysconfdir}/ +%dir %{_prefix}%{_sysconfdir}/default/ +%endif +%{_prefix}%{_sysconfdir}/default/%{name} %{_udevrulesdir}/85-regulatory.rules %{_mandir}/man8/crda.8.gz %{_mandir}/man8/regdbdump.8.gz ++++++ crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch ++++++ commit 67f1e6ddbdfade357e234c9d58a30fe0a283fe60 Author: Xose Vazquez Perez <xose.vazq...@gmail.com> Date: Fri Nov 9 17:23:23 2018 +0100 crda: add URLs to README Cc: Luis R. Rodriguez <mcg...@kernel.org> Cc: WIRELESS ML <linux-wirel...@vger.kernel.org> Cc: REGDB ML <wireless-re...@lists.infradead.org> Signed-off-by: Xose Vazquez Perez <xose.vazq...@gmail.com> Signed-off-by: Luis Chamberlain <mcg...@kernel.org> diff --git a/README b/README index 5d89b83..88f2623 100644 --- a/README +++ b/README @@ -1,5 +1,6 @@ Central Regulatory Domain Agent (CRDA) ======================================== +<https://wireless.wiki.kernel.org/en/developers/regulatory/crda> This is the Central Regulatory Domain Agent for Linux. It serves one purpose: tell Linux kernel what to enforce. In essence it is a udev @@ -46,6 +47,7 @@ with this package as regulatory.rules OVERVIEW ========== +<https://wireless.wiki.kernel.org/en/developers/regulatory> The database is maintained on the wireless-regdb.git tree. This git tree maintains a binary regulatory database file which is produced ++++++ crda-default.patch ++++++ Provide an option to specify a reg code in /etc/default/crda and also try a distribution configuration /usr/etc/default/crda. This solves bug boo#1179308 --- crda.8 | 17 ++++++++++++++++- crda.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/crda.8 b/crda.8 --- a/crda.8 +++ b/crda.8 @@ -68,7 +68,22 @@ An example udev rule which can be used ( .B /lib/udev/rules.d/85-regulatory.rules ): -.I KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/sbin/crda" +.I KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/usr/sbin/crda" + +.SS +.SH Standard configuration +in the file +.I /usr/etc/default/crda +the variable +.B REGDOMAIN +is set to the global WLAN default code +.BR 00 . +The local administrator might copy this file to +.I /etc/default/crda +and set the ISO / IEC 3166 alpha2 country code of the local area. Then +any execution of +.B crda +will then send this as regulatory domain for that alpha2 to the kernel. .SS .SH Environment variable diff --git a/crda.c b/crda.c --- a/crda.c +++ b/crda.c @@ -4,6 +4,7 @@ * Userspace helper which sends regulatory domains to Linux via nl80211 */ +#include <ctype.h> #include <errno.h> #include <stdio.h> #include <fcntl.h> @@ -156,6 +157,11 @@ int main(int argc, char **argv) struct nlattr *nl_reg_rules; const struct ieee80211_regdomain *rd = NULL; + const char *default_paths[] = { + "/etc/default/crda", /* Users configuration if COUNTRY is not set */ + "/usr/etc/default/crda", /* General configuration if COUNTRY is not set */ + NULL + }; const char *regdb_paths[] = { "/usr/local/lib/crda/regulatory.bin", /* Users/preloads can override */ "/usr/lib/crda/regulatory.bin", /* General distribution package usage */ @@ -171,8 +177,41 @@ int main(int argc, char **argv) env_country = getenv("COUNTRY"); if (!env_country) { - fprintf(stderr, "COUNTRY environment variable not set.\n"); - return -EINVAL; + const char **conf = default_paths; + while (*conf != NULL) { + fd = open(*conf, O_RDONLY); + if (fd >= 0) + break; + conf++; + } + if (fd >= 0) { + FILE *reg = fdopen(fd, "r"); + if (reg) { + char *line = NULL; + ssize_t nread; + size_t len = 0; + while ((nread = getline(&line, &len, reg)) != -1) { + char *ptr = line; + if (*ptr == '#' || *ptr == '\n') + continue; + while (isspace(*ptr)) + line++; + if (strncmp("REGDOMAIN=", ptr, 10) == 0) { + ptr += 10; + env_country = strndup(ptr, 2); + break; + } + } + if (line) + free(line); + fclose(reg); + } else + close(fd); + } + if (!env_country) { + fprintf(stderr, "COUNTRY environment variable not set.\n"); + return -EINVAL; + } } if (!reglib_is_valid_regdom(env_country)) { ++++++ crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch ++++++ commit f4ef2531698fb9ba006e8b31a223b3269be8bc7c Author: Luis Chamberlain <mcg...@kernel.org> Date: Wed Nov 21 17:07:45 2018 -0800 README: add legacy notice As if kernel v4.15 CRDA is no longer needed. Annotate this. The code will still be maintained to help older kernels. Signed-off-by: Luis Chamberlain <mcg...@kernel.org> diff --git a/README b/README index 88f2623..7d39891 100644 --- a/README +++ b/README @@ -3,11 +3,17 @@ <https://wireless.wiki.kernel.org/en/developers/regulatory/crda> This is the Central Regulatory Domain Agent for Linux. It serves one -purpose: tell Linux kernel what to enforce. In essence it is a udev -helper for communication between the kernel and userspace. You only -need to run this manually for debugging purposes. For manual changing -of regulatory domains use iw (iw reg set) or wpa_supplicant (feature -yet to be added). +purpose: tell Linux kernel what regulatory ruels to enforce for 802.11. + +CRDA is no longer needed as of kernel v4.15 since commit 007f6c5e6eb45 +("cfg80211: support loading regulatory database as firmware file") added +support to use the kernel's firmware request API which looks for the +firmware on /lib/firmware. Because of this CRDA is legacy software for +older kernels. It will continue to be maintained. + +CRDA is a udev helper for communication between the kernel and userspace. You +only need to run this manually for debugging purposes. For manual changing of +regulatory domains use iw (iw reg set) or wpa_supplicant. HOST REQUIREMENTS =================== ++++++ crda-python3.patch ++++++ --- /var/tmp/diff_new_pack.PRiAND/_old 2020-12-03 18:43:04.334184915 +0100 +++ /var/tmp/diff_new_pack.PRiAND/_new 2020-12-03 18:43:04.334184915 +0100 @@ -213,7 +213,7 @@ + .n = _n, .len_n = sizeof(_n), \\ } - static const struct key_params keys[] = { + static const struct key_params __attribute__ ((unused)) keys[] = { ''') - for n in xrange(n + 1): - output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) ++++++ crda.default ++++++ # # Used by the crda(8) helper to set the country code for the WLAN # location. Outside the US or without self-managed WLAN devices # it is helpful to copy this file to /etc/default/ and set the # two letter specific ISO / IEC 3166 alpha2 country code. # REGDOMAIN=00 _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org