Skip to contentSkip to conversation

minizip: Add new recipe

PATCH In review [email protected] 4 participants 6 messages Mar 7, 2025 – Mar 10, 2025 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 minizip: Add new recipe

From: Mingli Yu <[email protected]>

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.

[1] https://github.com/madler/zlib/tree/master/contrib/minizip
[2] https://github.com/madler/zlib/tree/master

---
 meta/conf/distro/include/maintainers.inc   |  1 +
 meta/recipes-core/minizip/minizip_1.3.1.bb | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 meta/recipes-core/minizip/minizip_1.3.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
index 5515d46ca5..2bd2fbe3a5 100644
@@ -522,6 +522,7 @@ RECIPE_MAINTAINER:pn-meta-world-pkgdata = "Richard Purdie <richard.purdie@linuxf
 RECIPE_MAINTAINER:pn-mingetty = "Yi Zhao <[email protected]>"
 RECIPE_MAINTAINER:pn-mini-x-session = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-minicom = "Anuj Mittal <[email protected]>"
+RECIPE_MAINTAINER:pn-minizip = "Mingli Yu <[email protected]>"
 RECIPE_MAINTAINER:pn-mkfontscale = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-mmc-utils = "Anuj Mittal <[email protected]>"
 RECIPE_MAINTAINER:pn-mobile-broadband-provider-info = "Unassigned <[email protected]>"
meta/recipes-core/minizip/minizip_1.3.1.bb new file +23 -0
new file mode 100644
index 0000000000..c9c92ad6bd
@@ -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"
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · Mingli via lists.openembedded.org

From: Mingli Yu <[email protected]>

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

#2 lore raw

Hi Ross,

Quoted 9 lines · Ross Burton

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.

Quoted 5 lines · Mingli via lists.openembedded.org

From: Mingli Yu <[email protected]>

minizip [1] uses zlib [2] to support compressed archives.

Quoted 8 lines
Quoted 3 lines

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.

Quoted 2 lines

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,

Quoted 2 lines

Ross

#3 lore raw
Quoted 12 lines · Mingli via lists.openembedded.org

Hi Ross,

Quoted 8 lines · Ross Burton

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.

Quoted 5 lines · Mingli via lists.openembedded.org

From: Mingli Yu <[email protected]>

minizip [1] uses zlib [2] to support compressed archives.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

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

#4 lore raw
Quoted 11 lines · Ross Burton via lists.openembedded.org
Quoted 10 lines · Mingli via lists.openembedded.org

Hi Ross,

Quoted 7 lines · Ross Burton

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.

Quoted 4 lines · Mingli via lists.openembedded.org

From: Mingli Yu<[email protected]>

minizip [1] uses zlib [2] to support compressed archives.

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 11 lines

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:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

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
--------------------------------------------------------------------------------

Quoted 67 lines · Randy MacLeod via lists.openembedded.org
Quoted 11 lines · Ross Burton via lists.openembedded.org
Quoted 10 lines · Mingli via lists.openembedded.org

Hi Ross,

Quoted 7 lines · Ross Burton

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.

Quoted 4 lines · Mingli via lists.openembedded.org

From: Mingli Yu<[email protected]>

minizip [1] uses zlib [2] to support compressed archives.

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

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

Quoted 2 lines

Ross

Signature · 10 lines
# 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:[email protected]
Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
# Randy MacLeod
# Wind River Linux