[libcamera-devel] [PATCH v2] package metadata

Christian Rauch Rauch.Christian at gmx.de
Mon Aug 15 23:17:05 CEST 2022


Hi Kieran,

Am 15.08.22 um 23:09 schrieb Kieran Bingham:
> Hi Christian,
>
> Quoting Christian Rauch via libcamera-devel (2022-08-15 20:12:31)
>> Hi Kieran,
>>
>> Am 15.08.22 um 10:18 schrieb Kieran Bingham:
>>> Quoting Christian Rauch via libcamera-devel (2022-08-13 13:31:18)
>>>> This metadata file provides information, amongst others, about the version,
>>>> licence, maintainers and build dependencies. This file is used by build
>>>> systems (catkin, colcon) to manage a dependency graph and resolve those
>>>> dependencies automatically.
>>>>
>>>> The file structure is defined at: https://www.ros.org/reps/rep-0149.html
>>>>
>>>> Signed-off-by: Christian Rauch <Rauch.Christian at gmx.de>
>>>> ---
>>>>  package.xml | 31 +++++++++++++++++++++++++++++++
>>>>  1 file changed, 31 insertions(+)
>>>>  create mode 100644 package.xml
>>>>
>>>> diff --git a/package.xml b/package.xml
>>>> new file mode 100644
>>>> index 00000000..2264efd9
>>>> --- /dev/null
>>>> +++ b/package.xml
>>>> @@ -0,0 +1,31 @@
>>>
>>> Do we need to add any licence information in here?, or in .reuse/dep5 at
>>> all?
>>
>> The licence information should go into the tag "license" (see below).
>
> I meant for this file specifically. As in - Does this need to add an
> SPDX header.

I actually have never seen that the "package.xml" has its own licence.
There is no requirement to have a licence specifically for this file.
Packages only require to have at least once licence selected. I guess by
default this once licence applies to all files in the repo if not stated
otherwise.

If you need to choose a licence for this file, I would go for "CC0-1.0",
the same as the meson.build.

>
>>>
>>>> +<?xml version="1.0"?>
>>>> +<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
>>>> +<package format="3">
>>>> +  <name>libcamera</name>
>>>> +
>>>> +  <version>0.0.0</version>
>>>
>>> If this file was generated by meson, it could populate this field. But I
>>> fear that's a bit 'chicken and egg'.
>>
>> This file is parsed before the build is started. Otherwise, required
>> dependencies couldn't be fetched or built before.
>>
>>>
>>> How does ROS handle sources? Does it include libcamera as a subproject?
>>> or using the repo tool perhaps?
>>
>> Either way. You can check out the libcamera as part of your workspace
>> (that's what I am currently doing) and then have it automatically built
>> (by catkin or colcon) if it is required by another project, or you can
>> distribute a binary version of it in the ROS repo and have it fetched
>> via rosdep. Anyway, the dependency information is required such that
>> rosdep can download required dependences or colcon can build packages in
>> the right order.
>>
>>>
>>>> +  <description>An open source camera stack and framework for Linux, Android, and ChromeOS</description>
>>>> +
>>>> +  <maintainer email="libcamera-devel at lists.libcamera.org">libcamera project</maintainer>
>>>> +
>>>> +  <license>LGPL-2.1</license>
>>>
>>> That's correct for the library itself, but not the utilities or other
>>> toolings. And the IPA modules have different licence constraints.
>>>
>>> Does a package.xml file have the ability to state multiple licences, or
>>> specify what the license applies to?
>>>
>> Good point. You can specify multiple licences [1] by using the "license"
>> tag multiple times. I think for mixed licencing, you are supposed to add
>> a "SPDX Identifier" [2] to the top of every file in order to make this
>> machine-readable.
>
> Yes, SPDX headers are used extensively in libcamera, but is not added to
> this file.
>
>> [1] https://www.ros.org/reps/rep-0149.html#license-multiple-but-at-least-one
>> [2] https://spdx.org/licenses/
>>>
>>>> +
>>>> +  <url>https://libcamera.org</url>
>>>> +
>>>> +  <buildtool_depend>python3-meson-pip</buildtool_depend>
>>>> +  <buildtool_depend>ninja-build</buildtool_depend>
>>>> +  <buildtool_depend>pkg-config</buildtool_depend>
>>>> +
>>>> +  <build_depend>python3-yaml</build_depend>
>>>> +  <build_depend>python3-ply</build_depend>
>>>> +  <build_depend>python3-jinja2</build_depend>
>>>> +
>>>> +  <depend>yaml</depend>
>>>> +  <depend>libgnutls28-dev</depend>
>>>> +  <depend>libudev-dev</depend>
>>>> +
>>>> +  <export>
>>>> +    <build_type>meson</build_type>
>>>> +  </export>
>>>> +</package>
>>>> --
>>>> 2.34.1
>>>>


More information about the libcamera-devel mailing list