Message ID | 20210805102122.3484023-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 4GgPp36Drnz3xGN for <patchwork@web04.haj.ipfire.org>; Thu, 5 Aug 2021 10:23:23 +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 4GgPp33kwLz6f1; Thu, 5 Aug 2021 10:23:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GgPp336L9z2y0t; Thu, 5 Aug 2021 10:23:23 +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 4GgPp21kGGz2xjs for <development@lists.ipfire.org>; Thu, 5 Aug 2021 10:23:22 +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 4GgPp13bVJz6cs; Thu, 5 Aug 2021 10:23:21 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1628159001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q5uiMPnplYrAHeI+K03Nnc7mY9ysgVLFR6bkPn5h/xI=; b=BCFImJhs094QlfQ+scYYMknuF+f1IbYt+iaQTlAp8Bouhfi7J/bFNEOW6L5QMrP9+SsGRF OUmGJq9K9NNxLHBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1628159001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q5uiMPnplYrAHeI+K03Nnc7mY9ysgVLFR6bkPn5h/xI=; b=wvB/v9VMXDUB3oOtqRzTrqIG2UclF7ESD/oT0aJkIpuqCr4EScOMac10wy7h9mxObE1lx6 7Rmr5BQbKCfJeTlNCpg4aSbgEuWiHfKsXk2BryB5bSWtjinDVLZizSArtr12LCfSlGx895 W5MIdp/WSBTpjD6c48vreJE0ViqR38WO3LCDfh3F13ABCQ2W5lva9saAJYRol7Uz7wQC28 GgjixuEsUMKuBXGRL6a131Lf91jd2xWiSq6BzR3japGwzLYVAFjd3V5DJsqStDMDRkOM8x pYNB9eYkmEXsl8QgtSogXXlKWo++pIGd82Przx4u1RRLsUeQiZA6jP+FR4ydug== From: Adolf Belka <adolf.belka@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH v3 8/8] wlanap.cgi: Access db.txt in place of using regdbdump on regulatory.bin Date: Thu, 5 Aug 2021 12:21:22 +0200 Message-Id: <20210805102122.3484023-8-adolf.belka@ipfire.org> In-Reply-To: <20210805102122.3484023-1-adolf.belka@ipfire.org> References: <20210805102122.3484023-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 |
[v3,1/8] make.sh: Remove crda and remaining python2 modules
|
|
Commit Message
Adolf Belka
Aug. 5, 2021, 10:21 a.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.
- This version changes the name of the stored text file from db.txt to regulatorydb.txt
- The command to read the data from regulatorydb.txt into @countrylist_cmd has been
corrected
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
html/cgi-bin/wlanap.cgi | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org> Tested-by: Bernhard Bitsch <bbitsch@ipfire.org> Am 05.08.2021 um 12:21 schrieb Adolf Belka: > - 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. > - This version changes the name of the stored text file from db.txt to regulatorydb.txt > - The command to read the data from regulatorydb.txt into @countrylist_cmd has been > corrected > > Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> > --- > html/cgi-bin/wlanap.cgi | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi > index eba5fe774..3024257db 100644 > --- a/html/cgi-bin/wlanap.cgi > +++ b/html/cgi-bin/wlanap.cgi > @@ -312,8 +312,11 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} > push(@channellist, @temp); > } > > -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; > # get available country codes > +open(FILE, “</lib/firmware/firmwaredb.txt”); Should read: +open(FILE, “</lib/firmware/regulatorydb.txt”); > +my @countrylist_cmd = <FILE>; > +close(FILE); > + > > my @temp = "00"; > foreach (@countrylist_cmd){ >
Hi Bernhard, On 05/08/2021 12:40, Bernhard Bitsch wrote: > Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org> > Tested-by: Bernhard Bitsch <bbitsch@ipfire.org> > > Am 05.08.2021 um 12:21 schrieb Adolf Belka: >> - 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. >> - This version changes the name of the stored text file from db.txt to regulatorydb.txt >> - The command to read the data from regulatorydb.txt into @countrylist_cmd has been >> corrected >> >> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >> --- >> html/cgi-bin/wlanap.cgi | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi >> index eba5fe774..3024257db 100644 >> --- a/html/cgi-bin/wlanap.cgi >> +++ b/html/cgi-bin/wlanap.cgi >> @@ -312,8 +312,11 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} >> push(@channellist, @temp); >> } >> -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; >> # get available country codes >> +open(FILE, “</lib/firmware/firmwaredb.txt”); > Should read: > +open(FILE, “</lib/firmware/regulatorydb.txt”); Thanks so much for spotting this. The power of the review process. I will re-issue the patches. Regards, Adolf. > > > +my @countrylist_cmd = <FILE>; >> +close(FILE); >> + >> my @temp = "00"; >> foreach (@countrylist_cmd){ >>
Hello, > On 5 Aug 2021, at 12:55, Adolf Belka <adolf.belka@ipfire.org> wrote: > > Hi Bernhard, > > On 05/08/2021 12:40, Bernhard Bitsch wrote: >> Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org> >> Tested-by: Bernhard Bitsch <bbitsch@ipfire.org> >> Am 05.08.2021 um 12:21 schrieb Adolf Belka: >>> - 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. >>> - This version changes the name of the stored text file from db.txt to regulatorydb.txt >>> - The command to read the data from regulatorydb.txt into @countrylist_cmd has been >>> corrected >>> >>> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org> >>> --- >>> html/cgi-bin/wlanap.cgi | 5 ++++- >>> 1 file changed, 4 insertions(+), 1 deletion(-) >>> >>> diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi >>> index eba5fe774..3024257db 100644 >>> --- a/html/cgi-bin/wlanap.cgi >>> +++ b/html/cgi-bin/wlanap.cgi >>> @@ -312,8 +312,11 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} >>> push(@channellist, @temp); >>> } >>> -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; >>> # get available country codes >>> +open(FILE, “</lib/firmware/firmwaredb.txt”); >> Should read: >> +open(FILE, “</lib/firmware/regulatorydb.txt”); > Thanks so much for spotting this. The power of the review process. I will re-issue the patches. Exactly :) Great work everyone! > > Regards, > Adolf. >> > +my @countrylist_cmd = <FILE>; >>> +close(FILE); >>> + >>> my @temp = "00"; >>> foreach (@countrylist_cmd){
diff --git a/html/cgi-bin/wlanap.cgi b/html/cgi-bin/wlanap.cgi index eba5fe774..3024257db 100644 --- a/html/cgi-bin/wlanap.cgi +++ b/html/cgi-bin/wlanap.cgi @@ -312,8 +312,11 @@ if ( $channel =~ /\d+/ ){push(@temp,$channel + 0);} push(@channellist, @temp); } -my @countrylist_cmd = `regdbdump /usr/lib/crda/regulatory.bin 2>/dev/null`; # get available country codes +open(FILE, “</lib/firmware/firmwaredb.txt”); +my @countrylist_cmd = <FILE>; +close(FILE); + my @temp = "00"; foreach (@countrylist_cmd){