All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
@ 2018-04-09 20:04 Peter Seiderer
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support Peter Seiderer
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

- delete patch 0001-musl.patch (superseeded by upstream commit [1])
- disable new zstd support for host/target

[1] https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git/commit/?id=a81678d6a698b8a016f9abac9f3d981281cc52eb

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off zstd support to extra patches (suggested by Yann E. MORIN)
---
 package/squashfs/0001-musl.patch | 71 ----------------------------------------
 package/squashfs/squashfs.hash   |  2 +-
 package/squashfs/squashfs.mk     |  7 ++--
 3 files changed, 5 insertions(+), 75 deletions(-)
 delete mode 100644 package/squashfs/0001-musl.patch

diff --git a/package/squashfs/0001-musl.patch b/package/squashfs/0001-musl.patch
deleted file mode 100644
index 891b1717a2..0000000000
--- a/package/squashfs/0001-musl.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Fix musl build
-
-Downloaded from
-http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
-and adjusted paths.
-
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
-
-Define FNM_EXTMATCH if not defined its glibc specific define
-include missing sys/stat.h for stat* function declarations
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: squashfs-tools/action.c
-===================================================================
---- a/squashfs-tools.orig/action.c
-+++ b/squashfs-tools/action.c
-@@ -44,6 +44,10 @@
- #include "action.h"
- #include "error.h"
- 
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- /*
-  * code to parse actions
-  */
-Index: squashfs-tools/mksquashfs.c
-===================================================================
---- a/squashfs-tools.orig/mksquashfs.c
-+++ b/squashfs-tools/mksquashfs.c
-@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
- 		dir_size + 3, directory_block, directory_offset, NULL, NULL,
- 		dir, 0);
- 
-+#if !defined(FNM_EXTMATCH)
-+#define FNM_EXTMATCH 0
-+#endif
-+
- #ifdef SQUASHFS_TRACE
- 	{
- 		unsigned char *dirp;
-Index: squashfs-tools/pseudo.c
-===================================================================
---- a/squashfs-tools.orig/pseudo.c
-+++ b/squashfs-tools/pseudo.c
-@@ -32,6 +32,7 @@
- #include <stdlib.h>
- #include <sys/types.h>
- #include <sys/wait.h>
-+#include <sys/stat.h>
- #include <ctype.h>
- 
- #include "pseudo.h"
-Index: squashfs-tools/unsquashfs.c
-===================================================================
---- a/squashfs-tools.orig/unsquashfs.c
-+++ b/squashfs-tools/unsquashfs.c
-@@ -38,6 +38,10 @@
- #include <limits.h>
- #include <ctype.h>
- 
-+#ifndef FNM_EXTMATCH
-+#define FNM_EXTMATCH 0
-+#endif
-+
- struct cache *fragment_cache, *data_cache;
- struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
- pthread_t *thread, *inflator_thread;
diff --git a/package/squashfs/squashfs.hash b/package/squashfs/squashfs.hash
index 74fdb44354..82a650022c 100644
--- a/package/squashfs/squashfs.hash
+++ b/package/squashfs/squashfs.hash
@@ -1,2 +1,2 @@
 # Locally computed
-sha256	2c49392816615b73bf5d6cdce9776cb66a01f5a1494b1d9af580667e32bab001  squashfs-3de1687d7432ea9b302c2db9521996f506c140a3.tar.gz
+sha256 bd0aa3011320b8ebee68aa406060de277bef16daf81bad5b9f70cbea6db1a779 squashfs-e38956b92f738518c29734399629e7cdb33072d3.tar.gz
diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
index 9599d892b2..e656218f97 100644
--- a/package/squashfs/squashfs.mk
+++ b/package/squashfs/squashfs.mk
@@ -4,12 +4,12 @@
 #
 ################################################################################
 
-SQUASHFS_VERSION = 3de1687d7432ea9b302c2db9521996f506c140a3
+SQUASHFS_VERSION = e38956b92f738518c29734399629e7cdb33072d3
 SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
 SQUASHFS_SITE_METHOD = git
 SQUASHFS_LICENSE = GPL-2.0+
 SQUASHFS_LICENSE_FILES = COPYING
-SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
+SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
 
 ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
 SQUASHFS_DEPENDENCIES += lz4
@@ -54,7 +54,8 @@ HOST_SQUASHFS_MAKE_ARGS = \
 	GZIP_SUPPORT=1 \
 	LZ4_SUPPORT=1 \
 	LZO_SUPPORT=1 \
-	LZMA_XZ_SUPPORT=1
+	LZMA_XZ_SUPPORT=1 \
+	ZSTD_SUPPORT=0
 
 define SQUASHFS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) \
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
@ 2018-04-09 20:04 ` Peter Seiderer
  2018-04-11 21:19   ` Yann E. MORIN
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support Peter Seiderer
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off host libzstd support (suggested by Yann E. MORIN)
  - no ZSTD_OPTS for host libarary build
---
 package/zstd/zstd.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
index c0fa88026c..1b76b0164c 100644
--- a/package/zstd/zstd.mk
+++ b/package/zstd/zstd.mk
@@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
 		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
 endef
 
+# note: no 'HAVE_...' options for host library build only 
+define HOST_ZSTD_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+		-C $(@D) lib
+endef
+
+define HOST_ZSTD_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
+		DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
+endef
+
 $(eval $(generic-package))
+$(eval $(host-generic-package))
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support Peter Seiderer
@ 2018-04-09 20:04 ` Peter Seiderer
  2018-04-11 21:20   ` Yann E. MORIN
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 4/6] fs/squashfs: add " Peter Seiderer
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off host zstd support (suggested by Yann E. MORIN)
---
 package/squashfs/squashfs.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
index e656218f97..67025ac68a 100644
--- a/package/squashfs/squashfs.mk
+++ b/package/squashfs/squashfs.mk
@@ -46,7 +46,7 @@ else
 SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
 endif
 
-HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz
+HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
 
 HOST_SQUASHFS_MAKE_ARGS = \
 	XATTR_SUPPORT=1 \
@@ -55,7 +55,7 @@ HOST_SQUASHFS_MAKE_ARGS = \
 	LZ4_SUPPORT=1 \
 	LZO_SUPPORT=1 \
 	LZMA_XZ_SUPPORT=1 \
-	ZSTD_SUPPORT=0
+	ZSTD_SUPPORT=1
 
 define SQUASHFS_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) \
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 4/6] fs/squashfs: add zstd support
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support Peter Seiderer
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support Peter Seiderer
@ 2018-04-09 20:04 ` Peter Seiderer
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 5/6] zstd: add libzstd support Peter Seiderer
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
  - add reviewed-by: Yann E. MORIN
---
 fs/squashfs/Config.in   | 3 +++
 fs/squashfs/squashfs.mk | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in
index ca9ddb2218..dde2097cb7 100644
--- a/fs/squashfs/Config.in
+++ b/fs/squashfs/Config.in
@@ -27,5 +27,8 @@ config BR2_TARGET_ROOTFS_SQUASHFS4_LZO
 config BR2_TARGET_ROOTFS_SQUASHFS4_XZ
 	bool "xz"
 
+config BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD
+	bool "zstd"
+
 endchoice
 endif
diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk
index 51abd5d7d0..34ab048603 100644
--- a/fs/squashfs/squashfs.mk
+++ b/fs/squashfs/squashfs.mk
@@ -16,6 +16,8 @@ else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y)
 ROOTFS_SQUASHFS_ARGS += -comp lzma
 else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y)
 ROOTFS_SQUASHFS_ARGS += -comp xz
+else ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_ZSTD),y)
+ROOTFS_SQUASHFS_ARGS += -comp zstd
 else
 ROOTFS_SQUASHFS_ARGS += -comp gzip
 endif
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 5/6] zstd: add libzstd support
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
                   ` (2 preceding siblings ...)
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 4/6] fs/squashfs: add " Peter Seiderer
@ 2018-04-09 20:04 ` Peter Seiderer
  2018-04-11 21:24   ` Yann E. MORIN
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 6/6] squashfs: add zstd support Peter Seiderer
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off target libzstd support (suggested by Yann E. MORIN)
---
 package/zstd/zstd.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
index 1b76b0164c..cccec3a313 100644
--- a/package/zstd/zstd.mk
+++ b/package/zstd/zstd.mk
@@ -6,6 +6,7 @@
 
 ZSTD_VERSION = v1.3.3
 ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
+ZSTD_INSTALL_STAGING = YES
 ZSTD_LICENSE = BSD-3-Clause or GPL-2.0
 ZSTD_LICENSE_FILES = LICENSE COPYING
 
@@ -38,10 +39,17 @@ endif
 
 define ZSTD_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
-		-C $(@D) zstd
+		-C $(@D) lib zstd
+endef
+
+define ZSTD_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
+		DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib install
 endef
 
 define ZSTD_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
+		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib install
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
 		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
 endef
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 6/6] squashfs: add zstd support
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
                   ` (3 preceding siblings ...)
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 5/6] zstd: add libzstd support Peter Seiderer
@ 2018-04-09 20:04 ` Peter Seiderer
  2018-04-11 21:27   ` Yann E. MORIN
  2018-04-11 21:12 ` [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Yann E. MORIN
  2018-04-12 21:43 ` Thomas Petazzoni
  6 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-09 20:04 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - split off target zstd support (suggested by Yann E. MORIN)
---
 package/squashfs/Config.in   | 6 ++++++
 package/squashfs/squashfs.mk | 9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/package/squashfs/Config.in b/package/squashfs/Config.in
index 70c0fc9808..c16ebbf27f 100644
--- a/package/squashfs/Config.in
+++ b/package/squashfs/Config.in
@@ -41,6 +41,12 @@ config BR2_PACKAGE_SQUASHFS_XZ
 	help
 	  Support XZ compression algorithm
 
+config BR2_PACKAGE_SQUASHFS_ZSTD
+	bool "zstd support"
+	select BR2_PACKAGE_ZSTD
+	help
+	  Support ZSTD compression algorithm
+
 endif
 
 comment "squashfs needs a toolchain w/ threads"
diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
index 67025ac68a..bec867d676 100644
--- a/package/squashfs/squashfs.mk
+++ b/package/squashfs/squashfs.mk
@@ -9,7 +9,7 @@ SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
 SQUASHFS_SITE_METHOD = git
 SQUASHFS_LICENSE = GPL-2.0+
 SQUASHFS_LICENSE_FILES = COPYING
-SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
+SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
 
 ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
 SQUASHFS_DEPENDENCIES += lz4
@@ -46,6 +46,13 @@ else
 SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
 endif
 
+ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
+SQUASHFS_DEPENDENCIES += zstd
+SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
+else
+SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
+endif
+
 HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
 
 HOST_SQUASHFS_MAKE_ARGS = \
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
                   ` (4 preceding siblings ...)
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 6/6] squashfs: add zstd support Peter Seiderer
@ 2018-04-11 21:12 ` Yann E. MORIN
  2018-04-12 18:51   ` Peter Seiderer
  2018-04-12 21:43 ` Thomas Petazzoni
  6 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-11 21:12 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> - delete patch 0001-musl.patch (superseeded by upstream commit [1])
> - disable new zstd support for host/target
> 
> [1] https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git/commit/?id=a81678d6a698b8a016f9abac9f3d981281cc52eb
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, I don't think it is interesting to have the new version
(especially as it is a sha1) in the commit title. Having the title
read just "squashfs: bump version" is IMHO enough. My rev-by still
stands, though.

Thanks!

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - split off zstd support to extra patches (suggested by Yann E. MORIN)
> ---
>  package/squashfs/0001-musl.patch | 71 ----------------------------------------
>  package/squashfs/squashfs.hash   |  2 +-
>  package/squashfs/squashfs.mk     |  7 ++--
>  3 files changed, 5 insertions(+), 75 deletions(-)
>  delete mode 100644 package/squashfs/0001-musl.patch
> 
> diff --git a/package/squashfs/0001-musl.patch b/package/squashfs/0001-musl.patch
> deleted file mode 100644
> index 891b1717a2..0000000000
> --- a/package/squashfs/0001-musl.patch
> +++ /dev/null
> @@ -1,71 +0,0 @@
> -Fix musl build
> -
> -Downloaded from
> -http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
> -and adjusted paths.
> -
> -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> -
> -Define FNM_EXTMATCH if not defined its glibc specific define
> -include missing sys/stat.h for stat* function declarations
> -
> -Upstream-Status: Pending
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -
> -Index: squashfs-tools/action.c
> -===================================================================
> ---- a/squashfs-tools.orig/action.c
> -+++ b/squashfs-tools/action.c
> -@@ -44,6 +44,10 @@
> - #include "action.h"
> - #include "error.h"
> - 
> -+#if !defined(FNM_EXTMATCH)
> -+#define FNM_EXTMATCH 0
> -+#endif
> -+
> - /*
> -  * code to parse actions
> -  */
> -Index: squashfs-tools/mksquashfs.c
> -===================================================================
> ---- a/squashfs-tools.orig/mksquashfs.c
> -+++ b/squashfs-tools/mksquashfs.c
> -@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
> - 		dir_size + 3, directory_block, directory_offset, NULL, NULL,
> - 		dir, 0);
> - 
> -+#if !defined(FNM_EXTMATCH)
> -+#define FNM_EXTMATCH 0
> -+#endif
> -+
> - #ifdef SQUASHFS_TRACE
> - 	{
> - 		unsigned char *dirp;
> -Index: squashfs-tools/pseudo.c
> -===================================================================
> ---- a/squashfs-tools.orig/pseudo.c
> -+++ b/squashfs-tools/pseudo.c
> -@@ -32,6 +32,7 @@
> - #include <stdlib.h>
> - #include <sys/types.h>
> - #include <sys/wait.h>
> -+#include <sys/stat.h>
> - #include <ctype.h>
> - 
> - #include "pseudo.h"
> -Index: squashfs-tools/unsquashfs.c
> -===================================================================
> ---- a/squashfs-tools.orig/unsquashfs.c
> -+++ b/squashfs-tools/unsquashfs.c
> -@@ -38,6 +38,10 @@
> - #include <limits.h>
> - #include <ctype.h>
> - 
> -+#ifndef FNM_EXTMATCH
> -+#define FNM_EXTMATCH 0
> -+#endif
> -+
> - struct cache *fragment_cache, *data_cache;
> - struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
> - pthread_t *thread, *inflator_thread;
> diff --git a/package/squashfs/squashfs.hash b/package/squashfs/squashfs.hash
> index 74fdb44354..82a650022c 100644
> --- a/package/squashfs/squashfs.hash
> +++ b/package/squashfs/squashfs.hash
> @@ -1,2 +1,2 @@
>  # Locally computed
> -sha256	2c49392816615b73bf5d6cdce9776cb66a01f5a1494b1d9af580667e32bab001  squashfs-3de1687d7432ea9b302c2db9521996f506c140a3.tar.gz
> +sha256 bd0aa3011320b8ebee68aa406060de277bef16daf81bad5b9f70cbea6db1a779 squashfs-e38956b92f738518c29734399629e7cdb33072d3.tar.gz
> diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> index 9599d892b2..e656218f97 100644
> --- a/package/squashfs/squashfs.mk
> +++ b/package/squashfs/squashfs.mk
> @@ -4,12 +4,12 @@
>  #
>  ################################################################################
>  
> -SQUASHFS_VERSION = 3de1687d7432ea9b302c2db9521996f506c140a3
> +SQUASHFS_VERSION = e38956b92f738518c29734399629e7cdb33072d3
>  SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
>  SQUASHFS_SITE_METHOD = git
>  SQUASHFS_LICENSE = GPL-2.0+
>  SQUASHFS_LICENSE_FILES = COPYING
> -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
> +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
>  
>  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
>  SQUASHFS_DEPENDENCIES += lz4
> @@ -54,7 +54,8 @@ HOST_SQUASHFS_MAKE_ARGS = \
>  	GZIP_SUPPORT=1 \
>  	LZ4_SUPPORT=1 \
>  	LZO_SUPPORT=1 \
> -	LZMA_XZ_SUPPORT=1
> +	LZMA_XZ_SUPPORT=1 \
> +	ZSTD_SUPPORT=0
>  
>  define SQUASHFS_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) \
> -- 
> 2.16.3
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support Peter Seiderer
@ 2018-04-11 21:19   ` Yann E. MORIN
  2018-04-12  3:33     ` Baruch Siach
  2018-04-12 18:30     ` Peter Seiderer
  0 siblings, 2 replies; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-11 21:19 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - split off host libzstd support (suggested by Yann E. MORIN)
>   - no ZSTD_OPTS for host libarary build
> ---
>  package/zstd/zstd.mk | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> index c0fa88026c..1b76b0164c 100644
> --- a/package/zstd/zstd.mk
> +++ b/package/zstd/zstd.mk
> @@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
>  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
>  endef
>  
> +# note: no 'HAVE_...' options for host library build only 
> +define HOST_ZSTD_BUILD_CMDS
> +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> +		-C $(@D) lib
> +endef
> +
> +define HOST_ZSTD_INSTALL_CMDS
> +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> +		DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
> +endef
> +
>  $(eval $(generic-package))
> +$(eval $(host-generic-package))

The target variant has optional dependencies on zlib, xz, and lz4, which
all have host variants.

So, if you don;t specify the dependency in the host-zstd, you get a
host-zstd that may or may not have support for zlib, xz, or lz4,
depending on hether another package a dependency on them.

We don't have spport for optional host dependencies (because there are
not config options for those host packages), so I don't see a solution
but to always depend on all three. So:

    HOST_ZSTD_DEPENDENCIES = host-lz4 host-xz host-zlib

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support Peter Seiderer
@ 2018-04-11 21:20   ` Yann E. MORIN
  0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-11 21:20 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>   - split off host zstd support (suggested by Yann E. MORIN)
> ---
>  package/squashfs/squashfs.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> index e656218f97..67025ac68a 100644
> --- a/package/squashfs/squashfs.mk
> +++ b/package/squashfs/squashfs.mk
> @@ -46,7 +46,7 @@ else
>  SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
>  endif
>  
> -HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz
> +HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
>  
>  HOST_SQUASHFS_MAKE_ARGS = \
>  	XATTR_SUPPORT=1 \
> @@ -55,7 +55,7 @@ HOST_SQUASHFS_MAKE_ARGS = \
>  	LZ4_SUPPORT=1 \
>  	LZO_SUPPORT=1 \
>  	LZMA_XZ_SUPPORT=1 \
> -	ZSTD_SUPPORT=0
> +	ZSTD_SUPPORT=1
>  
>  define SQUASHFS_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(MAKE) \
> -- 
> 2.16.3
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 5/6] zstd: add libzstd support
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 5/6] zstd: add libzstd support Peter Seiderer
@ 2018-04-11 21:24   ` Yann E. MORIN
  2018-04-12 18:45     ` Peter Seiderer
  0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-11 21:24 UTC (permalink / raw)
  To: buildroot

Peter, All,

I think the commit title should rather be something like:

    zstd: build and install the library

Have you tried building it in:
  - a shared-only library configuration (the default for Buildroot),
  - a static-only configuration,
  - a dual shared+static configuration?

And of course, checked that the corresponding libs are installed?

Regards,
Yann E. MORIN.

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - split off target libzstd support (suggested by Yann E. MORIN)
> ---
>  package/zstd/zstd.mk | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> index 1b76b0164c..cccec3a313 100644
> --- a/package/zstd/zstd.mk
> +++ b/package/zstd/zstd.mk
> @@ -6,6 +6,7 @@
>  
>  ZSTD_VERSION = v1.3.3
>  ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
> +ZSTD_INSTALL_STAGING = YES
>  ZSTD_LICENSE = BSD-3-Clause or GPL-2.0
>  ZSTD_LICENSE_FILES = LICENSE COPYING
>  
> @@ -38,10 +39,17 @@ endif
>  
>  define ZSTD_BUILD_CMDS
>  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> -		-C $(@D) zstd
> +		-C $(@D) lib zstd
> +endef
> +
> +define ZSTD_INSTALL_STAGING_CMDS
> +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> +		DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib install
>  endef
>  
>  define ZSTD_INSTALL_TARGET_CMDS
> +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> +		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib install
>  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
>  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
>  endef
> -- 
> 2.16.3
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 6/6] squashfs: add zstd support
  2018-04-09 20:04 ` [Buildroot] [PATCH v2 6/6] squashfs: add zstd support Peter Seiderer
@ 2018-04-11 21:27   ` Yann E. MORIN
  2018-04-12 18:31     ` Peter Seiderer
  0 siblings, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-11 21:27 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[--SNIP--]
> diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> index 67025ac68a..bec867d676 100644
> --- a/package/squashfs/squashfs.mk
> +++ b/package/squashfs/squashfs.mk
> @@ -9,7 +9,7 @@ SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
>  SQUASHFS_SITE_METHOD = git
>  SQUASHFS_LICENSE = GPL-2.0+
>  SQUASHFS_LICENSE_FILES = COPYING
> -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
> +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
>  
>  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
>  SQUASHFS_DEPENDENCIES += lz4
> @@ -46,6 +46,13 @@ else
>  SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
>  endif
>  
> +ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
> +SQUASHFS_DEPENDENCIES += zstd
> +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
> +else
> +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
> +endif

Please, keep the gzip case last, so that it stays the default. Add the
zstd case first.

Regards,
Yann E. MORIN.

>  HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
>  
>  HOST_SQUASHFS_MAKE_ARGS = \
> -- 
> 2.16.3
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support
  2018-04-11 21:19   ` Yann E. MORIN
@ 2018-04-12  3:33     ` Baruch Siach
  2018-04-12 18:30     ` Peter Seiderer
  1 sibling, 0 replies; 19+ messages in thread
From: Baruch Siach @ 2018-04-12  3:33 UTC (permalink / raw)
  To: buildroot

Hi Yann,

On Wed, Apr 11, 2018 at 11:19:07PM +0200, Yann E. MORIN wrote:
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - split off host libzstd support (suggested by Yann E. MORIN)
> >   - no ZSTD_OPTS for host libarary build
> > ---
> >  package/zstd/zstd.mk | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> > index c0fa88026c..1b76b0164c 100644
> > --- a/package/zstd/zstd.mk
> > +++ b/package/zstd/zstd.mk
> > @@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
> >  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
> >  endef
> >  
> > +# note: no 'HAVE_...' options for host library build only 
> > +define HOST_ZSTD_BUILD_CMDS
> > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > +		-C $(@D) lib
> > +endef
> > +
> > +define HOST_ZSTD_INSTALL_CMDS
> > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > +		DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
> > +endef
> > +
> >  $(eval $(generic-package))
> > +$(eval $(host-generic-package))
> 
> The target variant has optional dependencies on zlib, xz, and lz4, which
> all have host variants.
> 
> So, if you don;t specify the dependency in the host-zstd, you get a
> host-zstd that may or may not have support for zlib, xz, or lz4,
> depending on hether another package a dependency on them.
> 
> We don't have spport for optional host dependencies (because there are
> not config options for those host packages), so I don't see a solution
> but to always depend on all three. So:
> 
>     HOST_ZSTD_DEPENDENCIES = host-lz4 host-xz host-zlib

Why? The build should still consistent for a given config. If you add/remove 
other packages you might get host-zstd build with different dependencies. This 
is normal. Target packages behave the same way.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support
  2018-04-11 21:19   ` Yann E. MORIN
  2018-04-12  3:33     ` Baruch Siach
@ 2018-04-12 18:30     ` Peter Seiderer
  2018-04-12 18:47       ` Yann E. MORIN
  1 sibling, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-12 18:30 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Wed, 11 Apr 2018 23:19:07 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - split off host libzstd support (suggested by Yann E. MORIN)
> >   - no ZSTD_OPTS for host libarary build
> > ---
> >  package/zstd/zstd.mk | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> > index c0fa88026c..1b76b0164c 100644
> > --- a/package/zstd/zstd.mk
> > +++ b/package/zstd/zstd.mk
> > @@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
> >  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
> >  endef
> >  
> > +# note: no 'HAVE_...' options for host library build only 
> > +define HOST_ZSTD_BUILD_CMDS
> > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > +		-C $(@D) lib
> > +endef
> > +
> > +define HOST_ZSTD_INSTALL_CMDS
> > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > +		DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
> > +endef
> > +
> >  $(eval $(generic-package))
> > +$(eval $(host-generic-package))  
> 
> The target variant has optional dependencies on zlib, xz, and lz4, which
> all have host variants.

The zlibx/xz/lz4 support options apply only to the cmdline tools, not
to the libzst libary (the only build target for the host variant),
see the (short) comment about the 'HAVE_...' options...
> 
> So, if you don;t specify the dependency in the host-zstd, you get a
> host-zstd that may or may not have support for zlib, xz, or lz4,
> depending on hether another package a dependency on them.
> 
> We don't have spport for optional host dependencies (because there are
> not config options for those host packages), so I don't see a solution
> but to always depend on all three. So:
> 
>     HOST_ZSTD_DEPENDENCIES = host-lz4 host-xz host-zlib

So no need for the host library build to depend on (unused) lz4/xz/zlib
host-builds....

Regards,
Peter

> 
> Regards,
> Yann E. MORIN.
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 6/6] squashfs: add zstd support
  2018-04-11 21:27   ` Yann E. MORIN
@ 2018-04-12 18:31     ` Peter Seiderer
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-04-12 18:31 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Wed, 11 Apr 2018 23:27:54 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>  
> [--SNIP--]
> > diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> > index 67025ac68a..bec867d676 100644
> > --- a/package/squashfs/squashfs.mk
> > +++ b/package/squashfs/squashfs.mk
> > @@ -9,7 +9,7 @@ SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
> >  SQUASHFS_SITE_METHOD = git
> >  SQUASHFS_LICENSE = GPL-2.0+
> >  SQUASHFS_LICENSE_FILES = COPYING
> > -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
> > +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
> >  
> >  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
> >  SQUASHFS_DEPENDENCIES += lz4
> > @@ -46,6 +46,13 @@ else
> >  SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0
> >  endif
> >  
> > +ifeq ($(BR2_PACKAGE_SQUASHFS_ZSTD),y)
> > +SQUASHFS_DEPENDENCIES += zstd
> > +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=1 COMP_DEFAULT=zstd
> > +else
> > +SQUASHFS_MAKE_ARGS += ZSTD_SUPPORT=0
> > +endif  
> 
> Please, keep the gzip case last, so that it stays the default. Add the
> zstd case first.

O.k, will fix it on the next patch iteration....

Regards,
Peter

> 
> Regards,
> Yann E. MORIN.
> 
> >  HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz host-zstd
> >  
> >  HOST_SQUASHFS_MAKE_ARGS = \
> > -- 
> > 2.16.3
> >   
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 5/6] zstd: add libzstd support
  2018-04-11 21:24   ` Yann E. MORIN
@ 2018-04-12 18:45     ` Peter Seiderer
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-04-12 18:45 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Wed, 11 Apr 2018 23:24:20 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> I think the commit title should rather be something like:
> 
>     zstd: build and install the library

Mhh, a matter of taste ;-)

> 
> Have you tried building it in:
>   - a shared-only library configuration (the default for Buildroot),
>   - a static-only configuration,
>   - a dual shared+static configuration?

Not yet....

> 
> And of course, checked that the corresponding libs are installed?

Good point, looking at the zstd-v1.3.3/lib/Makefile there are
separate build targets for the shared/static libs but the
install target builds/installs both...

Will fix it on the next patch iteration...

Regards,
Peter

> 
> Regards,
> Yann E. MORIN.
> 
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - split off target libzstd support (suggested by Yann E. MORIN)
> > ---
> >  package/zstd/zstd.mk | 10 +++++++++-
> >  1 file changed, 9 insertions(+), 1 deletion(-)
> > 
> > diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> > index 1b76b0164c..cccec3a313 100644
> > --- a/package/zstd/zstd.mk
> > +++ b/package/zstd/zstd.mk
> > @@ -6,6 +6,7 @@
> >  
> >  ZSTD_VERSION = v1.3.3
> >  ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
> > +ZSTD_INSTALL_STAGING = YES
> >  ZSTD_LICENSE = BSD-3-Clause or GPL-2.0
> >  ZSTD_LICENSE_FILES = LICENSE COPYING
> >  
> > @@ -38,10 +39,17 @@ endif
> >  
> >  define ZSTD_BUILD_CMDS
> >  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> > -		-C $(@D) zstd
> > +		-C $(@D) lib zstd
> > +endef
> > +
> > +define ZSTD_INSTALL_STAGING_CMDS
> > +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> > +		DESTDIR=$(STAGING_DIR) PREFIX=/usr -C $(@D)/lib install
> >  endef
> >  
> >  define ZSTD_INSTALL_TARGET_CMDS
> > +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> > +		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib install
> >  	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
> >  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
> >  endef
> > -- 
> > 2.16.3
> >   
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support
  2018-04-12 18:30     ` Peter Seiderer
@ 2018-04-12 18:47       ` Yann E. MORIN
  0 siblings, 0 replies; 19+ messages in thread
From: Yann E. MORIN @ 2018-04-12 18:47 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-04-12 20:30 +0200, Peter Seiderer spake thusly:
> On Wed, 11 Apr 2018 23:19:07 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > > ---
> > > Changes v1 -> v2:
> > >   - split off host libzstd support (suggested by Yann E. MORIN)
> > >   - no ZSTD_OPTS for host libarary build
> > > ---
> > >  package/zstd/zstd.mk | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > > 
> > > diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> > > index c0fa88026c..1b76b0164c 100644
> > > --- a/package/zstd/zstd.mk
> > > +++ b/package/zstd/zstd.mk
> > > @@ -46,4 +46,16 @@ define ZSTD_INSTALL_TARGET_CMDS
> > >  		DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
> > >  endef
> > >  
> > > +# note: no 'HAVE_...' options for host library build only 
> > > +define HOST_ZSTD_BUILD_CMDS
> > > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > > +		-C $(@D) lib
> > > +endef
> > > +
> > > +define HOST_ZSTD_INSTALL_CMDS
> > > +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \
> > > +		DESTDIR=$(HOST_DIR) PREFIX=/usr -C $(@D)/lib install
> > > +endef
> > > +
> > >  $(eval $(generic-package))
> > > +$(eval $(host-generic-package))  
> > 
> > The target variant has optional dependencies on zlib, xz, and lz4, which
> > all have host variants.
> 
> The zlibx/xz/lz4 support options apply only to the cmdline tools, not
> to the libzst libary (the only build target for the host variant),
> see the (short) comment about the 'HAVE_...' options...

OK, that was not clear to me. Say so in the commit log, then.

Regards,
Yann E. MORIN.

> > So, if you don;t specify the dependency in the host-zstd, you get a
> > host-zstd that may or may not have support for zlib, xz, or lz4,
> > depending on hether another package a dependency on them.
> > 
> > We don't have spport for optional host dependencies (because there are
> > not config options for those host packages), so I don't see a solution
> > but to always depend on all three. So:
> > 
> >     HOST_ZSTD_DEPENDENCIES = host-lz4 host-xz host-zlib
> 
> So no need for the host library build to depend on (unused) lz4/xz/zlib
> host-builds....
> 
> Regards,
> Peter
> 
> > 
> > Regards,
> > Yann E. MORIN.
> > 
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
  2018-04-11 21:12 ` [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Yann E. MORIN
@ 2018-04-12 18:51   ` Peter Seiderer
  2018-04-12 19:01     ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-04-12 18:51 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Wed, 11 Apr 2018 23:12:54 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-04-09 22:04 +0200, Peter Seiderer spake thusly:
> > - delete patch 0001-musl.patch (superseeded by upstream commit [1])
> > - disable new zstd support for host/target
> > 
> > [1] https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git/commit/?id=a81678d6a698b8a016f9abac9f3d981281cc52eb
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>  
> 
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> However, I don't think it is interesting to have the new version
> (especially as it is a sha1) in the commit title. Having the title
> read just "squashfs: bump version" is IMHO enough. My rev-by still
> stands, though.

Matter of taste....and looking at a packet history of e.g.:

	squashfs: bump version
	squashfs: bump version
	squashfs: bump version
	[...]

is a little boring and makes every patch search or patch reference
more difficult....

Regards,
Peter

> 
> Thanks!
> 
> Regards,
> Yann E. MORIN.
> 
> > ---
> > Changes v1 -> v2:
> >   - split off zstd support to extra patches (suggested by Yann E. MORIN)
> > ---
> >  package/squashfs/0001-musl.patch | 71 ----------------------------------------
> >  package/squashfs/squashfs.hash   |  2 +-
> >  package/squashfs/squashfs.mk     |  7 ++--
> >  3 files changed, 5 insertions(+), 75 deletions(-)
> >  delete mode 100644 package/squashfs/0001-musl.patch
> > 
> > diff --git a/package/squashfs/0001-musl.patch b/package/squashfs/0001-musl.patch
> > deleted file mode 100644
> > index 891b1717a2..0000000000
> > --- a/package/squashfs/0001-musl.patch
> > +++ /dev/null
> > @@ -1,71 +0,0 @@
> > -Fix musl build
> > -
> > -Downloaded from
> > -http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
> > -and adjusted paths.
> > -
> > -Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> > -
> > -Define FNM_EXTMATCH if not defined its glibc specific define
> > -include missing sys/stat.h for stat* function declarations
> > -
> > -Upstream-Status: Pending
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -
> > -Index: squashfs-tools/action.c
> > -===================================================================
> > ---- a/squashfs-tools.orig/action.c
> > -+++ b/squashfs-tools/action.c
> > -@@ -44,6 +44,10 @@
> > - #include "action.h"
> > - #include "error.h"
> > - 
> > -+#if !defined(FNM_EXTMATCH)
> > -+#define FNM_EXTMATCH 0
> > -+#endif
> > -+
> > - /*
> > -  * code to parse actions
> > -  */
> > -Index: squashfs-tools/mksquashfs.c
> > -===================================================================
> > ---- a/squashfs-tools.orig/mksquashfs.c
> > -+++ b/squashfs-tools/mksquashfs.c
> > -@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
> > - 		dir_size + 3, directory_block, directory_offset, NULL, NULL,
> > - 		dir, 0);
> > - 
> > -+#if !defined(FNM_EXTMATCH)
> > -+#define FNM_EXTMATCH 0
> > -+#endif
> > -+
> > - #ifdef SQUASHFS_TRACE
> > - 	{
> > - 		unsigned char *dirp;
> > -Index: squashfs-tools/pseudo.c
> > -===================================================================
> > ---- a/squashfs-tools.orig/pseudo.c
> > -+++ b/squashfs-tools/pseudo.c
> > -@@ -32,6 +32,7 @@
> > - #include <stdlib.h>
> > - #include <sys/types.h>
> > - #include <sys/wait.h>
> > -+#include <sys/stat.h>
> > - #include <ctype.h>
> > - 
> > - #include "pseudo.h"
> > -Index: squashfs-tools/unsquashfs.c
> > -===================================================================
> > ---- a/squashfs-tools.orig/unsquashfs.c
> > -+++ b/squashfs-tools/unsquashfs.c
> > -@@ -38,6 +38,10 @@
> > - #include <limits.h>
> > - #include <ctype.h>
> > - 
> > -+#ifndef FNM_EXTMATCH
> > -+#define FNM_EXTMATCH 0
> > -+#endif
> > -+
> > - struct cache *fragment_cache, *data_cache;
> > - struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
> > - pthread_t *thread, *inflator_thread;
> > diff --git a/package/squashfs/squashfs.hash b/package/squashfs/squashfs.hash
> > index 74fdb44354..82a650022c 100644
> > --- a/package/squashfs/squashfs.hash
> > +++ b/package/squashfs/squashfs.hash
> > @@ -1,2 +1,2 @@
> >  # Locally computed
> > -sha256	2c49392816615b73bf5d6cdce9776cb66a01f5a1494b1d9af580667e32bab001  squashfs-3de1687d7432ea9b302c2db9521996f506c140a3.tar.gz
> > +sha256 bd0aa3011320b8ebee68aa406060de277bef16daf81bad5b9f70cbea6db1a779 squashfs-e38956b92f738518c29734399629e7cdb33072d3.tar.gz
> > diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk
> > index 9599d892b2..e656218f97 100644
> > --- a/package/squashfs/squashfs.mk
> > +++ b/package/squashfs/squashfs.mk
> > @@ -4,12 +4,12 @@
> >  #
> >  ################################################################################
> >  
> > -SQUASHFS_VERSION = 3de1687d7432ea9b302c2db9521996f506c140a3
> > +SQUASHFS_VERSION = e38956b92f738518c29734399629e7cdb33072d3
> >  SQUASHFS_SITE = https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git
> >  SQUASHFS_SITE_METHOD = git
> >  SQUASHFS_LICENSE = GPL-2.0+
> >  SQUASHFS_LICENSE_FILES = COPYING
> > -SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1
> > +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 ZSTD_SUPPORT=0
> >  
> >  ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y)
> >  SQUASHFS_DEPENDENCIES += lz4
> > @@ -54,7 +54,8 @@ HOST_SQUASHFS_MAKE_ARGS = \
> >  	GZIP_SUPPORT=1 \
> >  	LZ4_SUPPORT=1 \
> >  	LZO_SUPPORT=1 \
> > -	LZMA_XZ_SUPPORT=1
> > +	LZMA_XZ_SUPPORT=1 \
> > +	ZSTD_SUPPORT=0
> >  
> >  define SQUASHFS_BUILD_CMDS
> >  	$(TARGET_MAKE_ENV) $(MAKE) \
> > -- 
> > 2.16.3
> >   
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
  2018-04-12 18:51   ` Peter Seiderer
@ 2018-04-12 19:01     ` Thomas Petazzoni
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2018-04-12 19:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 12 Apr 2018 20:51:57 +0200, Peter Seiderer wrote:

> > However, I don't think it is interesting to have the new version
> > (especially as it is a sha1) in the commit title. Having the title
> > read just "squashfs: bump version" is IMHO enough. My rev-by still
> > stands, though.  
> 
> Matter of taste....and looking at a packet history of e.g.:
> 
> 	squashfs: bump version
> 	squashfs: bump version
> 	squashfs: bump version
> 	[...]
> 
> is a little boring and makes every patch search or patch reference
> more difficult....

We normally like to have the version number in the commit title indeed,
like "foo: bump to version 1.2.0". For Git SHA1s, it is a bit more
questionable whether it is really useful or not. Indeed, while with
"bump to version 1.2.0" you can easily say "ah, yes good, they bumped
to that one", with "bump to version
e38956b92f738518c29734399629e7cdb33072d3", you're unlikely to be able
to say "aah very good, they are up to this commit, so they must have
this great new feature". Or if you are, and now all the SHA1s of a
project Git repository, you really have a *very* good memory.

That being said, it doesn't hurt, and we could say that for the sake of
consistency, we should do it for all packages, regardless of whether
they have human-readable version numbers or random SHA1s.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3
  2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
                   ` (5 preceding siblings ...)
  2018-04-11 21:12 ` [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Yann E. MORIN
@ 2018-04-12 21:43 ` Thomas Petazzoni
  6 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2018-04-12 21:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  9 Apr 2018 22:04:24 +0200, Peter Seiderer wrote:
> - delete patch 0001-musl.patch (superseeded by upstream commit [1])
> - disable new zstd support for host/target
> 
> [1] https://git.kernel.org/pub/scm/fs/squashfs/squashfs-tools.git/commit/?id=a81678d6a698b8a016f9abac9f3d981281cc52eb
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - split off zstd support to extra patches (suggested by Yann E. MORIN)
> ---
>  package/squashfs/0001-musl.patch | 71 ----------------------------------------
>  package/squashfs/squashfs.hash   |  2 +-
>  package/squashfs/squashfs.mk     |  7 ++--
>  3 files changed, 5 insertions(+), 75 deletions(-)
>  delete mode 100644 package/squashfs/0001-musl.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-04-12 21:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 20:04 [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Peter Seiderer
2018-04-09 20:04 ` [Buildroot] [PATCH v2 2/6] zstd: add host libzstd support Peter Seiderer
2018-04-11 21:19   ` Yann E. MORIN
2018-04-12  3:33     ` Baruch Siach
2018-04-12 18:30     ` Peter Seiderer
2018-04-12 18:47       ` Yann E. MORIN
2018-04-09 20:04 ` [Buildroot] [PATCH v2 3/6] squashfs: add host zstd support Peter Seiderer
2018-04-11 21:20   ` Yann E. MORIN
2018-04-09 20:04 ` [Buildroot] [PATCH v2 4/6] fs/squashfs: add " Peter Seiderer
2018-04-09 20:04 ` [Buildroot] [PATCH v2 5/6] zstd: add libzstd support Peter Seiderer
2018-04-11 21:24   ` Yann E. MORIN
2018-04-12 18:45     ` Peter Seiderer
2018-04-09 20:04 ` [Buildroot] [PATCH v2 6/6] squashfs: add zstd support Peter Seiderer
2018-04-11 21:27   ` Yann E. MORIN
2018-04-12 18:31     ` Peter Seiderer
2018-04-11 21:12 ` [Buildroot] [PATCH v2 1/6] squashfs: bump version to e38956b92f738518c29734399629e7cdb33072d3 Yann E. MORIN
2018-04-12 18:51   ` Peter Seiderer
2018-04-12 19:01     ` Thomas Petazzoni
2018-04-12 21:43 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.