Re: [OE-core] [PATCH v2] Add new recipe for squashfs-tools-ng

Peter Kjellerstedt
2020-10-22T11:11:01Z

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Luca Bocassi
> Sent: den 22 oktober 2020 11:20
> To: openembedded-core@lists.openembedded.org
> Cc: kweihmann@outlook.com
> Subject: [OE-core] [PATCH v2] Add new recipe for squashfs-tools-ng
>
> From: Luca Boccassi <luca.boccassi@microsoft.com>
>
> The main difference with squashfs-tools is the availability
> of a shared library and a programmatic interface, rather
> than just command-line tools.
>
> Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
> ---
> v2: added MIT, Zlib and BSD-2-Clause to LICENSE
>
> .../squashfs-tools-ng_git.bb | 37 +++++++++++++++++++
> 1 file changed, 37 insertions(+)
> create mode 100644 meta/recipes-devtools/squashfs-tools-ng/squashfs-
> tools-ng_git.bb
>
> diff --git a/meta/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_git.bb b/meta/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_git.bb
> new file mode 100644
> index 0000000000..6479017ddb
> --- /dev/null
> +++ b/meta/recipes-devtools/squashfs-tools-ng/squashfs-tools-ng_git.bb
> @@ -0,0 +1,37 @@
> +SUMMARY = "New set of tools for working with SquashFS images"
> +SECTION = "base"
> +LICENSE = "GPLv3+ & LGPL-3.0+ & MIT & BSD-2-Clause & Zlib"

Change "GPLv3+" to "GPL-3.0+" for consistency.

You have GPL-2.0 listed below too so it should probably be added
above as well.

> +LIC_FILES_CHKSUM = "file://COPYING.md;md5=c0de2c0aca56349dab98e97992316f7e \
> + file://licenses/GPLv2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
> + file://licenses/GPLv3.txt;md5=1ebbd3e34237af26da5dc08a4e440464 \
> + file://licenses/hash_table.txt;md5=874823605326caeaabaa95bfbd0f9fb0 \
> + file://licenses/LGPLv3.txt;md5=3000208d539ec061b899bce1d9ce9404 \
> + file://licenses/LZ4.txt;md5=ebc2ea4814a64de7708f1571904b32cc \
> + file://licenses/xxhash.txt;md5=f042a9be092bd6d7fe6f217d8d00f4ca \
> + file://licenses/xz.txt;md5=1c389b9610ccfdb25f7abaea6a0bb5a4 \
> + file://licenses/zlib.txt;md5=ae27c72096606131f760e5f59cf98b06 \
> + file://licenses/zstd.txt;md5=8df8137b630239cbdd4c0674124cb0c8"
> +
> +PV = "1.0.2"

Move the version to the file name.

> +SRCREV = "b96f0fc154feef531be76034bf6e38925636146f"
> +SRC_URI = "git://github.com/AgentD/squashfs-tools-ng.git;protocol=https \
> +"

I'd remove that backslash and keep it as one line.

> +
> +S = "${WORKDIR}/git"
> +
> +inherit autotools pkgconfig
> +
> +PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"

Change to:

PACKAGECONFIG ??= "gzip xz lzo lz4 zstd ${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"

> +PACKAGECONFIG[gzip] = "--with-gzip,--without-gzip,zlib"
> +PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz"
> +PACKAGECONFIG[lzo] = "--with-lzo,--without-lzo,lzo"
> +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4"
> +PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
> +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux"
> +
> +PACKAGES =+ "libsquashfs"
> +FILES_libsquashfs = "${libdir}/libsquashfs*${SOLIBS}"
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +CVE_PRODUCT = "squashfs"
> --
> 2.20.1

//Peter