mbox series

[BlueZ,0/4] Handful of build fixes and cleanups

Message ID 20240214-hook-fixup-v1-0-0e158ffea140@gmail.com
Headers show
Series Handful of build fixes and cleanups | expand

Message

Emil Velikov via B4 Relay Feb. 14, 2024, 10:01 p.m. UTC
Hello list,

The very first patch in this series fixes a regression I've introduced
recently - sorry about that.

Namely: two separate patch series introduced an `install-data-hook` and
I didn't properly test with both combined. The former is unconditionally
set while the latter is not.

So if obex is enabled, we fail to create the config files :facepalm:

The second patch is a log pre-existing issue - we install dbus/systemd
service files, for obexd even when building with --disable-obex

The last two are trivial cleanups, so feel free to drop them if they
don't strike your interest.

---
Emil Velikov (4):
      build: fold separate install-data-hooks
      build: install obexd (dbus,systemd} services as needed
      build: drop %.rules make rule
      build: simplify coverage handling

 Makefile.am                               | 27 ++++++++++++---------------
 Makefile.obexd                            |  9 ++-------
 tools/{hid2hci.rules => 97-hid2hci.rules} |  0
 3 files changed, 14 insertions(+), 22 deletions(-)
---
base-commit: b55d98e5cc97e4ff8c3980b84f46c84f3b1c1ee3
change-id: 20240214-hook-fixup-f26304b71366

Best regards,

Comments

Emil Velikov Feb. 14, 2024, 11:22 p.m. UTC | #1
Hi Luiz,

On Wed, 14 Feb 2024 at 22:23, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Emil,
>
> On Wed, Feb 14, 2024 at 5:02 PM Emil Velikov via B4 Relay
> <devnull+emil.l.velikov.gmail.com@kernel.org> wrote:
> >
> > From: Emil Velikov <emil.l.velikov@gmail.com>
> >
> > Autoconfigure throws a useful error, that I've missed previously. As-is
> > with two identical hooks `make install` will fail.
> >
> > Just fold them into single place - not particularly pretty but works.
> >
> > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> > ---
> >  Makefile.am    | 9 +++++++++
> >  Makefile.obexd | 6 ------
> >  2 files changed, 9 insertions(+), 6 deletions(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 5207c172b..e67551761 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -34,6 +34,15 @@ statedir = $(localstatedir)/lib/bluetooth
> >  install-data-hook:
> >         install -dm555 $(DESTDIR)$(confdir)
> >         install -dm700 $(DESTDIR)$(statedir)
> > +if OBEX
> > +if SYSTEMD
> > +       $(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
> > +
> > +uninstall-hook:
> > +       rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
> > +endif
> > +endif
> > +
> >  if DATAFILES
> >  dbusdir = $(DBUS_CONFDIR)/dbus-1/system.d
> > diff --git a/Makefile.obexd b/Makefile.obexd
> > index 81456544d..b91ca6644 100644
> > --- a/Makefile.obexd
> > +++ b/Makefile.obexd
> > @@ -2,12 +2,6 @@
> >  if SYSTEMD
> >  systemduserunitdir = $(SYSTEMD_USERUNITDIR)
> >  systemduserunit_DATA = obexd/src/obex.service
> > -
> > -install-data-hook:
> > -       $(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
> > -
> > -uninstall-hook:
> > -       rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service
> >  endif
>
> Hmm, isn't it possible to do target specific install hooks?
>

Good point - will have a try tomorrow/day after.
Hopefully we will be able to keep the obex specifics in Makefile.obex
without adding too many new if blocks.

Thanks
Emil