meson: make zip container support optional - #299
Open
igoropaniuk wants to merge 1 commit into
Open
Conversation
Member
|
Can we make this an explicit opt-out instead of relying on library autodetection? I fear this may be easily overlooked and lead to not-fully-featured builds landing in distros |
Contributor
Author
Makes sense, will fix, thanks! |
igoropaniuk
added a commit
to igoropaniuk/meta-qcom
that referenced
this pull request
Aug 2, 2026
Rename qdl_git.bb (PV=2.1+git, pre-meson SRCREV) to qdl_2.8.bb
pinned to tag v2.8, and refresh the recipe for current
upstream:
* Inherit `meson pkgconfig` instead of `oe_runmake install`;
upstream removed the Makefile between v2.1 and v2.8.
* DEPENDS trimmed to `libusb1 libxml2`, both from oe-core.
* Carry 0001-meson-make-zip-container-support-optional.patch
to gate libzip on a new `-Dzip-container` feature and set
`EXTRA_OEMESON = "-Dzip-container=disabled"` so no
meta-openembedded layer is needed to package qdl.
Upstream-Status: Submitted
(linux-msm/qdl#299)
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
igoropaniuk
force-pushed
the
feature/optional-zip-container
branch
from
August 2, 2026 10:06
5658fdc to
4beee92
Compare
qdl unconditionally links against libzip, although zip archives are just one of the supported input formats: both the flash-from-zip path and the create-zip subcommand are conveniences on top of the plain contents.xml / flashmap.json flows. That unconditional dependency gets in the way of integrating qdl into minimal embedded distributions. In Yocto, for example, libzip lives in meta-openembedded rather than oe-core, so packaging qdl means pulling in a whole extra layer for a feature many products never use. Introduce a zip-container feature option and gate all libzip-backed code on it: - move the libzip implementation out of file.c into file_zip.c, which is only compiled when the feature is enabled; file.c keeps the plain POSIX file handling and dispatches through small helpers that turn into inert stubs in file.h otherwise - provide no-zip fallbacks of qdl_zip_open/get/put where open reports "not a zip archive", so the contents.xml and flashmap.json flows work unchanged; these remain real symbols rather than inline stubs because the unit tests replace them with mock definitions - build zipper.c only with the feature and stub out zipper_write(), with create-zip and a failed flash of a zip archive reporting that this qdl was built without zip-container support The feature defaults to enabled rather than auto, so a missing libzip is a hard configure error instead of a silently skipped dependency: distro builds cannot accidentally lose zip support, and producing a leaner qdl requires an explicit -Dzip-container=disabled opt-out. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
igoropaniuk
force-pushed
the
feature/optional-zip-container
branch
from
August 2, 2026 10:09
4beee92 to
fbcbdc6
Compare
igoropaniuk
marked this pull request as ready for review
August 2, 2026 10:10
igoropaniuk
added a commit
to igoropaniuk/meta-qcom
that referenced
this pull request
Aug 3, 2026
Rename qdl_git.bb (PV=2.1+git, pre-meson SRCREV) to qdl_2.8.bb
pinned to tag v2.8, and refresh the recipe for current
upstream:
* Inherit `meson pkgconfig` instead of `oe_runmake install`;
upstream removed the Makefile between v2.1 and v2.8.
* DEPENDS trimmed to `libusb1 libxml2`, both from oe-core.
* Carry 0001-meson-make-zip-container-support-optional.patch
to gate libzip on a new `-Dzip-container` feature, exposed
as a `zip` PACKAGECONFIG (off by default) so no
meta-openembedded layer is needed to package qdl.
Upstream-Status: Submitted
(linux-msm/qdl#299)
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
igoropaniuk
added a commit
to igoropaniuk/meta-qcom
that referenced
this pull request
Aug 4, 2026
Rename qdl_git.bb (PV=2.1+git, pre-meson SRCREV) to qdl_2.8.bb
pinned to tag v2.8, and refresh the recipe for current
upstream:
* Inherit `meson pkgconfig` instead of `oe_runmake install`;
upstream removed the Makefile between v2.1 and v2.8.
* DEPENDS trimmed to `libusb1 libxml2`, both from oe-core.
* Carry 0001-meson-make-zip-container-support-optional.patch
to gate libzip on a new `-Dzip-container` feature, exposed
as a `zip` PACKAGECONFIG (off by default) so no
meta-openembedded layer is needed to package qdl.
Upstream-Status: Submitted
(linux-msm/qdl#299)
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
qdl unconditionally links against libzip, although zip archives are
just one of the supported input formats: both the flash-from-zip path
and the create-zip subcommand are conveniences on top of the plain
contents.xml / flashmap.json flows.
That unconditional dependency gets in the way of integrating qdl into
minimal embedded distributions. In Yocto, for example, libzip lives in
meta-openembedded rather than oe-core, so packaging qdl means pulling
in a whole extra layer for a feature many products never use.
Introduce a zip-container feature option and gate all libzip-backed
code on it:
is only compiled when the feature is enabled; file.c keeps the plain
POSIX file handling and dispatches through small helpers that turn
into inert stubs in file.h otherwise
"not a zip archive", so the contents.xml and flashmap.json flows
work unchanged; these remain real symbols rather than inline stubs
because the unit tests replace them with mock definitions
with create-zip and a failed flash of a zip archive reporting that
this qdl was built without zip-container support
The feature defaults to enabled rather than auto, so a missing libzip
is a hard configure error instead of a silently skipped dependency:
distro builds cannot accidentally lose zip support, and producing a
leaner qdl requires an explicit -Dzip-container=disabled opt-out.