opkg: vfork external gzip command to uncompress data
authorJo-Philipp Wich <jo@mein.io>
Wed, 14 Sep 2016 18:50:35 +0000 (20:50 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 27 Dec 2016 08:50:00 +0000 (09:50 +0100)
commite1d1c3189093ebe384953519083f815a420c4a4e
tree369a94779f5520fc26bb13e2f274d75c4b454c83
parentdc5f496a0df8d125ce172fc40100098b18da2300
opkg: vfork external gzip command to uncompress data

Opkg's builtin decompression code is unsuitable to process nested archives as
it uses a single shared state and relies on undefined seek behaviour for pipes.

Rework the extraction logic to use the external gzip command as I/O filter for
decompressing data and remove the builtin inflate code entirely.

This shrinks the final opkg binary by about 4KB and results in less runtime
memory consumption due to efficient use of vfork() and less copy-on-write
operations in the forked child.

Rework by Felix: create a thread that relays data to the gzip process
instead of using a fragile poll loop

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/system/opkg/Makefile
package/system/opkg/patches/070-use_external_gzip.patch [new file with mode: 0644]
package/system/opkg/patches/070-use_gzipped_pkg_list.patch [deleted file]
package/system/opkg/patches/071-use_gzipped_pkg_list.patch [new file with mode: 0644]
package/system/opkg/patches/220-drop-release-support.patch