# 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.21+52.g287fc84 Release: 1.20221213032140829683.main.52.g287fc84 Summary: Programmable debugger License: GPLv3+ URL: https://github.com/osandov/drgn Source0: drgn-0.0.21+52.g287fc84.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.21+52.g287fc84 -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 %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}-%{version}-py%{python3_version}.egg-info %if %{with docs} %files -n %{pypi_name}-doc %license COPYING %doc html %endif %changelog * Tue Dec 13 2022 Packit - 0.0.21+52.g287fc84-1.20221213032140829683.main.52.g287fc84 - packit: disable 32-bit ARM builds (Omar Sandoval) - vmtest: kbuild: enable transparent hugepages (Omar Sandoval) - cli: prepend current directory to sys.path in interactive mode (Omar Sandoval) - libdrgn: python: fix Py_BuildValue() type in gen_constants.py (Omar Sandoval) - libdrgn: python: don't repeat class names in gen_constants.py (Omar Sandoval) - libdrgn: python: fix path_arg leaks in Program_find_{type,object} (Omar Sandoval) - libdrgn: python: simplify path_converter() (Omar Sandoval) - libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types (Omar Sandoval) - libdrgn: dwarf_info: Support DW_TAG_GNU_template_parameter_pack (Alastair Robertson) - drgn.helpers.common.stack: fix license identifier (Omar Sandoval) - tests: fix rmmod of test kmod (Omar Sandoval) - libdrgn: platform: add documentation (especially for drgn_architecture_info) (Omar Sandoval) - libdrgn: platform: replace demangle_return_address() with demangle_cfi_registers() (Omar Sandoval) - vmtest: kbuild: enable Btrfs, ext4, and XFS (Omar Sandoval) - packit: temporarily work around examples directory (Omar Sandoval) - drgn.helpers.common.stack: add print_annotated_stack helper function (Nhat Pham) - Add missing type annotations for StackTrace dunder methods (Nhat Pham) - libdrgn: fix finding types beginning in size_t or ptrdiff_t (Omar Sandoval) - libdrgn: get .eh_frame from the correct file (Omar Sandoval) - libdrgn: debug_info: get "loaded" ELF file (Omar Sandoval) - libdrgn: bypass libdwfl with struct drgn_elf_file (Omar Sandoval) - libdrgn: debug_info: wrap ELF file information in new struct drgn_elf_file (Omar Sandoval) - libdrgn: make module vs. program platform difference more clear (Omar Sandoval) - libdrgn: dwarf_info: get default pointer size from CU (Omar Sandoval) - Add StackFrame.sp (Omar Sandoval) - contrib: make lsmod.py handle CONFIG_MODULE_UNLOAD=n (Omar Sandoval) - vmtest: build with Ubuntu 20.04 (Omar Sandoval) - vmtest: kbuild: add CONFIG_MODULE_UNLOAD=y (Omar Sandoval) - CI: pin to Ubuntu 20.04 (Omar Sandoval) - setup.py: add 6.1 to vmtest kernels (Omar Sandoval) - CI: add Python 3.11 (Omar Sandoval) - drgn.helpers.common.memory: add more slab object information to identify_address() (Omar Sandoval) - drgn.helpers.linux.slab: add slab_object_info() (Omar Sandoval) - Create contrib directory (Omar Sandoval) - tests: use test kmod for more stack trace tests (Omar Sandoval) - Support systems without qsort_r (Boris Burkov) - Bring back COPYING (Omar Sandoval) - Add StackFrame.locals() method (Stephen Brennan) - libdrgn: dwarf_info: handle DW_TAG_enumerator DIE with missing or invalid DW_AT_name (Omar Sandoval) - Add some missing copyright/license notices (Omar Sandoval) - Relicense drgn from GPLv3+ to LGPLv2.1+ (Omar Sandoval) - License tests/linux_kernel/kmod/drgn_test.c under GPL-2.0-or-later (Omar Sandoval) - Use SPDX for docs/exts/setuptools_config.py (Omar Sandoval) - Move license to LICENSES (Omar Sandoval) - libdrgn: replace copies of elfutils headers with generated files (Omar Sandoval) - libdrgn: dwarf_info: rename dw_tag_str constants (Omar Sandoval) - Update installation instructions (Michel Alexandre Salim) - libdrgn: replace BUILD_BUG_ON* with static_assert (Omar Sandoval) - helpers: slab: Add get_slab_aliases() (Stephen Brennan) - drgn.helpers.linux.kconfig: clean up exception if CONFIG_IKCONFIG=n (Omar Sandoval) - tests: make get_kconfig() test case more thorough (Omar Sandoval) - cli: print nicer messages for common errors (Omar Sandoval)