Subject: [PATCH BlueZ 1/4] build: fold separate install-data-hooks

From: Emil Velikov <[email protected]>

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 <[email protected]>
---
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

dbussessionbusdir = $(DBUS_SESSIONBUSDIR)

--
2.43.1



2024-02-14 22:24:06

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/4] build: fold separate install-data-hooks

Hi Emil,

On Wed, Feb 14, 2024 at 5:02 PM Emil Velikov via B4 Relay
<[email protected]> wrote:
>
> From: Emil Velikov <[email protected]>
>
> 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 <[email protected]>
> ---
> 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?

> dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
>
> --
> 2.43.1
>
>


--
Luiz Augusto von Dentz

2024-02-14 23:18:37

by bluez.test.bot

[permalink] [raw]
Subject: RE: Handful of build fixes and cleanups

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=826159

---Test result---

Test Summary:
CheckPatch PASS 1.12 seconds
GitLint PASS 0.89 seconds
BuildEll PASS 23.94 seconds
BluezMake PASS 724.63 seconds
MakeCheck PASS 11.86 seconds
MakeDistcheck PASS 164.98 seconds
CheckValgrind PASS 228.99 seconds
CheckSmatch PASS 331.74 seconds
bluezmakeextell PASS 108.25 seconds
IncrementalBuild FAIL 1354.33 seconds
ScanBuild PASS 971.65 seconds

Details
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series
Output:

error: tools/97-hid2hci.rules: already exists in working directory
hint: Use 'git am --show-current-patch' to see the failed patch


---
Regards,
Linux Bluetooth

2024-02-14 23:24:33

by Emil Velikov

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/4] build: fold separate install-data-hooks

Hi Luiz,

On Wed, 14 Feb 2024 at 22:23, Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi Emil,
>
> On Wed, Feb 14, 2024 at 5:02 PM Emil Velikov via B4 Relay
> <[email protected]> wrote:
> >
> > From: Emil Velikov <[email protected]>
> >
> > 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 <[email protected]>
> > ---
> > 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