summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2020-04-01 05:12:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2020-04-01 05:12:56 +0000
commitda9d1d0ff5b4043f723cff1c8ee110385d207700 (patch)
tree2bac1e7bfa61be4898e574097dbfb5f82c3ecca6
parentAdding upstream version 4.14+git20191112.9856751. (diff)
downloadcrda-da9d1d0ff5b4043f723cff1c8ee110385d207700.tar.xz
crda-da9d1d0ff5b4043f723cff1c8ee110385d207700.zip
Adding debian version 4.14+git20191112.9856751-1.debian/4.14+git20191112.9856751-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/changelog102
-rw-r--r--debian/compat1
-rw-r--r--debian/control30
-rw-r--r--debian/copyright268
-rw-r--r--debian/crda.default11
-rw-r--r--debian/crda.lintian-overrides3
-rw-r--r--debian/crda.udev1
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/patches/Makefile-Check-for-libnl-only-when-building.patch27
-rw-r--r--debian/patches/cross.patch63
-rw-r--r--debian/patches/do-not-run-ldconfig-if-destdir-is-set.patch16
-rw-r--r--debian/patches/do_not_embed_pubkeys.patch54
-rw-r--r--debian/patches/fix-linking-of-libraries-used-by-reglib.patch45
-rw-r--r--debian/patches/install-crda-binary-under-libexec-directory.patch66
-rw-r--r--debian/patches/series7
-rw-r--r--debian/patches/use-ldflags-when-building-reglib.patch19
-rw-r--r--debian/pubkeys/benh@debian.org.key.pub.pem9
-rw-r--r--debian/pubkeys/romain.perier@gmail.com.key.pub.pem9
-rwxr-xr-xdebian/rules38
-rw-r--r--debian/setregdomain11
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/lintian-overrides2
-rw-r--r--debian/watch4
23 files changed, 789 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..506f524
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,102 @@
+crda (4.14+git20191112.9856751-1) unstable; urgency=medium
+
+ * New upstream version:
+ - Upstream version is commit 9856751feaf7b102547cea678a5da6c94252d83d
+ dated 2019-11-12
+
+ [ Ben Hutchings ]
+ * debian/control: Point Vcs URLs to Salsa
+ * debian/control: Change to team-maintained, with me as Uploader
+ * debian/control: Use my debian.org email in Uploaders field
+ * debian/watch: Switch to git as upstream is no longer making releases
+ * Add debian/.gitignore to ignore Debian generated files
+ * Use $(LDFLAGS) when building reglib
+ * Install crda binary under /lib/crda
+ * debian/copyright: Note the new Copyleft-Next repository
+ * debian/copyright: Fix typo in the snapshot.debian.org URL
+ * debian/copyright: Default license is Copyleft-Next only
+ * debian/copyright: Use https: scheme for snapshot.debian.org and Format
+ field
+ * lintian: Override warning for the Gitorious URL in text of Copyleft-Next
+ * debian/rules: Remove unnecessary -u and -g options from install command
+ * debian/control: Set Rules-Requires-Root: no
+ * debian/rules: Add support for DEB_BUILD_OPTIONS=terse
+ * debian/control: Update Standards-Version to 4.5.0
+
+ [ Romain Perier ]
+ * Fix build regression with sbuild
+ * debian/pubkeys: Add my own public key
+ * debian/rules: override dh_auto_clean to only trigger make clean
+
+ -- Ben Hutchings <benh@debian.org> Tue, 31 Mar 2020 23:30:39 +0100
+
+crda (3.18-1) unstable; urgency=medium
+
+ [ Ben Hutchings ]
+ * New upstream version (Closes: #840623)
+ * debian/control: Change Vcs-Git, Vcs-Browser and Homepage 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
+ * debian/rules: Pass dpkg build flags to Makefile (Closes: #784917)
+
+ [ Helmut Grohne ]
+ * Fix FTCBFS: use triplet prefixed tools (Closes: #836093)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Wed, 18 Jan 2017 01:58:58 +0000
+
+crda (3.13-1) unstable; urgency=medium
+
+ * New upstream version (Closes: #720119)
+ - reglib: Validate all structure and array lengths (Closes: #716247)
+ * debian/control, debian/watch: Update Homepage and download URLs
+ * debian/copyright: Update licence information and copyright holders
+ - Licence is now copyleft-next 0.3.0
+ * Fix build regressions in new upstream version:
+ - Fix the linking order to avoid compilation error
+ - Add DESTDIR support in install-libreg* rules in Makefile
+ - Do not run ldconfig if DESTDIR is set
+ - Fix linking of libraries used by reglib
+ * Install reglib in /lib/crda, not /usr/lib
+ * debian/crda.lintian-overrides: Override lintian errors due to
+ wrongly detecting copyleft-next as GPL
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sat, 23 Aug 2014 12:34:19 -0700
+
+crda (1.1.3-1) unstable; urgency=low
+
+ * New upstream version
+ - Add support to send DFS master region
+ * debian/control: Correct spelling of 'cfg80211' (Closes: #657905)
+ * debian/watch: Change regex to avoid matching 'latest' symlink
+ (Closes: #756624)
+ * Update policy version to 3.9.4
+ - debian/copyright: Update to 1.0 format (no changes required)
+ * debian/copyright: Add my copyright to Debian packaging
+ * Require iw to be installed in /sbin
+
+ -- Ben Hutchings <ben@decadent.org.uk> Fri, 22 Aug 2014 23:07:48 -0700
+
+crda (1.1.2-1) unstable; urgency=low
+
+ * New upstream version
+
+ [ Stefan Lippers-Hollmann ]
+ * switch to libnl3 3.2 and raise versioned build-dependency to (>= 3.2.3-2~),
+ to be able to expect it in /lib/.
+ * crda is specific to the linux kernel, restrict it to linux-any.
+ * bump standards version to 3.9.2, no changes necessary.
+
+ [ Ben Hutchings ]
+ * debian/control: Add references to git repository
+ * debian/control: Set Multi-Arch: foreign, thanks to Tim Gardner
+
+ -- Ben Hutchings <ben@decadent.org.uk> Thu, 29 Dec 2011 02:41:08 +0100
+
+crda (1.1.1-1) unstable; urgency=low
+
+ * Initial release (Closes: #536502)
+ - Most packaging was done by Kel Modderman and Stefan Lippers-Hollmann
+
+ -- Ben Hutchings <ben@decadent.org.uk> Mon, 11 Apr 2011 13:18:35 +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..8720f8f
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: crda
+Section: net
+Priority: optional
+Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
+Uploaders: Ben Hutchings <benh@debian.org>
+Build-Depends: debhelper (>= 9),
+ libnl-3-dev (>= 3.2.3-2~) [linux-any],
+ libnl-genl-3-dev (>= 3.2.3-2~) [linux-any],
+ libssl-dev,
+ pkg-config
+Rules-Requires-Root: no
+Standards-Version: 4.5.0
+Vcs-Git: https://salsa.debian.org/kernel-team/crda.git
+Vcs-Browser: https://salsa.debian.org/kernel-team/crda
+Homepage: https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA
+
+Package: crda
+Architecture: linux-any
+Multi-Arch: foreign
+Depends: ${shlibs:Depends},
+ ${misc:Depends},
+ wireless-regdb,
+ iw (>= 3.2-1~)
+Description: wireless Central Regulatory Domain Agent
+ This package provides a Central Regulatory Domain Agent (CRDA) to be used by
+ the Linux kernel cfg80211 wireless subsystem to query and apply the regulatory
+ domain settings wireless devices may operate within for a given location.
+ .
+ CRDA queries operational frequency regulations stored within the regulatory
+ database provided by the wireless-regdb package.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..75e30d1
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,268 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: crda
+Upstream-Contact: Luis R. Rodriguez <mcgrof@do-not-panic.com>
+Source: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git
+Comment:
+ The URL of the Corresponding Source for all versions of this package
+ is <https://snapshot.debian.org/package/crda/>. The Separate Works
+ used to build each version of the package are specified according to
+ <https://www.debian.org/doc/debian-policy/ch-relationships.html#s-sourcebinarydeps>.
+ .
+ The current repository for Copyleft-Next is
+ <https://github.com/copyleft-next/copyleft-next>.
+
+Files: *
+Copyright: 2008, 2013, Luis R. Rodriguez <mcgrof@do-not-panic.com>
+ 2008, Johannes Berg <johannes@sipsolutions.net>
+ 2008, Michael Green <Michael.Green@Atheros.com>
+License: copyleft-next-0.3.0
+
+Files: nl80211.h
+Copyright: 2006-2010 Johannes Berg <johannes@sipsolutions.net>
+ 2008 Michael Wu <flamingice@sourmilk.net>
+ 2008 Luis Carlos Cobo <luisca@cozybit.com>
+ 2008 Michael Buesch <m@bues.ch>
+ 2008-2009 Luis R. Rodriguez <lrodriguez@atheros.com>
+ 2008 Jouni Malinen <jouni.malinen@atheros.com>
+ 2008 Colin McCabe <colin@cozybit.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.
+
+License: copyleft-next-0.3.0
+ copyleft-next 0.3.0 ("this License")
+ Release date: 2013-05-16
+ .
+ 1. License Grants; No Trademark License
+ .
+ Subject to the terms of this License, I grant You:
+ .
+ a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+ copyright license, to reproduce, Distribute, prepare derivative works
+ of, publicly perform and publicly display My Work.
+ .
+ b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable
+ patent license under Licensed Patents to make, have made, use, sell,
+ offer for sale, and import Covered Works.
+ .
+ This License does not grant any rights in My name, trademarks, service
+ marks, or logos.
+ .
+ 2. Distribution: General Conditions
+ .
+ You may Distribute Covered Works, provided that You (i) inform
+ recipients how they can obtain a copy of this License; (ii) satisfy the
+ applicable conditions of sections 3 through 6; and (iii) preserve all
+ Legal Notices contained in My Work (to the extent they remain
+ pertinent). "Legal Notices" means copyright notices, license notices,
+ license texts, and author attributions, but does not include logos,
+ other graphical images, trademarks or trademark legends.
+ .
+ 3. Conditions for Distributing Derived Works; Outbound GPL Compatibility
+ .
+ If You Distribute a Derived Work, You must license the entire Derived
+ Work as a whole under this License, with prominent notice of such
+ licensing. This condition may not be avoided through such means as
+ separate Distribution of portions of the Derived Work. You may
+ additionally license the Derived Work under the GPL, so that the
+ recipient may further Distribute the Derived Work under either this
+ License or the GPL.
+ .
+ 4. Condition Against Further Restrictions; Inbound License Compatibility
+ .
+ When Distributing a Covered Work, You may not impose further
+ restrictions on the exercise of rights in the Covered Work granted under
+ this License. This condition is not excused merely because such
+ restrictions result from Your compliance with conditions or obligations
+ extrinsic to this License (such as a court order or an agreement with a
+ third party).
+ .
+ However, You may Distribute a Covered Work incorporating material
+ governed by a license that is both OSI-Approved and FSF-Free as of the
+ release date of this License, provided that Your Distribution complies
+ with such other license.
+ .
+ 5. Conditions for Distributing Object Code
+ .
+ You may Distribute an Object Code form of a Covered Work, provided that
+ you accompany the Object Code with a URL through which the Corresponding
+ Source is made available, at no charge, by some standard or customary
+ means of providing network access to source code.
+ .
+ If you Distribute the Object Code in a physical product or tangible
+ storage medium ("Product"), the Corresponding Source must be available
+ through such URL for two years from the date of Your most recent
+ Distribution of the Object Code in the Product. However, if the Product
+ itself contains or is accompanied by the Corresponding Source (made
+ available in a customarily accessible manner), You need not also comply
+ with the first paragraph of this section.
+ .
+ Each recipient of the Covered Work from You is an intended third-party
+ beneficiary of this License solely as to this section 5, with the right
+ to enforce its terms.
+ .
+ 6. Symmetrical Licensing Condition for Upstream Contributions
+ .
+ If You Distribute a work to Me specifically for inclusion in or
+ modification of a Covered Work (a "Patch"), and no explicit licensing
+ terms apply to the Patch, You license the Patch under this License, to
+ the extent of Your copyright in the Patch. This condition does not
+ negate the other conditions of this License, if applicable to the Patch.
+ .
+ 7. Nullification of Copyleft/Proprietary Dual Licensing
+ .
+ If I offer to license, for a fee, a Covered Work under terms other than
+ a license that is OSI-Approved or FSF-Free as of the release date of this
+ License or a numbered version of copyleft-next released by the
+ Copyleft-Next Project, then the license I grant You under section 1 is no
+ longer subject to the conditions in sections 2 through 5.
+ .
+ 8. Copyleft Sunset
+ .
+ The conditions in sections 2 through 5 no longer apply once fifteen
+ years have elapsed from the date of My first Distribution of My Work
+ under this License.
+ .
+ 9. Pass-Through
+ .
+ When You Distribute a Covered Work, the recipient automatically receives
+ a license to My Work from Me, subject to the terms of this License.
+ .
+ 10. Termination
+ .
+ Your license grants under section 1 are automatically terminated if You
+ .
+ a) fail to comply with the conditions of this License, unless You cure
+ such noncompliance within thirty days after becoming aware of it, or
+ .
+ b) initiate a patent infringement litigation claim (excluding
+ declaratory judgment actions, counterclaims, and cross-claims)
+ alleging that any part of My Work directly or indirectly infringes
+ any patent.
+ .
+ Termination of Your license grants extends to all copies of Covered
+ Works You subsequently obtain. Termination does not terminate the
+ rights of those who have received copies or rights from You subject to
+ this License.
+ .
+ To the extent permission to make copies of a Covered Work is necessary
+ merely for running it, such permission is not terminable.
+ .
+ 11. Later License Versions
+ .
+ The Copyleft-Next Project may release new versions of copyleft-next,
+ designated by a distinguishing version number ("Later Versions").
+ Unless I explicitly remove the option of Distributing Covered Works
+ under Later Versions, You may Distribute Covered Works under any Later
+ Version.
+ .
+ ** 12. No Warranty **
+ ** **
+ ** My Work is provided "as-is", without warranty. You bear the risk **
+ ** of using it. To the extent permitted by applicable law, each **
+ ** Distributor of My Work excludes the implied warranties of title, **
+ ** merchantability, fitness for a particular purpose and **
+ ** non-infringement. **
+ .
+ ** 13. Limitation of Liability **
+ ** **
+ ** To the extent permitted by applicable law, in no event will any **
+ ** Distributor of My Work be liable to You for any damages **
+ ** whatsoever, whether direct, indirect, special, incidental, or **
+ ** consequential damages, whether arising under contract, tort **
+ ** (including negligence), or otherwise, even where the Distributor **
+ ** knew or should have known about the possibility of such damages. **
+ .
+ 14. Severability
+ .
+ The invalidity or unenforceability of any provision of this License
+ does not affect the validity or enforceability of the remainder of
+ this License. Such provision is to be reformed to the minimum extent
+ necessary to make it valid and enforceable.
+ .
+ 15. Definitions
+ .
+ "Copyleft-Next Project" means the project that maintains the source
+ code repository at <https://gitorious.org/copyleft-next/> as of the
+ release date of this License.
+ .
+ "Corresponding Source" of a Covered Work in Object Code form means (i)
+ the Source Code form of the Covered Work; (ii) all scripts,
+ instructions and similar information that are reasonably necessary for
+ a skilled developer to generate such Object Code from the Source Code
+ provided under (i); and (iii) a list clearly identifying all Separate
+ Works (other than those provided in compliance with (ii)) that were
+ specifically used in building and (if applicable) installing the
+ Covered Work (for example, a specified proprietary compiler including
+ its version number). Corresponding Source must be machine-readable.
+ .
+ "Covered Work" means My Work or a Derived Work.
+ .
+ "Derived Work" means a work of authorship that copies from, modifies,
+ adapts, is based on, is a derivative work of, transforms, translates or
+ contains all or part of My Work, such that copyright permission is
+ required. The following are not Derived Works: (i) Mere Aggregation;
+ (ii) a mere reproduction of My Work; and (iii) if My Work fails to
+ explicitly state an expectation otherwise, a work that merely makes
+ reference to My Work.
+ .
+ "Distribute" means to distribute, transfer or make a copy available to
+ someone else, such that copyright permission is required.
+ .
+ "Distributor" means Me and anyone else who Distributes a Covered Work.
+ .
+ "FSF-Free" means classified as 'free' by the Free Software Foundation.
+ .
+ "GPL" means a version of the GNU General Public License or the GNU
+ Affero General Public License.
+ .
+ "I"/"Me"/"My" refers to the individual or legal entity that places My
+ Work under this License. "You"/"Your" refers to the individual or legal
+ entity exercising rights in My Work under this License. A legal entity
+ includes each entity that controls, is controlled by, or is under
+ common control with such legal entity. "Control" means (a) the power to
+ direct the actions of such legal entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent of the
+ outstanding shares or beneficial ownership of such legal entity.
+ .
+ "Licensed Patents" means all patent claims licensable royalty-free by
+ Me, now or in the future, that are necessarily infringed by making,
+ using, or selling My Work, and excludes claims that would be infringed
+ only as a consequence of further modification of My Work.
+ .
+ "Mere Aggregation" means an aggregation of a Covered Work with a
+ Separate Work.
+ .
+ "My Work" means the particular work of authorship I license to You
+ under this License.
+ .
+ "Object Code" means any form of a work that is not Source Code.
+ .
+ "OSI-Approved" means approved as 'Open Source' by the Open Source
+ Initiative.
+ .
+ "Separate Work" means a work that is separate from and independent of a
+ particular Covered Work and is not by its nature an extension or
+ enhancement of the Covered Work, and/or a runtime library, standard
+ library or similar component that is used to generate an Object Code
+ form of a Covered Work.
+ .
+ "Source Code" means the preferred form of a work for making
+ modifications to it.
diff --git a/debian/crda.default b/debian/crda.default
new file mode 100644
index 0000000..36b62bd
--- /dev/null
+++ b/debian/crda.default
@@ -0,0 +1,11 @@
+# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
+# the initial regulatory domain setting for IEEE 802.11 devices which operate
+# on this system.
+#
+# Governments assert the right to regulate usage of radio spectrum within
+# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
+# country code suitable for your location or you may infringe on local
+# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
+# descriptions containing ISO/IEC 3166-1 alpha2 country codes.
+
+REGDOMAIN=
diff --git a/debian/crda.lintian-overrides b/debian/crda.lintian-overrides
new file mode 100644
index 0000000..99e201d
--- /dev/null
+++ b/debian/crda.lintian-overrides
@@ -0,0 +1,3 @@
+# copyleft-next refers to GPL but is not GPL!
+crda binary: copyright-should-refer-to-common-license-file-for-gpl
+crda binary: possible-gpl-code-linked-with-openssl
diff --git a/debian/crda.udev b/debian/crda.udev
new file mode 100644
index 0000000..c28a2c9
--- /dev/null
+++ b/debian/crda.udev
@@ -0,0 +1 @@
+SUBSYSTEM=="ieee80211", ACTION=="add", RUN+="/lib/crda/setregdomain"
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..9dd792c
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[git-buildpackage]
+compression=bzip2
diff --git a/debian/patches/Makefile-Check-for-libnl-only-when-building.patch b/debian/patches/Makefile-Check-for-libnl-only-when-building.patch
new file mode 100644
index 0000000..4a3b42e
--- /dev/null
+++ b/debian/patches/Makefile-Check-for-libnl-only-when-building.patch
@@ -0,0 +1,27 @@
+From 7bf7313dc0a000176267e137105ffeddd2b4e87c Mon Sep 17 00:00:00 2001
+From: Romain Perier <romain.perier@gmail.com>
+Date: Tue, 25 Feb 2020 13:29:10 +0100
+Subject: [PATCH] Makefile: Check for libnl only when building
+
+So we're able to build the package by using sbuild which triggers
+a dh_auto_clean that calls make clean, without stopping the build.
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: crda/Makefile
+===================================================================
+--- crda.orig/Makefile
++++ crda/Makefile
+@@ -88,9 +88,11 @@ else
+ endif
+ endif
+
++ifneq (,$(filter-out %clean,$(MAKECMDGOALS)))
+ ifeq ($(NLLIBNAME),)
+ $(error Cannot find development files for any supported version of libnl)
+ endif
++endif
+
+ NLLIBS += `$(PKG_CONFIG) --libs $(NLLIBNAME)`
+ CFLAGS += `$(PKG_CONFIG) --cflags $(NLLIBNAME)`
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
new file mode 100644
index 0000000..8c97f40
--- /dev/null
+++ b/debian/patches/cross.patch
@@ -0,0 +1,63 @@
+From: Helmut Grohne <helmut@subdivi.de>
+Subject: make pkg-config substitutable
+Date: Tue, 30 Aug 2016 16:59:36 +0200
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,6 +25,8 @@ UDEV_RULE_DIR?=/lib/udev/rules.d/
+ PUBKEY_DIR?=pubkeys
+ RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys
+
++PKG_CONFIG ?= pkg-config
++
+ CFLAGS += -O2 -fpic
+ CFLAGS += -std=gnu99 -Wall -Werror -pedantic
+ CFLAGS += -Wall -g
+@@ -39,8 +41,8 @@ all: all_noverify verify
+ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize
+
+ ifeq ($(USE_OPENSSL),1)
+-CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+-LIBREGLDLIBS += `pkg-config --libs openssl`
++CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `$(PKG_CONFIG) --cflags openssl`
++LIBREGLDLIBS += `$(PKG_CONFIG) --libs openssl`
+
+ ifeq ($(RUNTIME_PUBKEY_ONLY),1)
+ CFLAGS += -DRUNTIME_PUBKEY_ONLY
+@@ -59,19 +61,19 @@ endif
+ MKDIR ?= mkdir -p
+ INSTALL ?= install
+
+-NL1FOUND := $(shell pkg-config --atleast-version=1 libnl-1 && echo Y)
+-NL2FOUND := $(shell pkg-config --atleast-version=2 libnl-2.0 && echo Y)
+-NL3FOUND := $(shell pkg-config --atleast-version=3 libnl-3.0 && echo Y)
+-NL32FOUND := $(shell pkg-config --atleast-version=3 libnl-3.2 && echo Y)
++NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
++NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
++NL3FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.0 && echo Y)
++NL32FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.2 && echo Y)
+
+ ifeq ($(NL32FOUND),Y)
+ CFLAGS += -DCONFIG_LIBNL30
+-NLLIBS += $(shell pkg-config --libs libnl-genl-3.2)
++NLLIBS += $(shell $(PKG_CONFIG) --libs libnl-genl-3.2)
+ NLLIBNAME = libnl-3.2
+ else
+ ifeq ($(NL3FOUND),Y)
+ CFLAGS += -DCONFIG_LIBNL30
+- NLLIBS += $(shell pkg-config --libs libnl-genl-3.0)
++ NLLIBS += $(shell $(PKG_CONFIG) --libs libnl-genl-3.0)
+ NLLIBNAME = libnl-3.0
+ else
+ ifeq ($(NL2FOUND),Y)
+@@ -90,8 +92,8 @@ ifeq ($(NLLIBNAME),)
+ $(error Cannot find development files for any supported version of libnl)
+ endif
+
+-NLLIBS += `pkg-config --libs $(NLLIBNAME)`
+-CFLAGS += `pkg-config --cflags $(NLLIBNAME)`
++NLLIBS += `$(PKG_CONFIG) --libs $(NLLIBNAME)`
++CFLAGS += `$(PKG_CONFIG) --cflags $(NLLIBNAME)`
+
+ ifeq ($(V),1)
+ Q=
diff --git a/debian/patches/do-not-run-ldconfig-if-destdir-is-set.patch b/debian/patches/do-not-run-ldconfig-if-destdir-is-set.patch
new file mode 100644
index 0000000..498fd84
--- /dev/null
+++ b/debian/patches/do-not-run-ldconfig-if-destdir-is-set.patch
@@ -0,0 +1,16 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 11:13:44 -0700
+Subject: Do not run ldconfig if DESTDIR is set
+
+--- a/Makefile
++++ b/Makefile
+@@ -132,7 +132,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/debian/patches/do_not_embed_pubkeys.patch b/debian/patches/do_not_embed_pubkeys.patch
new file mode 100644
index 0000000..600ed5a
--- /dev/null
+++ b/debian/patches/do_not_embed_pubkeys.patch
@@ -0,0 +1,54 @@
+Description: Allow build without embedding pubkey data into crda/regdbdump
+ binaries.
+From: Kel Modderman <kel@otaku42.de>
+--- a/Makefile
++++ b/Makefile
+@@ -42,7 +42,12 @@ ifeq ($(USE_OPENSSL),1)
+ CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+ LDLIBS += `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
+--- 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 *
+ {
+ 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 *
+ 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 *
+ 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/debian/patches/fix-linking-of-libraries-used-by-reglib.patch b/debian/patches/fix-linking-of-libraries-used-by-reglib.patch
new file mode 100644
index 0000000..33b5fa9
--- /dev/null
+++ b/debian/patches/fix-linking-of-libraries-used-by-reglib.patch
@@ -0,0 +1,45 @@
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 23 Aug 2014 11:27:10 -0700
+Subject: Fix linking of libraries used by libreg
+
+The math and crypto libraries are called by and need to be linked to
+libreg.so, not to the executables.
+
+--- a/Makefile
++++ b/Makefile
+@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda
+ CFLAGS += -Wall -g
+ LDLIBREG += -lreg
+ LDLIBS += $(LDLIBREG)
+-LDLIBS += -lm
++LIBREGLDLIBS += -lm
+ LIBREG += libreg.so
+ LDFLAGS += -L ./
+
+@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r
+
+ ifeq ($(USE_OPENSSL),1)
+ CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl`
+-LDLIBS += `pkg-config --libs openssl`
++LIBREGLDLIBS += `pkg-config --libs openssl`
+
+ ifeq ($(RUNTIME_PUBKEY_ONLY),1)
+ CFLAGS += -DRUNTIME_PUBKEY_ONLY
+@@ -51,7 +51,7 @@ endif
+
+ else
+ CFLAGS += -DUSE_GCRYPT
+-LDLIBS += -lgcrypt
++LIBREGLDLIBS += -lgcrypt
+
+ $(LIBREG): keys-gcrypt.c
+
+@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+
+ $(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) $< $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
diff --git a/debian/patches/install-crda-binary-under-libexec-directory.patch b/debian/patches/install-crda-binary-under-libexec-directory.patch
new file mode 100644
index 0000000..851384d
--- /dev/null
+++ b/debian/patches/install-crda-binary-under-libexec-directory.patch
@@ -0,0 +1,66 @@
+From: Ben Hutchings <benh@debian.org>
+Date: Tue, 31 Mar 2020 22:12:38 +0100
+Subject: Install crda binary under libexec directory
+
+The crda binary should only be run as part of a udev rule, and doesn't
+do anything useful if the COUNTRY environment variable is unset or the
+kernel isn't expecting a rule set.
+
+Debian policy is that binaries requiring special environment variables
+to be set shouldn't be installed in a directory that's in the default
+path. Usually such binaries should be installed under /usr/libexec,
+or /usr/lib on distributions that don't believe in libexec.
+
+So install it in LIBEXECDIR, defaulting to $(PREFIX)/libexec.
+
+---
+--- a/Makefile
++++ b/Makefile
+@@ -7,6 +7,7 @@ PREFIX ?= /usr/
+ MANDIR ?= $(PREFIX)/share/man/
+ INCLUDE_DIR ?= $(PREFIX)/include/reglib/
+ LIBDIR ?= $(PREFIX)/lib
++LIBEXECDIR ?= $(PREFIX)/libexec
+
+ SBINDIR ?= /sbin/
+
+@@ -176,16 +177,17 @@ verify: $(REG_BIN) regdbdump
+
+ install: install-libreg install-libreg-headers crda crda.8.gz regdbdump.8.gz
+ $(NQ) ' INSTALL crda'
+- $(Q)$(MKDIR) $(DESTDIR)/$(SBINDIR)
+- $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) crda
++ $(Q)$(MKDIR) $(DESTDIR)/$(LIBEXECDIR)
++ $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(LIBEXECDIR) crda
+ $(NQ) ' INSTALL regdbdump'
++ $(Q)$(MKDIR) $(DESTDIR)/$(SBINDIR)
+ $(Q)$(INSTALL) -m 755 -t $(DESTDIR)/$(SBINDIR) regdbdump
+ $(NQ) ' INSTALL $(UDEV_LEVEL)regulatory.rules'
+ $(Q)$(MKDIR) $(DESTDIR)/$(UDEV_RULE_DIR)/
+ @# This removes the old rule you may have, we were not
+ @# putting it in the right place.
+ $(Q)rm -f $(DESTDIR)/etc/udev/rules.d/regulatory.rules
+- $(Q)sed 's:$$(SBINDIR):$(SBINDIR):' udev/regulatory.rules > udev/regulatory.rules.parsed
++ $(Q)sed 's:$$(LIBEXECDIR):$(LIBEXECDIR):' udev/regulatory.rules > udev/regulatory.rules.parsed
+ $(Q)ln -sf regulatory.rules.parsed udev/$(UDEV_LEVEL)regulatory.rules
+ $(Q)$(INSTALL) -m 644 -t \
+ $(DESTDIR)/$(UDEV_RULE_DIR)/ \
+--- a/udev/regulatory.rules
++++ b/udev/regulatory.rules
+@@ -2,4 +2,4 @@
+ # For more information see:
+ # http://wireless.kernel.org/en/developers/Regulatory/CRDA
+
+-KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(SBINDIR)crda"
++KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="$(LIBEXECDIR)/crda"
+--- a/crda.8
++++ b/crda.8
+@@ -68,7 +68,7 @@ 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/libexec/crda"
+
+ .SS
+ .SH Environment variable
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..58b258a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,7 @@
+do_not_embed_pubkeys.patch
+do-not-run-ldconfig-if-destdir-is-set.patch
+fix-linking-of-libraries-used-by-reglib.patch
+cross.patch
+Makefile-Check-for-libnl-only-when-building.patch
+use-ldflags-when-building-reglib.patch
+install-crda-binary-under-libexec-directory.patch
diff --git a/debian/patches/use-ldflags-when-building-reglib.patch b/debian/patches/use-ldflags-when-building-reglib.patch
new file mode 100644
index 0000000..fcff693
--- /dev/null
+++ b/debian/patches/use-ldflags-when-building-reglib.patch
@@ -0,0 +1,19 @@
+From: Ben Hutchings <benh@debian.org>
+Date: Tue, 31 Mar 2020 21:28:37 +0100
+Subject: Use $(LDFLAGS) when building reglib
+
+$(LDFLAGS) should be used when building shared libraries as well as
+when building executables.
+
+---
+--- a/Makefile
++++ b/Makefile
+@@ -125,7 +125,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(
+
+ $(LIBREG): reglib.c regdb.h reglib.h
+ $(NQ) ' CC ' $@
+- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(LIBREGLDLIBS)
++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $< $(LIBREGLDLIBS)
+
+ install-libreg-headers:
+ $(NQ) ' INSTALL libreg-headers'
diff --git a/debian/pubkeys/benh@debian.org.key.pub.pem b/debian/pubkeys/benh@debian.org.key.pub.pem
new file mode 100644
index 0000000..2bba176
--- /dev/null
+++ b/debian/pubkeys/benh@debian.org.key.pub.pem
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAneF3oCSg1XllOgeQyfal
+ph+EHCMHS0+lA8YP91TVi355gQDS6T30l/6EzVW9yY8hV4gGOZBmQSZ5LMo/lYcB
+ES8vsOELQ/xfL09nBNtNt3JN0cV2c02RabBxFzbqqwo6zZWbdhuOIRePxQK/JMfA
+QLE7xIB8caVR3Pc6WH+xB4GKENH2kxdx4PpReRXU14+tvW844SZ9vPA+gIm07I5p
+kNuXivAjI4OCO2qxrOvnmXQqNY6pZP1GnujlSGExbub8GRhUwxtP1gBEhxw3Rer1
+ycsPDFXsz2rCRSYjojFSTe4hff1YcsIoxY6p0O4Bdwil8CIrR3krz5pGtY/9ZKK1
+7QIDAQAB
+-----END PUBLIC KEY-----
diff --git a/debian/pubkeys/romain.perier@gmail.com.key.pub.pem b/debian/pubkeys/romain.perier@gmail.com.key.pub.pem
new file mode 100644
index 0000000..6a44a2d
--- /dev/null
+++ b/debian/pubkeys/romain.perier@gmail.com.key.pub.pem
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8LhPP3B4+HRFoiivBHUE
+o/OnxwSstuH84cA94CaQikVgxHXzGjM3Vn0wB3UOpnkGlZ0XPAmpf6uVXe3gdSYv
+ZWXNYbEzJ2dBoQET6RNqbU6Y4Z57C1tE72hab32XoTMilxIhCY+Q4CWU3Yo690pg
+BCZtAILkz2QceRUk8kKG9RCGrCCIkIffjDd8vzXVb593w81pJQbCZVFxiX9uTeXV
+ijYarcEY1hRCh/CTg/GZdMQTqjtmhW/gvF+2QKZBBgq6DukyRBA5U82/89Mm9rYr
+QC65iMH046Aod0+6qMqcBbqIlplUiaKN83OhjEqoce4u0oMUSL2Yxs7cqKOXLkAW
+LwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..bce06e5
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,38 @@
+#!/usr/bin/make -f
+
+include /usr/share/dpkg/architecture.mk
+ifeq ($(origin CC),default)
+CC = $(DEB_HOST_GNU_TYPE)-gcc
+endif
+export CC
+export PKG_CONFIG = $(DEB_HOST_GNU_TYPE)-pkg-config
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
+export LIBDIR = /lib/crda
+export LIBEXECDIR = /lib/crda
+export LDLIBREG = -Wl,-rpath,$(LIBDIR)
+export REG_BIN = /lib/crda/regulatory.bin
+export USE_OPENSSL = 1
+export RUNTIME_PUBKEY_DIR = /lib/crda/pubkeys
+export RUNTIME_PUBKEY_ONLY = 1
+export V = $(if $(filter terse,$(DEB_BUILD_OPTIONS)),0,1)
+#export DH_VERBOSE = 1
+
+%:
+ dh ${@}
+
+override_dh_auto_build:
+ dh_auto_build -- all_noverify
+
+override_dh_install:
+ dh_install
+ install -D -m 755 debian/setregdomain \
+ debian/crda/lib/crda/setregdomain
+ mkdir -m 755 debian/crda/$(RUNTIME_PUBKEY_DIR)
+ install -m 644 pubkeys/*.pem debian/pubkeys/*.pem \
+ debian/crda/$(RUNTIME_PUBKEY_DIR)/
+
+override_dh_auto_clean:
+ $(MAKE) clean
diff --git a/debian/setregdomain b/debian/setregdomain
new file mode 100644
index 0000000..532da5e
--- /dev/null
+++ b/debian/setregdomain
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+REGDOMAIN=
+CRDA_CONF=/etc/default/crda
+
+[ -r "$CRDA_CONF" ] && . "$CRDA_CONF"
+[ -z "$REGDOMAIN" ] && exit 0
+
+exec /sbin/iw reg set "$REGDOMAIN"
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/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..0e2b556
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
+# Won't change the licence text but have added a comment
+crda source: obsolete-url-in-packaging debian/copyright https://gitorious.org/copyleft-next/
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..7d77602
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+opts="mode=git, pgpmode=none, pretty=4.14+git%cd.%h" \
+https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git \
+HEAD