commit 8dcb34b911ab088a2d63110b8231b167d269880eb9e606cb54c2810fa14f04db Author: VaiTon Date: Wed Apr 16 21:37:17 2025 +0200 Initial packaging at version 0.8.0.post2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cmakelist-fixes.patch b/cmakelist-fixes.patch new file mode 100644 index 0000000..1b45fcc --- /dev/null +++ b/cmakelist-fixes.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db10f6c..d5a875a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -198,7 +198,7 @@ nanobind_add_stub( + ) + + # Check if in the libdwarf include path we find the substring libwarf-0 +-if (DWARF_HEADER MATCHES "libdwarf-0") ++if (true) + # Add the libdebug_debug_sym_parser module, using the new libdwarf-0 + nanobind_add_module( + libdebug_debug_sym_parser +@@ -245,7 +245,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "i386" + # Define the custom command that runs the generator and writes the output + add_custom_command( + OUTPUT ${XSAVE_LAYOUT_OUTPUT} +- COMMAND autogenerate_xsave_layout > ${XSAVE_LAYOUT_OUTPUT} ++ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/generated && ./autogenerate_xsave_layout > ${XSAVE_LAYOUT_OUTPUT} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Generating fpregs_xsave_layout.h using autogenerate_xsave_layout" + VERBATIM +@@ -253,6 +253,7 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "i386" + + # Create a custom target to generate the xsave layout header + add_custom_target(generate_xsave_layout ALL DEPENDS ${XSAVE_LAYOUT_OUTPUT}) ++ add_dependencies(generate_xsave_layout autogenerate_xsave_layout) + + # Make sure your main target depends on the generated file + add_dependencies(libdebug_ptrace_binding generate_xsave_layout) diff --git a/libdebug-0.8.0.post2.tar.gz b/libdebug-0.8.0.post2.tar.gz new file mode 100644 index 0000000..163c3b6 --- /dev/null +++ b/libdebug-0.8.0.post2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7c3d58800c103bd57c87efa5ec093fb36ee8eebb3ba0903ceb992c6d705b138 +size 126400 diff --git a/python-libdebug.changes b/python-libdebug.changes new file mode 100644 index 0000000..cb7ee40 --- /dev/null +++ b/python-libdebug.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Wed Apr 16 17:19:02 UTC 2025 - Eyad Issa + +- Initial packaging at version 0.8.0 diff --git a/python-libdebug.spec b/python-libdebug.spec new file mode 100644 index 0000000..6d77e37 --- /dev/null +++ b/python-libdebug.spec @@ -0,0 +1,84 @@ +# +# spec file for package python-libdebug +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-libdebug +Version: 0.8.0.post2 +Release: 0 +Summary: A Python library for the debugging of binary executables +License: MIT +URL: https://libdebug.org +Source: https://files.pythonhosted.org/packages/source/l/libdebug/libdebug-%{version}.tar.gz +Patch1: cmakelist-fixes.patch +BuildRequires: python-rpm-macros +BuildRequires: gcc-c++ +BuildRequires: ninja +BuildRequires: binutils-devel +BuildRequires: libelf-devel +BuildRequires: libdwarf-devel +BuildRequires: %{python_module devel} +BuildRequires: %{python_module nanobind >= 1.3.2} +BuildRequires: %{python_module nanobind-devel >= 1.3.2} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module scikit-build-core >= 0.4.3} +BuildRequires: %{python_module typing_extensions} +# SECTION test requirements +BuildRequires: %{python_module prompt-toolkit} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pyelftools} +BuildRequires: %{python_module requests} +# /SECTION +BuildRequires: fdupes +Requires: python-prompt-toolkit +Requires: python-psutil +Requires: python-pyelftools +Requires: python-requests +Suggests: python-rich + +%python_subpackages + +%description +libdebug is an open source Python library for programmatic debugging of userland binary executables. +libdebug provides a comprehensive set of building blocks designed to facilitate the development of +debugging tools for different purposes, including reverse engineering and exploitation. + +%package devel +Summary: Development files for libdebug + +%description devel +libdebug is an open source Python library for programmatic debugging of userland binary executables. +libdebug provides a comprehensive set of building blocks designed to facilitate the development of +debugging tools for different purposes, including reverse engineering and exploitation. + +%prep +%autosetup -p1 -n libdebug-%{version} + +%build +export CMAKE_GENERATOR=Ninja +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{_libdir}/python%{python_version}/site-packages/ + +%files %{python_files devel} +%doc README.md +%license LICENSE +%{_libdir}/python%{python_version}/site-packages/libdebug +%{_libdir}/python%{python_version}/site-packages/libdebug-%{version}.dist-info + +%changelog