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:
Created attachment 141916 [details] squashfs-tools-3.3.ebuild
Created attachment 141918 [details] squashfs-tools-3.3-sqlzma1-449.patch
Created attachment 141919 [details, diff] squashfs-tools-3.3-sqlzma2u.patch
Uh, this is *huge*. Please, send such patches upstream and not to Gentoo; not maintainable in a reasonable way. Thanks.
Created attachment 141920 [details, diff] squashfs-tools-progress-stderr.patch
Created attachment 141922 [details, diff] squashfs-tools-progress-stderr-lzma.patch
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.
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.
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
(In reply to comment #9) btw, it doesnt use any patches in FILESDIR
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
This is useful to those who run a patched kernel. It should probaby be in an overlay. Unfortunatley, it can't go in sunrise.
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.
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.
Well, looking at how much this improves the compression over the normal gzip-based squashfs, it might be worth looking into.
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
That could be just blocked, but if you want that fixed, you should file a bug upstream.
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.
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
(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.
(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.
The API seems to have stabilized.
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.
Created attachment 171897 [details, diff] patch to gentoo kernel 2.6.25-r8 for squashfs lzma support could be optimised, but works for me.
(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?
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
CCing kernel team for possible inclusion of squashfs lzma support in genpatches.
(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.
Created attachment 171910 [details] use append-ldflags instead of filter-ldflags and use kernel version detection instead of warning
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
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.
Created attachment 212452 [details, diff] squashfs-tools-4.0.ebuild.diff
Created attachment 212454 [details, diff] sys-fs/squashfs-tools/files/squashfs-tools-4.0-lzma.patch
Created attachment 212455 [details] linux-2.6.32-squashfs_lzma_patches.tar.bz2
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
squashfs-tools-4.1 includes lzma support from upstream