* [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule
@ 2021-06-25 11:15 Alexander Dahl
2021-06-25 11:22 ` Michael Olbrich
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2021-06-25 11:15 UTC (permalink / raw)
To: distrokit
If DistroKit is used as a base layer and any upper layer enables
PTXCONF_SYSTEMD_UDEV_CUST_RULES, package installation might fail because
both packages, 'systemd' and 'datapartition' try to targetinstall
'usr/lib/udev/rules.d/91-mkfs-ext4.rules', like this:
Collected errors:
* check_data_file_clashes: Package datapartition wants to install file /home/adahl/Work/bsp/xxx/base/platform-v7a/build-target/image-root-tgz/usr/lib/udev/rules.d/91-mkfs-ext4.rules
But that file is already provided by package * systemd
* opkg_solver_install: Cannot install package datapartition.
make: *** [/usr/local/lib/ptxdist-2021.02.0/rules/image-root-tgz.make:30: /home/adahl/Work/bsp/xxx/base/platform-v7a/images/root.tgz] Error 255
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
configs/ptxconfig | 2 +-
rules/datapartition.make | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/configs/ptxconfig b/configs/ptxconfig
index c97e321..a4fa7e9 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -1437,7 +1437,7 @@ PTXCONF_SYSTEMD_ZSTD=y
#
PTXCONF_SYSTEMD_UDEV_DRIVERS_RULES=y
# PTXCONF_SYSTEMD_UDEV_HWDB is not set
-# PTXCONF_SYSTEMD_UDEV_CUST_RULES is not set
+PTXCONF_SYSTEMD_UDEV_CUST_RULES=y
# end of install options
#
diff --git a/rules/datapartition.make b/rules/datapartition.make
index b79bcf0..7f3c992 100644
--- a/rules/datapartition.make
+++ b/rules/datapartition.make
@@ -28,8 +28,6 @@ $(STATEDIR)/datapartition.targetinstall:
@$(call install_alternative, datapartition, 0, 0, 0644, \
/usr/lib/systemd/system/systemd-autoformat@.service)
- @$(call install_alternative, datapartition, 0, 0, 0644, \
- /usr/lib/udev/rules.d/91-mkfs-ext4.rules)
@$(call install_finish,datapartition)
base-commit: 085bb9b4273c8fd91105d9e149776f144f5fdd65
--
2.30.2
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule
2021-06-25 11:15 [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule Alexander Dahl
@ 2021-06-25 11:22 ` Michael Olbrich
2021-06-25 11:29 ` Alexander Dahl
0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2021-06-25 11:22 UTC (permalink / raw)
To: distrokit
Hi,
On Fri, Jun 25, 2021 at 01:15:46PM +0200, Alexander Dahl wrote:
> If DistroKit is used as a base layer and any upper layer enables
> PTXCONF_SYSTEMD_UDEV_CUST_RULES, package installation might fail because
> both packages, 'systemd' and 'datapartition' try to targetinstall
> 'usr/lib/udev/rules.d/91-mkfs-ext4.rules', like this:
>
> Collected errors:
> * check_data_file_clashes: Package datapartition wants to install file /home/adahl/Work/bsp/xxx/base/platform-v7a/build-target/image-root-tgz/usr/lib/udev/rules.d/91-mkfs-ext4.rules
> But that file is already provided by package * systemd
> * opkg_solver_install: Cannot install package datapartition.
> make: *** [/usr/local/lib/ptxdist-2021.02.0/rules/image-root-tgz.make:30: /home/adahl/Work/bsp/xxx/base/platform-v7a/images/root.tgz] Error 255
NACK.
An now 91-mkfs-ext4.rules won't be installed unless it is copied into each
layer that provides udev rules. Don't use SYSTEMD_UDEV_CUST_RULES with
layers. It doesn't work properly.
Michael
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> configs/ptxconfig | 2 +-
> rules/datapartition.make | 2 --
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/configs/ptxconfig b/configs/ptxconfig
> index c97e321..a4fa7e9 100644
> --- a/configs/ptxconfig
> +++ b/configs/ptxconfig
> @@ -1437,7 +1437,7 @@ PTXCONF_SYSTEMD_ZSTD=y
> #
> PTXCONF_SYSTEMD_UDEV_DRIVERS_RULES=y
> # PTXCONF_SYSTEMD_UDEV_HWDB is not set
> -# PTXCONF_SYSTEMD_UDEV_CUST_RULES is not set
> +PTXCONF_SYSTEMD_UDEV_CUST_RULES=y
> # end of install options
>
> #
> diff --git a/rules/datapartition.make b/rules/datapartition.make
> index b79bcf0..7f3c992 100644
> --- a/rules/datapartition.make
> +++ b/rules/datapartition.make
> @@ -28,8 +28,6 @@ $(STATEDIR)/datapartition.targetinstall:
>
> @$(call install_alternative, datapartition, 0, 0, 0644, \
> /usr/lib/systemd/system/systemd-autoformat@.service)
> - @$(call install_alternative, datapartition, 0, 0, 0644, \
> - /usr/lib/udev/rules.d/91-mkfs-ext4.rules)
>
> @$(call install_finish,datapartition)
>
>
> base-commit: 085bb9b4273c8fd91105d9e149776f144f5fdd65
> --
> 2.30.2
>
>
> _______________________________________________
> DistroKit mailing list
> DistroKit@pengutronix.de
>
--
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 |
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule
2021-06-25 11:22 ` Michael Olbrich
@ 2021-06-25 11:29 ` Alexander Dahl
2021-06-25 12:03 ` Alexander Dahl
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2021-06-25 11:29 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Hei hei,
Am Freitag, 25. Juni 2021, 13:22:14 CEST schrieb Michael Olbrich:
> Hi,
>
> On Fri, Jun 25, 2021 at 01:15:46PM +0200, Alexander Dahl wrote:
> > If DistroKit is used as a base layer and any upper layer enables
> > PTXCONF_SYSTEMD_UDEV_CUST_RULES, package installation might fail because
> > both packages, 'systemd' and 'datapartition' try to targetinstall
> >
> > 'usr/lib/udev/rules.d/91-mkfs-ext4.rules', like this:
> > Collected errors:
> > * check_data_file_clashes: Package datapartition wants to install
> > file
> > /home/adahl/Work/bsp/xxx/base/platform-v7a/build-target/image-root-t
> > gz/usr/lib/udev/rules.d/91-mkfs-ext4.rules>
> > But that file is already provided by package * systemd
> >
> > * opkg_solver_install: Cannot install package datapartition.
> >
> > make: ***
> > [/usr/local/lib/ptxdist-2021.02.0/rules/image-root-tgz.make:30:
> > /home/adahl/Work/bsp/xxx/base/platform-v7a/images/root.tgz] Error 255
> NACK.
>
> An now 91-mkfs-ext4.rules won't be installed unless it is copied into each
> layer that provides udev rules. Don't use SYSTEMD_UDEV_CUST_RULES with
> layers. It doesn't work properly.
Well, I tested it with ptxdist-2021.02.0 and BSP using DistroKit-2021.02.0 as
base layer. That file 91-mkfs-ext4.rules was actually copied, and I did not
duplicate it into the upper layer before.
Was there a post ptxdist-2021.02.0 change preventing that conflict outlined
above?
However, and that's probably also against this approach: the file won't get
copied anymore if someone disables SYSTEMD_UDEV_CUST_RULES in an upper layer
for any reason?
So, if I want to install my own custem udev rule from an upper layer, what am
I supposed to do, if SYSTEMD_UDEV_CUST_RULES is a no go? Create another
package like 'datapartition' for just installing that one file?
Greets
Alex
>
> Michael
>
> > Signed-off-by: Alexander Dahl <ada@thorsis.com>
> > ---
> >
> > configs/ptxconfig | 2 +-
> > rules/datapartition.make | 2 --
> > 2 files changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/configs/ptxconfig b/configs/ptxconfig
> > index c97e321..a4fa7e9 100644
> > --- a/configs/ptxconfig
> > +++ b/configs/ptxconfig
> > @@ -1437,7 +1437,7 @@ PTXCONF_SYSTEMD_ZSTD=y
> >
> > #
> > PTXCONF_SYSTEMD_UDEV_DRIVERS_RULES=y
> > # PTXCONF_SYSTEMD_UDEV_HWDB is not set
> >
> > -# PTXCONF_SYSTEMD_UDEV_CUST_RULES is not set
> > +PTXCONF_SYSTEMD_UDEV_CUST_RULES=y
> >
> > # end of install options
> >
> > #
> >
> > diff --git a/rules/datapartition.make b/rules/datapartition.make
> > index b79bcf0..7f3c992 100644
> > --- a/rules/datapartition.make
> > +++ b/rules/datapartition.make
> >
> > @@ -28,8 +28,6 @@ $(STATEDIR)/datapartition.targetinstall:
> > @$(call install_alternative, datapartition, 0, 0, 0644, \
> >
> > /usr/lib/systemd/system/systemd-autoformat@.service)
> >
> > - @$(call install_alternative, datapartition, 0, 0, 0644, \
> > - /usr/lib/udev/rules.d/91-mkfs-ext4.rules)
> >
> > @$(call install_finish,datapartition)
> >
> > base-commit: 085bb9b4273c8fd91105d9e149776f144f5fdd65
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule
2021-06-25 11:29 ` Alexander Dahl
@ 2021-06-25 12:03 ` Alexander Dahl
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Dahl @ 2021-06-25 12:03 UTC (permalink / raw)
To: distrokit; +Cc: Michael Olbrich
Hei hei,
Am Freitag, 25. Juni 2021, 13:29:41 CEST schrieb Alexander Dahl:
> Hei hei,
>
> Am Freitag, 25. Juni 2021, 13:22:14 CEST schrieb Michael Olbrich:
> > Hi,
> >
> > On Fri, Jun 25, 2021 at 01:15:46PM +0200, Alexander Dahl wrote:
> > > If DistroKit is used as a base layer and any upper layer enables
> > > PTXCONF_SYSTEMD_UDEV_CUST_RULES, package installation might fail because
> > > both packages, 'systemd' and 'datapartition' try to targetinstall
> > >
> > > 'usr/lib/udev/rules.d/91-mkfs-ext4.rules', like this:
> > > Collected errors:
> > > * check_data_file_clashes: Package datapartition wants to install
> > > file
> > > /home/adahl/Work/bsp/xxx/base/platform-v7a/build-target/image-root-
> > > t
> > > gz/usr/lib/udev/rules.d/91-mkfs-ext4.rules>
> > >
> > > But that file is already provided by package * systemd
> > >
> > > * opkg_solver_install: Cannot install package datapartition.
> > >
> > > make: ***
> > > [/usr/local/lib/ptxdist-2021.02.0/rules/image-root-tgz.make:30:
> > > /home/adahl/Work/bsp/xxx/base/platform-v7a/images/root.tgz] Error
> > > 255
> >
> > NACK.
> >
> > An now 91-mkfs-ext4.rules won't be installed unless it is copied into each
> > layer that provides udev rules. Don't use SYSTEMD_UDEV_CUST_RULES with
> > layers. It doesn't work properly.
>
> Well, I tested it with ptxdist-2021.02.0 and BSP using DistroKit-2021.02.0
> as base layer. That file 91-mkfs-ext4.rules was actually copied, and I did
> not duplicate it into the upper layer before.
Maybe that was because I had no file in 'projectroot/usr/lib/udev/rules.d'
(anymore) but enabled SYSTEMD_UDEV_CUST_RULES?
> Was there a post ptxdist-2021.02.0 change preventing that conflict outlined
> above?
I don't think so.
> However, and that's probably also against this approach: the file won't get
> copied anymore if someone disables SYSTEMD_UDEV_CUST_RULES in an upper layer
> for any reason?
>
> So, if I want to install my own custem udev rule from an upper layer, what
> am I supposed to do, if SYSTEMD_UDEV_CUST_RULES is a no go? Create another
> package like 'datapartition' for just installing that one file?
It works as expected, if I have files in 'projectroot/usr/lib/udev/rules.d'
actually.
Sorry for the noise.
Greets
Alex
>
>
> Greets
> Alex
>
> > Michael
> >
> > > Signed-off-by: Alexander Dahl <ada@thorsis.com>
> > > ---
> > >
> > > configs/ptxconfig | 2 +-
> > > rules/datapartition.make | 2 --
> > > 2 files changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/configs/ptxconfig b/configs/ptxconfig
> > > index c97e321..a4fa7e9 100644
> > > --- a/configs/ptxconfig
> > > +++ b/configs/ptxconfig
> > > @@ -1437,7 +1437,7 @@ PTXCONF_SYSTEMD_ZSTD=y
> > >
> > > #
> > > PTXCONF_SYSTEMD_UDEV_DRIVERS_RULES=y
> > > # PTXCONF_SYSTEMD_UDEV_HWDB is not set
> > >
> > > -# PTXCONF_SYSTEMD_UDEV_CUST_RULES is not set
> > > +PTXCONF_SYSTEMD_UDEV_CUST_RULES=y
> > >
> > > # end of install options
> > >
> > > #
> > >
> > > diff --git a/rules/datapartition.make b/rules/datapartition.make
> > > index b79bcf0..7f3c992 100644
> > > --- a/rules/datapartition.make
> > > +++ b/rules/datapartition.make
> > >
> > > @@ -28,8 +28,6 @@ $(STATEDIR)/datapartition.targetinstall:
> > > @$(call install_alternative, datapartition, 0, 0, 0644, \
> > >
> > > /usr/lib/systemd/system/systemd-autoformat@.service)
> > >
> > > - @$(call install_alternative, datapartition, 0, 0, 0644, \
> > > - /usr/lib/udev/rules.d/91-mkfs-ext4.rules)
> > >
> > > @$(call install_finish,datapartition)
> > >
> > > base-commit: 085bb9b4273c8fd91105d9e149776f144f5fdd65
>
> _______________________________________________
> DistroKit mailing list
> DistroKit@pengutronix.de
_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-25 12:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 11:15 [DistroKit] [PATCH] datapartition: Let systemd install custom udev rule Alexander Dahl
2021-06-25 11:22 ` Michael Olbrich
2021-06-25 11:29 ` Alexander Dahl
2021-06-25 12:03 ` Alexander Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox