From a56307ebf7ba912c029784720658931309a7c480 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 27 Dec 2010 05:50:41 +0100 Subject: [PATCH] - Provide stub %{_sysconfdir}/gdbinit (BZ 651232). --- gdb.spec | 15 ++++++++++++++- gdbinit | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 gdbinit diff --git a/gdb.spec b/gdb.spec index a0fb42c..2610d48 100644 --- a/gdb.spec +++ b/gdb.spec @@ -27,7 +27,7 @@ Version: 7.2.50.20101117 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 3%{?_with_upstream:.upstream}%{dist} +Release: 4%{?_with_upstream:.upstream}%{dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and GFDL and BSD and Public Domain Group: Development/Debuggers @@ -87,6 +87,10 @@ Source2: gdb-orphanripper.c #=push Source3: gdb-gstack.man +# /etc/gdbinit (from Debian but with Fedora compliant location). +#=fedora +Source4: gdbinit + # Work around out-of-date dejagnu that does not have KFAIL #=drop: That dejagnu is too old to be supported. Patch1: gdb-6.3-rh-dummykfail-20041202.patch @@ -827,6 +831,7 @@ CFLAGS="$CFLAGS -O0 -ggdb2" --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} \ + --with-system-gdbinit=%{_sysconfdir}/gdbinit \ --with-gdb-datadir=%{_datadir}/gdb \ --with-pythondir=%{_datadir}/gdb/python \ --enable-gdb-build-warnings=,-Wno-unused \ @@ -1037,6 +1042,9 @@ ln -sf gdb $RPM_BUILD_ROOT%{_prefix}/bin/gdbtui cmp $RPM_BUILD_ROOT%{_mandir}/*/gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1 ln -sf gdb.1 $RPM_BUILD_ROOT%{_mandir}/*/gdbtui.1 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d +sed 's#%%{_sysconfdir}#%{_sysconfdir}#g' <%{SOURCE4} >$RPM_BUILD_ROOT%{_sysconfdir}/gdbinit + for i in `find $RPM_BUILD_ROOT%{_datadir}/gdb/python/gdb -name "*.py"` do # Files could be also patched getting the current time. @@ -1105,6 +1113,8 @@ fi %{_bindir}/gcore %{_bindir}/gdb %{_bindir}/gdbtui +%{_sysconfdir}/gdbinit +%{_sysconfdir}/gdbinit.d %{_mandir}/*/gdb.1* %{_mandir}/*/gdbtui.1* %if 0%{!?_with_upstream:1} @@ -1137,6 +1147,9 @@ fi %endif %changelog +* Mon Dec 27 2010 Jan Kratochvil - 7.2.50.20101117-4.fc15 +- Provide stub %%{_sysconfdir}/gdbinit (BZ 651232). + * Mon Dec 27 2010 Jan Kratochvil - 7.2.50.20101117-3.fc15 - Fix ppc* compilation of PRPSINFO in the core files (BZ 662995, for BZ 254229). - Fix (disable) non-x86* compilation of libinproctrace.so (for BZ 662995). diff --git a/gdbinit b/gdbinit new file mode 100644 index 0000000..3bafc14 --- /dev/null +++ b/gdbinit @@ -0,0 +1,4 @@ +# System-wide GDB initialization file. + +# FIXME: provide a wildcard. +source %{_sysconfdir}/gdbinit.d/gdb-heap.py