* [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
@ 2022-01-08 22:43 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
0 siblings, 2 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2022-01-08 22:43 UTC (permalink / raw)
To: buildroot
Cc: Fabrice Fontaine, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni
Add a virtual package to allow the user to select the minizip provider:
- the current minizip (which has been renamed minizip-ng since
https://github.com/zlib-ng/minizip-ng/commit/db95894646b87f6178ceaa389cbdb5b1ba8cd97a)
- the 'legacy' minizip provided by zlib which is still widely supported
by various opensource packages such as domoticz
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>
---
DEVELOPERS | 2 +
.../minizip-ng.hash} | 2 +-
package/minizip-ng/minizip-ng.mk | 76 +++++++++++++++++++
package/minizip-zlib/minizip-zlib.hash | 4 +
package/minizip-zlib/minizip-zlib.mk | 24 ++++++
package/minizip/Config.in | 40 +++++++++-
package/minizip/minizip.mk | 69 +----------------
7 files changed, 144 insertions(+), 73 deletions(-)
rename package/{minizip/minizip.hash => minizip-ng/minizip-ng.hash} (82%)
create mode 100644 package/minizip-ng/minizip-ng.mk
create mode 100644 package/minizip-zlib/minizip-zlib.hash
create mode 100644 package/minizip-zlib/minizip-zlib.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index bbbb47f6ac..47a3d4bfe0 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -922,6 +922,8 @@ F: package/mbedtls/
F: package/mbedtls3/
F: package/minissdpd/
F: package/minizip/
+F: package/minizip-ng/
+F: package/minizip-zlib/
F: package/mongodb/
F: package/motion/
F: package/mutt/
diff --git a/package/minizip/minizip.hash b/package/minizip-ng/minizip-ng.hash
similarity index 82%
rename from package/minizip/minizip.hash
rename to package/minizip-ng/minizip-ng.hash
index 3e87e64dae..f866363c93 100644
--- a/package/minizip/minizip.hash
+++ b/package/minizip-ng/minizip-ng.hash
@@ -1,3 +1,3 @@
# Locally computed
-sha256 2ab219f651901a337a7d3c268128711b80330a99ea36bdc528c76b591a624c3c minizip-3.0.4.tar.gz
+sha256 2ab219f651901a337a7d3c268128711b80330a99ea36bdc528c76b591a624c3c minizip-ng-3.0.4.tar.gz
sha256 675181c03fc1302a1c8554c00f7be9bb420c5dbc9dcc2013433cec144413de03 LICENSE
diff --git a/package/minizip-ng/minizip-ng.mk b/package/minizip-ng/minizip-ng.mk
new file mode 100644
index 0000000000..ec3903d226
--- /dev/null
+++ b/package/minizip-ng/minizip-ng.mk
@@ -0,0 +1,76 @@
+################################################################################
+#
+# minizip-ng
+#
+################################################################################
+
+MINIZIP_NG_VERSION = 3.0.4
+MINIZIP_NG_SITE = $(call github,zlib-ng,minizip-ng,$(MINIZIP_NG_VERSION))
+MINIZIP_NG_LICENSE = Zlib
+MINIZIP_NG_LICENSE_FILES = LICENSE
+MINIZIP_NG_CPE_ID_VENDOR = minizip_project
+MINIZIP_NG_CPE_ID_PRODUCT = minizip
+MINIZIP_NG_INSTALL_STAGING = YES
+MINIZIP_NG_PROVIDES = minizip
+MINIZIP_NG_DEPENDENCIES = host-pkgconf
+MINIZIP_NG_CONF_OPTS = \
+ $(if $(BR2_PACKAGE_MINIZIP_DEMOS),-DMZ_BUILD_TEST=ON) \
+ -DMZ_COMPAT=OFF \
+ -DMZ_FETCH_LIBS=OFF
+
+ifeq ($(BR2_PACKAGE_BZIP2),y)
+MINIZIP_NG_DEPENDENCIES += bzip2
+MINIZIP_NG_CONF_OPTS += -DMZ_BZIP2=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_BZIP2=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+MINIZIP_NG_DEPENDENCIES += libiconv
+MINIZIP_NG_CONF_OPTS += -DMZ_ICONV=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_ICONV=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_LIBBSD),y)
+MINIZIP_NG_DEPENDENCIES += libbsd
+MINIZIP_NG_CONF_OPTS += -DMZ_LIBBSD=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_LIBBSD=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MINIZIP_NG_DEPENDENCIES += openssl
+MINIZIP_NG_CONF_OPTS += \
+ -DMZ_OPENSSL=ON \
+ -DMZ_PKCRYPT=ON \
+ -DMZ_WZAES=ON
+else
+MINIZIP_NG_CONF_OPTS += \
+ -DMZ_OPENSSL=OFF \
+ -DMZ_PKCRYPT=OFF \
+ -DMZ_WZAES=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XZ),y)
+MINIZIP_NG_DEPENDENCIES += xz
+MINIZIP_NG_CONF_OPTS += -DMZ_LZMA=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_LZMA=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+MINIZIP_NG_DEPENDENCIES += zlib
+MINIZIP_NG_CONF_OPTS += -DMZ_ZLIB=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_ZLIB=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_ZSTD),y)
+MINIZIP_NG_DEPENDENCIES += zstd
+MINIZIP_NG_CONF_OPTS += -DMZ_ZSTD=ON
+else
+MINIZIP_NG_CONF_OPTS += -DMZ_ZSTD=OFF
+endif
+
+$(eval $(cmake-package))
diff --git a/package/minizip-zlib/minizip-zlib.hash b/package/minizip-zlib/minizip-zlib.hash
new file mode 100644
index 0000000000..4d2c5c29d3
--- /dev/null
+++ b/package/minizip-zlib/minizip-zlib.hash
@@ -0,0 +1,4 @@
+# From http://www.zlib.net/
+sha256 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 zlib-1.2.11.tar.xz
+# License files, locally calculated
+sha256 7960b6b1cc63e619abb77acaea5427159605afee8c8b362664f4effc7d7f7d15 README
diff --git a/package/minizip-zlib/minizip-zlib.mk b/package/minizip-zlib/minizip-zlib.mk
new file mode 100644
index 0000000000..67d4e31f41
--- /dev/null
+++ b/package/minizip-zlib/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
+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
+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))
diff --git a/package/minizip/Config.in b/package/minizip/Config.in
index e4d185d9d7..b88091e809 100644
--- a/package/minizip/Config.in
+++ b/package/minizip/Config.in
@@ -1,13 +1,38 @@
config BR2_PACKAGE_MINIZIP
- bool "minizip"
+ bool "minizip support"
+ help
+ Select the desired minizip provider.
+
+if BR2_PACKAGE_MINIZIP
+
+choice
+ prompt "minizip variant"
+ default BR2_PACKAGE_MINIZIP_NG
+ help
+ Select the desired minizip provider.
+
+config BR2_PACKAGE_MINIZIP_NG
+ bool "minizip-ng"
depends on BR2_USE_WCHAR
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+ select BR2_PACKAGE_HAS_MINIZIP
help
Enables to extract files from a .zip archive file.
It is compatible with PKZip 2.04g, WinZip, InfoZip,
MimarSinan Codex Suite 2002 tools, and compatible sofware.
- https://github.com/nmoinvaz/minizip
+ https://github.com/zlib-ng/minizip-ng
+
+config BR2_PACKAGE_MINIZIP_ZLIB
+ bool "minizip-zlib"
+ select BR2_PACKAGE_ZLIB
+ select BR2_PACKAGE_HAS_MINIZIP
+ help
+ Legacy minizip provided in contrib/minizip of zlib.
+
+ https://www.winimage.com/zLibDll/minizip.html
+
+endchoice
config BR2_PACKAGE_MINIZIP_DEMOS
bool "minizip"
@@ -15,5 +40,12 @@ config BR2_PACKAGE_MINIZIP_DEMOS
help
Enable minizip binary tool.
-comment "minizip needs a toolchain w/ wchar"
- depends on !BR2_USE_WCHAR
+config BR2_PACKAGE_HAS_MINIZIP
+ bool
+
+config BR2_PACKAGE_PROVIDES_MINIZIP
+ string
+ default "minizip-zlib" if BR2_PACKAGE_MINIZIP_ZLIB
+ default "minizip-ng" if BR2_PACKAGE_MINIZIP_NG
+
+endif
diff --git a/package/minizip/minizip.mk b/package/minizip/minizip.mk
index 07f67c1354..95f1a17156 100644
--- a/package/minizip/minizip.mk
+++ b/package/minizip/minizip.mk
@@ -4,71 +4,4 @@
#
################################################################################
-MINIZIP_VERSION = 3.0.4
-MINIZIP_SITE = $(call github,nmoinvaz,minizip,$(MINIZIP_VERSION))
-MINIZIP_DEPENDENCIES = host-pkgconf
-MINIZIP_INSTALL_STAGING = YES
-MINIZIP_CONF_OPTS = \
- $(if $(BR2_PACKAGE_MINIZIP_DEMOS),-DMZ_BUILD_TEST=ON) \
- -DMZ_COMPAT=OFF \
- -DMZ_FETCH_LIBS=OFF
-MINIZIP_LICENSE = Zlib
-MINIZIP_LICENSE_FILES = LICENSE
-MINIZIP_CPE_ID_VENDOR = minizip_project
-
-ifeq ($(BR2_PACKAGE_BZIP2),y)
-MINIZIP_DEPENDENCIES += bzip2
-MINIZIP_CONF_OPTS += -DMZ_BZIP2=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_BZIP2=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBICONV),y)
-MINIZIP_DEPENDENCIES += libiconv
-MINIZIP_CONF_OPTS += -DMZ_ICONV=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_ICONV=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_LIBBSD),y)
-MINIZIP_DEPENDENCIES += libbsd
-MINIZIP_CONF_OPTS += -DMZ_LIBBSD=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_LIBBSD=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_OPENSSL),y)
-MINIZIP_DEPENDENCIES += openssl
-MINIZIP_CONF_OPTS += \
- -DMZ_OPENSSL=ON \
- -DMZ_PKCRYPT=ON \
- -DMZ_WZAES=ON
-else
-MINIZIP_CONF_OPTS += \
- -DMZ_OPENSSL=OFF \
- -DMZ_PKCRYPT=OFF \
- -DMZ_WZAES=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_XZ),y)
-MINIZIP_DEPENDENCIES += xz
-MINIZIP_CONF_OPTS += -DMZ_LZMA=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_LZMA=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_ZLIB),y)
-MINIZIP_DEPENDENCIES += zlib
-MINIZIP_CONF_OPTS += -DMZ_ZLIB=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_ZLIB=OFF
-endif
-
-ifeq ($(BR2_PACKAGE_ZSTD),y)
-MINIZIP_DEPENDENCIES += zstd
-MINIZIP_CONF_OPTS += -DMZ_ZSTD=ON
-else
-MINIZIP_CONF_OPTS += -DMZ_ZSTD=OFF
-endif
-
-$(eval $(cmake-package))
+$(eval $(virtual-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/2] package/domoticz: depends on minizip-zlib
2022-01-08 22:43 [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support Fabrice Fontaine
@ 2022-01-08 22:43 ` Fabrice Fontaine
2022-07-27 10:02 ` [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support Arnout Vandecappelle
1 sibling, 0 replies; 7+ messages in thread
From: Fabrice Fontaine @ 2022-01-08 22:43 UTC (permalink / raw)
To: buildroot
Cc: Fabrice Fontaine, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni
Depends on minizip-zlib and so drop git submodules
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/domoticz/Config.in | 4 ++++
package/domoticz/domoticz.hash | 2 +-
package/domoticz/domoticz.mk | 8 ++++----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/package/domoticz/Config.in b/package/domoticz/Config.in
index 4324d13cee..fa7fd546fa 100644
--- a/package/domoticz/Config.in
+++ b/package/domoticz/Config.in
@@ -10,6 +10,7 @@ config BR2_PACKAGE_DOMOTICZ
depends on BR2_PACKAGE_LUA_5_3
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
+ depends on BR2_PACKAGE_MINIZIP_ZLIB
select BR2_PACKAGE_BOOST
select BR2_PACKAGE_BOOST_ATOMIC
select BR2_PACKAGE_BOOST_DATE_TIME
@@ -43,3 +44,6 @@ comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 6, NPTL, wchar, d
comment "domoticz needs exception_ptr"
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+
+comment "domoticz needs minizip-zlib"
+ depends on !BR2_PACKAGE_MINIZIP_ZLIB
diff --git a/package/domoticz/domoticz.hash b/package/domoticz/domoticz.hash
index dcd5bead1e..2c6c837e64 100644
--- a/package/domoticz/domoticz.hash
+++ b/package/domoticz/domoticz.hash
@@ -1,3 +1,3 @@
# Locally computed:
-sha256 d8e99e0f96873aa105b57f73656ef7a14c89e0acf2649b2d4ef1167b14bab4b2 domoticz-2021.1-br1.tar.gz
+sha256 c4dc3455edae8bf00d2e950002f70d5b90ac577b1559ef7ada6870d970069fbb domoticz-2021.1.tar.gz
sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 License.txt
diff --git a/package/domoticz/domoticz.mk b/package/domoticz/domoticz.mk
index f142791830..0d1088d395 100644
--- a/package/domoticz/domoticz.mk
+++ b/package/domoticz/domoticz.mk
@@ -5,9 +5,7 @@
################################################################################
DOMOTICZ_VERSION = 2021.1
-DOMOTICZ_SITE = https://github.com/domoticz/domoticz
-DOMOTICZ_SITE_METHOD = git
-DOMOTICZ_GIT_SUBMODULES = YES
+DOMOTICZ_SITE = $(call github,domoticz,domoticz,$(DOMOTICZ_VERSION))
DOMOTICZ_LICENSE = GPL-3.0
DOMOTICZ_LICENSE_FILES = License.txt
DOMOTICZ_CPE_ID_VENDOR = domoticz
@@ -19,6 +17,7 @@ DOMOTICZ_DEPENDENCIES = \
jsoncpp \
libcurl \
lua \
+ minizip \
mosquitto \
openssl \
sqlite \
@@ -34,10 +33,11 @@ DOMOTICZ_CONF_OPTS += \
-DUSE_OPENSSL_STATIC=OFF
# Do not use any built-in libraries which are enabled by default for
-# jsoncpp, fmt, sqlite and mqtt
+# jsoncpp, fmt, minizip, sqlite and mqtt
DOMOTICZ_CONF_OPTS += \
-DUSE_BUILTIN_JSONCPP=OFF \
-DUSE_BUILTIN_LIBFMT=OFF \
+ -DUSE_BUILTIN_MINIZIP=OFF \
-DUSE_BUILTIN_SQLITE=OFF \
-DUSE_BUILTIN_MQTT=OFF
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
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 ` Arnout Vandecappelle
2022-07-27 12:05 ` Fabrice Fontaine
1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-07-27 10:02 UTC (permalink / raw)
To: Fabrice Fontaine, buildroot
Cc: Fabrice Fontaine, Samuel Martin, Thomas Petazzoni
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.
So there's no reason at all to make it a virtual package.
> - the current minizip (which has been renamed minizip-ng since
> 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.
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".
> - 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>
[snip]
> diff --git a/package/minizip-zlib/minizip-zlib.mk b/package/minizip-zlib/minizip-zlib.mk
> new file mode 100644
> index 0000000000..67d4e31f41
> --- /dev/null
> +++ b/package/minizip-zlib/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
> +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]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
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
0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Fontaine @ 2022-07-27 12:05 UTC (permalink / raw)
To: Arnout Vandecappelle
Cc: Fabrice Fontaine, Samuel Martin, Thomas Petazzoni, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 3740 bytes --]
Hi Arnout,
Le mer. 27 juil. 2022 à 13:08, Arnout Vandecappelle <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?
>
>
> 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.
>
> > - the current minizip (which has been renamed minizip-ng since
> >
> 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. However, minizip-ng
is not really widely used by the opensource community. For example,
domoticz only supports minizip-legacy.
>
> 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>
>
> [snip]
> > diff --git a/package/minizip-zlib/minizip-zlib.mk
> b/package/minizip-zlib/minizip-zlib.mk
> > new file mode 100644
> > index 0000000000..67d4e31f41
> > --- /dev/null
> > +++ b/package/minizip-zlib/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
> > +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
[-- Attachment #1.2: Type: text/html, Size: 5711 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
2022-07-27 12:05 ` Fabrice Fontaine
@ 2022-07-27 12:49 ` Arnout Vandecappelle
2022-07-27 13:12 ` Fabrice Fontaine
0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-07-27 12:49 UTC (permalink / raw)
To: Fabrice Fontaine
Cc: Fabrice Fontaine, Samuel Martin, Thomas Petazzoni, buildroot
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
2022-07-27 12:49 ` Arnout Vandecappelle
@ 2022-07-27 13:12 ` Fabrice Fontaine
2022-07-27 13:31 ` Arnout Vandecappelle
0 siblings, 1 reply; 7+ messages in thread
From: Fabrice Fontaine @ 2022-07-27 13:12 UTC (permalink / raw)
To: Arnout Vandecappelle
Cc: Fabrice Fontaine, Samuel Martin, Thomas Petazzoni, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 7285 bytes --]
Le mer. 27 juil. 2022 à 14:49, Arnout Vandecappelle <arnout@mind.be> a
écrit :
>
>
> 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...
>
My patch didn't add any BR2_PACKAGE_MINIZIP_LEGACY option. This was just a
proposal to avoid making a virtual package.
>
> 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.
>
MZ_COMPAT was disabled by commit fc166894b3f257c4cb20d84368c918f3335dadf5
to avoid a build failure with domoticz.
>
> > 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.
>
Actually, minizip and minizip(-ng) are both maintained. Latest commit on
minizip was made on January:
https://github.com/madler/zlib/commits/master/contrib/minizip/minizip.c
>
> 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.
>
OK, I'll go for the second option.
>
>
> > > - 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.
>
OK, I'll send a patch but basically this is the same github project:
https://github.com/nmoinvaz/minizip-ng is just a symlink to
https://github.com/zlib-ng/minizip-ng
>
>
> > 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
>
Best Regards,
Fabrice
[-- Attachment #1.2: Type: text/html, Size: 10859 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/minizip: add minizip-zlib support
2022-07-27 13:12 ` Fabrice Fontaine
@ 2022-07-27 13:31 ` Arnout Vandecappelle
0 siblings, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle @ 2022-07-27 13:31 UTC (permalink / raw)
To: Fabrice Fontaine
Cc: Fabrice Fontaine, Samuel Martin, Thomas Petazzoni, buildroot
On 27/07/2022 15:12, Fabrice Fontaine wrote:
>
>
> Le mer. 27 juil. 2022 à 14:49, Arnout Vandecappelle <arnout@mind.be
> <mailto:arnout@mind.be>> a écrit :
>
>
>
> 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>
> > <mailto:arnout@mind.be <mailto:arnout@mind.be>>> a écrit :
[snip]
> 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.
>
>
> MZ_COMPAT was disabled by commit fc166894b3f257c4cb20d84368c918f3335dadf5 to
> avoid a build failure with domoticz.
That may have been fixed in minizip-ng by now.
But anyway, my original point remains: minizip-ng doesn't actually install
anything that conflicts with minizip-zlib, so there's no reason to make it a
virtual package.
And I now also checked it with libzip. libzip installs in /usr/include,
minizip-zlib installs in /usr/include/minizip, so there's no conflict.
Just to be sure, you can perhaps also run a test against php with libzip enabled?
> > 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.
>
>
> Actually, minizip and minizip(-ng) are both maintained. Latest commit on minizip
> was made on January:
> https://github.com/madler/zlib/commits/master/contrib/minizip/minizip.c
> <https://github.com/madler/zlib/commits/master/contrib/minizip/minizip.c>
OK
> 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.
>
>
> OK, I'll go for the second option.
My conditional tree was wrong though. There is no real reason for us to
support the compatibility mode of minizip-ng. We can simply add minilib-zlib as
an independent, non-conflicting package. So:
if true; then
1. Add minizip-zlib package
2. select minizip-zlib from domoticz
fi
It was just your mention of MZ_COMPAT that got me confused, sorry.
> > > - 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>
> >
> <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.
>
>
> OK, I'll send a patch but basically this is the same github project:
> https://github.com/nmoinvaz/minizip-ng <https://github.com/nmoinvaz/minizip-ng>
> is just a symlink to
> https://github.com/zlib-ng/minizip-ng <https://github.com/zlib-ng/minizip-ng>
Yes, but we prefer to have the real project rather than a symlink...
Regards,
Arnout
[snip]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-27 13:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-07-27 13:12 ` Fabrice Fontaine
2022-07-27 13:31 ` Arnout Vandecappelle
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).