squashfs-tools icon indicating copy to clipboard operation
squashfs-tools copied to clipboard

Wish for full-precision timestamp output from unsquashfs

Open ldoolitt opened this issue 2 years ago • 2 comments

I'm one of those weirdos that takes reproducible builds seriously. Chasing down reproducibility problems in the output of mksquashfs makes me wish that unsquashfs expose all state held in the squashfs file. Right now (checked as of git commit 19fcc936) unsquashfs -ll only emits timestamps to the minute, ignoring the tm_sec field held in the file. Changing a printf deep inside unsquashfs.c to

printf("%d-%02d-%02d %02d:%02d:%02d %s", t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec, pathname);

fixes this for me. For backwards-compatibility purposes, I bet y'all really want to add a command-line switch to enable this expanded output.

ldoolitt avatar Nov 25 '21 00:11 ldoolitt

Well as you said "For backwards-compatibility purposes, I bet y'all really want to add a command-line switch to enable this expanded output."

I'm not opposed to adding new command-line options, but, if I agreed to every request to do so, the command options list would now be a mile long :-( This doesn't do anyone any good because a "mile long options list" becomes something no-one ever reads. So the option may as well not be there, because no-one will ever find it.

In these cases where there is no hard or fast answer, I generally wait to see how many others ask for this option. If a lot of people think this is a good thing, then it will become worth adding it.

You seem perfectly capable of modifying your copy of Unsquashfs to do the above, and unless you have an over-ridding need for this to be in the "official tools", there doesn't yet seem a need to add this.

But, I'll keep this issue open, and see if I get any other comments on it, yes or no etc.

Are you happy with this?

Phillip

plougher avatar Dec 02 '21 09:12 plougher

Yes, I'm "perfectly capable of modifying your copy of Unsquashfs to do the above." But I also collaborate with others, and don't like passing around patches any more than I have to.

Crazy idea: since Aug 2019 you have the "-UTC" switch, which may attract the same target audience. Could that switch have the side-effect of selecting seconds-resolution output? Or does that violate the "principle of least surprise"?

ldoolitt avatar Dec 02 '21 18:12 ldoolitt