* [PR PATCH] binwalk: update to 2.4.1.
@ 2024-06-13 2:56 Suyun114
2024-06-13 3:01 ` Suyun114
2024-06-29 13:36 ` [PR PATCH] [Merged]: " leahneukirchen
0 siblings, 2 replies; 3+ messages in thread
From: Suyun114 @ 2024-06-13 2:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]
There is a new pull request by Suyun114 against master on the void-packages repository
https://github.com/Suyun114/void-packages binwalk
https://github.com/void-linux/void-packages/pull/50809
binwalk: update to 2.4.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
A patch file from https://github.com/void-linux/void-packages/pull/50809.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-binwalk-50809.patch --]
[-- Type: text/x-diff, Size: 7731 bytes --]
From 8285a1c0ce6ec1995f84d2a9beae899bd5868c0d Mon Sep 17 00:00:00 2001
From: "suyun@aosc.io" <suyun@aosc.io>
Date: Thu, 13 Jun 2024 10:55:17 +0800
Subject: [PATCH] binwalk: update to 2.4.1.
---
srcpkgs/binwalk/patches/fix-2.3.3-test.patch | 14 ---
srcpkgs/binwalk/patches/python-3.10.patch | 22 -----
srcpkgs/binwalk/patches/python-3.12.patch | 90 --------------------
srcpkgs/binwalk/template | 10 +--
4 files changed, 5 insertions(+), 131 deletions(-)
delete mode 100644 srcpkgs/binwalk/patches/fix-2.3.3-test.patch
delete mode 100644 srcpkgs/binwalk/patches/python-3.10.patch
delete mode 100644 srcpkgs/binwalk/patches/python-3.12.patch
diff --git a/srcpkgs/binwalk/patches/fix-2.3.3-test.patch b/srcpkgs/binwalk/patches/fix-2.3.3-test.patch
deleted file mode 100644
index bce5ed7c8f3984..00000000000000
--- a/srcpkgs/binwalk/patches/fix-2.3.3-test.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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/patches/python-3.10.patch b/srcpkgs/binwalk/patches/python-3.10.patch
deleted file mode 100644
index c9ab6cdd0fbe71..00000000000000
--- a/srcpkgs/binwalk/patches/python-3.10.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Index: binwalk-2.3.3/src/binwalk/modules/extractor.py
-===================================================================
---- binwalk-2.3.3.orig/src/binwalk/modules/extractor.py
-+++ binwalk-2.3.3/src/binwalk/modules/extractor.py
-@@ -966,7 +966,7 @@ class Extractor(Module):
-
- # Fork a child process
- child_pid = os.fork()
-- if child_pid is 0:
-+ if child_pid == 0:
- # Switch to the run-as user privileges, if one has been set
- if self.runas_uid is not None and self.runas_gid is not None:
- os.setgid(self.runas_uid)
-@@ -981,7 +981,7 @@ class Extractor(Module):
- rval = subprocess.call(shlex.split(command), stdout=tmp, stderr=tmp)
-
- # A true child process should exit with the subprocess exit value
-- if child_pid is 0:
-+ if child_pid == 0:
- sys.exit(rval)
- # If no os.fork() happened, just return the subprocess exit value
- elif child_pid is None:
diff --git a/srcpkgs/binwalk/patches/python-3.12.patch b/srcpkgs/binwalk/patches/python-3.12.patch
deleted file mode 100644
index 1675ae8f274226..00000000000000
--- a/srcpkgs/binwalk/patches/python-3.12.patch
+++ /dev/null
@@ -1,90 +0,0 @@
---- a/src/binwalk/core/module.py
-+++ b/src/binwalk/core/module.py
-@@ -688,6 +688,16 @@ class Modules(object):
- else:
- return '--' + opt
-
-+ @staticmethod
-+ def _imp_load_source(name, path):
-+ import importlib.util
-+ import importlib.machinery
-+ loader = importlib.machinery.SourceFileLoader(name, path)
-+ spec = importlib.util.spec_from_file_location(name, path, loader=loader)
-+ module = importlib.util.module_from_spec(spec)
-+ loader.exec_module(module)
-+ return module
-+
- def list(self, attribute="run"):
- '''
- Finds all modules with the specified attribute.
-@@ -704,14 +714,13 @@ class Modules(object):
- modules[module] = module.PRIORITY
-
- # user-defined modules
-- import imp
- user_modules = binwalk.core.settings.Settings().user.modules
- for file_name in os.listdir(user_modules):
- if not file_name.endswith('.py'):
- continue
- module_name = file_name[:-3]
- try:
-- user_module = imp.load_source(module_name, os.path.join(user_modules, file_name))
-+ user_module = _imp_load_source(module_name, os.path.join(user_modules, file_name))
- except KeyboardInterrupt as e:
- raise e
- except Exception as e:
---- a/src/binwalk/core/plugin.py
-+++ b/src/binwalk/core/plugin.py
-@@ -1,7 +1,6 @@
- # Core code for supporting and managing plugins.
-
- import os
--import imp
- import inspect
- import binwalk.core.common
- import binwalk.core.settings
-@@ -131,6 +130,15 @@ class Plugins(object):
- return klass
- raise Exception("Failed to locate Plugin class in " + plugin)
-
-+ def _imp_load_source(self, name, path):
-+ import importlib.util
-+ import importlib.machinery
-+ loader = importlib.machinery.SourceFileLoader(name, path)
-+ spec = importlib.util.spec_from_file_location(name, path, loader=loader)
-+ module = importlib.util.module_from_spec(spec)
-+ loader.exec_module(module)
-+ return module
-+
- def list_plugins(self):
- '''
- Obtain a list of all user and system plugin modules.
-@@ -180,7 +188,7 @@ class Plugins(object):
- module = file_name[:-len(self.MODULE_EXTENSION)]
-
- try:
-- plugin = imp.load_source(module, os.path.join(plugins[key]['path'], file_name))
-+ plugin = self._imp_load_source(module, os.path.join(plugins[key]['path'], file_name))
- plugin_class = self._find_plugin_class(plugin)
-
- plugins[key]['enabled'][module] = True
-@@ -222,7 +230,7 @@ class Plugins(object):
- continue
-
- try:
-- plugin = imp.load_source(module, file_path)
-+ plugin = self._imp_load_source(module, file_path)
- plugin_class = self._find_plugin_class(plugin)
-
- class_instance = plugin_class(self.parent)
---- a/src/binwalk/core/magic.py
-+++ b/src/binwalk/core/magic.py
-@@ -428,7 +428,7 @@ class Magic(object):
- # Regex rule to find format strings
- self.fmtstr = re.compile("%[^%]")
- # Regex rule to find periods (see self._do_math)
-- self.period = re.compile("\.")
-+ self.period = re.compile(r'\.')
-
- def reset(self):
- self.display_once = set()
diff --git a/srcpkgs/binwalk/template b/srcpkgs/binwalk/template
index 64c832d89765d6..1f86150c8d3c93 100644
--- a/srcpkgs/binwalk/template
+++ b/srcpkgs/binwalk/template
@@ -1,16 +1,16 @@
# Template file for 'binwalk'
pkgname=binwalk
-version=2.3.4
-revision=3
+version=2.4.1
+revision=1
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3"
short_desc="Easy tool for analyzing/reversing/extracting firmware images"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
-homepage="https://github.com/ReFirmLabs/binwalk"
-distfiles="https://github.com/ReFirmLabs/binwalk/archive/v${version}.tar.gz"
-checksum=60416bfec2390cec76742ce942737df3e6585c933c2467932f59c21e002ba7a9
+homepage="https://github.com/OSPG/binwalk"
+distfiles="https://github.com/OSPG/binwalk/archive/v${version}.tar.gz"
+checksum=26d13afd3610b39a38a3062a34c05d94dacda3f6f6aa6d1d19e42b61fabe1c8f
post_extract() {
vsed -i -e 's;/etc/bash_completion.d/%s;%s.bash;' setup.py
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: binwalk: update to 2.4.1.
2024-06-13 2:56 [PR PATCH] binwalk: update to 2.4.1 Suyun114
@ 2024-06-13 3:01 ` Suyun114
2024-06-29 13:36 ` [PR PATCH] [Merged]: " leahneukirchen
1 sibling, 0 replies; 3+ messages in thread
From: Suyun114 @ 2024-06-13 3:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
New comment by Suyun114 on void-packages repository
https://github.com/void-linux/void-packages/pull/50809#issuecomment-2164266608
Comment:
I checked the new [fork](https://github.com/OSPG/binwalk) of binwalk and found that some patches have applied. So I removed those patches.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PR PATCH] [Merged]: binwalk: update to 2.4.1.
2024-06-13 2:56 [PR PATCH] binwalk: update to 2.4.1 Suyun114
2024-06-13 3:01 ` Suyun114
@ 2024-06-29 13:36 ` leahneukirchen
1 sibling, 0 replies; 3+ messages in thread
From: leahneukirchen @ 2024-06-29 13:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
There's a merged pull request on the void-packages repository
binwalk: update to 2.4.1.
https://github.com/void-linux/void-packages/pull/50809
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-29 13:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-13 2:56 [PR PATCH] binwalk: update to 2.4.1 Suyun114
2024-06-13 3:01 ` Suyun114
2024-06-29 13:36 ` [PR PATCH] [Merged]: " leahneukirchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).