From 3150f7a5d825ed074d735064403c5868d6deecae Mon Sep 17 00:00:00 2001 From: Evgeny Ermakov Date: Tue, 30 Nov 2021 06:00:47 +1100 Subject: [PATCH] binwalk: update to 2.3.3. --- srcpkgs/binwalk/patches/fix-2.3.3-test.patch | 14 ++++++++++++++ srcpkgs/binwalk/template | 15 ++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/binwalk/patches/fix-2.3.3-test.patch diff --git a/srcpkgs/binwalk/patches/fix-2.3.3-test.patch b/srcpkgs/binwalk/patches/fix-2.3.3-test.patch new file mode 100644 index 000000000000..bce5ed7c8f39 --- /dev/null +++ b/srcpkgs/binwalk/patches/fix-2.3.3-test.patch @@ -0,0 +1,14 @@ +https://github.com/ReFirmLabs/binwalk/issues/566 +https://github.com/ReFirmLabs/binwalk/issues/569 + +--- a/testing/tests/test_firmware_zip.py ++++ b/testing/tests/test_firmware_zip.py +@@ -10,6 +10,8 @@ + ''' + expected_results = [ + [0, 'Zip archive data, at least v1.0 to extract, name: dir655_revB_FW_203NA/'], ++ [51, 'Zip archive data, at least v2.0 to extract, compressed size: 6395868, uncompressed size: 6422554, name: dir655_revB_FW_203NA/DIR655B1_FW203NAB02.bin'], ++ [6395993, 'Zip archive data, at least v2.0 to extract, compressed size: 14243, uncompressed size: 61440, name: dir655_revB_FW_203NA/dir655_revB_release_notes_203NA.doc'], + [6410581, 'End of Zip archive, footer length: 22'], + + ] diff --git a/srcpkgs/binwalk/template b/srcpkgs/binwalk/template index 210ea288857d..f3838109bfb2 100644 --- a/srcpkgs/binwalk/template +++ b/srcpkgs/binwalk/template @@ -1,21 +1,26 @@ # Template file for 'binwalk' pkgname=binwalk -version=2.3.1 -revision=2 +version=2.3.3 +revision=1 build_style=python3-module -pycompile_module="binwalk" hostmakedepends="python3" depends="python3" -checkdepends="python3-coverage python3-nose" +checkdepends="python3-coverage python3-nose tar" short_desc="Easy tool for analyzing/reversing/extracting firmware images" maintainer="Duncaen " license="MIT" homepage="https://github.com/ReFirmLabs/binwalk" distfiles="https://github.com/ReFirmLabs/binwalk/archive/v${version}.tar.gz" -checksum=7ec9d8fcb8686f4060d37e1096669e3ed8ce1194c91ad80199622448bcc01b19 +checksum=7e32b94dc77632b51d18732b5456e2a3ef85e4521d7d4a54410e36f93859501f post_extract() { vsed -i -e 's;/etc/bash_completion.d/%s;%s.bash;' setup.py + + if [ $(id -u) -eq 0 ]; then + # CI container has different privileges than expected in tests. + # Append " **{'run-as' : 'root'}," to "binwalk.scan(input_vector_file,". + vsed -i -e "/binwalk.scan(input_vector_file,/ s/$/ **{'run-as' : 'root'},/" testing/tests/test_*.py + fi } do_check() {