Hacker News new | past | comments | ask | show | jobs | submit login
Squashfs turning 20, Squashfs tools 4.5 released (sourceforge.net)
69 points by st_goliath on July 24, 2021 | hide | past | favorite | 14 comments



I see some features from squashfs-tools-ng like cpio style list of entries. Are those projects being merged or are they a totally separate effort?


Unlikely. Squashfs-tools-ng is not a fork but written from scratch after reverse engineering the format.

I started it in early 2019 after being annoyed with various shortcomings in squashfs-tools and after trying to make sense out of the spaghetti source code to not only fix problems I ran into, but also add features I needed for a particular project.

I saw the complete lack of activity on the official website and official git tree, from which I concluded it was pretty much dead. Of course I wanted to ask on the mailing list first (also pretty dead), but then I saw a thread from early 2018 talking about a release. Since the thread got a response that I interpreted as rather angry[1] and the release didn't happen a year later either, I concluded that the project is pretty much dead and decided to publish my own efforts and for lack of a better name simply named it "*-ng". Other people seemed to have drawn similar conclusions[2][3].

We all later found out that the squashfs-tools git tree was simply moved to GitHub (without updating the kernel docs or "official" website to indicate this). But even there, activity fixing bugs only picked up after I already made 3 or 4 releases and announced them on the squashfs mailing list. At which point I finally got a response in the form of a few somewhat unfriendly words[5][6][7] (IMO to some extent understandable, but still...).

But after that, squashfs-tools version 4.4 fixed a bunch of issues that I publicly complained about and this release got apparently quite busy copying features that I found useful (and set squashfs-tools-ng apart, e.g. converting tarballs directly).

Given the distinct source trees and, lets call it "competitive nature", I'd say a merge is unlikely and I will continue maintaining my package. I wrote it to solve some specific problems I had and it IMO does that job quite well. It's nice if other people find it useful and I'm also proud to have ended up indirectly contributing to the official squashfs-tools development by providing new motivation :-).

[1] https://sourceforge.net/p/squashfs/mailman/message/36298345/

[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931965

[3] https://news.ycombinator.com/item?id=20518019

[4] https://lkml.org/lkml/2019/8/1/1154

[5] https://github.com/AgentD/squashfs-tools-ng/issues/10

[6] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931965#29

[7] https://lkml.org/lkml/2019/8/1/565


Honestly I think you could be a little more respectful of the project that inspired yours. I'd be angry too if someone reworked a project of mine with a similar name and made direct statements about my project (true or not) to try and sway people to your project. And you plagiarized part of his readme. Definitely understandable.

And here you're still saying negative things, like pointing out shortcomings (that you don't describe) and calling it spaghetti code (which isn't immediately verifiable). Maybe he wouldn't be so angry at you if you didn't do these things.


> Honestly I think you could be a little more respectful of the project that inspired yours.

Forking a poorly maintained project is the foremost kind of respect in the FLOSS community. Way too much useful code ends up bitrotting beyond recovery simply because of not enough people being willing to put in the challenging work involved in rescuing it.

Note that there's absolutely no blame involved in describing a project as "poorly maintained" by commonly accepted standards. (In this case, the original author themselves describes suffering from severe burnout and other challenging circumstances which took a serious toll on their willingness to work on that codebase. So their situation is understandable indeed! Good FLOSS stewardship relies on other people being willing to step up promptly when these situations arise, regardless of the underlying causes.)


Is it plagiarism if the license of the original source allows such copying and the author complied with the license?

Isn't this outcome an expected one in which source code is made available to the public?


plagiarism is about a mix of ethics, etiquette and respect.

"comply with the license" is the minimal legal requirement.

They are related, but it is not the same.


I bet a lot of these statements were made in the same spirit with which we've all gone through someone else's years-old code: "What the heck is this even trying to do? Who wrote this stuff?" We say that, even though we know full well that we've written stuff just as bad, and that there's a script we wrote and are dreading someday having to maintain. It's a long way from that to "libel" and "defamation", the accusations the originator of squashfs was throwing around. I'd say that he was far more out of line than the new toolset's author.


> Honestly I think you could be a little more respectful of the project that inspired yours.

I actually am. I had a lot of great "Huh? That's clever!" moments while reverse engineering the format and formed a mental image of a clearly brilliant programmer who managed to squeeze the last bits out of some data structures using really clever tricks that I myself probably wouldn't have come up with. During that time I gained a lot of respect for the project and the author.

Also, please don't forget: the whole project is the filesystem, the tools are just a part of that. I care about this project, which is why I decided to start this effort in the first place. Which I explicitly did not advertise as a replacement, but an augmentation (see [2]).

> I'd be angry too ... Definitely understandable.

Yes, I agree! And I can understand why in the heat of the moment you might write something angry and threatening. But certainly not if you've had a few weeks time to calm down and think things over. Still publicly spewing vitriol at this point will certainly make me loose some of that respect again.

> And you plagiarized part of his readme.

https://github.com/plougher/squashfs-tools/blob/master/RELEA...

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

https://github.com/AgentD/squashfs-tools-ng/blob/master/READ...

Oh yes? Which part?

> ... calling it spaghetti code (which isn't immediately verifiable)

Here you go, have fun: https://github.com/plougher/squashfs-tools/blob/master/squas...

However, I cannot blame anyone here, I totally get how those things happen and have witnessed it myself in action:

You write a simple tool supporting a larger project. It's written by the seat of your pants without much planning, since it's not big and does one simple job. Then it gets used in production, eventually requirements change, other people pile on patches, but try to keep the diff small, so it's reviewable. It keeps growing and growing, getting more and more complex, but receives maybe a little less care than the actual project it supports. Nobody bothers to overhaul it or write documentation because, hey, it works, and any large changes might risk breaking things.

Even if nobody is to blame for it, the end result is still the same: an undocumented mess that is hard to wrap your head around if you aren't the original author, who is the only one with the bigger picture.

I tried for roughly a week to pull the code (there are some more files than this and some of the inter dependencies are nasty) apart into stacked utility libraries and a pure command line parsing front end, with the hopes to maybe get this upstream once it is done. I gave up and decided that at this point I understood enough about the format to start afresh and not touch what I believed to be unmaintained anyway.


st_goliath improved a widely used project. What did you do to earn the right to criticize?


Nice that squashfs is alive.

I tried to use it in a project about 4-5 years ago. It turned out that read performance was much worse than from ext4. Ext4 was able to submit block reads in big units. Squashfs submitted many times more tiny requests to the block layer. The git log looked like the code had been abandoned. Has that changed, too? The release mentioned here is user space, not kernel.


The Linux kernel squashfs code had 17 commits in 2021 & 2020:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...


And this one in particular says decreases boot time by ~40%

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...


I’ve always been curious what the most optimal “network-portable mountable filesystem image” format for Linux would be (for e.g. being a zero-install auto-fetched-from-the-network “mount and run” format for applications ala Flatpak/Snap; or being a NeXT-alike distribution container for “bundles” — where, as in macOS, it’s just as viable to open the app/document bundle [read-only] from the image, as it is to copy it out of the image.)

Such a format would have to balance the considerations of download time, storage size at rest, mount time (incl. any integrity checking), and access-time overhead when mounted. It would especially have to worry about per-file-open overhead, given that one of the primary use-cases would be rsync-ing the file tree out of the image onto your disk.

It sounds like you’re saying that a SquashFS filesystem image would actually be bad for this use-case, vs. just downloading a regular (sparse) loopback image of an ext4 filesystem over a compressed transport. Which is kind of surprising to me! I would think that the use-cases stated above would have been one of the design goals.

I’d also be curious about the relative merits of the “pure userspace” option — i.e. rather than mounting a disk-image and then accessing the files inside it through regular VFS inodes, instead having your zero-install daemon or whatever just use regular tarballs, by linking in a library like libarchive and using it to get internal virtual handles on the files. (Lots of games seem to choose this option, so it must have pretty good perf.)


I had a similar problem. Large archive files, quick random access was paramount. I considered SquashFS, but rejected it due to poor tooling on Windows, and I wanted my thing to be cross-platform. The format also seemed like something I'd need to spend some time understanding.

Surprisingly, ZIP came to my rescue. It's surprisingly flexible, and includes support for Unix attributes and modern compression. In comparison to tar.xz, it was strictly superior in every way.

ISO is also a good format with broad support, with many platforms now supporting mounting the contents using the built-in OS features. The only downside I could find is lack of compression, but there are supposedly format extensions that can help with that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: