Initial packaging at version 0.8.0.post2

This commit is contained in:
2025-04-16 21:37:17 +02:00
commit 8dcb34b911
6 changed files with 145 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

30
cmakelist-fixes.patch Normal file
View File

@@ -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)

BIN
libdebug-0.8.0.post2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

4
python-libdebug.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Wed Apr 16 17:19:02 UTC 2025 - Eyad Issa <eyadlorenzo@gmail.com>
- Initial packaging at version 0.8.0

84
python-libdebug.spec Normal file
View File

@@ -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