# 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.1.0+28.gfed26d53 Release: 1.20260427193748565610.main.28.gfed26d53%{?dist} Summary: Programmable debugger License: LGPL-2.1-or-later URL: https://github.com/osandov/drgn Source0: drgn-0.1.0+28.gfed26d53.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: 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.1.0+28.gfed26d53 -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 * Mon Apr 27 2026 Packit - 0.1.0+28.gfed26d53-1.20260427193748565610.main.28.gfed26d53 - kdump: add knob to prefer built-in pgtable walk (Stephen Brennan) - Add 7.1 to supported kernels (Omar Sandoval) - drgn.helpers.linux.mm: handle compound head rework in Linux 7.1 (Omar Sandoval) - libdrgn: orc: handle ORC register renumbering in Linux 7.1 (Omar Sandoval) - drgn.helpers.linux.slab: handle SLUB per-node change in Linux 7.1 (Omar Sandoval) - drgn.helpers.linux.net: update is_pp_page() for page type change in Linux 7.1 (Omar Sandoval) - drgn.helpers.linux.fs: handle struct dentry::d_alias rename in Linux 7.1 (Omar Sandoval) - libdrgn: bitmap: mark drgn_bitmap_test_bit() bitmap parameter as const (Omar Sandoval) - Annotate Python binding constructors as __new__() (Omar Sandoval) - drgn.helpers.linux.kernfs: remove incorrect Optional annotation from kernfs_children() (Omar Sandoval) - contrib: add qemu_mem.py for faster memory access (Stephen Brennan) - libdrgn: util: work around Clang -Wstring-conversion false positive (Omar Sandoval) - drgn.helpers.experimental.kmodify: add call_functions() (Omar Sandoval) - crash: add "bpf -m" to display detailed BPF map information (Suchit Karunakaran) - libdrgn: qmp: read vmcoreinfo when possible (Omar Sandoval) - cli: add --qemu option for debugging over QMP (Omar Sandoval) - Add support for debugging QEMU guests over QMP (Omar Sandoval) - libdrgn: io: add write_all() wrapper around write(2) (Omar Sandoval) - libdrgn: add optional json-c dependency (Omar Sandoval) - tests: kernfs: disambiguate sysfs_root symbol lookup (Muskan Goyal) - drgn.helpers.linux.net: add neigh_table_for_each_neighbor (Praveen Kumar Kannoju) - libdrgn: fix parameter name fd in drgn_program_set_core_dump_fd() comment (Omar Sandoval) - tests: work around old Pyroute2 deletion bug instead of skipping (Omar Sandoval) - cli: identify kdump and makedumpfile flattened files as cores (Omar Sandoval) - kdump: include null bytes in makedumpfile flattened signature check (Omar Sandoval) - CI: update GitHub action versions to get Node.js 24 (Omar Sandoval) - Add 7.0 to supported kernels (Omar Sandoval) - Revert "packit: patch RPM spec to package drgn-crash file" (Omar Sandoval)