From 8ec23c811be3a209e15baa59386845e6c69fbef9 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Wed, 30 Oct 2024 16:15:35 -0700 Subject: [PATCH 1/2] Release v1.1.1 Signed-off-by: Stephen Brennan Reviewed-by: Alex Burmashev --- buildrpm/python-drgn-tools.spec | 9 ++++++++- setup.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/buildrpm/python-drgn-tools.spec b/buildrpm/python-drgn-tools.spec index 732b974..e9290c9 100644 --- a/buildrpm/python-drgn-tools.spec +++ b/buildrpm/python-drgn-tools.spec @@ -1,7 +1,7 @@ # Copyright (c) 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ Name: python-drgn-tools -Version: 1.1.0 +Version: 1.1.1 Release: 1%{?dist} Summary: Helper scripts for drgn, containing the corelens utility @@ -60,6 +60,13 @@ rm %{buildroot}/usr/bin/DRGN %{_mandir}/man1/corelens.1.gz %changelog +* Wed Oct 30 2024 Stephen Brennan - 1.1.1-1 +- Fix crash for NULL mutex owner in corelens "lock" module [Orabug: 37186686] +- Fix crash for NULL hc.uuid in dm helper [Orabug: 37170994] +- Handle circular freelists in slabinfo [Orabug: 37170864] +- Fix missing drgn dependency for OL8 [Orabug: 37126783] +- Add support for drgn 0.0.29 + * Tue Aug 27 2024 Stephen Brennan - 1.1.0-1 - Update to 1.1.0 diff --git a/setup.py b/setup.py index 573518a..36a85fc 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ long_description = "drgn helper script repository" -RELEASE_VERSION = "1.1.0" +RELEASE_VERSION = "1.1.1" PACKAGES = ["drgn_tools"] if not os.environ.get("DRGN_TOOLS_V2_OMIT"): PACKAGES.append("drgn_tools.v2") From bd446815bd3a69c765810ec12e8877754333fdc9 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Thu, 31 Oct 2024 16:10:22 -0700 Subject: [PATCH 2/2] Add the ability to build Python 3.11 and 3.12 Signed-off-by: Stephen Brennan Reviewed-by: Laurence Rochfort --- buildrpm/python-drgn-tools.spec | 92 ++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 8 deletions(-) diff --git a/buildrpm/python-drgn-tools.spec b/buildrpm/python-drgn-tools.spec index e9290c9..cee9b8b 100644 --- a/buildrpm/python-drgn-tools.spec +++ b/buildrpm/python-drgn-tools.spec @@ -1,5 +1,24 @@ # Copyright (c) 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +%if 0%{?rhel} == 8 || 0%{?rhel} == 9 +%global with_python311 1 +%global with_python312 1 +%else +%global with_python311 0 +%global with_python312 0 +%endif + +%if %{with_python311} +%global __python311 /usr/bin/python3.11 +%global python311_sitelib /usr/lib/python3.11/site-packages +%endif + +%if %{with_python312} +%global __python312 /usr/bin/python3.12 +%global python312_sitelib /usr/lib/python3.12/site-packages +%endif + + Name: python-drgn-tools Version: 1.1.1 Release: 1%{?dist} @@ -15,8 +34,20 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-wheel - -%global python_wheelname drgn_tools-%{version}-py3-none-any.whl +%if %{with_python311} +BuildRequires: python3.11-devel +BuildRequires: python3.11-setuptools +BuildRequires: python3.11-pip +BuildRequires: python3.11-wheel +%endif +%if %{with_python312} +BuildRequires: python3.12-devel +BuildRequires: python3.12-setuptools +BuildRequires: python3.12-pip +BuildRequires: python3.12-wheel +%endif + +%global platform_python %{__python3} %global _description %{expand: drgn-tools extends the drgn debugger with scripts & helpers developed by the @@ -25,13 +56,30 @@ allows users to extract diagnostic information from a kernel core dump, or from a running kernel image (via /proc/kcore).} %description %{_description} -%package -n drgn-tools -Summary: %{summary} # The drgn dependency can be fulfilled by drgn with, or without, CTF support. # However, drgn-tools is tied to specific drgn releases. -Requires: drgn >= 0.0.25, drgn < 0.0.30 +%global drgn_min 0.0.25 +%global drgn_max 0.0.30 + +%package -n drgn-tools +Summary: %{summary} +Requires: drgn >= %{drgn_min}, drgn < %{drgn_max} %description -n drgn-tools %{_description} +%if %{with_python311} +%package -n python3.11-drgn-tools +Summary: %{summary} +Requires: python3.11-drgn >= %{drgn_min}, python3.11-drgn < %{drgn_max} +%description -n python3.11-drgn-tools %{_description} +%endif + +%if %{with_python312} +%package -n python3.12-drgn-tools +Summary: %{summary} +Requires: python3.12-drgn >= %{drgn_min}, python3.12-drgn < %{drgn_max} +%description -n python3.12-drgn-tools %{_description} +%endif + %prep %autosetup -n drgn-tools-%{version} echo '__version__ = "%{version}"' > drgn_tools/_version.py @@ -39,11 +87,24 @@ rm -rf drgn_tools/v2/ %build export DRGN_TOOLS_V2_OMIT=1 -%py3_build_wheel +%py3_build %install -%py3_install_wheel %{python_wheelname} +export DRGN_TOOLS_V2_OMIT=1 +# Install alternative Python versions first, so that the corelens script points +# to the last one which is installed: the platform python. +%if %{with_python311} +%global __python3 %{__python311} +%py3_install +%endif +%if %{with_python312} +%global __python3 %{__python312} +%py3_install +%endif +%global __python3 %{platform_python} + +%py3_install gzip man/corelens.1 install -m644 -D man/corelens.1.gz %{buildroot}%{_mandir}/man1/corelens.1.gz @@ -54,11 +115,25 @@ rm %{buildroot}/usr/bin/DRGN %files -n drgn-tools %license LICENSE.txt -%{python3_sitelib}/drgn_tools-*.dist-info/ +%{python3_sitelib}/drgn_tools-*.egg-info/ %{python3_sitelib}/drgn_tools/* /usr/bin/corelens %{_mandir}/man1/corelens.1.gz +%if %{with_python311} +%files -n python3.11-drgn-tools +%license LICENSE.txt +%{python311_sitelib}/drgn_tools-*.egg-info/ +%{python311_sitelib}/drgn_tools/* +%endif + +%if %{with_python312} +%files -n python3.12-drgn-tools +%license LICENSE.txt +%{python312_sitelib}/drgn_tools-*.egg-info/ +%{python312_sitelib}/drgn_tools/* +%endif + %changelog * Wed Oct 30 2024 Stephen Brennan - 1.1.1-1 - Fix crash for NULL mutex owner in corelens "lock" module [Orabug: 37186686] @@ -66,6 +141,7 @@ rm %{buildroot}/usr/bin/DRGN - Handle circular freelists in slabinfo [Orabug: 37170864] - Fix missing drgn dependency for OL8 [Orabug: 37126783] - Add support for drgn 0.0.29 +- Add support to build for Python 3.11 and Python 3.12 [Orabug: 37229451] * Tue Aug 27 2024 Stephen Brennan - 1.1.0-1 - Update to 1.1.0