5247d2
# hardened build if not overridden
5247d2
%{!?_hardened_build:%global _hardened_build 1}
5247d2
5247d2
%if %{?_hardened_build}%{!?_hardened_build:0}
5247d2
%global hardened_flags -pie -Wl,-z,relro,-z,now
5247d2
%endif
5247d2
5247d2
Summary: Mail processing program
5247d2
Name: procmail
5247d2
Version: 3.22
5247d2
Release: 36%{?dist}.1
5247d2
License: GPLv2+ or Artistic
5247d2
Group: Applications/Internet
5247d2
# Source: ftp://ftp.procmail.org/pub/procmail/procmail-%{version}.tar.gz
5247d2
# The original source doesn't seem to be available anymore, using mirror
5247d2
Source: ftp://ftp.ucsb.edu/pub/mirrors/procmail/procmail-%{version}.tar.gz
5247d2
# Source2: http://www.linux.org.uk/~telsa/BitsAndPieces/procmailrc
5247d2
# The Telsa config file doesn't seem to be available anymore, using local copy
5247d2
Source2: procmailrc
5247d2
URL: http://www.procmail.org
5247d2
Patch0: procmail-3.22-rhconfig.patch
5247d2
Patch1: procmail-3.15.1-man.patch
5247d2
Patch2: procmail_3.22-8.debian.patch
5247d2
Patch4: procmail-3.22-truncate.patch
5247d2
Patch5: procmail-3.22-ipv6.patch
5247d2
Patch6: procmail-3.22-getline.patch
5247d2
Patch7: procmail-3.22-CVE-2014-3618.patch
5247d2
Patch8: procmail-3.22-out-of-bounds-rw-fixes.patch
5247d2
Patch9: procmail-3.22-CVE-2017-16844.patch
5247d2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
5247d2
5247d2
%description
5247d2
Procmail can be used to create mail-servers, mailing lists, sort your
5247d2
incoming mail into separate folders/files (real convenient when subscribing
5247d2
to one or more mailing lists or for prioritising your mail), preprocess
5247d2
your mail, start any programs upon mail arrival (e.g. to generate different
5247d2
chimes on your workstation for different types of mail) or selectively
5247d2
forward certain incoming mail automatically to someone.
5247d2
5247d2
%prep
5247d2
%setup -q
5247d2
%patch0 -p1 -b .rhconfig
5247d2
%patch1 -p1
5247d2
%patch2 -p1
5247d2
%patch4 -p1 -b .truncate
5247d2
%patch5 -p1 -b .ipv6
5247d2
%patch6 -p1 -b .getline
5247d2
%patch7 -p1 -b .CVE-2014-3618
5247d2
%patch8 -p1 -b .out-of-bounds-rw-fixes
5247d2
%patch9 -p1 -b .CVE-2017-16844
5247d2
5247d2
find examples -type f | xargs chmod 644
5247d2
5247d2
%build
5247d2
make RPM_OPT_FLAGS="$(getconf LFS_CFLAGS)" autoconf.h
5247d2
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS %{?hardened_flags} -Wno-comments $(getconf LFS_CFLAGS)"
5247d2
5247d2
%install
5247d2
rm -rf ${RPM_BUILD_ROOT}
5247d2
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
5247d2
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,5}
5247d2
5247d2
make \
5247d2
    BASENAME=${RPM_BUILD_ROOT}%{_prefix} MANDIR=${RPM_BUILD_ROOT}%{_mandir} \
5247d2
    install
5247d2
5247d2
cp debian/mailstat.1 ${RPM_BUILD_ROOT}%{_mandir}/man1
5247d2
cp -p %{SOURCE2} telsas_procmailrc
5247d2
5247d2
5247d2
%clean
5247d2
rm -rf ${RPM_BUILD_ROOT}
5247d2
5247d2
%files
5247d2
%defattr(-,root,root)
5247d2
%doc Artistic COPYING FAQ FEATURES HISTORY README KNOWN_BUGS examples telsas_procmailrc debian/QuickStart debian/README.Maildir
5247d2
5247d2
%{_bindir}/formail
5247d2
%attr(2755,root,mail) %{_bindir}/lockfile
5247d2
%{_bindir}/mailstat
5247d2
%attr(0755,root,mail) %{_bindir}/procmail
5247d2
5247d2
%{_mandir}/man[15]/*
5247d2
5247d2
%changelog
5247d2
* Tue Nov 21 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-36.1
5247d2
- Fixed possible buffer overflow in loadbuf function
5247d2
  Resolves: CVE-2017-16844
5247d2
5247d2
* Wed Mar 22 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-36
5247d2
- Fixed several out of bounds RWs
5247d2
  Resolves: rhbz#1138526
5247d2
5247d2
* Thu Sep  4 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-35
5247d2
- Fixed buffer overflow in formail
5247d2
  Resolves: CVE-2014-3618
5247d2
5247d2
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 3.22-34
5247d2
- Mass rebuild 2014-01-24
5247d2
5247d2
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 3.22-33
5247d2
- Mass rebuild 2013-12-27
5247d2
5247d2
* Mon Feb  4 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-32
5247d2
- Updated sources URLs
5247d2
5247d2
* Tue Sep  4 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-31
5247d2
- Hardened build with PIE and full RELRO
5247d2
  Resolves: rhbz#853186
5247d2
5247d2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.22-30
5247d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5247d2
5247d2
* Mon Jan 16 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-29
5247d2
- Rebuilt without NO_NFS_ATIME_HACK
5247d2
  Resolves: rhbz#666383
5247d2
5247d2
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.22-28
5247d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5247d2
5247d2
* Fri Nov 25 2011 Jaroslav Škarvada <jskarvad@redhat.com> - 3.22-27
5247d2
- Defuzzification of ipv6 patch
5247d2
5247d2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.22-26
5247d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
5247d2
5247d2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.22-25
5247d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5247d2
5247d2
* Tue Jun 30 2009 Miroslav Lichvar <mlichvar@redhat.com> 3.22-24
5247d2
- rename getline to avoid conflict with glibc (#505977)
5247d2
- add -Wno-comments to CFLAGS
5247d2
- remove package name from summary
5247d2
5247d2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.22-23
5247d2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5247d2
5247d2
* Mon Aug 04 2008 Miroslav Lichvar <mlichvar@redhat.com> 3.22-22
5247d2
- fix building on sh (CHIKAMA Masaki) (#447658)
5247d2
5247d2
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 3.22-21
5247d2
- Autorebuild for GCC 4.3
5247d2
5247d2
* Wed Aug 22 2007 Miroslav Lichvar <mlichvar@redhat.com> 3.22-20
5247d2
- update license tag
5247d2
5247d2
* Tue Mar 27 2007 Miroslav Lichvar <mlichvar@redhat.com> 3.22-19
5247d2
- fix description (#234098)
5247d2
- spec cleanup
5247d2
5247d2
* Fri Oct 27 2006 Miroslav Lichvar <mlichvar@redhat.com> 3.22-18
5247d2
- add IPv6 support to comsat notification (#198403)
5247d2
- package man page for mailstat
5247d2
- change mail spool directory to /var/spool/mail
5247d2
5247d2
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 3.22-17.1
5247d2
- rebuild
5247d2
5247d2
* Thu Mar 30 2006 Peter Vrabec <pvrabec@redhat.com> 3.22-17
5247d2
- fix truncation of mailbox when running into a disk quota or a
5247d2
  full partition. Patch from Solar Designer.
5247d2
5247d2
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 3.22-16.2.1
5247d2
- bump again for double-long bug on ppc(64)
5247d2
5247d2
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 3.22-16.2
5247d2
- rebuilt for new gcc4.1 snapshot and glibc changes
5247d2
5247d2
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
5247d2
- rebuilt
5247d2
5247d2
* Fri Mar 18 2005 Peter Vrabec <pvrabec@redhat.com> 3.22-16
5247d2
- rebuilt
5247d2
5247d2
* Mon Nov  8 2004 Martin Stransky <stransky@redhat.com> 3.22-15
5247d2
- add largefiles patch to support 64-bit file I/O
5247d2
5247d2
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
5247d2
- rebuilt
5247d2
5247d2
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
5247d2
- rebuilt
5247d2
5247d2
* Tue Jan  6 2004 Jens Petersen <petersen@redhat.com> - 3.22-12
5247d2
- apply procmail_3.22-8.debian.patch from Debian (fixes #79691)
5247d2
5247d2
* Mon Sep 22 2003 Florian La Roche <Florian.LaRoche@redhat.de>
5247d2
- do not link against -ldl and -lnsl
5247d2
5247d2
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
5247d2
- rebuilt
5247d2
5247d2
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
5247d2
- rebuilt
5247d2
5247d2
* Tue Dec 17 2002 Jens Petersen <petersen@redhat.com>
5247d2
- convert changelog to utf8
5247d2
5247d2
* Wed Dec 11 2002 Tim Powers <timp@redhat.com> 3.22-8
5247d2
- rebuild on all arches
5247d2
5247d2
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
5247d2
- automated rebuild
5247d2
5247d2
* Thu May 23 2002 Tim Powers <timp@redhat.com>
5247d2
- automated rebuild
5247d2
5247d2
* Mon Mar 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 3.22-5
5247d2
- Updated Telss's procmailrc file (#61872)
5247d2
5247d2
* Thu Mar 14 2002 Trond Eivind Glomsrød <teg@redhat.com> 3.22-4
5247d2
- Add Telsa Gwynne's procmailrc as a doc file - it's
5247d2
  excellently commented, and is a great example
5247d2
5247d2
* Wed Feb 27 2002 Trond Eivind Glomsrød <teg@redhat.com> 3.22-3
5247d2
- Rebuild
5247d2
5247d2
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
5247d2
- automated rebuild
5247d2
5247d2
* Wed Sep 12 2001 Trond Eivind Glomsrød <teg@redhat.com> 3.22-1
5247d2
- 3.22
5247d2
5247d2
* Sat Jun 30 2001 Trond Eivind Glomsrød <teg@redhat.com>
5247d2
- 3.21
5247d2
5247d2
* Fri Jun 29 2001 Trond Eivind Glomsrød <teg@redhat.com>
5247d2
- 3.20
5247d2
- Enable LMTP
5247d2
5247d2
* Thu Apr 12 2001 Trond Eivind Glomsrød <teg@redhat.com>
5247d2
- Change to "License: GPL or artistic" from "Copyright: distributable"
5247d2
- Fix man page (#35825)
5247d2
- 3.15.1
5247d2
- redo config patch
5247d2
5247d2
* Sat Jan  6 2001 Jeff Johnson <jbj@redhat.com>
5247d2
- lose setuid/setgid (root,mail) bits (#23257).
5247d2
5247d2
* Fri Aug 11 2000 Jeff Johnson <jbj@redhat.com>
5247d2
- add space in delivery rules with '!' (#15947).
5247d2
5247d2
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
5247d2
- automatic rebuild
5247d2
5247d2
* Thu Jun 15 2000 Jeff Johnson <jbj@redhat.com>
5247d2
- FHS packaging.
5247d2
5247d2
* Mon Feb  7 2000 Jeff Johnson <jbj@redhat.com>
5247d2
- compress man pages.
5247d2
5247d2
* Fri Jan 14 2000 Jeff Johnson <jbj@redhat.com>
5247d2
- update to 3.14.
5247d2
5247d2
* Mon Aug 16 1999 Bill Nottingham <notting@redhat.com>
5247d2
- fix doc perms.
5247d2
5247d2
* Wed Apr 21 1999 Cristian Gafton <gafton@redhat.com>
5247d2
- turn on GROUP_PER_USER
5247d2
- add some docs to the package
5247d2
5247d2
* Mon Apr 05 1999 Cristian Gafton <gafton@redhat.com>
5247d2
- version 3.13
5247d2
5247d2
* Fri Mar 26 1999 Cristian Gafton <gafton@redhat.com>
5247d2
- fixed Group line
5247d2
5247d2
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
5247d2
- auto rebuild in the new build environment (release 16)
5247d2
5247d2
* Sun Aug 16 1998 Jeff Johnson <jbj@redhat.com>
5247d2
- build root
5247d2
5247d2
* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
5247d2
- translations modified for de, fr, tr
5247d2
5247d2
* Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
5247d2
- built against glibc