mbox series

[bug#66099,gnome-team,0/3] Update upower

Message ID cover.1695123329.git.vivien@planete-kraus.eu
Headers show
Series Update upower | expand

Message

Vivien Kraus Sept. 19, 2023, 11:35 a.m. UTC
Dear guix,

Here is how I would update eudev, so as to be able to build a newer libgudev
and then a newer upower.

What do you think?

Best regards,

Vivien

Vivien Kraus (3):
  gnu: eudev: Update libudev version to 251.
  gnu: libgudev: Update to 238.
  gnu: upower: Update to 1.90.2.

 gnu/local.mk                                 |   1 +
 gnu/packages/gnome.scm                       |   8 +-
 gnu/packages/linux.scm                       |  22 ++-
 gnu/packages/patches/eudev-bump-to-251.patch | 134 +++++++++++++++++++
 4 files changed, 155 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/eudev-bump-to-251.patch


base-commit: e9ff5d51e3297089e66c124195e1f1b42dbded65

Comments

Liliana Marie Prikler Sept. 21, 2023, 5:06 p.m. UTC | #1
Am Dienstag, dem 19.09.2023 um 13:35 +0200 schrieb Vivien Kraus:
> Dear guix,
> 
> Here is how I would update eudev, so as to be able to build a newer
> libgudev and then a newer upower.
> 
> What do you think?
> 
> Best regards,
> 
> Vivien
> 
> Vivien Kraus (3):
>   gnu: eudev: Update libudev version to 251.
>   gnu: libgudev: Update to 238.
>   gnu: upower: Update to 1.90.2.
Does upower use GNOME versioning or Semver?  If so, 1.90 is potentially
experimental.  eudev and libgudev versions LGTM.

Cheers
Vivien Kraus Sept. 21, 2023, 9:05 p.m. UTC | #2
Le jeudi 21 septembre 2023 à 19:06 +0200, Liliana Marie Prikler a
écrit :
> Does upower use GNOME versioning or Semver?  If so, 1.90 is
> potentially
> experimental.  eudev and libgudev versions LGTM.
Unfortunately, neither upower 1.90.0 nor 1.90.2 build with updated
eudev and libgudev.

Vivien
Vivien Kraus Sept. 21, 2023, 10:03 p.m. UTC | #3
Le jeudi 21 septembre 2023 à 23:05 +0200, Vivien Kraus a écrit :
> Le jeudi 21 septembre 2023 à 19:06 +0200, Liliana Marie Prikler a
> écrit :
> > eudev and libgudev versions LGTM.
> Unfortunately, neither upower 1.90.0 nor 1.90.2 build with updated
> eudev and libgudev.

I think the problem is with hwdb. If I install upower before checking
it, I get:

phase `build' succeeded after 2.5 seconds
starting phase `install'
[0/1] Installing files.
Traceback (most recent call last):
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/mesonmain.py", line 194,
in run
    return options.run_func(options)
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/minstall.py", line 835,
in run
    installer.do_install(datafilename)
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/minstall.py", line 547,
in do_install
    self.install_data(d, dm, destdir, fullprefix)
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/minstall.py", line 620,
in install_data
    if self.do_copyfile(fullfilename, outfilename, makedirs=(dm,
outdir)):
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/minstall.py", line 422,
in do_copyfile
    self.copy2(from_file, to_file)
  File "/gnu/store/brxy70m8k3g8pxf5qj312amsnnj9njb8-meson-
1.1.0/lib/python3.10/site-packages/mesonbuild/minstall.py", line 322,
in copy2
    shutil.copy2(*args, **kwargs)
  File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-
3.10.7/lib/python3.10/shutil.py", line 434, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/gnu/store/dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-
3.10.7/lib/python3.10/shutil.py", line 256, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied:
'/gnu/store/grx741bq3w2hq9dp61gbphghffzq5ywp-eudev-
3.2.14.beta/lib/udev/hwdb.d/95-upower-hid.hwdb'

So, presumably, upower tries to install itself into eudev stuff, which
fails. Now, it should install into upower’s prefix, but I’m not sure
how udevadm hwdb --update can be made to find hwdb files both from
eudev and from upower. Maybe we need to introduce a search path, but
I’m not sure udevadm understands any search path.

I asked on #eudev in IRC, let’s see...

Vivien
Liliana Marie Prikler Sept. 22, 2023, 4:22 a.m. UTC | #4
Am Freitag, dem 22.09.2023 um 00:03 +0200 schrieb Vivien Kraus:
> So, presumably, upower tries to install itself into eudev stuff,
> which fails. Now, it should install into upower’s prefix, but I’m not
> sure how udevadm hwdb --update can be made to find hwdb files both
> from eudev and from upower. Maybe we need to introduce a search path,
> but I’m not sure udevadm understands any search path.
This is a mostly solved problem on the Guix side.  We either use search
paths, or in case a single file is really, absolutely, positively
needed, we can also make do with a profile hook or some other lookup
mechanism (see below).  In either case, we let packages write to *their
own* output directory rather than some other packages'.

For udev specifically, we have configuration files that specify where
to look up stuff generated by udev-service-type.  You might want to
place hwdb-related logic there.

Cheers