From 1e4afd7c93b866647065f7c85fa5fb24595bba0d Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Aug 16 2006 14:59:13 +0000 Subject: - add upstream patch for fragment size problem (#202663) --- diff --git a/squashfs-fragmentsize.patch b/squashfs-fragmentsize.patch new file mode 100644 index 0000000..79fa6ea --- /dev/null +++ b/squashfs-fragmentsize.patch @@ -0,0 +1,11 @@ +--- squashfs3.0/squashfs-tools/mksquashfs.c.fragment 2006-08-16 10:56:00.000000000 -0400 ++++ squashfs3.0/squashfs-tools/mksquashfs.c 2006-08-16 10:56:46.000000000 -0400 +@@ -985,7 +985,7 @@ + } + + for(i = 0; i < meta_blocks; i++) { +- int avail_bytes = i == meta_blocks - 1 ? frag_bytes % SQUASHFS_METADATA_SIZE : SQUASHFS_METADATA_SIZE; ++ int avail_bytes = i == meta_blocks - 1 ? frag_bytes - i % SQUASHFS_METADATA_SIZE : SQUASHFS_METADATA_SIZE; + c_byte = mangle(cbuffer + block_offset, buffer + i * SQUASHFS_METADATA_SIZE , avail_bytes, SQUASHFS_METADATA_SIZE, noF, 0); + if(!swap) + memcpy(cbuffer, &c_byte, sizeof(unsigned short)); diff --git a/squashfs-tools.spec b/squashfs-tools.spec index ba3db78..9c354e2 100644 --- a/squashfs-tools.spec +++ b/squashfs-tools.spec @@ -1,12 +1,14 @@ Summary: squashfs utilities Name: squashfs-tools Version: 3.0 -Release: 1.1 +Release: 2 License: GPL Group: System Environment/Base URL: http://squashfs.sf.net Source0: squashfs3.0.tar.gz Patch0: squashfs-cflags.patch +#http://sourceforge.net/mailarchive/forum.php?thread_id=11544292&forum_id=39601 +Patch1: squahsfs-fragmentsize.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: zlib-devel @@ -17,6 +19,7 @@ contains the utilities for manipulating squashfs filesystems. %prep %setup -q -n squashfs3.0 %patch0 -p1 -b .cflags +%patch1 -p1 -b .fragment %build pushd squashfs-tools @@ -39,6 +42,9 @@ rm -rf $RPM_BUILD_ROOT /usr/sbin/unsquashfs %changelog +* Wed Aug 16 2006 Jeremy Katz - 3.0-2 +- add upstream patch for fragment size problem (#202663) + * Wed Jul 12 2006 Jesse Keating - 3.0-1.1 - rebuild