mirror of
https://abf.rosa.ru/djam/ppp.git
synced 2025-02-23 14:12:59 +00:00
286 lines
8.5 KiB
RPMSpec
286 lines
8.5 KiB
RPMSpec
%bcond_without inet6
|
|
|
|
Summary: The PPP daemon and documentation
|
|
Name: ppp
|
|
Version: 2.4.7
|
|
Release: 7
|
|
License: BSD-like
|
|
Group: System/Servers
|
|
Url: http://www.samba.org/ppp/
|
|
Source0: ftp://ftp.samba.org/pub/ppp/%{name}-%{version}.tar.gz
|
|
Source1: ppp-2.4.3-pam.conf
|
|
Source2: ppp-2.4.1-mppe-crypto.tar.bz2
|
|
Source3: README.pppoatm
|
|
Source4: ppp.logrotate
|
|
Source5: ppp-dhcpc.tar.bz2
|
|
Source6: ppp-tmpfiles.conf
|
|
Source104: ip-down
|
|
Source105: ip-down.ipv6to4
|
|
Source106: ip-up
|
|
Source107: ip-up.ipv6to4
|
|
Source108: ipv6-down
|
|
Source109: ipv6-up
|
|
Source110: ifup-ppp
|
|
Source111: ifdown-ppp
|
|
Source112: ppp-watch.tar.xz
|
|
Patch0: ppp-2.4.7-make.patch
|
|
Patch1: ppp-2.3.6-sample.patch
|
|
Patch2: ppp-options.patch
|
|
Patch3: ppp-2.4.3-pppdump-Makefile.patch
|
|
Patch4: ppp-2.4.7-noexttraffic.patch
|
|
# (blino) use external libatm for pppoatm plugin
|
|
Patch5: ppp-2.4.3-libatm.patch
|
|
Patch6: ppp-2.4.2-pie.patch
|
|
Patch7: ppp-2.4.4-multipledefrt.patch
|
|
Patch8: ppp-2.4.4-dontwriteetc.patch
|
|
Patch9: ppp-2.4.3-pic.patch
|
|
Patch10: ppp-2.4.3-etcppp.patch
|
|
Patch11: ppp-2.4.5-includes-sha1.patch
|
|
Patch12: ppp-2.4.5-makeopt2.patch
|
|
Patch13: ppp-2.4.7-nostrip.patch
|
|
Patch14: ppp-2.4.7-linux48.patch
|
|
Patch15: ppp-2.4.7-eaptls-mppe-1.101_CVE-2018-11574.patch
|
|
BuildRequires: libtool
|
|
BuildRequires: atm-devel
|
|
BuildRequires: pcap-devel
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(libcrypto)
|
|
BuildRequires: pam-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: pkgconfig(systemd)
|
|
BuildRequires: glib2-devel
|
|
Requires(post): systemd
|
|
Requires: glibc >= 2.0.6
|
|
Requires: initscripts >= 9.54
|
|
|
|
%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.
|
|
|
|
The ppp package should be installed if your machine need to support
|
|
the PPP protocol.
|
|
|
|
%files
|
|
%doc FAQ PLUGINS README* scripts sample
|
|
%{_sbindir}/chat
|
|
%{_sbindir}/pppdump
|
|
%attr(5755,root,root) %{_sbindir}/pppd
|
|
%attr(0755,root,daemon) %{_sbindir}/pppstats
|
|
%{_sbindir}/ppp-watch
|
|
%dir %{_sysconfdir}/ppp
|
|
%{_sysconfdir}/ppp/ip-up
|
|
%{_sysconfdir}/ppp/ip-down
|
|
%{_sysconfdir}/ppp/ip-up.ipv6to4
|
|
%{_sysconfdir}/ppp/ip-down.ipv6to4
|
|
%{_sysconfdir}/ppp/ipv6-up
|
|
%{_sysconfdir}/ppp/ipv6-down
|
|
%config %{_sysconfdir}/ppp/eaptls-client
|
|
%config %{_sysconfdir}/ppp/eaptls-server
|
|
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp
|
|
%{_sysconfdir}/sysconfig/network-scripts/ifup-ppp
|
|
%{_mandir}/man*/*
|
|
%exclude %{_mandir}/man8/*rad*
|
|
%dir %{_libdir}/pppd
|
|
%{_libdir}/pppd/%{version}
|
|
%exclude %{_libdir}/pppd/%{version}/pppoatm.so
|
|
%exclude %{_libdir}/pppd/%{version}/rp-pppoe.so
|
|
%exclude %{_libdir}/pppd/%{version}/rad*
|
|
%exclude %{_libdir}/pppd/%{version}/dhcpc.so
|
|
%{_tmpfilesdir}/%{name}.conf
|
|
%ghost %dir %{_var}/run/ppp
|
|
%ghost %{_var}/run/ppp/resolv.conf
|
|
%attr(700, root, root) %dir %{_var}/log/ppp
|
|
%{_var}/log/ppp/*
|
|
%attr(0600,root,daemon) %config(noreplace) %{_sysconfdir}/ppp/chap-secrets
|
|
%attr(0600,root,daemon) %config(noreplace) %{_sysconfdir}/ppp/options
|
|
%attr(0600,root,daemon) %config(noreplace) %{_sysconfdir}/ppp/pap-secrets
|
|
%attr(0600,root,daemon) %{_sysconfdir}/ppp/connect-errors
|
|
%attr(0600,root,daemon) %{_sysconfdir}/ppp/resolv.conf
|
|
%attr(755,root,daemon) %dir %{_sysconfdir}/ppp/peers
|
|
%config(noreplace) %{_sysconfdir}/pam.d/ppp
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/ppp
|
|
|
|
%post
|
|
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package devel
|
|
Summary: PPP devel files
|
|
Group: Development/C
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description devel
|
|
PPP over ATM plugin for %{name}.
|
|
|
|
%files devel
|
|
%doc README*
|
|
%{_includedir}/pppd/*
|
|
%{multiarch_includedir}/pppd/pathnames.h
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package pppoatm
|
|
Summary: PPP over ATM plugin for %{name}
|
|
Group: System/Servers
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description pppoatm
|
|
PPP over ATM plugin for %{name}.
|
|
|
|
%files pppoatm
|
|
%doc README
|
|
%{_libdir}/pppd/%{version}/pppoatm.so
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package pppoe
|
|
Summary: PPP over ethernet plugin for %{name}
|
|
Group: System/Servers
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description pppoe
|
|
PPP over ethernet plugin for %{name}.
|
|
|
|
%files pppoe
|
|
%doc README
|
|
%{_libdir}/pppd/%{version}/rp-pppoe.so
|
|
%{_sbindir}/pppoe-discovery
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package radius
|
|
Summary: Radius plugin for %{name}
|
|
Group: System/Servers
|
|
Requires: %{name} = %{EVRD}
|
|
Requires: radiusclient-utils
|
|
|
|
%description radius
|
|
Radius plugin for %{name}.
|
|
|
|
%files radius
|
|
%doc README
|
|
%{_libdir}/pppd/%{version}/rad*.so
|
|
%{_mandir}/man8/*rad*
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%package dhcp
|
|
Summary: DHCP plugin for %{name}
|
|
Group: System/Servers
|
|
Requires: %{name} = %{EVRD}
|
|
|
|
%description dhcp
|
|
DHCP plugin for %{name}.
|
|
|
|
%files dhcp
|
|
%doc pppd/plugins/dhcp/README
|
|
%doc pppd/plugins/dhcp/AUTHORS
|
|
%doc pppd/plugins/dhcp/COPYING
|
|
%{_libdir}/pppd/%{version}/dhcpc.so
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch0 -p1 -b .make
|
|
%patch1 -p1 -b .sample
|
|
%patch2 -p1 -b .options
|
|
%patch3 -p1 -b .pppdump-Makefile
|
|
|
|
# (gg) add noext-traffic option
|
|
%patch4 -p1 -b .noext
|
|
|
|
%patch5 -p1 -b .libatm
|
|
%patch6 -p1 -b .pie
|
|
%patch7 -p1 -b .multipledefrt
|
|
|
|
tar -xjf %{SOURCE2}
|
|
pushd pppd/plugins
|
|
tar -xjf %{SOURCE5}
|
|
popd
|
|
|
|
%patch8 -p1 -b .dontwriteetc
|
|
|
|
%patch9 -p1 -b .pic
|
|
%patch10 -p1 -b .etcppp
|
|
%patch11 -p1 -b .incsha1
|
|
%patch12 -p1 -b .dhcp
|
|
%patch13 -p1 -b .nostrip
|
|
%patch14 -p1 -b .linux48
|
|
%patch15 -p1
|
|
|
|
tar -xJf %{SOURCE112}
|
|
|
|
# lib64 fixes
|
|
perl -pi -e "s|^(LIBDIR.*)\\\$\(DESTDIR\)/lib|\1\\\$(INSTROOT)%{_libdir}|g" pppd/Makefile.linux pppd/plugins/Makefile.linux pppd/plugins/{pppoatm,radius,rp-pppoe,pppol2tp}/Makefile.linux
|
|
perl -pi -e "s|(--prefix=/usr)|\1 --libdir=%{_libdir}|g" pppd/plugins/radius/Makefile.linux
|
|
perl -pi -e "/_PATH_PLUGIN/ and s,(?:/usr/lib|DESTDIR (\")/lib),\$1%{_libdir}," pppd/pathnames.h
|
|
# enable the dhcp plugin
|
|
perl -p -i -e "s|^(PLUGINS :=)|SUBDIRS += dhcp\n\$1|g" pppd/plugins/Makefile.linux
|
|
|
|
# fix /usr/local in scripts path
|
|
perl -pi -e "s|/usr/local/bin/pppd|%{_sbindir}/pppd|g;
|
|
s|/usr/local/bin/ssh|%{_bindir}/ssh|g;
|
|
s|/usr/local/bin/expect|%{_bindir}/expect|g" \
|
|
scripts/ppp-on-rsh \
|
|
scripts/ppp-on-ssh \
|
|
scripts/secure-card
|
|
|
|
%if %{with inet6}
|
|
perl -pi -e "s/#HAVE_INET6/HAVE_INET6/" pppd/Makefile.linux
|
|
%endif
|
|
|
|
%build
|
|
perl -pi -e "s/openssl/openssl -DOPENSSL_NO_SHA1/;" openssl/crypto/sha/Makefile
|
|
|
|
%configure2_5x
|
|
%make RPM_OPT_FLAGS="%{optflags}" LIBDIR=%{_libdir}
|
|
%make -C pppd/plugins -f Makefile.linux
|
|
%make -C ppp-watch %{?_smp_mflags}
|
|
|
|
%install
|
|
mkdir -p %{buildroot}{%{_sbindir},%{_bindir},/usr/X11R6/bin/,%{_mandir}/man8,%{_sysconfdir}/{ppp/peers,pam.d}}
|
|
|
|
%makeinstall LIBDIR=%{buildroot}%{_libdir}/pppd/%{version}/ INSTALL=install -C pppd/plugins/dhcp
|
|
%makeinstall INSTROOT=%{buildroot} SUBDIRS="pppoatm rp-pppoe radius pppol2tp"
|
|
%makeinstall ROOT=%{buildroot} mandir=/usr/share/man -C ppp-watch install
|
|
|
|
%multiarch_includes %{buildroot}%{_includedir}/pppd/pathnames.h
|
|
|
|
# (gg) Allow stripping
|
|
chmod u+w %{buildroot}%{_sbindir}/*
|
|
|
|
chmod go+r scripts/*
|
|
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/ppp
|
|
install -m 644 %{SOURCE3} %{_builddir}/%{name}-%{version}/
|
|
|
|
# (stew) fix permissions
|
|
chmod 0755 `find %{buildroot} -name "*\.so"`
|
|
|
|
# Provide pointers for people who expect stuff in old places
|
|
touch %{buildroot}%{_var}/log/ppp/connect-errors
|
|
touch %{buildroot}%{_var}/run/ppp/resolv.conf
|
|
ln -s ../../var/log/ppp/connect-errors %{buildroot}%{_sysconfdir}/ppp/connect-errors
|
|
ln -s ../../var/run/ppp/resolv.conf %{buildroot}%{_sysconfdir}/ppp/resolv.conf
|
|
|
|
# Logrotate script
|
|
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
|
|
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/ppp
|
|
|
|
# install tmpfiles conf
|
|
install -m644 -D %{SOURCE6} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|
|
|
# install scripts (previously owned by initscripts package)
|
|
install -d %{buildroot}%{_sysconfdir}/ppp
|
|
install -p %{SOURCE104} %{buildroot}%{_sysconfdir}/ppp/ip-down
|
|
install -p %{SOURCE105} %{buildroot}%{_sysconfdir}/ppp/ip-down.ipv6to4
|
|
install -p %{SOURCE106} %{buildroot}%{_sysconfdir}/ppp/ip-up
|
|
install -p %{SOURCE107} %{buildroot}%{_sysconfdir}/ppp/ip-up.ipv6to4
|
|
install -p %{SOURCE108} %{buildroot}%{_sysconfdir}/ppp/ipv6-down
|
|
install -p %{SOURCE109} %{buildroot}%{_sysconfdir}/ppp/ipv6-up
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/
|
|
install -p %{SOURCE110} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifup-ppp
|
|
install -p %{SOURCE111} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp
|