Linux-Bluetooth Archive mirror
 help / color / mirror / Atom feed
* [PATCH] bluez.pc.in: Add definition of libexecdir
@ 2024-02-21 11:17 Joakim Tjernlund
  2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-21 11:17 UTC (permalink / raw
  To: linux-bluetooth, Emil Velikov; +Cc: Joakim Tjernlund

From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
---
 lib/bluez.pc.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
index 3d6e59616..1c2f30b33 100644
--- a/lib/bluez.pc.in
+++ b/lib/bluez.pc.in
@@ -1,6 +1,7 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
+libexecdir=@libexecdir@
 includedir=@includedir@
  
 Name: BlueZ
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH] CUPS lives in libexecdir
  2024-02-21 11:17 [PATCH] bluez.pc.in: Add definition of libexecdir Joakim Tjernlund
@ 2024-02-21 11:18 ` Joakim Tjernlund
  2024-02-21 12:31   ` bluez.test.bot
  2024-02-22 13:06   ` [PATCH] " Emil Velikov
  2024-02-21 12:31 ` bluez.pc.in: Add definition of libexecdir bluez.test.bot
  2024-02-22 12:54 ` [PATCH] " Emil Velikov
  2 siblings, 2 replies; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-21 11:18 UTC (permalink / raw
  To: linux-bluetooth, Emil Velikov; +Cc: Joakim Tjernlund

From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
---
 Makefile.tools | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.tools b/Makefile.tools
index 044342e29..b785ebea8 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -538,7 +538,7 @@ endif
 endif
 
 if CUPS
-cupsdir = $(libdir)/cups/backend
+cupsdir = $(libexecdir)/cups/backend
 
 cups_PROGRAMS = profiles/cups/bluetooth
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* RE: bluez.pc.in: Add definition of libexecdir
  2024-02-21 11:17 [PATCH] bluez.pc.in: Add definition of libexecdir Joakim Tjernlund
  2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
@ 2024-02-21 12:31 ` bluez.test.bot
  2024-02-22 12:54 ` [PATCH] " Emil Velikov
  2 siblings, 0 replies; 15+ messages in thread
From: bluez.test.bot @ 2024-02-21 12:31 UTC (permalink / raw
  To: linux-bluetooth, Joakim.Tjernlund

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

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=828228

---Test result---

Test Summary:
CheckPatch                    PASS      0.45 seconds
GitLint                       PASS      0.34 seconds
BuildEll                      PASS      24.09 seconds
BluezMake                     PASS      731.39 seconds
MakeCheck                     PASS      11.64 seconds
MakeDistcheck                 PASS      164.21 seconds
CheckValgrind                 PASS      226.26 seconds
CheckSmatch                   PASS      332.91 seconds
bluezmakeextell               PASS      107.54 seconds
IncrementalBuild              PASS      689.97 seconds
ScanBuild                     PASS      971.58 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: CUPS lives in libexecdir
  2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
@ 2024-02-21 12:31   ` bluez.test.bot
  2024-02-22 13:06   ` [PATCH] " Emil Velikov
  1 sibling, 0 replies; 15+ messages in thread
From: bluez.test.bot @ 2024-02-21 12:31 UTC (permalink / raw
  To: linux-bluetooth, Joakim.Tjernlund

[-- Attachment #1: Type: text/plain, Size: 946 bytes --]

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=828229

---Test result---

Test Summary:
CheckPatch                    PASS      0.45 seconds
GitLint                       PASS      0.37 seconds
BuildEll                      PASS      24.26 seconds
BluezMake                     PASS      738.36 seconds
MakeCheck                     PASS      11.74 seconds
MakeDistcheck                 PASS      165.40 seconds
CheckValgrind                 PASS      227.10 seconds
CheckSmatch                   PASS      332.11 seconds
bluezmakeextell               PASS      107.93 seconds
IncrementalBuild              PASS      695.69 seconds
ScanBuild                     PASS      964.55 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] bluez.pc.in: Add definition of libexecdir
  2024-02-21 11:17 [PATCH] bluez.pc.in: Add definition of libexecdir Joakim Tjernlund
  2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
  2024-02-21 12:31 ` bluez.pc.in: Add definition of libexecdir bluez.test.bot
@ 2024-02-22 12:54 ` Emil Velikov
  2024-02-22 13:10   ` Joakim Tjernlund
  2 siblings, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2024-02-22 12:54 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth

On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
<joakim.tjernlund@infinera.com> wrote:
>
> From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> ---
>  lib/bluez.pc.in | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
> index 3d6e59616..1c2f30b33 100644
> --- a/lib/bluez.pc.in
> +++ b/lib/bluez.pc.in
> @@ -1,6 +1,7 @@
>  prefix=@prefix@
>  exec_prefix=@exec_prefix@
>  libdir=@libdir@
> +libexecdir=@libexecdir@
>  includedir=@includedir@
>

It seems to be unused in the pkg-config file. Why do we need this?

-Emil

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
  2024-02-21 12:31   ` bluez.test.bot
@ 2024-02-22 13:06   ` Emil Velikov
  2024-02-22 13:22     ` Joakim Tjernlund
  1 sibling, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2024-02-22 13:06 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth

On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
<joakim.tjernlund@infinera.com> wrote:
>
> From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
>
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> ---
>  Makefile.tools | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile.tools b/Makefile.tools
> index 044342e29..b785ebea8 100644
> --- a/Makefile.tools
> +++ b/Makefile.tools
> @@ -538,7 +538,7 @@ endif
>  endif
>
>  if CUPS
> -cupsdir = $(libdir)/cups/backend
> +cupsdir = $(libexecdir)/cups/backend
>

Is this true, can you provide some references?

Looking at Debian [1] (which contrary to Arch has libexec) - backends
are in /usr/lib. Glancing at the cups backends makefile it's using
SERVERBIN. Casual grep shows that libexec can be applicable for
BSD/Darwin platforms [3], which are out of scope for bluez IIRC.

-Emil

[1] https://packages.debian.org/bookworm/amd64/cups-daemon/filelist
[2] https://github.com/OpenPrinting/cups/blob/master/backend/Makefile
[3] https://github.com/OpenPrinting/cups/blob/535fdc2b38fc3f3819233344556c45f4e8d2620d/config-scripts/cups-directories.m4#L246

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] bluez.pc.in: Add definition of libexecdir
  2024-02-22 12:54 ` [PATCH] " Emil Velikov
@ 2024-02-22 13:10   ` Joakim Tjernlund
  2024-02-23 11:14     ` Emil Velikov
  0 siblings, 1 reply; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-22 13:10 UTC (permalink / raw
  To: emil.l.velikov@gmail.com; +Cc: linux-bluetooth@vger.kernel.org

On Thu, 2024-02-22 at 12:54 +0000, Emil Velikov wrote:
> On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> <joakim.tjernlund@infinera.com> wrote:
> > 
> > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > 
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > ---
> >  lib/bluez.pc.in | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
> > index 3d6e59616..1c2f30b33 100644
> > --- a/lib/bluez.pc.in
> > +++ b/lib/bluez.pc.in
> > @@ -1,6 +1,7 @@
> >  prefix=@prefix@
> >  exec_prefix=@exec_prefix@
> >  libdir=@libdir@
> > +libexecdir=@libexecdir@
> >  includedir=@includedir@
> > 
> 
> It seems to be unused in the pkg-config file. Why do we need this?
> 
> 

Bluez does not but pkg-config is for other apps so if some app needs to know
something about bluez stuff living in libexecdir it can find out where that is.

  Jocke


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-22 13:06   ` [PATCH] " Emil Velikov
@ 2024-02-22 13:22     ` Joakim Tjernlund
  2024-02-23 11:09       ` Emil Velikov
  0 siblings, 1 reply; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-22 13:22 UTC (permalink / raw
  To: emil.l.velikov@gmail.com; +Cc: linux-bluetooth@vger.kernel.org

On Thu, 2024-02-22 at 13:06 +0000, Emil Velikov wrote:
> On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> <joakim.tjernlund@infinera.com> wrote:
> >
> > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > ---
> >  Makefile.tools | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile.tools b/Makefile.tools
> > index 044342e29..b785ebea8 100644
> > --- a/Makefile.tools
> > +++ b/Makefile.tools
> > @@ -538,7 +538,7 @@ endif
> >  endif
> >
> >  if CUPS
> > -cupsdir = $(libdir)/cups/backend
> > +cupsdir = $(libexecdir)/cups/backend
> >
>
> Is this true, can you provide some references?
>
> Looking at Debian [1] (which contrary to Arch has libexec) - backends
> are in /usr/lib. Glancing at the cups backends makefile it's using
> SERVERBIN. Casual grep shows that libexec can be applicable for
> BSD/Darwin platforms [3], which are out of scope for bluez IIRC.

on Gentoo you have:

qlist net-print/cups | grep backend
...
/usr/libexec/cups/backend/implicitclass
/usr/libexec/cups/backend/beh
/usr/libexec/cups/backend/serial
/usr/libexec/cups/backend/parallel
/usr/libexec/cups/backend/driverless-fax
/usr/libexec/cups/backend/driverless
/usr/libexec/cups/backend/cups-pdf

but now I see this in Gentoo ebuild:
        # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
        # makes more sense when facing multilib support.
        sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die

        econf "${myeconfargs[@]}"

        sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
        sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
        sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die

so it appears to be a Gentoo addition.
Would perhaps
  pkg-config cups --variable=cups_serverbin
or
  cups-config --serverbin
be acceptable? If no we can just drop this and Gentoo will continue to patch bluez for cups

    Jocke
>
> -Emil
>
> [1] https://packages.debian.org/bookworm/amd64/cups-daemon/filelist
> [2] https://github.com/OpenPrinting/cups/blob/master/backend/Makefile
> [3] https://github.com/OpenPrinting/cups/blob/535fdc2b38fc3f3819233344556c45f4e8d2620d/config-scripts/cups-directories.m4#L246


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-22 13:22     ` Joakim Tjernlund
@ 2024-02-23 11:09       ` Emil Velikov
  2024-02-23 12:01         ` Joakim Tjernlund
  0 siblings, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2024-02-23 11:09 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth@vger.kernel.org

On Thu, 22 Feb 2024 at 13:22, Joakim Tjernlund
<Joakim.Tjernlund@infinera.com> wrote:
>
> On Thu, 2024-02-22 at 13:06 +0000, Emil Velikov wrote:
> > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > <joakim.tjernlund@infinera.com> wrote:
> > >
> > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > ---
> > >  Makefile.tools | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/Makefile.tools b/Makefile.tools
> > > index 044342e29..b785ebea8 100644
> > > --- a/Makefile.tools
> > > +++ b/Makefile.tools
> > > @@ -538,7 +538,7 @@ endif
> > >  endif
> > >
> > >  if CUPS
> > > -cupsdir = $(libdir)/cups/backend
> > > +cupsdir = $(libexecdir)/cups/backend
> > >
> >
> > Is this true, can you provide some references?
> >
> > Looking at Debian [1] (which contrary to Arch has libexec) - backends
> > are in /usr/lib. Glancing at the cups backends makefile it's using
> > SERVERBIN. Casual grep shows that libexec can be applicable for
> > BSD/Darwin platforms [3], which are out of scope for bluez IIRC.
>
> on Gentoo you have:
>
> qlist net-print/cups | grep backend
> ...
> /usr/libexec/cups/backend/implicitclass
> /usr/libexec/cups/backend/beh
> /usr/libexec/cups/backend/serial
> /usr/libexec/cups/backend/parallel
> /usr/libexec/cups/backend/driverless-fax
> /usr/libexec/cups/backend/driverless
> /usr/libexec/cups/backend/cups-pdf
>
> but now I see this in Gentoo ebuild:
>         # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
>         # makes more sense when facing multilib support.
>         sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
>
>         econf "${myeconfargs[@]}"
>
>         sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
>         sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
>         sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
>
> so it appears to be a Gentoo addition.
> Would perhaps
>   pkg-config cups --variable=cups_serverbin
> or
>   cups-config --serverbin
> be acceptable? If no we can just drop this and Gentoo will continue to patch bluez for cups
>

Using the foo-config tools sounds better than the current hard-coded
behaviour. Patch that does that gets a big thumbs-up from me.
Personally I have slight inclination towards the pkg-config - although
it'll be up-to the maintainers.

Aside: It'll be great if the Gentoo team probably propose their cups
change upstream - either as the default or opt-in behaviour.

HTH
Emil

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] bluez.pc.in: Add definition of libexecdir
  2024-02-22 13:10   ` Joakim Tjernlund
@ 2024-02-23 11:14     ` Emil Velikov
  2024-02-23 12:09       ` Joakim Tjernlund
  0 siblings, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2024-02-23 11:14 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth@vger.kernel.org

On Thu, 22 Feb 2024 at 13:10, Joakim Tjernlund
<Joakim.Tjernlund@infinera.com> wrote:
>
> On Thu, 2024-02-22 at 12:54 +0000, Emil Velikov wrote:
> > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > <joakim.tjernlund@infinera.com> wrote:
> > >
> > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > >
> > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > ---
> > >  lib/bluez.pc.in | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
> > > index 3d6e59616..1c2f30b33 100644
> > > --- a/lib/bluez.pc.in
> > > +++ b/lib/bluez.pc.in
> > > @@ -1,6 +1,7 @@
> > >  prefix=@prefix@
> > >  exec_prefix=@exec_prefix@
> > >  libdir=@libdir@
> > > +libexecdir=@libexecdir@
> > >  includedir=@includedir@
> > >
> >
> > It seems to be unused in the pkg-config file. Why do we need this?
> >
> >
>
> Bluez does not but pkg-config is for other apps so if some app needs to know
> something about bluez stuff living in libexecdir it can find out where that is.
>

"_some_ app needs to know _something_" sounds like the key here (emphasis mine).

Do you have an example? Is the (bluetoothd/obexd) daemon location of
interest, the cups backend, other?

Thanks
Emil

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-23 11:09       ` Emil Velikov
@ 2024-02-23 12:01         ` Joakim Tjernlund
  2024-02-23 16:14           ` Emil Velikov
  0 siblings, 1 reply; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-23 12:01 UTC (permalink / raw
  To: emil.l.velikov@gmail.com; +Cc: linux-bluetooth@vger.kernel.org

On Fri, 2024-02-23 at 11:09 +0000, Emil Velikov wrote:
> On Thu, 22 Feb 2024 at 13:22, Joakim Tjernlund
> <Joakim.Tjernlund@infinera.com> wrote:
> > 
> > On Thu, 2024-02-22 at 13:06 +0000, Emil Velikov wrote:
> > > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > > <joakim.tjernlund@infinera.com> wrote:
> > > > 
> > > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > 
> > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > ---
> > > >  Makefile.tools | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/Makefile.tools b/Makefile.tools
> > > > index 044342e29..b785ebea8 100644
> > > > --- a/Makefile.tools
> > > > +++ b/Makefile.tools
> > > > @@ -538,7 +538,7 @@ endif
> > > >  endif
> > > > 
> > > >  if CUPS
> > > > -cupsdir = $(libdir)/cups/backend
> > > > +cupsdir = $(libexecdir)/cups/backend
> > > > 
> > > 
> > > Is this true, can you provide some references?
> > > 
> > > Looking at Debian [1] (which contrary to Arch has libexec) - backends
> > > are in /usr/lib. Glancing at the cups backends makefile it's using
> > > SERVERBIN. Casual grep shows that libexec can be applicable for
> > > BSD/Darwin platforms [3], which are out of scope for bluez IIRC.
> > 
> > on Gentoo you have:
> > 
> > qlist net-print/cups | grep backend
> > ...
> > /usr/libexec/cups/backend/implicitclass
> > /usr/libexec/cups/backend/beh
> > /usr/libexec/cups/backend/serial
> > /usr/libexec/cups/backend/parallel
> > /usr/libexec/cups/backend/driverless-fax
> > /usr/libexec/cups/backend/driverless
> > /usr/libexec/cups/backend/cups-pdf
> > 
> > but now I see this in Gentoo ebuild:
> >         # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
> >         # makes more sense when facing multilib support.
> >         sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
> > 
> >         econf "${myeconfargs[@]}"
> > 
> >         sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
> >         sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
> >         sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
> > 
> > so it appears to be a Gentoo addition.
> > Would perhaps
> >   pkg-config cups --variable=cups_serverbin
> > or
> >   cups-config --serverbin
> > be acceptable? If no we can just drop this and Gentoo will continue to patch bluez for cups
> > 
> 
> Using the foo-config tools sounds better than the current hard-coded
> behaviour. Patch that does that gets a big thumbs-up from me.
> Personally I have slight inclination towards the pkg-config - although
> it'll be up-to the maintainers.

This is what I came up with:

From c6776b205b8adbf6e2e29108a1a7ff348546a531 Mon Sep 17 00:00:00 2001
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Date: Fri, 23 Feb 2024 12:56:21 +0100
Subject: [PATCH] cups: Use pkg-config to find cups backend dir

Some distributions(Gentoo) patch cups backend path to
something else than libdir. Use pkg-config to find backend
path for cups.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 Makefile.tools | 2 --
 configure.ac   | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.tools b/Makefile.tools
index 044342e29..760727557 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -538,8 +538,6 @@ endif
 endif
 
 if CUPS
-cupsdir = $(libdir)/cups/backend
-
 cups_PROGRAMS = profiles/cups/bluetooth
 
 profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
diff --git a/configure.ac b/configure.ac
index bb6380f2f..6a7fefa1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,9 @@ AC_SUBST(UDEV_DIR, [${path_udevdir}])
 AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups],
                 [disable CUPS printer support]), [enable_cups=${enableval}])
 AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
+if (test "${enable_cups}" != "no"); then
+   AC_SUBST(cupsdir, `$PKG_CONFIG cups --variable=cups_serverbin`/backend)
+fi
 
 AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],
 		[enable Mesh profile support]), [enable_mesh=${enableval}])
-- 
2.43.0

  Jocke


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH] bluez.pc.in: Add definition of libexecdir
  2024-02-23 11:14     ` Emil Velikov
@ 2024-02-23 12:09       ` Joakim Tjernlund
  2024-02-23 16:11         ` Emil Velikov
  0 siblings, 1 reply; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-23 12:09 UTC (permalink / raw
  To: emil.l.velikov@gmail.com; +Cc: linux-bluetooth@vger.kernel.org

On Fri, 2024-02-23 at 11:14 +0000, Emil Velikov wrote:
> On Thu, 22 Feb 2024 at 13:10, Joakim Tjernlund
> <Joakim.Tjernlund@infinera.com> wrote:
> > 
> > On Thu, 2024-02-22 at 12:54 +0000, Emil Velikov wrote:
> > > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > > <joakim.tjernlund@infinera.com> wrote:
> > > > 
> > > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > 
> > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > ---
> > > >  lib/bluez.pc.in | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
> > > > index 3d6e59616..1c2f30b33 100644
> > > > --- a/lib/bluez.pc.in
> > > > +++ b/lib/bluez.pc.in
> > > > @@ -1,6 +1,7 @@
> > > >  prefix=@prefix@
> > > >  exec_prefix=@exec_prefix@
> > > >  libdir=@libdir@
> > > > +libexecdir=@libexecdir@
> > > >  includedir=@includedir@
> > > > 
> > > 
> > > It seems to be unused in the pkg-config file. Why do we need this?
> > > 
> > > 
> > 
> > Bluez does not but pkg-config is for other apps so if some app needs to know
> > something about bluez stuff living in libexecdir it can find out where that is.
> > 
> 
> "_some_ app needs to know _something_" sounds like the key here (emphasis mine).
> 
> Do you have an example? Is the (bluetoothd/obexd) daemon location of
> interest, the cups backend, other?

No example. I just think it is proper form to publish this info.

  Jocke

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] bluez.pc.in: Add definition of libexecdir
  2024-02-23 12:09       ` Joakim Tjernlund
@ 2024-02-23 16:11         ` Emil Velikov
  0 siblings, 0 replies; 15+ messages in thread
From: Emil Velikov @ 2024-02-23 16:11 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth@vger.kernel.org

On Fri, 23 Feb 2024 at 12:09, Joakim Tjernlund
<Joakim.Tjernlund@infinera.com> wrote:
>
> On Fri, 2024-02-23 at 11:14 +0000, Emil Velikov wrote:
> > On Thu, 22 Feb 2024 at 13:10, Joakim Tjernlund
> > <Joakim.Tjernlund@infinera.com> wrote:
> > >
> > > On Thu, 2024-02-22 at 12:54 +0000, Emil Velikov wrote:
> > > > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > > > <joakim.tjernlund@infinera.com> wrote:
> > > > >
> > > > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > >
> > > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > > ---
> > > > >  lib/bluez.pc.in | 1 +
> > > > >  1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/lib/bluez.pc.in b/lib/bluez.pc.in
> > > > > index 3d6e59616..1c2f30b33 100644
> > > > > --- a/lib/bluez.pc.in
> > > > > +++ b/lib/bluez.pc.in
> > > > > @@ -1,6 +1,7 @@
> > > > >  prefix=@prefix@
> > > > >  exec_prefix=@exec_prefix@
> > > > >  libdir=@libdir@
> > > > > +libexecdir=@libexecdir@
> > > > >  includedir=@includedir@
> > > > >
> > > >
> > > > It seems to be unused in the pkg-config file. Why do we need this?
> > > >
> > > >
> > >
> > > Bluez does not but pkg-config is for other apps so if some app needs to know
> > > something about bluez stuff living in libexecdir it can find out where that is.
> > >
> >
> > "_some_ app needs to know _something_" sounds like the key here (emphasis mine).
> >
> > Do you have an example? Is the (bluetoothd/obexd) daemon location of
> > interest, the cups backend, other?
>
> No example. I just think it is proper form to publish this info.
>

Looking through my system, literally every project apart from one
defines _and_ uses libexecdir. The only exception being Qt6.

Skimming through the pkg-config documentation I cannot see any
mentions, so it seems to be that this isn't the proper way.

-Emil

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-23 12:01         ` Joakim Tjernlund
@ 2024-02-23 16:14           ` Emil Velikov
  2024-02-23 16:28             ` Joakim Tjernlund
  0 siblings, 1 reply; 15+ messages in thread
From: Emil Velikov @ 2024-02-23 16:14 UTC (permalink / raw
  To: Joakim Tjernlund; +Cc: linux-bluetooth@vger.kernel.org

On Fri, 23 Feb 2024 at 12:01, Joakim Tjernlund
<Joakim.Tjernlund@infinera.com> wrote:
>
> On Fri, 2024-02-23 at 11:09 +0000, Emil Velikov wrote:
> > On Thu, 22 Feb 2024 at 13:22, Joakim Tjernlund
> > <Joakim.Tjernlund@infinera.com> wrote:
> > >
> > > On Thu, 2024-02-22 at 13:06 +0000, Emil Velikov wrote:
> > > > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > > > <joakim.tjernlund@infinera.com> wrote:
> > > > >
> > > > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > >
> > > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > > ---
> > > > >  Makefile.tools | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/Makefile.tools b/Makefile.tools
> > > > > index 044342e29..b785ebea8 100644
> > > > > --- a/Makefile.tools
> > > > > +++ b/Makefile.tools
> > > > > @@ -538,7 +538,7 @@ endif
> > > > >  endif
> > > > >
> > > > >  if CUPS
> > > > > -cupsdir = $(libdir)/cups/backend
> > > > > +cupsdir = $(libexecdir)/cups/backend
> > > > >
> > > >
> > > > Is this true, can you provide some references?
> > > >
> > > > Looking at Debian [1] (which contrary to Arch has libexec) - backends
> > > > are in /usr/lib. Glancing at the cups backends makefile it's using
> > > > SERVERBIN. Casual grep shows that libexec can be applicable for
> > > > BSD/Darwin platforms [3], which are out of scope for bluez IIRC.
> > >
> > > on Gentoo you have:
> > >
> > > qlist net-print/cups | grep backend
> > > ...
> > > /usr/libexec/cups/backend/implicitclass
> > > /usr/libexec/cups/backend/beh
> > > /usr/libexec/cups/backend/serial
> > > /usr/libexec/cups/backend/parallel
> > > /usr/libexec/cups/backend/driverless-fax
> > > /usr/libexec/cups/backend/driverless
> > > /usr/libexec/cups/backend/cups-pdf
> > >
> > > but now I see this in Gentoo ebuild:
> > >         # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
> > >         # makes more sense when facing multilib support.
> > >         sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
> > >
> > >         econf "${myeconfargs[@]}"
> > >
> > >         sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
> > >         sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
> > >         sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
> > >
> > > so it appears to be a Gentoo addition.
> > > Would perhaps
> > >   pkg-config cups --variable=cups_serverbin
> > > or
> > >   cups-config --serverbin
> > > be acceptable? If no we can just drop this and Gentoo will continue to patch bluez for cups
> > >
> >
> > Using the foo-config tools sounds better than the current hard-coded
> > behaviour. Patch that does that gets a big thumbs-up from me.
> > Personally I have slight inclination towards the pkg-config - although
> > it'll be up-to the maintainers.
>
> This is what I came up with:
>
> From c6776b205b8adbf6e2e29108a1a7ff348546a531 Mon Sep 17 00:00:00 2001
> From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> Date: Fri, 23 Feb 2024 12:56:21 +0100
> Subject: [PATCH] cups: Use pkg-config to find cups backend dir
>
> Some distributions(Gentoo) patch cups backend path to
> something else than libdir. Use pkg-config to find backend
> path for cups.
>
> Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> ---
>  Makefile.tools | 2 --
>  configure.ac   | 3 +++
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile.tools b/Makefile.tools
> index 044342e29..760727557 100644
> --- a/Makefile.tools
> +++ b/Makefile.tools
> @@ -538,8 +538,6 @@ endif
>  endif
>
>  if CUPS
> -cupsdir = $(libdir)/cups/backend
> -
>  cups_PROGRAMS = profiles/cups/bluetooth
>
>  profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
> diff --git a/configure.ac b/configure.ac
> index bb6380f2f..6a7fefa1d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -242,6 +242,9 @@ AC_SUBST(UDEV_DIR, [${path_udevdir}])
>  AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups],
>                  [disable CUPS printer support]), [enable_cups=${enableval}])
>  AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
> +if (test "${enable_cups}" != "no"); then
> +   AC_SUBST(cupsdir, `$PKG_CONFIG cups --variable=cups_serverbin`/backend)
> +fi
>
>  AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],
>                 [enable Mesh profile support]), [enable_mesh=${enableval}])

AFAICT the existing patterns is to use "AC_SUBST(FOOBARDIR, ...)" in
configure.ac and "foobardir = $(FOOBARDIR)" in the makefiles.

Thanks
Emil

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] CUPS lives in libexecdir
  2024-02-23 16:14           ` Emil Velikov
@ 2024-02-23 16:28             ` Joakim Tjernlund
  0 siblings, 0 replies; 15+ messages in thread
From: Joakim Tjernlund @ 2024-02-23 16:28 UTC (permalink / raw
  To: emil.l.velikov@gmail.com; +Cc: linux-bluetooth@vger.kernel.org

On Fri, 2024-02-23 at 16:14 +0000, Emil Velikov wrote:
> On Fri, 23 Feb 2024 at 12:01, Joakim Tjernlund
> <Joakim.Tjernlund@infinera.com> wrote:
> > 
> > On Fri, 2024-02-23 at 11:09 +0000, Emil Velikov wrote:
> > > On Thu, 22 Feb 2024 at 13:22, Joakim Tjernlund
> > > <Joakim.Tjernlund@infinera.com> wrote:
> > > > 
> > > > On Thu, 2024-02-22 at 13:06 +0000, Emil Velikov wrote:
> > > > > On Wed, 21 Feb 2024 at 11:19, Joakim Tjernlund
> > > > > <joakim.tjernlund@infinera.com> wrote:
> > > > > > 
> > > > > > From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > > > 
> > > > > > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
> > > > > > ---
> > > > > >  Makefile.tools | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/Makefile.tools b/Makefile.tools
> > > > > > index 044342e29..b785ebea8 100644
> > > > > > --- a/Makefile.tools
> > > > > > +++ b/Makefile.tools
> > > > > > @@ -538,7 +538,7 @@ endif
> > > > > >  endif
> > > > > > 
> > > > > >  if CUPS
> > > > > > -cupsdir = $(libdir)/cups/backend
> > > > > > +cupsdir = $(libexecdir)/cups/backend
> > > > > > 
> > > > > 
> > > > > Is this true, can you provide some references?
> > > > > 
> > > > > Looking at Debian [1] (which contrary to Arch has libexec) - backends
> > > > > are in /usr/lib. Glancing at the cups backends makefile it's using
> > > > > SERVERBIN. Casual grep shows that libexec can be applicable for
> > > > > BSD/Darwin platforms [3], which are out of scope for bluez IIRC.
> > > > 
> > > > on Gentoo you have:
> > > > 
> > > > qlist net-print/cups | grep backend
> > > > ...
> > > > /usr/libexec/cups/backend/implicitclass
> > > > /usr/libexec/cups/backend/beh
> > > > /usr/libexec/cups/backend/serial
> > > > /usr/libexec/cups/backend/parallel
> > > > /usr/libexec/cups/backend/driverless-fax
> > > > /usr/libexec/cups/backend/driverless
> > > > /usr/libexec/cups/backend/cups-pdf
> > > > 
> > > > but now I see this in Gentoo ebuild:
> > > >         # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
> > > >         # makes more sense when facing multilib support.
> > > >         sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
> > > > 
> > > >         econf "${myeconfargs[@]}"
> > > > 
> > > >         sed -i -e "s:SERVERBIN.*:SERVERBIN = \"\$\(BUILDROOT\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die
> > > >         sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die
> > > >         sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die
> > > > 
> > > > so it appears to be a Gentoo addition.
> > > > Would perhaps
> > > >   pkg-config cups --variable=cups_serverbin
> > > > or
> > > >   cups-config --serverbin
> > > > be acceptable? If no we can just drop this and Gentoo will continue to patch bluez for cups
> > > > 
> > > 
> > > Using the foo-config tools sounds better than the current hard-coded
> > > behaviour. Patch that does that gets a big thumbs-up from me.
> > > Personally I have slight inclination towards the pkg-config - although
> > > it'll be up-to the maintainers.
> > 
> > This is what I came up with:
> > 
> > From c6776b205b8adbf6e2e29108a1a7ff348546a531 Mon Sep 17 00:00:00 2001
> > From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > Date: Fri, 23 Feb 2024 12:56:21 +0100
> > Subject: [PATCH] cups: Use pkg-config to find cups backend dir
> > 
> > Some distributions(Gentoo) patch cups backend path to
> > something else than libdir. Use pkg-config to find backend
> > path for cups.
> > 
> > Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
> > ---
> >  Makefile.tools | 2 --
> >  configure.ac   | 3 +++
> >  2 files changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Makefile.tools b/Makefile.tools
> > index 044342e29..760727557 100644
> > --- a/Makefile.tools
> > +++ b/Makefile.tools
> > @@ -538,8 +538,6 @@ endif
> >  endif
> > 
> >  if CUPS
> > -cupsdir = $(libdir)/cups/backend
> > -
> >  cups_PROGRAMS = profiles/cups/bluetooth
> > 
> >  profiles_cups_bluetooth_SOURCES = profiles/cups/main.c \
> > diff --git a/configure.ac b/configure.ac
> > index bb6380f2f..6a7fefa1d 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -242,6 +242,9 @@ AC_SUBST(UDEV_DIR, [${path_udevdir}])
> >  AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups],
> >                  [disable CUPS printer support]), [enable_cups=${enableval}])
> >  AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
> > +if (test "${enable_cups}" != "no"); then
> > +   AC_SUBST(cupsdir, `$PKG_CONFIG cups --variable=cups_serverbin`/backend)
> > +fi
> > 
> >  AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],
> >                 [enable Mesh profile support]), [enable_mesh=${enableval}])
> 
> AFAICT the existing patterns is to use "AC_SUBST(FOOBARDIR, ...)" in
> configure.ac and "foobardir = $(FOOBARDIR)" in the makefiles.
> 
> Thanks
> Emil
Like so ?

From 70a424b9935712fef297afcb0e6dff8ee154b21e Mon Sep 17 00:00:00 2001
From: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Date: Fri, 23 Feb 2024 12:56:21 +0100
Subject: [PATCH] cups: Use pkg-config to find cups backend dir

Some distributions(Gentoo) patch cups backend path to
something else than libdir. Use pkg-config to find backend
path for cups.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 Makefile.tools | 3 ++-
 configure.ac   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile.tools b/Makefile.tools
index 044342e29..c17244677 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -538,7 +538,8 @@ endif
 endif
 
 if CUPS
-cupsdir = $(libdir)/cups/backend
+
+cupsdir = $(CUPSDIR)
 
 cups_PROGRAMS = profiles/cups/bluetooth
 
diff --git a/configure.ac b/configure.ac
index bb6380f2f..778c27a0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,6 +242,9 @@ AC_SUBST(UDEV_DIR, [${path_udevdir}])
 AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups],
                 [disable CUPS printer support]), [enable_cups=${enableval}])
 AM_CONDITIONAL(CUPS, test "${enable_cups}" != "no")
+if (test "${enable_cups}" != "no"); then
+   AC_SUBST(CUPSDIR, `$PKG_CONFIG cups --variable=cups_serverbin`/backend)
+fi
 
 AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh],
 		[enable Mesh profile support]), [enable_mesh=${enableval}])
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-23 16:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 11:17 [PATCH] bluez.pc.in: Add definition of libexecdir Joakim Tjernlund
2024-02-21 11:18 ` [PATCH] CUPS lives in libexecdir Joakim Tjernlund
2024-02-21 12:31   ` bluez.test.bot
2024-02-22 13:06   ` [PATCH] " Emil Velikov
2024-02-22 13:22     ` Joakim Tjernlund
2024-02-23 11:09       ` Emil Velikov
2024-02-23 12:01         ` Joakim Tjernlund
2024-02-23 16:14           ` Emil Velikov
2024-02-23 16:28             ` Joakim Tjernlund
2024-02-21 12:31 ` bluez.pc.in: Add definition of libexecdir bluez.test.bot
2024-02-22 12:54 ` [PATCH] " Emil Velikov
2024-02-22 13:10   ` Joakim Tjernlund
2024-02-23 11:14     ` Emil Velikov
2024-02-23 12:09       ` Joakim Tjernlund
2024-02-23 16:11         ` Emil Velikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).