mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [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

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