From ae3507c662ee257dcc5f3438cb1054060006249a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 6 Oct 2015 04:30:30 +0200 Subject: [PATCH] Move iptables symlink creation to %posttrans Previous (< 2.1.66) version of the package owned /etc/sysconfig/iptables, the current on doesn't. This means that during update, the file will be removed during cleanup phase. Since cleanup is executing after %post, it will also remove symlink created there. So move that code to %posttrans, which is executed after cleanup phase. Fixes QubesOS/qubes-issues#1278 --- rpm_spec/core-vm.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index ffcec4d..5d26658 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -263,15 +263,6 @@ EOF fi fi -# Make sure that /etc/sysconfig/ip(|6)tables exists. Otherwise iptales.service -# would not start (even when configured to use another configuration file. -if [ ! -e '/etc/sysconfig/iptables' ]; then - ln -s iptables.qubes /etc/sysconfig/iptables -fi -if [ ! -e '/etc/sysconfig/ip6tables' ]; then - ln -s ip6tables.qubes /etc/sysconfig/ip6tables -fi - # ensure that hostname resolves to 127.0.0.1 resp. ::1 and that /etc/hosts is # in the form expected by qubes-sysinit.sh @@ -376,6 +367,15 @@ fi %posttrans /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +# Make sure that /etc/sysconfig/ip(|6)tables exists. Otherwise iptales.service +# would not start (even when configured to use another configuration file. +if [ ! -e '/etc/sysconfig/iptables' ]; then + ln -s iptables.qubes /etc/sysconfig/iptables +fi +if [ ! -e '/etc/sysconfig/ip6tables' ]; then + ln -s ip6tables.qubes /etc/sysconfig/ip6tables +fi + %clean rm -rf $RPM_BUILD_ROOT rm -f %{name}-%{version}