%define _disable_ld_no_undefined %nil %define _rundir /var/run %define commit 812e8e5c87da4fd84ae7bc5b6a18c85106188eb3 %define githash %(c=%{commit}; echo ${c:0:7}) Summary: The PPP daemon and documentation Name: ppp Version: 2.5.2 Release: 1 License: BSD Group: System/Servers URL: https://github.com/ppp-project/ppp Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1000: %{name}.rpmlintrc Source1: ppp-pam.conf Source2: ppp-logrotate.conf Source3: ppp-tmpfiles.conf Source4: ip-down Source5: ip-down.ipv6to4 Source6: ip-up Source7: ip-up.ipv6to4 Source8: ipv6-down Source9: ipv6-up Source10: ifup-ppp Source11: ifdown-ppp Source12: ppp-watch.tar.xz Patch0002: ppp-2.4.9-config.patch Patch0004: 0004-doc-add-configuration-samples.patch Patch0005: ppp-2.4.9-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch Patch0006: 0006-scritps-use-change_resolv_conf-function.patch Patch0011: 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch Patch0012: ppp-2.4.8-pppd-we-don-t-want-to-accidentally-leak-fds.patch Patch0013: ppp-2.4.9-everywhere-O_CLOEXEC-harder.patch Patch0014: 0014-everywhere-use-SOCK_CLOEXEC-when-creating-socket.patch Patch0015: 0015-pppd-move-pppd-database-to-var-run-ppp.patch Patch0016: 0016-rp-pppoe-add-manpage-for-pppoe-discovery.patch Patch0018: 0018-scritps-fix-ip-up.local-sample.patch Patch0020: 0020-pppd-put-lock-files-in-var-lock-ppp.patch Patch0023: 0023-build-sys-install-rp-pppoe-plugin-files-with-standar.patch Patch0024: 0024-build-sys-install-pppoatm-plugin-files-with-standard.patch Patch0025: ppp-2.4.8-pppd-install-pppd-binary-using-standard-perms-755.patch Patch0026: ppp-2.4.9-configure-cflags-allow-commas.patch BuildRequires: autoconf BuildRequires: libtool BuildRequires: atm-devel BuildRequires: pkgconfig(libpcap) BuildRequires: pkgconfig(openssl3.3) #BuildRequires: pkgconfig(libcrypto) BuildRequires: pkgconfig(libsasl2) BuildRequires: pam-devel #BuildRequires: openssl-devel BuildRequires: pkgconfig(systemd) BuildRequires: glib2-devel Requires(post): systemd Requires: glibc >= 2.0.6 Requires: initscripts >= 9.54 Conflicts: %{name} < 2.4.9 Obsoletes: %{name} < 2.4.9 Conflicts: %{name}-dhcp < 2.4.9 Obsoletes: %{name}-dhcp < 2.4.9 %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 README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample README.eap-tls %{_sbindir}/chat %{_sbindir}/pppd %{_sbindir}/pppdump %{_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 #{_sysconfdir}/ppp/openssl.cnf %{_mandir}/man8/chat.8* %{_mandir}/man8/pppd.8* %{_mandir}/man8/pppdump.8* %{_mandir}/man8/pppstats.8* %{_mandir}/man8/pppoe-discovery.8* %{_mandir}/man8/ppp-watch.8* %{_libdir}/pppd/%{version}/minconn.so %{_libdir}/pppd/%{version}/openl2tp.so #{_libdir}/pppd/%{version}/passprompt.so %{_libdir}/pppd/%{version}/passwordfd.so %{_libdir}/pppd/%{version}/pppol2tp.so %{_libdir}/pppd/%{version}/winbind.so %ghost %dir %{_rundir}/ppp %ghost %dir %{_rundir}/lock/ppp %dir %{_sysconfdir}/logrotate.d %attr(700, root, root) %dir %{_localstatedir}/log/ppp #config(noreplace) %{_sysconfdir}/ppp/eaptls-client #config(noreplace) %{_sysconfdir}/ppp/eaptls-server #config(noreplace) %{_sysconfdir}/ppp/chap-secrets #config(noreplace) %{_sysconfdir}/ppp/options #config(noreplace) %{_sysconfdir}/ppp/pap-secrets %config(noreplace) %{_sysconfdir}/pam.d/ppp %config(noreplace) %{_sysconfdir}/logrotate.d/ppp %{_tmpfilesdir}/ppp.conf %{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp %{_sysconfdir}/sysconfig/network-scripts/ifup-ppp %config(noreplace) %{_sysconfdir}/ppp/chap-secrets.example %config(noreplace) %{_sysconfdir}/ppp/eaptls-client.example %config(noreplace) %{_sysconfdir}/ppp/eaptls-server.example %config(noreplace) %{_sysconfdir}/ppp/openssl.cnf.example %config(noreplace) %{_sysconfdir}/ppp/options.example %config(noreplace) %{_sysconfdir}/ppp/pap-secrets.example # scripts pon/poff/plog %{_sbindir}/pon %{_sbindir}/poff %{_sbindir}/plog %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/* %{_libdir}/pkgconfig/pppd.pc #---------------------------------------------------------------------------- %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}/pppoe.so #{_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* #---------------------------------------------------------------------------- %prep %setup -q #autopatch -p1 #apply_patches tar -xJf %{SOURCE12} %build export OPENSSL_DIR=/opt/openssl3.3 ./autogen.sh %configure \ --prefix=%{_prefix} \ --exec-prefix=%{_prefix} \ --libdir=%{_libdir} \ --with-plugin-dir=\$\{prefix\}/%{_lib}/pppd/%{version} \ --with-runtime-dir=\$\{localstatedir\}/run/pppd \ --enable-systemd \ --enable-cbcp \ --enable-ipxcp \ --enable-mslanman \ --enable-microsoft-extensions \ --enable-ipv6-support \ --enable-plugins \ --enable-eaptls \ --enable-multilink \ --enable-openssl-engine \ OPENSSL_LDFLAGS="-L/opt/openssl3.3/%{_lib}" \ --with-openssl=/opt/openssl3.3 #configure #--cflags="$RPM_OPT_FLAGS -fPIC -Wall -fno-strict-aliasing" #make_build LDFLAGS="%{ldflags} -pie" # #make_build -C ppp-watch LDFLAGS="%{ldflags} -pie" #make #configure --cflags="$RPM_OPT_FLAGS -fPIC -Wall -fno-strict-aliasing" %make_build LDFLAGS="%{ldflags} -pie" %make_build -C ppp-watch LDFLAGS="%{ldflags} -pie" %install #makeinstall #make INSTROOT=%{buildroot} install install-etcppp %makeinstall find scripts -type f | xargs chmod a-x %make ROOT=%{buildroot} -C ppp-watch install # create log files dir install -d %{buildroot}%{_localstatedir}/log/ppp # install pam config install -d %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/ppp # install logrotate script install -d %{buildroot}%{_sysconfdir}/logrotate.d install -m 644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/ppp # install tmpfiles drop-in install -d %{buildroot}%{_tmpfilesdir} install -m 644 -p %{SOURCE3} %{buildroot}%{_tmpfilesdir}/ppp.conf # install scripts (previously owned by initscripts package) install -d %{buildroot}%{_sysconfdir}/ppp install -p %{SOURCE4} %{buildroot}%{_sysconfdir}/ppp/ip-down install -p %{SOURCE5} %{buildroot}%{_sysconfdir}/ppp/ip-down.ipv6to4 install -p %{SOURCE6} %{buildroot}%{_sysconfdir}/ppp/ip-up install -p %{SOURCE7} %{buildroot}%{_sysconfdir}/ppp/ip-up.ipv6to4 install -p %{SOURCE8} %{buildroot}%{_sysconfdir}/ppp/ipv6-down install -p %{SOURCE9} %{buildroot}%{_sysconfdir}/ppp/ipv6-up install -d %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ install -p %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifup-ppp install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp # ghosts mkdir -p %{buildroot}%{_rundir}/ppp mkdir -p %{buildroot}%{_rundir}/lock/ppp install -Dm0755 scripts/pon %{buildroot}%{_sbindir}/pon install -Dm0755 scripts/poff %{buildroot}%{_sbindir}/poff install -Dm0755 scripts/plog %{buildroot}%{_sbindir}/plog # clean *.a find %{buildroot} -type f -name "*.a" -exec rm -rf {} \; # create symlink rp-pppoe.so #pushd %{buildroot}%{_libdir}/pppd/%{version} #ln -s pppoe.so rp-pppoe.so #popd