From nobody Tue May 7 17:49:28 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1558437405; cv=none; d=zoho.com; s=zohoarc; b=EVrpze+uM9rjP1jobEcEoICTV46tk6Bbm50avEYYZ2EHEFryM5FJkoZRLD9KN0Kp4kjX80idSRQBJh1L7q0kYVN/f4TUJHeuM00O8jyd32x9uxI4jdNYfqmP9/TbvFG8y/AORzdL4ysmO4Of1IgUdJFk31huqNeBRCY5W5DIZf0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558437405; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=veSSE32XoxEQAiNktOJMbjbgMiCNscj7EOw/b7ACjsQ=; b=RUBMBSnA8K9ohccjBsYZvODEb2mN89asYYwWx3piVExVIM8BXdC57XoAG6PcxeJxhSUJXbGdZmzfAe5rdNRbOWl9PtAu8Al+7dtIbJ89U2geXch/pH9z3gypS3RloWAfmZP4KdxI3WkoXmEprjxVtUsMpxE0IBdRjZ14dBtrYAk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1558437405214278.07558382611774; Tue, 21 May 2019 04:16:45 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F6EDC09AD1C; Tue, 21 May 2019 11:16:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45BD060FD6; Tue, 21 May 2019 11:16:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 443BC1806B0F; Tue, 21 May 2019 11:15:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4LBFiiQ003357 for ; Tue, 21 May 2019 07:15:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3440A19C5B; Tue, 21 May 2019 11:15:44 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.188]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09FD327CBA for ; Tue, 21 May 2019 11:15:37 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 8D54A101F39; Tue, 21 May 2019 13:15:36 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Tue, 21 May 2019 13:15:35 +0200 Message-Id: <8985520e762a086873a6339fab0b4591a5692ff2.1558437335.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] spec: Unconditionally set ownership of /var/lib/libvirt/sanlock X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 21 May 2019 11:16:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The libvirt-lock-sanlock subpackage requires sanlock to be installed first and the sanlock package creates the sanlock group on all distros we care about in the spec file (Fedora and RHEL >=3D 7). Thus instead of setting the ownership and permissions in a post scriptlet only when the sanlock group exists we can just install the directory with the appropriate metadata. https://bugzilla.redhat.com/show_bug.cgi?id=3D1702758 Signed-off-by: Jiri Denemark --- libvirt.spec.in | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index b159c50d8f..5bd3e30509 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1479,14 +1479,6 @@ exit 0 %postun client %systemd_postun libvirt-guests.service =20 -%if %{with_sanlock} -%post lock-sanlock -if getent group sanlock > /dev/null ; then - chmod 0770 %{_localstatedir}/lib/libvirt/sanlock - chown root:sanlock %{_localstatedir}/lib/libvirt/sanlock -fi -%endif - %if %{with_lxc} %pre login-shell getent group virtlogin >/dev/null || groupadd -r virtlogin @@ -1739,7 +1731,7 @@ exit 0 %attr(0755, root, root) %{_libdir}/libvirt/lock-driver/sanlock.so %{_datadir}/augeas/lenses/libvirt_sanlock.aug %{_datadir}/augeas/lenses/tests/test_libvirt_sanlock.aug -%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/sanlock +%dir %attr(0770, root, sanlock) %{_localstatedir}/lib/libvirt/sanlock %{_sbindir}/virt-sanlock-cleanup %{_mandir}/man8/virt-sanlock-cleanup.8* %attr(0755, root, root) %{_libexecdir}/libvirt_sanlock_helper --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list