# Created by pyp2rpm-3.3.5 %if 0%{?rhel} %bcond_with docs %else %bcond_without docs %endif %bcond_without tests %global pypi_name drgn %global _description %{expand: drgn (pronounced "dragon") is a debugger with an emphasis on programmability. drgn exposes the types and variables in a program for easy, expressive scripting in Python.} Name: python-%{pypi_name} Version: 0.2.0+165.g8817568c Release: 1.20260806070320232148.main.165.g8817568c%{?dist} Summary: Programmable debugger License: LGPL-2.1-or-later URL: https://github.com/osandov/drgn Source0: drgn-0.2.0+165.g8817568c.tar.gz BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %if %{with docs} BuildRequires: sed BuildRequires: python3dist(sphinx) BuildRequires: python3-docs BuildRequires: graphviz %endif %if %{with tests} BuildRequires: python3dist(pytest) %endif BuildRequires: gcc-c++ BuildRequires: make BuildRequires: bzip2-devel BuildRequires: elfutils-devel BuildRequires: elfutils-debuginfod-client-devel BuildRequires: json-c-devel BuildRequires: libkdumpfile-devel BuildRequires: pcre2-devel BuildRequires: zlib-devel BuildRequires: xz-devel # These are needed when building from git snapshots BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool %description %{_description} %package -n %{pypi_name} Summary: %{summary} Recommends: elfutils-debuginfod-client %description -n %{pypi_name} %{_description} %if %{with docs} %package -n %{pypi_name}-doc Summary: %{pypi_name} documentation BuildArch: noarch Requires: python3-docs %description -n %{pypi_name}-doc %{_description} This package contains additional documentation for %{pypi_name}. %endif %prep %autosetup -n drgn-0.2.0+165.g8817568c -p1 # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %if %{with docs} # Use local intersphinx inventory sed -r \ -e 's|https://docs.python.org/3|%{_docdir}/python3-docs/html|' \ -i docs/conf.py %endif # Ensure version is always set, even when building from git snapshots if [ ! -f drgn/internal/version.py ]; then echo '__version__ = "%{version}"' > drgn/internal/version.py fi %generate_buildrequires %pyproject_buildrequires %build # verbose build V=1 %pyproject_wheel %if %{with docs} # generate html docs PYTHONPATH=${PWD} sphinx-build-3 docs html # generate man pages PYTHONPATH=${PWD} sphinx-build-3 -b man docs man # remove the sphinx-build leftovers rm -rf {html,man}/.{doctrees,buildinfo} %endif %install %pyproject_install %pyproject_save_files -l drgn _drgn_util mkdir -p %{buildroot}%{_datadir}/drgn cp -PR contrib tools %{buildroot}%{_datadir}/drgn %if %{with docs} install -D -p -m 0644 man/*.1 -t %{buildroot}%{_mandir}/man1/ %endif %if %{with tests} %check %pytest %endif %files -n %{pypi_name} -f %{pyproject_files} %license LICENSES %doc README.rst %{_bindir}/drgn %{_bindir}/drgn-crash %{_datadir}/drgn %{python3_sitearch}/_%{pypi_name}.pyi %{python3_sitearch}/_%{pypi_name}.cpython*.so %if %{with docs} %{_mandir}/man1/drgn*.1* %files -n %{pypi_name}-doc %license COPYING %license LICENSES %doc html %endif %changelog * Thu Aug 06 2026 Packit - 0.2.0+165.g8817568c-1.20260806070320232148.main.165.g8817568c - libdrgn: python: fix use-after-free walking logger parents (Omar Sandoval) - libdrgn: memory_reader: always set *gap_ret in refill() (Omar Sandoval) - libdrgn: python: add missing error check in byteorder_converter() (Omar Sandoval) - libdrgn: object: don't read uninitialized value in UNARY_OP_SIGNED_2C() (Omar Sandoval) - libdrgn: dwarf_info: don't truncate DW_AT_byte_size to int (Omar Sandoval) - libdrgn: c: reject invalid octal digits (Omar Sandoval) - libdrgn: c: accept uppercase 0X hexadecimal prefix (Omar Sandoval) - libdrgn: c: fix parsing of hexadecimal digits a-f (Omar Sandoval) - libdrgn: debug_info: fix overlap check for module address range starting before all others (Omar Sandoval) - libdrgn: c: fix formatting of function returning pointer to function or array (Omar Sandoval) - libdrgn: linux_kernel: handle duplicate module names in kmod walk (Omar Sandoval) - libdrgn: python: set SourceLocation_type to new reference (Omar Sandoval) - libdrgn: linux_kernel: fix double-close of fd in kernel_module_set_section_addresses_live() (Omar Sandoval) - libdrgn: program: match CORE note name exactly (Omar Sandoval) - libdrgn: linux_kernel: fix ignored error/leak in kernel_module_set_section_addresses() (Omar Sandoval) - libdrgn: debug_info: avoid undefined behavior on empty .gnu_debugaltlink (Omar Sandoval) - libdrgn: stack_trace: fix free of uninitialized pointer (Omar Sandoval) - libdrgn: program: fix memory leak on multiple NT_PRPSINFO (Omar Sandoval) - libdrgn: dwarf_info: fix merging DWARF abbreviation skip instructions (Omar Sandoval) - libdrgn: debug_info: free module split DWARF file table (Omar Sandoval) - libdrgn: debug_info: fix Elf/Dwarf handle double-free on split files (Omar Sandoval) - libdrgn: dwarf_info: fix leak of index_cu_lookup (Omar Sandoval) - libdrgn: python: fix reentrancy in LazyObject_get_borrowed() (Omar Sandoval) - libdrgn: orc_info: fix ORC entry indexing in remove_fdes_from_orc() (Omar Sandoval) - libdrgn: debug_info: use _cleanup_ for mapped_file_segments (Omar Sandoval) - libdrgn: debug_info: track map_files sort order accurately (Omar Sandoval) - libdrgn: qmp: don't overflow json_tokener_parse_ex() int len (Omar Sandoval) - libdrgn: dwarf_info: don't pass NULL to qsort() for empty CFI (Omar Sandoval) - libdrgn: program: check for virtual address segments in drgn_program_set_linux_kernel_custom() (Omar Sandoval) - libdrgn: python: fix serializing 32-bit float (Omar Sandoval) - libdrgn: qmp: don't clobber program in set_qemu_qmp() if already initialized (Omar Sandoval) - libdrgn: aarch64: avoid undefined left shift in untagged_addr_aarch64() (Omar Sandoval) - libdrgn: python: fix Object.value_() with incomplete members (Omar Sandoval) - libdrgn: c: fix DRGN_FORMAT_OBJECT_IMPLICIT_MEMBERS with incomplete members (Omar Sandoval) - libdrgn: object: fix getting incomplete member of value (Omar Sandoval) - libdrgn: fix VMCOREINFO leak in drgn_program_set_linux_kernel_custom() (Omar Sandoval) - libdrgn: object: fix leak in drgn_object_convert_{signed,unsigned,float}() (Omar Sandoval) - libdrgn: python: fix creating compound value with incomplete member (Omar Sandoval) - libdrgn: fix drgn_filename_matches() with NULL needle (Omar Sandoval) - libdrgn: object: don't use drgn_object_value_unsigned() for pointers (Omar Sandoval) - libdrgn: dwarf_info: handle enum type declaration with enumerators (Omar Sandoval) - libdrgn: linux_kernel: fix out of bounds reads in drgn_program_parse_vmcoreinfo() (Omar Sandoval) - libdrgn: python: fix memory leak in py_symbol_find_fn() (Omar Sandoval) - libdrgn: python: fix unset sym->lifetime in py_symbol_find_fn() (Omar Sandoval) - libdrgn: python: add missing PyImport_ImportModule() error check in add_WantedSupplementaryFile() (Omar Sandoval) - libdrgn: python: add missing PyErr_NoMemory() in Program_init_logging() (Omar Sandoval) - libdrgn: python: add missing PyErr_NoMemory() in DEFINE_PROGRAM_FINDER_METHODS (Omar Sandoval) - libdrgn: python: add missing set_drgn_error() in StackFrame_contains() (Omar Sandoval) - libdrgn: python: add missing set_drgn_error() in serialize_compound_value() (Omar Sandoval) - libdrgn: python: fix ObjectNotFoundError() call without name (Omar Sandoval) - libdrgn: python: fix use-after-free when using default_prog directly (Omar Sandoval) - libdrgn: debug_info: fix assertion on overlapping address ranges (Omar Sandoval) - libdrgn: stack_trace: fix memory leak when hitting iteration limit (Omar Sandoval) - libdrgn: stack_trace: fix double-free in drgn_stack_trace_add_frames() error path (Omar Sandoval) - libdrgn: object: avoid undefined floating-point to integer conversions (Omar Sandoval) - libdrgn: c: avoid unnecessary initializer formatting attempts (Omar Sandoval) - libdrgn: debug_info: fix drgn_load_module_debug_info() wanted logging (Omar Sandoval) - libdrgn: symbol: remove redundant num_syms check in drgn_symbol_index_init() (Omar Sandoval) - libdrgn: don't return error if malloc(0) returns NULL (Omar Sandoval) - libdrgn: qmp: don't pass NULL to memchr() (Omar Sandoval) - libdrgn: symbol: check binding and kind validity in drgn_symbol_create() (Omar Sandoval) - libdrgn: object: avoid signed integer overflow in drgn_object_slice() (Omar Sandoval) - libdrgn: python: don't truncate symbol finder address on ILP32 (Omar Sandoval) - libdrgn: python: don't return success from Module_set_object() with error set (Omar Sandoval) - libdrgn: python: don't leak big integer value in DrgnObject_value_impl() (Omar Sandoval) - libdrgn: python: handle allocation failure from TypeKindSet tp_alloc() (Omar Sandoval) - libdrgn: linux_kernel: prevent ilog2(0) on invalid sizeof(struct mem_section) (Omar Sandoval) - libdrgn: object: avoid -INT64_MIN in multiplication and pointer arithmetic (Omar Sandoval) - libdrgn: dwarf_info: avoid INT64_MIN / -1 in DWARF expression (Omar Sandoval) - libdrgn: object: avoid INT64_MIN / -1, % -1 on object div/mod (Omar Sandoval) - libdrgn: python: check allocation failure in Register_get_names() (Omar Sandoval) - libdrgn: kallsyms: fix inconsistent name length (Stephen Brennan) - libdrgn: python: harden serialize_compound_value() against item list changing (Omar Sandoval) - libdrgn: object: limit pointer bit size (Omar Sandoval) - libdrgn: cast function arguments to unsigned char (Omar Sandoval) - libdrgn: symbol: avoid overflow when iterating up to symbol index num_syms (Omar Sandoval) - libdrgn: elf_file: don't pass NULL to memrchr() (Omar Sandoval) - libdrgn: orc_info: bounds check module num_orcs (Omar Sandoval) - libdrgn: linux_kernel: fix out of bounds read on absurd nr_cpu_ids (Omar Sandoval) - libdrgn: python: harden Program_stack_trace_from_pcs() against list changing (Omar Sandoval) - libdrgn: python: replace direct index_converter() calls (Omar Sandoval) - libdrgn: python: check malloc() success in Program_stack_trace_from_pcs() (Omar Sandoval) - libdrgn: python: harden serialize_array_value() against list changing (Omar Sandoval) - libdrgn: stack_trace: add missing drgn_register_state_create_impl() failure checks (Omar Sandoval) - libdrgn: use _cleanup_ for stack traces (Omar Sandoval) - libdrgn: use _cleanup_ for CFI rows (Omar Sandoval) - libdrgn: program: handle AT_PHNUM > UINT16_MAX (Omar Sandoval) - libdrgn: kallsyms: use size_t consistently for num_syms iterations (Omar Sandoval) - libdrgn: kallsyms: fix token index bounds check (Omar Sandoval) - libdrgn: kallsyms: fix token index byte swap loop bound (Omar Sandoval) - libdrgn: python: fix non-standard float serialization (Omar Sandoval) - libdrgn: fix >64-bit pointer object handling (Omar Sandoval) - libdrgn: replace drgn_program_element_info() with drgn_type_element_info() (Omar Sandoval) - vmtest: roll vmtest-build back to Ubuntu 22.04 (Omar Sandoval) - libdrgn: memory_reader: fix undersized buffer in regex memory searcher (Omar Sandoval) - libdrgn: dwarf_info: validate .debug_str existence for DW_FORM_strx* (Omar Sandoval) - libdrgn: elf_symtab: reject ET_REL .gnu_debugdata (Omar Sandoval) - libdrgn: deduplicate _cleanup_elf_end_ (Omar Sandoval) - libdrgn: elf_symtab: fix double-free in load_gnu_debugdata_file() (Omar Sandoval) - libdrgn: linux_kernel: fix incorrect ENOMEM check in linux_cpu_present_mask() (Omar Sandoval) - libdrgn: dwarf_info: fix infinite loop on nameless enumerator (Omar Sandoval) - libdrgn: s390x: fix size check in prstatus_get_initial_registers_s390x() (Omar Sandoval) - libdrgn: s390x: fix off-by-one index check in linux_kernel_pgtable_iterator_next_s390x() (Omar Sandoval) - libdrgn: ppc64: fix ccr read in get_initial_registers_from_struct_ppc64() (Omar Sandoval) - libdrgn: program: fix prog->aarch64_insn_pac_mask byte swap (Omar Sandoval) - ci: install libkdumpfile-dev (Omar Sandoval) - ci: update to Noble / 24.04 LTS (Stephen Brennan) - crash: port net command (Praveen Kumar Kannoju) - testsuite: Skip tests for unavailable kernel modules (Alexandra Hájková) - tests: fix btrfs fsrefs test failures with btrfs-progs >= 6.19 (Omar Sandoval) - vmtest.download: fix download_in_thread() deadlock (Omar Sandoval) - libdrgn: qmp: don't pass ROM address to dump-guest-memory (Omar Sandoval) - libdrgn: fix gap in pgtable_iterator recursion detection (Omar Sandoval) - tests: add LoongArch64 core dump platform detection test (George Guo) - libdrgn: add basic LoongArch64 architecture support (George Guo) - libdrgn: platform: mention drgn_platform_to_kdump() in architecture docs (Omar Sandoval) - libdrgn: Reflect Makefile changes in architecture docs (Charlie Jenkins) - scripts/gen_elf_compat.py: remove deprecated RISC-V relocations (Omar Sandoval) - Add 7.2 to supported kernels (Omar Sandoval) - tests: use task_group_sched_entity() in scheduler helper tests (Omar Sandoval) - drgn.helpers.linux.sched: add task_group_sched_entity() (Omar Sandoval) - crash: irq: use irq_get_nr_irqs() (Omar Sandoval) - drgn.helpers.linux.irq: add irq_get_nr_irqs() (Omar Sandoval) - libdrgn: don't underflow address_translation_depth on error (Omar Sandoval) - libdrgn: use _cleanup_ for type builders (Omar Sandoval) - libdrgn: vector: document that stolen vector can be re-inited (Omar Sandoval) - libdrgn: stash Python exception in drgn_error and translate lazily (Omar Sandoval) - libdrgn: put drgn_error code-specific members in union (Omar Sandoval) - libdrgn: use getters for drgn_error members (Omar Sandoval) - python: simplify _PyLong_AsByteArray OverflowError handling (Omar Sandoval) - tests: remove unused libdrgn ctypes wrappers (Omar Sandoval) - Allow address translation recursion once (Jimmy Brisson) - tests: fix skip_if_slob(), skip_if_highmem(), and skip_unless_sparsemem() to actually run test (Omar Sandoval) - tests: add missing nr argument in section_decode_mem_map() test (Omar Sandoval) - tests: fix crash rd -a tests (Omar Sandoval) - drgndoc: document value of TypeAlias variables (Omar Sandoval) - Add and use DRGN_ERROR_BAD_DATA/drgn.BadDataError (Omar Sandoval) - libdrgn: add and use DRGN_ERROR_RUNTIME (Omar Sandoval) - Add and use DRGN_ERROR_UNSUPPORTED_OPERATION/drgn.UnsupportedOperation (Omar Sandoval) - docs: make exception docstrings more concise (Omar Sandoval) - docs: document FaultError only in __init__() (Omar Sandoval) - drgndoc: treat __new__ the same as __init__ everywhere (Omar Sandoval) - drgndoc: support formatting call expressions (Omar Sandoval) - scripts/gen_signals.py: add comment to generated Python dicts (Omar Sandoval) - scripts/gen_signals.py: add mode to generate C for signal number to name (Omar Sandoval) - scripts/gen_signals.py: don't generate temporary variables (Omar Sandoval) - scripts/gen_signals.py: factor out definition generation (Omar Sandoval) - CI: update actions/upload-artifacts to get Node.js 24 (Omar Sandoval) - tests: set no_proxy for debuginfod tests (Omar Sandoval) - libdrgn: vector: add vector_delete() (Omar Sandoval) - drgn: crash: Add -s, -x, and -d flags to bpf command for struct inspection (Suchit Karunakaran) - s390x: Correct kdump address translation loop (Jimmy Brisson) - libdrgn: undo unintentional my_c_auto.m4 change (Omar Sandoval) - libdrgn: include in vector.h for PTRDIFF_MAX (Omar Sandoval) - libdrgn: qemu_machine_protocol: set IS_LIVE before calling drgn_program_finish_set_kernel() (Omar Sandoval) - vmtest.config: enable KGDB Kconfig options (Omar Sandoval) - libdrgn: qmp: read guest memory from QEMU process when possible (Omar Sandoval) - scripts/gen_signals.py: fix build on recent kernels (Omar Sandoval) - libdrgn: return NULL thread if not found in drgn_program_{main,crashed}_thread() (Omar Sandoval) - libdrgn: fix missing space in drgn_program_set_enabled_*_finders() (Omar Sandoval) - Fix more include-what-you-use warnings (Omar Sandoval) - python: replace drgn_in_python flag with PyEval_GetFrame() check (Omar Sandoval) - python: convert Python exceptions to drgn errors more accurately (Omar Sandoval) - libdrgn: remove extra colon from OS errors with no message (Omar Sandoval) - Fix null pointer dereference on stack_trace() of anonymous type (Omar Sandoval)