From: Arnout Vandecappelle <arnout@mind.be>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Fabrice Fontaine <fabrice.fontaine@orange.com>,
Samuel Martin <s.martin49@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
Date: Wed, 27 Jul 2022 14:49:03 +0200 [thread overview]
Message-ID: <574b8f3f-6a94-2517-2d7b-b59b102afefe@mind.be> (raw)
In-Reply-To: <CAPi7W82V0nFCRi55MPsHV7DPQFSrGRmy1_mpFAhjj-MEgv6=DA@mail.gmail.com>
On 27/07/2022 14:05, Fabrice Fontaine wrote:
> Hi Arnout,
>
> Le mer. 27 juil. 2022 à 13:08, Arnout Vandecappelle <arnout@mind.be
> <mailto:arnout@mind.be>> a écrit :
>
> Hi Fabrice,
>
> On 08/01/2022 23:43, Fabrice Fontaine wrote:
> > Add a virtual package to allow the user to select the minizip provider:
>
> A virtual package should be used when the alternatives are more or less
> drop-in replacements. Here, however, they are absolutely not: they install
> completely different header files and libraries. There is no way that something
> that expects minizip-ng can build with minizip-zlib or vice versa.
>
> In addition, the two can be installed in parallel.
>
>
> That's not completely true: minizip(-ng) and minizip-legacy can be installed in
> parallel only if compatibility headers are disabled (which is done since commit
> fc166894b3f257c4cb20d84368c918f3335dadf5).
> Ideally, it would be great to enable back those compatibility headers.
> Should I make this new option dependent on !BR2_PACKAGE_MINIZIP_LEGACY instead
> of making a virtual package?
Ah, I missed that, thanks for the observation.
But then I wonder: can't domoticz be compiled with BR2_PACKAGE_MINIZIP_LEGACY?
I haven't looked into the zlib changelogs, but since minizip is under contrib/,
I don't actually expect much activity there. So it makes more sense to use
minizip-ng everywhere.
Hang on... Where is BR2_PACKAGE_MINIZIP_LEGACY? Where are those compatibility
headers? I checked the source of our current minizip(-ng) and can't find them
anywhere, and I don't see BR2_PACKAGE_MINIZIP_LEGACY in your patch either...
Oh, hang on 2: there is in fact a MZ_COMPAT cmake option which we currently
don't enable, and it looks like that one does enable the compatibility headers.
> So there's no reason at all to make it a virtual package.
>
>
> I decided to make a virtual package because there was already a virtual package
> for zlib and zlib-ng.
> I thought that we were in the same situation with minizip(-ng) and minizip-legacy.
zlib and zlib-ng are both maintained, so that's different.
I'd propose the following:
if MZ_COMPAT works with domoticz; then
1. Add BR2_PACKAGE_MINIZIP_LEGACY
2. Select BR2_PACKAGE_MINIZIP{,_LEGACY} from domoticz
else
1. Introduce minizip-legacy as a virtual package
2. Add BR2_PACKAGE_MINIZIP_LEGACY_COMPAT to minizip that implements the virtual
package
3. Add minizip-zlib package
4. select minizip-zlib from domoticz
fi
Note that for 4. you need something like we have for openssl, an additional
blind symbol that allows selecting a specific minizip-legacy implementation.
> > - the current minizip (which has been renamed minizip-ng since
> >
> https://github.com/zlib-ng/minizip-ng/commit/db95894646b87f6178ceaa389cbdb5b1ba8cd97a
> <https://github.com/zlib-ng/minizip-ng/commit/db95894646b87f6178ceaa389cbdb5b1ba8cd97a>)
>
> It would make more sense to switch the existing minizip package to this new
> upstream repository.
>
>
> Actually, we're already shipping minizip-ng as minizip.
Yes, but we are currently using a different github project.
So before (or independent) of all the rest, I'd send a patch that just changes
the SITE used by minizip.
> However, minizip-ng is
> not really widely used by the opensource community. For example, domoticz only
> supports minizip-legacy.
vlc at least seems to support it. And those are the only two in buildroot that
have any minizip support AFAICS, so not much basis to draw a conclusion.
Regards,
Arnout
> We could rename the package to minizip-ng, but we generally avoid that. It's
> just annoyance for people who upgrade buildroot (legacy handling helps, but it
> is still annoying), and there is no benefit at all other than "consistency".
>
>
> OK, I can send a v2 which doesn't rename minizip as minizip-ng.
>
>
> > - the 'legacy' minizip provided by zlib which is still widely supported
> > by various opensource packages such as domoticz
>
> We should just add a package minizip-zlib.
>
>
>
> > There is no need to add entries in Config.legacy as the previous options
> > are kept and the default provider of minizip is minizip-ng.
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com
> <mailto:fontaine.fabrice@gmail.com>>
>
> [snip]
> > diff --git a/package/minizip-zlib/minizip-zlib.mk
> <http://minizip-zlib.mk> b/package/minizip-zlib/minizip-zlib.mk
> <http://minizip-zlib.mk>
> > new file mode 100644
> > index 0000000000..67d4e31f41
> > --- /dev/null
> > +++ b/package/minizip-zlib/minizip-zlib.mk <http://minizip-zlib.mk>
> > @@ -0,0 +1,24 @@
> >
> +################################################################################
> > +#
> > +# minizip-zlib
> > +#
> >
> +################################################################################
> > +
> > +MINIZIP_ZLIB_VERSION = 1.2.11
> > +MINIZIP_ZLIB_SOURCE = zlib-$(MINIZIP_ZLIB_VERSION).tar.xz
> > +MINIZIP_ZLIB_SITE = http://www.zlib.net <http://www.zlib.net>
> > +MINIZIP_ZLIB_LICENSE = Zlib
> > +MINIZIP_ZLIB_LICENSE_FILES = README
> > +MINIZIP_ZLIB_INSTALL_STAGING = YES
> > +MINIZIP_ZLIB_PROVIDES = minizip
> > +MINIZIP_ZLIB_SUBDIR = contrib/minizip
> > +MINIZIP_ZLIB_AUTORECONF = YES
>
> Please add a comment why autoreconf is needed.
>
> Regards,
> Arnout
>
> > +MINIZIP_ZLIB_DEPENDENCIES = zlib
> > +
> > +ifeq ($(BR2_PACKAGE_MINIZIP_DEMOS),y)
> > +MINIZIP_ZLIB_CONF_OPTS += --enable-demos
> > +else
> > +MINIZIP_ZLIB_CONF_OPTS += --disable-demos
> > +endif
> > +
> > +$(eval $(autotools-package))
> [snip]
>
>
> Best Regards,
>
> Fabrice
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-27 12:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-08 22:43 [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support Fabrice Fontaine
2022-01-08 22:43 ` [Buildroot] [PATCH 2/2] package/domoticz: depends on minizip-zlib Fabrice Fontaine
2022-07-27 10:02 ` [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support Arnout Vandecappelle
2022-07-27 12:05 ` Fabrice Fontaine
2022-07-27 12:49 ` Arnout Vandecappelle [this message]
2022-07-27 13:12 ` Fabrice Fontaine
2022-07-27 13:31 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=574b8f3f-6a94-2517-2d7b-b59b102afefe@mind.be \
--to=arnout@mind.be \
--cc=buildroot@buildroot.org \
--cc=fabrice.fontaine@orange.com \
--cc=fontaine.fabrice@gmail.com \
--cc=s.martin49@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).