Date: Sun, 27 Mar 2022 10:45:58 GMT From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 812d78629a3d - main - sysutils/squashfs-tools: update the port to version 4.5.1 (finally) Message-ID: <202203271045.22RAjwXZ068043@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=812d78629a3dd8d0f622cd44a2262ed01e3d6297 commit 812d78629a3dd8d0f622cd44a2262ed01e3d6297 Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2022-03-27 10:43:52 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2022-03-27 10:43:52 +0000 sysutils/squashfs-tools: update the port to version 4.5.1 (finally) This is a long-awaited release which fixes known security issue [1] and regression when working with extended attributes [2]. Install more complete documentation set while here and GC no longer needed CFLAGS+= and USE_CSTD knobs. Security: CVE-2021-41072 [1] PR: 256790 [2], 261334 --- sysutils/squashfs-tools/Makefile | 30 +++++++++++++++++----------- sysutils/squashfs-tools/distinfo | 6 +++--- sysutils/squashfs-tools/files/patch-Makefile | 22 ++++++++++++-------- 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/sysutils/squashfs-tools/Makefile b/sysutils/squashfs-tools/Makefile index 08a953db9dec..4bacc6c449e2 100644 --- a/sysutils/squashfs-tools/Makefile +++ b/sysutils/squashfs-tools/Makefile @@ -1,10 +1,9 @@ # Created by: Ashish SHUKLA <wahjava@gmail.com> PORTNAME= squashfs-tools -PORTVERSION= 4.4 +PORTVERSION= 4.5.1 CATEGORIES= sysutils -MASTER_SITES= SF/squashfs/squashfs/${DISTNAME}/ -DISTNAME= squashfs${PORTVERSION} +MASTER_SITES= SF/squashfs/squashfs/squashfs${PORTVERSION} DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= danfe@FreeBSD.org @@ -13,10 +12,14 @@ COMMENT= Set of tools to manipulate squashfs images LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/../COPYING +BUILD_DEPENDS= gsed:textproc/gsed + USES= alias cpe gmake +BINARY_ALIAS= sed=gsed -PLIST_FILES= bin/mksquashfs \ - bin/unsquashfs +PLIST_FILES= bin/mksquashfs bin/sqfscat bin/sqfstar bin/unsquashfs \ + man/man1/mksquashfs.1.gz man/man1/sqfscat.1.gz \ + man/man1/sqfstar.1.gz man/man1/unsquashfs.1.gz OPTIONS_DEFINE= DOCS LZ4 LZMA LZO XZ ZSTD OPTIONS_DEFAULT= LZ4 LZMA LZO XZ ZSTD @@ -28,13 +31,8 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/squashfs-tools CPE_PRODUCT= squashfs CPE_VENDOR= squashfs_project -USE_CSTD= gnu89 - -# Fix build with clang11 -CFLAGS+= -fcommon - -PORTDOCS= ACKNOWLEDGEMENTS CHANGES README-${PORTVERSION} USAGE \ - pseudo-file.example +PORTDOCS= ACKNOWLEDGEMENTS ACTIONS-README CHANGES DONATIONS \ + README-${PORTVERSION} USAGE pseudo-file.example LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 LZ4_MAKE_ARGS= LZ4_SUPPORT=1 @@ -51,7 +49,15 @@ XZ_MAKE_ARGS= XZ_SUPPORT=1 ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MAKE_ARGS= ZSTD_SUPPORT=1 +post-patch: + @${REINPLACE_CMD} -e '/^#include <unistd\.h>/ { x; \ + s,^,#include <signal.h>,; G; }' ${WRKSRC}/reader.c + @${REINPLACE_CMD} -e '/^#include "squashfs_fs\.h"/ { x; \ + s,^,typedef struct __sFILE FILE;,; G; }' \ + ${WRKSRC}/lzma_wrapper.c + post-install: + @${MV} ${WRKSRC:H}/RELEASE-READMEs/[Dp]* ${WRKSRC:H} @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC:H}/|} ${STAGEDIR}${DOCSDIR} diff --git a/sysutils/squashfs-tools/distinfo b/sysutils/squashfs-tools/distinfo index 87d86a7c33e4..ab5cc89605c1 100644 --- a/sysutils/squashfs-tools/distinfo +++ b/sysutils/squashfs-tools/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1567045250 -SHA256 (squashfs4.4.tar.gz) = a981b3f3f2054b5a2e658851a3c06a2460ad04a9a8a645e0afe063a63fdbb07e -SIZE (squashfs4.4.tar.gz) = 190797 +TIMESTAMP = 1647547267 +SHA256 (squashfs-tools-4.5.1.tar.gz) = 277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7 +SIZE (squashfs-tools-4.5.1.tar.gz) = 270112 SHA256 (lzma922.tar.bz2) = 9aade84f229fb25f7aef39d8866b375fe6d35a9e18098d7cd86a99e294902944 SIZE (lzma922.tar.bz2) = 546148 diff --git a/sysutils/squashfs-tools/files/patch-Makefile b/sysutils/squashfs-tools/files/patch-Makefile index 4c70e09f3e74..75b142228bc2 100644 --- a/sysutils/squashfs-tools/files/patch-Makefile +++ b/sysutils/squashfs-tools/files/patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2019-08-29 01:58:04 UTC +--- Makefile.orig 2022-03-17 19:32:02 UTC +++ Makefile -@@ -97,7 +97,7 @@ COMP_DEFAULT = gzip +@@ -101,7 +101,7 @@ COMP_DEFAULT = gzip # If your C library or build/target environment doesn't support XATTRs then # comment out the next line to build Mksquashfs and Unsquashfs without XATTR # support @@ -9,7 +9,7 @@ # Select whether you wish xattrs to be stored by Mksquashfs and extracted # by Unsquashfs by default. If selected users can disable xattr support by -@@ -105,7 +105,7 @@ XATTR_SUPPORT = 1 +@@ -109,7 +109,7 @@ XATTR_SUPPORT = 1 # # If unselected, Mksquashfs/Unsquashfs won't store and extract xattrs by # default. Users can enable xattrs by using the -xattrs option. @@ -18,7 +18,7 @@ ############################################### -@@ -160,7 +160,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2 +@@ -177,7 +177,7 @@ UNSQUASHFS_OBJS = unsquashfs.o unsquash-1.o unsquash-2 CFLAGS ?= -O2 CFLAGS += $(EXTRA_CFLAGS) $(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 \ @@ -27,15 +27,15 @@ -Wall LIBS = -lpthread -lm -@@ -200,6 +200,7 @@ endif +@@ -217,6 +217,7 @@ endif ifeq ($(LZO_SUPPORT),1) CFLAGS += -DLZO_SUPPORT +INCLUDEDIR += -I$(LOCALBASE)/include MKSQUASHFS_OBJS += lzo_wrapper.o UNSQUASHFS_OBJS += lzo_wrapper.o - LIBS += $(LZO_LIBDIR) -llzo2 -@@ -208,17 +209,19 @@ endif + LIBS += -llzo2 +@@ -225,17 +226,19 @@ endif ifeq ($(LZ4_SUPPORT),1) CFLAGS += -DLZ4_SUPPORT @@ -57,13 +57,19 @@ COMPRESSORS += zstd endif -@@ -360,6 +363,6 @@ clean: +@@ -417,9 +420,9 @@ clean: .PHONY: install install: mksquashfs unsquashfs - mkdir -p $(INSTALL_DIR) - cp mksquashfs $(INSTALL_DIR) - cp unsquashfs $(INSTALL_DIR) +- ln -fs unsquashfs $(INSTALL_DIR)/sqfscat +- ln -fs mksquashfs $(INSTALL_DIR)/sqfstar +- ../generate-manpages/install-manpages.sh $(shell pwd)/.. "$(INSTALL_MANPAGES_DIR)" + mkdir -p $(DESTDIR)$(PREFIX)/bin + ${BSD_INSTALL_PROGRAM} mksquashfs $(DESTDIR)$(PREFIX)/bin + ${BSD_INSTALL_PROGRAM} unsquashfs $(DESTDIR)$(PREFIX)/bin ++ ln -fs unsquashfs $(DESTDIR)$(INSTALL_DIR)/sqfscat ++ ln -fs mksquashfs $(DESTDIR)$(INSTALL_DIR)/sqfstar ++ ../generate-manpages/install-manpages.sh $(shell pwd)/.. "$(DESTDIR)$(INSTALL_MANPAGES_DIR)"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203271045.22RAjwXZ068043>