Message ID | 20250307075100.645020-1-mingli.yu@eng.windriver.com |
---|---|
State | New |
Headers | show |
Series | minizip: Add new recipe | expand |
On 7 Mar 2025, at 07:51, Yu, Mingli via lists.openembedded.org <mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: > > From: Mingli Yu <mingli.yu@windriver.com> > > minizip [1] uses zlib [2] to support compressed archives. > > minizip is not part of zlib, but is included in the zlib > distribution [1] as a third-party contribution in the contrib > directory. The minizip which has "All files under this contrib directory are UNSUPPORTED. They were provided by users of zlib and were not tested by the authors of zlib.” in the README? Why would we need this at all, and why would it be in core? If this is essential, why not build it as part of zlib? Ross
Hi Ross, On 3/7/25 18:24, Ross Burton wrote: > CAUTION: This email comes from a non Wind River email account! > Do not click links or open attachments unless you recognize the sender and know the content is safe. > > On 7 Mar 2025, at 07:51, Yu, Mingli via lists.openembedded.org <mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >> >> From: Mingli Yu <mingli.yu@windriver.com> >> >> minizip [1] uses zlib [2] to support compressed archives. >> >> minizip is not part of zlib, but is included in the zlib >> distribution [1] as a third-party contribution in the contrib >> directory. > > The minizip which has "All files under this contrib directory are UNSUPPORTED. They were > provided by users of zlib and were not tested by the authors of zlib.” in the README? > > Why would we need this at all, and why would it be in core? If it's not appropriate to send this patch to core, I will resend to other layer. > > If this is essential, why not build it as part of zlib? Though the minizip code is distributed together with zlib and it's the third-party contribution under the contrib sub directory of zlib and also depends on zlib when build minizip. Thanks, > > Ross
On 10 Mar 2025, at 02:50, Yu, Mingli via lists.openembedded.org <mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: > > Hi Ross, > > On 3/7/25 18:24, Ross Burton wrote: >> CAUTION: This email comes from a non Wind River email account! >> Do not click links or open attachments unless you recognize the sender and know the content is safe. >> On 7 Mar 2025, at 07:51, Yu, Mingli via lists.openembedded.org <mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >>> >>> From: Mingli Yu <mingli.yu@windriver.com> >>> >>> minizip [1] uses zlib [2] to support compressed archives. >>> >>> minizip is not part of zlib, but is included in the zlib >>> distribution [1] as a third-party contribution in the contrib >>> directory. >> The minizip which has "All files under this contrib directory are UNSUPPORTED. They were >> provided by users of zlib and were not tested by the authors of zlib.” in the README? >> Why would we need this at all, and why would it be in core? > > If it's not appropriate to send this patch to core, I will resend to other layer. It’s almost definitely not appropriate for core, but why would you need a recipe for it at all? Ross
On 2025-03-10 8:51 a.m., Ross Burton via lists.openembedded.org wrote: > On 10 Mar 2025, at 02:50, Yu, Mingli via lists.openembedded.org<mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >> Hi Ross, >> >> On 3/7/25 18:24, Ross Burton wrote: >>> CAUTION: This email comes from a non Wind River email account! >>> Do not click links or open attachments unless you recognize the sender and know the content is safe. >>> On 7 Mar 2025, at 07:51, Yu, Mingli via lists.openembedded.org<mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >>>> From: Mingli Yu<mingli.yu@windriver.com> >>>> >>>> minizip [1] uses zlib [2] to support compressed archives. >>>> >>>> minizip is not part of zlib, but is included in the zlib >>>> distribution [1] as a third-party contribution in the contrib >>>> directory. >>> The minizip which has "All files under this contrib directory are UNSUPPORTED. They were >>> provided by users of zlib and were not tested by the authors of zlib.” in the README? >>> Why would we need this at all, and why would it be in core? >> If it's not appropriate to send this patch to core, I will resend to other layer. > It’s almost definitely not appropriate for core, but why would you need a recipe for it at all? It was a customer request. I should have asked why, as you are now so we'll do that and we'll get back to you. Note that minizip is used in meta-qt6: https://code.qt.io/cgit/yocto/meta-qt6.git/commit/?id=9c2b02aab650137fd8c0febaecbc6d593ffb3d02 WebEngine needs minizip which is part of zlib.Till now it always built bundled zip as minizip recipe does not exist in poky and moreover this was never a configurable feature as it was not in PACKAGECONFIG. A change in https://codereview.qt-project.org/c/qt/qtwebengine/+/384262 enables compilation of bundled minizip against system zlib (by using shim headers) however it is not advisable as those two version of zip might be different and minizip is project wise a part of zlib. Therefore introduce cheap rip off of zlib recipe, however building minizip from same source tree. That isn't a very satisfying explanation of why the WebEngine prefers minizip to zlib... Stay tuned, ../Randy > > Ross > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#212515):https://lists.openembedded.org/g/openembedded-core/message/212515 > Mute This Topic:https://lists.openembedded.org/mt/111564172/3616765 > Group Owner:openembedded-core+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Add Michal from Qt who made the commit mentioned below. Hopefully they can add a bit more detail to the WebEngine -> minizip preference. One would hope that the object size and run-time memory footprint of minizip is smaller than the feature rich, libz but we should check if that's true. Some data below showing the LOC for minzip alone (7.6K), vs zlib(including minizip) (52K). ../Randy I happened to have this data. I should look at how many places vendor zlib... ❯ loc tmp/work/x86_64-linux/rust-native/1.83.0/rustc-1.83.0-src/vendor/libz-sys-1.1.3/src/zlib/contrib/minizip/ -------------------------------------------------------------------------------- Language Files Lines Blank Comment Code -------------------------------------------------------------------------------- C 7 6312 1057 542 4713 C/C++ Header 6 1203 233 365 605 ... -------------------------------------------------------------------------------- Total 18 7677 1334 907 5436 -------------------------------------------------------------------------------- ❯ loc tmp/work/x86_64-linux/rust-native/1.83.0/rustc-1.83.0-src/vendor/libz-sys-1.1.3/src/zlib -------------------------------------------------------------------------------- Language Files Lines Blank Comment Code -------------------------------------------------------------------------------- C 42 26378 3302 4804 18272 Assembly 8 5259 1033 998 3228 C/C++ Header 27 6710 913 2645 3152 Plain Text 21 3753 1117 0 2636 Ada 10 2840 599 560 1681 Makefile 22 2140 493 288 1359 Pascal 4 1443 219 166 1058 Bourne Shell 2 1287 156 148 983 C++ 5 907 172 136 599 HTML 1 545 5 1 539 C# 9 332 47 54 231 CMake 1 249 32 31 186 Perl 1 152 33 15 104 Autoconf 3 559 49 407 103 XML 1 116 5 16 95 Batch 2 4 0 0 4 -------------------------------------------------------------------------------- Total 159 52674 8175 10269 34230 -------------------------------------------------------------------------------- On 2025-03-10 2:30 p.m., Randy MacLeod via lists.openembedded.org wrote: > On 20michal.klocek@qt.io25-03-10 8:51 a.m., Ross Burton via > lists.openembedded.org wrote: >> On 10 Mar 2025, at 02:50, Yu, Mingli via lists.openembedded.org<mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >>> Hi Ross, >>> >>> On 3/7/25 18:24, Ross Burton wrote: >>>> CAUTION: This email comes from a non Wind River email account! >>>> Do not click links or open attachments unless you recognize the sender and know the content is safe. >>>> On 7 Mar 2025, at 07:51, Yu, Mingli via lists.openembedded.org<mingli.yu=eng.windriver.com@lists.openembedded.org> wrote: >>>>> From: Mingli Yu<mingli.yu@windriver.com> >>>>> >>>>> minizip [1] uses zlib [2] to support compressed archives. >>>>> >>>>> minizip is not part of zlib, but is included in the zlib >>>>> distribution [1] as a third-party contribution in the contrib >>>>> directory. >>>> The minizip which has "All files under this contrib directory are UNSUPPORTED. They were >>>> provided by users of zlib and were not tested by the authors of zlib.” in the README? >>>> Why would we need this at all, and why would it be in core? >>> If it's not appropriate to send this patch to core, I will resend to other layer. >> It’s almost definitely not appropriate for core, but why would you need a recipe for it at all? > > > It was a customer request. I should have asked why, as you are now so > we'll do that and we'll get back to you. > > > Note that minizip is used in meta-qt6: > https://code.qt.io/cgit/yocto/meta-qt6.git/commit/?id=9c2b02aab650137fd8c0febaecbc6d593ffb3d02 > > WebEngine needs minizip which is part of zlib.Till now it always built > bundled zip as minizip recipe does not exist in poky and moreover this > was never a configurable feature as it was not in PACKAGECONFIG. > > A change in > https://codereview.qt-project.org/c/qt/qtwebengine/+/384262 > enables compilation of bundled minizip against system zlib (by using > shim headers) however it is not advisable as those two version of zip > might be different and minizip is project wise a part of zlib. > > Therefore introduce cheap rip off of zlib recipe, however > building minizip from same source tree. > > > That isn't a very satisfying explanation of why the WebEngine prefers > minizip to zlib... > > > Stay tuned, > > ../Randy > > > > >> Ross >> > > -- > # Randy MacLeod > # Wind River Linux > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#212535):https://lists.openembedded.org/g/openembedded-core/message/212535 > Mute This Topic:https://lists.openembedded.org/mt/111564172/3616765 > Group Owner:openembedded-core+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [randy.macleod@windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- > -- # Randy MacLeod # Wind River Linux
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 5515d46ca5..2bd2fbe3a5 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -522,6 +522,7 @@ RECIPE_MAINTAINER:pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxf RECIPE_MAINTAINER:pn-mingetty = "Yi Zhao <yi.zhao@windriver.com>" RECIPE_MAINTAINER:pn-mini-x-session = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-minicom = "Anuj Mittal <anuj.mittal@intel.com>" +RECIPE_MAINTAINER:pn-minizip = "Mingli Yu <mingli.yu@windriver.com>" RECIPE_MAINTAINER:pn-mkfontscale = "Unassigned <unassigned@yoctoproject.org>" RECIPE_MAINTAINER:pn-mmc-utils = "Anuj Mittal <anuj.mittal@intel.com>" RECIPE_MAINTAINER:pn-mobile-broadband-provider-info = "Unassigned <unassigned@yoctoproject.org>" diff --git a/meta/recipes-core/minizip/minizip_1.3.1.bb b/meta/recipes-core/minizip/minizip_1.3.1.bb new file mode 100644 index 0000000000..c9c92ad6bd --- /dev/null +++ b/meta/recipes-core/minizip/minizip_1.3.1.bb @@ -0,0 +1,23 @@ +SUMMARY = "Minizip Compression Library" +DESCRIPTION = "Minizip is a general-purpose, patent-free, lossless data compression \ +library which is used by many different programs." +HOMEPAGE = "http://www.winimage.com/zLibDll/minizip.html" +SECTION = "libs" +LICENSE = "Zlib" +LIC_FILES_CHKSUM = "file://zip.h;beginline=14;endline=30;md5=8eaa8535a3a1a2296b303f40f75385e7" + +SRC_URI = "${SOURCEFORGE_MIRROR}/libpng/zlib/${PV}/zlib-${PV}.tar.gz" +UPSTREAM_CHECK_URI = "http://zlib.net/" + +S = "${WORKDIR}/zlib-${PV}/contrib/minizip" + +SRC_URI[sha256sum] = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23" + +PACKAGECONFIG ??= "demos" +PACKAGECONFIG[demos] = "--enable-demos=yes,,," + +DEPENDS = "zlib" + +inherit autotools + +BBCLASSEXTEND = "native nativesdk"