bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf
       [not found]   ` <20190321160042.GB13709@rdna-mbp>
@ 2019-03-21 22:01     ` Alexei Starovoitov
  2019-03-21 22:19       ` Daniel Borkmann
  2019-03-21 22:23       ` Luca Boccassi
  0 siblings, 2 replies; 4+ messages in thread
From: Alexei Starovoitov @ 2019-03-21 22:01 UTC (permalink / raw)
  To: Andrey Ignatov; +Cc: luca.boccassi, netdev, bpf, daniel

On Thu, Mar 21, 2019 at 04:00:46PM +0000, Andrey Ignatov wrote:
> luca.boccassi@gmail.com <luca.boccassi@gmail.com> [Thu, 2019-03-21 03:26 -0700]:
> > From: Luca Boccassi <bluca@debian.org>
> > 
> > Generate a libbpf.pc file at build time so that users can rely
> > on pkg-config to find the library, its CFLAGS and LDFLAGS.
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
...
> > diff --git a/tools/lib/bpf/libbpf.pc.template b/tools/lib/bpf/libbpf.pc.template
> > new file mode 100644
> > index 000000000000..0ecd334c109f
> > --- /dev/null
> > +++ b/tools/lib/bpf/libbpf.pc.template
> > @@ -0,0 +1,11 @@
> > +prefix=@PREFIX@
> > +libdir=@LIBDIR@
> > +includedir=${prefix}/include
> > +
> > +Name: libbpf
> > +URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > +Description: Linux kernel BPF library

github/libbpf/libbpf is a true mirror of kernel's libbpf.
I think if we start shipping libbpf.so from kernel and from github
it will be very confusing to the users...
Which one is the true libbpf?
Also the package should mention the license.
And the license for libbpf is dual lgpl/bsd.
But if we point to the url above it will not make much sense.
I think the packages URL should point to github/libbpf/libbpf
and packaging scripts should be in github only.

Daniel,
what do you think?


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

* Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf
  2019-03-21 22:01     ` [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf Alexei Starovoitov
@ 2019-03-21 22:19       ` Daniel Borkmann
  2019-03-21 22:34         ` Luca Boccassi
  2019-03-21 22:23       ` Luca Boccassi
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2019-03-21 22:19 UTC (permalink / raw)
  To: Alexei Starovoitov, Andrey Ignatov; +Cc: luca.boccassi, netdev, bpf

On 03/21/2019 11:01 PM, Alexei Starovoitov wrote:
> On Thu, Mar 21, 2019 at 04:00:46PM +0000, Andrey Ignatov wrote:
>> luca.boccassi@gmail.com <luca.boccassi@gmail.com> [Thu, 2019-03-21 03:26 -0700]:
>>> From: Luca Boccassi <bluca@debian.org>
>>>
>>> Generate a libbpf.pc file at build time so that users can rely
>>> on pkg-config to find the library, its CFLAGS and LDFLAGS.
>>>
>>> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ...
>>> diff --git a/tools/lib/bpf/libbpf.pc.template b/tools/lib/bpf/libbpf.pc.template
>>> new file mode 100644
>>> index 000000000000..0ecd334c109f
>>> --- /dev/null
>>> +++ b/tools/lib/bpf/libbpf.pc.template
>>> @@ -0,0 +1,11 @@
>>> +prefix=@PREFIX@
>>> +libdir=@LIBDIR@
>>> +includedir=${prefix}/include
>>> +
>>> +Name: libbpf
>>> +URL: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>> +Description: Linux kernel BPF library
> 
> github/libbpf/libbpf is a true mirror of kernel's libbpf.
> I think if we start shipping libbpf.so from kernel and from github
> it will be very confusing to the users...
> Which one is the true libbpf?
> Also the package should mention the license.
> And the license for libbpf is dual lgpl/bsd.
> But if we point to the url above it will not make much sense.
> I think the packages URL should point to github/libbpf/libbpf
> and packaging scripts should be in github only.
> 
> Daniel,
> what do you think?

Looking at [0], I don't see where license would be part of the keyword. Given
this is just a pkg-config file where folks using it care mainly about the
needed cflags/libs, it would make sense to me to ship it and have it under
tools/lib/bpf/ in kernel tree (since this is distro independent). If the URL
and Description causes confusion, I would probably just remove the URL field
since it's not mandatory either. And description, I'd put something like
'official BPF library' or such, so it's generic enough.

  [0] https://autotools.io/pkgconfig/file-format.html
      https://dev.gentoo.org/~mgorny/pkg-config-spec.html#keywords

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

* Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf
  2019-03-21 22:01     ` [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf Alexei Starovoitov
  2019-03-21 22:19       ` Daniel Borkmann
@ 2019-03-21 22:23       ` Luca Boccassi
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2019-03-21 22:23 UTC (permalink / raw)
  To: Alexei Starovoitov, Andrey Ignatov; +Cc: netdev, bpf, daniel

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

On Thu, 2019-03-21 at 15:01 -0700, Alexei Starovoitov wrote:
> On Thu, Mar 21, 2019 at 04:00:46PM +0000, Andrey Ignatov wrote:
> > luca.boccassi@gmail.com <luca.boccassi@gmail.com> [Thu, 2019-03-21
> > 03:26 -0700]:
> > > From: Luca Boccassi <bluca@debian.org>
> > > 
> > > Generate a libbpf.pc file at build time so that users can rely
> > > on pkg-config to find the library, its CFLAGS and LDFLAGS.
> > > 
> > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> ...
> > > diff --git a/tools/lib/bpf/libbpf.pc.template
> > > b/tools/lib/bpf/libbpf.pc.template
> > > new file mode 100644
> > > index 000000000000..0ecd334c109f
> > > --- /dev/null
> > > +++ b/tools/lib/bpf/libbpf.pc.template
> > > @@ -0,0 +1,11 @@
> > > +prefix=@PREFIX@
> > > +libdir=@LIBDIR@
> > > +includedir=${prefix}/include
> > > +
> > > +Name: libbpf
> > > +URL: 
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > > +Description: Linux kernel BPF library
> 
> github/libbpf/libbpf is a true mirror of kernel's libbpf.
> I think if we start shipping libbpf.so from kernel and from github
> it will be very confusing to the users...
> Which one is the true libbpf?

I'm afraid that ship already sailed :-) Users and distributions are
already consuming libbpf from the kernel tree.

> Also the package should mention the license.
> And the license for libbpf is dual lgpl/bsd.

I followed the template from the other pkgconfig file (in traceevent)
which does not have it, but I can add it in v5.

> But if we point to the url above it will not make much sense.
> I think the packages URL should point to github/libbpf/libbpf
> and packaging scripts should be in github only.

If only one side ships the pc file, then you'll have half the users
installing libbpf without a pc file, and the other half with it, so it
would defeat the point of having one in the first place.

> Daniel,
> what do you think?
> 
-- 
Kind regards,
Luca Boccassi

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf
  2019-03-21 22:19       ` Daniel Borkmann
@ 2019-03-21 22:34         ` Luca Boccassi
  0 siblings, 0 replies; 4+ messages in thread
From: Luca Boccassi @ 2019-03-21 22:34 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov, Andrey Ignatov; +Cc: netdev, bpf

On Thu, 2019-03-21 at 23:19 +0100, Daniel Borkmann wrote:
> On 03/21/2019 11:01 PM, Alexei Starovoitov wrote:
> > On Thu, Mar 21, 2019 at 04:00:46PM +0000, Andrey Ignatov wrote:
> > > luca.boccassi@gmail.com <luca.boccassi@gmail.com> [Thu, 2019-03-
> > > 21 03:26 -0700]:
> > > > From: Luca Boccassi <bluca@debian.org>
> > > > 
> > > > Generate a libbpf.pc file at build time so that users can rely
> > > > on pkg-config to find the library, its CFLAGS and LDFLAGS.
> > > > 
> > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ...
> > > > diff --git a/tools/lib/bpf/libbpf.pc.template
> > > > b/tools/lib/bpf/libbpf.pc.template
> > > > new file mode 100644
> > > > index 000000000000..0ecd334c109f
> > > > --- /dev/null
> > > > +++ b/tools/lib/bpf/libbpf.pc.template
> > > > @@ -0,0 +1,11 @@
> > > > +prefix=@PREFIX@
> > > > +libdir=@LIBDIR@
> > > > +includedir=${prefix}/include
> > > > +
> > > > +Name: libbpf
> > > > +URL: 
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > > > +Description: Linux kernel BPF library
> > 
> > github/libbpf/libbpf is a true mirror of kernel's libbpf.
> > I think if we start shipping libbpf.so from kernel and from github
> > it will be very confusing to the users...
> > Which one is the true libbpf?
> > Also the package should mention the license.
> > And the license for libbpf is dual lgpl/bsd.
> > But if we point to the url above it will not make much sense.
> > I think the packages URL should point to github/libbpf/libbpf
> > and packaging scripts should be in github only.
> > 
> > Daniel,
> > what do you think?
> 
> Looking at [0], I don't see where license would be part of the
> keyword. Given
> this is just a pkg-config file where folks using it care mainly about
> the
> needed cflags/libs, it would make sense to me to ship it and have it
> under
> tools/lib/bpf/ in kernel tree (since this is distro independent). If
> the URL
> and Description causes confusion, I would probably just remove the
> URL field
> since it's not mandatory either. And description, I'd put something
> like
> 'official BPF library' or such, so it's generic enough.
> 
>   [0] https://autotools.io/pkgconfig/file-format.html
>       https://dev.gentoo.org/~mgorny/pkg-config-spec.html#keywords

I assumed the license referred to the file itself, so I added the SDPX
comment. It's not too uncommon for pc files to have the license comment
at the top.

Removed URL and changed Descriptin in v6, thanks for reviewing!

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2019-03-21 22:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190319210639.6282-1-bluca@debian.org>
     [not found] ` <20190321102531.31810-1-luca.boccassi@gmail.com>
     [not found]   ` <20190321160042.GB13709@rdna-mbp>
2019-03-21 22:01     ` [PATCH bpf-next v4] tools/bpf: generate pkg-config file for libbpf Alexei Starovoitov
2019-03-21 22:19       ` Daniel Borkmann
2019-03-21 22:34         ` Luca Boccassi
2019-03-21 22:23       ` Luca Boccassi

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 NNTP newsgroup(s).