Accepting request 831476 from home:dimstar:Factory

- Have the source .service file hold a placeholder for LIBEXECDIR,
  which we replace during build/install phase, allowing the package
  to be used no matter what value %{_libexecdir} has.

OBS-URL: https://build.opensuse.org/request/show/831476
OBS-URL: https://build.opensuse.org/package/show/security:netfilter/ebtables?expand=0&rev=72
This commit is contained in:
Kristyna Streitova 2020-09-02 15:26:54 +00:00 committed by Git OBS Bridge
parent 70a537fd93
commit 92263e6f79
3 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Sep 2 14:23:48 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Have the source .service file hold a placeholder for LIBEXECDIR,
which we replace during build/install phase, allowing the package
to be used no matter what value %{_libexecdir} has.
-------------------------------------------------------------------
Tue Sep 1 12:11:49 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>

View File

@ -4,8 +4,8 @@ Description=Ethernet Bridge Filtering tables
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/libexec/ebtables-helper start
ExecStop=/usr/libexec/ebtables-helper stop
ExecStart=@LIBEXECDIR@/ebtables-helper start
ExecStop=@LIBEXECDIR@/ebtables-helper stop
[Install]
WantedBy=multi-user.target

View File

@ -87,6 +87,7 @@ mkdir -p "%{buildroot}/%{_sysconfdir}/init.d"
mkdir -p %{buildroot}%{_fillupdir}
mkdir -p %{buildroot}%{_unitdir}
install -p %_sourcedir/ebtables.service %{buildroot}%{_unitdir}/
sed -i "s|@LIBEXECDIR@|%{_libexecdir}|g" %{buildroot}%{_unitdir}/*.service
chmod -x %{buildroot}%{_unitdir}/*.service
mkdir -p %{buildroot}%{_libexecdir}
install -m0755 %_sourcedir/ebtables.systemd %{buildroot}%{_libexecdir}/%{name}-helper
@ -129,7 +130,8 @@ fi
%files
%defattr(-,root,root)
%doc COPYING ChangeLog
%license COPYING
%doc ChangeLog
%{_mandir}/man8/ebtables*.8*
%{_libexecdir}/%{name}-helper
%{_unitdir}/%{name}.service