public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/pwndbg/
Date: Tue,  5 Apr 2022 03:33:45 +0000 (UTC)	[thread overview]
Message-ID: <1649128716.321df26934e943cc9a24528de15d90c5b2e76219.sam@gentoo> (raw)

commit:     321df26934e943cc9a24528de15d90c5b2e76219
Author:     Mario Haustein <mario.haustein <AT> hrz <DOT> tu-chemnitz <DOT> de>
AuthorDate: Fri Jan 28 17:44:01 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr  5 03:18:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=321df269

dev-util/pwndbg: new ebuild

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Mario Haustein <mario.haustein <AT> hrz.tu-chemnitz.de>
Closes: https://github.com/gentoo/gentoo/pull/24016
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/pwndbg/Manifest               |  1 +
 dev-util/pwndbg/metadata.xml           | 20 +++++++++
 dev-util/pwndbg/pwndbg-20220105.ebuild | 77 ++++++++++++++++++++++++++++++++++
 dev-util/pwndbg/pwndbg-99999999.ebuild | 77 ++++++++++++++++++++++++++++++++++
 4 files changed, 175 insertions(+)

diff --git a/dev-util/pwndbg/Manifest b/dev-util/pwndbg/Manifest
new file mode 100644
index 000000000000..1b009386b9e1
--- /dev/null
+++ b/dev-util/pwndbg/Manifest
@@ -0,0 +1 @@
+DIST pwndbg-20220105.tar.gz 8272634 BLAKE2B a221fa3af2145a819bc780f3395a168a91371ce1218dc4acfee2ac3420a78c8550c98921dbb03f4bc928cdac07fdc6bed8be7c642a5be42064492192b3443ea6 SHA512 ebb61b402bb6cbaa516c2b1d885f231f6f591c2226d02d69cdd163f674ed41aba5505e3390b47e431f93a6e5de3867feb93c2be6da03a32c5f4c7a0ff074fa08

diff --git a/dev-util/pwndbg/metadata.xml b/dev-util/pwndbg/metadata.xml
new file mode 100644
index 000000000000..707da35acff7
--- /dev/null
+++ b/dev-util/pwndbg/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person" proxied="yes">
+		<email>mario.haustein@hrz.tu-chemnitz.de</email>
+		<name>Mario Haustein</name>
+	</maintainer>
+	<maintainer type="person">
+		<email>sam@gentoo.org</email>
+		<name>Sam James</name>
+	</maintainer>
+	<longdescription>
+		pwndbg is a GDB plug-in that makes debugging with GDB suck less, with a
+		focus on features needed by low-level software developers, hardware
+		hackers, reverse-engineers and exploit developers.
+	</longdescription>
+	<upstream>
+		<remote-id type="github">pwndbg/pwndbg</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/dev-util/pwndbg/pwndbg-20220105.ebuild b/dev-util/pwndbg/pwndbg-20220105.ebuild
new file mode 100644
index 000000000000..e2218320b275
--- /dev/null
+++ b/dev-util/pwndbg/pwndbg-20220105.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..10} )
+
+inherit python-single-r1 wrapper
+
+DESCRIPTION="A GDB plug-in that makes debugging with GDB suck less"
+HOMEPAGE="https://github.com/pwndbg/pwndbg"
+
+if [[ ${PV} == "99999999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/pwndbg/pwndbg"
+else
+	MY_PV="${PV:0:4}.${PV:4:2}.${PV:6:2}"
+	SRC_URI="https://github.com/pwndbg/pwndbg/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+	S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-libs/capstone[python,${PYTHON_USEDEP}]
+		dev-python/future[${PYTHON_USEDEP}]
+		dev-python/isort[${PYTHON_USEDEP}]
+		dev-python/psutil[${PYTHON_USEDEP}]
+		dev-python/pycparser[${PYTHON_USEDEP}]
+		dev-python/pyelftools[${PYTHON_USEDEP}]
+		dev-python/python-ptrace[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+		dev-python/pygments[${PYTHON_USEDEP}]
+		dev-util/ROPgadget[${PYTHON_USEDEP}]
+		dev-util/unicorn[python,${PYTHON_USEDEP}]
+	')"
+
+src_prepare() {
+	if [[ ${PV} != *9999 ]]; then
+		sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \
+			-i pwndbg/version.py || die
+	fi
+
+	python_fix_shebang "${S}"
+	default
+}
+
+src_install() {
+	insinto /usr/share/${PN}
+	doins -r pwndbg/ gdbinit.py # ida_script.py
+
+	python_optimize "${ED}"/usr/share/${PN}
+
+	make_wrapper "pwndbg" \
+		"gdb -x \"${EPREFIX}/usr/share/${PN}/gdbinit.py\"" || die
+
+	dodoc {README,DEVELOPING,FEATURES}.md
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		einfo "\nUsage:"
+		einfo "    ~$ pwndbg <program>"
+		ewarn "\nWARNING!!!"
+		ewarn "Some pwndbg commands only works with libc debug symbols.\n"
+		ewarn "See also:"
+		ewarn " * https://github.com/pentoo/pentoo-overlay/issues/521#issuecomment-548975884"
+		ewarn " * https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html"
+		ewarn " * https://wiki.gentoo.org/wiki/Debugging"
+	fi
+}

diff --git a/dev-util/pwndbg/pwndbg-99999999.ebuild b/dev-util/pwndbg/pwndbg-99999999.ebuild
new file mode 100644
index 000000000000..e2218320b275
--- /dev/null
+++ b/dev-util/pwndbg/pwndbg-99999999.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..10} )
+
+inherit python-single-r1 wrapper
+
+DESCRIPTION="A GDB plug-in that makes debugging with GDB suck less"
+HOMEPAGE="https://github.com/pwndbg/pwndbg"
+
+if [[ ${PV} == "99999999" ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/pwndbg/pwndbg"
+else
+	MY_PV="${PV:0:4}.${PV:4:2}.${PV:6:2}"
+	SRC_URI="https://github.com/pwndbg/pwndbg/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~amd64 ~x86"
+	S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	sys-devel/gdb[python,${PYTHON_SINGLE_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-libs/capstone[python,${PYTHON_USEDEP}]
+		dev-python/future[${PYTHON_USEDEP}]
+		dev-python/isort[${PYTHON_USEDEP}]
+		dev-python/psutil[${PYTHON_USEDEP}]
+		dev-python/pycparser[${PYTHON_USEDEP}]
+		dev-python/pyelftools[${PYTHON_USEDEP}]
+		dev-python/python-ptrace[${PYTHON_USEDEP}]
+		dev-python/six[${PYTHON_USEDEP}]
+		dev-python/pygments[${PYTHON_USEDEP}]
+		dev-util/ROPgadget[${PYTHON_USEDEP}]
+		dev-util/unicorn[python,${PYTHON_USEDEP}]
+	')"
+
+src_prepare() {
+	if [[ ${PV} != *9999 ]]; then
+		sed -e "s/__version__ = '\(.*\)'/__version__ = '${PV}'/" \
+			-i pwndbg/version.py || die
+	fi
+
+	python_fix_shebang "${S}"
+	default
+}
+
+src_install() {
+	insinto /usr/share/${PN}
+	doins -r pwndbg/ gdbinit.py # ida_script.py
+
+	python_optimize "${ED}"/usr/share/${PN}
+
+	make_wrapper "pwndbg" \
+		"gdb -x \"${EPREFIX}/usr/share/${PN}/gdbinit.py\"" || die
+
+	dodoc {README,DEVELOPING,FEATURES}.md
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		einfo "\nUsage:"
+		einfo "    ~$ pwndbg <program>"
+		ewarn "\nWARNING!!!"
+		ewarn "Some pwndbg commands only works with libc debug symbols.\n"
+		ewarn "See also:"
+		ewarn " * https://github.com/pentoo/pentoo-overlay/issues/521#issuecomment-548975884"
+		ewarn " * https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html"
+		ewarn " * https://wiki.gentoo.org/wiki/Debugging"
+	fi
+}


             reply	other threads:[~2022-04-05  3:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05  3:33 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-27 16:03 [gentoo-commits] repo/gentoo:master commit in: dev-util/pwndbg/ Sam James
2022-08-31  1:24 Sam James
2022-09-30 20:39 Sam James
2022-09-30 20:39 Sam James
2022-12-10  4:35 Sam James
2022-12-21 19:29 Sam James
2022-12-26 10:19 Sam James
2023-01-27  6:31 Sam James
2023-01-27 10:11 Jakov Smolić
2023-01-31  2:01 Sam James
2023-01-31  2:01 Sam James
2023-03-04 11:24 Arthur Zamarin
2023-03-05  7:25 Joonas Niilola
2023-03-20  5:36 Sam James
2023-03-20  5:36 Sam James
2023-04-19  6:07 Sam James
2023-04-19  6:07 Sam James
2023-09-18  7:40 Sam James
2023-09-18  7:40 Sam James
2023-09-18  7:40 Sam James
2023-10-19 12:17 Sam James
2023-10-19 12:17 Sam James
2023-10-27  3:20 Sam James
2023-12-04  8:33 Sam James
2023-12-04  8:33 Sam James

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=1649128716.321df26934e943cc9a24528de15d90c5b2e76219.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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