fc58cd
%define         crda_version    3.18
97180a
%define         regdb_version   2020.04.29
fc58cd
fc58cd
%global         _firmwarepath	/usr/lib/firmware
fc58cd
%global		_udevrulesdir	/usr/lib/udev/rules.d
fc58cd
fc58cd
Name:           crda
fc58cd
Version:        %{crda_version}_%{regdb_version}
97180a
Release:        1%{?dist}
fc58cd
Summary:        Regulatory compliance daemon for 802.11 wireless networking
fc58cd
BuildArch:      noarch
fc58cd
fc58cd
Group:          System Environment/Base
fc58cd
License:        ISC
fc58cd
URL:            https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
fc58cd
BuildRoot:      %{_tmppath}/%{name}-%{crda_version}-%{release}-root-%(%{__id_u} -n)
fc58cd
fc58cd
Requires:       udev, iw
fc58cd
Requires:       systemd >= 190
fc58cd
Requires:       kernel >= 4.15
fc58cd
fc58cd
Source0:        http://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-%{regdb_version}.tar.xz
fc58cd
Source1:        setregdomain
fc58cd
Source2:        setregdomain.1
fc58cd
Source3:        85-regulatory.rules
fc58cd
fc58cd
Patch0:         wireless-regdb-install_db.patch
fc58cd
fc58cd
%description
fc58cd
The crda package provideds the regulatory rules database
fc58cd
"wireless-regdb" used by the kernels 802.11 networking stack
fc58cd
in order to comply with radio frequency regulatory rules around
fc58cd
the world.
fc58cd
fc58cd
%prep
fc58cd
%setup -q -c
fc58cd
%patch0 -p0 -b .install_db
fc58cd
fc58cd
%install
fc58cd
cd wireless-regdb-%{regdb_version}
fc58cd
make install_db DESTDIR=%{buildroot} MANDIR=%{_mandir} \
fc58cd
	FIRMWARE_PATH=%{_firmwarepath}
fc58cd
fc58cd
install -D -pm 0755 %SOURCE1 %{buildroot}%{_sbindir}/setregdomain
fc58cd
install -D -pm 0644 %SOURCE2 %{buildroot}%{_mandir}/man1/setregdomain.1
fc58cd
install -D -pm 0644 %SOURCE3 %{buildroot}%{_udevrulesdir}/85-regulatory.rules
fc58cd
fc58cd
%files
fc58cd
%defattr(-,root,root,-)
fc58cd
%{_sbindir}/setregdomain
fc58cd
%{_udevrulesdir}/85-regulatory.rules
fc58cd
%{_firmwarepath}/regulatory.db
fc58cd
%{_firmwarepath}/regulatory.db.p7s
fc58cd
%{_mandir}/man1/setregdomain.1*
fc58cd
%{_mandir}/man5/regulatory.db.5*
fc58cd
%license wireless-regdb-%{regdb_version}/LICENSE
fc58cd
%doc wireless-regdb-%{regdb_version}/README
fc58cd
fc58cd
%changelog
97180a
* Mon Nov 09 2020 Jarod Wilson <jarod@redhat.com> - 2020.04.29-1
97180a
- Update to wireless-regdb 2020.04.29 release for additional US spectrum
97180a
- Resolves: rhbz#1892700
97180a
97180a
* Mon Apr 01 2019 John W. Linville <linville@redhat.com> -  2018.05.31-4
97180a
- Bump NVR to test CI-related build changes
97180a
- Correct Release value for preceding changelog entry
97180a
97180a
* Fri Jul 27 2018 Stanislaw Gruszka <sgruszka@redhat.com> - 2018.05.31-3
fc58cd
- Remove crda package, since kernel 4.15 is sufficient to provide only
fc58cd
  wireless-regdb package
fc58cd
fc58cd
* Tue Jun 26 2018 Stanislaw Gruszka <sgruszka@redhat.com> - 3.18_2018.05.31-2
fc58cd
- Update wireless-regdb to 2018.05.31
fc58cd
- Remove python2 dependency
fc58cd
- Use sforshee signed reulatory.bin (required by modern kernels)
fc58cd
fc58cd
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.18_2016.02.08-7
fc58cd
- Escape macros in %%changelog
fc58cd
fc58cd
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2016.02.08-6
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fc58cd
fc58cd
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.18_2016.02.08-5
fc58cd
- Switch to %%ldconfig_scriptlets
fc58cd
fc58cd
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2016.02.08-4
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
fc58cd
fc58cd
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2016.02.08-3
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
fc58cd
fc58cd
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2016.02.08-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fc58cd
fc58cd
* Tue Feb 09 2016 John W. Linville <linville@redhat.com> - 3.18_2016.02.08-1
fc58cd
- Update wireless-regdb to version 2016.02.08
fc58cd
- Do not treat unused-const-variable warnings as errors
fc58cd
fc58cd
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2015.10.22-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
fc58cd
fc58cd
* Tue Nov  3 2015 John W. Linville <linville@redhat.com> - 3.18_2015.10.22-1
fc58cd
- Update wireless-regdb to version 2015.10.22
fc58cd
- Fix some whitespace damage in spec file
fc58cd
fc58cd
* Fri Aug 14 2015 Adam Jackson <ajax@redhat.com> 3.18_2015.04.06-3
fc58cd
- Pass rpm's ldflags through to fix hardening
fc58cd
fc58cd
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.18_2015.04.06-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
fc58cd
fc58cd
* Tue Apr 21 2015 John W. Linville <linville@redhat.com> - 3.18_2015.04.06-1
fc58cd
- Update wireless-regdb to version 2015.04.06
fc58cd
fc58cd
* Fri Mar 20 2015 John W. Linville <linville@redhat.com> - 3.18_2015.03.13-1
fc58cd
- Update wireless-regdb to version 2015.03.13
fc58cd
fc58cd
* Wed Feb  4 2015 John W. Linville <linville@redhat.com> - 3.18_2015.01.30-3
fc58cd
- Use %%license instead of %%doc for file containing license information
fc58cd
- Add %%license entry for wireless-regdb
fc58cd
- Correct NVR info at end of previous changelog entry
fc58cd
fc58cd
* Mon Feb  2 2015 John W. Linville <linville@redhat.com> - 3.18_2015.01.30-2
fc58cd
- Update crda to version 3.18
fc58cd
- Update wireless-regdb to version 2015.01.30
fc58cd
- Drop patch to add DESTDIR in install rules for libreg in crda Makefile
fc58cd
fc58cd
* Tue Nov 25 2014 John W. Linville <linville@redhat.com> - 3.13_2014.11.18-1
fc58cd
- Update wireless-regdb to version 2014.11.18
fc58cd
fc58cd
* Mon Oct 27 2014 John W. Linville <linville@redhat.com> - 3.13_2014.10.07-1
fc58cd
- Update wireless-regdb to version 2014.10.07
fc58cd
- Update copyright dates in setregdomain
fc58cd
fc58cd
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13_2014.06.13-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
fc58cd
fc58cd
* Fri Jun 13 2014 John W. Linville <linville@redhat.com> - 3.13_2014.06.13-1
fc58cd
- Update wireless-regdb to version 2014.06.13
fc58cd
fc58cd
* Fri Jun  6 2014 John W. Linville <linville@redhat.com> - 3.13_2014.06.02-1
fc58cd
- Add logger commands to setregdomain to make it more communicative
fc58cd
- Update wireless-regdb to version 2014.06.02
fc58cd
fc58cd
* Fri Feb 28 2014 John W. Linville <linville@redhat.com> - 3.13_2013.11.27-2
fc58cd
- Accomodate relative pathnames in the symlink for /etc/localtime
fc58cd
fc58cd
* Fri Feb 14 2014 John W. Linville <linville@redhat.com> - 3.13_2013.11.27-1
fc58cd
- Update crda to version 3.13
fc58cd
- Remove obsolete patch for regdbdump to display DFS region
fc58cd
- Add patch to use DESTDIR rule for crda libreg installation
fc58cd
- Add patch to avoid calling ldconfig from crda Makefile
fc58cd
- Remove PREFIX='' lines from make commands
fc58cd
- Use SBINDIR and LIBDIR definitions in make commands
fc58cd
fc58cd
* Thu Jan 23 2014 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-3
fc58cd
- Correct a typo in setregdomain
fc58cd
fc58cd
* Fri Jan 17 2014 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-2
fc58cd
- Add patch for regdbdump to display DFS region
fc58cd
fc58cd
* Mon Dec  2 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-1
fc58cd
- Update wireless-regdb to version 2013.11.27
fc58cd
fc58cd
* Fri Nov 22 2013 Xose Vazquez Perez <xose.vazquez@gmail.com> - 1.1.3_2013.02.13-5
fc58cd
- fixed wrong dates
fc58cd
- link with libnl3
fc58cd
- new home for sources
fc58cd
fc58cd
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3_2013.02.13-4
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
fc58cd
fc58cd
* Wed Apr  3 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-3
fc58cd
- setregdomain: remove sed and awk calls
fc58cd
- setregdomain: reimplement COUNTRY assignment with shell function
fc58cd
fc58cd
* Fri Mar  1 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-2
fc58cd
- Bump release to prevent upgrade issues from F17...oops!
fc58cd
fc58cd
* Wed Feb 13 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-1
fc58cd
- Update wireless-regdb to version 2013.02.13
fc58cd
fc58cd
* Tue Feb 12 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.12-1
fc58cd
- Update wireless-regdb to version 2013.02.12
fc58cd
fc58cd
* Fri Jan 25 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.01.11-2
fc58cd
- Update setregdomain to determine timezone info from /etc/timezone
fc58cd
fc58cd
* Fri Jan 25 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.01.11-1
fc58cd
- Update crda to version 1.1.3
fc58cd
- Update wireless-regdb to version 2013.01.11
fc58cd
fc58cd
* Fri Aug 10 2012 John W. Linville <linville@redhat.com>
fc58cd
- Add BuildRequires for openssl
fc58cd
fc58cd
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2_2011.04.28-3
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
fc58cd
fc58cd
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2_2011.04.28-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
fc58cd
fc58cd
* Thu Aug 11 2011 John W. Linville <linville@redhat.com> 1.1.2_2011.04.28-1
fc58cd
- Update crda to version 1.1.2
fc58cd
- Update wireless-regdb to version 2011.04.28 
fc58cd
- Fix mis-numbered version comment in changelog for Nov 23 2010
fc58cd
fc58cd
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1_2010.11.22-2
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
fc58cd
fc58cd
* Tue Nov 23 2010 John W. Linville <linville@redhat.com> 1.1.1_2010.11.22-1
fc58cd
- Update wireless-regdb to version 2010.11.22 
fc58cd
fc58cd
* Thu Feb 25 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-3
fc58cd
- Correct license tag from BSD to ISC
fc58cd
- Comment purpose of regulatory-rules-setregdomain.patch
fc58cd
- Add copyright and license statement to setregdomain
fc58cd
- Add comment for why /lib is hardcoded in files section
fc58cd
- Reformat Dec 21 2009 changelog entry so rpmlint stops complaining
fc58cd
fc58cd
* Tue Jan 26 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-2
fc58cd
- Change RPM_OPT_FLAGS to optflags
fc58cd
- Leave man page compression to rpmbuild
fc58cd
- Correct date in previous changelog entry
fc58cd
fc58cd
* Tue Jan 26 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-1
fc58cd
- Update for crda version 1.1.1
fc58cd
fc58cd
* Mon Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-5
fc58cd
- Remove unnecessary explicit Requries for libgcrypt and libnl -- oops!
fc58cd
fc58cd
* Mon Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-4
fc58cd
- Add libgcrypt and libnl to Requires
fc58cd
fc58cd
* Mon Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-3
fc58cd
- Add man page for setregdomain (from Andrew Hecox <ahecox@redhat.com>)
fc58cd
- Change $RPM_BUILD_ROOT to buildroot
fc58cd
fc58cd
* Fri Dec 18 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-2
fc58cd
- Specify path to iw in setregdomain
fc58cd
fc58cd
* Wed Dec  2 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-1
fc58cd
- Update wireless-regdb to version 2009.11.25 
fc58cd
fc58cd
* Wed Nov 11 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.10-1
fc58cd
- Update wireless-regdb to version 2009.11.10 
fc58cd
fc58cd
* Thu Oct  1 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-3
fc58cd
- Move regdb to /lib/crda to facilitate /usr mounted over wireless network
fc58cd
fc58cd
* Wed Sep  9 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-2
fc58cd
- Use kernel-headers instead of kernel-devel
fc58cd
fc58cd
* Wed Sep  9 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-1
fc58cd
- Update wireless-regdb to version 2009.09.08 
fc58cd
- Start resetting release number with version updates
fc58cd
fc58cd
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0_2009.04.17-12
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
fc58cd
fc58cd
* Wed May 13 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.04.17-11
fc58cd
- Update crda version to version 1.1.0
fc58cd
- Update wireless-regdb to version 2009.04.17 
fc58cd
fc58cd
* Fri Apr 17 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.04.16-10
fc58cd
- Update wireless-regdb version to pick-up recent updates and fixes (#496392)
fc58cd
fc58cd
* Tue Mar 31 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-9
fc58cd
- Add Requires line for iw package (#492762)
fc58cd
- Update setregdomain script to correctly check if COUNTRY is set
fc58cd
fc58cd
* Thu Mar 19 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-8
fc58cd
- Add setregdomain script to set regulatory domain based on timezone
fc58cd
- Expand 85-regulatory.rules to invoke setregdomain script on device add
fc58cd
fc58cd
* Tue Mar 10 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-7
fc58cd
- Update wireless-regdb version to pick-up recent updates and fixes (#489560)
fc58cd
fc58cd
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1_2009.01.30-6
fc58cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
fc58cd
fc58cd
* Mon Feb 16 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.01.30-5
fc58cd
- Recognize regulatory.bin files signed with the upstream key (#484982)
fc58cd
fc58cd
* Tue Feb 03 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.01.30-4
fc58cd
- Change version to reflect new wireless-regdb upstream release practices
fc58cd
- Update wireless-regdb version to pick-up recent updates and fixes (#483816)
fc58cd
fc58cd
* Tue Jan 27 2009 John W. Linville <linville@redhat.com> 1.0.1_2009_01_15-3
fc58cd
- Update for CRDA verion 1.0.1
fc58cd
- Account for lack of "v" in upstream release tarball naming
fc58cd
- Add patch to let wireless-regdb install w/o being root
fc58cd
fc58cd
* Thu Jan 22 2009 John W. Linville <linville@redhat.com> v0.9.5_2009_01_15-2
fc58cd
- Revamp based on package review comments
fc58cd
fc58cd
* Tue Jan 20 2009 John W. Linville <linville@redhat.com> v0.9.5_2009_01_15-1
fc58cd
- Initial build