5 Commits

Author SHA256 Message Date
3cceebeffd Update to drgn 0.1.0 2026-02-28 07:16:14 +01:00
Petr Tesarik
c8ccbd4f20 Make drgn subpackage depend on the exact version of the module
Any version will not do for the CLI. We need a compatible one.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
2025-12-18 17:43:56 +01:00
Petr Tesarik
44a63993db Exclude from build on ancient distributions
Use a dummy architecture name ("nothere") to prevent build attempts for
ancient distributions.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
2025-12-18 17:42:50 +01:00
Petr Tesarik
22af1f16e0 Restore build for older distributions
Some distributions ship with default Python < 3.8, but a newer Python
version is available through a module. The package currently does not
build at all for those distributions, but the build environment provides
a handy macro precisely for this purpose.

As a side note, primary_python is not provided either, breaking
dependencies for the CLI subpackage. Fall back to the first Python
version in %pythons in that case.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
2025-12-18 16:58:59 +01:00
Petr Tesarik
bba0fbe6f6 Do not build if Python 3.8+ is unavailable
The %{primary_python} macro is defined only for build targets which have
Python 3.8 or newer. Until a better solution is available, use this
trick to make the package unbuildable if Python is too old (rather than
fail the build).

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
2025-11-12 10:48:12 +01:00
4 changed files with 44 additions and 8 deletions

Binary file not shown.

BIN
drgn-0.1.0.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,3 +1,31 @@
-------------------------------------------------------------------
Thu Nov 6 07:05:00 UTC 2026 - Christoph Grüninger <foss@grueninger.de>
- Update to drgn 0.1.0
* drgn now provides a few built-in commands accessed by starting
a line with the % character.
* py runs Python code, allowing its output to be piped or redirected.
* sh executes a shell command.
* source runs a script.
* drgn now provides a compatibility mode with the crash utility.
* Most commands have been ported from crash.
* Ported commands also have a --drgn option that prints example
drgn code for doing the equivalent of the command.
* Crash compatibility mode can be accessed with %crash from the
drgn CLI or directly with the new drgn-crash script.
* drgn.StackFrame.source() now returns a new type,
drgn.SourceLocation, instead of a tuple.
* drgn.Program.source_location() was added. It looks up the file, line
number, column number, and function name of a given code address.
* Several methods were added to drgn.Program for searching for
certain values or patterns in memory
* drgn.Program.set_linux_kernel_custom() was added. It allows
creating a drgn.Program representing the Linux kernel that
is backed by a custom backend defined by the user, like a
remote transport.
* Linux 6.19 is now supported. Linux 7.0 is now tentatively supported.
* Many new helpers were added.
-------------------------------------------------------------------
Thu Nov 6 13:15:51 UTC 2025 - Petr Tesařík <ptesarik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-drgn
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2026 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,18 +15,21 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
%if %{undefined primary_python}
%define primary_python python3
%define first_arg() %1
%define primary_python %{first_arg %pythons}
%endif
Name: python-drgn
Version: 0.0.33
Version: 0.1.0
Release: 0
Summary: Scriptable debugger library
License: LGPL-2.1-or-later
Group: Development/Tools/Debuggers
URL: https://github.com/osandov/drgn
Source: drgn-%{version}.tar.xz
Source: drgn-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{pythons}
@@ -41,6 +44,11 @@ BuildRequires: libtool
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
# Do not even try for ancient distributions
%if %{undefined pythons}
ExclusiveArch: nothere
%endif
%python_subpackages
%description
@@ -54,7 +62,7 @@ This package contains the Python module.
Summary: Scriptable debugger CLI
Conflicts: %{python_module drgn < 0.0.33}
Provides: %{python_module drgn:/usr/bin/drgn}
Requires: %{primary_python}-drgn
Requires: %{primary_python}-drgn = %{version}
%description -n drgn
drgn (pronounced “dragon”) is a debugger with an emphasis on