gdb: make gdb require gdb-minimal
Change-Id: Ic19e06bef52443f914f8615863cc4863e66203ca Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com> Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/21373 Tested-by: gerrit-photon <photon-checkins@vmware.com> Reviewed-by: Tapas Kundu <tkundu@vmware.com>
This commit is contained in:
parent
50d928730d
commit
30fb5f656f
|
@ -3,7 +3,7 @@
|
|||
Summary: C debugger
|
||||
Name: gdb
|
||||
Version: 11.2
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2+
|
||||
URL: http://www.gnu.org/software/%{name}
|
||||
Group: Development/Tools
|
||||
|
@ -11,7 +11,7 @@ Vendor: VMware, Inc.
|
|||
Distribution: Photon
|
||||
|
||||
Source0: http://ftp.gnu.org/gnu/gdb/%{name}-%{version}.tar.xz
|
||||
%define sha512 %{name}=07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
|
||||
%define sha512 %{name}=07e9026423438049b11f4f784d57401ece4e940570f613bd6958b3714fe7fbc2c048470bcce3e7d7d9f93331cdf3881d30dcc964cb113a071143a02b28e5b127
|
||||
|
||||
Source1: gdbinit
|
||||
|
||||
|
@ -22,19 +22,22 @@ Requires: expat
|
|||
Requires: ncurses
|
||||
Requires: python3
|
||||
Requires: xz-libs
|
||||
Requires: zlib
|
||||
|
||||
BuildRequires: expat-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-libs
|
||||
BuildRequires: xz-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: texinfo
|
||||
|
||||
%if 0%{?with_check}
|
||||
BuildRequires: dejagnu
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
%endif
|
||||
|
||||
Obsoletes: %{name}-minimal <= %{version}-%{release}
|
||||
Requires: %{name}-minimal = %{version}-%{release}
|
||||
|
||||
%description
|
||||
GDB, the GNU Project debugger, allows you to see what is going on
|
||||
|
@ -44,6 +47,7 @@ another program was doing at the moment it crashed.
|
|||
%if 0%{?build_minimal_gdb}
|
||||
%package minimal
|
||||
Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages (minimal version)
|
||||
Conflicts: %{name} < 11.2-9%{?dist}
|
||||
|
||||
%description minimal
|
||||
GDB, the GNU debugger, allows you to debug programs written in C, C++, Java, and other languages,
|
||||
|
@ -56,8 +60,8 @@ It should probably not be used by end users.
|
|||
%autosetup -p1
|
||||
|
||||
%build
|
||||
rm -rf zlib texinfo
|
||||
mkdir -p build
|
||||
|
||||
pushd build
|
||||
|
||||
sh ../configure \
|
||||
|
@ -65,7 +69,8 @@ sh ../configure \
|
|||
--build=%{_build} \
|
||||
--prefix=%{_prefix} \
|
||||
--with-system-gdbinit=%{_sysconfdir}/gdbinit \
|
||||
--with-python=%{python3}
|
||||
--with-python=%{python3} \
|
||||
--with-system-zlib
|
||||
|
||||
%make_build
|
||||
|
||||
|
@ -87,7 +92,8 @@ sh ../configure \
|
|||
--disable-inprocess-agent \
|
||||
--without-intel-pt \
|
||||
--disable-unit-tests \
|
||||
--disable-source-highlight
|
||||
--disable-source-highlight \
|
||||
--with-system-zlib
|
||||
|
||||
%make_build
|
||||
|
||||
|
@ -98,7 +104,6 @@ popd
|
|||
pushd build
|
||||
|
||||
%make_install %{?_smp_mflags}
|
||||
|
||||
rm %{buildroot}%{_infodir}/dir \
|
||||
%{buildroot}%{_libdir}/libctf-nobfd.a \
|
||||
%{buildroot}%{_libdir}/libctf.a
|
||||
|
@ -119,16 +124,16 @@ rm %{buildroot}%{_datadir}/locale/de/LC_MESSAGES/opcodes.mo \
|
|||
popd
|
||||
|
||||
%if 0%{?build_minimal_gdb}
|
||||
mkdir -p %{buildroot}/minimal-gdb
|
||||
|
||||
mkdir -p %{buildroot}/minimal-%{name}
|
||||
pushd minimal-build
|
||||
|
||||
%make_install DESTDIR=%{buildroot}/minimal-gdb %{?_smp_mflags}
|
||||
%make_install DESTDIR=%{buildroot}/minimal-%{name} %{?_smp_mflags}
|
||||
|
||||
rm -rfv %{buildroot}/minimal-gdb%{_prefix}/{include,lib*,share} \
|
||||
%{buildroot}/minimal-gdb%{_bindir}/{gcore,gdbserver,gstack,gdb-add-index,pstack,run}
|
||||
rm -rfv %{buildroot}/minimal-%{name}%{_prefix}/{include,lib*,share} \
|
||||
%{buildroot}/minimal-%{name}%{_bindir}/{gcore,gdbserver,gstack,%{name}-add-index,pstack,run}
|
||||
|
||||
mv %{buildroot}/minimal-%{name}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}.minimal
|
||||
|
||||
mv %{buildroot}/minimal-gdb%{_bindir}/gdb %{buildroot}%{_bindir}/gdb.minimal
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
@ -145,23 +150,25 @@ install -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/gdbinit
|
|||
# disable security hardening for tests
|
||||
rm -f $(dirname $(gcc -print-libgcc-file-name))/../specs
|
||||
# fix typo in test
|
||||
sed -i 's/hex in)/hex in )/g' gdb/testsuite/gdb.arch/i386-signal.exp
|
||||
sed -i 's/hex in)/hex in )/g' %{name}/testsuite/%{name}.arch/i386-signal.exp
|
||||
# ignore exit code and check for expected number of failures
|
||||
make %{?_smp_mflags} check || tail gdb/testsuite/gdb.sum | grep "# of unexpected failures.*1219\|# of unexpected failures.*1220"
|
||||
%make_build check || tail %{name}/testsuite/%{name}.sum | grep "# of unexpected failures.*1219\|# of unexpected failures.*1220"
|
||||
%endif
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%exclude %{_datadir}/locale
|
||||
%exclude %{_includedir}/*.h
|
||||
%{_includedir}/gdb/*.h
|
||||
%{_includedir}/%{name}/*.h
|
||||
%{_includedir}/sim/*.h
|
||||
%{_libdir}/*.so
|
||||
%{_infodir}/*.gz
|
||||
%{_datadir}/gdb/python/*
|
||||
%{_datadir}/gdb/syscalls/*
|
||||
%{_datadir}/gdb/system-gdbinit/*
|
||||
%{_datadir}/%{name}/python/*
|
||||
%{_datadir}/%{name}/syscalls/*
|
||||
%{_datadir}/%{name}/system-gdbinit/*
|
||||
%{_bindir}/*
|
||||
%exclude %{_bindir}/%{name}.minimal
|
||||
%exclude %{_bindir}/%{name}-add-index
|
||||
%{_mandir}/*/*
|
||||
%{_sysconfdir}/gdbinit
|
||||
%{_sysconfdir}/gdbinit.d
|
||||
|
@ -169,12 +176,13 @@ make %{?_smp_mflags} check || tail gdb/testsuite/gdb.sum | grep "# of unexpecte
|
|||
%if 0%{?build_minimal_gdb}
|
||||
%files minimal
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/gdb.minimal
|
||||
# same file in both gdb & gdb-minimal
|
||||
%{_bindir}/gdb-add-index
|
||||
%{_bindir}/%{name}.minimal
|
||||
%{_bindir}/%{name}-add-index
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Jul 25 2023 Shreenidhi Shedi <sshedi@vmware.com> 11.2-9
|
||||
- Add gdb-minimal to requires of gdb
|
||||
* Tue Jun 20 2023 Shreenidhi Shedi <sshedi@vmware.com> 11.2-8
|
||||
- Fix spec issues
|
||||
* Fri Jun 09 2023 Nitesh Kumar <kunitesh@vmware.com> 11.2-7
|
||||
|
|
Loading…
Reference in New Issue