zstd: added compression and decompression as packageconfig
PATCH 1/1 zstd: added compression and decompression as packageconfig
The default is the same as before.
So both target and native can do compression and decompression.
Native will probably always needed both. E.g. to create rpm packages. Target could have enough with decompression only. E.g. for OTA systems.
The difference between default and decompression only:
packages/cortexa72-poky-linux/zstd/libzstd: PKGSIZE changed from 661912 to 210776 (-68%) packages/cortexa72-poky-linux/zstd/zstd: PKGSIZE changed from 1430839 to 785007 (-45%)
--- meta/recipes-extended/zstd/zstd_1.5.2.bb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
meta/recipes-extended/zstd/zstd_1.5.2.bb +12 -3
@@ -18,22 +18,31 @@ CVE_PRODUCT = "zstandard" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ??= "compression decompression pzstd" +PACKAGECONFIG:class-target ??= "compression decompression pzstd" +PACKAGECONFIG[compression] = "ZSTD_LIB_COMPRESSION=1,ZSTD_LIB_COMPRESSION=0" +PACKAGECONFIG[decompression] = "ZSTD_LIB_DECOMPRESSION=1,ZSTD_LIB_DECOMPRESSION=0" PACKAGECONFIG[lz4] = "HAVE_LZ4=1,HAVE_LZ4=0,lz4" PACKAGECONFIG[lzma] = "HAVE_LZMA=1,HAVE_LZMA=0,xz" +PACKAGECONFIG[pzstd] = "" PACKAGECONFIG[zlib] = "HAVE_ZLIB=1,HAVE_ZLIB=0,zlib" + # See programs/README.md for how to use this ZSTD_LEGACY_SUPPORT ??= "4" do_compile () { oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} - oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + fi } do_install () { oe_runmake install 'DESTDIR=${D}' - oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + fi } PACKAGE_BEFORE_PN = "libzstd"
Signature · 1 line
2.25.1
pzstd changes need to be either explained or split into a separate patch.
Alex
Quoted 67 lines · Jan Vermaete
The default is the same as before.
So both target and native can do compression and decompression.Native will probably always needed both. E.g. to create rpm packages. Target could have enough with decompression only. E.g. for OTA systems.
The difference between default and decompression only:
packages/cortexa72-poky-linux/zstd/libzstd: PKGSIZE changed from 661912 to 210776 (-68%) packages/cortexa72-poky-linux/zstd/zstd: PKGSIZE changed from 1430839 to 785007 (-45%)Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-extended/zstd/zstd_1.5.2.bb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)meta/recipes-extended/zstd/zstd_1.5.2.bb +12
-4@@ -18,22 +18,31 @@ CVE_PRODUCT = "zstandard" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ??= "compression decompression pzstd" +PACKAGECONFIG:class-target ??= "compression decompression pzstd" +PACKAGECONFIG[compression] = "ZSTD_LIB_COMPRESSION=1,ZSTD_LIB_COMPRESSION=0" +PACKAGECONFIG[decompression] = "ZSTD_LIB_DECOMPRESSION=1,ZSTD_LIB_DECOMPRESSION=0" PACKAGECONFIG[lz4] = "HAVE_LZ4=1,HAVE_LZ4=0,lz4" PACKAGECONFIG[lzma] = "HAVE_LZMA=1,HAVE_LZMA=0,xz" +PACKAGECONFIG[pzstd] = "" PACKAGECONFIG[zlib] = "HAVE_ZLIB=1,HAVE_ZLIB=0,zlib" + # See programs/README.md for how to use this ZSTD_LEGACY_SUPPORT ??= "4" do_compile () { oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} - oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + fi } do_install () { oe_runmake install 'DESTDIR=${D}' - oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + fi } PACKAGE_BEFORE_PN = "libzstd" --2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166632): https://lists.openembedded.org/g/openembedded-core/message/166632
Mute This Topic: https://lists.openembedded.org/mt/91577767/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Alexander,
As far as I know, pzstd is used in the scripting of Yocto/OE. Or at least it's useful to have it there.
So having it at native it a kind of must.
But for target, it's best to have it as an option for those who have to have it tiny.
Is this info added to the commit message enough?
Or is PACKAGECONFIG not the correct way to create this option. After all, it's not an option for the configure stage but for the compile stage.
br
Quoted 86 lines · Alexander Kanavin
pzstd changes need to be either explained or split into a separate patch.
Alex
Quoted 9 lines · Jan Vermaete
The default is the same as before.
So both target and native can do compression and decompression.Native will probably always needed both. E.g. to create rpm packages. Target could have enough with decompression only. E.g. for OTA systems.
The difference between default and decompression only:
packages/cortexa72-poky-linux/zstd/libzstd: PKGSIZE changed from661912 to 210776 (-68%)
Quoted 1 line
packages/cortexa72-poky-linux/zstd/zstd: PKGSIZE changed from 1430839
to 785007 (-45%)
Review
Quoted 7 lines
Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-extended/zstd/zstd_1.5.2.bb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)(quoted diff) +0
-0b/meta/recipes-extended/zstd/zstd_1.5.2.bb
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 23
Quoted 11 lines
index
3887f31ecf..924e7db7f7100644meta/recipes-extended/zstd/zstd_1.5.2.bb +3
-1@@ -18,22 +18,31 @@ CVE_PRODUCT = "zstandard" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ??= "compression decompression pzstd" +PACKAGECONFIG:class-target ??= "compression decompression pzstd" +PACKAGECONFIG[compression] ="ZSTD_LIB_COMPRESSION=1,ZSTD_LIB_COMPRESSION=0"
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 24
Quoted 1 line
meta/recipes-extended/zstd/zstd_1.5.2.bb +1
-0+PACKAGECONFIG[decompression] ="ZSTD_LIB_DECOMPRESSION=1,ZSTD_LIB_DECOMPRESSION=0"
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard"
Quoted 11 lines
meta/recipes-extended/zstd/zstd_1.5.2.bb +2
-0PACKAGECONFIG[lz4] = "HAVE_LZ4=1,HAVE_LZ4=0,lz4" PACKAGECONFIG[lzma] = "HAVE_LZMA=1,HAVE_LZMA=0,xz" +PACKAGECONFIG[pzstd] = "" PACKAGECONFIG[zlib] = "HAVE_ZLIB=1,HAVE_ZLIB=0,zlib" + # See programs/README.md for how to use this ZSTD_LEGACY_SUPPORT ??= "4" do_compile () { oe_runmake ${PACKAGECONFIG_CONFARGS}ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT}
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 31
Quoted 1 line
meta/recipes-extended/zstd/zstd_1.5.2.bb +0
-1- oe_runmake ${PACKAGECONFIG_CONFARGS}ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 36
Quoted 1 line
meta/recipes-extended/zstd/zstd_1.5.2.bb +1
-0+ if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false',d)}; then
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 37
Quoted 1 line
meta/recipes-extended/zstd/zstd_1.5.2.bb +1
-0+ oe_runmake ${PACKAGECONFIG_CONFARGS}ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard"
Quoted 7 lines
meta/recipes-extended/zstd/zstd_1.5.2.bb +2
-1+ fi } do_install () { oe_runmake install 'DESTDIR=${D}' - oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false',d)}; then
meta/recipes-extended/zstd/zstd_1.5.2.bb CVE_PRODUCT = "zstandard" · line 44
Quoted 1 line
meta/recipes-extended/zstd/zstd_1.5.2.bb +1
-0+ oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -Ccontrib/pzstd
Quoted 11 lines
meta/recipes-extended/zstd/zstd_1.5.2.bb +1
-1+ fi } PACKAGE_BEFORE_PN = "libzstd" --2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#166632):https://lists.openembedded.org/g/openembedded-core/message/166632
Quoted 3 lines
Mute This Topic: https://lists.openembedded.org/mt/91577767/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Jan Vermaete “Success is a self-correcting phenomenom.” -- Gary Hamel
I don't mind the option itself, the problem is that it needs to be in its own commit and not squashed with compression/decompression options into a single change. Or you need to say 'added compression/decompression/pzstd as PACKAGECONFIG options' and add to the commit message too.
Alex
Quoted 93 lines · jan vermaete
Hi Alexander,
As far as I know, pzstd is used in the scripting of Yocto/OE. Or at least it's useful to have it there. So having it at native it a kind of must.
But for target, it's best to have it as an option for those who have to have it tiny.
Is this info added to the commit message enough?
Or is PACKAGECONFIG not the correct way to create this option. After all, it's not an option for the configure stage but for the compile stage.br
Quoted 65 lines · Alexander Kanavin
pzstd changes need to be either explained or split into a separate patch.
Alex
Quoted 59 lines · Jan Vermaete
The default is the same as before.
So both target and native can do compression and decompression.Native will probably always needed both. E.g. to create rpm packages. Target could have enough with decompression only. E.g. for OTA systems.
The difference between default and decompression only:
packages/cortexa72-poky-linux/zstd/libzstd: PKGSIZE changed from 661912 to 210776 (-68%) packages/cortexa72-poky-linux/zstd/zstd: PKGSIZE changed from 1430839 to 785007 (-45%)Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-extended/zstd/zstd_1.5.2.bb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)meta/recipes-extended/zstd/zstd_1.5.2.bb +12
-4@@ -18,22 +18,31 @@ CVE_PRODUCT = "zstandard" S = "${WORKDIR}/git" -PACKAGECONFIG ??= "" +PACKAGECONFIG:class-native ??= "compression decompression pzstd" +PACKAGECONFIG:class-target ??= "compression decompression pzstd" +PACKAGECONFIG[compression] = "ZSTD_LIB_COMPRESSION=1,ZSTD_LIB_COMPRESSION=0" +PACKAGECONFIG[decompression] = "ZSTD_LIB_DECOMPRESSION=1,ZSTD_LIB_DECOMPRESSION=0" PACKAGECONFIG[lz4] = "HAVE_LZ4=1,HAVE_LZ4=0,lz4" PACKAGECONFIG[lzma] = "HAVE_LZMA=1,HAVE_LZMA=0,xz" +PACKAGECONFIG[pzstd] = "" PACKAGECONFIG[zlib] = "HAVE_ZLIB=1,HAVE_ZLIB=0,zlib" + # See programs/README.md for how to use this ZSTD_LEGACY_SUPPORT ??= "4" do_compile () { oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} - oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake ${PACKAGECONFIG_CONFARGS} ZSTD_LEGACY_SUPPORT=${ZSTD_LEGACY_SUPPORT} -C contrib/pzstd + fi } do_install () { oe_runmake install 'DESTDIR=${D}' - oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + if ${@bb.utils.contains('PACKAGECONFIG', 'pzstd', 'true', 'false', d)}; then + oe_runmake install 'DESTDIR=${D}' PREFIX=${prefix} -C contrib/pzstd + fi } PACKAGE_BEFORE_PN = "libzstd" --2.25.1
Quoted 8 lines
Quoted 8 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166632): https://lists.openembedded.org/g/openembedded-core/message/166632
Mute This Topic: https://lists.openembedded.org/mt/91577767/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=---
Jan Vermaete
“Success is a self-correcting phenomenom.” -- Gary Hamel