# OE: conditional switches #(ie. use with rpm --rebuild): # --with diet Compile chkrootkit against dietlibc %define build_diet 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_diet: %{expand: %%define build_diet 1}} Summary: Check rootkits Name: chkrootkit Version: 0.57 Release: %mkrel 1 License: BSD Group: Monitoring URL: http://www.chkrootkit.org/ Source0: ftp://chkrootkit.org/pub/seg/pac/chkrootkit.tar.gz#/%{name}-%{version}.tar.gz Patch0: chkrootkit_fix_apache_false_positive.diff Patch1: chkrootkit-0.49-bug57979.diff Patch2: chkrootkit-0.52-suckit-false-positive.diff Requires: binutils, coreutils, findutils, gawk, grep, net-tools, procps, sed BuildRequires: glibc-static-devel %if %{build_diet} BuildRequires: dietlibc-devel >= 0.32 %endif %description Chkrootkit is a tool to locally check for signs of a rootkit. %prep %setup -q %patch0 -p0 %patch1 -p0 %patch2 -p1 # fix debuginfo: sed -i -e 's!\s\+@strip.*!!g' Makefile # instead of a static patch chmod 644 * for i in `ls -1 *.c|sed "s/\.c//"`; do perl -pi -e "s|\./${i}|%{_libdir}/%{name}/${i}|g" %{name} done %build %if %{build_diet} # OE: use the power of dietlibc make CC="diet gcc" CFLAGS="%{optflags} -DHAVE_LASTLOG_H -DLASTLOG_FILENAME='\"/var/log/lastlog\"' -DWTMP_FILENAME='\"/var/log/wtmp\"' -Os -s -static" LDFLAGS=-static %else make CFLAGS="%{optflags} -DHAVE_LASTLOG_H -DLASTLOG_FILENAME='\"/var/log/lastlog\"' -DWTMP_FILENAME='\"/var/log/wtmp\"'" LDFLAGS=-static %endif %install install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_libdir}/%{name} install -m 0755 chkrootkit %{buildroot}%{_sbindir}/ install -m 0755 check_wtmpx chkdirs chklastlog chkproc chkutmp chkwtmp ifpromisc strings-static %{buildroot}%{_libdir}/%{name}/ %files %doc ACKNOWLEDGMENTS README* COPYRIGHT %{_sbindir}/* %{_libdir}/%{name} %changelog * Sat Feb 11 2023 mrambo3501 <mrambo3501> 0.57-1.mga9 + Revision: 1940765 - version 0.57 - fixed Source0 * Tue Mar 15 2022 umeabot <umeabot> 0.55-2.mga9 + Revision: 1793558 - Mageia 9 Mass Rebuild * Wed Jun 16 2021 luigiwalser <luigiwalser> 0.55-1.mga9 + Revision: 1730965 - 0.55 * Wed Dec 30 2020 luigiwalser <luigiwalser> 0.54-1.mga8 + Revision: 1665448 - 0.54 * Fri Feb 14 2020 umeabot <umeabot> 0.53-2.mga8 + Revision: 1522912 - Mageia 8 Mass Rebuild * Tue Feb 12 2019 daviddavid <daviddavid> 0.53-1.mga7 + Revision: 1365687 - new version: 0.53 * Sat Sep 22 2018 umeabot <umeabot> 0.52-3.mga7 + Revision: 1296122 - Mageia 7 Mass Rebuild * Tue Sep 26 2017 daviddavid <daviddavid> 0.52-2.mga7 + Revision: 1160058 - honor user CFLAGS thus fixing empty debugsourcefiles.list * Sun Apr 23 2017 neoclust <neoclust> 0.52-1.mga6 + Revision: 1097126 - New version 0.52 - detect new rootkits * Thu Feb 11 2016 umeabot <umeabot> 0.50-9.mga6 + Revision: 953615 - Mageia 6 Mass Rebuild * Thu Sep 17 2015 tv <tv> 0.50-8.mga6 + Revision: 880220 - reenable debuginfo & fix empty debuginfo * Wed Sep 09 2015 neoclust <neoclust> 0.50-7.mga6 + Revision: 874982 - Fix build with new rpm ( empty debuginfo) * Thu Jan 08 2015 luigiwalser <luigiwalser> 0.50-6.mga5 + Revision: 809276 - re-add patch to remove false positive on suckit (upstream fix failed, mga#14982) * Wed Oct 15 2014 umeabot <umeabot> 0.50-5.mga5 + Revision: 740173 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 0.50-4.mga5 + Revision: 678380 - Mageia 5 Mass Rebuild * Tue Sep 09 2014 luigiwalser <luigiwalser> 0.50-3.mga5 + Revision: 673882 - remove mistakenly added requires on hostname (not used by this package) * Tue Sep 09 2014 spuhler <spuhler> 0.50-2.mga5 + Revision: 673875 - added Requires: hostname * we moved the files from net-tools * Thu Jun 12 2014 luigiwalser <luigiwalser> 0.50-1.mga5 + Revision: 635876 - 0.50 - remove upstreamed CVE patch - remove suckit false positive patch (fixed upstream) * Wed Jun 04 2014 luigiwalser <luigiwalser> 0.49-9.mga5 + Revision: 632846 - fix local privilege escalation issue in slapper worm checker (CVE-2014-0476) * Sat Oct 19 2013 umeabot <umeabot> 0.49-8.mga4 + Revision: 534394 - Mageia 4 Mass Rebuild * Thu Sep 12 2013 luigiwalser <luigiwalser> 0.49-7.mga4 + Revision: 477796 - remove false positive for suckit rootkit (mga#6699) * Fri Jan 11 2013 umeabot <umeabot> 0.49-6.mga3 + Revision: 347678 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Apr 10 2011 ennael <ennael> 0.49-5.mga1 + Revision: 82892 - clean spec file - imported package chkrootkit * Sun Dec 05 2010 Oden Eriksson <oeriksson@mandriva.com> 0.49-5mdv2011.0 + Revision: 610136 - rebuild * Thu Mar 11 2010 Oden Eriksson <oeriksson@mandriva.com> 0.49-4mdv2010.1 + Revision: 518002 - fix #57979 (chkrootkit causes lots of traffic on NFS share) * Mon Jan 18 2010 Michael Scherer <misc@mandriva.org> 0.49-3mdv2010.1 + Revision: 493355 - fix chkrootkit giving false positive when apache is running, as the buffer is too small for a long process line. * Fri Sep 11 2009 Michael Scherer <misc@mandriva.org> 0.49-2mdv2010.1 + Revision: 438091 - disable dietlibc, to prevent bug #50727, due to incomplete dietlibc getpriority support. * Sun Aug 09 2009 Frederik Himpe <fhimpe@mandriva.org> 0.49-1mdv2010.0 + Revision: 412556 - update to new version 0.49 * Thu Aug 07 2008 Thierry Vignaud <tv@mandriva.org> 0.48-3mdv2009.0 + Revision: 266507 - rebuild early 2009.0 package (before pixel changes) * Tue Jun 10 2008 Oden Eriksson <oeriksson@mandriva.com> 0.48-2mdv2009.0 + Revision: 217536 - rebuilt against dietlibc-devel-0.32 * Tue Jan 08 2008 Emmanuel Andry <eandry@mandriva.org> 0.48-1mdv2008.1 + Revision: 146744 - New version - drop patch + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tv@mandriva.org> - kill re-definition of %%buildroot on Pixel's request * Thu Aug 23 2007 Thierry Vignaud <tv@mandriva.org> 0.47-4mdv2008.0 + Revision: 69706 - fileutils, sh-utils & textutils have been obsoleted by coreutils a long time ago * Fri Aug 10 2007 Olivier Blin <oblin@mandriva.com> 0.47-3mdv2008.0 + Revision: 61483 - really fix wtmp file location * Fri Aug 10 2007 Olivier Blin <oblin@mandriva.com> 0.47-2mdv2008.0 + Revision: 61421 - install chkdirs - fix check of chkproc in lkm test * Fri Nov 17 2006 Emmanuel Andry <eandry@mandriva.org> 0.47-1mdv2007.0 + Revision: 85403 - New version 0.47 - Import chkrootkit