!10 [sync] PR-8: 修复python2和python3的兼容性问题
From: @openeuler-sync-bot Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
483e4e7501
@ -1,6 +1,6 @@
|
||||
Name: b43-tools
|
||||
Version: 019
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: Tools for the Broadcom 43xx series WLAN chip
|
||||
License: GPLv2 and GPLv2+ and GPLv3 and BSD-2-Clause and Public Domain
|
||||
URL: https://bues.ch/cgit/b43-tools.git
|
||||
@ -8,6 +8,7 @@ Source0: https://bues.ch/cgit/b43-tools.git/snapshot/b43-tools-b43-fwcutt
|
||||
BuildRequires: bison flex flex-static python3-devel gcc
|
||||
Patch0001: 0001-b43-tools-fix-format-security-errors.patch
|
||||
Patch0002: 0002-Explicitly-use-python3.patch
|
||||
Patch0003: fix-function-file-to-open.patch
|
||||
|
||||
%description
|
||||
Tools for the Broadcom 43xx series WLAN chip.
|
||||
@ -21,10 +22,17 @@ install -p -m 0644 debug/README README.debug
|
||||
install -p -m 0644 disassembler/COPYING COPYING.disassembler
|
||||
install -p -m 0644 ssb_sprom/README README.ssb_sprom
|
||||
install -p -m 0644 ssb_sprom/COPYING COPYING.ssb_sprom
|
||||
install -p -m 0644 debug/install.py debug/setup.py
|
||||
sed 's/py_modules=/version="%{version}", py_modules=/' debug/install.py > debug/setup.py
|
||||
|
||||
2to3 -w .
|
||||
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/disassembler/brcm80211-fwconv
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/disassembler/b43-ivaldump
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/disassembler/brcm80211-ivaldump
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/debug/b43-beautifier
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/debug/b43-fwdump
|
||||
2to3 -w %{_builddir}/b43-tools-b43-fwcutter-019/debug/patcher-template
|
||||
|
||||
%build
|
||||
CFLAGS="%{optflags}" %make_build -C assembler
|
||||
CFLAGS="%{optflags}" %make_build -C disassembler
|
||||
@ -50,6 +58,9 @@ cd debug
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Tue May 30 2023 wulei <wu_lei@hoperun.com> - 019-7
|
||||
- Fix python compatibility
|
||||
|
||||
* Mon May 31 2021 baizhonggui <baizhonggui@huawei.com> - 019-6
|
||||
- Add gcc in BuildRequires
|
||||
|
||||
|
||||
24
fix-function-file-to-open.patch
Normal file
24
fix-function-file-to-open.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -Nur a/disassembler/b43-ivaldump b/disassembler/b43-ivaldump
|
||||
--- a/disassembler/b43-ivaldump 2023-05-30 16:33:01.128951580 +0800
|
||||
+++ b/disassembler/b43-ivaldump 2023-05-30 16:33:38.732951580 +0800
|
||||
@@ -36,7 +36,7 @@
|
||||
filename = sys.argv[1]
|
||||
|
||||
try:
|
||||
- ivals = file(filename).read()
|
||||
+ ivals = open(filename).read()
|
||||
except IOError, e:
|
||||
print "Could not read the initvals file: %s" % e.strerror
|
||||
sys.exit(1)
|
||||
diff -Nur a/disassembler/brcm80211-ivaldump b/disassembler/brcm80211-ivaldump
|
||||
--- a/disassembler/brcm80211-ivaldump 2023-05-30 16:33:01.128951580 +0800
|
||||
+++ b/disassembler/brcm80211-ivaldump 2023-05-30 16:34:17.524951580 +0800
|
||||
@@ -36,7 +36,7 @@
|
||||
filename = sys.argv[1]
|
||||
|
||||
try:
|
||||
- ivals = file(filename).read()
|
||||
+ ivals = open(filename).read()
|
||||
except IOError, e:
|
||||
print "Could not read the initvals file: %s" % e.strerror
|
||||
sys.exit(1)
|
||||
Loading…
x
Reference in New Issue
Block a user