summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-drgn.spec132
-rw-r--r--sources1
3 files changed, 134 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..4620548 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/drgn-0.0.22.tar.gz
diff --git a/python-drgn.spec b/python-drgn.spec
new file mode 100644
index 0000000..3c5e573
--- /dev/null
+++ b/python-drgn.spec
@@ -0,0 +1,132 @@
+%global _empty_manifest_terminate_build 0
+Name: python-drgn
+Version: 0.0.22
+Release: 1
+Summary: Programmable debugger
+License: LGPL-2.1-or-later
+URL: https://github.com/osandov/drgn
+Source0: https://mirrors.aliyun.com/pypi/web/packages/75/31/70127c7977376fed408a36934a1dcbf2d947f9322af2036419b2c8a787de/drgn-0.0.22.tar.gz
+BuildArch: noarch
+
+
+%description
+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. For example, you can debug the Linux kernel:
+ >>> from drgn.helpers.linux import list_for_each_entry
+ >>> for mod in list_for_each_entry('struct module',
+ (char [56])"snd"
+ (char [56])"evdev"
+ (char [56])"i915"
+Although other debuggers like `GDB <https://www.gnu.org/software/gdb/>`_ have
+scripting support, drgn aims to make scripting as natural as possible so that
+debugging feels like coding. This makes it well-suited for introspecting the
+complex, inter-connected state in large programs.
+Additionally, drgn is designed as a library that can be used to build debugging
+and introspection tools; see the official `tools
+<https://github.com/osandov/drgn/tree/main/tools>`_.
+drgn was developed at `Meta <https://opensource.fb.com/>`_ for debugging the
+Linux kernel (as an alternative to the `crash
+<https://crash-utility.github.io/>`_ utility), but it can also debug userspace
+programs written in C. C++ support is in progress.
+Documentation can be found at `drgn.readthedocs.io
+<https://drgn.readthedocs.io>`_.
+
+%package -n python3-drgn
+Summary: Programmable debugger
+Provides: python-drgn
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-drgn
+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. For example, you can debug the Linux kernel:
+ >>> from drgn.helpers.linux import list_for_each_entry
+ >>> for mod in list_for_each_entry('struct module',
+ (char [56])"snd"
+ (char [56])"evdev"
+ (char [56])"i915"
+Although other debuggers like `GDB <https://www.gnu.org/software/gdb/>`_ have
+scripting support, drgn aims to make scripting as natural as possible so that
+debugging feels like coding. This makes it well-suited for introspecting the
+complex, inter-connected state in large programs.
+Additionally, drgn is designed as a library that can be used to build debugging
+and introspection tools; see the official `tools
+<https://github.com/osandov/drgn/tree/main/tools>`_.
+drgn was developed at `Meta <https://opensource.fb.com/>`_ for debugging the
+Linux kernel (as an alternative to the `crash
+<https://crash-utility.github.io/>`_ utility), but it can also debug userspace
+programs written in C. C++ support is in progress.
+Documentation can be found at `drgn.readthedocs.io
+<https://drgn.readthedocs.io>`_.
+
+%package help
+Summary: Development documents and examples for drgn
+Provides: python3-drgn-doc
+%description help
+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. For example, you can debug the Linux kernel:
+ >>> from drgn.helpers.linux import list_for_each_entry
+ >>> for mod in list_for_each_entry('struct module',
+ (char [56])"snd"
+ (char [56])"evdev"
+ (char [56])"i915"
+Although other debuggers like `GDB <https://www.gnu.org/software/gdb/>`_ have
+scripting support, drgn aims to make scripting as natural as possible so that
+debugging feels like coding. This makes it well-suited for introspecting the
+complex, inter-connected state in large programs.
+Additionally, drgn is designed as a library that can be used to build debugging
+and introspection tools; see the official `tools
+<https://github.com/osandov/drgn/tree/main/tools>`_.
+drgn was developed at `Meta <https://opensource.fb.com/>`_ for debugging the
+Linux kernel (as an alternative to the `crash
+<https://crash-utility.github.io/>`_ utility), but it can also debug userspace
+programs written in C. C++ support is in progress.
+Documentation can be found at `drgn.readthedocs.io
+<https://drgn.readthedocs.io>`_.
+
+%prep
+%autosetup -n drgn-0.0.22
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-drgn -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.22-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..90a3d09
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+5d920199890d34240a7006e0dbc1c82b drgn-0.0.22.tar.gz