summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-01-31 07:29:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-01-31 07:29:37 +0000
commit12c672157dfa82267f87abf24977851b26639ed5 (patch)
tree935e2b7e55347983a1881c80a53a0270d7fb772d
parentAdding upstream version 2019.06.03. (diff)
downloadwireless-regdb-12c672157dfa82267f87abf24977851b26639ed5.tar.xz
wireless-regdb-12c672157dfa82267f87abf24977851b26639ed5.zip
Adding debian version 2019.06.03-1.debian/2019.06.03-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/README.Debian21
-rw-r--r--debian/README.source34
-rw-r--r--debian/certs/benh@debian.org.x509.pem17
-rw-r--r--debian/changelog247
-rw-r--r--debian/compat1
-rw-r--r--debian/control25
-rw-r--r--debian/copyright29
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/patches/dont_auto_create_keypair36
-rw-r--r--debian/patches/enable_recording_and_using_an_external_signature.patch94
-rw-r--r--debian/patches/run-scripts-with-python-3.patch35
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/split_signature_generation.patch46
-rw-r--r--debian/regulatory.bin.sigbin0 -> 256 bytes
-rw-r--r--debian/regulatory.db.p7sbin0 -> 1225 bytes
-rwxr-xr-xdebian/rules60
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/include-binaries2
-rw-r--r--debian/source/lintian-overrides2
-rw-r--r--debian/upstream/signing-key.asc91
-rw-r--r--debian/watch3
-rw-r--r--debian/wireless-regdb.postinst14
-rw-r--r--debian/wireless-regdb.prerm10
23 files changed, 774 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..f7e5f6b
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,21 @@
+wireless-regdb for Debian
+-------------------------
+
+wireless-regdb provides a machine-readable database of legal
+regulations on radio emissions that affect use of wireless networking.
+The Linux kernel and drivers use this to maintain compliance with
+those regulations.
+
+The database may be loaded by either crda (in the crda package) or by
+the kernel. Kernel loading was implemented in Linux 4.15, but only
+enabled in the Debian package from 5.5 onward.
+
+If you use a custom kernel built from upstream source, it will only
+trust this database if it is signed by the upstream maintainer of
+wireless-regdb. To use the upstream database and signature instead of
+the Debian version, run:
+
+ update-alternatives --set regulatory.db \
+ /lib/firmware/regulatory.db-upstream
+
+ -- Ben Hutchings <ben@decadent.org.uk>, Thu, 30 Jan 2020 19:30:34 +0000
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..87fb293
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,34 @@
+If you need to make an NMU, you'll first have to create a key-pair
+and certificate.
+
+1. Choose your author ID; I suggest your debian.org address.
+ REGDB_AUTHOR="<author-id>"
+2. Generate the private key by running:
+ make REGDB_AUTHOR="$REGDB_AUTHOR" ~/".wireless-regdb-$REGDB_AUTHOR.key.priv.pem"
+3. Generate the public key by running:
+ make REGDB_AUTHOR="$REGDB_AUTHOR" "$REGDB_AUTHOR.key.pub.pem"
+4. Generate a certificate by running:
+ openssl req -new -key ~/.wireless-regdb-"$REGDB_AUTHOR.key.priv.pem" \
+ -days 36500 -utf8 -nodes -batch -x509 \
+ -outform PEM -out "$REGDB_AUTHOR.x509.pem" \
+ -config <(cat <<-EOF
+ [ req ]
+ distinguished_name = req_distinguished_name
+ string_mask = utf8only
+ prompt = no
+ [ req_distinguished_name ]
+ commonName = $REGDB_AUTHOR
+ EOF
+ )
+5. Either add the public key to the crda package in debian/pubkeys, or
+ modify this package to install it in /lib/crda/pubkeys.
+6. Add the certificate to the linux package and regenerate
+ debian/patches/debian/wireless-add-debian-wireless-regdb-certificates.patch
+ as documented in its patch header.
+7. Set REGDB_AUTHOR=<author-id> in debian/rules here.
+
+When preparing a source package, you must run 'debian/rules sign' to
+create a detached signature so that the private key is not needed when
+building the binary package.
+
+ -- Ben Hutchings <ben@decadent.org.uk>, Thu, 30 Jan 2020 19:42:30 +0000
diff --git a/debian/certs/benh@debian.org.x509.pem b/debian/certs/benh@debian.org.x509.pem
new file mode 100644
index 0000000..da3981d
--- /dev/null
+++ b/debian/certs/benh@debian.org.x509.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICvTCCAaUCFFd+Ahy5gODoIIIbp7VLSWG4tPrfMA0GCSqGSIb3DQEBCwUAMBox
+GDAWBgNVBAMMD2JlbmhAZGViaWFuLm9yZzAgFw0yMDAxMzAxMzI2MTNaGA8yMTIw
+MDEwNjEzMjYxM1owGjEYMBYGA1UEAwwPYmVuaEBkZWJpYW4ub3JnMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAneF3oCSg1XllOgeQyfalph+EHCMHS0+l
+A8YP91TVi355gQDS6T30l/6EzVW9yY8hV4gGOZBmQSZ5LMo/lYcBES8vsOELQ/xf
+L09nBNtNt3JN0cV2c02RabBxFzbqqwo6zZWbdhuOIRePxQK/JMfAQLE7xIB8caVR
+3Pc6WH+xB4GKENH2kxdx4PpReRXU14+tvW844SZ9vPA+gIm07I5pkNuXivAjI4OC
+O2qxrOvnmXQqNY6pZP1GnujlSGExbub8GRhUwxtP1gBEhxw3Rer1ycsPDFXsz2rC
+RSYjojFSTe4hff1YcsIoxY6p0O4Bdwil8CIrR3krz5pGtY/9ZKK17QIDAQABMA0G
+CSqGSIb3DQEBCwUAA4IBAQAgRP6pnt2b6s4ldQjwK1P3WjYcSiN/0EE8Eiu5gE6K
+FV0fQKcmKDLDWwYoLT0ICR4B6WfjM+YVRTnuF4PbQv9/NfSsFtu6uBogIUH/85L/
+ZW4pFtC/jd9ILHM2fyLm7ni0Y4MOOeuvECqQ0/zmw4+XW3a/m/WY0lMGi/ikBJsb
+YmqdrOZLDcnXVmMVATiMvvFExDgn4M9y1j3k90s70rEM1YNtHhAEaSmIaeB919u0
+WXKNnTxDr8Z9tyEVUorpm2su6Cc8Py2E+5oiCp9qJeY55HRztipwqh3LzNSgGyZx
+YwTFEiFIupInBqg+baFDpdIq98rEJuhbH+TcidwfBHk/
+-----END CERTIFICATE-----
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..f0c85a5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,247 @@
+wireless-regdb (2019.06.03-1) unstable; urgency=medium
+
+ * New upstream version (Closes: #949553):
+ - Install regulatory.db and regulatory.db.p7s to /lib/firmware
+ (Closes: #892229)
+ - Update rules for Australia (AU), Canada (CA), Switzerland (CH),
+ Germany (DE), Denmark (DK), Spain (ES), Finland (FI), France (FR),
+ Hungary (HU), India (IN), Japan (JP), Republic of Korea (KR),
+ Kazakhstan (KZ), Lithuania (LI), Panama (PA), Portugal (PT),
+ Qatar (QA), Sweden (SE), Singapore (SG), Turkey (TR), Taiwan (TW),
+ and United States (US)
+ - Add ETSI WMM rules and apply them to various territories
+ - Make scripts compatible with Python 3
+ * debian/control: Point Vcs URLs to Salsa
+ * Drop "Set both PASSIVE_SCAN and NO_IBSS flags in binary database",
+ only needed for compatibility with wheezy
+ * debian/rules: Use $(MAKE) for recursive make
+ * debian/patches: Refresh and update for Python 3 compatibility
+ * Run scripts with Python 3 (Closes: #938829)
+ * Expect Debian regulatory.db detached signature in source package
+ * debian/rules: Build under debian/build to avoid overwriting shipped
+ binaries
+ * debian/rules: Only build regulatory.{bin,db} during binary build
+ * debian/rules: Update exclusion of custom public keys from the package
+ * debian/rules: Verify that our binaries match upstream unless db.txt is
+ patched
+ * Install upstream and Debian versions of regulatory.db as alternatives
+ * debian/contol: Rewrite package description
+ * debian/copyright: Use https: scheme in Format
+ * Add upstream public key and enable signature checking in debian/watch
+ * debian/control: Set Rules-Requires-Root: no
+ * debian/control: Update Standards-Version to 4.4.1
+ * lintian: Override orig-tarball-missing-upstream-signature warning as
+ this is blocked by bug #882694
+ * Add and use a static certificate for my signing key
+ * debian/README.source: Introduce a shell variable for author ID
+ * debian/README.source: Update to cover the certificate
+
+ -- Ben Hutchings <ben@decadent.org.uk> Thu, 30 Jan 2020 20:47:17 +0100
+
+wireless-regdb (2016.06.10-1) unstable; urgency=medium
+
+ * New upstream version (Closes: #830288)
+ - Update rules for Hong Kong (HK): assign to ETSI DFS region
+ - Update rules for South Africa (ZA): remove DFS requirement and increase
+ transmit power limit for channels 100..140 (5490-5710 MHz)
+ - Update rules for Taiwan (TW): extend the 2.4 GHz and 5 GHz bands; change
+ transmit power limits for parts of the 5 GHz band; re-assign to FCC DFS
+ region
+ - Update rules for United States (US): increase transmit power limit for
+ channels 36..48 (5170-5250 MHz)
+ - Update rules for Uruguay (UY): remove channels 100..144 (5490-5730 MHz)
+ - Update rules for Russia (RU): enable VHT80 in 5 GHz band and VHT160
+ for channel 50 (5170-5330 MHz)
+ - Update rules for Ukraine (UA): enable VHT80 in 5 GHz band and VHT160
+ for channels 46..54 (5150-5350 MHz) and 114..118 (5490-5670 MHz)
+ - Update rules for Malaysia (MY): change transmit power limit for the
+ 5 GHz band; enable VHT80 in 5 GHz band and VHT160 for channels 50
+ (5170-5330 MHz) and 114 (5490-5650 MHz)
+ - Update rules for Greenland (GL): enable VHT160 for channels 50
+ (5170-5330 MHz) and 114..126 (5490-5710 MHz)
+ - Update rules for Croatia (HR) and Finland (FI): extend the 2.4 GHz and
+ 5 GHz bands; increase transmit power limit for channels 34..48
+ (5150-5250 MHz); add NO-OUTDOOR flag for channels 34..64 (5150-5350 MHz)
+ - Fix world regulatory domain: correct the channel width for channels
+ 12..13 (2457-2482 MHz)
+ - Add rules for Cuba (CU)
+ - Update rules for Germany (DE) and Netherlands (NL): add channels
+ 147..165 (5725-5875 MHz)
+ - Update rules for Bulgaria (BG): increase transmit power limit for
+ channels 36..48 (5170-5250 MHz); add NO-OUTDOOR flag for 60 GHz band
+ - Update rules for Republic of Korea (KR): add 60 GHz band
+ * debian/control: Change Vcs-Git and Vcs-Browser to canonical HTTP-S URLs
+ * debian/copyright: Change Source to HTTP-S URL
+ * Use debhelper compatibility level 9
+ * debian/control: Update Standards-Version to 3.9.8; no changes needed
+ * Remove obsolete postinst script
+ * debian/control: Update Homepage
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 04 Dec 2016 23:47:35 +0000
+
+wireless-regdb (2015.07.20-1) unstable; urgency=medium
+
+ * New upstream version
+ - Update rules for Armenia (AM), Bahrain (BH), Costa Rica (CR),
+ Ecuador (EC), Guam (GU), Sri Lanka (LK), El Salvador (SV): disable VHT
+ in 5 GHz band
+ - Update rules for Australia (AU), New Zealand (NZ): assign to ETSI DFS
+ region
+ - Update rules for Bulgaria (BG): add channels 147..173 (5725-5875 MHz)
+ - Update rules for Canada (CA): remove channels 120..134 (5600-5650 MHz)
+ - Update rules for Egypt (EG): disable VHT80
+ - Update rules for Indonesia (ID), Democratic People's Republic of Korea
+ (KP): disable VHT
+ - Update rules for Japan (JP): add 60 GHz band
+ - Update rules for Macao (MO): assign to ETSI FCC region; add channels
+ 100..144 (5490-5730 MHz); enable VHT80 and VHT160 in 5 GHz band
+ - Add rules for Maldives (MV), Nigeria (NG), Tanzania (TZ) and Samoa (WS)
+ - Update rules for Russia (RU): disable VHT80; add 60 GHz band
+ - Update rules for United States (US): re-add channels 100..144
+ (5490-5730 MHz)
+ * Generate a detached signature at source preparation time and append
+ it when building the binary package (thanks to Jérémy Bobbio)
+ (Closes: #725803)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 30 Aug 2015 10:20:04 +0100
+
+wireless-regdb (2014.11.18-1) unstable; urgency=medium
+
+ * New upstream version
+ - Update world regulatory domain: re-enable VHT80 on channel 42
+ (5210 MHz) (regression in 2014.05.19); enable VHT80 on channel 58
+ (5290 MHz) and VHT160 on channel 50 (5250 MHz) (requires Linux 3.15)
+ - Enable VHT160 on channel 50 (5250 MHz) for many countries
+ (requires Linux 3.15)
+ - Update rules for Bulgaria (BG): add channels 100..140 (5490-5710 MHz)
+ - Add rules for American Samoa (AS), Bermuda (BM), The Bahamas (BS),
+ Christmas Island (CX), Ethiopia (ET), French Guiana (GF),
+ Guadeloupe (GP), Cayman Islands (KY), Mongolia (MN),
+ Northern Mariana Islands (MP), Martinique (MQ), Mauritius (MU),
+ Malawi (MW), Nicaragua (NI), French Polynesia (PF), Paraguay (PY),
+ Reunion (RE), Suriname (SR), Uganda (UG), U.S. Virgin Islands (VI)
+ and Mayotte (YT)
+ - Update rules for countries using ETSI regulations in 60 GHz band:
+ increase frequency range to 57-66 GHz and remove NO-OUTDOOR flag
+ * debian/copyright: Update upstream maintainer and git repository
+ addresses
+
+ -- Ben Hutchings <ben@decadent.org.uk> Thu, 01 Jan 2015 23:51:50 +0000
+
+wireless-regdb (2014.10.07-1) unstable; urgency=medium
+
+ * New upstream version
+ - Update rules for Spain (ES): increase max EIRP in one frequency range
+ - Add rules for Anguilla (AI), Dominica (DM), Saint Kitts and Nevis (KN),
+ Saint Lucia (LC), Lesotho (LS), Marshall Islands (MH), Moldova (MD),
+ Saint Pierre and Miquelon (PM), Turks and Caicos Islands (TC),
+ Saint Vincent and the Grenadines (VC), and Wallis and Futuna (WF)
+ - Update rules for Saint Barthélemy (BL): increase frequency range and
+ max EIRP on 5 GHz band; assign to ETSI DFS region
+ - Update rules for Bolivia (BO): reduce max EIRP in 2.4 GHz band;
+ increase frequency range in 5 GHz band
+ - Update rules for Andorra (AD): add 2.4 GHz and 5 GHz bands
+ - Update rules for Republic of Korea (KR): add channel 165 (5825 MHz)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 12 Oct 2014 01:19:26 +0100
+
+wireless-regdb (2014.06.13-1) unstable; urgency=medium
+
+ * New upstream version
+ - Correct removal of NO-OFDM and DFS flags from some rules
+ (regression in 2013.11.27)
+ - Add channels 52..64 and 100..144 in 5 GHz band to world regulatory
+ domain
+ - Update rules for Norway (NO): increase frequency range on 5 GHz band
+ and add 17 GHz band
+ - Update rules for Uzbekistan (UZ)
+ - Add rules for Afghanistan (AF), Burkina Faso (BF), Bhutan (BT),
+ Central African Republic (CF), Côte d'Ivoire (CI), Micronesia (FM),
+ Ghana (GH), Guyana (GY), Montenegro (ME), Mauritania (MR), Palau (PW),
+ Senegal (SN), Chad (TD), Togo (TG) and Vanuatu (VU)
+ - Update rules for Venezuela (VE): increase max EIRP in some frequency
+ ranges
+ - Update rules for Haiti (HT)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 05 Oct 2014 23:52:43 +0100
+
+wireless-regdb (2013.11.27-1) unstable; urgency=medium
+
+ * New upstream version (Closes: #729089)
+ - Enable VHT80 for many countries where it is permitted
+ - Enable 5 GHz band for Albania (AL), Bangladesh (BD), Algeria (DZ),
+ Indonesia (ID), Morocco (MA), Zimbabwe (ZW)
+ - Enable HT40 in 5 GHz band for Russian Federation (RU)
+ - Enable VHT80 for world roaming
+ - Remove obsolete country code CS (Serbia and Montenegro)
+ - Add 60 GHz band channels 1-3 for world roaming
+ - Remove antenna gain
+ - Add many countries to DFS regions
+ - Increase frequency range on 5 GHz for many countries
+ - Increase max EIRP on 2.4 GHz for Canada (CA), Dominican Republic (DO),
+ Grenada (GD), Guatemala (GT), Guam (GU), Panama (PA), Puerto Rico (PR),
+ Taiwan (TW), United States (US) and Uzbekistan (UZ)
+ - Increase max EIRP on part or all of 5 GHz band for Grenada (GD),
+ Honduras (HN), Jamaica (JM), Sri Lanka (LK), Monaco (MC), Mexico (MX),
+ Papua New Guinea (PG), Trinidad and Tobago (TT), Uruguay (UY),
+ Uzbekistan (UZ) and Venezuela (VE)
+ - Enable HT40 in 2.4 GHz band for Republic of Korea (KR)
+ - Reduce max EIRP on 5 GHz for Bulgaria (BG), Brunei Darussalam (BN)
+ - Reduce 5 GHz band for Bulgaria (BG), Oman (OM)
+ - Remove middle of 5 GHz band for United States (US)
+ - Correct max EIRP and reduce 5 GHz band for Saudi Arabia (SA),
+ South Africa (ZA)
+ - Reduce max EIRP and increase frequency range on 2.4 GHz for
+ Colombia (CO) and Mexico (MX)
+ - Correct max EIRP and frequency range on 5 GHz for Kenya (KE)
+ * Remove the backward-compatible 'EU' regulatory domain; drivers
+ should all be generating specific country codes, and the domain
+ is no longer up-to-date with ETSI regulations
+ * Set both PASSIVE_SCAN and NO_IBSS flags in binary database
+
+ -- Ben Hutchings <ben@decadent.org.uk> Mon, 24 Feb 2014 22:39:31 +0000
+
+wireless-regdb (2013.02.13-1) unstable; urgency=low
+
+ * New upstream version
+ - Add master DFS region information
+ - Add regulations for Rwanda (RW)
+ - Enable HT40 on channels 8-13 in Japan (JP)
+ - Update regulations for Ukraine (UA)
+ - Remove wrong 10 MHz rule for Japan (JP)
+ - Add regulatory rules for US, China (CN) and ETSI members on 60 GHz band
+ - Update regulatory rules for Spain (ES) on 5 GHz and 2.4 GHz
+ - Allow 40 MHz on world roaming channels 12/13
+ - Add specific data for Serbia (RS) for the 2.4 GHz and 5 GHz bands
+ * debian/control: Set Multi-Arch: foreign, thanks to Tim Gardner
+ * debian/watch: Point to new download location on kernel.org
+ - Switch to xz-compressed tarballs
+ * debian/control: Update fragment in Homepage URL (Closes: #655029)
+ * Update policy version to 3.9.4
+ - debian/copyright: Update to 1.0 format (no changes required)
+ * debian/copyright: Remove unreferenced GPL-2 text
+ * debian/copyright: Add my copyright to Debian packaging
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 30 Jun 2013 20:27:44 +0100
+
+wireless-regdb (2011.04.28-1) unstable; urgency=low
+
+ * New upstream version (Closes: #626816)
+ - Update regulatory rules for Netherlands (NL)
+ - web/Regulatory.py is now under the ISC licence
+
+ -- Ben Hutchings <ben@decadent.org.uk> Tue, 17 May 2011 02:40:08 +0100
+
+wireless-regdb (2010.11.24-2) unstable; urgency=low
+
+ * debian/copyright: Correct licence of web/Regulatory.py
+ * debian/control: Add references to git repository
+
+ -- Ben Hutchings <ben@decadent.org.uk> Tue, 12 Apr 2011 00:15:21 +0100
+
+wireless-regdb (2010.11.24-1) unstable; urgency=low
+
+ * Initial release (Closes: #572220)
+ - Most packaging was done by Kel Modderman and Stefan Lippers-Hollmann
+
+ -- Ben Hutchings <ben@decadent.org.uk> Mon, 11 Apr 2011 14:09:21 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..f572300
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,25 @@
+Source: wireless-regdb
+Section: net
+Priority: optional
+Maintainer: Ben Hutchings <ben@decadent.org.uk>
+Build-Depends: debhelper (>= 9),
+ openssl,
+ python3,
+ python3-m2crypto,
+ quilt
+Rules-Requires-Root: no
+Standards-Version: 4.4.1
+Vcs-Git: https://salsa.debian.org/kernel-team/wireless-regdb.git
+Vcs-Browser: https://salsa.debian.org/kernel-team/wireless-regdb
+Homepage: https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb
+
+Package: wireless-regdb
+Architecture: all
+Multi-Arch: foreign
+Depends: ${misc:Depends}
+Suggests: crda
+Description: wireless regulatory database for Linux
+ This package provides a machine-readable database of legal
+ regulations on radio emissions that affect use of wireless networking.
+ The Linux kernel and drivers use this to maintain compliance with
+ those regulations.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..bf1d330
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: wireless-regdb
+Upstream-Contact: Seth Forshee <seth.forshee@canonical.com>
+Source: https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
+
+Files: *
+Copyright: 2008, Luis R. Rodriguez <mcgrof@gmail.com>
+ 2008, Johannes Berg <johannes@sipsolutions.net>
+ 2008, Michael Green <Michael.Green@Atheros.com>
+License: ISC
+
+Files: debian/*
+Copyright: 2009, Kel Modderman <kel@otaku42.de>
+ 2011, Stefan Lippers-Hollmann <s.l-h@gmx.de>
+ 2011-2013, Ben Hutchings <ben@decadent.org.uk>
+License: ISC
+
+License: ISC
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..50be83c
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[git-buildpackage]
+compression=xz
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/enable_recording_and_using_an_external_signature.patch b/debian/patches/enable_recording_and_using_an_external_signature.patch
new file mode 100644
index 0000000..d13e72b
--- /dev/null
+++ b/debian/patches/enable_recording_and_using_an_external_signature.patch
@@ -0,0 +1,94 @@
+From: Jérémy Bobbio <lunar@debian.org>
+Date: Mon, 9 Feb 2015 19:52:17 +0100
+Subject: Enable recording and using an external signature
+Bug-Debian: https://bugs.debian.org/725803
+
+To make wireless-regdb build reproducibly, we need a way to save
+the signature of the database to an external file and later reuse
+it instead of requiring the private key.
+
+[bwh: Update for version 2019.06.03 and Python 3 compatibility]
+
+--- a/db2bin.py
++++ b/db2bin.py
+@@ -11,6 +11,8 @@ VERSION = 19
+
+ if len(sys.argv) < 3:
+ print('Usage: %s output-file input-file [key-file]' % sys.argv[0])
++ print(' %s -s signature-file input-file key-file' % sys.argv[0])
++ print(' %s -i signature-file output-file input-file' % sys.argv[0])
+ sys.exit(2)
+
+ def create_rules(countries):
+@@ -48,8 +50,27 @@ class PTR(object):
+ def get(self):
+ return self._offset
+
++if sys.argv[1] == '-s':
++ signature_path = sys.argv[2]
++ input_path = sys.argv[3]
++ output_path = None
++ key_path = sys.argv[4]
++elif sys.argv[1] == '-i':
++ signature_path = sys.argv[2]
++ output_path = sys.argv[3]
++ input_path = sys.argv[4]
++ key_path = None
++else:
++ signature_path = None
++ output_path = sys.argv[1]
++ input_path = sys.argv[2]
++ if len(sys.argv) > 3:
++ key_path = sys.argv[3]
++ else:
++ key_path = None
++
+ p = DBParser()
+-countries = p.parse(open(sys.argv[2], 'r', encoding='utf-8'))
++countries = p.parse(open(input_path, 'r', encoding='utf-8'))
+
+ countrynames = list(countries)
+ countrynames.sort()
+@@ -121,27 +142,37 @@ for alpha2 in countrynames:
+ output.write(struct.pack('>BBxBI', alpha2[0], alpha2[1], coll.dfs_region, reg_rules_collections[coll.permissions]))
+
+
+-if len(sys.argv) > 3:
++if key_path:
+ # Load RSA only now so people can use this script
+ # without having those libraries installed to verify
+ # their SQL changes
+ from M2Crypto import RSA
+
+ # determine signature length
+- key = RSA.load_key(sys.argv[3])
++ key = RSA.load_key(key_path)
+ hash = hashlib.sha1()
+ hash.update(output.getvalue())
+ sig = key.sign(hash.digest())
+- # write it to file
+ siglen.set(len(sig))
++
+ # sign again
+ hash = hashlib.sha1()
+ hash.update(output.getvalue())
+ sig = key.sign(hash.digest())
+
++ if output_path:
++ output.write(sig)
++ else:
++ with open(signature_path, 'wb') as sigfile:
++ sigfile.write(sig)
++elif signature_path and output_path:
++ with open(signature_path, 'rb') as sigfile:
++ sig = sigfile.read()
++ siglen.set(len(sig))
+ output.write(sig)
+ else:
+ siglen.set(0)
+
+-outfile = open(sys.argv[1], 'wb')
+-outfile.write(output.getvalue())
++if output_path:
++ outfile = open(output_path, 'wb')
++ outfile.write(output.getvalue())
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..0ebd4e4
--- /dev/null
+++ b/debian/patches/run-scripts-with-python-3.patch
@@ -0,0 +1,35 @@
+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.
+
+---
+--- a/db2bin.py
++++ b/db2bin.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from io import BytesIO, open
+ import struct
+--- a/db2fw.py
++++ b/db2fw.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from io import BytesIO, open
+ import struct
+--- a/dbparse.py
++++ b/dbparse.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/python3
+
+ from builtins import bytes
+ from functools import total_ordering
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b5d9b12
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,4 @@
+dont_auto_create_keypair
+enable_recording_and_using_an_external_signature.patch
+split_signature_generation.patch
+run-scripts-with-python-3.patch
diff --git a/debian/patches/split_signature_generation.patch b/debian/patches/split_signature_generation.patch
new file mode 100644
index 0000000..ed4928b
--- /dev/null
+++ b/debian/patches/split_signature_generation.patch
@@ -0,0 +1,46 @@
+From: Jérémy Bobbio <lunar@debian.org>
+Date: Mon, 9 Feb 2015 19:52:17 +0100
+Subject: Split signature generation
+Bug-Debian: https://bugs.debian.org/725803
+
+Now that db2bin.py supports recording a signature to re-use it later,
+we now split the generation of regulatory.bin to create an intermediate
+signature.
+
+The signature can then be shipped in the source to allow the build
+to be reproduced by independent parties.
+
+[bwh: Call the signature file regulatory.bin.sig, not signature.
+ Update for version 2019.06.03.]
+
+--- a/Makefile
++++ b/Makefile
+@@ -38,10 +38,11 @@ REGDB_UPSTREAM_PUBKEY ?= sforshee.key.pu
+
+ REGDB_CHANGED = $(shell $(SHA1SUM) -c --status sha1sum.txt >/dev/null 2>&1; \
+ if [ $$? -ne 0 ]; then \
+- echo maintainer-clean $(REGDB_PUBKEY) $(REGDB_PUBCERT); \
++ echo maintainer-clean; \
+ fi)
+
+ .PHONY: all clean mrproper install maintainer-clean install-distro-key
++.SECONDARY: $(REGDB_PRIVKEY) $(REGDB_PUBKEY) $(REGDB_PUBCERT)
+
+ all: $(REGDB_CHANGED) regulatory.bin sha1sum.txt regulatory.db.p7s
+
+@@ -55,9 +56,12 @@ mrproper: clean maintainer-clean
+ @echo Removed public key, regulatory.bin, regulatory.db* and compressed man pages
+ @rm -f $(REGDB_PUBKEY) $(REGDB_PUBCERT) .custom
+
+-regulatory.bin: db.txt $(REGDB_PRIVKEY) $(REGDB_PUBKEY)
+- @echo Generating $@ digitally signed by $(REGDB_AUTHOR)...
+- ./db2bin.py regulatory.bin db.txt $(REGDB_PRIVKEY)
++regulatory.bin: db.txt regulatory.bin.sig
++ ./db2bin.py -i regulatory.bin.sig regulatory.bin db.txt
++
++regulatory.bin.sig: db.txt $(REGDB_PRIVKEY) $(REGDB_PUBKEY)
++ @echo Generating signature by $(REGDB_AUTHOR)...
++ ./db2bin.py -s regulatory.bin.sig db.txt $(REGDB_PRIVKEY)
+
+ regulatory.db: db.txt db2fw.py
+ @echo "Generating $@"
diff --git a/debian/regulatory.bin.sig b/debian/regulatory.bin.sig
new file mode 100644
index 0000000..2408106
--- /dev/null
+++ b/debian/regulatory.bin.sig
Binary files differ
diff --git a/debian/regulatory.db.p7s b/debian/regulatory.db.p7s
new file mode 100644
index 0000000..e64c624
--- /dev/null
+++ b/debian/regulatory.db.p7s
Binary files differ
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..85dd8bc
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,60 @@
+#!/usr/bin/make -f
+
+export CRDA_PATH = /lib/crda
+export REGDB_AUTHOR = benh@debian.org
+export V = 1
+# prevent the build system from calling lsb_release
+export LSB_ID = Debian/Ubuntu
+
+define copy_source
+test -d .pc
+set +e; QUILT_PC=.pc quilt unapplied --quiltrc - >/dev/null && echo 'Patch series not fully applied'; test $$? -eq 1
+mkdir -p '$(1)'
+cp -a $(filter-out debian .pc .git %.bin %.db %.p7s sha1sum.txt, $(wildcard * .[^.]*)) '$(1)'
+endef
+
+%:
+ dh ${@}
+
+debian/stamps/configure:
+ rm -rf debian/build
+ $(call copy_source,debian/build)
+ cp debian/regulatory.bin.sig debian/regulatory.db.p7s debian/build/
+ mkdir -p debian/stamps
+ touch $@
+
+override_dh_auto_configure: debian/stamps/configure
+
+override_dh_auto_build:
+ $(MAKE) -C debian/build regulatory.bin regulatory.db
+# crda will install public keys
+ rm -f debian/build/.custom
+# Verify that our binaries match upstream unless db.txt is patched
+ifeq ($(shell QUILT_PC=.pc quilt patches --quiltrc - db.txt | wc -l),0)
+ diff regulatory.db debian/build/regulatory.db
+ size="$$(dd if=regulatory.bin status=none bs=4 skip=2 count=1 | od -td4 --endian=big -An | sed 's/^\s*//')" \
+ && dd if=regulatory.bin status=none iflag=skip_bytes,count_bytes skip=12 count=$$size of=debian/build/regulatory.bin.unsigned-upstream \
+ && dd if=debian/build/regulatory.bin status=none iflag=skip_bytes,count_bytes skip=12 count=$$size of=debian/build/regulatory.bin.unsigned \
+ && diff debian/build/regulatory.bin.unsigned-upstream debian/build/regulatory.bin.unsigned
+endif
+
+override_dh_auto_install: DIR = debian/wireless-regdb
+override_dh_auto_install:
+ $(MAKE) -C debian/build DESTDIR=$(CURDIR)/$(DIR) install
+ for file in regulatory.db regulatory.db.p7s; do \
+ install -m644 $$file $(DIR)/lib/firmware/$$file-upstream \
+ && mv $(DIR)/lib/firmware/$$file $(DIR)/lib/firmware/$$file-debian \
+ || exit; \
+ done
+# crda will install public keys
+ rm -r debian/wireless-regdb/lib/crda/pubkeys
+
+override_dh_auto_clean:
+ rm -rf debian/build debian/stamps
+
+sign:
+ rm -rf debian/build
+ $(call copy_source,debian/build)
+ cp debian/certs/$(REGDB_AUTHOR).x509.pem debian/build/
+ $(MAKE) -C debian/build regulatory.bin.sig regulatory.db.p7s
+ cp debian/build/regulatory.bin.sig debian/build/regulatory.db.p7s debian/
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/include-binaries b/debian/source/include-binaries
new file mode 100644
index 0000000..615aaf0
--- /dev/null
+++ b/debian/source/include-binaries
@@ -0,0 +1,2 @@
+debian/regulatory.bin.sig
+debian/regulatory.db.p7s
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..4b9453f
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
+# Blocked by #882694
+wireless-regdb source: orig-tarball-missing-upstream-signature .*
diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..20f0a8b
--- /dev/null
+++ b/debian/upstream/signing-key.asc
@@ -0,0 +1,91 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBE5oafcBEADA8ZQmyhw8q9fzHDQcbgTNMKZWMwCgoro9IXZrPlyQUqtRK7AM
+PJ0/koxYFSjFWMrDRSl591/gBFmIGRjuwlUxZKZ1qQ0FJHvbPx5z7c5+TU6ONH6f
+uoVjaR+48DOVgGtr85hnfSFQHQYfuPT7Dx6Bv/d43b6m1BP6ceWS0rSqPyRp4THC
+2DvZY5monAGCULh2BZh6a5/GrW0pkASGY/dRmW3AWO8Rv23selQt/IuKKqF5g0aH
++TU+dGYjkKidqxWkA/L0SbA/5GFXNc2X1dHekm54xJgxtD6Zocc/m5Q4ESG7StqH
+sHkT3b7UGqgialbhWzKGCDgwLoV/bR95c4Dys8s6qJJPLsPxjWDFGG2WsO1aAwwm
+2Ca8OHLW9RE8gNJC3uwLzhkNKfExLnU+KULT+lES2ckL3Kj7r0MAoZqLTTM6tVEl
+/Cv9HHVYGYWgKaSxViHtbRIQ7TzqjKUfYxjQULHwvF3wZawf6Yh1o9aDOwwimXUv
+y4agXLxIDUmBatl7Yw4OSf90XWhHMNOPDCgzFcHgFF7I8YLKthq+Fa91qdOWs0ud
+Z2H8zb4Gv/+ziLVSSayNczIeLXNz729W93LARq7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PZ5DQcwKmR1UXPzhM3EBBRpfhAAgxZYu8OguZZGvfhUMW2J7dCmiqv2
+A87cdHsxkAxDdtPiQiUp3n2jX8c+SMM6Yb2cy5hAQNAb6Etx/7epGv9GYoS1irjd
+/u3eeLII9GqVrA/6iaAO5Glci0DL69xd5C3QTcRYrYFZTPqeVx4enb6tBwIz0tzF
+QA+7sSZ3+BX90wL45QuoEraNgC1nj3ZnzrgxvzG+WChLOaxMd3mdh/FJmuMUKFeK
+oUpm5L55TXnJMA+bbcONQ4VRGVturtY07JmntKs1RJsMY3IWnebRDHw9We4pHJLi
+JC7IvC6dzC0tfZQaI1hr9gnHhJPMkiII4jhd7h1OwH/PSPPCv/yYiyPapAy/YPIF
+ChkEPASfl/mqtAsdrDxIK/Eq8HdE6HPB812ROORLzkIQFQ7hQZ7hdp89f0vGRk2h
+VAD3hlbKXSc+pRSGDCsUrWlpdHsNeYMepvsWS/mo3g3jBoKw05ACkUVep5oVMlm/
+hsKf3WjZliL0vACcGV06RBwz3DtWSINQ2fGKWcwf5mALBKcUPfYUVCQ2+Kl+pjNS
+T0YE7cZ8selEhKRafrd8qQCJPtbgGv0Sk5wJa1ZUKhHA0yfF9x1rYUkM57WQWkzr
+TYuf4PPbYyV5g2P79bwZLeWgeOLQfHzOS7x+I8d89iG2iSCwmj7gKX7U3NgmuThS
+WgqL/3rROEWF/7Y=
+=9NqJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..c27699d
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="pgpmode=mangle, pgpsigurlmangle=s|\.xz$|.sign|, decompress" \
+https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-(.*)\.tar\.xz debian
diff --git a/debian/wireless-regdb.postinst b/debian/wireless-regdb.postinst
new file mode 100644
index 0000000..9cdbcb8
--- /dev/null
+++ b/debian/wireless-regdb.postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+ update-alternatives --install \
+ /lib/firmware/regulatory.db regulatory.db /lib/firmware/regulatory.db-debian 100 \
+ --slave /lib/firmware/regulatory.db.p7s regulatory.db.p7s /lib/firmware/regulatory.db.p7s-debian
+ update-alternatives --install \
+ /lib/firmware/regulatory.db regulatory.db /lib/firmware/regulatory.db-upstream 50 \
+ --slave /lib/firmware/regulatory.db.p7s regulatory.db.p7s /lib/firmware/regulatory.db.p7s-upstream
+fi
+
+#DEBHELPER#
diff --git a/debian/wireless-regdb.prerm b/debian/wireless-regdb.prerm
new file mode 100644
index 0000000..9e2e5bb
--- /dev/null
+++ b/debian/wireless-regdb.prerm
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" != "upgrade" ]; then
+ update-alternatives --remove regulatory.db /lib/firmware/regulatory.db-debian
+ update-alternatives --remove regulatory.db /lib/firmware/regulatory.db-upstream
+fi
+
+#DEBHELPER#