Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.1.1 #126

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 92 additions & 9 deletions buildrpm/python-drgn-tools.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
# 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.0
Version: 1.1.1
Release: 1%{?dist}
Summary: Helper scripts for drgn, containing the corelens utility

Expand All @@ -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
Expand All @@ -25,25 +56,55 @@ 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
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

Expand All @@ -54,12 +115,34 @@ 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 <[email protected]> - 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
- Add support to build for Python 3.11 and Python 3.12 [Orabug: 37229451]

* Tue Aug 27 2024 Stephen Brennan <[email protected]> - 1.1.0-1
- Update to 1.1.0

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading