mirror of
https://abf.rosa.ru/djam/ppp.git
synced 2025-02-23 06:03:01 +00:00
Properly handle directory and files in /var/run
This commit is contained in:
parent
a0c9c7039c
commit
675f5f908f
2 changed files with 22 additions and 12 deletions
2
ppp-tmpfiles.conf
Normal file
2
ppp-tmpfiles.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
d /var/run/ppp 0755 root root -
|
||||
f /var/run/ppp/resolv.conf 0644 root root -
|
32
ppp.spec
32
ppp.spec
|
@ -3,7 +3,7 @@
|
|||
Summary: The PPP daemon and documentation
|
||||
Name: ppp
|
||||
Version: 2.4.7
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: BSD-like
|
||||
Group: System/Servers
|
||||
Url: http://www.samba.org/ppp/
|
||||
|
@ -13,6 +13,7 @@ Source2: ppp-2.4.1-mppe-crypto.tar.bz2
|
|||
Source3: README.pppoatm
|
||||
Source4: ppp.logrotate
|
||||
Source5: ppp-dhcpc.tar.bz2
|
||||
Source6: ppp-tmpfiles.conf
|
||||
Patch0: ppp-2.4.7-make.patch
|
||||
Patch1: ppp-2.3.6-sample.patch
|
||||
Patch2: ppp-options.patch
|
||||
|
@ -33,6 +34,7 @@ BuildRequires: atm-devel
|
|||
BuildRequires: pcap-devel
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pam-devel
|
||||
Requires(post): systemd
|
||||
|
||||
%description
|
||||
The ppp package contains the PPP (Point-to-Point Protocol) daemon
|
||||
|
@ -57,10 +59,11 @@ the PPP protocol.
|
|||
%exclude %{_libdir}/pppd/%{version}/rad*
|
||||
%exclude %{_libdir}/pppd/%{version}/dhcpc.so
|
||||
%dir %{_sysconfdir}/ppp
|
||||
%dir /var/run/ppp
|
||||
/var/run/ppp/*
|
||||
%attr(700, root, root) %dir /var/log/ppp
|
||||
/var/log/ppp/*
|
||||
%{_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
|
||||
|
@ -68,7 +71,10 @@ the PPP protocol.
|
|||
%attr(0600,root,daemon) %{_sysconfdir}/ppp/resolv.conf
|
||||
%attr(755,root,daemon) %dir %{_sysconfdir}/ppp/peers
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/ppp
|
||||
%config(noreplace) /etc/logrotate.d/ppp
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/ppp
|
||||
|
||||
%post
|
||||
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@ -220,12 +226,14 @@ install -m 644 %{SOURCE3} %{_builddir}/%{name}-%{version}/
|
|||
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}/etc/ppp/connect-errors
|
||||
ln -s ../../var/run/ppp/resolv.conf %{buildroot}/etc/ppp/resolv.conf
|
||||
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}/etc/logrotate.d
|
||||
install -m 644 %{SOURCE4} %{buildroot}/etc/logrotate.d/ppp
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue