From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 01 Jul 2022 07:38:28 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o79MH-002gHH-68 for lore@lore.pengutronix.de; Fri, 01 Jul 2022 07:38:28 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1o79MJ-0007uP-Cb; Fri, 01 Jul 2022 07:38:27 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o79M1-0007u8-3R; Fri, 01 Jul 2022 07:38:09 +0200 Received: from [2a0a:edc0:0:1101:1d::39] (helo=dude03.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o79Lw-003j66-NF; Fri, 01 Jul 2022 07:38:08 +0200 Received: from mol by dude03.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1o79Lz-00FSPl-Hn; Fri, 01 Jul 2022 07:38:07 +0200 Date: Fri, 1 Jul 2022 07:38:07 +0200 From: Michael Olbrich To: Thorsten Scherer Message-ID: Mail-Followup-To: Thorsten Scherer , ptxdist@pengutronix.de, mkl@pengutronix.de References: <20220627120629.32925-1-t.scherer@eckelmann.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220627120629.32925-1-t.scherer@eckelmann.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] [PATCH] tpm2-tss: Fix conflict with SYSTEMD_UDEV_CUST_RULES X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: mkl@pengutronix.de, ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Mon, Jun 27, 2022 at 02:06:29PM +0200, Thorsten Scherer wrote: > The target root.tgz fails with: > > * check_data_file_clashes: Package systemd wants to install file > /platform-/build-target/image-root-tgz/usr/lib/udev/rules.d/70-tpm-udev.rules > But that file is already provided by package * tpm2-tss > > Add a check to avoid conflicts. Nack. With this patch, if you have files in projectroot/usr/lib/udev/rules.d/70-tpm-udev.rules/ in your BSP but no custom 70-tpm-udev.rules there, then 70-tpm-udev.rules will not be installed at all. SYSTEMD_UDEV_CUST_RULES is broken. It will conflict with other packages that want to install udev rules in various ways and there is no way to fix this. You need to be very careful where you put udev rules. Or better, don't use SYSTEMD_UDEV_CUST_RULES and install the rule with whatever package that actually needs it. Michael > Signed-off-by: Thorsten Scherer > --- > rules/tpm2-tss.in | 12 ++++++++++++ > rules/tpm2-tss.make | 2 ++ > 2 files changed, 14 insertions(+) > > diff --git a/rules/tpm2-tss.in b/rules/tpm2-tss.in > index 75d32188c..8eeb4b5c7 100644 > --- a/rules/tpm2-tss.in > +++ b/rules/tpm2-tss.in > @@ -22,3 +22,15 @@ config TPM2_TSS > This package contains the TSS and TCTI libraries that client > applications will link against when they require accessing > the TPM. > + > +if TPM2_TSS > + > +comment "tpm2-tss install udev rules conflicts SYSTEMD_UDEV_CUST_RULES" > + depends on SYSTEMD_UDEV_CUST_RULES > + > +config TPM2_TSS_INSTALL_UDEV_RULES > + bool > + prompt "tpm2-tss install udev rules" > + depends on !SYSTEMD_UDEV_CUST_RULES > + > +endif > diff --git a/rules/tpm2-tss.make b/rules/tpm2-tss.make > index 7e0b4ff52..8c948a57a 100644 > --- a/rules/tpm2-tss.make > +++ b/rules/tpm2-tss.make > @@ -92,8 +92,10 @@ $(STATEDIR)/tpm2-tss.targetinstall: > @$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-tctildr) > @$(call install_lib, tpm2-tss, 0, 0, 0644, libtss2-rc) > > +ifdef TPM2_TSS_INSTALL_UDEV_RULES > @$(call install_alternative, tpm2-tss, 0, 0, 0644, \ > /usr/lib/udev/rules.d/70-tpm-udev.rules) > +endif > > @$(call install_finish, tpm2-tss) > > -- > 2.30.2 > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |