File qpopper.spec of Package qpopper

#
# spec file for package qpopper (Version 4.0.14)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           qpopper
BuildRequires:  gdbm-devel openssl-devel pam-devel postfix
Version:        4.0.14
Release:        1
License:        Any permissive
Group:          Productivity/Networking/Email/Servers
Provides:       pop
Obsoletes:      pop
Url:            http://www.qpopper.org
Source0:        %{name}%{version}.tar.bz2
# pam config
Source1:        pop3
# xinetd config
Source2:        qpopper.xinetd
# show that SuSE has modified qpopper
Patch0:         banner.diff
# make response to 'wrong password' and 'non existing account' identical
Patch1:         auth-text.diff
# fix some race condition in popauth
Patch2:         popauth.diff
# fix some minor security problems
Patch3:         security1.diff
# fix some compile warnings
Patch4:         include1.diff
# fix path in manpage
Patch5:         manpage.diff
# build popper without strict aliasing
Patch8:         qpopper-strict-aliasing.patch  
Summary:        POP3 Mail Daemon from Qualcomm Inc
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       pam inet-daemon
PreReq:         /usr/sbin/useradd permissions

%description
A mail server using the POP3 protocol. The daemon also supports the
more secure APOP protocol.

You must agree to the license in
/usr/share/doc/packages/qpopper/License.txt before you can use qpopper.

After installation, activate the server in the /etc/inetd.conf or
/etc/xinetd.d/qpopper file.



Authors:
--------
    QUALCOMM Incorporated

%package doc
License:        Any permissive
Group:          Documentation/Other
Summary:        Documentation about the POP3 Mail Daemon from Qualcomm Inc
Requires:       %{name} = %{version}

%description doc
Documentation about the POP3 Mail Daemon from Qualcomm Inc



Authors:
--------
    QUALCOMM Incorporated

%prep
%setup -q -n %{name}%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
#%patch6
#%patch7 -p1
%patch8

%build
CFLAGS="$RPM_OPT_FLAGS -fstack-protector" ./configure \
 --enable-uw-kludge \
 --enable-debugging \
 --with-pam \
 --with-warnings \
 --prefix=/usr \
 --enable-specialauth \
 --enable-apop=/etc/pop.auth \
 --with-popuid \
 --enable-shy \
 --with-openssl
make CFLAGS="$RPM_OPT_FLAGS \
 -DBLOCK_UID=100 \
 -DPOP_TIMEOUT=600 \
 -DNONAUTHFILE=\\\"/etc/mail/pop.nonauthfile\\\" \
 -fstack-protector"

%install
install -d -m 755 $RPM_BUILD_ROOT/usr/sbin
install -m 755 popper/popper $RPM_BUILD_ROOT/usr/sbin/popper
install -m 755 popper/popauth $RPM_BUILD_ROOT/usr/sbin/popauth
install -d -m 755 $RPM_BUILD_ROOT/usr/share/man/man8
install -m 644 man/popper.8 $RPM_BUILD_ROOT/usr/share/man/man8/popper.8
install -m 644 man/popauth.8 $RPM_BUILD_ROOT/usr/share/man/man8/popauth.8
install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/pam.d/pop3
install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/xinetd.d/qpopper
install -d -m 755 $RPM_BUILD_ROOT/var/lib/pop

%clean
rm -rf $RPM_BUILD_ROOT

%pre
/usr/sbin/useradd -r -o -u 67 -g users -s /bin/false -c "POP admin" -d /var/lib/pop pop 2> /dev/null || :

%post
%run_permissions
%verifyscript
%verify_permissions -e /usr/sbin/popauth

%files
%defattr (-, root, root)
%doc License.txt README doc/Changes doc/Release.Notes
%attr (755, pop, root) %dir /var/lib/pop
%verify(not mode) %attr (4750, pop, trusted) /usr/sbin/popauth
%attr (755, root, root) /usr/sbin/popper
/usr/share/man/man8/*
%config /etc/pam.d/pop3
%config(noreplace) /etc/xinetd.d/qpopper

%files doc
%defattr (-, root, root)
%doc GUIDE.pdf doc/LMOS-FAQ.html doc/README.Berkeley doc/rfc1939.txt doc/rfc2449.txt

%changelog
* Mon Sep 08 2008 hvogel@suse.de
- Update to version 4.0.14.
  * Extra information in PAM trace code
  * fix crash using PAM
  * Fixed off-by-one error in strlcpy
  * Prevent strlcat from examining destination past buffer size
  * Fix crash if mangle string ended with header and no ")"
  * Added more checks to try and find getprpwnam()
  * Correct milliseconds calculation
* Thu Apr 03 2008 hvogel@suse.de
- Update to version 4.0.9
  * Fix crash if too many MDEF commands entered
- split GUIDE.pdf into doc subpackage
* Wed Sep 26 2007 mrueckert@suse.de
- install the binaries with 755 to get a debuginfo package
* Mon Mar 26 2007 rguenther@suse.de
- Add gdbm-devel BuildRequires
* Mon Sep 04 2006 kukuk@suse.de
- Update pop3 PAM config file
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 hvogel@suse.de
- Update to version 4.0.8
* Wed Nov 02 2005 hvogel@suse.de
- build popper with -fno-strict-aliasing
* Mon May 02 2005 hvogel@suse.de
- fix permissions handling again (popauth, pop_config) to fix
  CAN-2005-1151 and CAN-2005-1152
* Thu Nov 11 2004 ro@suse.de
- fix permissions handling (popauth)
* Fri Mar 26 2004 ro@suse.de
- added postfix to neededforbuild
* Wed Feb 18 2004 arvin@suse.de
- fixed permission on documentation directory
* Tue Jan 20 2004 arvin@suse.de
- build as non root user
* Mon Jan 19 2004 arvin@suse.de
- fixed some compile warnings
* Sat Jan 17 2004 ro@suse.de
- added pam-devel to neededforbuild
* Thu Jun 12 2003 arvin@suse.de
- don't include directory /etc/xinetd.d
* Fri Mar 14 2003 arvin@suse.de
- updated to version 4.0.5 (maintenance release)
* Thu Mar 13 2003 arvin@suse.de
- fixed buffer overflow after authentication
* Thu Mar 06 2003 arvin@suse.de
- don't use tcpwrapper config file for xinetd (bug #24773)
* Mon Mar 03 2003 arvin@suse.de
- added config file for xinetd
* Fri Feb 07 2003 kukuk@suse.de
- use pam_unix2.so instead of pam_unix.so
* Thu Dec 05 2002 arvin@suse.de
- create user pop with group name users instead of fixed gid 100
* Fri Nov 15 2002 arvin@suse.de
- compile with ssl support
* Wed Aug 21 2002 arvin@suse.de
- added security patch by Olaf Kirch (bug #18107)
* Mon Jun 17 2002 arvin@suse.de
- create user pop in install section and in preinstall script
* Tue Apr 16 2002 arvin@suse.de
- don't include documentation in FrameMaker format in package
* Mon Apr 15 2002 arvin@suse.de
- updated to version 4.0.4. extract from changes:
  - Fixed DOS attack seen on some systems.
  - Fixed "noop has null function" log entry.
  - Allow '-p' to be used when APOP not defined.
  - Restrict clear-text-password=never to APOP.
  - Restrict clear-text-password=tls to QPOP_SSL.
  - Fixed qpopper hanging on I/O error on some platforms.
* Mon Feb 04 2002 arvin@suse.de
- fixed race condition in popauth
* Mon Sep 17 2001 arvin@suse.de
- added auth-text.diff to make response to 'wrong password'
  and 'non existing account' identical
* Fri Aug 24 2001 ro@suse.de
- removed /lib/security path from pam.d config file
* Mon Jun 18 2001 arvin@suse.de
- updated to version 4.0.3
* Wed May 09 2001 mfabian@suse.de
- bzip2 sources
* Thu Jan 25 2001 ro@suse.de
- added provides: pop and obsoletes: pop
  (fetchmail split-aliases need a pop package replacement)
* Fri Dec 15 2000 arvin@suse.de
- renamed program qpopper to popper
* Fri Nov 17 2000 arvin@suse.de
- updated to version 3.1.2
* Tue Oct 24 2000 arvin@suse.de
- new package with qpopper 3.1 from qualcomm
openSUSE Build Service is sponsored by