[PATCH 00/10] gnu: python-angr: Update to 9.2.112.

  • Done
  • quality assurance status badge
Details
3 participants
  • jgart
  • Ludovic Courtès
  • soeren
Owner
unassigned
Submitted by
soeren
Severity
normal

Debbugs page

soeren wrote 7 months ago
(address . guix-patches@gnu.org)
cover.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

This patchset upgrades the angr package (previously added via #69074 by
myself) to the most recent version at the time of writing (9.2.112).
As part of the upgrade, four new dependencies have been added which are
required by the newer version (python-backports-strenum, python-cart,
python-pyformlang, and python-unique-log-filter). Additionally, two
patches were removed as they have been integrated upstream.

The angr test suite passes locally and angr still seems to work as
intended. However, due to the added pyformlang dependency angr now
depends (indirectly) on two different versions of python-pyparsing:
Version 2.4.7 via python-pydot (required by pyformlang) and version
3.0.6 required by python-packaging-bootstrap. Any suggestion on how
to best resolve that?

Sören Tempel (10):
gnu: python-ailment: Update to 9.2.112.
gnu: python-pyvex: Update to 9.2.112.
gnu: Add python-backports-strenum.
gnu: python-archinfo: Update to 9.2.112.
gnu: Add python-cart.
gnu: python-cle: Update to 9.2.112.
gnu: python-claripy: Update to 9.2.112.
gnu: Add python-pyformlang.
gnu: Add python-unique-log-filter.
gnu: python-angr: Update to 9.2.112.

gnu/local.mk | 2 -
gnu/packages/emulators.scm | 40 +++++-
.../python-angr-addition-type-error.patch | 18 ---
.../patches/python-angr-check-exec-deps.patch | 83 ++++++-----
.../python-pyvex-remove-angr-dependency.patch | 80 -----------
gnu/packages/python-xyz.scm | 130 +++++++++++++++---
6 files changed, 186 insertions(+), 167 deletions(-)
delete mode 100644 gnu/packages/patches/python-angr-addition-type-error.patch
delete mode 100644 gnu/packages/patches/python-pyvex-remove-angr-dependency.patch


base-commit: 01d4363168ed10ea223047f7a7b83201f161ec0b
soeren wrote 7 months ago
[PATCH 02/10] gnu: python-pyvex: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
6922b1905f3822b69453fdad73d8507337580af4.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-pyvex): Update to 9.2.112.
* gnu/packages/patches/python-pyvex-remove-angr-dependency.patch:
Remove patch (merged upstream and included in new release).
---
gnu/local.mk | 1 -
.../python-pyvex-remove-angr-dependency.patch | 80 -------------------
gnu/packages/python-xyz.scm | 5 +-
3 files changed, 2 insertions(+), 84 deletions(-)
delete mode 100644 gnu/packages/patches/python-pyvex-remove-angr-dependency.patch

Toggle diff (54 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 6d2b14e72d..8b00928141 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1980,7 +1980,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-pytorch-runpath.patch \
%D%/packages/patches/python-pytorch-system-libraries.patch \
%D%/packages/patches/python-pytorch-without-kineto.patch \
- %D%/packages/patches/python-pyvex-remove-angr-dependency.patch \
%D%/packages/patches/python-robotframework-atest.patch \
%D%/packages/patches/python-robotframework-source-date-epoch.patch \
%D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \
diff --git a/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch b/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch
deleted file mode 100644
index dccf22bbc6..0000000000
--- a/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-This patch removes the angr dependency from the pyvex these, thus
-resolving a circular dependency (as angr depends on pyvex). This
-patch has been taken from upstream.
-
-This patch is a squashed version of the following upstream patches:
-
-* https://github.com/angr/pyvex/commit/61fb26f223a8d8a276b702d2448a12e02c5c9c6b
-* https://github.com/angr/pyvex/commit/a1fb2a4d0826b0e43bd8bbdd00b6db032643ec95
-
-diff --git a/tests/test_spotter.py b/tests/test_spotter.py
-index 9271ccd..bed7dd4 100644
---- a/tests/test_spotter.py
-+++ b/tests/test_spotter.py
-@@ -1,6 +1,5 @@
- import os
-
--import angr
- import archinfo
-
- import pyvex
-@@ -98,53 +97,28 @@ class CortexSpotter(GymratLifter):
- register(CortexSpotter, "ARMEL")
-
-
--def test_full_binary():
-- p = angr.Project(
-- os.path.join(test_location, "armel", "RTOSDemo.axf.issue_685"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-- st = p.factory.call_state(0x000013CE + 1)
-- b = st.block().vex
-- simgr = p.factory.simulation_manager(st)
-- simgr.step()
-- assert b.jumpkind == "Ijk_Sys_syscall"
-- assert simgr.active[0].regs.ip_at_syscall.args[0] == 0x13FB
--
--
- def test_tmrs():
-- test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../binaries/tests"))
-- p = angr.Project(
-- os.path.join(test_location, "armel", "helloworld"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-+ arch = archinfo.arch_from_id("ARMEL")
- ins = b"\xef\xf3\x08\x82"
-- b = pyvex.block.IRSB(ins, 1, p.arch)
-+ b = pyvex.block.IRSB(ins, 1, arch)
- assert b.jumpkind == "Ijk_Boring"
- assert type(b.statements[1].data) == pyvex.expr.Get
-- assert p.arch.register_names.get(b.statements[1].data.offset, "") == "sp"
-+ assert arch.register_names.get(b.statements[1].data.offset, "") == "sp"
- assert type(b.statements[2]) == pyvex.stmt.Put
-
-
- def test_tmsr():
-- test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../binaries/tests"))
-- p = angr.Project(
-- os.path.join(test_location, "armel", "helloworld"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-+ arch = archinfo.arch_from_id("ARMEL")
- inss = b"\x82\xf3\x08\x88"
-- b = pyvex.block.IRSB(inss, 1, p.arch, opt_level=3)
-+ b = pyvex.block.IRSB(inss, 1, arch, opt_level=3)
- assert b.jumpkind == "Ijk_Boring"
- assert type(b.statements[1].data) == pyvex.expr.Get
-- assert p.arch.register_names.get(b.statements[1].data.offset, "") == "r2"
-+ assert arch.register_names.get(b.statements[1].data.offset, "") == "r2"
- assert type(b.statements[2]) == pyvex.stmt.Put
-
-
- if __name__ == "__main__":
- test_basic()
- test_embedded()
-- test_full_binary()
- test_tmrs()
- test_tmsr()
Toggle diff (21 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a051fc02db..081801e97d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34031,14 +34031,13 @@ (define-public python-pyvex
(package
(name "python-pyvex")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
- (patches (search-patches "python-pyvex-remove-angr-dependency.patch"))
(uri (pypi-uri "pyvex" version))
(sha256
- (base32 "1v64rn7gxy6fg065bgsy38z6r494k5ri5r6sn4g08hjj32ihx1ka"))))
+ (base32 "0z1jiflp7h07mfc26am3v7v5z2n6mw9hkfylbs86qgpm93qcf6i3"))))
(build-system pyproject-build-system)
(arguments
(list
soeren wrote 7 months ago
[PATCH 01/10] gnu: python-ailment: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
dcd8bac8d78b8ee29133dcc0e3c7a4a163ceeeb9.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-ailment): Update to 9.2.112.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (20 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ce33b330a3..a051fc02db 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -33977,13 +33977,13 @@ (define-public python-ailment
(package
(name "python-ailment")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ailment" version))
(sha256
- (base32 "073fcssbjis1ckwv2w0dcz2dfl6715bj4d4qdhspajj911mvng2f"))))
+ (base32 "1rv8rwvdm7fc9mf8z5hqb54dsj0n7jlnwghd12ll0b2jmh2ix8mn"))))
(build-system pyproject-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
soeren wrote 7 months ago
[PATCH 03/10] gnu: Add python-backports-strenum.
(address . 72393@debbugs.gnu.org)
7d4d16c118c1e8e07d3ad626dae6bf0fab825fe1.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-backports-strenum): New variable.
---
gnu/packages/emulators.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index d2e488864e..dca6c7b73a 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -95,6 +95,7 @@ (define-module (gnu packages emulators)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages sphinx)
@@ -2645,6 +2646,30 @@ (define-public python-keystone-engine
assembly for these architectures.")
(license license:gpl2)))
+;; can be removed once Guix upgrades to Python 3.11.
+(define-public python-backports-strenum
+ (package
+ (name "python-backports-strenum")
+ (version "1.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "backports_strenum" version))
+ (sha256
+ (base32 "0514yj1391k6pbs2cch6i57hidwb3236wngh2ivlk6186h3j9ibp"))))
+ (native-inputs (list python-poetry-core))
+ (build-system pyproject-build-system)
+ ;; TODO: Running tests requires a new version of poetry in Guix.
+ (arguments
+ (list
+ #:tests? #f))
+ (home-page "https://github.com/clbarnes/backports.strenum")
+ (synopsis "Backport of additions to the 'strenum' module")
+ (description
+ "Provides a backport of Python's @code{StrEnum} class which was introduced in
+Python 3.11 for Python >=3.8.6.")
+ (license license:expat)))
+
(define-public python-archinfo
(package
(name "python-archinfo")
soeren wrote 7 months ago
[PATCH 04/10] gnu: python-archinfo: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
56048aa2428f37b1847734de26f3327f0d16fdda.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/emulators.scm (python-archinfo): Update to 9.2.112.
[propagated-inputs]: Add python-backports-strenum.
---
gnu/packages/emulators.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index dca6c7b73a..b19376a4c6 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2674,17 +2674,26 @@ (define-public python-archinfo
(package
(name "python-archinfo")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "archinfo" version))
(sha256
- (base32 "037xfq3wcf8ngayxz9623l4646m780v2102mfbygpzbkkjha1966"))))
+ (base32 "011n9vrrsbqbnw2i38ls7f0xkd85kxcnn14fm4lhxjpi91p7hshb"))))
(build-system pyproject-build-system)
- (propagated-inputs (list python-capstone python-keystone-engine))
+ (propagated-inputs
+ (list
+ python-backports-strenum
+ python-capstone
+ python-keystone-engine))
(arguments
`(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda _
+ (substitute* "setup.cfg"
+ (("backports.strenum")
+ "backports_strenum"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
soeren wrote 7 months ago
[PATCH 05/10] gnu: Add python-cart.
(address . 72393@debbugs.gnu.org)
ac478c980b626c939bfdd6880cb15f0c4a8a4445.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-cart): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 081801e97d..cc7d45e6fa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -33973,6 +33973,36 @@ (define-public python-opcodes
and BMI2).")
(license license:bsd-2))))
+(define-public python-cart
+ (package
+ (name "python-cart")
+ (version "1.2.2")
+ (source
+ (origin
+ ;; No source releases available on pypi, hence fetching from GitHub.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/CybercentreCanada/cart")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zycv620iljrsval5rai1wsn0hr25ddx9xhjsyy6xxrgprfxvlfi"))))
+ (build-system pyproject-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest" "discover")))))))
+ (propagated-inputs (list python-pycryptodome))
+ (home-page "https://github.com/CybercentreCanada/cart")
+ (synopsis "Library for interacting with the CaRT file format")
+ (description
+ "This Python library implements the CaRT file format which is commonly
+used to store and transmit information about computer malware and associated
+metadata.")
+ (license license:bsd-2)))
+
(define-public python-ailment
(package
(name "python-ailment")
soeren wrote 7 months ago
[PATCH 06/10] gnu: python-cle: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
2f4ea5d06486ba2ae5769aeb68d6debe12d15570.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-cle): Update to 9.2.112.
[propagated-inputs]: Add python-cart.
---
gnu/packages/python-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cc7d45e6fa..953a9ac018 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34035,19 +34035,19 @@ (define-public python-cle
(package
(name "python-cle")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cle" version))
(sha256
- (base32 "0mswv9gd2p2ws7zfsshqv5ybbj27wkdwakdcknq4vsrx9ry9k4yc"))))
+ (base32 "11jbvg12wqxz74iy83ax0q8k156xrw6iqv75dix5cpqgacds3gdj"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #f))
(propagated-inputs (list python-pefile python-pyelftools python-pyvex
- python-sortedcontainers))
+ python-sortedcontainers python-cart))
(native-inputs (list python-cffi))
(home-page "https://github.com/angr/cle")
(synopsis "Python loader for binaries and their associated libraries")
soeren wrote 7 months ago
[PATCH 07/10] gnu: python-claripy: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
b9e4876a2cedb8adb15e8695b25d766727bdf147.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-claripy): Update to 9.2.112.
---
gnu/packages/python-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 953a9ac018..eefb3f2449 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34096,7 +34096,7 @@ (define-public python-claripy
(package
(name "python-claripy")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
;; Fetching from Git as pypi release doesn't include all test files.
@@ -34106,13 +34106,13 @@ (define-public python-claripy
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0nmawpi1596d9plafrp2db36cjsidy2fagkzkja51jwlx2m1ngai"))
+ (base32 "0c6q6imxjwhxn87d9yz8zvyrszk94r25w8x0g1lr6mrpa9bx7wai"))
(modules '((guix build utils)))
(snippet '(begin
(substitute* "setup.cfg"
;; Relax the z3 version constraint.
;; See https://github.com/angr/claripy/commit/d1fe2df
- (("z3-solver==4.10.2.0")
+ (("z3-solver==4.13.0.0")
""))))))
(build-system pyproject-build-system)
(arguments
soeren wrote 7 months ago
[PATCH 08/10] gnu: Add python-pyformlang.
(address . 72393@debbugs.gnu.org)
fc68670a6efdf217add9a8838b323e94eed68345.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-pyformlang): New variable.
---
gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eefb3f2449..d253817748 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23796,6 +23796,27 @@ (define-public python-pypeg2
parse many formal languages.")
(license license:gpl2)))
+(define-public python-pyformlang
+ (package
+ (name "python-pyformlang")
+ (version "1.0.10")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyformlang" version))
+ (sha256
+ (base32 "0szgy4pqfixmswjs37qgma4qa3bsadpp3l1xflrpfi10aa8hh2sp"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-networkx python-numpy python-pydot))
+ (home-page "https://github.com/Aunsiels/pyformlang")
+ (synopsis "Framework for interacting with formal grammars")
+ (description
+ "This package provides a framework for working with formal
+language grammars. The library was originally developed for educational
+purposes and therefore implements many textbook algorithms regarding the
+manipulation and interaction with formal grammars.")
+ (license license:expat)))
+
(define-public python-incremental
(package
(name "python-incremental")
soeren wrote 7 months ago
[PATCH 09/10] gnu: Add python-unique-log-filter.
(address . 72393@debbugs.gnu.org)
29ac50936ab5af28cf34a3410f814d66a41f3b0a.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-unique-log-filter): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d253817748..02d2a49dbb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30956,6 +30956,36 @@ (define-public python-json-logger
we can stop writing custom parsers for syslog-type records.")
(license license:bsd-3)))
+(define-public python-unique-log-filter
+ (package
+ (name "python-unique-log-filter")
+ (version "0.1.0")
+ (source
+ ;; The version on pypi does not include test files.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/twizmwazin/unique_log_filter")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "036mh6nqskck2fa1q2inasqxb9wcz2p09qcpldnnffzcy1a6kzba"))))
+ (build-system pyproject-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "test_unique_log_filter.py")))))))
+ (native-inputs (list python-flit-core))
+ (home-page "https://github.com/twizmwazin/unique_log_filter")
+ (synopsis "Log filter that removes duplicate log messages")
+ (description
+ "This library provides a filter for the @code{logging} module
+from the Python standard library which allows removing duplicate log
+messages.")
+ (license license:bsd-2)))
+
(define-public python-daiquiri
(package
(name "python-daiquiri")
soeren wrote 7 months ago
[PATCH 10/10] gnu: python-angr: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)
d772dd33030bd706784e658c14a91cb0dc26a89c.1722412559.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-angr): Update to 9.2.112.
[propagated-inputs]: Remove python-progressbar2; add python-pyformlang,
add python-rich, add python-unique-log-filter.
* gnu/packages/patches/python-angr-addition-type-error.patch:
Remove patch (merged upstream and included in new release).
* gnu/packages/patches/python-angr-check-exec-deps.patch:
Rebase for new release.
---
gnu/local.mk | 1 -
.../python-angr-addition-type-error.patch | 18 ----
.../patches/python-angr-check-exec-deps.patch | 83 +++++++++----------
gnu/packages/python-xyz.scm | 28 +++++--
4 files changed, 58 insertions(+), 72 deletions(-)
delete mode 100644 gnu/packages/patches/python-angr-addition-type-error.patch

Toggle diff (235 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8b00928141..43e5116c08 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1945,7 +1945,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3-fix-tests.patch \
%D%/packages/patches/python-3-hurd-configure.patch \
- %D%/packages/patches/python-angr-addition-type-error.patch \
%D%/packages/patches/python-angr-check-exec-deps.patch \
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
%D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \
diff --git a/gnu/packages/patches/python-angr-addition-type-error.patch b/gnu/packages/patches/python-angr-addition-type-error.patch
deleted file mode 100644
index 7301d8b505..0000000000
--- a/gnu/packages/patches/python-angr-addition-type-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This fixes failures of the test_ln_gcc_O2 and other related tests
-in the angr test suite. The patch has been proposed upstream.
-
-Taken form: https://github.com/angr/angr/pull/4443
-
-diff --git a/angr/analyses/reassembler.py b/angr/analyses/reassembler.py
-index 7a2399a60..b09b3a8cb 100644
---- a/angr/analyses/reassembler.py
-+++ b/angr/analyses/reassembler.py
-@@ -730,7 +730,7 @@ class Instruction:
- elif operand.type == capstone.CS_OP_MEM:
- operand_offsets.append(capstone_instr.disp_offset)
- else:
-- operand_offsets.append(None)
-+ operand_offsets.append(0)
-
- if self.addr is not None:
- self._initialize(capstone_instr.operands, operand_offsets)
diff --git a/gnu/packages/patches/python-angr-check-exec-deps.patch b/gnu/packages/patches/python-angr-check-exec-deps.patch
index 438f8ef183..6001d9c924 100644
--- a/gnu/packages/patches/python-angr-check-exec-deps.patch
+++ b/gnu/packages/patches/python-angr-check-exec-deps.patch
@@ -8,11 +8,11 @@ For Guix, this files as the glibc shared objects cannot be found.
Additionally, we don't really want to execute pre-compiled binaries
on Guix, hence we disable those tests.
-diff --git a/tests/test_ctype_locale.py b/tests/test_ctype_locale.py
-index 08cb89836..2b9233558 100644
---- a/tests/test_ctype_locale.py
-+++ b/tests/test_ctype_locale.py
-@@ -14,7 +14,7 @@ test_location = os.path.dirname(os.path.abspath(__file__))
+diff --git a/tests/procedures/glibc/test_ctype_locale.py b/tests/procedures/glibc/test_ctype_locale.py
+index ac3e1ee16..1fb0fd095 100755
+--- a/tests/procedures/glibc/test_ctype_locale.py
++++ b/tests/procedures/glibc/test_ctype_locale.py
+@@ -15,7 +15,7 @@ test_location = os.path.join(bin_location, "tests")
class TestCtypeLocale(unittest.TestCase):
@@ -21,7 +21,7 @@ index 08cb89836..2b9233558 100644
def test_ctype_b_loc(self):
"""
test_ctype_locale.test_ctype_b_loc
-@@ -60,7 +60,7 @@ class TestCtypeLocale(unittest.TestCase):
+@@ -61,7 +61,7 @@ class TestCtypeLocale(unittest.TestCase):
output = subprocess.check_output(bin_path, shell=True)
assert result == output
@@ -30,7 +30,7 @@ index 08cb89836..2b9233558 100644
def test_ctype_tolower_loc(self):
"""
test_ctype_locale.test_ctype_tolower_loc
-@@ -109,7 +109,7 @@ class TestCtypeLocale(unittest.TestCase):
+@@ -110,7 +110,7 @@ class TestCtypeLocale(unittest.TestCase):
output = subprocess.check_output(bin_path, shell=True)
assert result == output
@@ -39,50 +39,24 @@ index 08cb89836..2b9233558 100644
def test_ctype_toupper_loc(self):
"""
test_ctype_locale.test_ctype_toupper_loc
-diff --git a/tests/test_signed_div.py b/tests/test_signed_div.py
-index 59cb9b8d1..994ed9c65 100644
---- a/tests/test_signed_div.py
-+++ b/tests/test_signed_div.py
-@@ -1,6 +1,7 @@
- import angr
- import subprocess
- import sys
-+import pytest
-
- import logging
-
-@@ -13,7 +14,7 @@ import os
- test_location = os.path.dirname(os.path.realpath(__file__))
-
-
--@skipUnless(sys.platform.startswith("linux"), "linux only")
-+@pytest.mark.skip(reason="test executes pre-compiled binaries")
- def test_signed_div():
- test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "test_signed_div")
- b = angr.Project(test_bin, auto_load_libs=False)
-diff --git a/tests/test_sscanf.py b/tests/test_sscanf.py
-index 29d2c8403..ea799b310 100644
---- a/tests/test_sscanf.py
-+++ b/tests/test_sscanf.py
-@@ -1,3 +1,4 @@
-+import pytest
- import angr
- import subprocess
- import sys
-@@ -14,7 +15,7 @@ test_location = os.path.dirname(os.path.realpath(__file__))
+diff --git a/tests/procedures/libc/test_sscanf.py b/tests/procedures/libc/test_sscanf.py
+index 7c2da6f5e..e20952f54 100755
+--- a/tests/procedures/libc/test_sscanf.py
++++ b/tests/procedures/libc/test_sscanf.py
+@@ -14,7 +14,7 @@ test_location = os.path.join(bin_location, "tests")
class TestSscanf(unittest.TestCase):
- @unittest.skipUnless(sys.platform.startswith("linux"), "linux only")
+ @unittest.skip("test executes pre-compiled binaries")
def test_sscanf(self):
- test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "sscanf_test")
+ test_bin = os.path.join(test_location, "x86_64", "sscanf_test")
b = angr.Project(test_bin, auto_load_libs=False)
-diff --git a/tests/test_strtol.py b/tests/test_strtol.py
-index 6c29cab22..f36181407 100644
---- a/tests/test_strtol.py
-+++ b/tests/test_strtol.py
-@@ -11,7 +11,7 @@ class TestStrtol(unittest.TestCase):
+diff --git a/tests/procedures/libc/test_strtol.py b/tests/procedures/libc/test_strtol.py
+index 4d7982b86..8818ced3b 100755
+--- a/tests/procedures/libc/test_strtol.py
++++ b/tests/procedures/libc/test_strtol.py
+@@ -15,7 +15,7 @@ class TestStrtol(unittest.TestCase):
# pylint: disable=no-self-use
@slow_test
@@ -91,3 +65,24 @@ index 6c29cab22..f36181407 100644
def test_strtol(self, threads=None):
test_bin = os.path.join(bin_location, "tests", "x86_64", "strtol_test")
# disabling auto_load_libs increases the execution time of the test case.
+diff --git a/tests/sim/exec_insn/test_signed_div.py b/tests/sim/exec_insn/test_signed_div.py
+index 46581020f..d5acc5370 100755
+--- a/tests/sim/exec_insn/test_signed_div.py
++++ b/tests/sim/exec_insn/test_signed_div.py
+@@ -2,6 +2,7 @@
+ # pylint: disable=missing-class-docstring,no-self-use,line-too-long
+ __package__ = __package__ or "tests.sim.exec_insn" # pylint:disable=redefined-builtin
+
++import pytest
+ import os
+ import subprocess
+ import sys
+@@ -16,7 +17,7 @@ test_location = os.path.join(bin_location, "tests")
+
+
+ class TestSignedDiv(TestCase):
+- @skipUnless(sys.platform.startswith("linux"), "linux only")
++ @pytest.mark.skip(reason="test executes pre-compiled binaries")
+ def test_signed_div(self):
+ test_bin = os.path.join(test_location, "x86_64", "test_signed_div")
+ b = angr.Project(test_bin, auto_load_libs=False)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 02d2a49dbb..ae13a49577 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34335,19 +34335,18 @@ (define-public python-itanium-demangler
(define-public python-angr
(package
(name "python-angr")
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
;; Fetching from Git as pypi release doesn't include all test files.
(method git-fetch)
- (patches (search-patches "python-angr-addition-type-error.patch"
- "python-angr-check-exec-deps.patch"))
+ (patches (search-patches "python-angr-check-exec-deps.patch"))
(uri (git-reference
(url "https://github.com/angr/angr")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "18y9wyf7va7gvp9zd6lhw82j9a2x2ajsvbawh96xnxzml0jwlwjm"))))
+ (base32 "1179926xbfh2930laz33p90vj532jk7g2qylzzpw1185yhlf9cis"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -34355,9 +34354,18 @@ (define-public python-angr
(add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
(let ((coreutils (assoc-ref inputs "coreutils")))
- (substitute* "tests/test_vault.py"
- (("/bin/false")
- (which "false")))
+ ;; The constraint exists because of a capstone bug for which
+ ;; we backport a patch, hence we can relax the constraint.
+ ;;
+ ;; See https://github.com/angr/angr/issues/4656
+ (substitute* "setup.cfg"
+ (("capstone==5.0.0.post1")
+ "capstone"))
+ ;; Relax constraint on python-rich, the constraint is too strict,
+ ;; angr work well with our packaged version of python-rich.
+ (substitute* "setup.cfg"
+ (("rich>=13.1.0")
+ "rich"))
(substitute* "tests/common.py"
(("\\[\"cc\"\\]")
"[\"gcc\"]")))))
@@ -34396,11 +34404,13 @@ (define-public python-angr
python-itanium-demangler
python-pycparser
python-pyvex
- python-progressbar2
+ python-pyformlang
+ python-rich
python-rpyc
python-sortedcontainers
python-sqlalchemy
python-sympy
+ python-unique-log-filter
unicorn))
(native-inputs `(("python-pytest" ,python-pytest)
("python-pytest-xdist" ,python-pytest-xdist)
@@ -34418,7 +34428,7 @@ (define-public python-angr
version))))
(file-name (git-file-name "angr-binaries" version))
(sha256 (base32
- "1f286b2239zavxzwg1184hj1zs380cr9qr549mvy3vywvm8bsmgr"))))))
+ "0bxzf6alkczv9r0151ksvcwyksnw8077acz1wd8drbxw0zl0qnmr"))))))
(home-page "https://github.com/angr/angr")
(synopsis "Multi-architecture binary analysis toolkit")
(description
Sören Tempel wrote 6 months ago
Re: [PATCH 00/10] gnu: python-angr: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
2QWWFKQJOGK76.2LQ2QUY4A7L6V@8pit.net
Hello jgart,

Since you already reviewed the initial addition of angr to Guix in
!69074, maybe you can have a look at this angr upgrade as well? :)

Would appreciate your feedback, if you have the time.

Greetings,
Sören
jgart wrote 6 months ago
cc2199767b288b890f0428a01c3250dd5dc96c54@dismail.de
Hi,

Could you rebase and send a v2? This patch series doesn't apply cleanly
anymore. I can take a look this coming week.

all best,

jgart
soeren wrote 5 months ago
[PATCH v2 01/10] gnu: python-ailment: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
0dd3ef50a19a67c58a12f06a0b99356b87a31fe8.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-ailment): Update to 9.2.112.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 22351e813a..45fcaa63f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34059,13 +34059,13 @@ (define-public python-ailment
(package
(name "python-ailment")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ailment" version))
(sha256
- (base32 "073fcssbjis1ckwv2w0dcz2dfl6715bj4d4qdhspajj911mvng2f"))))
+ (base32 "1rv8rwvdm7fc9mf8z5hqb54dsj0n7jlnwghd12ll0b2jmh2ix8mn"))))
(build-system pyproject-build-system)
(arguments
`(#:phases (modify-phases %standard-phases

base-commit: 9a141b5bd633227ea31776b9ce7ca40928de2442
soeren wrote 5 months ago
[PATCH v2 02/10] gnu: python-pyvex: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
a0ed1eb106527b34b3b1ab48654fed84a6b1e022.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-pyvex): Update to 9.2.112.
* gnu/packages/patches/python-pyvex-remove-angr-dependency.patch:
Remove patch (merged upstream and included in new release).
---
gnu/local.mk | 1 -
.../python-pyvex-remove-angr-dependency.patch | 80 -------------------
gnu/packages/python-xyz.scm | 5 +-
3 files changed, 2 insertions(+), 84 deletions(-)
delete mode 100644 gnu/packages/patches/python-pyvex-remove-angr-dependency.patch

Toggle diff (54 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c2027f9eeb..669a65dfd6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2039,7 +2039,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-pytorch-runpath.patch \
%D%/packages/patches/python-pytorch-system-libraries.patch \
%D%/packages/patches/python-pytorch-without-kineto.patch \
- %D%/packages/patches/python-pyvex-remove-angr-dependency.patch \
%D%/packages/patches/python-robotframework-atest.patch \
%D%/packages/patches/python-robotframework-source-date-epoch.patch \
%D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \
diff --git a/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch b/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch
deleted file mode 100644
index dccf22bbc6..0000000000
--- a/gnu/packages/patches/python-pyvex-remove-angr-dependency.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-This patch removes the angr dependency from the pyvex these, thus
-resolving a circular dependency (as angr depends on pyvex). This
-patch has been taken from upstream.
-
-This patch is a squashed version of the following upstream patches:
-
-* https://github.com/angr/pyvex/commit/61fb26f223a8d8a276b702d2448a12e02c5c9c6b
-* https://github.com/angr/pyvex/commit/a1fb2a4d0826b0e43bd8bbdd00b6db032643ec95
-
-diff --git a/tests/test_spotter.py b/tests/test_spotter.py
-index 9271ccd..bed7dd4 100644
---- a/tests/test_spotter.py
-+++ b/tests/test_spotter.py
-@@ -1,6 +1,5 @@
- import os
-
--import angr
- import archinfo
-
- import pyvex
-@@ -98,53 +97,28 @@ class CortexSpotter(GymratLifter):
- register(CortexSpotter, "ARMEL")
-
-
--def test_full_binary():
-- p = angr.Project(
-- os.path.join(test_location, "armel", "RTOSDemo.axf.issue_685"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-- st = p.factory.call_state(0x000013CE + 1)
-- b = st.block().vex
-- simgr = p.factory.simulation_manager(st)
-- simgr.step()
-- assert b.jumpkind == "Ijk_Sys_syscall"
-- assert simgr.active[0].regs.ip_at_syscall.args[0] == 0x13FB
--
--
- def test_tmrs():
-- test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../binaries/tests"))
-- p = angr.Project(
-- os.path.join(test_location, "armel", "helloworld"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-+ arch = archinfo.arch_from_id("ARMEL")
- ins = b"\xef\xf3\x08\x82"
-- b = pyvex.block.IRSB(ins, 1, p.arch)
-+ b = pyvex.block.IRSB(ins, 1, arch)
- assert b.jumpkind == "Ijk_Boring"
- assert type(b.statements[1].data) == pyvex.expr.Get
-- assert p.arch.register_names.get(b.statements[1].data.offset, "") == "sp"
-+ assert arch.register_names.get(b.statements[1].data.offset, "") == "sp"
- assert type(b.statements[2]) == pyvex.stmt.Put
-
-
- def test_tmsr():
-- test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../binaries/tests"))
-- p = angr.Project(
-- os.path.join(test_location, "armel", "helloworld"),
-- arch="ARMEL",
-- auto_load_libs=False,
-- )
-+ arch = archinfo.arch_from_id("ARMEL")
- inss = b"\x82\xf3\x08\x88"
-- b = pyvex.block.IRSB(inss, 1, p.arch, opt_level=3)
-+ b = pyvex.block.IRSB(inss, 1, arch, opt_level=3)
- assert b.jumpkind == "Ijk_Boring"
- assert type(b.statements[1].data) == pyvex.expr.Get
-- assert p.arch.register_names.get(b.statements[1].data.offset, "") == "r2"
-+ assert arch.register_names.get(b.statements[1].data.offset, "") == "r2"
- assert type(b.statements[2]) == pyvex.stmt.Put
-
-
- if __name__ == "__main__":
- test_basic()
- test_embedded()
-- test_full_binary()
- test_tmrs()
- test_tmsr()
Toggle diff (21 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 45fcaa63f4..3cf0701e06 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34113,14 +34113,13 @@ (define-public python-pyvex
(package
(name "python-pyvex")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
- (patches (search-patches "python-pyvex-remove-angr-dependency.patch"))
(uri (pypi-uri "pyvex" version))
(sha256
- (base32 "1v64rn7gxy6fg065bgsy38z6r494k5ri5r6sn4g08hjj32ihx1ka"))))
+ (base32 "0z1jiflp7h07mfc26am3v7v5z2n6mw9hkfylbs86qgpm93qcf6i3"))))
(build-system pyproject-build-system)
(arguments
(list
soeren wrote 5 months ago
[PATCH v2 03/10] gnu: Add python-backports-strenum.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
5e3a845ca12ba21d14e3d687bf148ee5b62d85da.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-backports-strenum): New variable.
---
gnu/packages/emulators.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 4dc61bdbff..25391ffaaf 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -96,6 +96,7 @@ (define-module (gnu packages emulators)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages sphinx)
@@ -2649,6 +2650,30 @@ (define-public python-keystone-engine
assembly for these architectures.")
(license license:gpl2)))
+;; can be removed once Guix upgrades to Python 3.11.
+(define-public python-backports-strenum
+ (package
+ (name "python-backports-strenum")
+ (version "1.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "backports_strenum" version))
+ (sha256
+ (base32 "0514yj1391k6pbs2cch6i57hidwb3236wngh2ivlk6186h3j9ibp"))))
+ (native-inputs (list python-poetry-core))
+ (build-system pyproject-build-system)
+ ;; TODO: Running tests requires a new version of poetry in Guix.
+ (arguments
+ (list
+ #:tests? #f))
+ (home-page "https://github.com/clbarnes/backports.strenum")
+ (synopsis "Backport of additions to the 'strenum' module")
+ (description
+ "Provides a backport of Python's @code{StrEnum} class which was introduced in
+Python 3.11 for Python >=3.8.6.")
+ (license license:expat)))
+
(define-public python-archinfo
(package
(name "python-archinfo")
soeren wrote 5 months ago
[PATCH v2 04/10] gnu: python-archinfo: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
802a649a9d0832604fbe0c6b14dd63219de4cdb8.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/emulators.scm (python-archinfo): Update to 9.2.112.
[propagated-inputs]: Add python-backports-strenum.
---
gnu/packages/emulators.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 25391ffaaf..0e5b6e6fd5 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2678,17 +2678,26 @@ (define-public python-archinfo
(package
(name "python-archinfo")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "archinfo" version))
(sha256
- (base32 "037xfq3wcf8ngayxz9623l4646m780v2102mfbygpzbkkjha1966"))))
+ (base32 "011n9vrrsbqbnw2i38ls7f0xkd85kxcnn14fm4lhxjpi91p7hshb"))))
(build-system pyproject-build-system)
- (propagated-inputs (list python-capstone python-keystone-engine))
+ (propagated-inputs
+ (list
+ python-backports-strenum
+ python-capstone
+ python-keystone-engine))
(arguments
`(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'patch
+ (lambda _
+ (substitute* "setup.cfg"
+ (("backports.strenum")
+ "backports_strenum"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
soeren wrote 5 months ago
[PATCH v2 06/10] gnu: python-cle: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
32189cc7944ab12d02a63c2cb9e2d33c5b2ebe93.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-cle): Update to 9.2.112.
[propagated-inputs]: Add python-cart.
---
gnu/packages/python-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 545ef0659f..909aa5f43c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34117,19 +34117,19 @@ (define-public python-cle
(package
(name "python-cle")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cle" version))
(sha256
- (base32 "0mswv9gd2p2ws7zfsshqv5ybbj27wkdwakdcknq4vsrx9ry9k4yc"))))
+ (base32 "11jbvg12wqxz74iy83ax0q8k156xrw6iqv75dix5cpqgacds3gdj"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #f))
(propagated-inputs (list python-pefile python-pyelftools python-pyvex
- python-sortedcontainers))
+ python-sortedcontainers python-cart))
(native-inputs (list python-cffi))
(home-page "https://github.com/angr/cle")
(synopsis "Python loader for binaries and their associated libraries")
soeren wrote 5 months ago
[PATCH v2 05/10] gnu: Add python-cart.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
1096050e874a9fe9eb85bd97f03ab4d65a320465.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-cart): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3cf0701e06..545ef0659f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34055,6 +34055,36 @@ (define-public python-opcodes
and BMI2).")
(license license:bsd-2))))
+(define-public python-cart
+ (package
+ (name "python-cart")
+ (version "1.2.2")
+ (source
+ (origin
+ ;; No source releases available on pypi, hence fetching from GitHub.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/CybercentreCanada/cart")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1zycv620iljrsval5rai1wsn0hr25ddx9xhjsyy6xxrgprfxvlfi"))))
+ (build-system pyproject-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "unittest" "discover")))))))
+ (propagated-inputs (list python-pycryptodome))
+ (home-page "https://github.com/CybercentreCanada/cart")
+ (synopsis "Library for interacting with the CaRT file format")
+ (description
+ "This Python library implements the CaRT file format which is commonly
+used to store and transmit information about computer malware and associated
+metadata.")
+ (license license:bsd-2)))
+
(define-public python-ailment
(package
(name "python-ailment")
soeren wrote 5 months ago
[PATCH v2 08/10] gnu: Add python-pyformlang.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
9bb133c6269afe70dbf0e9ef9836c4179a71e126.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-pyformlang): New variable.
---
gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d34009abc7..b07cb6c409 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23859,6 +23859,27 @@ (define-public python-pypeg2
parse many formal languages.")
(license license:gpl2)))
+(define-public python-pyformlang
+ (package
+ (name "python-pyformlang")
+ (version "1.0.10")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyformlang" version))
+ (sha256
+ (base32 "0szgy4pqfixmswjs37qgma4qa3bsadpp3l1xflrpfi10aa8hh2sp"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-networkx python-numpy python-pydot))
+ (home-page "https://github.com/Aunsiels/pyformlang")
+ (synopsis "Framework for interacting with formal grammars")
+ (description
+ "This package provides a framework for working with formal
+language grammars. The library was originally developed for educational
+purposes and therefore implements many textbook algorithms regarding the
+manipulation and interaction with formal grammars.")
+ (license license:expat)))
+
(define-public python-incremental
(package
(name "python-incremental")
soeren wrote 5 months ago
[PATCH v2 07/10] gnu: python-claripy: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
325f5909e1f552a540a1d4c4b8ad7bce8a97f32a.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-claripy): Update to 9.2.112.
---
gnu/packages/python-xyz.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 909aa5f43c..d34009abc7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34178,7 +34178,7 @@ (define-public python-claripy
(package
(name "python-claripy")
;; Must be the same version as python-angr.
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
;; Fetching from Git as pypi release doesn't include all test files.
@@ -34188,13 +34188,13 @@ (define-public python-claripy
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0nmawpi1596d9plafrp2db36cjsidy2fagkzkja51jwlx2m1ngai"))
+ (base32 "0c6q6imxjwhxn87d9yz8zvyrszk94r25w8x0g1lr6mrpa9bx7wai"))
(modules '((guix build utils)))
(snippet '(begin
(substitute* "setup.cfg"
;; Relax the z3 version constraint.
;; See https://github.com/angr/claripy/commit/d1fe2df
- (("z3-solver==4.10.2.0")
+ (("z3-solver==4.13.0.0")
""))))))
(build-system pyproject-build-system)
(arguments
soeren wrote 5 months ago
[PATCH v2 10/10] gnu: python-angr: Update to 9.2.112.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
de8f5e9293a23a3063ac936a58ea055a9cbabb69.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-angr): Update to 9.2.112.
[propagated-inputs]: Remove python-progressbar2; add python-pyformlang,
add python-rich, add python-unique-log-filter.
* gnu/packages/patches/python-angr-addition-type-error.patch:
Remove patch (merged upstream and included in new release).
* gnu/packages/patches/python-angr-check-exec-deps.patch:
Rebase for new release.
---
gnu/local.mk | 1 -
.../python-angr-addition-type-error.patch | 18 ----
.../patches/python-angr-check-exec-deps.patch | 83 +++++++++----------
gnu/packages/python-xyz.scm | 28 +++++--
4 files changed, 58 insertions(+), 72 deletions(-)
delete mode 100644 gnu/packages/patches/python-angr-addition-type-error.patch

Toggle diff (235 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 669a65dfd6..adbea45636 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2004,7 +2004,6 @@ dist_patch_DATA = \
%D%/packages/patches/python-3-search-paths.patch \
%D%/packages/patches/python-3-fix-tests.patch \
%D%/packages/patches/python-3-hurd-configure.patch \
- %D%/packages/patches/python-angr-addition-type-error.patch \
%D%/packages/patches/python-angr-check-exec-deps.patch \
%D%/packages/patches/python-3-reproducible-build.patch \
%D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \
diff --git a/gnu/packages/patches/python-angr-addition-type-error.patch b/gnu/packages/patches/python-angr-addition-type-error.patch
deleted file mode 100644
index 7301d8b505..0000000000
--- a/gnu/packages/patches/python-angr-addition-type-error.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This fixes failures of the test_ln_gcc_O2 and other related tests
-in the angr test suite. The patch has been proposed upstream.
-
-Taken form: https://github.com/angr/angr/pull/4443
-
-diff --git a/angr/analyses/reassembler.py b/angr/analyses/reassembler.py
-index 7a2399a60..b09b3a8cb 100644
---- a/angr/analyses/reassembler.py
-+++ b/angr/analyses/reassembler.py
-@@ -730,7 +730,7 @@ class Instruction:
- elif operand.type == capstone.CS_OP_MEM:
- operand_offsets.append(capstone_instr.disp_offset)
- else:
-- operand_offsets.append(None)
-+ operand_offsets.append(0)
-
- if self.addr is not None:
- self._initialize(capstone_instr.operands, operand_offsets)
diff --git a/gnu/packages/patches/python-angr-check-exec-deps.patch b/gnu/packages/patches/python-angr-check-exec-deps.patch
index 438f8ef183..6001d9c924 100644
--- a/gnu/packages/patches/python-angr-check-exec-deps.patch
+++ b/gnu/packages/patches/python-angr-check-exec-deps.patch
@@ -8,11 +8,11 @@ For Guix, this files as the glibc shared objects cannot be found.
Additionally, we don't really want to execute pre-compiled binaries
on Guix, hence we disable those tests.
-diff --git a/tests/test_ctype_locale.py b/tests/test_ctype_locale.py
-index 08cb89836..2b9233558 100644
---- a/tests/test_ctype_locale.py
-+++ b/tests/test_ctype_locale.py
-@@ -14,7 +14,7 @@ test_location = os.path.dirname(os.path.abspath(__file__))
+diff --git a/tests/procedures/glibc/test_ctype_locale.py b/tests/procedures/glibc/test_ctype_locale.py
+index ac3e1ee16..1fb0fd095 100755
+--- a/tests/procedures/glibc/test_ctype_locale.py
++++ b/tests/procedures/glibc/test_ctype_locale.py
+@@ -15,7 +15,7 @@ test_location = os.path.join(bin_location, "tests")
class TestCtypeLocale(unittest.TestCase):
@@ -21,7 +21,7 @@ index 08cb89836..2b9233558 100644
def test_ctype_b_loc(self):
"""
test_ctype_locale.test_ctype_b_loc
-@@ -60,7 +60,7 @@ class TestCtypeLocale(unittest.TestCase):
+@@ -61,7 +61,7 @@ class TestCtypeLocale(unittest.TestCase):
output = subprocess.check_output(bin_path, shell=True)
assert result == output
@@ -30,7 +30,7 @@ index 08cb89836..2b9233558 100644
def test_ctype_tolower_loc(self):
"""
test_ctype_locale.test_ctype_tolower_loc
-@@ -109,7 +109,7 @@ class TestCtypeLocale(unittest.TestCase):
+@@ -110,7 +110,7 @@ class TestCtypeLocale(unittest.TestCase):
output = subprocess.check_output(bin_path, shell=True)
assert result == output
@@ -39,50 +39,24 @@ index 08cb89836..2b9233558 100644
def test_ctype_toupper_loc(self):
"""
test_ctype_locale.test_ctype_toupper_loc
-diff --git a/tests/test_signed_div.py b/tests/test_signed_div.py
-index 59cb9b8d1..994ed9c65 100644
---- a/tests/test_signed_div.py
-+++ b/tests/test_signed_div.py
-@@ -1,6 +1,7 @@
- import angr
- import subprocess
- import sys
-+import pytest
-
- import logging
-
-@@ -13,7 +14,7 @@ import os
- test_location = os.path.dirname(os.path.realpath(__file__))
-
-
--@skipUnless(sys.platform.startswith("linux"), "linux only")
-+@pytest.mark.skip(reason="test executes pre-compiled binaries")
- def test_signed_div():
- test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "test_signed_div")
- b = angr.Project(test_bin, auto_load_libs=False)
-diff --git a/tests/test_sscanf.py b/tests/test_sscanf.py
-index 29d2c8403..ea799b310 100644
---- a/tests/test_sscanf.py
-+++ b/tests/test_sscanf.py
-@@ -1,3 +1,4 @@
-+import pytest
- import angr
- import subprocess
- import sys
-@@ -14,7 +15,7 @@ test_location = os.path.dirname(os.path.realpath(__file__))
+diff --git a/tests/procedures/libc/test_sscanf.py b/tests/procedures/libc/test_sscanf.py
+index 7c2da6f5e..e20952f54 100755
+--- a/tests/procedures/libc/test_sscanf.py
++++ b/tests/procedures/libc/test_sscanf.py
+@@ -14,7 +14,7 @@ test_location = os.path.join(bin_location, "tests")
class TestSscanf(unittest.TestCase):
- @unittest.skipUnless(sys.platform.startswith("linux"), "linux only")
+ @unittest.skip("test executes pre-compiled binaries")
def test_sscanf(self):
- test_bin = os.path.join(test_location, "..", "..", "binaries", "tests", "x86_64", "sscanf_test")
+ test_bin = os.path.join(test_location, "x86_64", "sscanf_test")
b = angr.Project(test_bin, auto_load_libs=False)
-diff --git a/tests/test_strtol.py b/tests/test_strtol.py
-index 6c29cab22..f36181407 100644
---- a/tests/test_strtol.py
-+++ b/tests/test_strtol.py
-@@ -11,7 +11,7 @@ class TestStrtol(unittest.TestCase):
+diff --git a/tests/procedures/libc/test_strtol.py b/tests/procedures/libc/test_strtol.py
+index 4d7982b86..8818ced3b 100755
+--- a/tests/procedures/libc/test_strtol.py
++++ b/tests/procedures/libc/test_strtol.py
+@@ -15,7 +15,7 @@ class TestStrtol(unittest.TestCase):
# pylint: disable=no-self-use
@slow_test
@@ -91,3 +65,24 @@ index 6c29cab22..f36181407 100644
def test_strtol(self, threads=None):
test_bin = os.path.join(bin_location, "tests", "x86_64", "strtol_test")
# disabling auto_load_libs increases the execution time of the test case.
+diff --git a/tests/sim/exec_insn/test_signed_div.py b/tests/sim/exec_insn/test_signed_div.py
+index 46581020f..d5acc5370 100755
+--- a/tests/sim/exec_insn/test_signed_div.py
++++ b/tests/sim/exec_insn/test_signed_div.py
+@@ -2,6 +2,7 @@
+ # pylint: disable=missing-class-docstring,no-self-use,line-too-long
+ __package__ = __package__ or "tests.sim.exec_insn" # pylint:disable=redefined-builtin
+
++import pytest
+ import os
+ import subprocess
+ import sys
+@@ -16,7 +17,7 @@ test_location = os.path.join(bin_location, "tests")
+
+
+ class TestSignedDiv(TestCase):
+- @skipUnless(sys.platform.startswith("linux"), "linux only")
++ @pytest.mark.skip(reason="test executes pre-compiled binaries")
+ def test_signed_div(self):
+ test_bin = os.path.join(test_location, "x86_64", "test_signed_div")
+ b = angr.Project(test_bin, auto_load_libs=False)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f56d23f93e..45dce3082d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34417,19 +34417,18 @@ (define-public python-itanium-demangler
(define-public python-angr
(package
(name "python-angr")
- (version "9.2.46")
+ (version "9.2.112")
(source
(origin
;; Fetching from Git as pypi release doesn't include all test files.
(method git-fetch)
- (patches (search-patches "python-angr-addition-type-error.patch"
- "python-angr-check-exec-deps.patch"))
+ (patches (search-patches "python-angr-check-exec-deps.patch"))
(uri (git-reference
(url "https://github.com/angr/angr")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "18y9wyf7va7gvp9zd6lhw82j9a2x2ajsvbawh96xnxzml0jwlwjm"))))
+ (base32 "1179926xbfh2930laz33p90vj532jk7g2qylzzpw1185yhlf9cis"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -34437,9 +34436,18 @@ (define-public python-angr
(add-after 'unpack 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
(let ((coreutils (assoc-ref inputs "coreutils")))
- (substitute* "tests/test_vault.py"
- (("/bin/false")
- (which "false")))
+ ;; The constraint exists because of a capstone bug for which
+ ;; we backport a patch, hence we can relax the constraint.
+ ;;
+ ;; See https://github.com/angr/angr/issues/4656
+ (substitute* "setup.cfg"
+ (("capstone==5.0.0.post1")
+ "capstone"))
+ ;; Relax constraint on python-rich, the constraint is too strict,
+ ;; angr work well with our packaged version of python-rich.
+ (substitute* "setup.cfg"
+ (("rich>=13.1.0")
+ "rich"))
(substitute* "tests/common.py"
(("\\[\"cc\"\\]")
"[\"gcc\"]")))))
@@ -34478,11 +34486,13 @@ (define-public python-angr
python-itanium-demangler
python-pycparser
python-pyvex
- python-progressbar2
+ python-pyformlang
+ python-rich
python-rpyc
python-sortedcontainers
python-sqlalchemy
python-sympy
+ python-unique-log-filter
unicorn))
(native-inputs `(("python-pytest" ,python-pytest)
("python-pytest-xdist" ,python-pytest-xdist)
@@ -34500,7 +34510,7 @@ (define-public python-angr
version))))
(file-name (git-file-name "angr-binaries" version))
(sha256 (base32
- "1f286b2239zavxzwg1184hj1zs380cr9qr549mvy3vywvm8bsmgr"))))))
+ "0bxzf6alkczv9r0151ksvcwyksnw8077acz1wd8drbxw0zl0qnmr"))))))
(home-page "https://github.com/angr/angr")
(synopsis "Multi-architecture binary analysis toolkit")
(description
soeren wrote 5 months ago
[PATCH v2 09/10] gnu: Add python-unique-log-filter.
(address . 72393@debbugs.gnu.org)(address . jgart@dismail.de)
92cd01f98e231ab55ed8018bcba619028e400cd1.1727462103.git.soeren@soeren-tempel.net
From: Sören Tempel <soeren@soeren-tempel.net>

* gnu/packages/python-xyz.scm (python-unique-log-filter): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b07cb6c409..f56d23f93e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31033,6 +31033,36 @@ (define-public python-json-logger
we can stop writing custom parsers for syslog-type records.")
(license license:bsd-3)))
+(define-public python-unique-log-filter
+ (package
+ (name "python-unique-log-filter")
+ (version "0.1.0")
+ (source
+ ;; The version on pypi does not include test files.
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/twizmwazin/unique_log_filter")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "036mh6nqskck2fa1q2inasqxb9wcz2p09qcpldnnffzcy1a6kzba"))))
+ (build-system pyproject-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "test_unique_log_filter.py")))))))
+ (native-inputs (list python-flit-core))
+ (home-page "https://github.com/twizmwazin/unique_log_filter")
+ (synopsis "Log filter that removes duplicate log messages")
+ (description
+ "This library provides a filter for the @code{logging} module
+from the Python standard library which allows removing duplicate log
+messages.")
+ (license license:bsd-2)))
+
(define-public python-daiquiri
(package
(name "python-daiquiri")
Sören Tempel wrote 5 months ago
Re: [PATCH 00/10] gnu: python-angr: Update to 9.2.112.
(name . jgart)(address . jgart@dismail.de)(address . 72393@debbugs.gnu.org)
2WW6ERY7S4270.3C5DPMUEACOAO@8pit.net
Hi,

The patch still applied cleanly for me but I still rebased it to current
master and send a new revision. Keep in mind that, unfortunately, the
mail order does not correspond to patch order. Let me know if there is
anything I can do about that.

Looking forward to your feedback on the patchset!

Cheers,
Sören

"jgart" <jgart@dismail.de> wrote:
Toggle quote (8 lines)
> Hi,
>
> Could you rebase and send a v2? This patch series doesn't apply cleanly
> anymore. I can take a look this coming week.
>
> all best,
>
> jgart
Ludovic Courtès wrote 5 months ago
Re: [bug#72393] [PATCH v2 01/10] gnu: python-ailment: Update to 9.2.112.
(address . soeren@soeren-tempel.net)
87r08sxlau.fsf@gnu.org
Hi Sören,

Applied the whole series, which got a green light on qa.guix.

Thanks!

Ludo’.
Closed
jgart wrote 5 months ago
7a69fc4d4ef7099f96f5f97294a33b70a6412e5d@dismail.de
Hi Ludo,

Thanks for helping out with this one. It is much appreciated.

all best,

jgart
Attachment: file
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72393@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72393
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help