Accepting request 544629 from home:13ilya:branches:network

- Add Requires/Requires(pre) group(dialout) (boo#1067511).
- Add %verify_permissions script for pppoe-wrapper.

OBS-URL: https://build.opensuse.org/request/show/544629
OBS-URL: https://build.opensuse.org/package/show/network/rp-pppoe?expand=0&rev=20
This commit is contained in:
Илья Индиго 2017-11-23 14:10:00 +00:00 committed by Git OBS Bridge
parent 383423f000
commit 700cc2f71b
3 changed files with 19 additions and 3 deletions

View File

@ -3,6 +3,7 @@ Description=PPPoE Server.
After=syslog.target After=syslog.target
[Service] [Service]
Group=dialout
ExecStart=/usr/sbin/pppoe-server ExecStart=/usr/sbin/pppoe-server
[Install] [Install]

View File

@ -1,7 +1,8 @@
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 23 11:26:52 UTC 2017 - ilya@ilya.pp.ua Thu Nov 23 14:06:28 UTC 2017 - ilya@ilya.pp.ua
- Add Requires/Requires(pre) group(dialout) (boo#1067511). - Add Requires/Requires(pre) group(dialout) (boo#1067511).
- Add %verify_permissions script for pppoe-wrapper.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 9 12:53:45 UTC 2017 - ilya@ilya.pp.ua Thu Nov 9 12:53:45 UTC 2017 - ilya@ilya.pp.ua

View File

@ -16,6 +16,7 @@
# #
%define _name pppoe %define _name pppoe
%define _group dialout
Name: rp-%{_name} Name: rp-%{_name}
Version: 3.12 Version: 3.12
Release: 0 Release: 0
@ -41,10 +42,15 @@ Patch6: %{name}-pie.patch
Patch7: strip.diff Patch7: strip.diff
BuildRequires: ppp BuildRequires: ppp
BuildRequires: systemd BuildRequires: systemd
Requires: group(dialout)
Requires: net-tools Requires: net-tools
Requires: ppp Requires: ppp
Requires(pre): group(dialout) Requires(post): permissions
%if 0%{?suse_version} >= 1330
Requires: group(%{_group})
Requires(pre): group(%{_group})
%else
Requires(pre): shadow
%endif
%description %description
%{name} is a user-space redirector which permits the use of PPPoE %{name} is a user-space redirector which permits the use of PPPoE
@ -92,6 +98,9 @@ mv %{buildroot}%{_sysconfdir}/ppp/plugins/README %{buildroot}%{_defaultdocdir}/%
rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins
%pre %pre
%if 0%{?suse_version} < 1330
getent group %{_group} >/dev/null || %{_sbindir}/groupadd -r %{_group}
%endif
%service_add_pre %{_name}.service %service_add_pre %{_name}.service
%service_add_pre %{_name}-server.service %service_add_pre %{_name}-server.service
@ -102,11 +111,15 @@ rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins
%post %post
%service_add_post %{_name}.service %service_add_post %{_name}.service
%service_add_post %{_name}-server.service %service_add_post %{_name}-server.service
%set_permissions %{_sbindir}/%{_name}-wrapper
%postun %postun
%service_del_postun %{_name}.service %service_del_postun %{_name}.service
%service_del_postun %{_name}-server.service %service_del_postun %{_name}-server.service
%verifyscript
%verify_permissions -e %{_sbindir}/%{_name}-wrapper
%files %files
%dir %{_defaultdocdir}/%{name} %dir %{_defaultdocdir}/%{name}
%doc %{_defaultdocdir}/%{name}/* %doc %{_defaultdocdir}/%{name}/*
@ -154,5 +167,6 @@ rm -rf %{buildroot}%{_sysconfdir}/ppp/plugins
%{_datarootdir}/tk%{_name}/props-options.png %{_datarootdir}/tk%{_name}/props-options.png
%{_datarootdir}/tk%{_name}/en.msg %{_datarootdir}/tk%{_name}/en.msg
%{_datarootdir}/tk%{_name}/ja.msg %{_datarootdir}/tk%{_name}/ja.msg
%verify(not mode caps) %attr(4750,root,dialout) %{_sbindir}/%{_name}-wrapper
%changelog %changelog