2019-04-12 14:08:10

by Ludwig Nussel

[permalink] [raw]
Subject: [PATCH] Fix cups backend location

---
Makefile.tools | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile.tools b/Makefile.tools
index 7d5361bcd..9f8a0b87b 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -436,7 +436,10 @@ endif
endif

if CUPS
-cupsdir = $(libdir)/cups/backend
+# need to use upstream location here which is $exec_prefix/lib/cups/backend, see
+# https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
+# https://github.com/apple/cups/blob/master/backend/Makefile
+cupsdir = $(exec_prefix)/lib/cups/backend

cups_PROGRAMS = profiles/cups/bluetooth

--
2.16.4



2019-04-15 07:52:36

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location

Hi Bastien,

On Fri, Apr 12, 2019 at 5:11 PM Ludwig Nussel <[email protected]> wrote:
>
> ---
> Makefile.tools | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.tools b/Makefile.tools
> index 7d5361bcd..9f8a0b87b 100644
> --- a/Makefile.tools
> +++ b/Makefile.tools
> @@ -436,7 +436,10 @@ endif
> endif
>
> if CUPS
> -cupsdir = $(libdir)/cups/backend
> +# need to use upstream location here which is $exec_prefix/lib/cups/backend, see
> +# https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
> +# https://github.com/apple/cups/blob/master/backend/Makefile
> +cupsdir = $(exec_prefix)/lib/cups/backend
>
> cups_PROGRAMS = profiles/cups/bluetooth

Any feedback on these changes?
--
Luiz Augusto von Dentz

2019-04-15 09:37:53

by Bastien Nocera

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location

On Mon, 2019-04-15 at 10:52 +0300, Luiz Augusto von Dentz wrote:
> Hi Bastien,
>
> On Fri, Apr 12, 2019 at 5:11 PM Ludwig Nussel <[email protected]>
> wrote:
> > ---
> > Makefile.tools | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile.tools b/Makefile.tools
> > index 7d5361bcd..9f8a0b87b 100644
> > --- a/Makefile.tools
> > +++ b/Makefile.tools
> > @@ -436,7 +436,10 @@ endif
> > endif
> >
> > if CUPS
> > -cupsdir = $(libdir)/cups/backend
> > +# need to use upstream location here which is
> > $exec_prefix/lib/cups/backend, see
> > +#
> > https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
> > +# https://github.com/apple/cups/blob/master/backend/Makefile
> > +cupsdir = $(exec_prefix)/lib/cups/backend
> >
> > cups_PROGRAMS = profiles/cups/bluetooth
>
> Any feedback on these changes?

The Fedora package has been doing that manually for 11 years, so, yes
that looks correct.

It should probably be using the output of
"cups-config --serverbin" instead, but given how hard that is with
autotools, this is probably fine. I'd mention it in the commend instead
of linking at the code though.


2019-04-23 17:01:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location

Hi Bastien,

>>> ---
>>> Makefile.tools | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Makefile.tools b/Makefile.tools
>>> index 7d5361bcd..9f8a0b87b 100644
>>> --- a/Makefile.tools
>>> +++ b/Makefile.tools
>>> @@ -436,7 +436,10 @@ endif
>>> endif
>>>
>>> if CUPS
>>> -cupsdir = $(libdir)/cups/backend
>>> +# need to use upstream location here which is
>>> $exec_prefix/lib/cups/backend, see
>>> +#
>>> https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
>>> +# https://github.com/apple/cups/blob/master/backend/Makefile
>>> +cupsdir = $(exec_prefix)/lib/cups/backend
>>>
>>> cups_PROGRAMS = profiles/cups/bluetooth
>>
>> Any feedback on these changes?
>
> The Fedora package has been doing that manually for 11 years, so, yes
> that looks correct.
>
> It should probably be using the output of
> "cups-config --serverbin" instead, but given how hard that is with
> autotools, this is probably fine. I'd mention it in the commend instead
> of linking at the code though.

can someone add pkg-config support to CUPS. Then we can just get the directory from there. We are doing it this way for D-Bus and systemd.

Regards

Marcel



2019-04-23 17:14:07

by Bastien Nocera

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location



> On 23 Apr 2019, at 19:01, Marcel Holtmann <[email protected]> wrote:
>
> Hi Bastien,
>
>>>> ---
>>>> Makefile.tools | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/Makefile.tools b/Makefile.tools
>>>> index 7d5361bcd..9f8a0b87b 100644
>>>> --- a/Makefile.tools
>>>> +++ b/Makefile.tools
>>>> @@ -436,7 +436,10 @@ endif
>>>> endif
>>>>
>>>> if CUPS
>>>> -cupsdir = $(libdir)/cups/backend
>>>> +# need to use upstream location here which is
>>>> $exec_prefix/lib/cups/backend, see
>>>> +#
>>>> https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
>>>> +# https://github.com/apple/cups/blob/master/backend/Makefile
>>>> +cupsdir = $(exec_prefix)/lib/cups/backend
>>>>
>>>> cups_PROGRAMS = profiles/cups/bluetooth
>>>
>>> Any feedback on these changes?
>>
>> The Fedora package has been doing that manually for 11 years, so, yes
>> that looks correct.
>>
>> It should probably be using the output of
>> "cups-config --serverbin" instead, but given how hard that is with
>> autotools, this is probably fine. I'd mention it in the commend instead
>> of linking at the code though.
>
> can someone add pkg-config support to CUPS. Then we can just get the directory from there. We are doing it this way for D-Bus and systemd.

IIRC, Apple, the maintainer of CUPS, has refused pkg-config support in the past. So best not wait for that.

>
> Regards
>
> Marcel
>
>


2019-05-23 12:07:41

by Ludwig Nussel

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location

Bastien Nocera schrieb:
> On Mon, 2019-04-15 at 10:52 +0300, Luiz Augusto von Dentz wrote:
>> Hi Bastien,
>>
>> On Fri, Apr 12, 2019 at 5:11 PM Ludwig Nussel <[email protected]>
>> wrote:
>>> ---
>>> Makefile.tools | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Makefile.tools b/Makefile.tools
>>> index 7d5361bcd..9f8a0b87b 100644
>>> --- a/Makefile.tools
>>> +++ b/Makefile.tools
>>> @@ -436,7 +436,10 @@ endif
>>> endif
>>>
>>> if CUPS
>>> -cupsdir = $(libdir)/cups/backend
>>> +# need to use upstream location here which is
>>> $exec_prefix/lib/cups/backend, see
>>> +#
>>> https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
>>> +# https://github.com/apple/cups/blob/master/backend/Makefile
>>> +cupsdir = $(exec_prefix)/lib/cups/backend
>>>
>>> cups_PROGRAMS = profiles/cups/bluetooth
>>
>> Any feedback on these changes?
>
> The Fedora package has been doing that manually for 11 years, so, yes
> that looks correct.
>
> It should probably be using the output of
> "cups-config --serverbin" instead, but given how hard that is with
> autotools, this is probably fine. I'd mention it in the commend instead
> of linking at the code though.

The output of cups-config doesn't give a hint about exec_prefix vs
libdir though. Since reading through those files I linked was what I
did to understand what the correct value was, I thought mentioning
them would help the text person.
So what comment should I put to get this patch accepted? Looks like none
like before was ok for years after all :-)

I'm not really up to spending a day crafting M4 macros for the perfect
cups special arrangement.

cu
Ludwig

--
(o_ Ludwig Nussel
//\
V_/_ http://www.suse.com/
SUSE Linux GmbH, GF: Felix Imendörffer, Mary Higgins, Sri Rasiah,
HRB 21284 (AG Nürnberg)

2019-05-23 12:12:37

by Bastien Nocera

[permalink] [raw]
Subject: Re: [PATCH] Fix cups backend location

On Thu, 2019-05-23 at 14:07 +0200, Ludwig Nussel wrote:
> Bastien Nocera schrieb:
> > On Mon, 2019-04-15 at 10:52 +0300, Luiz Augusto von Dentz wrote:
> > > Hi Bastien,
> > >
> > > On Fri, Apr 12, 2019 at 5:11 PM Ludwig Nussel <
> > > [email protected]>
> > > wrote:
> > > > ---
> > > > Makefile.tools | 5 ++++-
> > > > 1 file changed, 4 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/Makefile.tools b/Makefile.tools
> > > > index 7d5361bcd..9f8a0b87b 100644
> > > > --- a/Makefile.tools
> > > > +++ b/Makefile.tools
> > > > @@ -436,7 +436,10 @@ endif
> > > > endif
> > > >
> > > > if CUPS
> > > > -cupsdir = $(libdir)/cups/backend
> > > > +# need to use upstream location here which is
> > > > $exec_prefix/lib/cups/backend, see
> > > > +#
> > > > https://github.com/apple/cups/blob/master/config-scripts/cups-directories.m4
> > > > +# https://github.com/apple/cups/blob/master/backend/Makefile
> > > > +cupsdir = $(exec_prefix)/lib/cups/backend
> > > >
> > > > cups_PROGRAMS = profiles/cups/bluetooth
> > >
> > > Any feedback on these changes?
> >
> > The Fedora package has been doing that manually for 11 years, so,
> > yes
> > that looks correct.
> >
> > It should probably be using the output of
> > "cups-config --serverbin" instead, but given how hard that is with
> > autotools, this is probably fine. I'd mention it in the commend
> > instead
> > of linking at the code though.
>
> The output of cups-config doesn't give a hint about exec_prefix vs
> libdir though. Since reading through those files I linked was what I
> did to understand what the correct value was, I thought mentioning
> them would help the text person.

It needs to be mentioned in the commit message, not in the "code".

> So what comment should I put to get this patch accepted? Looks like
> none
> like before was ok for years after all :-)
>
> I'm not really up to spending a day crafting M4 macros for the
> perfect
> cups special arrangement.

I already said it shouldn't be needed. Can you send a new patch with
the changes I requested?

Cheers