diff --git a/.crda.metadata b/.crda.metadata index 95ae12a..5a6d09e 100644 --- a/.crda.metadata +++ b/.crda.metadata @@ -1,2 +1,2 @@ -6e0adbfc0f5418a03d7d708bd39d52cd1325b511 SOURCES/crda-1.1.3.tar.bz2 -8135d9c68e7c66ebe1f146dfff162402cee89da2 SOURCES/wireless-regdb-2015.04.06.tar.xz +cee5aee4e7ae209e2dfdf2adcd683a882c6c0668 SOURCES/crda-3.13.tar.xz +9ce5f00f608f203adf2675d02a5148913f7fe6ad SOURCES/wireless-regdb-2016.02.08.tar.xz diff --git a/.gitignore b/.gitignore index f92777a..f435ca3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/crda-1.1.3.tar.bz2 -SOURCES/wireless-regdb-2015.04.06.tar.xz +SOURCES/crda-3.13.tar.xz +SOURCES/wireless-regdb-2016.02.08.tar.xz diff --git a/SOURCES/crda-display-DFS-regulatory-domain-in-regdbdump.patch b/SOURCES/crda-display-DFS-regulatory-domain-in-regdbdump.patch deleted file mode 100644 index 3ef85c2..0000000 --- a/SOURCES/crda-display-DFS-regulatory-domain-in-regdbdump.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d169aaf0290c2a6f8b38769e22ced4d3850da7a9 Mon Sep 17 00:00:00 2001 -From: Zefir Kurtisi -Date: Wed, 3 Apr 2013 15:51:58 +0200 -Subject: [PATCH] crda: display DFS regulatory domain in regdbdump - -Signed-off-by: Zefir Kurtisi -Signed-off-by: Luis R. Rodriguez ---- - print-regdom.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/print-regdom.c b/print-regdom.c -index 075eea890579..9c65872d4775 100644 ---- a/print-regdom.c -+++ b/print-regdom.c -@@ -7,6 +7,22 @@ - - #include "reglib.h" - -+static const char *dfs_domain_name(enum nl80211_dfs_regions region) -+{ -+ switch (region) { -+ case NL80211_DFS_UNSET: -+ return "DFS-UNSET"; -+ case NL80211_DFS_FCC: -+ return "DFS-FCC"; -+ case NL80211_DFS_ETSI: -+ return "DFS-ETSI"; -+ case NL80211_DFS_JP: -+ return "DFS-JP"; -+ default: -+ return "DFS-invalid"; -+ } -+} -+ - static void print_reg_rule(struct ieee80211_reg_rule *rule) - { - struct ieee80211_freq_range *freq; -@@ -57,7 +73,8 @@ static void print_reg_rule(struct ieee80211_reg_rule *rule) - void print_regdom(struct ieee80211_regdomain *rd) - { - unsigned int i; -- printf("country %.2s:\n", rd->alpha2); -+ printf("country %.2s: %s\n", rd->alpha2, -+ dfs_domain_name(rd->dfs_region)); - for (i = 0; i < rd->n_reg_rules; i++) - print_reg_rule(&rd->reg_rules[i]); - printf("\n"); --- -1.8.1.4 - diff --git a/SOURCES/crda-libreg-DESTDIR.patch b/SOURCES/crda-libreg-DESTDIR.patch new file mode 100644 index 0000000..a63b93f --- /dev/null +++ b/SOURCES/crda-libreg-DESTDIR.patch @@ -0,0 +1,31 @@ +commit 2cabb2588da56735369131b709f191453c080be0 +Author: John W. Linville +Date: Fri Feb 14 13:58:44 2014 -0500 + + crda: Add DESTDIR support in install-libreg* rules in Makefile + + Signed-off-by: John W. Linville + Signed-off-by: Luis R. Rodriguez + +diff --git a/Makefile b/Makefile +index 0b2f0d7f8d4e..1f2550915c0d 100644 +--- a/Makefile ++++ b/Makefile +@@ -120,13 +120,13 @@ $(LIBREG): regdb.h reglib.h reglib.c + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' +- $(Q)mkdir -p $(INCLUDE_DIR) +- $(Q)cp *.h $(INCLUDE_DIR)/ ++ $(Q)mkdir -p $(DESTDIR)/$(INCLUDE_DIR) ++ $(Q)cp *.h $(DESTDIR)/$(INCLUDE_DIR)/ + + install-libreg: + $(NQ) ' INSTALL libreg' +- $(Q)mkdir -p $(LIBDIR) +- $(Q)cp $(LIBREG) $(LIBDIR)/ ++ $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) ++ $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ + $(Q)ldconfig + + %.o: %.c regdb.h $(LIBREG) diff --git a/SOURCES/crda-remove-ldconfig.patch b/SOURCES/crda-remove-ldconfig.patch new file mode 100644 index 0000000..f468eff --- /dev/null +++ b/SOURCES/crda-remove-ldconfig.patch @@ -0,0 +1,11 @@ +diff -up crda-3.13/Makefile.ldconfig-remove crda-3.13/Makefile +--- crda-3.13/Makefile.ldconfig-remove 2016-02-09 15:23:50.468086763 -0500 ++++ crda-3.13/Makefile 2016-02-09 15:24:18.735406109 -0500 +@@ -126,7 +126,6 @@ install-libreg: + $(NQ) ' INSTALL libreg' + $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) + $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ +- $(Q)ldconfig + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/SOURCES/regulatory-rules-setregdomain.patch b/SOURCES/regulatory-rules-setregdomain.patch index 806209e..0f6c428 100644 --- a/SOURCES/regulatory-rules-setregdomain.patch +++ b/SOURCES/regulatory-rules-setregdomain.patch @@ -1,6 +1,6 @@ -diff -up crda-1.1.3_2013.01.11/crda-1.1.3/udev/regulatory.rules.setregdomain crda-1.1.3_2013.01.11/crda-1.1.3/udev/regulatory.rules ---- crda-1.1.3_2013.01.11/crda-1.1.3/udev/regulatory.rules.setregdomain 2012-01-18 21:19:09.000000000 -0500 -+++ crda-1.1.3_2013.01.11/crda-1.1.3/udev/regulatory.rules 2013-01-25 14:10:57.818931320 -0500 +diff -up crda-3.13_2016.02.08/crda-3.13/udev/regulatory.rules.setregdomain crda-3.13_2016.02.08/crda-3.13/udev/regulatory.rules +--- crda-3.13_2016.02.08/crda-3.13/udev/regulatory.rules.setregdomain 2012-01-18 21:19:09.000000000 -0500 ++++ crda-3.13_2016.02.08/crda-3.13/udev/regulatory.rules 2013-01-25 14:10:57.818931320 -0500 @@ -2,4 +2,6 @@ # For more information see: # http://wireless.kernel.org/en/developers/Regulatory/CRDA diff --git a/SPECS/crda.spec b/SPECS/crda.spec index 2f01ba5..ff325a4 100644 --- a/SPECS/crda.spec +++ b/SPECS/crda.spec @@ -1,9 +1,9 @@ -%define crda_version 1.1.3 -%define regdb_version 2015.04.06 +%define crda_version 3.13 +%define regdb_version 2016.02.08 Name: crda Version: %{crda_version}_%{regdb_version} -Release: 2%{?dist} +Release: 1%{?dist} Summary: Regulatory compliance daemon for 802.11 wireless networking Group: System Environment/Base @@ -20,14 +20,17 @@ BuildRequires: openssl Requires: udev, iw Requires: systemd >= 190 -Source0: http://www.kernel.org/pub/software/network/crda/crda-%{crda_version}.tar.bz2 +Source0: http://www.kernel.org/pub/software/network/crda/crda-%{crda_version}.tar.xz Source1: http://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-%{regdb_version}.tar.xz Source2: setregdomain Source3: setregdomain.1 # Add udev rule to call setregdomain on wireless device add Patch0: regulatory-rules-setregdomain.patch -Patch1: crda-display-DFS-regulatory-domain-in-regdbdump.patch +# Add DESTDIR to path for libreg installation +Patch1: crda-libreg-DESTDIR.patch +# Do not call ldconfig in crda Makefile +Patch2: crda-remove-ldconfig.patch %description @@ -37,6 +40,15 @@ for communication. CRDA is intended to be run only through udev communication from the kernel. +%package devel +Summary: Header files for use with libreg. +Group: Development/System + + +%description devel +Header files to make use of libreg for accessing regulatory info. + + %prep %setup -q -c %setup -q -T -D -a 1 @@ -44,11 +56,12 @@ communication from the kernel. %patch0 -p1 -b .setregdomain cd crda-%{crda_version} -%patch1 -p1 -b .display-DFS +%patch1 -p1 -b .destdir +%patch2 -p1 -b .ldconfig-remove %build -export CFLAGS="%{optflags}" +export CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" # Use our own signing key to generate regulatory.bin cd wireless-regdb-%{regdb_version} @@ -60,45 +73,69 @@ make %{?_smp_mflags} REGDB_PRIVKEY=key.priv.pem REGDB_PUBKEY=key.pub.pem cd ../crda-%{crda_version} cp ../wireless-regdb-%{regdb_version}/key.pub.pem pubkeys -make %{?_smp_mflags} REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin +make %{?_smp_mflags} SBINDIR=%{_sbindir}/ LIBDIR=%{_libdir}/ \ + REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin %install rm -rf %{buildroot} cd crda-%{crda_version} +cp LICENSE LICENSE.crda cp README README.crda -make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir} +make install DESTDIR=%{buildroot} MANDIR=%{_mandir}/ \ + SBINDIR=%{_sbindir}/ LIBDIR=%{_libdir}/ cd ../wireless-regdb-%{regdb_version} +cp LICENSE LICENSE.wireless-regdb cp README README.wireless-regdb -make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir} +make install DESTDIR=%{buildroot} MANDIR=%{_mandir} -install -D -pm 0755 %SOURCE2 %{buildroot}/sbin +install -D -pm 0755 %SOURCE2 %{buildroot}%{_sbindir} install -D -pm 0644 %SOURCE3 %{buildroot}%{_mandir}/man1/setregdomain.1 +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + + %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) -/sbin/%{name} -/sbin/regdbdump -/sbin/setregdomain +%{_sbindir}/%{name} +%{_sbindir}/regdbdump +%{_sbindir}/setregdomain +%{_libdir}/libreg.so /lib/udev/rules.d/85-regulatory.rules -# location of database is hardcoded to /lib/%{name} -/lib/%{name} +# location of database is hardcoded to /usr/lib/%{name} +/usr/lib/%{name} %{_mandir}/man1/setregdomain.1* %{_mandir}/man5/regulatory.bin.5* %{_mandir}/man8/crda.8* %{_mandir}/man8/regdbdump.8* +%license crda-%{crda_version}/LICENSE.crda +%license wireless-regdb-%{regdb_version}/LICENSE.wireless-regdb %doc crda-%{crda_version}/LICENSE crda-%{crda_version}/README.crda %doc wireless-regdb-%{regdb_version}/README.wireless-regdb +%files devel +%{_includedir}/reglib/nl80211.h +%{_includedir}/reglib/regdb.h +%{_includedir}/reglib/reglib.h + + %changelog +* Tue Feb 09 2016 John W. Linville - 3.13_2016.02.08-1 +- Update crda to version 3.13 +- Update wireless-regdb to version 2016.02.08 + +* Mon Jan 18 2016 John W. Linville - 1.1.3_2015.12.14-1 +- Update wireless-regdb to version 2015.12.14 + * Tue Apr 21 2015 John W. Linville - 1.1.3_2015.04.06-2 - Update wireless-regdb to version 2015.04.06 - Add patch for regdbdump to display DFS region