# Detect the distribution we're using %define __distinit %(%{__sed} -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' /etc/redhat-release | /usr/bin/tr -d '[:space:]' | /usr/bin/cut -c 1-4 | /usr/bin/tr '[:upper:]' '[:lower:]') %define __distsubvers %(%{__sed} -e 's/.* release [^.]*[.]*\\([^ ]*\\) .*/\\1/' /etc/redhat-release) # For development releases (x.y, y > 80), bump version to next one for dist tag %if %([ 0%{__distsubvers} -gt 80 ] && echo 1 || echo 0) %define __distvers %(/usr/bin/expr $(%{__sed} -e 's/.* release \\([^.]*\\)[^ ]* [(].*[)].*/\\1/' /etc/redhat-release) + 1) %else %define __distvers %(%{__sed} -e 's/.* release \\([^.]*\\)[^ ]* [(].*[)].*/\\1/' /etc/redhat-release) %endif # Identify CentOS & White Box as rhel %if "%{__distinit}" == "c" || "%{__distinit}" == "wbel" %define __distinit rhel %endif %{!?__id_u: %define __id_u %([ -x /bin/id ]&&echo /bin/id||([ -x /usr/bin/id ]&&echo /usr/bin/id||echo /bin/true)) -u} %{!?disttag: %define disttag .%{__distinit}%{__distvers}} # Which libpcap package do we need to build against? # -------------------------------------------------- %if 0%{!?libpcapreq:1} # Red Hat Linux, Red Hat Enterprise Linux %if "%{__distinit}" == "rhl" || "%{__distinit}" == "rhel" %define libpcapreq libpcap %endif # Fedora Core 1-5 %if "%{__distinit}" == "fc" && %{__distvers} < 6 %define libpcapreq libpcap %endif # Fedora Core 6 onwards %if "%{__distinit}" == "fc" && %{__distvers} >= 6 %define libpcapreq libpcap-devel %endif %endif Summary: The PPP (Point-to-Point Protocol) daemon Name: ppp Version: 2.4.4 Release: 1.3%{?dist} License: Distributable Group: System Environment/Daemons Url: http://ppp.samba.org/ppp/index.html Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz Source1: ppp-2.3.5-pamd.conf Source2: ppp.logrotate Patch0: ppp-2.4.3-make.patch Patch1: ppp-2.3.6-sample.patch Patch2: ppp-2.4.2-libutil.patch Patch3: ppp-2.4.1-varargs.patch Patch4: ppp-2.4.4-lib64.patch Patch7: ppp-2.4.2-pie.patch Patch8: ppp-2.4.3-fix.patch Patch9: ppp-2.4.3-fix64.patch Patch11: ppp-2.4.2-change_resolv_conf.patch Patch13: ppp-2.4.4-no_strip.patch Patch16: ppp-2.4.2-pppoatm-mtu.patch Patch17: ppp-2.4.2-pppoatm-make.patch Patch19: ppp-2.4.3-local.patch Patch20: ppp-2.4.3-ipv6-accept-remote.patch Patch21: ppp-2.4.3-usepeerdns-var_run_ppp_resolv.conf.patch Patch22: ppp-2.4.4-cbcp.patch # Non-RedHat patches: Patch100: mppe_lower_mtu.diff Patch101: ppp-2.4.2-ifname.diff Patch102: ppp-2.4.3-atm_backend.patch Patch103: ppp-2.4.4-debuginfo.patch Patch104: ppp-2.4.3-oldpam.patch Patch105: ppp-2.4.3-bpf.patch Patch106: ppp-2.4.2-pcap.patch Patch107: ppp-2.4.3-cbcp_debug.patch Patch121: ppp-2.4.4-usepeerdns-var_run_ppp_resolv.conf.patch Patch200: ppp-2.4.4-prehashed_chapms.patch Patch201: ppp-2.4.4-HashorBin.patch # Keep RedHat spec file in SRPM for comparison Source100: ppp.spec.redhat BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, %{libpcapreq} >= 0.6.2 Requires: glibc >= 2.0.6, /etc/pam.d/system-auth, logrotate %description The ppp package contains the PPP (Point-to-Point Protocol) daemon and documentation for PPP support. The PPP protocol provides a method for transmitting datagrams over serial point-to-point links. PPP is usually used to dial in to an ISP (Internet Service Provider) or other organization over a modem and phone line. %prep %setup -q %patch0 -p1 -b .make %patch1 -p1 -b .sample # patch 2 depends on the -lutil in patch 0 %patch2 -p1 -b .libutil %patch3 -p1 -b .varargs # patch 4 depends on the -lutil in patch 0 %patch4 -p1 -b .lib64 %patch7 -p1 -b .pie %patch8 -p1 -b .fix %patch9 -p1 -b .fix64 # This patch for the ppp support scripts requires the change_resolv_conf # function, defined in the /etc/sysconfig/network-scripts/network-functions file if %{__grep} -F change_resolv_conf /etc/sysconfig/network-scripts/network-functions &> /dev/null; then %patch11 -p1 -b .change_resolv_conf %patch21 -p1 -b .usepeerdns-var_run_ppp_resolv else %patch121 -p1 -b .usepeerdns-var_run_ppp_resolv fi %patch13 -p1 -b .no_strip %patch16 -p1 -b .atm-mtu %patch17 -p1 -b .atm-make %patch19 -p1 -b .local %patch20 -p1 -b .ipv6cp %patch22 -p1 -b .cbcp # ============================================================================ # The remaining patches are additional to those in the official Fedora package # ============================================================================ # Support additional options mppe-lower-mtu (default) & nomppe-lower-mtu %patch100 -p1 -b .mtu # Arvin Schnell's ifname patch # http://marc.theaimsgroup.com/?l=linux-ppp&m=109025160924399&w=2 %patch101 -p0 -b .ifname # atm_backend_t definition missing from system headers in Fedora Core 2 if ! %{__grep} -F atm_backend_t %{_includedir}/linux/atm.h &> /dev/null; then %patch102 -p1 -b .atm_backend fi # pppd and pppoe-discovery installed without user write permission, prevents stripping %patch103 -p1 -b .debuginfo # Default PAM configuration file uses "include" syntax introduced in Fedora Core 5 # This patch reverts to the older syntax for older distributions %{__cp} -p %{SOURCE1} ppp.pam if ! %{__grep} '^auth[[:space:]][[:space:]]*include' /etc/pam.d/config-util &> /dev/null; then %patch104 -p0 fi # libpcap < 0.8 has headers in different places if [ ! -f %{_includedir}/pcap-bpf.h ]; then %patch105 -p1 -b .bpf fi # Fix inbound/outbound filter processing using internal functions for old libpcap versions if [ -f %{_includedir}/pcap-int.h ]; then %patch106 -p1 -b .pcap fi # Don't debug trace calls to cbcp_open unless the debug flag is set %patch107 -p1 -b .cbcp_debug %patch201 -p1 -b .prehashed_chapms # Red Hat 7.x has SIOCSIFNAME defined in but not in , # which is included by from pppd/sys-linux.c # This symbol is needed for the interface name-changing patch, so here's a kludge... if ! %{__grep} SIOCSIFNAME %{_includedir}/bits/ioctls.h &> /dev/null; then [ -f %{_includedir}/linux/sockios.h ] && %{__grep} SIOCSIFNAME %{_includedir}/linux/sockios.h >> pppd/patchlevel.h fi # Clean up cruft left after patching etc. %{__rm} -f scripts/{ppp-on-[rs]sh,secure-card}.local \ scripts/*change_resolv_conf \ scripts/*usepeerdns-var_run_ppp_resolv \ sample/*.sample # Allow for build in directory with setgid permission bit set %{__chmod} 755 sample scripts scripts/chatchat %build RPM_OPT_FLAGS="%{optflags} -fPIC -Wall" ./configure --libdir=%{_libdir} %{__make} %install %{__rm} -rf %{buildroot} export INSTROOT=%{buildroot} %{__make} install install-etcppp %{__chmod} -R a+rX scripts /usr/bin/find scripts -type f | /usr/bin/xargs %{__chmod} a-x %{__chmod} 0755 %{buildroot}%{_libdir}/pppd/%{version}/*.so %{__mkdir} -p %{buildroot}/etc/pam.d %{__install} -m 644 ppp.pam %{buildroot}/etc/pam.d/ppp # Places for state and log files %{__mkdir} -p %{buildroot}/var/log/ppp %{__mkdir} -p %{buildroot}/var/run/ppp # Logrotate script %{__mkdir} -p %{buildroot}/etc/logrotate.d %{__install} -m 644 %{SOURCE2} %{buildroot}/etc/logrotate.d/ppp %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root) %{_sbindir}/chat %{_sbindir}/pppd %{_sbindir}/pppdump %{_sbindir}/pppoe-discovery %{_sbindir}/pppstats %{_mandir}/man8/chat.8* %{_mandir}/man8/pppd.8* %{_mandir}/man8/pppdump.8* %{_mandir}/man8/pppd-radattr.8* %{_mandir}/man8/pppd-radius.8* %{_mandir}/man8/pppstats.8* %{_includedir}/pppd/ %{_libdir}/pppd/ %dir /etc/ppp/ %dir /var/run/ppp/ %attr(700, root, root) %dir /var/log/ppp/ %config /etc/ppp/chap-secrets %config /etc/ppp/options %config /etc/ppp/pap-secrets %config /etc/pam.d/ppp %config /etc/logrotate.d/ppp %doc FAQ PLUGINS README README.cbcp README.linux README.MPPE README.MSCHAP80 %doc README.MSCHAP81 README.pwfd README.pppoe scripts sample %changelog * Sun Apr 29 2007 Shad L. Lords - Clean up spec so package can be built by koji/plague * Thu Dec 07 2006 Shad L. Lords - Update to new release naming. No functional changes. - Make Packager generic * Thu Nov 23 2006 Charlie Brady 2.4.4-1.3 - Have another go at last patch. * Tue Nov 21 2006 Charlie Brady 2.4.4-1.2 - Add option for chapms secrets to be pre-hashed * Fri Sep 8 2006 Paul Howarth 2.4.4-1.1 - add dist tag - add URL - define %%{__id_u} for builds on non-Red Hat-based distributions - use Fedora standard buildroot - vary libpcap buildreq based on distribution/release - remove versioned libpcap dependency - remove buildroot unconditionally in %%install - got rid of a few cosmetic rpmlint warnings - add patches: * patch to support mppe_lower_mtu/nomppe_lower_mtu options * Arvin Schnell's ifname patch (http://marc.theaimsgroup.com/?l=linux-ppp&m=109025160924399&w=2) * define atm_backend_t if the system headers don't (needed on FC2) * extract debug symbols from pppd and pppoe-discovery * use old-style PAM configs on older distributions * look for libpcap headers in different places on older distributions * fix inbound/outbound filter processing using internal functions for old libpcap versions * don't debug trace calls to cbcp_open unless the debug flag is set * make sure SIOCSIFNAME is defined (needed for ifname patch on RHL7) - clean patch cruft more carefully (don't delete ipv6 sample scripts) - cosmetic spec file tidying * Wed Jul 19 2006 Thomas Woerner 2.4.4-1 - new version 2.4.4 with lots of fixes - fixed resolv.conf docs (#165072) Thanks to Matt Domsch for the initial patch - enabled CBCP (#199278) * Wed Jul 12 2006 Jesse Keating - 2.4.3-6.2.2 - rebuild * Fri Feb 10 2006 Jesse Keating - 2.4.3-6.2.1 - bump again for double-long bug on ppc(64) * Tue Feb 07 2006 Jesse Keating - 2.4.3-6.2 - rebuilt for new gcc4.1 snapshot and glibc changes * Fri Dec 09 2005 Jesse Keating - rebuilt * Sat Nov 12 2005 Florian La Roche - rebuild * Fri Nov 4 2005 David Woodhouse 2.4.3-5 - Implement ipv6cp-accept-remote option * Fri Oct 7 2005 Tomas Mraz 2.4.3-4 - use include instead of pam_stack in pam config * Sun Jul 31 2005 Florian La Roche - rebuild for libpcap of the day * Tue Jul 19 2005 Thomas Woerner 2.4.3-2.1 - additional patch for the scripts, thanks to Sammy (#163621) * Tue Jul 19 2005 Thomas Woerner 2.4.3-2 - dropped all executable bits in scripts directory to prevent rpm requiring programs used in there * Mon Jul 18 2005 Thomas Woerner 2.4.3-1 - new version 2.4.3 - updated patches: make, lib64, dontwriteetc, fix, fix64, no_strip, radiusplugin - dropped patches: bpf, signal, pcap, pppoatm, pkgcheck * Tue Nov 2 2004 Thomas Woerner 2.4.2-7 - fixed out of bounds memory access, possible DOS * Thu Oct 7 2004 David Woodhouse 2.4.2-6.3 - Fix use of 'demand' without explicit MTU/MRU with pppoatm * Tue Oct 5 2004 David Woodhouse 2.4.2-6.2 - Link pppoatm plugin against libresolv. - Revert to linux-atm headers without the workaround for #127098 * Mon Oct 4 2004 David Woodhouse 2.4.2-6.1 - Include atmsap.h for pppoatm plugin. * Mon Oct 4 2004 David Woodhouse 2.4.2-6 - Add pppoatm plugin (#131555) * Thu Sep 16 2004 Thomas Woerner 2.4.2-5.1 - fixed subscript out of range (#132677) * Wed Sep 15 2004 Thomas Woerner 2.4.2-5 - example scripts are using change_resolv_conf to modify /etc/resolv.conf (#132482) - require new libpcap library (>= 0.8.3-6) with a fix for inbound/outbound filter processing - not using internal libpcap structures anymore, fixes inbound/outbound filter processing (#128053) * Fri Aug 6 2004 Thomas Woerner 2.4.2-4 - fixed signal handling (#29171) * Mon Jun 21 2004 Thomas Woerner 2.4.2-3.1 - fixed compiler warnings - fixed 64bit problem with ms-chap (#125501) - enabled pie again * Tue Jun 15 2004 Elliot Lee - rebuilt * Wed May 24 2004 David Woodhouse 2.4.2-2.3 - Enable IPv6 support. Disable PIE to avoid bogus Provides: * Fri May 14 2004 Thomas Woerner 2.4.2-2.2 - compiled pppd and chat PIE * Thu May 13 2004 Thomas Woerner 2.4.2-2.1 - added 'missingok' to ppp.logrotate (#122911) * Fri May 07 2004 Nils Philippsen 2.4.2-2 - don't write to /etc (#118837) * Wed Mar 10 2004 Nalin Dahyabhai 2.4.2-1 - update to 2.4.2 * Fri Feb 13 2004 Elliot Lee - rebuilt * Fri Sep 5 2003 Nalin Dahyabhai 2.4.1-15 - rebuild * Fri Sep 5 2003 Nalin Dahyabhai 2.4.1-14 - apply the patch from -11 * Wed Jun 04 2003 Elliot Lee - rebuilt * Tue Jun 3 2003 Nalin Dahyabhai 2.4.1-12 - rebuild * Tue Jun 3 2003 Nalin Dahyabhai 2.4.1-11 - check for libcrypt in the right directory at compile-time * Wed Jan 22 2003 Tim Powers - rebuilt * Thu Dec 12 2002 Elliot Lee 2.4.1-9 - Fix build failure by rebuilding * Tue Nov 19 2002 Nalin Dahyabhai 2.4.1-8 - rebuild - set x86_64 to use varargs the way s390 does * Mon Jul 22 2002 Florian La Roche - add patch: * Thu Jun 06 2002 Phil Knirsch - Fixed varargs problem for s390/s390x. * Fri Jun 21 2002 Tim Powers - automated rebuild * Sun May 26 2002 Tim Powers - automated rebuild * Fri May 17 2002 Nalin Dahyabhai 2.4.1-4 - rebuild in new environment * Wed Feb 27 2002 Nalin Dahyabhai 2.4.1-3 - revert cbcp patch, it's wrong (#55367) * Thu Aug 9 2001 Nalin Dahyabhai 2.4.1-2 - add buildprereq on pam-devel (#49559) - add patch to respond to CBCP LCP requests (#15738) - enable cbcp support at build-time - change the Copyright: tag to a License: tag * Wed May 23 2001 Nalin Dahyabhai 2.4.1-1 - update to 2.4.1 * Fri Dec 1 2000 Nalin Dahyabhai - rebuild in new environment * Thu Nov 9 2000 Nalin Dahyabhai - update to 2.4.0 * Wed Jul 12 2000 Prospector - automatic rebuild * Mon Jun 5 2000 Nalin Dahyabhai - move man pages to %%{_mandir} * Thu Jun 1 2000 Nalin Dahyabhai - change perms using defattr - modify PAM setup to use system-auth * Sun Mar 26 2000 Florian La Roche - change to root:root perms * Mon Mar 06 2000 Nalin Dahyabhai - reaper bugs verified as fixed - check pam_open_session result code (bug #9966) * Mon Feb 07 2000 Nalin Dahyabhai - take a shot at the wrong reaper bugs (#8153, #5290) * Thu Feb 03 2000 Nalin Dahyabhai - free ride through the build system (release 2) * Tue Jan 18 2000 Nalin Dahyabhai - Update to 2.3.11 * Sat Nov 06 1999 Michael K. Johnson - Better fix for both problems * Fri Nov 05 1999 Michael K. Johnson - fix for double-dial problem - fix for requiring a controlling terminal problem * Sun Sep 19 1999 Preston Brown - 2.3.10 bugfix release * Fri Aug 13 1999 Michael K. Johnson - New version 2.3.9 required for kernel 2.3.13 and will be required for new initscripts. auth patch removed; 2.3.9 does the same thing more readably than the previous patch. * Thu Jun 24 1999 Cristian Gafton - add pppdump * Fri Apr 09 1999 Cristian Gafton - force pppd use the glibc's logwtmp instead of implementing its own * Wed Apr 01 1999 Preston Brown - version 2.3.7 bugfix release * Tue Mar 23 1999 Cristian Gafton - version 2.3.6 * Mon Mar 22 1999 Michael Johnson - auth patch * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 3) * Thu Jan 07 1999 Cristian Gafton - build for glibc 2.1 * Fri Jun 5 1998 Jeff Johnson - updated to 2.3.5. * Tue May 19 1998 Prospector System - translations modified for de * Fri May 8 1998 Jakub Jelinek - make it run with kernels 2.1.100 and above. * Fri Apr 24 1998 Prospector System - translations modified for de, fr, tr * Wed Mar 18 1998 Cristian Gafton - requires glibc 2.0.6 or later * Wed Mar 18 1998 Michael K. Johnson - updated PAM patch to not turn off wtmp/utmp/syslog logging. * Wed Jan 7 1998 Cristian Gafton - added the /etc/pam.d config file - updated PAM patch to include session support * Tue Jan 6 1998 Cristian Gafton - updated to ppp-2.3.3, build against glibc-2.0.6 - previous patches not required any more. - added buildroot - fixed the PAM support, which was really, completely broken and against any standards (session support is still not here... :-( ) - we build against running kernel and pray that it will work - added a samples patch; updated glibc patch * Thu Dec 18 1997 Erik Troan - added a patch to use our own route.h, rather then glibc's (which has alignment problems on Alpha's) -- I only applied this patch on the Alpha, though it should be safe everywhere * Fri Oct 10 1997 Erik Troan - turned off the execute bit for scripts in /usr/doc * Fri Jul 18 1997 Erik Troan - built against glibc * Tue Mar 25 1997 Erik Troan - Integrated new patch from David Mosberger - Improved description