From: abenson <abenson@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] [WIP] New package: gef-2020.03.1
Date: Sun, 31 May 2020 23:09:12 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22481@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
There is a new pull request by abenson against master on the void-packages repository
https://github.com/abenson/void-packages np_gef
https://github.com/void-linux/void-packages/pull/22481
[WIP] New package: gef-2020.03.1
1. I don't like that keystone python bindings require patching
2. I've already submitted an issue upstream to not use `-` in versions
3. Even if `gef` drops off this PR (understandable) the new packages and changes to existing packages are necessary for it.
A patch file from https://github.com/void-linux/void-packages/pull/22481.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-np_gef-22481.patch --]
[-- Type: text/x-diff, Size: 6247 bytes --]
From a2c222a0107419e07cb3f10bfc4dc46e17dcdf73 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sun, 31 May 2020 12:18:31 -0500
Subject: [PATCH 1/4] keystone: enable python3 bindings
---
srcpkgs/keystone-python3 | 1 +
srcpkgs/keystone/patches/fix-lib-name.patch | 11 +++++++++++
srcpkgs/keystone/template | 19 ++++++++++++++++---
3 files changed, 28 insertions(+), 3 deletions(-)
create mode 120000 srcpkgs/keystone-python3
create mode 100644 srcpkgs/keystone/patches/fix-lib-name.patch
diff --git a/srcpkgs/keystone-python3 b/srcpkgs/keystone-python3
new file mode 120000
index 00000000000..54e10b1b46c
--- /dev/null
+++ b/srcpkgs/keystone-python3
@@ -0,0 +1 @@
+keystone
\ No newline at end of file
diff --git a/srcpkgs/keystone/patches/fix-lib-name.patch b/srcpkgs/keystone/patches/fix-lib-name.patch
new file mode 100644
index 00000000000..57fe882e5be
--- /dev/null
+++ b/srcpkgs/keystone/patches/fix-lib-name.patch
@@ -0,0 +1,11 @@
+--- bindings/python/keystone/keystone.py.orig
++++ bindings/python/keystone/keystone.py
+@@ -20,7 +20,7 @@
+ __file__ = inspect.getfile(inspect.currentframe())
+
+ _lib_path = split(__file__)[0]
+-_all_libs = ('keystone.dll', 'libkeystone.so', 'libkeystone.dylib')
++_all_libs = ('keystone.dll', 'libkeystone.so.0', 'libkeystone.dylib')
+ _found = False
+
+ for _lib in _all_libs:
diff --git a/srcpkgs/keystone/template b/srcpkgs/keystone/template
index 9615d6bbb02..3eda8329ada 100644
--- a/srcpkgs/keystone/template
+++ b/srcpkgs/keystone/template
@@ -1,17 +1,22 @@
# Template file for 'keystone'
pkgname=keystone
version=0.9.1
-revision=1
+revision=2
build_style=cmake
configure_args='-DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD=all'
-hostmakedepends="python"
+hostmakedepends="python3"
+makedepends="python3-devel"
short_desc="Lightweight multi-platform, multi-architecture assembler framework"
maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-2"
+license="GPL-2.0-only"
homepage="http://www.keystone-engine.org/"
distfiles="https://github.com/keystone-engine/keystone/archive/${version}.tar.gz"
checksum=e9d706cd0c19c49a6524b77db8158449b9c434b415fbf94a073968b68cf8a9f0
+post_install() {
+ cd bindings/python && DESTDIR=${DESTDIR} make install3
+}
+
keystone-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
@@ -21,3 +26,11 @@ keystone-devel_package() {
vmove usr/lib/pkgconfig
}
}
+
+keystone-python3_package() {
+ short_desc+=" - Python3 bindings"
+ depends="${sourcepkg}>=${version}_${revision}"
+ pkg_install() {
+ vmove "$py3_lib"
+ }
+}
From 971fdd2286cef5b19767d9c22b00dee90cb50c5c Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sun, 31 May 2020 12:18:41 -0500
Subject: [PATCH 2/4] New package: python3-filebytes-0.10.2
---
srcpkgs/python3-filebytes/template | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 srcpkgs/python3-filebytes/template
diff --git a/srcpkgs/python3-filebytes/template b/srcpkgs/python3-filebytes/template
new file mode 100644
index 00000000000..af7c3c96f55
--- /dev/null
+++ b/srcpkgs/python3-filebytes/template
@@ -0,0 +1,18 @@
+# Template file for 'python3-filebytes'
+pkgname=python3-filebytes
+version=0.10.2
+revision=1
+wrksrc="filebytes-${version}"
+archs="noarch"
+build_style=python3-module
+hostmakedepends="python3-setuptools"
+short_desc="Library to read and edit ELF, PE, and other files"
+maintainer="Andrew Benson <abenson+void@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://scoding.de/filebytes-introduction"
+distfiles="https://github.com/sashs/filebytes/archive/v${version}.tar.gz"
+checksum=6a22a6cec9065c96143f7e3acb0acaffd5eb0d2419749361cb73e40d7e10c2d4
+
+post_install() {
+ vlicense COPYING
+}
From 06b5349a5dd9d0409060bd171ca755991f97aae9 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sun, 31 May 2020 12:19:11 -0500
Subject: [PATCH 3/4] New package: python3-Ropper-1.13.5
---
srcpkgs/python3-Ropper/template | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 srcpkgs/python3-Ropper/template
diff --git a/srcpkgs/python3-Ropper/template b/srcpkgs/python3-Ropper/template
new file mode 100644
index 00000000000..1137a9a6b36
--- /dev/null
+++ b/srcpkgs/python3-Ropper/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-Ropper'
+pkgname=python3-Ropper
+version=1.13.5
+revision=1
+archs="noarch"
+build_style=python3-module
+wrksrc="Ropper-${version}"
+hostmakedepends="python3-setuptools"
+depends="capstone-python3 python3-filebytes keystone-python3"
+short_desc="Find gadgets to build rop chains for different architectures"
+maintainer="Andrew Benson <abenson+void@gmail.com>"
+license="BSD-3-Clause"
+homepage="https://scoding.de/ropper/"
+distfiles="https://github.com/sashs/Ropper/archive/v${version}.tar.gz"
+checksum=b32329495645a6e0a8c1b2c4f4e330295a05b82eb8a5965051ad5c73e89bf371
+
+post_install() {
+ vlicense COPYING
+}
From 0dba683d6b7f4c4afd23555d54c9d02a0eac09f8 Mon Sep 17 00:00:00 2001
From: Andrew Benson <abenson+void@gmail.com>
Date: Sun, 31 May 2020 12:46:17 -0500
Subject: [PATCH 4/4] [WIP] New package: gef-2020.03.1
Closes #22226.
---
srcpkgs/gef/template | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/gef/template
diff --git a/srcpkgs/gef/template b/srcpkgs/gef/template
new file mode 100644
index 00000000000..34b169e78d7
--- /dev/null
+++ b/srcpkgs/gef/template
@@ -0,0 +1,22 @@
+# Template file for 'gef'
+pkgname=gef
+_version=2020.03-1
+version="${_version//-/.}"
+revision=1
+archs="noarch"
+wrksrc="${pkgname}-${_version}"
+pycompile_dirs="usr/share/gef"
+depends="keystone-python3 capstone-python3 unicorn-python3 python3-Ropper"
+short_desc="GDB Enhanced Features for exploit devs & reversers"
+maintainer="Andrew Benson <abenson+void@gmail.com>"
+license="MIT"
+homepage="https://gef.readthedocs.io/en/master/"
+distfiles="https://github.com/hugsy/gef/archive/${_version}.tar.gz"
+checksum=ab303d4e3b5a0bee8785409f59b0b2ab025d862a1aeac3d8d6c4ff2fe0209ded
+python_version="3"
+
+do_install() {
+ vlicense LICENSE
+ vmkdir usr/share/gef
+ vcopy gef.py usr/share/gef
+}
reply other threads:[~2020-05-31 21:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-22481@inbox.vuxu.org \
--to=abenson@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).