* [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0
@ 2023-12-08 7:37 ruggero
2023-12-11 7:56 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: ruggero @ 2023-12-08 7:37 UTC (permalink / raw)
To: ptxdist
Hello everybody,
I hope I'm posting on the right mailing list - if not, please redirect
me.
I'm having a problem while migrating from ptxdist.2023.09.0 to
ptxdist.2023.11.0
Package dbus fails to install.
The relevant messages are the following:
make: *** [/usr/local/lib/ptxdist-2023.10.0/rules/post/ptxd_make_world_install.make:41:
/...../platform-phyFLEX-i.MX6/state/dbus.install] Error 1
Traceback (most recent call last):
File "/...../platform-phyFLEX-i.MX6/build-target/dbus-1.15.8/meson_post_install.py",
line 106, in <module> post_install_exe() File
".......x/platform-phyFLEX-i.MX6/build-target/dbus-1.15.8/meson_post_install.py",
line 95, in post_install_exe os.chown(exe_path, 0, grp.getgrnam(dbus_user).gr_gid)
^^^^^^^^^^^^^^^^^^^^^^^
KeyError: "getgrnam(): name not found: 'messagebus'"
It looks like, that a python script now takes care of some phasis of
the installation, and the python script fails.
The same problem occurs also migrating from ptxdist.2023.09.0 to
ptxdist.2023.10.0 (where the new version of dbus with the meson
installer was introduced), and migrating form ptxdist.2023.09.0 to
ptxdist.2023.12.0 (the very last published version).
I did some investigations:
The installer calls the python script meson_post_install.py. The python
scripts uses the native host python, since the build-host python will
be compiled later.
The relevant part of the failing script is the following:
def post_install_exe():
# Setuid, chmod and chown for dbus-daemon-launch-helper
daemon_launch_helper = get_target('dbus-daemon-launch-helper')
if daemon_launch_helper:
import grp
exe_name =os.path.basename(daemon_launch_helper['install_filename'][0])
exe_path = abs_libexecdir / exe_name
dbus_user = get_option('dbus_user') ####### dbus_user is 'messagebus'
if os.getuid() == 0:
os.chown(exe_path, 0, grp.getgrnam(dbus_user).gr_gid)
####<<<--- error occurs here
os.chmod(exe_path, stat.S_ISUID | stat.S_IXUSR | stat.S_IXGRP)
else:
print('Not installing {0} binary setuid!'.format(exe_path))
print('You\'ll need to manually set permissions to root:{0}
and permissions 4750'.format(dbus_user) )
The problem seems to be that grp.getgrnam(dbus_user) search on the host
native /etc/group, and not in the target /etc/group (that is still to
be generated), and I do not have a messagebus user [and nobody can say
that my messagebus has the same gid as the target].
Even if I manually targetinstall rootfs (it provides root/etc/group)
and host-python, the error persists: the script continues to read the
host native /etc/group (retrieving the GroupID of my user succeeds).
Any opinion / suggestion?
Ruggero
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0
2023-12-08 7:37 [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0 ruggero
@ 2023-12-11 7:56 ` Michael Olbrich
2023-12-11 8:23 ` ruggero
0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2023-12-11 7:56 UTC (permalink / raw)
To: ruggero; +Cc: ptxdist
Hi,
On Fri, Dec 08, 2023 at 08:37:14AM +0100, ruggero wrote:
> I hope I'm posting on the right mailing list - if not, please redirect
> me.
>
> I'm having a problem while migrating from ptxdist.2023.09.0 to
> ptxdist.2023.11.0
>
> Package dbus fails to install.
>
> The relevant messages are the following:
>
> make: *** [/usr/local/lib/ptxdist-2023.10.0/rules/post/ptxd_make_world_install.make:41:
> /...../platform-phyFLEX-i.MX6/state/dbus.install] Error 1
>
> Traceback (most recent call last):
> File "/...../platform-phyFLEX-i.MX6/build-target/dbus-1.15.8/meson_post_install.py",
> line 106, in <module> post_install_exe() File
> ".......x/platform-phyFLEX-i.MX6/build-target/dbus-1.15.8/meson_post_install.py",
> line 95, in post_install_exe os.chown(exe_path, 0, grp.getgrnam(dbus_user).gr_gid)
> ^^^^^^^^^^^^^^^^^^^^^^^
> KeyError: "getgrnam(): name not found: 'messagebus'"
>
> It looks like, that a python script now takes care of some phasis of
> the installation, and the python script fails.
[...]
> Any opinion / suggestion?
Ah, the problem is, that the distribution you're using does not have a
'messagebus' user. I'm testing mainly on Debian and Ubuntu and the user
always exists here. So I've never encountered this.
I've created a patch that should fix this. It will it ptxdist master as
soon as the build tests for my current patch queue have finished
successfully.
Michael
--
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 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0
2023-12-11 7:56 ` Michael Olbrich
@ 2023-12-11 8:23 ` ruggero
2023-12-11 16:41 ` Michael Olbrich
0 siblings, 1 reply; 5+ messages in thread
From: ruggero @ 2023-12-11 8:23 UTC (permalink / raw)
Cc: ptxdist
On Mon, 11 Dec 2023 08:56:26 +0100
Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> Ah, the problem is, that the distribution you're using does not have a
> 'messagebus' user. I'm testing mainly on Debian and Ubuntu and the user
> always exists here. So I've never encountered this.
I suspected something similar.
> I've created a patch that should fix this. It will it ptxdist master as
> soon as the build tests for my current patch queue have finished
> successfully.
Thank you,
Ruggero
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0
2023-12-11 8:23 ` ruggero
@ 2023-12-11 16:41 ` Michael Olbrich
2023-12-11 17:03 ` ruggero
0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2023-12-11 16:41 UTC (permalink / raw)
To: ruggero; +Cc: ptxdist
On Mon, Dec 11, 2023 at 09:23:01AM +0100, ruggero wrote:
> On Mon, 11 Dec 2023 08:56:26 +0100
> Michael Olbrich <m.olbrich@pengutronix.de> wrote:
>
> > Ah, the problem is, that the distribution you're using does not have a
> > 'messagebus' user. I'm testing mainly on Debian and Ubuntu and the user
> > always exists here. So I've never encountered this.
>
> I suspected something similar.
>
> > I've created a patch that should fix this. It will it ptxdist master as
> > soon as the build tests for my current patch queue have finished
> > successfully.
> Thank you,
It's in master now.
Michael
--
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 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0
2023-12-11 16:41 ` Michael Olbrich
@ 2023-12-11 17:03 ` ruggero
0 siblings, 0 replies; 5+ messages in thread
From: ruggero @ 2023-12-11 17:03 UTC (permalink / raw)
To: Michael Olbrich; +Cc: ptxdist
On Mon, 11 Dec 2023 17:41:47 +0100
Michael Olbrich <m.olbrich@pengutronix.de> wrote:
>
> It's in master now.
>
> Michael
It works, thank you.
Ruggero
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-11 17:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 7:37 [ptxdist] Problems compiling package dbus with ptxdist 2023.11.0 ruggero
2023-12-11 7:56 ` Michael Olbrich
2023-12-11 8:23 ` ruggero
2023-12-11 16:41 ` Michael Olbrich
2023-12-11 17:03 ` ruggero
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox