From b86538424fe6502b3a93196f45c2763d91a09190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 18 Dec 2022 00:13:55 +0700 Subject: [PATCH] binwalk: fix warning --- srcpkgs/binwalk/patches/python-3.10.patch | 22 ++++++++++++++++++++++ srcpkgs/binwalk/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/binwalk/patches/python-3.10.patch diff --git a/srcpkgs/binwalk/patches/python-3.10.patch b/srcpkgs/binwalk/patches/python-3.10.patch new file mode 100644 index 00000000000..c9ab6cdd0fb --- /dev/null +++ b/srcpkgs/binwalk/patches/python-3.10.patch @@ -0,0 +1,22 @@ +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/template b/srcpkgs/binwalk/template index 760386b13a3..3fd78853fc1 100644 --- a/srcpkgs/binwalk/template +++ b/srcpkgs/binwalk/template @@ -1,7 +1,7 @@ # Template file for 'binwalk' pkgname=binwalk version=2.3.3 -revision=2 +revision=3 build_style=python3-module hostmakedepends="python3" depends="python3"