On Tue, Mar 22, 2022 at 11:59:49AM -0400, Daniel Kahn Gillmor wrote:
> Package: libext2fs2
> Version: 1.46.5-2
> Control: affects -1 + fastboot android-sdk-platform-tools
> 
> The -E android_sparse option for mke2fs fails because libext2fs2 reports
> EXT2_ET_UNIMPLEMENTED, presumably because libext2fs2 isn't built with
> ENABLE_LIBSPARSE .  here's the failure:

Yep.

The explanation of why this is not easy to fix can be found at:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=928551#75

Given Debian's strong policy about using dynamic libraries everywhere,
with no exception (an opinion for which I strongly disagree, but oh
well, I don't make the rules), there's no way I can drag in libsparse
as a dependency without bloating anything that requries e2fsprogs.
Say, like the installer given that ext4 is still default file system
for Debian.

What is needed is to implement something like how libss (used by
debufs) will try to look for one of the following shared libraries:

#define DEFAULT_LIBPATH 
"libreadline.so.8:libreadline.so.7:libreadline.so.6:libreadline.so.5:libreadline.so.4:libreadline.so:libedit.so.2:libedit.so:libeditline.so.0:libeditline.so"

... and if present, it will dlopen it and use it.  But if it is not
present, it will return EXT2_ET_UNIMPLEMENTED.  The implementation of
this logic is in lib/et/get_readline.c in the e2fsprogs sources.  We
need to do something similar in lib/ext2fs/sparse_io.c.
 
However, this is not high on my priority list to work upon, because
there is a much simpler workaround --- just download the Android SDK
from Google.  :-)  That being said, patches are greatefully accepted,
so if you're interested in fixing this, please send patches, either
attached to Debian bug #928551, or to the upstream development list:
linux-e...@vger.kernel.org

Regards,

                                        - Ted

Reply via email to