[pkg-wpa-devel] r1512 - in /crda/trunk: ./ debian/ debian/patches/

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Sun Apr 11 03:11:25 UTC 2010


Author: kelmo-guest
Date: Sun Apr 11 03:11:24 2010
New Revision: 1512

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1512
Log:
Use backportable debian/rules.
Drop the setregdomain stuff - in future better methods will exist to change
regdomain to user/admin defined setting.
Add debian/patches/do_not_embed_pubkeys.patch to stop this terrible shitty
embedding of pubkey data into regdbdump/crda binaries.

Added:
    crda/trunk/debian/patches/do_not_embed_pubkeys.patch
Removed:
    crda/trunk/debian/crda.default
    crda/trunk/debian/crda.install
    crda/trunk/debian/crda.postinst
    crda/trunk/debian/crda.setregdomain.udev
    crda/trunk/debian/crda.triggers
    crda/trunk/debian/patches/openssl_runtime_verification_tuneup.patch
    crda/trunk/debian/setregdomain
Modified:
    crda/trunk/Makefile
    crda/trunk/debian/control
    crda/trunk/debian/patches/series
    crda/trunk/debian/rules
    crda/trunk/reglib.c

Modified: crda/trunk/Makefile
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/Makefile?rev=1512&op=diff
==============================================================================
--- crda/trunk/Makefile (original)
+++ crda/trunk/Makefile Sun Apr 11 03:11:24 2010
@@ -33,7 +33,12 @@
 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
 reglib.o: keys-ssl.c
+endif
 
 else
 CFLAGS += -DUSE_GCRYPT

Modified: crda/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/debian/control?rev=1512&op=diff
==============================================================================
--- crda/trunk/debian/control (original)
+++ crda/trunk/debian/control Sun Apr 11 03:11:24 2010
@@ -3,11 +3,10 @@
 Priority: optional
 Maintainer: Debian/Ubuntu wpasupplicant Maintainers <pkg-wpa-devel at lists.alioth.debian.org>
 Uploaders: Kel Modderman <kel at otaku42.de>
-Build-Depends: debhelper (>= 7.0.50~),
+Build-Depends: debhelper (>= 7),
  libnl-dev,
  libssl-dev,
- pkg-config,
- wireless-regdb
+ pkg-config
 Standards-Version: 3.8.4
 Vcs-Svn: svn://svn.debian.org/pkg-wpa/crda/trunk
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/
@@ -16,7 +15,6 @@
 Package: crda
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, wireless-regdb
-Recommends: iw (>= 0.9.18-1)
 Description: wireless Central Regulatory Domain Agent
  This package provides a Central Regulatory Domain Agent (CRDA) to be used by
  the Linux kernel cf80211 wireless subsystem to query and apply the regulatory

Added: crda/trunk/debian/patches/do_not_embed_pubkeys.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/debian/patches/do_not_embed_pubkeys.patch?rev=1512&op=file
==============================================================================
--- crda/trunk/debian/patches/do_not_embed_pubkeys.patch (added)
+++ crda/trunk/debian/patches/do_not_embed_pubkeys.patch Sun Apr 11 03:11:24 2010
@@ -1,0 +1,54 @@
+Description: Allow build without embedding pubkey data into crda/regdbdump
+ binaries.
+From: Kel Modderman <kel at otaku42.de>
+--- a/Makefile
++++ b/Makefile
+@@ -33,7 +33,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
+ reglib.o: keys-ssl.c
++endif
+ 
+ else
+ CFLAGS += -DUSE_GCRYPT
+--- a/reglib.c
++++ b/reglib.c
+@@ -18,7 +18,7 @@
+ 
+ #include "reglib.h"
+ 
+-#ifdef USE_OPENSSL
++#if defined(USE_OPENSSL) && defined(HAVE_KEYS_SSL)
+ #include "keys-ssl.c"
+ #endif
+ 
+@@ -49,7 +49,6 @@ int crda_verify_db_signature(__u8 *db, i
+ #ifdef USE_OPENSSL
+ 	RSA *rsa;
+ 	__u8 hash[SHA_DIGEST_LENGTH];
+-	unsigned int i;
+ 	int ok = 0;
+ 	DIR *pubkey_dir;
+ 	struct dirent *nextfile;
+@@ -61,6 +60,8 @@ int crda_verify_db_signature(__u8 *db, i
+ 		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) {
+@@ -78,6 +79,7 @@ int crda_verify_db_signature(__u8 *db, i
+ 		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,

Modified: crda/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/debian/patches/series?rev=1512&op=diff
==============================================================================
--- crda/trunk/debian/patches/series (original)
+++ crda/trunk/debian/patches/series Sun Apr 11 03:11:24 2010
@@ -1,1 +1,1 @@
-openssl_runtime_verification_tuneup.patch
+do_not_embed_pubkeys.patch

Modified: crda/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/debian/rules?rev=1512&op=diff
==============================================================================
--- crda/trunk/debian/rules (original)
+++ crda/trunk/debian/rules Sun Apr 11 03:11:24 2010
@@ -1,17 +1,34 @@
 #!/usr/bin/make -f
 
-export CFLAGS      = -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
-export PUBKEY_DIR  = /lib/crda/pubkeys
-export REG_BIN     = /lib/crda/regulatory.bin
+export CFLAGS = -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
+export REG_BIN = /lib/crda/regulatory.bin
 export USE_OPENSSL = 1
-export V           = 1
+export PUBKEY_DIR = /lib/crda/pubkeys
+export RUNTIME_PUBKEY_DIR = $(PUBKEY_DIR)
+export RUNTIME_PUBKEY_ONLY = 1
+export V = 1
+#export DH_VERBOSE = 1
 
-override_dh_fixperms:
-	dh_fixperms
-	chmod 755 debian/crda/lib/crda/setregdomain
+build: build-stamp
+build-stamp:
+	dh build --before dh_auto_build
+	dh_auto_build -- all_noverify
+	dh build --after dh_auto_build
+	touch $@
 
-override_dh_installudev:
-	dh_installudev --priority=85 --name=setregdomain
+clean:
+	dh clean
 
-%:
-	dh $@
+install: install-stamp
+install-stamp: build-stamp
+	dh install
+	touch $@
+
+binary-arch: install
+	dh binary-arch
+
+binary-indep:
+
+binary: binary-arch binary-indep
+
+.PHONY: build clean install binary-arch binary-indep binary

Modified: crda/trunk/reglib.c
URL: http://svn.debian.org/wsvn/pkg-wpa/crda/trunk/reglib.c?rev=1512&op=diff
==============================================================================
--- crda/trunk/reglib.c (original)
+++ crda/trunk/reglib.c Sun Apr 11 03:11:24 2010
@@ -18,7 +18,7 @@
 
 #include "reglib.h"
 
-#ifdef USE_OPENSSL
+#if defined(USE_OPENSSL) && defined(HAVE_KEYS_SSL)
 #include "keys-ssl.c"
 #endif
 
@@ -49,7 +49,6 @@
 #ifdef USE_OPENSSL
 	RSA *rsa;
 	__u8 hash[SHA_DIGEST_LENGTH];
-	unsigned int i;
 	int ok = 0;
 	DIR *pubkey_dir;
 	struct dirent *nextfile;
@@ -61,6 +60,8 @@
 		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) {
@@ -78,6 +79,7 @@
 		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,




More information about the Pkg-wpa-devel mailing list