You are not logged in.

#1 2012-06-29 13:34:39

shohart
Member
Registered: 2011-05-19
Posts: 39

regdb compile error

Hello everyone!
i am trying to compile wireless-regdb-2011.04.28 and getting this error

[shohart@archiebald wireless-regdb-2011.04.28]$ make
Generating public key for shohart...
openssl rsa -in ~/.wireless-regdb-shohart.key.priv.pem -out shohart.key.pub.pem -pubout -outform PEM
writing RSA key
Generating regulatory.bin digitally signed by shohart...
./db2bin.py regulatory.bin db.txt ~/.wireless-regdb-shohart.key.priv.pem
  File "./db2bin.py", line 13
    print 'Usage: %s output-file input-file [key-file]' % sys.argv[0]
                                                      ^
SyntaxError: invalid syntax
make: *** [regulatory.bin] Error 1

so... please tell me what am i missing? should i install some dependances or it is a kernel incompatibility?
thanx

Offline

#2 2012-06-29 17:39:28

linux-ka
Member
From: ADL
Registered: 2010-05-07
Posts: 232

Re: regdb compile error

looks like a python2 / python3 issue to me...have you checked which python version is needed to build this package? mybe you have to add kind of PYTHON=pythonxy to the configure step.

Btw, I can compile without this package without any problem...but the one I installed just depends on sh...not python...so...you got the source from ABS?

Last edited by linux-ka (2012-06-29 17:43:01)

Offline

#3 2012-06-29 19:13:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,492
Website

Re: regdb compile error

Is there a reason you're trying to compile it at all?  That same version is in [core].

Last edited by Trilby (2012-06-29 19:13:14)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2012-07-02 11:04:05

shohart
Member
Registered: 2011-05-19
Posts: 39

Re: regdb compile error

i've found solution over here https://dev.spahan.ch/trac/wiki/python3

Generating regulatory.bin digitally signed by Gentoo...
./db2bin.py regulatory.bin db.txt wireless-regdb-Gentoo.key.priv.pem
  File "./db2bin.py", line 13
    print 'Usage: %s output-file input-file [key-file]' % sys.argv[0]
                                                      ^
SyntaxError: invalid syntax

solution is simple, use the python eclass and rewrite the shebangs from python -> python2
but i am completely noob in python.... how can i "use the python eclass and rewrite the shebangs from python -> python2" o_O????
i suppose it is just the time to read python manuals. but if someone can share his python knoledge, it will be welcomed!
can marked as solved by the way.

Offline

#5 2012-07-02 11:05:56

shohart
Member
Registered: 2011-05-19
Posts: 39

Re: regdb compile error

linux-ka wrote:

looks like a python2 / python3 issue to me...have you checked which python version is needed to build this package? mybe you have to add kind of PYTHON=pythonxy to the configure step.

Btw, I can compile without this package without any problem...but the one I installed just depends on sh...not python...so...you got the source from ABS?

no, i`ve got source from linuxwireless...

Offline

#6 2012-11-26 23:02:38

Malstrond
Member
From: Germany
Registered: 2009-06-03
Posts: 98

Re: regdb compile error

The solution here is to just change the first line from

#!/usr/bin/env python

to

#!/usr/bin/python2

in the three files /db2bin.py, /dbparse.py and /web/Regulatory.py in the source directory.

I ran into the same problem. I bought a WLAN PCIe card which uses the Atheros AR9300. These Atheros chips have a 100% hardcoded country-code, which was set to AU for my device, in their EEPROM, but I'm not in Australia. By switching the country code after the device has been initialized, you can only impose further restrictions, never expand the regulatroy restrictions. For example: If your country (A) allows frequency 1 and 2 but not 3, and the country it is hardcoded to (B) allows frequency 1 and 3 but not 2, then you are left only with frequency 1 after switching it from country B to A. Same with transmit power, channel width and active scanning. So if both countries have wireless regulations but that are strict yet different, you are left with barely any usable channels, especially in the 5GHz band because regulations vary more widely here.
The shop I bought it from only offered to exchange it for a new device, but their whole batch was set to Australia.
So I needed to change the regulatory information in db.txt for Australia to the values I actually need.

Offline

Board footer

Powered by FluxBB