diff --git a/ebtables.changes b/ebtables.changes index a9b717a..4d988f6 100644 --- a/ebtables.changes +++ b/ebtables.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Sep 2 14:23:48 UTC 2020 - Dominique Leuenberger + +- 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 diff --git a/ebtables.service b/ebtables.service index fa24404..8deb225 100644 --- a/ebtables.service +++ b/ebtables.service @@ -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 diff --git a/ebtables.spec b/ebtables.spec index f56f7eb..e2c14a8 100644 --- a/ebtables.spec +++ b/ebtables.spec @@ -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