* [gentoo-commits] repo/gentoo:master commit in: sys-fs/squashfs-tools/, sys-fs/squashfs-tools/files/
@ 2017-02-03 21:45 Robin H. Johnson
0 siblings, 0 replies; 4+ messages in thread
From: Robin H. Johnson @ 2017-02-03 21:45 UTC (permalink / raw
To: gentoo-commits
commit: 66801d7fecf84023164d5c596c80eaa4fc6f73b2
Author: Felix Janda <felix.janda <AT> posteo <DOT> de>
AuthorDate: Sat Nov 26 19:33:04 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 21:45:32 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66801d7f
sys-fs/squashfs-tools: fix build with musl
Add two patches: First patch is essentially from
https://github.com/plougher/squashfs-tools/pull/3
and gives a fallback for missing FNM_EXTMATCH.
The second patch is from
https://github.com/plougher/squashfs-tools/pull/9
and adds the missing include for the S_IF* constants.
Fixes: https://github.com/gentoo/gentoo/pull/2922
Gentoo-Bug: https://bugs.gentoo.org/600934
(cherry picked from commit 56065404e0d3d90f7ee5ce1b759e9044e655de88)
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
.../files/squashfs-tools-4.3-extmatch.patch | 121 +++++++++++++++++++++
.../files/squashfs-tools-4.3-musl.patch | 24 ++++
sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild | 2 +
3 files changed, 147 insertions(+)
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-extmatch.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-extmatch.patch
new file mode 100644
index 00000000..7ffc062
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-extmatch.patch
@@ -0,0 +1,121 @@
+From https://github.com/plougher/squashfs-tools/pull/9
+
+From 4280e74de14070869787a9166242f9ce2dafd82e Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:33:43 +0200
+Subject: [PATCH] squashfs-tools: with fnmatch.h compatibility with musl
+
+musl does not define FNM_EXTMATCH
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/action.c | 2 +-
+ squashfs-tools/fnmatch_compat.h | 32 ++++++++++++++++++++++++++++++++
+ squashfs-tools/mksquashfs.c | 2 +-
+ squashfs-tools/unsquashfs.c | 1 +
+ squashfs-tools/unsquashfs.h | 1 -
+ 5 files changed, 35 insertions(+), 3 deletions(-)
+ create mode 100644 squashfs-tools/fnmatch_compat.h
+
+diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c
+index 35889a4..4b06ccb 100644
+--- a/squashfs-tools/action.c
++++ b/squashfs-tools/action.c
+@@ -31,7 +31,6 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <fnmatch.h>
+ #include <pwd.h>
+ #include <grp.h>
+ #include <sys/wait.h>
+@@ -43,6 +42,7 @@
+ #include "mksquashfs.h"
+ #include "action.h"
+ #include "error.h"
++#include "fnmatch_compat.h"
+
+ /*
+ * code to parse actions
+diff --git a/squashfs-tools/fnmatch_compat.h b/squashfs-tools/fnmatch_compat.h
+new file mode 100644
+index 0000000..7b4afd8
+--- /dev/null
++++ b/squashfs-tools/fnmatch_compat.h
+@@ -0,0 +1,32 @@
++#ifndef FNMATCH_COMPAT
++#define FNMATCH_COMPAT
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2015
++ * Phillip Lougher <phillip@squashfs.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * fnmatch_compat.h
++ */
++
++#include <fnmatch.h>
++
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
++#endif
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index d221c35..4e7cbdd 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -46,7 +46,6 @@
+ #include <sys/mman.h>
+ #include <pthread.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <sys/wait.h>
+ #include <limits.h>
+ #include <ctype.h>
+@@ -76,6 +75,7 @@
+ #include "read_fs.h"
+ #include "restore.h"
+ #include "process_fragments.h"
++#include "fnmatch_compat.h"
+
+ int delete = FALSE;
+ int fd;
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 1323dd6..2428baa 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -30,6 +30,7 @@
+ #include "xattr.h"
+ #include "unsquashfs_info.h"
+ #include "stdarg.h"
++#include "fnmatch_compat.h"
+
+ #include <sys/sysinfo.h>
+ #include <sys/types.h>
+diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h
+index ecd0bb4..0edbd25 100644
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -40,7 +40,6 @@
+ #include <grp.h>
+ #include <time.h>
+ #include <regex.h>
+-#include <fnmatch.h>
+ #include <signal.h>
+ #include <pthread.h>
+ #include <math.h>
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-musl.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-musl.patch
new file mode 100644
index 00000000..52b7f48
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-musl.patch
@@ -0,0 +1,24 @@
+From https://github.com/plougher/squashfs-tools/pull/9
+
+From b0ca8a5c98ff73e70b2ab1bc24aa824aa2458287 Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+Date: Wed, 6 Jan 2016 15:36:48 +0200
+Subject: [PATCH] pseudo.c: add explicit <sys/stat.h> include
+
+Signed-off-by: Alexandru Ardelean <aa@ocedo.com>
+---
+ squashfs-tools/pseudo.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c
+index f85fe60..83bfc97 100644
+--- a/squashfs-tools/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"
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
index 7b050d6..1729abe 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
@@ -38,6 +38,8 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-local-cve-fix.patch
epatch "${FILESDIR}"/${P}-mem-overflow.patch
epatch "${FILESDIR}"/${P}-xattrs.patch
+ epatch "${FILESDIR}"/${P}-extmatch.patch
+ epatch "${FILESDIR}"/${P}-musl.patch
}
use10() { usex $1 1 0 ; }
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/squashfs-tools/, sys-fs/squashfs-tools/files/
@ 2020-12-20 20:34 Michał Górny
0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2020-12-20 20:34 UTC (permalink / raw
To: gentoo-commits
commit: 0c7e8acaf9666ca4d2cfe388b635921b2615fb2b
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 20:22:38 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 20:34:24 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c7e8aca
sys-fs/squashfs-tools: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sys-fs/squashfs-tools/Manifest | 1 -
.../files/squashfs-tools-4.4-fno-common.patch | 11 ----
sys-fs/squashfs-tools/metadata.xml | 6 --
sys-fs/squashfs-tools/squashfs-tools-4.4-r1.ebuild | 55 ------------------
sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild | 67 ----------------------
5 files changed, 140 deletions(-)
diff --git a/sys-fs/squashfs-tools/Manifest b/sys-fs/squashfs-tools/Manifest
index 952f1f088a0..5df865b6a20 100644
--- a/sys-fs/squashfs-tools/Manifest
+++ b/sys-fs/squashfs-tools/Manifest
@@ -1,2 +1 @@
DIST squashfs-tools-4.4-git.1.tar.gz 241963 BLAKE2B 7a80c353efbbca851b2eb44e742f20b4cf59e91058b53b77c74d879dc18d882e3bb6de8a010a4469c0a53384ccf2968bba4cd1d6f10cfcede70fe07eebbf2409 SHA512 8d8cc3da7cbfc7b94d070021383413f3d1ef1261ba3fd9924dde4453558a8f8f14812c2f5614f87bef719496b0a023897de8d087c32a7344fa2eb9c1624563a0
-DIST squashfs-tools-4.4.tar.gz 241842 BLAKE2B 006e2d340bcf6e20873221fb51fa30e0808c4a4d9e1838ca71c11ddbff3bf472dffe730e9edf07c34f535650e6486a8a80a88f82d6c9ef7a7c19aa22098e9197 SHA512 133ce437fb8c929933d52cff710b61dd9181f6f8be58250b0d6a59a7bb79a2b350f68f456b06a0e17c469409a71272d586802d570248273ddcd5dad088c00308
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch
deleted file mode 100644
index dfbf42abb34..00000000000
--- a/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/squashfs-tools/mksquashfs.h
-+++ b/squashfs-tools/mksquashfs.h
-@@ -143,7 +143,7 @@ struct append_file {
- #endif
-
- extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
--struct cache *bwriter_buffer, *fwriter_buffer;
-+extern struct cache *bwriter_buffer, *fwriter_buffer;
- extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
- *to_frag, *locked_fragment, *to_process_frag;
- extern struct append_file **file_mapping;
diff --git a/sys-fs/squashfs-tools/metadata.xml b/sys-fs/squashfs-tools/metadata.xml
index 9e444d0bdc1..a017cec98ce 100644
--- a/sys-fs/squashfs-tools/metadata.xml
+++ b/sys-fs/squashfs-tools/metadata.xml
@@ -5,12 +5,6 @@
<email>mgorny@gentoo.org</email>
<name>Michał Górny</name>
</maintainer>
- <use>
- <flag name="xz">
- Enable support for XZ ("LZMA2") compression using
- <pkg>app-arch/xz-utils</pkg>
- </flag>
- </use>
<upstream>
<remote-id type="sourceforge">squashfs</remote-id>
</upstream>
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.4-r1.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.4-r1.ebuild
deleted file mode 100644
index f330af3c97a..00000000000
--- a/sys-fs/squashfs-tools/squashfs-tools-4.4-r1.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="tools to create and extract Squashfs filesystems"
-HOMEPAGE="https://github.com/plougher/squashfs-tools"
-SRC_URI="https://github.com/plougher/squashfs-tools/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
-IUSE="debug lz4 lzma lzo xattr zstd"
-
-RDEPEND="
- sys-libs/zlib
- lz4? ( app-arch/lz4 )
- lzma? ( app-arch/xz-utils )
- lzo? ( dev-libs/lzo )
- xattr? ( sys-apps/attr )
- zstd? ( app-arch/zstd )
-"
-DEPEND=${RDEPEND}
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.4-fno-common.patch
-)
-
-use10() { usex "${1}" 1 0; }
-
-src_configure() {
- # set up make command line variables in EMAKE_SQUASHFS_CONF
- EMAKE_SQUASHFS_CONF=(
- LZMA_XZ_SUPPORT=$(use10 lzma)
- LZO_SUPPORT=$(use10 lzo)
- LZ4_SUPPORT=$(use10 lz4)
- XATTR_SUPPORT=$(use10 xattr)
- XZ_SUPPORT=$(use10 lzma)
- ZSTD_SUPPORT=$(use10 zstd)
- )
-
- tc-export CC
- use debug && append-cppflags -DSQUASHFS_TRACE
-}
-
-src_compile() {
- emake "${EMAKE_SQUASHFS_CONF[@]}" -C squashfs-tools
-}
-
-src_install() {
- dobin squashfs-tools/{mksquashfs,unsquashfs}
- dodoc ACKNOWLEDGEMENTS CHANGES README*
- dodoc -r RELEASE-READMEs
-}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
deleted file mode 100644
index 26923c4c78e..00000000000
--- a/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit flag-o-matic toolchain-funcs
-
-DESCRIPTION="tools to create and extract Squashfs filesystems"
-HOMEPAGE="https://github.com/plougher/squashfs-tools"
-SRC_URI="https://github.com/plougher/squashfs-tools/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
-IUSE="debug lz4 lzma lzo static xattr +xz zstd"
-
-LIB_DEPEND="
- sys-libs/zlib[static-libs(+)]
- !xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
- lz4? ( app-arch/lz4[static-libs(+)] )
- lzma? ( app-arch/xz-utils[static-libs(+)] )
- lzo? ( dev-libs/lzo[static-libs(+)] )
- xattr? ( sys-apps/attr[static-libs(+)] )
- xz? ( app-arch/xz-utils[static-libs(+)] )
- zstd? ( app-arch/zstd[static-libs(+)] )
-"
-RDEPEND="
- !static? ( ${LIB_DEPEND//\[static-libs(+)]} )
-"
-DEPEND="
- ${RDEPEND}
- static? ( ${LIB_DEPEND} )
-"
-PATCHES=(
- "${FILESDIR}"/${PN}-4.4-fno-common.patch
-)
-
-use10() { usex $1 1 0 ; }
-
-src_configure() {
- # restore GNU89 inline semantics to
- # emit function symbols, bug 595290
- append-cflags -std=gnu89
-
- # set up make command line variables in EMAKE_SQUASHFS_CONF
- EMAKE_SQUASHFS_CONF=(
- LZMA_XZ_SUPPORT=$(use10 lzma)
- LZO_SUPPORT=$(use10 lzo)
- LZ4_SUPPORT=$(use10 lz4)
- XATTR_SUPPORT=$(use10 xattr)
- XZ_SUPPORT=$(use10 xz)
- ZSTD_SUPPORT=$(use10 zstd)
- )
-
- tc-export CC
- use debug && append-cppflags -DSQUASHFS_TRACE
- use static && append-ldflags -static
-}
-
-src_compile() {
- emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
-}
-
-src_install() {
- dobin ${PN}/{mksquashfs,unsquashfs}
- dodoc ACKNOWLEDGEMENTS CHANGES README*
- dodoc -r RELEASE-READMEs
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/squashfs-tools/, sys-fs/squashfs-tools/files/
@ 2020-01-27 12:00 Jeroen Roovers
0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-01-27 12:00 UTC (permalink / raw
To: gentoo-commits
commit: a9a132b4df2d619e92909da7ce4701c0e227dcd6
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 27 11:51:05 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Mon Jan 27 12:00:11 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9a132b4
sys-fs/squashfs-tools: Fix CFLAGS=-fno-common
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/706456
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../squashfs-tools/files/squashfs-tools-4.4-fno-common.patch | 11 +++++++++++
sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild | 11 ++++++-----
sys-fs/squashfs-tools/squashfs-tools-9999.ebuild | 9 ++++-----
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch
new file mode 100644
index 00000000000..dfbf42abb34
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/squashfs-tools/mksquashfs.h
++++ b/squashfs-tools/mksquashfs.h
+@@ -143,7 +143,7 @@ struct append_file {
+ #endif
+
+ extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
+-struct cache *bwriter_buffer, *fwriter_buffer;
++extern struct cache *bwriter_buffer, *fwriter_buffer;
+ extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
+ *to_frag, *locked_fragment, *to_process_frag;
+ extern struct append_file **file_mapping;
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
index ae823c3e197..fcc3ce5bf79 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -30,7 +30,9 @@ DEPEND="
${RDEPEND}
static? ( ${LIB_DEPEND} )
"
-S=${WORKDIR}/${P}/${PN}
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.4-fno-common.patch
+)
use10() { usex $1 1 0 ; }
@@ -55,12 +57,11 @@ src_configure() {
}
src_compile() {
- emake "${EMAKE_SQUASHFS_CONF[@]}"
+ emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
}
src_install() {
- dobin mksquashfs unsquashfs
- cd ..
+ dobin ${PN}/{mksquashfs,unsquashfs}
dodoc ACKNOWLEDGEMENTS CHANGES README*
dodoc -r RELEASE-READMEs
}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-9999.ebuild b/sys-fs/squashfs-tools/squashfs-tools-9999.ebuild
index 56e2a3332c0..c5bf886e776 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-9999.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -34,12 +34,12 @@ DEPEND="
"
PATCHES=(
"${FILESDIR}"/${PN}-4.3-sysmacros.patch
+ "${FILESDIR}"/${PN}-4.4-fno-common.patch
)
use10() { usex $1 1 0 ; }
src_configure() {
- cd "${WORKDIR}"/${P}/${PN} || die
# set up make command line variables in EMAKE_SQUASHFS_CONF
EMAKE_SQUASHFS_CONF=(
@@ -57,11 +57,10 @@ src_configure() {
}
src_compile() {
- cd "${WORKDIR}"/${P}/${PN} || die
- emake "${EMAKE_SQUASHFS_CONF[@]}"
+ emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
}
src_install() {
- dobin "${WORKDIR}"/${P}/${PN}/{mksquashfs,unsquashfs}
+ dobin ${PN}/{mksquashfs,unsquashfs}
dodoc CHANGES README RELEASE-READMEs/*
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/squashfs-tools/, sys-fs/squashfs-tools/files/
@ 2016-06-17 15:08 Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2016-06-17 15:08 UTC (permalink / raw
To: gentoo-commits
commit: 10ca2cce4bb831646697d5308fed2bbee33a9f0f
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 17 15:07:20 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Jun 17 15:08:09 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10ca2cce
sys-fs/squashfs-tools: add a few more various fixes
.../files/squashfs-tools-4.3-2gb.patch | 30 ++++++++++
.../files/squashfs-tools-4.3-local-cve-fix.patch | 19 ++++++
.../files/squashfs-tools-4.3-mem-overflow.patch | 35 +++++++++++
.../files/squashfs-tools-4.3-xattrs.patch | 34 +++++++++++
sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild | 67 ++++++++++++++++++++++
5 files changed, 185 insertions(+)
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-2gb.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-2gb.patch
new file mode 100644
index 0000000..467448f
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-2gb.patch
@@ -0,0 +1,30 @@
+From 9c1db6d13a51a2e009f0027ef336ce03624eac0d Mon Sep 17 00:00:00 2001
+From: "Guan, Xin" <guanx.bac@gmail.com>
+Date: Sat, 13 Sep 2014 13:15:26 +0200
+Subject: [PATCH] Fix 2GB-limit of the is_fragment(...) function.
+
+Applies to squashfs-tools 4.3.
+
+Reported-by: Bruno Wolff III <bruno@wolff.to>
+Signed-off-by: Guan, Xin <guanx.bac@gmail.com>
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/mksquashfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index f1fcff1cc284..d221c35865a0 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -2029,7 +2029,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
+
+ inline int is_fragment(struct inode_info *inode)
+ {
+- int file_size = inode->buf.st_size;
++ off_t file_size = inode->buf.st_size;
+
+ /*
+ * If this block is to be compressed differently to the
+--
+2.8.2
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-local-cve-fix.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-local-cve-fix.patch
new file mode 100644
index 0000000..7637f67
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-local-cve-fix.patch
@@ -0,0 +1,19 @@
+taken from Fedora
+
+commit af393379e34c5677f95bbec11645b6c3028195b4
+Author: Bruno Wolff III <bruno@wolff.to>
+Date: Wed Jun 24 14:27:31 2015 -0500
+
+Update printf formats to match datatypes after CVE patch
+
+--- squashfs-tools/unsquash-4.c
++++ squashfs-tools/unsquash-4.c
+@@ -35,7 +35,7 @@
+ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
+ long long *fragment_table_index;
+
+- TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
++ TRACE("read_fragment_table: %u fragments, reading %zu fragment indexes "
+ "from 0x%llx\n", sBlk.s.fragments, indexes,
+ sBlk.s.fragment_table_start);
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-mem-overflow.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-mem-overflow.patch
new file mode 100644
index 0000000..a9b0001
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-mem-overflow.patch
@@ -0,0 +1,35 @@
+taken from Fedora
+
+From 604b607d8ac91eb8afc0b6e3d917d5c073096103 Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Wed, 11 Jun 2014 04:51:37 +0100
+Subject: mksquashfs: ensure value does not overflow a signed int in -mem
+ option
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index 5370ecf..9676dc8 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -5193,7 +5193,16 @@ print_compressor_options:
+ argv[0]);
+ exit(1);
+ }
+- /* convert from bytes to Mbytes */
++
++ /*
++ * convert from bytes to Mbytes, ensuring the value
++ * does not overflow a signed int
++ */
++ if(number >= (1LL << 51)) {
++ ERROR("%s: -mem invalid mem size\n", argv[0]);
++ exit(1);
++ }
++
+ total_mem = number / 1048576;
+ if(total_mem < (SQUASHFS_LOWMEM / SQUASHFS_TAKE)) {
+ ERROR("%s: -mem should be %d Mbytes or "
+--
+cgit v0.10.1
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-xattrs.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-xattrs.patch
new file mode 100644
index 0000000..47b0ea5
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-xattrs.patch
@@ -0,0 +1,34 @@
+From ffe9e55c4993422ce36213fa86d4fc29c22646ea Mon Sep 17 00:00:00 2001
+From: Wessel Dankers <wsl-debian-804194@fruit.je>
+Date: Fri, 17 Jun 2016 09:46:42 +0800
+Subject: [PATCH] unsquashfs: Correctly set file capabilities
+
+As posted on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804194.
+---
+ squashfs-tools/unsquashfs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 1323dd6..a5f0117 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -821,8 +821,6 @@ int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
+ {
+ struct utimbuf times = { time, time };
+
+- write_xattr(pathname, xattr);
+-
+ if(utime(pathname, ×) == -1) {
+ ERROR("set_attributes: failed to set time on %s, because %s\n",
+ pathname, strerror(errno));
+@@ -845,6 +843,8 @@ int set_attributes(char *pathname, int mode, uid_t uid, gid_t guid, time_t time,
+ return FALSE;
+ }
+
++ write_xattr(pathname, xattr);
++
+ return TRUE;
+ }
+
+--
+2.8.0.rc3.226.g39d4020
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
new file mode 100644
index 0000000..74247ab
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DEB_VER="3"
+
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${PV}.tar.gz
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}-${DEB_VER}.debian.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="lz4 lzma lzo xattr +xz"
+
+RDEPEND="
+ sys-libs/zlib
+ !xz? ( !lzo? ( sys-libs/zlib ) )
+ lz4? ( app-arch/lz4 )
+ lzma? ( app-arch/xz-utils )
+ lzo? ( dev-libs/lzo )
+ xattr? ( sys-apps/attr )
+ xz? ( app-arch/xz-utils )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/squashfs${PV}/${PN}"
+
+src_prepare() {
+ epatch "${WORKDIR}"/debian/patches/*.patch
+ epatch "${FILESDIR}"/${P}-sysmacros.patch
+ epatch "${FILESDIR}"/${P}-aligned-data.patch
+ epatch "${FILESDIR}"/${P}-2gb.patch
+ epatch "${FILESDIR}"/${P}-local-cve-fix.patch
+ epatch "${FILESDIR}"/${P}-mem-overflow.patch
+ epatch "${FILESDIR}"/${P}-xattrs.patch
+}
+
+use10() { usex $1 1 0 ; }
+
+src_configure() {
+ # set up make command line variables in EMAKE_SQUASHFS_CONF
+ EMAKE_SQUASHFS_CONF=(
+ LZMA_XZ_SUPPORT=$(use10 lzma)
+ LZO_SUPPORT=$(use10 lzo)
+ LZ4_SUPPORT=$(use10 lz4)
+ XATTR_SUPPORT=$(use10 xattr)
+ XZ_SUPPORT=$(use10 xz)
+ )
+
+ tc-export CC
+}
+
+src_compile() {
+ emake "${EMAKE_SQUASHFS_CONF[@]}"
+}
+
+src_install() {
+ dobin mksquashfs unsquashfs
+ cd ..
+ dodoc CHANGES PERFORMANCE.README pseudo-file.example README* OLD-READMEs/*
+ doman "${WORKDIR}"/debian/manpages/*.[0-9]
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-20 20:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-03 21:45 [gentoo-commits] repo/gentoo:master commit in: sys-fs/squashfs-tools/, sys-fs/squashfs-tools/files/ Robin H. Johnson
-- strict thread matches above, loose matches on Subject: below --
2020-12-20 20:34 Michał Górny
2020-01-27 12:00 Jeroen Roovers
2016-06-17 15:08 Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox