Message ID | 20210728172932.2737967-8-adolf.belka@ipfire.org |
---|---|
State | Superseded |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GZghr62byz3xGN for <patchwork@web04.haj.ipfire.org>; Wed, 28 Jul 2021 17:32:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GZghr3xJhz6cF; Wed, 28 Jul 2021 17:32:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GZghr3QN2z2y4S; Wed, 28 Jul 2021 17:32:28 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GZghq33hBz2xSn for <development@lists.ipfire.org>; Wed, 28 Jul 2021 17:32:27 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GZghp4dSNz5QX; Wed, 28 Jul 2021 17:32:26 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1627493546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zdDa906Dg14cEJwZ9an9//ltdghvWjpEbBUBp8NKOP0=; b=TvRkHS0WEOzFOrSYlWASBTAudVpG1wVFyU2kHp9ESwMPrMjWRci86jMYDbM8IFVlCDeDBL GhK6ZhSdzyibQtDg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1627493546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zdDa906Dg14cEJwZ9an9//ltdghvWjpEbBUBp8NKOP0=; b=JfIf8KVPpmumW1zPNfV5RQE8v2CJZ6qfw6hzNcUIHVMCE5DtjbVk6Hlp69qtcQ37fD6Dna lVvbtxPJj0DU2q4oONlU1zwEcdJV987qDVbu6huRo+AY2Sk8G+NP+zCC++kKcFfbWWMWrX F+GqOLo+7BTHFglp2qqjE4Q0c4tfBe3r5B3Xs9xKOpuRiNjU9gKtuHP551mco4HvYxk2Ia omHdgtShLcnqRr+vshrDddOYMZSoS92BhUzmDZ+L0yIBNbakOBiskgH74vqQuJUutZOUFd FO9+4rZ925lu20ZTxQ2moiqoBVmw/xn+G/Og2v41UBUhObVknLNJ4n7uTpCgbg== From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH v2 8/8] wlanap.cgi: Access db.txt in place of using regdbdump on regulatory.bin Date: Wed, 28 Jul 2021 19:29:32 +0200 Message-Id: <20210728172932.2737967-8-adolf.belka@ipfire.org> In-Reply-To: <20210728172932.2737967-1-adolf.belka@ipfire.org> References: <20210728172932.2737967-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[v2,1/8] make.sh: Remove crda and remaining python2 modules
|
|
Commit Message
Adolf Belka
July 28, 2021, 5:29 p.m. UTC
- wlanap.cgi was using regdbdump from crda to create a text based list of the
wireless settings by country database.
- With the removal of crda as part of the removal of python2 this option could not be
used.
- wireless-regdb also has a text based database list in the source tarball and this
patch makes wlanap.cgi read this list into the @countrylist_cmd variable
- This needs to be tested by someone that has an IPFire system with wifi that can access
and evaluate wlanap.cgi to confirm that this change functions as expected.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
html/cgi-bin/wlanap.cgi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello, > On 28 Jul 2021, at 19:29, Adolf Belka <adolf.belka@ipfire.org> wrote: > > - wlanap.cgi was using regdbdump from crda to create a text based list of the > wireless settings by country database. > - With the removal of crda as part of the removal of python2 this option could not be > used. > - wireless-regdb also has a text based database list in the source tarball and this > patch makes wlanap.cgi read this list into the @countrylist_cmd variable > - This needs to be tested by someone that has an IPFire system with wifi that can access > and evaluate wlanap.cgi to confirm that this change functions as expected. > > Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> > --- > html/cgi-bin/wlanap.cgi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi > index eba5fe774..6954eb4f0 100644 > --- a/html/cgi-bin/wlanap.cgi > +++ b/html/cgi-bin/wlanap.cgi > @@ -312,7 +312,7 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} > push(@channellist, @temp); > } > > -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; > +my @countrylist_cmd = `/lib/firmware/db.txt`; This will try to execute the text file. What you want is probably something like: open(FILE, “</lib/firmware/db.txt”); my @countrylist_cmd = <FILE>; close(FILE); > # get available country codes > > my @temp = "00"; > -- > 2.32.0 >
Hi Michael, On 04/08/2021 16:32, Michael Tremer wrote: > Hello, > >> On 28 Jul 2021, at 19:29, Adolf Belka <adolf.belka@ipfire.org> wrote: >> >> - wlanap.cgi was using regdbdump from crda to create a text based list of the >> wireless settings by country database. >> - With the removal of crda as part of the removal of python2 this option could not be >> used. >> - wireless-regdb also has a text based database list in the source tarball and this >> patch makes wlanap.cgi read this list into the @countrylist_cmd variable >> - This needs to be tested by someone that has an IPFire system with wifi that can access >> and evaluate wlanap.cgi to confirm that this change functions as expected. >> >> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >> --- >> html/cgi-bin/wlanap.cgi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi >> index eba5fe774..6954eb4f0 100644 >> --- a/html/cgi-bin/wlanap.cgi >> +++ b/html/cgi-bin/wlanap.cgi >> @@ -312,7 +312,7 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} >> push(@channellist, @temp); >> } >> >> -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; >> +my @countrylist_cmd = `/lib/firmware/db.txt`; > > This will try to execute the text file. This shows my lack of perl knowledge. I just didn't think of the file being accessed a different way, although once you highlight it, it is very obvious. > > What you want is probably something like: > > open(FILE, “</lib/firmware/db.txt”); > my @countrylist_cmd = <FILE>; > close(FILE); I will do a v3 patch set and also change the db.txt name as you mentioned in patch 7 of this set. Regards, Adolf. > >> # get available country codes >> >> my @temp = "00"; >> -- >> 2.32.0 >> >
diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index eba5fe774..6954eb4f0 100644 --- a/html/cgi-bin/wlanap.cgi +++ b/html/cgi-bin/wlanap.cgi @@ -312,7 +312,7 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} push(@channellist, @temp); } -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; +my @countrylist_cmd = `/lib/firmware/db.txt`; # get available country codes my @temp = "00";