diff mbox series

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

Message ID 20240214-hook-fixup-v1-1-0e158ffea140@gmail.com (mailing list archive)
State Superseded
Headers show
Series Handful of build fixes and cleanups | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Emil Velikov via B4 Relay Feb. 14, 2024, 10:01 p.m. UTC
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(-)

Comments

Luiz Augusto von Dentz Feb. 14, 2024, 10:23 p.m. UTC | #1
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?

>  dbussessionbusdir = $(DBUS_SESSIONBUSDIR)
>
> --
> 2.43.1
>
>
bluez.test.bot@gmail.com Feb. 14, 2024, 11:18 p.m. UTC | #2
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
Emil Velikov Feb. 14, 2024, 11:22 p.m. UTC | #3
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
diff mbox series

Patch

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)