# 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.0.27+85.g2150a90a Release: 1.20240927233856115112.main.85.g2150a90a%{?dist} Summary: Programmable debugger License: LGPL-2.1-or-later URL: https://github.com/osandov/drgn Source0: drgn-0.0.27+85.g2150a90a.tar.gz BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %if %{with docs} BuildRequires: sed BuildRequires: python3dist(sphinx) BuildRequires: python3-docs %endif %if %{with tests} BuildRequires: python3dist(pytest) %endif BuildRequires: gcc-c++ BuildRequires: make BuildRequires: bzip2-devel BuildRequires: elfutils-devel BuildRequires: libkdumpfile-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} %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.0.27+85.g2150a90a -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 %build # verbose build V=1 %py3_build %if %{with docs} # generate html docs PYTHONPATH=${PWD} sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %endif %install %py3_install mkdir -p %{buildroot}%{_datadir}/drgn cp -PR contrib tools %{buildroot}%{_datadir}/drgn %if %{with tests} %check %pytest %endif %files -n %{pypi_name} %license COPYING %license LICENSES %doc README.rst %{_bindir}/drgn %{_datadir}/drgn %{python3_sitearch}/_%{pypi_name}.pyi %{python3_sitearch}/_%{pypi_name}.cpython*.so %{python3_sitearch}/%{pypi_name} %{python3_sitearch}/_%{pypi_name}_util %{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info %if %{with docs} %files -n %{pypi_name}-doc %license COPYING %license LICENSES %doc html %endif %changelog * Fri Sep 27 2024 Packit - 0.0.27+85.g2150a90a-1.20240927233856115112.main.85.g2150a90a - vmtest.githubapi: add environment variable for trusting cache (Omar Sandoval) - tests: add missing super().setUpClass() calls (Omar Sandoval) - Add name to drgn.Thread (Ryan Wilson) - docs: fix undefined label: 'architecture support matrix' (Omar Sandoval) - _drgn_util.platform: add back dropped comment about mips (Omar Sandoval) - _drgn_util.platform: add back missing architecture syscall numbers (Omar Sandoval) - libdrgn: update documentation for adding new architecture support (Omar Sandoval) - tests: skip tests that don't work with high memory (Omar Sandoval) - drgn.helpers.linux.mm: document virtual address translation failure cases (Omar Sandoval) - tests: put our own slab object on the stack for print_annotated_stack() (Omar Sandoval) - vmtest.vm: pass initial window size to guest (Omar Sandoval) - vmtest: clarify kernel version support checks (Omar Sandoval) - tests: kmod: only compile kmodify test code on x86-64 (Omar Sandoval) - python: add missing docstrings for helpers implemented in libdrgn (Omar Sandoval) - drgn.helpers.linux.sched: add task_thread_info() helper (Omar Sandoval) - vmtest.config: disable HIGHMEM and use VMSPLIT_2G for Arm default and alternative kernels (Omar Sandoval) - vmtest.vm: fix --{build,insert}-test-kmod for local kernels in separate rootfs (Omar Sandoval) - vmtest.vm: support passing extra options to QEMU (Omar Sandoval) - pre-commit: update hooks and apply fixes (Omar Sandoval) - helpers.linux.fs: support d_path() without vfsmount (Stephen Brennan) - contrib/dm_crypt_key.py: handle kernels before v6.7 (Omar Sandoval) - drgn.helpers.experimental.kmodify: fix typos in docs (Omar Sandoval) - Add experimental helpers for calling kernel functions and writing to memory (Omar Sandoval) - _drgn_util.platform: add finit_module to SYS (Omar Sandoval) - Move tests/elf.py to _drgn_util/elf.py (Omar Sandoval) - Move machine name and syscall numbers to new _drgn_util.platform module (Omar Sandoval) - drgndoc: allow formatting __init__() signature together with class (Omar Sandoval) - libdrgn: dwarf_info: resolve address of inline functions with out-of-line instances (Omar Sandoval) - python: clarify literal TypeError message (Omar Sandoval) - Add alignof() (Omar Sandoval) - libdrgn: platform: add alignment requirements to struct drgn_architecture_info (Omar Sandoval) - libdrgn: store DWARF DIE that type came from (Omar Sandoval) - libdrgn: split struct, union, class, enum, and function attributes out of drgn_type (Omar Sandoval) - libdrgn: never deduplicate struct, union, class, enum, or function types (Omar Sandoval) - libdrgn: combine booleans in struct drgn_type into flag bitmask (Omar Sandoval) - libdrgn: remove extra _private struct in drgn_type (Omar Sandoval) - libdrgn: remove drgn_type definition from public header (Omar Sandoval) - libdrgn: add drgn_internal.h wrapper around drgn.h (Omar Sandoval) - libdrgn: dwarf_info: check bounds in drgn_dwarf_index_find_cu() (Omar Sandoval) - libdrgn: add generic binary search macros (Omar Sandoval) - libdrgn: add scope guard for limiting recursion (Omar Sandoval) - docs: link to C documentation of offsetof(), not C++ (Omar Sandoval) - python: annotate positional-only parameters using __ syntax (Omar Sandoval) - drgndoc: recognize and re-format __ positional-only syntax (Omar Sandoval) - docs: handle Doxygen renaming "Modules" to "Topics" (Omar Sandoval) - libdrgn: fix include-what-you-use warnings (Omar Sandoval) - Add implicit_convert() (Omar Sandoval) - libdrgn: language_c: fix casting to bool (Omar Sandoval) - libdrgn: language_c: allow casting objects to void (Omar Sandoval) - libdrgn: language_c: allow drgn_object_bool() on functions (Omar Sandoval) - libdrgn: language_c: fix drgn_object_bool() on array with zero address (Omar Sandoval) - libdrgn: add drgn_2_qualified_types_error() (Omar Sandoval) - libdrgn: add drgn_operand_type_qualified() (Omar Sandoval) - libdrgn: make SWITCH_ENUM() less intrusive (Omar Sandoval) - Remove some complex type leftovers (Omar Sandoval) - Update ELF and DWARF constants and remove str() method (Omar Sandoval) - python: make Object.from_bytes_ keyword-only arguments actually keyword-only (Omar Sandoval) - python: annotate Object.from_bytes_() with collections.abc.Buffer (Omar Sandoval) - libdrgn: allow formatting absent void objects (Omar Sandoval) - README.rst: add Gentoo build dependency instructions (Omar Sandoval) - README.rst: add Gentoo package (Sam James) - Add 6.11 to supported kernels (Omar Sandoval) - libdrgn: fix bashism in M4 macro (Sam James) - packit: reenable s390x ELN builds (Omar Sandoval) - contrib: add script to dump filesystem details in btrfs fs_uuids cache (Srivathsa Dara) - drgn.helpers.common.memory: fix identify_address vmap identification with CONFIG_VMAP_STACK=n (Omar Sandoval) - tools/fsrefs.py: add mode to find references to a filesystem on a block device (Omar Sandoval) - CI, vmtest: install btrfs-progs (Omar Sandoval) - tests: load kernel modules required for tests in test code, not vmtest (Omar Sandoval) - contrib/vmallocinfo: add scripts to dump vmallocinfo (Kuan-Ying Lee) - contrib/slabinfo: add scripts to dump slabinfo (Kuan-Ying Lee) - drgn.internal.sudohelper: pass privileged command as string instead of path (Omar Sandoval) - tests: Fix print_annotated_memory test on SLOB (Stephen Brennan) - mm, slab: Fix test failures on kernels with SLOB (Stephen Brennan) - setup.py, CI: avoid ENOSPC on Github Actions (Stephen Brennan) - CI: add support for testing all kernel flavors (Stephen Brennan) - setup.py: allow selecting an alternate flavor (Stephen Brennan) - setup.py: explicitly use default kernel flavor for test -K (Omar Sandoval) - Add linux kernel module helpers (Stephen Brennan) - tests/linux_kernel: Skip TestStackDepot unless test kmod is present (Sourabh Jain) - contrib: bpf_inspect: adjust syntax for python < 3.12 (Stephen Brennan) - contrib/bpf_inspect.py: show subprogs of prog (Leon Hwang) - contrib/bpf_inspect.py: show used maps of prog (Leon Hwang) - packit: disable ELN i386 builds (Omar Sandoval) - docs: fix date on 0.0.27 release highlights (Omar Sandoval)