Skip to contentSkip to conversation

zlib: build and package minigzip

PATCH In review Sergio Prado 2 participants 3 messages Jun 12, 2020 – Jun 17, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zlib: build and package minigzip

minigzip is a minimal implementation of the gzip utility that simulates gzip using the zlib compression library.

Having a package with minigzip could be useful in some cases.

---
 meta/recipes-core/zlib/zlib_1.2.11.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
meta/recipes-core/zlib/zlib_1.2.11.bb +14 -1
index ef9431ae475c..3ecb90de2b5f 100644
@@ -19,6 +19,14 @@ CFLAGS += "-D_REENTRANT"
 
 RDEPENDS_${PN}-ptest += "make"
 
+PACKAGES =+ "${PN}-minigzip"
+
+FILES_${PN}-minigzip += "\
+                         ${sbindir}/minigzip \
+                         ${sbindir}/minigzipsh \
+                         ${sbindir}/minigzip64 \
+                         "
+
 inherit ptest
 
 do_configure() {
@@ -26,11 +34,16 @@ do_configure() {
 }
 
 do_compile() {
-	oe_runmake shared
+	oe_runmake shared minigzip minigzip64
 }
 
 do_install() {
 	oe_runmake DESTDIR=${D} install
+
+	install -d ${D}${sbindir}
+	install -m 0755 ${B}/minigzip ${D}${sbindir}
+	install -m 0755 ${B}/minigzipsh ${D}${sbindir}
+	install -m 0755 ${B}/minigzip64 ${D}${sbindir}
 }
 
 do_install_ptest() {
Signature · 1 line
2.17.1
#1 lore raw
Quoted 39 lines · Sergio Prado

minigzip is a minimal implementation of the gzip utility that simulates
gzip using the zlib compression library.

Having a package with minigzip could be useful in some cases.

---
 meta/recipes-core/zlib/zlib_1.2.11.bb | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
meta/recipes- renamed from meta/recipes-core/zlib/zlib_1.2.11.bb +0 -0

core/zlib/zlib_1.2.11.bb
index ef9431ae475c..3ecb90de2b5f 100644

meta/recipes-core/zlib/zlib_1.2.11.bb +9 -1
@@ -19,6 +19,14 @@ CFLAGS += "-D_REENTRANT"
 
 RDEPENDS_${PN}-ptest += "make"
 
+PACKAGES =+ "${PN}-minigzip"
+
+FILES_${PN}-minigzip += "\
+                         ${sbindir}/minigzip \
+                         ${sbindir}/minigzipsh \
+                         ${sbindir}/minigzip64 \
+                         "
+
 inherit ptest
 
 do_configure() {
@@ -26,11 +34,16 @@ do_configure() {
 }
 
 do_compile() {
-	oe_runmake shared
+	oe_runmake shared minigzip minigzip64
 }
 

meta/recipes-core/zlib/zlib_1.2.11.bb do_configure() { · line 49

Quoted 10 lines
meta/recipes-core/zlib/zlib_1.2.11.bb +5 -0
 do_install() {
 	oe_runmake DESTDIR=${D} install
+
+	install -d ${D}${sbindir}
+	install -m 0755 ${B}/minigzip ${D}${sbindir}
+	install -m 0755 ${B}/minigzipsh ${D}${sbindir}
+	install -m 0755 ${B}/minigzip64 ${D}${sbindir}
 }
 
 do_install_ptest() {

Breaks oe-selftest:

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1039

Reproducer:
oe-selftest -r pkgdata.OePkgdataUtilTests.test_list_pkgs

Also breaks meta-mingw:

https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/2031

Cheers,

Richard

#2 lore raw

Hi Richard,

Quoted 13 lines

meta/recipes-core/zlib/zlib_1.2.11.bb do_configure() { · line 49

Quoted 10 lines
 do_install() {
      oe_runmake DESTDIR=${D} install
meta/recipes-core/zlib/zlib_1.2.11.bb +5 -0
+
+     install -d ${D}${sbindir}
+     install -m 0755 ${B}/minigzip ${D}${sbindir}
+     install -m 0755 ${B}/minigzipsh ${D}${sbindir}
+     install -m 0755 ${B}/minigzip64 ${D}${sbindir}
 }
 
 do_install_ptest() {

Breaks oe-selftest:

Quoted 8 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1039

Reproducer:
oe-selftest -r pkgdata.OePkgdataUtilTests.test_list_pkgs

Also breaks meta-mingw:

https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/2031

Thanks for the report. The problem is that minigzip64 is not generated with toolchains without large file support.

I'll fix and send V2.

Thanks,

Sergio Prado
Embedded Labworks