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