pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc PR pkg/51058



details:   https://anonhg.NetBSD.org/pkgsrc/rev/75aef744c4bf
branches:  trunk
changeset: 352206:75aef744c4bf
user:      scole <scole%pkgsrc.org@localhost>
date:      Fri Sep 09 15:40:17 2016 +0000

description:
PR pkg/51058

Add filesystem/squashfs 4.3

Squashfs is a highly compressed read-only filesystem for Linux.
It uses either gzip/xz/lzo/lz4 compression to compress both files, inodes
and directories.  Inodes in the system are very small and all blocks are
packed to minimise data overhead. Block sizes greater than 4K are supported
up to a maximum of 1Mbytes (default block size 128K).

Squashfs is intended for general read-only filesystem use, for archival
use (i.e. in cases where a .tar.gz file may be used), and in constrained
block device/memory systems (e.g. embedded systems) where low overhead is
needed.

This package contains tools to manipulate squashfs archive files.

diffstat:

 doc/CHANGES-2016                                   |   3 +-
 filesystems/Makefile                               |   3 +-
 filesystems/squashfs/DESCR                         |  12 +++++
 filesystems/squashfs/Makefile                      |  48 ++++++++++++++++++++++
 filesystems/squashfs/PLIST                         |  22 ++++++++++
 filesystems/squashfs/distinfo                      |  11 +++++
 filesystems/squashfs/options.mk                    |  43 +++++++++++++++++++
 filesystems/squashfs/patches/patch-Makefile        |  42 +++++++++++++++++++
 filesystems/squashfs/patches/patch-action.c        |  37 ++++++++++++++++
 filesystems/squashfs/patches/patch-fnm__extmatch.h |  15 ++++++
 filesystems/squashfs/patches/patch-mksquashfs.c    |  13 +++++
 filesystems/squashfs/patches/patch-unsquashfs.c    |  32 ++++++++++++++
 12 files changed, 279 insertions(+), 2 deletions(-)

diffs (truncated from 346 to 300 lines):

diff -r 20023ddbc091 -r 75aef744c4bf doc/CHANGES-2016
--- a/doc/CHANGES-2016  Fri Sep 09 13:26:15 2016 +0000
+++ b/doc/CHANGES-2016  Fri Sep 09 15:40:17 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES-2016,v 1.3728 2016/09/09 13:26:15 fhajny Exp $
+$NetBSD: CHANGES-2016,v 1.3729 2016/09/09 15:41:55 scole Exp $
 
 Changes to the packages collection and infrastructure in 2016:
 
@@ -5284,3 +5284,4 @@
        Updated mail/neomutt to 20160827nb1 [wiz 2016-09-09]
        Updated misc/calibre to 2.67.0 [wiz 2016-09-09]
        Updated security/vault to 0.6.1 [fhajny 2016-09-09]
+       Added filesystems/squashfs version 4.3 [scole 2016-09-09]
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/Makefile
--- a/filesystems/Makefile      Fri Sep 09 13:26:15 2016 +0000
+++ b/filesystems/Makefile      Fri Sep 09 15:40:17 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.40 2016/03/01 11:30:43 jmmv Exp $
+# $NetBSD: Makefile,v 1.41 2016/09/09 15:40:17 scole Exp $
 #
 
 COMMENT=       File systems, and file system related packages
@@ -43,6 +43,7 @@
 SUBDIR+=       perfuse
 SUBDIR+=       py-filesystem
 SUBDIR+=       py-fuse-bindings
+SUBDIR+=       squashfs
 SUBDIR+=       tahoe-lafs
 SUBDIR+=       u9fs
 
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/DESCR        Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,12 @@
+Squashfs is a highly compressed read-only filesystem for Linux.
+It uses either gzip/xz/lzo/lz4 compression to compress both files, inodes
+and directories.  Inodes in the system are very small and all blocks are
+packed to minimise data overhead. Block sizes greater than 4K are supported
+up to a maximum of 1Mbytes (default block size 128K).
+
+Squashfs is intended for general read-only filesystem use, for archival
+use (i.e. in cases where a .tar.gz file may be used), and in constrained
+block device/memory systems (e.g. embedded systems) where low overhead is
+needed.
+
+This package contains tools to manipulate squashfs archive files.
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/Makefile     Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,48 @@
+# $NetBSD: Makefile,v 1.1 2016/09/09 15:40:17 scole Exp $
+
+DISTNAME=       squashfs${VERSION}
+PKGNAME=        squashfs-${VERSION}
+VERSION=        4.3
+CATEGORIES=     filesystems
+MASTER_SITES=   http://downloads.sourceforge.net/project/squashfs/squashfs/${DISTNAME}/
+
+MAINTAINER=     pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=       http://squashfs.sourceforge.net/
+COMMENT=        Tools for squashfs archives
+LICENSE=        gnu-gpl-v2
+
+.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
+
+USE_LANGUAGES=  c
+
+USE_TOOLS+=    gmake
+
+INSTALLATION_DIRS=     bin \
+                       share/doc/${PKGNAME} \
+                       share/doc/${PKGNAME}/OLD-READMEs \
+                       share/examples/${PKGNAME}
+
+SQUASH_DIR=    ${WRKDIR}/${DISTNAME}
+WRKSRC=                ${SQUASH_DIR}/squashfs-tools
+SQUASH_PKG_DOC=        ${DESTDIR}${PREFIX}/share/doc/${PKGNAME}
+
+do-build:
+       cd ${WRKSRC} && env EXTRA_LDFLAGS="${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
+               ${GMAKE} ${BUILD_MAKE_FLAGS}
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/mksquashfs ${DESTDIR}${PREFIX}/bin
+       ${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}/DONATIONS          ${SQUASH_PKG_DOC}
+       ${INSTALL_DATA} ${SQUASH_DIR}/INSTALL            ${SQUASH_PKG_DOC}
+       ${INSTALL_DATA} ${SQUASH_DIR}/PERFORMANCE.README ${SQUASH_PKG_DOC}
+       ${INSTALL_DATA} ${SQUASH_DIR}/README             ${SQUASH_PKG_DOC}
+       ${INSTALL_DATA} ${SQUASH_DIR}/README-4.3         ${SQUASH_PKG_DOC}
+       ${INSTALL_DATA} ${SQUASH_DIR}/OLD-READMEs/*      ${SQUASH_PKG_DOC}/OLD-READMEs/
+       ${INSTALL_DATA} ${SQUASH_DIR}/pseudo-file.example ${DESTDIR}${PREFIX}/share/examples/${PKGNAME}/
+
+.include "../../mk/bsd.pkg.mk"
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/PLIST        Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,22 @@
+@comment $NetBSD: PLIST,v 1.1 2016/09/09 15:40:17 scole Exp $
+bin/mksquashfs
+bin/unsquashfs
+share/doc/${PKGNAME}/ACKNOWLEDGEMENTS
+share/doc/${PKGNAME}/CHANGES
+share/doc/${PKGNAME}/COPYING
+share/doc/${PKGNAME}/DONATIONS
+share/doc/${PKGNAME}/INSTALL
+share/doc/${PKGNAME}/PERFORMANCE.README
+share/doc/${PKGNAME}/README
+share/doc/${PKGNAME}/README-4.3
+share/doc/${PKGNAME}/OLD-READMEs/README-2.0
+share/doc/${PKGNAME}/OLD-READMEs/README-2.1
+share/doc/${PKGNAME}/OLD-READMEs/README-3.0
+share/doc/${PKGNAME}/OLD-READMEs/README-3.1
+share/doc/${PKGNAME}/OLD-READMEs/README-3.2
+share/doc/${PKGNAME}/OLD-READMEs/README-3.3
+share/doc/${PKGNAME}/OLD-READMEs/README-4.0
+share/doc/${PKGNAME}/OLD-READMEs/README-4.1
+share/doc/${PKGNAME}/OLD-READMEs/README-4.2
+share/doc/${PKGNAME}/OLD-READMEs/README-AMD64
+share/examples/${PKGNAME}/pseudo-file.example
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/distinfo     Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1 2016/09/09 15:40:17 scole Exp $
+
+SHA1 (squashfs4.3.tar.gz) = a615979db9cee82e4a934a1455577f597d290b41
+RMD160 (squashfs4.3.tar.gz) = fc91627c0757205c4a0fbe2037913cec1cefb1fd
+SHA512 (squashfs4.3.tar.gz) = 854ed7acc99920f24ecf11e0da807e5a2a162eeda55db971aba63a03f0da2c13b20ec0564a906c4b0e415bd8258b273a10208c7abc0704f2ceea773aa6148a79
+Size (squashfs4.3.tar.gz) = 182550 bytes
+SHA1 (patch-Makefile) = ec62b7beb0a741f48a2392900e6655b7bfbdb438
+SHA1 (patch-action.c) = d0fc02e79f93a125f20992362214b359460bdce2
+SHA1 (patch-fnm__extmatch.h) = 167c9b473c78f3e10d7536791d63e42c39794e4a
+SHA1 (patch-mksquashfs.c) = 8e91a84b4bfd0de4aef79d9165ff41f17e5b8c41
+SHA1 (patch-unsquashfs.c) = 1e02204097129fdd0309124d2a664c2e081db2f0
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/options.mk   Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,43 @@
+# $NetBSD: options.mk,v 1.1 2016/09/09 15:40:17 scole Exp $
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.squashfs
+PKG_SUPPORTED_OPTIONS= zlib lz4 lzo xz xattr
+PKG_SUGGESTED_OPTIONS= zlib lzo xz
+
+.include "../../mk/bsd.options.mk"
+
+# XXX any other OS support xattr?
+.if ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+=        xattr
+.endif
+
+.if empty(PKG_OPTIONS:Mzlib) && \
+    empty(PKG_OPTIONS:Mlz4) && \
+    empty(PKG_OPTIONS:Mlzo) && \
+    empty(PKG_OPTIONS:Mxz)
+PKG_FAIL_REASON=       "need at least one compression algorithm selected"
+.endif
+
+.if !empty(PKG_OPTIONS:Mzlib)
+.include "../../devel/zlib/buildlink3.mk"
+BUILD_MAKE_FLAGS+=     GZIP_SUPPORT=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mlz4)
+.include "../../archivers/lz4/buildlink3.mk"
+BUILD_MAKE_FLAGS+=     LZ4_SUPPORT=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mlzo)
+.include "../../archivers/lzo/buildlink3.mk"
+BUILD_MAKE_FLAGS+=     LZO_SUPPORT=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mxz)
+.include "../../archivers/xz/buildlink3.mk"
+BUILD_MAKE_FLAGS+=     XZ_SUPPORT=1
+.endif
+
+.if !empty(PKG_OPTIONS:Mxattr)
+BUILD_MAKE_FLAGS+=     XATTR_SUPPORT=1
+.endif
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/patches/patch-Makefile       Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-Makefile,v 1.1 2016/09/09 15:40:17 scole Exp $
+Add fnm_extmatch.h dependency
+
+--- Makefile.orig      2014-05-11 18:56:00.000000000 +0000
++++ Makefile
+@@ -15,7 +15,7 @@
+ # Obviously, you must select at least one of the available gzip, lzma, lzo
+ # compression types.
+ #
+-GZIP_SUPPORT = 1
++#GZIP_SUPPORT = 1
+ 
+ ########### Building XZ support #############
+ #
+@@ -229,7 +229,8 @@ mksquashfs: $(MKSQUASHFS_OBJS)
+ 
+ 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 \
+-      info.h caches-queues-lists.h read_fs.h restore.h process_fragments.h 
++      info.h caches-queues-lists.h read_fs.h restore.h process_fragments.h \
++      fnm_extmatch.h
+ 
+ read_fs.o: read_fs.c squashfs_fs.h squashfs_swap.h compressor.h xattr.h \
+       error.h mksquashfs.h
+@@ -247,7 +248,7 @@ xattr.o: xattr.c squashfs_fs.h squashfs_
+ 
+ read_xattrs.o: read_xattrs.c squashfs_fs.h squashfs_swap.h xattr.h error.h
+ 
+-action.o: action.c squashfs_fs.h mksquashfs.h action.h error.h
++action.o: action.c squashfs_fs.h mksquashfs.h action.h error.h fnm_extmatch.h
+ 
+ progressbar.o: progressbar.c error.h
+ 
+@@ -279,7 +280,7 @@ unsquashfs: $(UNSQUASHFS_OBJS)
+       $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(UNSQUASHFS_OBJS) $(LIBS) -o $@
+ 
+ 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 fnm_extmatch.h
+ 
+ unsquash-1.o: unsquashfs.h unsquash-1.c squashfs_fs.h squashfs_compat.h
+ 
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/patches/patch-action.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/patches/patch-action.c       Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-action.c,v 1.1 2016/09/09 15:40:17 scole Exp $
+Do not use alloca and strdupa which some platforms may not have
+
+--- action.c.orig      2014-05-10 04:54:13.000000000 +0000
++++ action.c
+@@ -43,6 +43,7 @@
+ #include "mksquashfs.h"
+ #include "action.h"
+ #include "error.h"
++#include "fnm_extmatch.h"
+ 
+ /*
+  * code to parse actions
+@@ -1953,9 +1954,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;
+ }
+ 
+ TEST_VAR_FN(filesize, ACTION_REG, action_data->buf->st_size)
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/patches/patch-fnm__extmatch.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/patches/patch-fnm__extmatch.h        Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-fnm__extmatch.h,v 1.1 2016/09/09 15:40:17 scole Exp $
+Define FNM_EXTMATCH if not already defined
+
+--- fnm_extmatch.h.orig        2016-09-09 14:49:14.000000000 +0000
++++ fnm_extmatch.h
+@@ -0,0 +1,9 @@
++/*
++ * this is defined in external/gpl[23]/gnulib various fnmatch_.h
++ * with _GNU_SOURCE or various _POSIX_C_SOURCE but not
++ * pksrgc/pkgtools/libnbcompat pkg/include/nbcompat/fnmatch.h or
++ * usr/include/fnmatch.h, what is best way to fix?
++ */
++#ifndef FNM_EXTMATCH
++# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */        
++#endif
diff -r 20023ddbc091 -r 75aef744c4bf filesystems/squashfs/patches/patch-mksquashfs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/squashfs/patches/patch-mksquashfs.c   Fri Sep 09 15:40:17 2016 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-mksquashfs.c,v 1.1 2016/09/09 15:40:17 scole Exp $
+Include fnm_extmatch.h
+



Home | Main Index | Thread Index | Old Index