Blame SPECS/memstomp.spec

a9fe34
%{?scl:%{?scl_package:%scl_package binutils}}
a9fe34
a9fe34
%global		githash 38573e7d
a9fe34
Name:		%{?scl_prefix}memstomp
a9fe34
Version:	0.1.5
a9fe34
Release:	6%{?dist}
a9fe34
Summary:	Warns of memory argument overlaps to various functions
a9fe34
Group:		Development/Debuggers
a9fe34
# The entire source code is LGPLV3+ with the exception of backtrace-symbols.c which
a9fe34
# is GPLv2+ by way of being a hacked up old version of binutils's addr2line.
a9fe34
# backtrace-symbols.c is built into an independent .so to avoid license contamination
a9fe34
License:	LGPLv3+ and GPLv2+
a9fe34
URL:		git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
a9fe34
# The source for this package was pulled from upstream's vcs.  Use the
a9fe34
# following commands to generate the tarball:
a9fe34
# git clone git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
a9fe34
# cd memstomp
a9fe34
# git archive --prefix memstomp-0.1.5-38573e7d/ master | gzip > memstomp-0.1.5-38573e7d.tar.gz
a9fe34
Source0:	memstomp-%{version}-%{githash}.tar.gz
a9fe34
Requires:	util-linux
a9fe34
BuildRequires:	binutils-devel autoconf automake dejagnu
a9fe34
BuildRoot:     %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
a9fe34
a9fe34
Patch0: memstomp-testsuite.patch
a9fe34
Patch1: memstomp-man.patch
a9fe34
Patch2: memstomp-rh961495.patch
a9fe34
Patch3: memstomp-rh962763.patch
a9fe34
Patch4: memstomp-quietmode.patch
a9fe34
Patch5: memstomp-rh1093173.patch
a9fe34
Patch6: memstomp-rh1133815.patch
a9fe34
Patch7: memstomp-implicit-int.patch
a9fe34
a9fe34
a9fe34
%define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives
a9fe34
%define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives}
a9fe34
a9fe34
%{?scl:Requires:%scl_runtime}
a9fe34
a9fe34
a9fe34
%description 
a9fe34
memstomp is a simple program that can be used to identify
a9fe34
places in code which trigger undefined behavior due to
a9fe34
overlapping memory arguments to certain library calls.
a9fe34
a9fe34
%post -p /sbin/ldconfig
a9fe34
%postun -p /sbin/ldconfig
a9fe34
a9fe34
%prep
a9fe34
%setup -q -n memstomp-%{version}-%{githash}
a9fe34
%patch0 -p1
a9fe34
%patch1 -p1
a9fe34
%patch2 -p1
a9fe34
%patch3 -p1
a9fe34
%patch4 -p1
a9fe34
%patch5 -p1
a9fe34
%patch6 -p1
a9fe34
%patch7 -p1
a9fe34
a9fe34
a9fe34
%build
a9fe34
autoreconf
a9fe34
%configure
a9fe34
# We force -O0 here because memstomp essentially relies on GCC
a9fe34
# not removing any of its checks.  GCC continues to get better
a9fe34
# and twarting its optimizer isn't something I have any interest
a9fe34
# in maintaining over time.  So just force -O0 for stupid code
a9fe34
# generation.
a9fe34
make %{?_smp_mflags} CFLAGS+="-O0 -fno-strict-aliasing"
a9fe34
make -k check
a9fe34
a9fe34
%install
a9fe34
make install DESTDIR=$RPM_BUILD_ROOT
a9fe34
a9fe34
%files
a9fe34
%doc README LGPL3 GPL2 GPL3
a9fe34
%{_bindir}/memstomp
a9fe34
%{_libdir}/libmemstomp.so
a9fe34
%{_libdir}/libmemstomp-backtrace-symbols.so
a9fe34
%{_mandir}/man1/memstomp.1.gz
a9fe34
a9fe34
%changelog
a9fe34
* Fri Jun 10 2022 Marek Polacek <polacek@redhat.com> 0.1.5-6
a9fe34
- Rebuild for DTS 12