Fix squashing 2GB+ files

This fix came from the squashfs-devel list, authored by Guan Xin
This commit is contained in:
Bruno Wolff III 2014-09-13 11:15:29 -05:00
parent 9611b9a4bd
commit e0903265bd
2 changed files with 19 additions and 1 deletions

11
2gb.patch Normal file
View File

@ -0,0 +1,11 @@
--- squashfs-tools/mksquashfs.c.orig 2014-09-13 11:08:27.352318167 -0500
+++ squashfs-tools/mksquashfs.c 2014-09-13 11:09:36.701132044 -0500
@@ -2055,7 +2055,7 @@
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

View File

@ -1,7 +1,7 @@
Summary: Utility for the creation of squashfs filesystems
Name: squashfs-tools
Version: 4.3
Release: 7%{?dist}
Release: 8%{?dist}
License: GPLv2+
Group: System Environment/Base
URL: http://squashfs.sourceforge.net/
@ -16,6 +16,9 @@ Patch0: PAE.patch
# From master branch (604b607d8ac91eb8afc0b6e3d917d5c073096103).
# Prevent overflows when using the -mem option.
Patch1: mem-overflow.patch
# From squashfs-devel@lists.sourceforge.net by Guan Xin <guanx.bac@gmail.com>
# For https://bugzilla.redhat.com/show_bug.cgi?id=1141206
PAtch2: 2gb.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel
BuildRequires: xz-devel
@ -31,6 +34,7 @@ contains the utilities for manipulating squashfs filesystems.
%setup -q -n squashfs%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
pushd squashfs-tools
@ -57,6 +61,9 @@ rm -rf %{buildroot}
%{_sbindir}/unsquashfs
%changelog
* Sat Sep 13 2014 Bruno Wolff III <bruno@wolff.to> 4.3-8
- Fix for files >= 2gb rhbz #1141206
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild