[LEDE-DEV] [RFC PATCH] tools/squashfs: change to upstream and update to new version 5.0-rc1

Hauke Mehrtens hauke at hauke-m.de
Sat May 27 04:51:13 PDT 2017


On 05/26/2017 06:13 PM, Alexander Couzens wrote:
> squashfs is quite long unmaintained. All patches from major
> distributions are integrated.
> Fixed timestamp is now using the environment SOURCE_DATE_EPOCH
> instead of arguments.
> 
> Signed-off-by: Alexander Couzens <lynxis at fe80.eu>

Thanks for working on this.

> ---
>  include/image.mk                                   |   3 +-
>  tools/squashfs4/Makefile                           |  12 +-
>  tools/squashfs4/patches/100-portability.patch      |  40 -
>  .../patches/110-allow_static_liblzma.patch         |  30 -
>  tools/squashfs4/patches/120-cygwin_fixes.patch     | 153 ----
>  tools/squashfs4/patches/150-freebsd_fixes.patch    |  10 -
>  .../patches/160-expose_lzma_xz_options.patch       | 929 ---------------------
>  ...0-add_support_for_LZMA_MAGIC_to_unsqashfs.patch |  72 --
>  tools/squashfs4/patches/180-openbsd_compat.patch   |  24 -
>  .../patches/190-no_nonstatic_inline.patch          |  36 -
>  .../patches/200-add-fixed-timestamp-option.patch   |  82 --
>  11 files changed, 6 insertions(+), 1385 deletions(-)
>  delete mode 100644 tools/squashfs4/patches/100-portability.patch
>  delete mode 100644 tools/squashfs4/patches/110-allow_static_liblzma.patch
>  delete mode 100644 tools/squashfs4/patches/120-cygwin_fixes.patch
>  delete mode 100644 tools/squashfs4/patches/150-freebsd_fixes.patch
>  delete mode 100644 tools/squashfs4/patches/160-expose_lzma_xz_options.patch
>  delete mode 100644 tools/squashfs4/patches/170-add_support_for_LZMA_MAGIC_to_unsqashfs.patch
>  delete mode 100644 tools/squashfs4/patches/180-openbsd_compat.patch
>  delete mode 100644 tools/squashfs4/patches/190-no_nonstatic_inline.patch
>  delete mode 100644 tools/squashfs4/patches/200-add-fixed-timestamp-option.patch
> 
> diff --git a/include/image.mk b/include/image.mk
> index ad9535d018..eaabba2d0e 100644
> --- a/include/image.mk
> +++ b/include/image.mk
> @@ -203,8 +203,7 @@ define Image/mkfs/squashfs
>  	$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
>  		-nopad -noappend -root-owned \
>  		-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \
> -		-processors 1 \
> -		$(if $(SOURCE_DATE_EPOCH),-fixed-time $(SOURCE_DATE_EPOCH))
> +		-processors 1
>  endef
>  
>  # $(1): board name
> diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile
> index e2c9fc91cc..e176f06e86 100644
> --- a/tools/squashfs4/Makefile
> +++ b/tools/squashfs4/Makefile
> @@ -7,14 +7,12 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=squashfs4
> -PKG_VERSION:=4.2
> +PKG_VERSION:=5.0
>  
> -PKG_SOURCE:=squashfs$(PKG_VERSION).tar.gz
> -PKG_SOURCE_URL:=@SF/squashfs
> -PKG_HASH:=d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96
> -PKG_CAT:=zcat
> -
> -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/squashfs$(PKG_VERSION)
> +PKG_SOURCE_PROTO:=git
> +PKG_SOURCE_DATE:=2017-05-25
> +PKG_SOURCE_URL:=https://github.com/lynxis/squashfs-tools.git
> +PKG_SOURCE_VERSION:=32a07d4156a281084c90a4b78affc8b0b32a26fc
>  
>  include $(INCLUDE_DIR)/host-build.mk
>  

Why not use https://github.com/squashfs-tools/squashfs-tools or what
will be the official repo?

> index 9e1c1fbb1e..0000000000
> --- a/tools/squashfs4/patches/160-expose_lzma_xz_options.patch
> +++ /dev/null
> @@ -1,929 +0,0 @@
> ---- /dev/null
> -+++ b/squashfs-tools/lzma_xz_options.h
......
> -+struct lzma_opts {
> -+	uint32_t dict_size;
> -+	uint32_t flags;
> -+#define LZMA_OPT_FLT_MASK	0xffff
> -+#define LZMA_OPT_PRE_OFF	16
> -+#define LZMA_OPT_PRE_MASK	(0xf << LZMA_OPT_PRE_OFF)
> -+#define LZMA_OPT_EXTREME	20	
> -+	uint16_t bit_opts;
> -+#define LZMA_OPT_LC_OFF		0
> -+#define LZMA_OPT_LC_MASK	(0x7 << LZMA_OPT_LC_OFF)
> -+#define LZMA_OPT_LP_OFF		3
> -+#define LZMA_OPT_LP_MASK	(0x7 << LZMA_OPT_LP_OFF)
> -+#define LZMA_OPT_PB_OFF		6
> -+#define LZMA_OPT_PB_MASK	(0x7 << LZMA_OPT_PB_OFF)
> -+	uint16_t fb;
> -+};

Nice that you got this change upstream. The kernel version of this
structure only has the first two members, but it still works.
See struct disk_comp_opts in fs/squashfs/xz_wrapper.c

Hauke



More information about the Lede-dev mailing list