Skip to content

v2.0.1

Latest

Choose a tag to compare

@Snesnopic Snesnopic released this 21 Nov 10:23

What's new

Minor release

Behavior changes

  • Replacing files in place (without --output-dir):
    • read-only files, and files in a read-only folder, are left as they are;
    • a file that changes while chisel works on it is left as it is, instead of being overwritten;
    • the new file keeps the original's permissions, owner and group, extended attributes and, on macOS, its access control list. On Windows, attributes, ACLs and alternate data streams are kept
  • Damaged files are left as they are with a warning, never an [ERROR]:
    • PNGs with CRC errors or unreadable data, and palette PNGs using colors past the end of their palette
    • MP3s whose last frame is cut off
    • FLACs that flac --test rejects (decoder errors, missing samples, MD5 mismatch), which 2.0.0 rewrote with the audio libFLAC guesses for the broken frames;
    • damaged JPEG 2000 files and icons.
  • --no-meta now removes Vorbis comments, Opus comments and MP3 text tags (ID3v1, APE, and every ID3v2 frame but pictures). Cover art stays, as with the other formats.
  • CSV report (--report): every file is listed, skipped ones too with the reason, and so is every container. The Container column gives the full chain (nested.zip > doc.odt), sizes are in bytes, rows are sorted by path, and results are OK (replaced), OK (kept), SKIPPED or FAIL. The Codecs column is gone

Bug fixes

Data loss

  • Email and MIME files (.eml, .mht...): parts whose base64 is made of separately padded chunks lost data. Those parts are now left as they are
  • SQLite: every rewritten database was analyzed, which added a sqlite_stat1 table, rewrote existing statistics and deleted sqlite_stat4. Databases in WAL mode came out in rollback-journal mode, and schema format 1 became 4. Now none of this changes, and --verify-checksums also compares SQLite's own tables, row IDs and header fields.

Metadata changed

  • PDF identifier: every rebuilt PDF got the same fixed /ID. PDFs now keep the first part of their identifier and get a new second part.
  • MKV attachments got new random UIDs on every run, were put back in alphabetical order, and were rewritten even when unchanged. Their order, UIDs, names, types and descriptions now stay, and only attachments that got smaller change.

Errors and crashes

  • Long file names: files with names longer than about 190 to 225 bytes, depending on the format, failed with [ERROR].
  • AES-encrypted PDFs, even those that open without a password, always failed with [ERROR]. They're now recompressed, with their encryption kept. PDFs with RC4 crypt filters are left as they are, since rewriting them would switch them to AES.
  • PDFs with an /Extensions dictionary were reported as different from their rebuild and kept with an [ERROR].
  • Icons: crafted or damaged icons could crash chsl.
  • SQLite in WAL mode: reading a database left an empty -wal and a -shm next to it, even with --output-dir, so the next run skipped it as in use.

Other

  • flacoutcpp printed its messages in the middle of the progress bar. They now go to the log.
  • mkclean messages showed numbers of 10¹² and more wrong, such as the timestamps of MKVs longer than about 16 minutes.

Library

Changes to the events (events.hpp):

  • every event except InputAnalyzeCompleteEvent names its container in parent_container (FileAnalyzeCompleteEvent.parent was renamed);
  • a container's FileAnalyzeCompleteEvent comes before any of its contents;
  • skip events carry a SkipReason (reason) and a text (message), and is_signed was removed. The reasons are Junk, Empty, Unsupported, Signed, NestingTooDeep, NothingToDo, NoImprovement, Interrupted, ReadOnly and ChangedDuringRun;
  • new ContainerFinalizeSkippedEvent, for containers a stop kept from being rebuilt;
  • every analyzed file gets exactly one analysis outcome, and every file scheduled for recompression exactly one recompression outcome, even after a stop.

Dependencies

  • Updated flacoutcpp to 1.5.0: messages through a callback, damaged inputs refused.
  • Updated libmkclean fork: 64-bit numbers in its messages.

Development

  • Release assets are built and packaged by CI (chsl-<platform>.tar.gz or .zip, Chisel.xcframework.zip). FreeBSD builds in its own workflow.
  • The nightly release points at the commit it was built from and includes each platform's test log.
  • Homebrew formula: CMake and Rust are only needed for --HEAD builds, and the quarantine flag is removed on install.

macOS: removing the Gatekeeper quarantine

When downloading binaries from the internet, macOS automatically marks them as “quarantined”.
If you try to run chsl and macOS shows a warning like:

“chsl cannot be opened because it is from an unidentified developer”

…you need to remove the quarantine attribute manually.

How to remove the quarantine flag
Open Terminal in the folder where you downloaded chsl and run:

xattr -d com.apple.quarantine ./chsl

To verify that the quarantine flag is gone:

xattr ./chsl

If com.apple.quarantine no longer appears, you're good to go.
Now you can run:

./chsl ...

Note
This issue does not occur if you compile chsl yourself.