Skip to content

targrep 0.15.2

Choose a tag to compare

@github-actions github-actions released this 07 Nov 18:16
· 34 commits to master since this release

Fixed

  • A plain binary file over 64 KiB with no match is a 1 again, not a 2
    saying it "shrank while being read". Its search stops at the first NUL on
    purpose, and the check for a log truncated mid-read, new in 0.15.0, took
    the unread rest for a cut: trg ERR /var/log/ was a 2 wherever wtmp,
    lastlog or a journal file sat. The check now runs only once a read met
    the end of the file, and only for a file now smaller than when it was
    opened: Linux's sysfs states 4096 bytes for a file of a few.

  • An empty directory with --archive-glob says only that it is empty, not
    also that the glob matched nothing.

  • Concatenated archives are searched whole: cat day1.tgz day2.tgz > week.tgz is one valid archive holding two tars, in every format, and the
    search stopped at the first tar's end. A match in the second was an exit
    1 about members never read. trg now reads on past the end-of-archive
    blocks, as tar -i does.

  • A tar inside an archive gets the note a zip there gets, saying its
    members are not searched: tar -cf month.tar day*.tgz was a 1 with no
    word that the days inside were never read.

  • A zip on a pipe (cat x.zip | trg ERR -) says it cannot be read from a
    pipe, where it said only "Illegal seek". Still an exit 2.

  • -g ignores a leading ./ in member names. tar -czf day.tgz -C /var/log . names its members ./apache2/access.log, and -g 'apache2/*' matched none of them, so beside an archive named without it
    one was searched and the other silently skipped.

  • Bytes after a tar's end that are neither zeros nor another tar are an
    exit 2. They were read and thrown away. A byte changed in a .tar.Z,
    which has no checksum, gave a silent 1 in 68 of 100 torture runs; now
    none do.