diff --git a/filesystems/squashfs/Makefile b/filesystems/squashfs/Makefile index 30da6f99eea6..59860b74e707 100644 --- a/filesystems/squashfs/Makefile +++ b/filesystems/squashfs/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.8 2020/06/19 21:17:46 scole Exp $ +# $NetBSD: Makefile,v 1.9 2023/10/03 19:26:20 scole Exp $ -VERSION= 4.4 +VERSION= 4.6.1 DISTNAME= squashfs-tools-${VERSION} PKGNAME= squashfs-${VERSION} @@ -23,12 +23,18 @@ USE_TOOLS+= gmake USE_LIBTOOL= yes INSTALLATION_DIRS= bin \ + man \ + man/man1 \ share/doc/squashfs \ - share/doc/squashfs/RELEASE-READMEs + share/doc/squashfs/examples SQUASH_DIR= ${WRKDIR}/${DISTNAME} WRKSRC= ${SQUASH_DIR}/squashfs-tools SQUASH_PKG_DOC= ${DESTDIR}${PREFIX}/share/doc/squashfs +SQUASH_DOCS= ACKNOWLEDGEMENTS ACTIONS-README CHANGES COPYING INSTALL \ + README-4.6.1 TECHNICAL-INFO USAGE-4.6 USAGE-MKSQUASHFS-4.6 \ + USAGE-SQFSCAT-4.6 USAGE-SQFSTAR-4.6 USAGE-UNSQUASHFS-4.6 +SQUASH_MAN= mksquashfs.1 sqfscat.1 sqfstar.1 unsquashfs.1 # xxx no sigtimedwait or sigwaitinfo on mac os? BROKEN_ON_PLATFORM= Darwin-*-* @@ -38,14 +44,16 @@ do-install: ${WRKSRC}/mksquashfs ${DESTDIR}${PREFIX}/bin ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} \ ${WRKSRC}/unsquashfs ${DESTDIR}${PREFIX}/bin - ${INSTALL_DATA} ${SQUASH_DIR}/ACKNOWLEDGEMENTS ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/CHANGES ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/COPYING ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/INSTALL ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/README ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/README-4.4 ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/USAGE ${SQUASH_PKG_DOC} - ${INSTALL_DATA} ${SQUASH_DIR}/RELEASE-READMEs/* \ - ${SQUASH_PKG_DOC}/RELEASE-READMEs/ + ${LN} -f ${DESTDIR}${PREFIX}/bin/mksquashfs ${DESTDIR}${PREFIX}/bin/sqfstar + ${LN} -f ${DESTDIR}${PREFIX}/bin/unsquashfs ${DESTDIR}${PREFIX}/bin/sqfscat + for f in ${SQUASH_DOCS}; do \ + ${INSTALL_DATA} ${SQUASH_DIR}/$$f ${SQUASH_PKG_DOC}; \ + done + for f in ${SQUASH_MAN}; do \ + ${INSTALL_MAN} ${SQUASH_DIR}/manpages/$$f \ + ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \ + done + ${INSTALL_DATA} ${SQUASH_DIR}/examples/pseudo-file.example \ + ${SQUASH_PKG_DOC}/examples .include "../../mk/bsd.pkg.mk" diff --git a/filesystems/squashfs/PLIST b/filesystems/squashfs/PLIST index f328a88931c7..4da028bedf67 100644 --- a/filesystems/squashfs/PLIST +++ b/filesystems/squashfs/PLIST @@ -1,24 +1,22 @@ -@comment $NetBSD: PLIST,v 1.4 2020/06/19 21:17:46 scole Exp $ +@comment $NetBSD: PLIST,v 1.5 2023/10/03 19:26:20 scole Exp $ bin/mksquashfs +bin/sqfscat +bin/sqfstar bin/unsquashfs +man/man1/mksquashfs.1 +man/man1/sqfscat.1 +man/man1/sqfstar.1 +man/man1/unsquashfs.1 share/doc/squashfs/ACKNOWLEDGEMENTS +share/doc/squashfs/ACTIONS-README share/doc/squashfs/CHANGES share/doc/squashfs/COPYING share/doc/squashfs/INSTALL -share/doc/squashfs/README -share/doc/squashfs/README-4.4 -share/doc/squashfs/RELEASE-READMEs/DONATIONS -share/doc/squashfs/RELEASE-READMEs/PERFORMANCE.README -share/doc/squashfs/RELEASE-READMEs/README-2.0 -share/doc/squashfs/RELEASE-READMEs/README-2.0-AMD64 -share/doc/squashfs/RELEASE-READMEs/README-2.1 -share/doc/squashfs/RELEASE-READMEs/README-3.0 -share/doc/squashfs/RELEASE-READMEs/README-3.1 -share/doc/squashfs/RELEASE-READMEs/README-3.2 -share/doc/squashfs/RELEASE-READMEs/README-3.3 -share/doc/squashfs/RELEASE-READMEs/README-4.0 -share/doc/squashfs/RELEASE-READMEs/README-4.1 -share/doc/squashfs/RELEASE-READMEs/README-4.2 -share/doc/squashfs/RELEASE-READMEs/README-4.3 -share/doc/squashfs/RELEASE-READMEs/pseudo-file.example -share/doc/squashfs/USAGE +share/doc/squashfs/README-4.6.1 +share/doc/squashfs/TECHNICAL-INFO +share/doc/squashfs/USAGE-4.6 +share/doc/squashfs/USAGE-MKSQUASHFS-4.6 +share/doc/squashfs/USAGE-SQFSCAT-4.6 +share/doc/squashfs/USAGE-SQFSTAR-4.6 +share/doc/squashfs/USAGE-UNSQUASHFS-4.6 +share/doc/squashfs/examples/pseudo-file.example diff --git a/filesystems/squashfs/distinfo b/filesystems/squashfs/distinfo index c4df69eb9448..7ce1aa84ca8b 100644 --- a/filesystems/squashfs/distinfo +++ b/filesystems/squashfs/distinfo @@ -1,9 +1,6 @@ -$NetBSD: distinfo,v 1.5 2021/10/26 10:25:30 nia Exp $ +$NetBSD: distinfo,v 1.6 2023/10/03 19:26:20 scole Exp $ -BLAKE2s (squashfs-tools-4.4.tar.gz) = 2a2f1f342699557b6fb2a8fa7d44acbecf645a94122699c1b2941618ac98ded4 -SHA512 (squashfs-tools-4.4.tar.gz) = 133ce437fb8c929933d52cff710b61dd9181f6f8be58250b0d6a59a7bb79a2b350f68f456b06a0e17c469409a71272d586802d570248273ddcd5dad088c00308 -Size (squashfs-tools-4.4.tar.gz) = 241842 bytes -SHA1 (patch-Makefile) = ee53cb3c16983cb3767df2ccdcf4636bd646fc3c -SHA1 (patch-action.c) = 35200e6cafd0846fb05fac50862ba3ceb4777935 -SHA1 (patch-mksquashfs.c) = 723e9250e0ce821825de916671ac51251dce9432 -SHA1 (patch-unsquashfs.c) = 167ee4ec1aea744dac6e13d837f1ae19a0f2472a +BLAKE2s (squashfs-tools-4.6.1.tar.gz) = f6cba60eaefba487281909c44a55265dc5869fc7d36026a98b72a9f083805312 +SHA512 (squashfs-tools-4.6.1.tar.gz) = 10e8a4b1e2327e062aef4f85860e76ebcd7a29e4c19e152ff7edec4a38316982b5bcfde4ab69da6bcb931258d264c2b6cb40cb5f635f9e6f6eba1ed5976267cb +Size (squashfs-tools-4.6.1.tar.gz) = 286848 bytes +SHA1 (patch-Makefile) = 501a17abded8e066327f08a8c8b0773c897972f8 diff --git a/filesystems/squashfs/patches/patch-Makefile b/filesystems/squashfs/patches/patch-Makefile index 10001f3ca480..09e265c46649 100644 --- a/filesystems/squashfs/patches/patch-Makefile +++ b/filesystems/squashfs/patches/patch-Makefile @@ -1,19 +1,19 @@ -$NetBSD: patch-Makefile,v 1.3 2020/06/19 21:17:46 scole Exp $ +$NetBSD: patch-Makefile,v 1.4 2023/10/03 19:26:20 scole Exp $ use options framework and libtool ---- Makefile.orig 2019-08-29 01:58:04.000000000 +0000 +--- Makefile.orig 2023-03-25 20:53:37.000000000 +0000 +++ Makefile -@@ -15,7 +15,7 @@ - # Obviously, you must select at least one of the available gzip, lzma, lzo - # compression types. +@@ -22,7 +22,7 @@ ifndef CONFIG + # Obviously, you must select at least one of the available gzip, xz, lzo, + # lz4, zstd or lzma (deprecated) compression types. # -GZIP_SUPPORT = 1 +#GZIP_SUPPORT = 1 ########### Building XZ support ############# # -@@ -85,7 +85,7 @@ GZIP_SUPPORT = 1 +@@ -92,7 +92,7 @@ GZIP_SUPPORT = 1 # in Mksquashfs. Obviously the compression algorithm must have been # selected to be built # @@ -22,7 +22,7 @@ use options framework and libtool ############################################### -@@ -97,7 +97,7 @@ COMP_DEFAULT = gzip +@@ -104,7 +104,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 @@ -31,7 +31,7 @@ use options framework and libtool # 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 +@@ -112,7 +112,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. @@ -40,9 +40,9 @@ use options framework and libtool ############################################### -@@ -277,11 +277,15 @@ $(error "COMP_DEFAULT is set to ${COMP_D - built!") - endif +@@ -364,12 +364,15 @@ YEAR := $(firstword $(subst /, , $(DATE) + + CFLAGS += -DVERSION=\"$(VERSION)\" -DDATE=\"$(DATE)\" -DYEAR=\"$(YEAR)\" +%.lo : %.c + $(LIBTOOL) --mode=compile --tag=CC $(CC) -o $@ -c $(CFLAGS) $(CPPFLAGS) $< @@ -52,21 +52,23 @@ use options framework and libtool -mksquashfs: $(MKSQUASHFS_OBJS) - $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(MKSQUASHFS_OBJS) $(LIBS) -o $@ +- ln -sf mksquashfs sqfstar +mksquashfs: $(MKSQUASHFS_OBJS:.o=.lo) + $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(MKSQUASHFS_OBJS:.o=.lo) \ + $(LDFLAGS) $(EXTRA_LDFLAGS) $(LIBS) mksquashfs.o: Makefile mksquashfs.c squashfs_fs.h squashfs_swap.h mksquashfs.h \ - sort.h pseudo.h compressor.h xattr.h action.h error.h progressbar.h \ -@@ -331,8 +335,9 @@ lz4_wrapper.o: lz4_wrapper.c squashfs_fs + sort.h pseudo.h compressor.h xattr.h action.h mksquashfs_error.h progressbar.h \ +@@ -428,9 +431,9 @@ lz4_wrapper.o: lz4_wrapper.c squashfs_fs xz_wrapper.o: xz_wrapper.c squashfs_fs.h xz_wrapper.h compressor.h -unsquashfs: $(UNSQUASHFS_OBJS) - $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(UNSQUASHFS_OBJS) $(LIBS) -o $@ +- ln -sf unsquashfs sqfscat +unsquashfs: $(UNSQUASHFS_OBJS:.o=.lo) + $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(UNSQUASHFS_OBJS:.o=.lo) \ + $(LDFLAGS) $(EXTRA_LDFLAGS) $(LIBS) unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h \ - squashfs_compat.h xattr.h read_fs.h compressor.h + squashfs_compat.h xattr.h read_fs.h compressor.h unsquashfs_error.h diff --git a/filesystems/squashfs/patches/patch-action.c b/filesystems/squashfs/patches/patch-action.c deleted file mode 100644 index f70d82767bcb..000000000000 --- a/filesystems/squashfs/patches/patch-action.c +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-action.c,v 1.2 2020/06/19 21:17:46 scole Exp $ - -Do not use alloca and strdupa which some platforms may not have - ---- action.c.orig 2019-08-29 01:58:04.000000000 +0000 -+++ action.c -@@ -2284,9 +2284,22 @@ static char *get_start(char *s, int n) - - static int subpathname_fn(struct atom *atom, struct action_data *action_data) - { -- return fnmatch(atom->argv[0], get_start(strdupa(action_data->subpath), -+ /* XXX some platforms might not have alloca, strdupa */ -+ int ret_val; -+ char *copy_str; -+ -+ if ((copy_str = strdup(action_data->subpath)) == NULL) { -+ fprintf(stderr, "Out of mem\n"); -+ exit(1); -+ } -+ -+ ret_val = fnmatch(atom->argv[0],get_start(copy_str, - count_components(atom->argv[0])), - FNM_PATHNAME|FNM_PERIOD|FNM_EXTMATCH) == 0; -+ -+ free(copy_str); -+ -+ return ret_val; - } - - /* diff --git a/filesystems/squashfs/patches/patch-mksquashfs.c b/filesystems/squashfs/patches/patch-mksquashfs.c deleted file mode 100644 index 56bb8568585b..000000000000 --- a/filesystems/squashfs/patches/patch-mksquashfs.c +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-mksquashfs.c,v 1.2 2020/06/19 21:17:46 scole Exp $ - -#ifdef linux includes and don't use sysinfo() unless for linux - ---- mksquashfs.c.orig 2019-08-29 01:58:04.000000000 +0000 -+++ mksquashfs.c -@@ -35,7 +35,9 @@ - #include - #include - #include -+#if defined(__linux__) - #include -+#endif - #include - #include - #include -@@ -50,7 +52,9 @@ - #include - #include - #include -+#if defined(__linux__) - #include -+#endif - - #ifndef linux - #define __BYTE_ORDER BYTE_ORDER -@@ -5196,6 +5200,7 @@ int get_physical_memory() - int phys_mem; - - if(num_pages == -1 || page_size == -1) { -+#if defined(__linux__) - struct sysinfo sys; - int res = sysinfo(&sys); - -@@ -5204,6 +5209,9 @@ int get_physical_memory() - - num_pages = sys.totalram; - page_size = sys.mem_unit; -+#else -+ BAD_ERROR("Mksquashfs sysconf num_pages or page_size failed!\n"); -+#endif - } - - phys_mem = num_pages * page_size >> 20; diff --git a/filesystems/squashfs/patches/patch-unsquashfs.c b/filesystems/squashfs/patches/patch-unsquashfs.c deleted file mode 100644 index 8c2ce3d4de7b..000000000000 --- a/filesystems/squashfs/patches/patch-unsquashfs.c +++ /dev/null @@ -1,27 +0,0 @@ -$NetBSD: patch-unsquashfs.c,v 1.2 2020/06/19 21:17:46 scole Exp $ - -Some workarounds for not using autoconf - ---- unsquashfs.c.orig 2019-08-29 01:58:04.000000000 +0000 -+++ unsquashfs.c -@@ -32,8 +32,18 @@ - #include "stdarg.h" - #include "fnmatch_compat.h" - --#include --#include -+/* XXX need autoconf HAVE_SYS_SYSCTL_H */ -+#if ( defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__) || \ -+ defined(__FreeBSD__) || defined(__OpenBSD__) ) -+ #include -+#endif -+ -+/* XXX probably others... */ -+#if defined(__linux__) -+ #include -+ #include -+#endif -+ - #include - #include - #include