[pkg-wpa-devel] r1384 - in /wireless-regdb/trunk/debian: control patches/distro_pubkey.patch patches/do_not_sign_regulatory_bin.patch patches/series rules

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sun May 17 11:50:53 UTC 2009


Author: kelmo-guest
Date: Sun May 17 11:50:53 2009
New Revision: 1384

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1384
Log:
Remove this hack and attempt to organise some way of having this package safely crypto enabled.

Added:
    wireless-regdb/trunk/debian/patches/distro_pubkey.patch
Removed:
    wireless-regdb/trunk/debian/patches/do_not_sign_regulatory_bin.patch
Modified:
    wireless-regdb/trunk/debian/control
    wireless-regdb/trunk/debian/patches/series
    wireless-regdb/trunk/debian/rules

Modified: wireless-regdb/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-wpa/wireless-regdb/trunk/debian/control?rev=1384&op=diff
==============================================================================
--- wireless-regdb/trunk/debian/control (original)
+++ wireless-regdb/trunk/debian/control Sun May 17 11:50:53 2009
@@ -1,8 +1,12 @@
 Source: wireless-regdb
 Section: admin
 Priority: optional
-Maintainer: Kel Modderman <kel at otaku42.de>
-Build-Depends: debhelper (>= 7.0.50), quilt(>= 0.46-7), python
+Maintainer: Debian/Ubuntu wpasupplicant Maintainers <pkg-wpa-devel at lists.alioth.debian.org>
+Uploaders: Reinhard Tartler <siretart at tauware.de>, Kel Modderman <kel at otaku42.de>
+Build-Depends: debhelper (>= 7.0.50),
+ quilt(>= 0.46-7),
+ python,
+ python-m2crypto
 Standards-Version: 3.8.1
 Homepage: http://wireless.kernel.org/en/developers/Regulatory
 

Added: wireless-regdb/trunk/debian/patches/distro_pubkey.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/wireless-regdb/trunk/debian/patches/distro_pubkey.patch?rev=1384&op=file
==============================================================================
--- wireless-regdb/trunk/debian/patches/distro_pubkey.patch (added)
+++ wireless-regdb/trunk/debian/patches/distro_pubkey.patch Sun May 17 11:50:53 2009
@@ -1,0 +1,62 @@
+Fix name of and use DISTRO_PUBKEY variable in build system to generate
+and stash a copy of distro pub key next to distro priv key.
+
+Reuse the stashed public key instead of generating a new one for distro
+packager builds.
+
+Add a check-distro-key target for use by packagers who wish to make sure
+package build only succeeds when openssl key pair already exists.
+
+Signed-off-by: Kel Modderman <kel at otaku42.de>
+---
+--- a/Makefile
++++ b/Makefile
+@@ -19,7 +19,7 @@ LSB_ID ?= $(shell if [ -f $(LSB_RELEASE)
+ 		fi)
+ 
+ DISTRO_PRIVKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
+-DISTRO_PUBKEY ?= ~/.wireless-regdb-$(LSB_ID).key.priv.pem
++DISTRO_PUBKEY ?= ~/.wireless-regdb-$(LSB_ID).key.pub.pem
+ 
+ REGDB_AUTHOR ?= $(shell if [ -f $(DISTRO_PRIVKEY) ]; then \
+ 			echo $(LSB_ID) ; \
+@@ -60,11 +60,15 @@ regulatory.bin: db.txt $(REGDB_PRIVKEY) 
+ 	./db2bin.py regulatory.bin db.txt $(REGDB_PRIVKEY)
+ 
+ $(REGDB_PUBKEY): $(REGDB_PRIVKEY)
++ifneq ($(shell test -e $(DISTRO_PUBKEY) && echo yes),yes)
+ 	@echo "Generating public key for $(REGDB_AUTHOR)..."
+ 	openssl rsa -in $(REGDB_PRIVKEY) -out $(REGDB_PUBKEY) -pubout -outform PEM
++else
++	@echo "Using public key of $(LSB_ID) packager..."
++	@cat $(DISTRO_PUBKEY) > $(REGDB_PUBKEY)
++endif
+ 	@echo $(REGDB_PUBKEY) > .custom
+ 
+-
+ $(REGDB_PRIVKEY):
+ 	@echo "Generating private key for $(REGDB_AUTHOR)..."
+ 	openssl genrsa -out $(REGDB_PRIVKEY) 2048
+@@ -73,9 +77,21 @@ ifneq ($(shell test -e $(DISTRO_PRIVKEY)
+ $(DISTRO_PRIVKEY):
+ 	@echo "Generating private key for $(LSB_ID) packager..."
+ 	openssl genrsa -out $(DISTRO_PRIVKEY) 2048
++$(DISTRO_PUBKEY): $(DISTRO_PRIVKEY)
++	@echo "Generating public key for $(LSB_ID) packager..."
++	openssl rsa -in $(DISTRO_PRIVKEY) -out $(DISTRO_PUBKEY) -pubout -outform PEM
+ endif
+ 
+-install-distro-key: maintainer-clean $(DISTRO_PRIVKEY)
++install-distro-key: maintainer-clean $(DISTRO_PRIVKEY) $(DISTRO_PUBKEY)
++
++check-distro-key:
++	@if ! test -e $(DISTRO_PRIVKEY) || ! test -e $(DISTRO_PUBKEY) ; then \
++		echo "Distro packaging openssl key pair not found at:" ; \
++		echo "  $(DISTRO_PRIVKEY)" ; \
++		echo "  $(DISTRO_PUBKEY)" ; \
++		echo "Run \`make install-distro-key' to make the key pair" ; \
++		exit 1 ; \
++	fi
+ 
+ %.gz: %
+ 	gzip < $< > $@

Modified: wireless-regdb/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/wireless-regdb/trunk/debian/patches/series?rev=1384&op=diff
==============================================================================
--- wireless-regdb/trunk/debian/patches/series (original)
+++ wireless-regdb/trunk/debian/patches/series Sun May 17 11:50:53 2009
@@ -1,2 +1,2 @@
-do_not_sign_regulatory_bin.patch
+distro_pubkey.patch
 fix_manual_page_section.patch

Modified: wireless-regdb/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-wpa/wireless-regdb/trunk/debian/rules?rev=1384&op=diff
==============================================================================
--- wireless-regdb/trunk/debian/rules (original)
+++ wireless-regdb/trunk/debian/rules Sun May 17 11:50:53 2009
@@ -1,7 +1,29 @@
 #!/usr/bin/make -f
 
+# LSB_ID is used in name of private/public key pair, setting it to our
+# packaging group is more descriptive than `Debian' or `Ubuntu' and
+# saves from executing lsb_release (and build-depending on lsb-release).
+LSB_ID    := pkg-wpa-devel
 CRDA_PATH := /lib/crda
-export CRDA_PATH
+export LSB_ID CRDA_PATH
 
 %:
 	dh --with quilt $@
+
+override_dh_auto_clean:
+	$(MAKE) mrproper
+
+override_dh_auto_configure:
+	$(MAKE) mrproper
+	$(MAKE) check-distro-key
+
+install-distro-key:
+	@test -e debian/patches/series && dh_quilt_patch   || true
+	$(MAKE) $@
+	@test -e debian/patches/series && dh_quilt_unpatch || true
+	@dh_clean
+	@echo
+	@echo "############################################################"
+	@echo "Remember to add your public key to debian/pubkeys and commit"
+	@echo "it to the version control system. See debian/pubkeys/README".
+	@echo "############################################################"




More information about the Pkg-wpa-devel mailing list