Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207737 - sys-fs/squashfs-tools - add lzma support
Summary: sys-fs/squashfs-tools - add lzma support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-27 19:22 UTC by Russell Harmon
Modified: 2010-09-20 02:53 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
squashfs-tools-3.3.ebuild (squashfs-tools-3.3.ebuild,2.32 KB, text/plain)
2008-01-27 19:22 UTC, Russell Harmon
Details
squashfs-tools-3.3-sqlzma1-449.patch (squashfs-tools-3.3-sqlzma1-449.patch,19.36 KB, text/plain)
2008-01-27 19:23 UTC, Russell Harmon
Details
squashfs-tools-3.3-sqlzma2u.patch (squashfs-tools-3.3-sqlzma2u.patch,25.67 KB, patch)
2008-01-27 19:23 UTC, Russell Harmon
Details | Diff
squashfs-tools-progress-stderr.patch (squashfs-tools-progress-stderr.patch,582 bytes, patch)
2008-01-27 19:27 UTC, Russell Harmon
Details | Diff
squashfs-tools-progress-stderr-lzma.patch (squashfs-tools-progress-stderr-lzma.patch,671 bytes, patch)
2008-01-27 19:28 UTC, Russell Harmon
Details | Diff
squashfs-tools-3.3-r3.ebuild (squashfs-tools-3.3-r3.ebuild,2.41 KB, text/plain)
2008-04-07 17:12 UTC, dnjl
Details
ebuild based on -r3 and ldflags (--as-needed) filter added (squashfs-tools-3.3-r4.ebuild,2.49 KB, text/plain)
2008-11-15 16:50 UTC, Robert A.
Details
patch to gentoo kernel 2.6.25-r8 for squashfs lzma support (2.6.25-gentoo-r8-lzma.patch,46.29 KB, patch)
2008-11-15 18:53 UTC, Robert A.
Details | Diff
use append-ldflags instead of filter-ldflags and use kernel version detection instead of warning (squashfs-tools-3.3-r4.ebuild,2.52 KB, text/plain)
2008-11-15 21:26 UTC, Robert A.
Details
an ebuild for the latest squashfs lzma (3.4). (squashfs-lzma-tools-3.4.ebuild,2.04 KB, text/plain)
2009-07-01 21:36 UTC, jpike
Details
squashfs-tools-4.0.ebuild.diff (squashfs-tools-4.0.ebuild.diff,1.15 KB, patch)
2009-12-08 15:02 UTC, Jonathan-Christofer Demay
Details | Diff
sys-fs/squashfs-tools/files/squashfs-tools-4.0-lzma.patch (squashfs-tools-4.0-lzma.patch,66.37 KB, patch)
2009-12-08 15:03 UTC, Jonathan-Christofer Demay
Details | Diff
linux-2.6.32-squashfs_lzma_patches.tar.bz2 (squashfs-lzma-linux-2.6.32-kernel-patches.tar.bz2,9.22 KB, text/plain)
2009-12-08 15:04 UTC, Jonathan-Christofer Demay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Russell Harmon 2008-01-27 19:22:04 UTC
I added a lzma use flag to squashfs-tools to enable support for sqlzma patched squashfs filesystems.

sqlzma homepage: http://www.squashfs-lzma.org/

Reproducible: Always

Steps to Reproduce:
Comment 1 Russell Harmon 2008-01-27 19:22:44 UTC
Created attachment 141916 [details]
squashfs-tools-3.3.ebuild
Comment 2 Russell Harmon 2008-01-27 19:23:10 UTC
Created attachment 141918 [details]
squashfs-tools-3.3-sqlzma1-449.patch
Comment 3 Russell Harmon 2008-01-27 19:23:32 UTC
Created attachment 141919 [details, diff]
squashfs-tools-3.3-sqlzma2u.patch
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2008-01-27 19:26:49 UTC
Uh, this is *huge*. Please, send such patches upstream and not to Gentoo; not maintainable in a reasonable way.

Thanks.
Comment 5 Russell Harmon 2008-01-27 19:27:41 UTC
Created attachment 141920 [details, diff]
squashfs-tools-progress-stderr.patch
Comment 6 Russell Harmon 2008-01-27 19:28:10 UTC
Created attachment 141922 [details, diff]
squashfs-tools-progress-stderr-lzma.patch
Comment 7 Russell Harmon 2008-01-27 19:29:59 UTC
The patches will not be merged upstream because the author of squashfs is trying to get it into the kernel, and since lzma is not in the kernel, it will not be merged until lzma gets there. It's all detailed on the squashfs-lzma homepage.
Comment 8 Vlad 2008-02-12 09:25:55 UTC
Would it be possible to make an ebuild with kernel modules?
P.S. I'm compiling everything manually at the moment, but recently found this bug.
Comment 9 dnjl 2008-04-07 17:12:52 UTC
Created attachment 149004 [details]
squashfs-tools-3.3-r3.ebuild

I have found a ebuild in forum (http://forums.gentoo.org/viewtopic-t-599543.html) and reworked this in some details:
- added and made use of lzma use-flag 
- modified description, homepage and license 
- added cvs-patches 
- updated lzma 
- cleaned up, amongst others the version-handling
Comment 10 dnjl 2008-04-07 17:15:47 UTC
(In reply to comment #9)

btw, it doesnt use any patches in FILESDIR
Comment 11 Andrew Gaffney (RETIRED) gentoo-dev 2008-04-07 17:52:32 UTC
If the lzma support for squashfs isn't in the kernel, then how is this useful at all? We're not going to patch the kernel to support it
Comment 12 Russell Harmon 2008-04-07 20:06:19 UTC
This is useful to those who run a patched kernel. It should probaby be in an overlay. Unfortunatley, it can't go in sunrise.
Comment 13 Andrew Gaffney (RETIRED) gentoo-dev 2008-04-09 12:59:36 UTC
I don't think there's any interest in supporting a patchset for squashfs that's only useful for people who are running a hand-patched kernel.
Comment 14 JenFunca 2008-04-19 17:00:00 UTC
I use Gentoo at my workstation and i want to change OpenWrt image for my router. This image packed by squashfs-lzma and i need in "mksquashfs" and "undquashfs" utilities from squashfs-tools with lzma support. These do require patched squashfs-tools. These do not require patched gentoo kernel... Sorry for my silly english.
Comment 15 Chris Gianelloni (RETIRED) gentoo-dev 2008-04-21 20:19:57 UTC
Well, looking at how much this improves the compression over the normal gzip-based squashfs, it might be worth looking into.
Comment 16 Roman Zimmermann 2008-04-25 09:03:21 UTC
I thought it may be worth mentioning that the build fails with "-Wl --as-needed" (using squashfs-tools-3.3-r3):

x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu  unsquashfs.o  -lz -L/home/paludis/tmp/sys-fs-squashfs-tools-3.3-r3/work/lzma457/CPP/7zip/Compress/LZMA_Alone -L/home/paludis/tmp/sys-fs-squashfs-tools-3.3-r3/work/lzma457/C/Compress/Lzma -lunlzma -o unsquashfs
/home/paludis/tmp/sys-fs-squashfs-tools-3.3-r3/work/lzma457/C/Compress/Lzma/libunlzma.a(uncomp.o): In function `sqlzma_init':
uncomp.c:(.text+0xb9): undefined reference to `inflateInit_'
/home/paludis/tmp/sys-fs-squashfs-tools-3.3-r3/work/lzma457/C/Compress/Lzma/libunlzma.a(uncomp.o): In function `sqlzma_un':
uncomp.c:(.text+0x260): undefined reference to `inflateReset'
uncomp.c:(.text+0x2a0): undefined reference to `inflate'
uncomp.c:(.text+0x308): undefined reference to `zError'
collect2: ld returned 1 exit status
make[1]: *** [unsquashfs] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/paludis/tmp/sys-fs-squashfs-tools-3.3-r3/work/squashfs3.3/squashfs-tools'
make: *** [all] Error 2
Comment 17 Russell Harmon 2008-04-25 09:31:31 UTC
That could be just blocked, but if you want that fixed, you should file a bug upstream.
Comment 18 Chris Gianelloni (RETIRED) gentoo-dev 2008-06-28 07:31:23 UTC
I'm going to mark this as LATER since it appears that the LZMA API isn't stable yet and I'd prefer not have to play catch-up to keep this patched.  Once some of the issues with LZMA have been resolved, I see no problem adding this support.
Comment 19 Robert A. 2008-11-15 16:50:51 UTC
Created attachment 171877 [details]
ebuild based on -r3 and ldflags (--as-needed) filter added

i will update this ebuild in my overlay @ http://code.google.com/p/ra-gentoo-overlay/source/browse/trunk/sys-fs/squashfs-tools
Comment 20 Russell Harmon 2008-11-15 17:08:32 UTC
(In reply to comment #19)
> Created an attachment (id=171877) [edit]
> ebuild based on -r3 and ldflags (--as-needed) filter added
> 
> i will update this ebuild in my overlay @
> http://code.google.com/p/ra-gentoo-overlay/source/browse/trunk/sys-fs/squashfs-tools
> 

It's been awhile... has the LZMA API stabilized? If so, i'll reopen the bug.
Comment 21 Robert A. 2008-11-15 17:43:25 UTC
(In reply to comment #20)
> It's been awhile... has the LZMA API stabilized? If so, i'll reopen the bug.

I have no clue how stable the lzma api is.. it seems there were no changes to the files released on squashfs-lzma.org for about a year.
Comment 22 Russell Harmon 2008-11-15 17:56:48 UTC
The API seems to have stabilized.
Comment 23 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-15 18:04:28 UTC
If you guys can get the squashfs-lzma patches included in the gentoo-sources patchset, we'll apply these patches. Until then, it doesn't make any sense. Go talk to the kernel guys.
Comment 24 Robert A. 2008-11-15 18:53:10 UTC
Created attachment 171897 [details, diff]
patch to gentoo kernel 2.6.25-r8 for squashfs lzma support

could be optimised, but works for me.
Comment 25 Robert A. 2008-11-15 18:56:51 UTC
(In reply to comment #23)
> If you guys can get the squashfs-lzma patches included in the gentoo-sources
> patchset, we'll apply these patches. Until then, it doesn't make any sense. Go
> talk to the kernel guys.

I attached a patch for gentoo 2.6.25-r8 kernel. If the kernel team does want to include it I could clean it up a little bit before.

Can you cc the kernel team?
Comment 26 Russell Harmon 2008-11-15 20:17:48 UTC
The way you filter the ldflags is incorrect. You can't actually filter it because you can't filter every possible combination of flags. For example, I have LDFLAGS="-Wl,-O1,--as-needed"... which your filter would not catch. The correct way to filter it can be seen here http://github.com/eatnumber1/pcsx2-overlay/tree/master/games-emulation/ps2emu-zerogs/ps2emu-zerogs-9999.ebuild

from the ebuild linked to:
append-ldflags -Wl,--no-as-needed
Comment 27 Andrew Gaffney (RETIRED) gentoo-dev 2008-11-15 21:11:50 UTC
CCing kernel team for possible inclusion of squashfs lzma support in genpatches.
Comment 28 Robert A. 2008-11-15 21:15:03 UTC
(In reply to comment #26)
> For example, I
> have LDFLAGS="-Wl,-O1,--as-needed"... which your filter would not catch.

thanks for the feedback. i'll update the ebuild.
Comment 29 Robert A. 2008-11-15 21:26:06 UTC
Created attachment 171910 [details]
use append-ldflags instead of filter-ldflags and use kernel version detection instead of warning
Comment 30 jpike 2009-07-01 21:33:21 UTC
I'm attaching an ebuild for squashfs-lzma 3.4.

I've renamed the utilities to {mk,un}squashfs-lzma, and the ebuild to squashfs-lzma-tools so that it may be installed concurrently alongside squashfs mainline which is on version 4 now.

Thanks
Comment 31 jpike 2009-07-01 21:36:16 UTC
Created attachment 196292 [details]
an ebuild for the latest squashfs lzma (3.4).

I'd also like to point out that it's a mistake in the current squashfs-tools ebuild to insist on certain kernel versions. mksquashfs and unsquashfs, do not require kernel patches, they operate in user space on any kernel.
Comment 32 Jonathan-Christofer Demay 2009-12-08 15:02:14 UTC
Created attachment 212452 [details, diff]
squashfs-tools-4.0.ebuild.diff
Comment 33 Jonathan-Christofer Demay 2009-12-08 15:03:18 UTC
Created attachment 212454 [details, diff]
sys-fs/squashfs-tools/files/squashfs-tools-4.0-lzma.patch
Comment 34 Jonathan-Christofer Demay 2009-12-08 15:04:39 UTC
Created attachment 212455 [details]
linux-2.6.32-squashfs_lzma_patches.tar.bz2
Comment 35 Piotr 2010-04-08 19:43:45 UTC
With kernel zen-sources-2.6.33_rc7_p1 and these patches you should look at page:
http://forum.soft32.com/linux/linux-origin-tree-build-failure-ftopict504118.html
Comment 36 SpanKY gentoo-dev 2010-09-20 02:53:51 UTC
squashfs-tools-4.1 includes lzma support from upstream