Date: Wed, 10 Aug 2022 16:07:07 GMT From: Gleb Popov <arrowd@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: bf69c3fc581a - main - sysutils/py-elf_diff: Perform binary diff on ELF files. Message-ID: <202208101607.27AG77QA072422@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=bf69c3fc581a7aaf2a05ade4d0338a10f4ec7042 commit bf69c3fc581a7aaf2a05ade4d0338a10f4ec7042 Author: Kubilay Kocak <koobs@FreeBSD.org> AuthorDate: 2022-08-09 18:09:10 +0000 Commit: Gleb Popov <arrowd@FreeBSD.org> CommitDate: 2022-08-10 16:06:39 +0000 sysutils/py-elf_diff: Perform binary diff on ELF files. --- sysutils/Makefile | 1 + sysutils/py-elf_diff/Makefile | 36 ++++++++++++++++++++++ sysutils/py-elf_diff/distinfo | 3 ++ ...-tests_test__cases_test__command__line__args.py | 27 ++++++++++++++++ sysutils/py-elf_diff/pkg-descr | 6 ++++ 5 files changed, 73 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index a58f4396f6aa..e8df5a101d6a 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1058,6 +1058,7 @@ SUBDIR += py-dlipower SUBDIR += py-docker SUBDIR += py-drmaa + SUBDIR += py-elf_diff SUBDIR += py-execnet SUBDIR += py-filelike SUBDIR += py-filelock diff --git a/sysutils/py-elf_diff/Makefile b/sysutils/py-elf_diff/Makefile new file mode 100644 index 000000000000..dd250a5a199c --- /dev/null +++ b/sysutils/py-elf_diff/Makefile @@ -0,0 +1,36 @@ +PORTNAME= elf_diff +DISTVERSIONPREFIX=v +DISTVERSION= 0.6.0 +CATEGORIES= sysutils python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= arrowd@FreeBSD.org +COMMENT= Tool to Compare Elf Binaries + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools-git>0:devel/py-setuptools-git@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}progressbar2>0:misc/py-progressbar2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}anytree>0:devel/py-anytree@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dict2xml>0:textproc/py-dict2xml@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}deepdiff>0:devel/py-deepdiff@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}beautifulsoup>0:www/py-beautifulsoup@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}gitpython>0:devel/py-gitpython@${PY_FLAVOR} \ + git:devel/git + +USES= python:3.6-3.10 +USE_GITHUB= yes +USE_PYTHON= autoplist concurrent distutils + +GH_ACCOUNT= noseglasses + +BINARY_ALIAS= objdump=llvm-objdump +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} tests/test_main.py + +.include <bsd.port.mk> diff --git a/sysutils/py-elf_diff/distinfo b/sysutils/py-elf_diff/distinfo new file mode 100644 index 000000000000..a16a9077d572 --- /dev/null +++ b/sysutils/py-elf_diff/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1655946961 +SHA256 (noseglasses-elf_diff-v0.6.0_GH0.tar.gz) = 01b855886a51d2422ac90b245ed213c27f9cd388b46e0bb2dac8e7f8b4f5a4c3 +SIZE (noseglasses-elf_diff-v0.6.0_GH0.tar.gz) = 887070 diff --git a/sysutils/py-elf_diff/files/patch-tests_test__cases_test__command__line__args.py b/sysutils/py-elf_diff/files/patch-tests_test__cases_test__command__line__args.py new file mode 100644 index 000000000000..2b7796167c3c --- /dev/null +++ b/sysutils/py-elf_diff/files/patch-tests_test__cases_test__command__line__args.py @@ -0,0 +1,27 @@ +# test_{new,old}_mangling_file spins on cpu/hangs +# patch them out for now + +--- tests/test_cases/test_command_line_args.py.orig 2021-12-21 08:01:58 UTC ++++ tests/test_cases/test_command_line_args.py +@@ -305,10 +305,6 @@ class TestCommandLineArgs(ElfDiffExecutionMixin, TestC + f.write("Some additional new info") + self.runSimpleTest([("new_info_file", new_info_file)]) + +- def test_new_mangling_file(self): +- self.expected_return_code = RETURN_CODE_WARNINGS_OCCURRED +- self.runSimpleTestGhs([("new_mangling_file", NEW_MANGLING_FILE_GHS)]) +- + def test_nm_command(self): + self.runSimpleTest( + [("nm_command", os.path.join(STANDARD_BIN_DIR, f"nm{EXE_SUFFIX}"))] +@@ -336,10 +332,6 @@ class TestCommandLineArgs(ElfDiffExecutionMixin, TestC + with open(old_info_file, "w") as f: + f.write("Some additional old info") + self.runSimpleTest([("old_info_file", old_info_file)]) +- +- def test_old_mangling_file(self): +- self.expected_return_code = RETURN_CODE_WARNINGS_OCCURRED +- self.runSimpleTestGhs([("old_mangling_file", OLD_MANGLING_FILE_GHS)]) + + def test_pdf_file(self): + pdf_file = "parameter_test_single_page_pair_report.pdf" diff --git a/sysutils/py-elf_diff/pkg-descr b/sysutils/py-elf_diff/pkg-descr new file mode 100644 index 000000000000..9066a4563df2 --- /dev/null +++ b/sysutils/py-elf_diff/pkg-descr @@ -0,0 +1,6 @@ +This tool compares pairs of ELF binary files and provides information +about differences in the contained symbols with respect to the space +that they occupy in program memory (functions and global data) and in +RAM (global data). + +WWW: https://github.com/noseglasses/elf_diff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208101607.27AG77QA072422>