[bug#74597] gnu: bluez: Update to 5.79.

Message ID aCC-05kXdcV4jUcI@jasmine.lan
State New
Headers
Series [bug#74597] gnu: bluez: Update to 5.79. |

Commit Message

Leo Famulari May 11, 2025, 3:14 p.m. UTC
  On Thu, Nov 28, 2024 at 10:11:51PM +0100, Julian Flake wrote:
> * gnu/packages/linux.scm (bluez): Update to 5.79.

Thanks for this patch!

I added it to the 'kernel-team' Git branch where it is being built now
on the build farm:

https://qa.guix.gnu.org/branch/kernel-team

However, with this patch, the bluez package fails to build, because the
installation procedure tries to write to /etc/bluetooth and fails:

------
[...]
 /gnu/store/7h0mnlwalw23j9jmvz5n1i5mqkgb4d06-coreutils-9.1/bin/mkdir -p '/etc/bluetooth'
/gnu/store/7h0mnlwalw23j9jmvz5n1i5mqkgb4d06-coreutils-9.1/bin/mkdir: cannot create directory ‘/etc/bluetooth’: Permission denied
make[2]: *** [Makefile:11515: install-confDATA] Error 1
make[1]: *** [Makefile:12389: install-am] Error 2
make: *** [Makefile:12382: install] Error 2
error: in phase 'install': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("install") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `install' failed after 0.6 seconds
------

I worked around this by changing the value of sysconfdir:

------
------

... would that work correctly, or will bluez then look for run-time
configuration in the wrong location? I think that bluez should look for
configuration files in the well-known location /etc/bluetooth. Do you
agree?

Also, with that change, the installation procedure then fails to write
to /var:

------
[...]
install -dm555 /gnu/store/q084wf1nvq0zjs9bym5wj3l5f11nw41h-bluez-5.79/etc/bluetooth
install -dm700 /var/lib/bluetooth
install: cannot create directory ‘/var’: Permission denied
make[3]: *** [Makefile:13927: bluetoothd-fix-permissions] Error 1
make[2]: *** [Makefile:13172: install-data-am] Error 2
make[1]: *** [Makefile:12389: install-am] Error 2
make: *** [Makefile:12382: install] Error 2
error: in phase 'install': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("install") exit-status: 2 term-signal: #f stop-signal: #f> 
phase `install' failed after 0.9 seconds
------

What do you think?

Do you remember if you saw these problems when you made this patch, and
they are caused by a changed in the build tools, or is this the first
test of the patch?
  

Comments

Julian Flake May 11, 2025, 5:43 p.m. UTC | #1
Hi Leo,

On Sun, May 11 2025, Leo Famulari wrote:

> Do you remember if you saw these problems when you made this 
> patch, and
> they are caused by a changed in the build tools, or is this the 
> first
> test of the patch?

no, actually I don't remember that, but I get the same now with 
5.79, also if rebased on current master. I get another problem 
with a newer bluez version of 5.82.

Best Regards,
Julian Flake (nutcase)
  
Leo Famulari May 11, 2025, 8:26 p.m. UTC | #2
On Sun, May 11, 2025 at 07:43:57PM +0200, Julian Flake wrote:
> no, actually I don't remember that, but I get the same now with 5.79, also
> if rebased on current master. I get another problem with a newer bluez
> version of 5.82.

Yeah, I saw that other problem with 5.82.

If 5.79 addresses the bug that you originally set out to fix, I think
it's okay to stay with 5.79 for now, assuming it works for you and any
other Bluetooth testers.

Given the ubiquity of Bluetooth, maybe there are enough users in Guix to
create a Bluetooth team or something like that, since it is low enough
in the package graph that we can't change it on the master branch. But
it's okay in the kernel-team for now.
  

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index eff6f7978a9..7d8eba34c66 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -6633,7 +6633,7 @@  (define-public bluez
     (arguments
      (list
       #:configure-flags
-      #~(list "--sysconfdir=/etc"
+      #~(list (string-append "--sysconfdir=" #$output "/etc")
               "--localstatedir=/var"
               "--enable-library"
               "--enable-wiimote"