From nobody Tue Feb 10 02:46:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1686152455; cv=none; d=zohomail.com; s=zohoarc; b=LTjsbsdiFHq7TTNaP8YKYhOV8pTqcXpRi+OuNZHKLhzpGmHJtkhqRaCUjwg6u0rfD8lCyMPlPpCyK+YOgOCQSHXBOOmbJhvpEbVBXqzGUG2ZdnAXK+JEPBaO5OQvbaBPwMuv+xzT0IEZKgwxBHbOeeCBzf2Bx8bbM3LdCLICKEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686152455; 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; bh=z/9JX34g/N6yDbFdrc+pWPCOUxY5mC91y95rCrP00K4=; b=WexZTPdSMKU/NCrNNQuZ35AkXP+yRZgWhk2TpRylgl8JQkUgxRj1/Y5yfOPrHzjNtO896n94+NOdXmO7L9Y2op+kaJuUcPC9X5m0o3kN95xfFVsxb8EGVLc82fqNp4KPkeoU26vlTOCK7/OXNao4ZcPCF3/u7y9r1Vu92fQYNo8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1686152455959171.55596778422807; Wed, 7 Jun 2023 08:40:55 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-571-eLLdSFrcNYSeYdeKnKwF8w-1; Wed, 07 Jun 2023 11:40:51 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06923280AA3E; Wed, 7 Jun 2023 15:40:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1E49407DEC3; Wed, 7 Jun 2023 15:40:47 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 684AA19452C3; Wed, 7 Jun 2023 15:40:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1BCAB19465BA for ; Wed, 7 Jun 2023 15:00:29 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DDD5CC16044; Wed, 7 Jun 2023 15:00:28 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D6619C1603B for ; Wed, 7 Jun 2023 15:00:28 +0000 (UTC) Received: from us-smtp-inbound-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7B908002BF for ; Wed, 7 Jun 2023 15:00:28 +0000 (UTC) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-199-UKRLAxksM4SYhwt4k6zA3A-1; Wed, 07 Jun 2023 11:00:27 -0400 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-516a17e29efso268589a12.1 for ; Wed, 07 Jun 2023 08:00:27 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id f3-20020a056402150300b00514b99afa57sm6476581edw.44.2023.06.07.08.00.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:00:25 -0700 (PDT) Received: from wheatley.. (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 0230111A3AC98; Wed, 7 Jun 2023 17:00:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686152454; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=z/9JX34g/N6yDbFdrc+pWPCOUxY5mC91y95rCrP00K4=; b=GiwOhUF28QvAe4V4QojBpAcpq8+Cekn59wboDZiso+5baoZvkw5nxtNxoijTcFAFmdja/g NIwPKxaIp36/wrHcWFZYd6lYa2oPdUxpYIhpj6F8cSNU3oFrp3QK6sauw8OLNry8Hy0N6/ 2qvPwtKxZlssDP0TRHFu1P63lvSpMLc= X-MC-Unique: eLLdSFrcNYSeYdeKnKwF8w-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: UKRLAxksM4SYhwt4k6zA3A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686150026; x=1688742026; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z/9JX34g/N6yDbFdrc+pWPCOUxY5mC91y95rCrP00K4=; b=T/O30x+BTM3Y3FX8Tv9Af3SKVJKp/3D8lFStCXkHLpzlpgea46Skvl2J/mr5WDV9O3 ftAyCaENTAW6QzJrwo41Gf0RYOyp3nLHMWnilhnqU6AXr4GKzpE0VX8ZhTTQUny0Gu8H ifAdlLcypzATWCYwx7GIFh5ngHtEoRx1pzNXcUztF0mkg4Ox0QAPes+Evo0K3SQGe1s0 4glgwR7pYeHGeq46mWQoNB+3bOoi568vXfVi1mgHiZSKYANSnx4ZdEPxrsAWsFtIQb5p gwSm/wpGaAEqjQEmr5AmMr7v6Jr9T6c6rgFaAtliUoLZHDnzyvQIFQVF+VFwHB9mAoJ4 lMpg== X-Gm-Message-State: AC+VfDyyo1nE674YlBel1iPMo4DsxSIhdFFsKbBZkAhIEQS8uegLVqHe RsMviRyrQwPa0UR9la3nWY8HJ1lHvLD/0ws1eRLZXL1wkmevOdVPzrBHSl/5ojqubVRT/RpQ76l K/qLUNd/VDespi8QzOnqoLzRpJbuKFzQoIF0/5pVMRwB4TzRo/ekRYOAf45F17OtmTRgsVOepLw U+Qqnyyw== X-Received: by 2002:aa7:cd7c:0:b0:513:53f7:8ca2 with SMTP id ca28-20020aa7cd7c000000b0051353f78ca2mr4490959edb.9.1686150026231; Wed, 07 Jun 2023 08:00:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7XKYjFPvu7Z/oVlIm+GrnyD1HwFMNBlq4922WOgxrIARk4IiudmFlT1Byu8uOSZTg20WZnZQ== X-Received: by 2002:aa7:cd7c:0:b0:513:53f7:8ca2 with SMTP id ca28-20020aa7cd7c000000b0051353f78ca2mr4490941edb.9.1686150025850; Wed, 07 Jun 2023 08:00:25 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH] spec: Do not disable some systemd units of newly split package Date: Wed, 7 Jun 2023 16:31:36 +0200 Message-ID: <950c78ff211268cf46c08bd3890e5d99ce4600d4.1686148296.git.mkletzan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1686152491142100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Since virtproxyd was split into libvirt-daemon-proxy package it can happen that, in case a distribution has such systemd preset, when installing this package, already pre-enabled and configured units like -tls.socket and -tcp.socket will get disabled. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D2210058 Fixes: 5358618b1cd0afc126aed313249bf2134731665f Signed-off-by: Martin Kletzander Reviewed-by: Michal Privoznik --- This is more like an RFC as I would really like to know what to really do in this case. What happens, basically, is that if you have libvirt-daemon-9.0= .0 and set up virtproxyd-tls.socket for example and then upgrade to anything n= ewer, then the package libvirt-daemon-proxy will get installed. The %post action calls "%libvirt_daemon_systemd_post_inet virtproxyd" which calls "%systemd_= post with all virtproxyd units. What %systemd_post is supposed to do is reset u= nits to a preset state in the case of package installation, but not during upgra= de. However the libvirt-daemon-proxy package did not exist on the system before= , so this action is not an update, but an installation. If no preset is mentioned for a unit then `systemctl preset` does not change anything. However some distros might have a catch-all preset "disable *" f= or some reason, I guess based on an example in the documentation, and there is= no way to override an already configured preset, you can only enable or disabl= e a unit in a preset. That all means than it can happen that you enable virtproxyd-tcp.socket, for example, then update your system and find that it is disabled. There are various ways to deal with this, but I don't see any one that would 100% sat= isfy me with regards to all the issues and at the same time could be implemented "soon enough" given libvirt already had three releases with the libvirt-daemon-proxy split. libvirt.spec.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 1f77cd90b772..50f521b7ce88 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1592,7 +1592,13 @@ fi =20 %post daemon-proxy %if %{with_modular_daemons} -%libvirt_daemon_systemd_post_inet virtproxyd +# Since this was split into a different package, a transparent update for = the +# virtproxyd units could actually disable an already configured ones +# (e.g. virtproxyd-tls.socket) as %systemd_post runs `systemctl preset` if= this +# is an installation (and is skipped on update). So skip this step for th= ose +# that need an extra setup to work since they will most likely not be pres= et to +# enabled, but that is up to the point of the distribution. +%libvirt_daemon_systemd_post virtproxyd %endif =20 %preun daemon-proxy --=20 2.41.0