Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
Thanks to Adrien Nader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thanks to Fredrik Wikstrom.
|
|
The behavior of grep -ql varies:
- GNU grep behaves like grep -q.
- OpenBSD grep behaves like grep -l.
POSIX doesn't make it 100 % clear what behavior is expected.
Anyway, using both -q and -l at the same time makes no sense
so both options simply should never be used at the same time.
Thanks to Christian Weisgerber.
|
|
Clang and nowadays also GCC accept any -Wfoobar option
but then may give a warning that an unknown warning option
was specified. To avoid adding unsupported warning options,
the options are now tested with -Werror.
Thanks to Charles Diza.
|
|
Although the old address is still working, the new one should
be preferred. So this commit changes all three places in de.po
accordingly.
Signed-off-by: Andre Noll <maan@tuebingen.mpg.de>
|
|
That's a funny one since "schießen" means to shoot :)
Signed-off-by: Andre Noll <maan@systemlinux.org>
|
|
|
|
|
|
|
|
POSIX supports $< only in inference rules (suffix rules).
Using it elsewhere is a GNU make extension and doesn't
work e.g. with OpenBSD make.
Thanks to Christian Weisgerber for the patch.
|
|
|
|
|
|
|
|
Now it should be close to the functionality of the original
version by Pavel Raiskup.
|
|
This is a simplified version of Pavel Raiskup's
original patch.
|
|
Mimic the original grep behavior and return exit_success when
at least one xz compressed file matches given pattern.
Original bugreport:
https://bugzilla.redhat.com/show_bug.cgi?id=1108085
Thanks to Pavel Raiskup for the patch.
|
|
In this case "make install" could fail if the man page directory
didn't already exist at the destination. If it did exist, a
dangling symlink was created there. Now the link is omitted
instead. This isn't the best fix but it's better than the old
behavior.
|
|
|
|
Add a note about failing "make check". The source of
the problem should be fixed in libtool (if it really is
a libtool bug and not mine) but I'm unable to spend time
on that for now. Thanks to Nelson H. F. Beebe for reporting
the issue.
Add a note about a possible need to run "ldconfig" after
"make install".
|
|
I don't know the details but I have an impression that there's
no problem in practice if using GCC since people have built xz
with GCC (without patching xz), but renaming the variable cannot
hurt either.
Thanks to Mark Ashley.
|
|
|
|
MSVC 2013 doesn't like them. Maybe they aren't so good
for readability either since many aren't used to them.
|
|
Unsurprisingly it makes no difference in compiled output.
|
|
Since the only call to suffix_set() uses optarg
as the argument, fixing this bug doesn't change
the behavior of the program.
|
|
|
|
|
|
Thanks to Tomer Chachamu.
|
|
|
|
The previous commit supports silent rules and that requires
Automake 1.11.
|
|
Previously it was done in configure, but doing that goes
against the Autoconf manual. Autoconf requires that it is
possible to override e.g. prefix after running configure
and that doesn't work correctly if liblzma.pc is created
by configure.
A potential downside of this change is that now e.g.
libdir in liblzma.pc is a standalone string instead of
being defined via ${prefix}, so if one overrides prefix
when running pkg-config the libdir won't get the new value.
I don't know if this matters in practice.
Thanks to Vincent Torri.
|
|
|
|
|
|
|
|
Thanks to Vincent Torri.
|
|
The man pages of lzmainfo, xzmore, and xzdec had similar
constructs as the man page of xz had before the commit
eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond
didn't mention these man pages in his bug report, but
it's nice to be consistent.
|
|
|
|
|
|
It didn't affect the behavior of the code since -1
becomes true anyway.
|
|
Nowadays errno == EFTYPE is documented in open(2).
|
|
POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on
error and "other than -1" on success. This is how it is
documented e.g. on OpenBSD too. On Linux, success with
F_SETFL is always 0 (at least accorinding to fcntl(2)
from man-pages 3.51).
|
|
Due to a wrong variable name, when writing a sparse file
to standard output, *all* file status flags were cleared
(to the extent the operating system allowed it) instead of
only clearing the O_APPEND flag. In practice this worked
fine in the common situations on GNU/Linux, but I didn't
check how it behaved elsewhere.
The original flags were still restored correctly. I still
changed the code to use a separate boolean variable to
indicate when the flags should be restored instead of
relying on a special value in stdout_flags.
|
|
It is a no-op for now, but if an old xz version is used
together with a newer liblzma that supports something new,
then this check becomes important and will stop the old xz
from trying to parse files that it won't understand.
|
|
It should actually still work with Automake 1.10 if
the serial-tests option is removed. Automake 1.13 started
using parallel tests by default and the option to get
the old behavior isn't supported before 1.12.
At least for now, parallel tests don't improve anything
in XZ Utils but they hide the progress output from
test_compress.sh.
|
|
This affects only "xz -lvv". Normal decompression with xz
already detected if Block Header and Index had mismatched
Uncompressed Size fields. So this just makes "xz -lvv"
show such files as corrupt instead of showing the
Uncompressed Size from Index.
|
|
|
|
Thanks to Eric S. Raymond.
|
|
Now the interaction of presets and custom filter chains
is described correctly. Earlier it contradicted itself.
Thanks to DevHC who reported these issues on IRC to me
on 2012-12-14.
|
|
There was somewhat illogical behavior when --extreme was
specified and mixed with custom filter chains.
Before this commit, "xz -9 --lzma2 -e" was equivalent
to "xz --lzma2". After it is equivalent to "xz -6e"
(all earlier preset options get forgotten when a custom
filter chain is specified and the default preset is 6
to which -e is applied). I find this less illogical.
This also affects the meaning of "xz -9e --lzma2 -7".
Earlier it was equivalent to "xz -7e" (the -e specified
before a custom filter chain wasn't forgotten). Now it
is "xz -7". Note that "xz -7e" still is the same as "xz -e7".
Hopefully very few cared about this in the first place,
so pretty much no one should even notice this change.
Thanks to Conley Moorhous.
|
|
|
|
Variable-length arrays are mandatory in C99 but optional in C11.
The code doesn't currently use any VLAs and it shouldn't in the
future either to stay compatible with C11 without requiring any
optional C11 features.
|
|
The options are now ordered in the same order as in xz's help
message.
Descriptions were added to the options that are ignored.
I left them in parenthesis even if it looks a bit weird
because I find it easier to spot the ignored vs. non-ignored
options from the list that way.
|
|
|
|
* src/scripts/xzgrep.in: Accept the '-h' option in argument parsing.
|
|
To avoid false positives when detecting .lzma files,
rare values in dictionary size and uncompressed size fields
were rejected. They will still be rejected if .lzma files
are decoded with lzma_auto_decoder(), but when using
lzma_alone_decoder() directly, such files will now be accepted.
Hopefully this is an OK compromise.
This doesn't affect xz because xz still has its own file
format detection code. This does affect lzmadec though.
So after this commit lzmadec will accept files that xz or
xz-emulating-lzma doesn't.
NOTE: lzma_alone_decoder() still won't decode all .lzma files
because liblzma's LZMA decoder doesn't support lc + lp > 4.
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827
Conflicts:
src/liblzma/common/alone_decoder.c
src/liblzma/common/alone_decoder.h
|
|
Use "read" instead of "awk" in xzless to get the version
number of "less". The need for awk was introduced in
the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e.
Thanks to Ariel P for the patch.
|
|
In v4.999.9beta~30 (xzless: Support compressed standard input,
2009-08-09), xzless learned to parse ‘less -V’ output to figure out
whether less is new enough to handle $LESSOPEN settings starting
with “|-”. That worked well for a while, but the version string from
‘less’ versions 448 (June, 2012) is misparsed, producing a warning:
$ xzless /tmp/test.xz; echo $?
/usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \
integer expression expected
0
More precisely, modern ‘less’ lists the regexp implementation along
with its version number, and xzless passes the entire version number
with attached parenthetical phrase as a number to "test $a -gt $b",
producing the above confusing message.
$ less-444 -V | head -1
less 444
$ less -V | head -1
less 456 (no regular expressions)
So relax the pattern matched --- instead of expecting "less <number>",
look for a line of the form "less <number>[ (extra parenthetical)]".
While at it, improve the behavior when no matching line is found ---
instead of producing a cryptic message, we can fall back on a LESSPIPE
setting that is supported by all versions of ‘less’.
The implementation uses "awk" for simplicity. Hopefully that’s
portable enough.
Reported-by: Jörg-Volker Peetz <jvpeetz@web.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
|
|
|
|
Thanks to Jim Meyering.
|
|
Thanks to Jim Meyering.
|
|
Otherwise too old version of m4/lib-link.m4 gets included
when autoreconf -fi is run.
|
|
|
|
It has been in the Git repository since 2010 but probably
few people have seen it since it hasn't been included in
the release tarballs. :-(
|
|
|
|
Also fix the script name mentioned in README.
|
|
|
|
|
|
|
|
Thanks to Jonathan Nieder.
|
|
|
|
These have more comments than the old examples and
human-readable error messages. More tutorial-like examples
are needed but these are a start.
|
|
It is good to keep these around to so that if someone has
copied the decompressor bug from xz_pipe_decomp.c he has
an example how to easily fix it.
|
|
|
|
Thanks to Milo Casagrande.
|
|
Thanks to Adrien Nader.
|
|
|
|
|
|
|
|
lzma_code() could incorrectly return LZMA_BUF_ERROR if
all of the following was true:
- The caller knows how many bytes of output to expect
and only provides that much output space.
- When the last output bytes are decoded, the
caller-provided input buffer ends right before
the LZMA2 end of payload marker. So LZMA2 won't
provide more output anymore, but it won't know it
yet and thus won't return LZMA_STREAM_END yet.
- A BCJ filter is in use and it hasn't left any
unfiltered bytes in the temp buffer. This can happen
with any BCJ filter, but in practice it's more likely
with filters other than the x86 BCJ.
Another situation where the bug can be triggered happens
if the uncompressed size is zero bytes and no output space
is provided. In this case the decompression can fail even
if the whole input file is given to lzma_code().
A similar bug was fixed in XZ Embedded on 2011-09-19.
|
|
|
|
|
|
This documents only the columns that are in v5.0.
The new columns added in the master branch aren't
necessarily stable yet.
|
|
It printed the filename in "filename (x/y)" format
which it obviously shouldn't do in robot mode.
|
|
|
|
|
|
Also hyphenate several compound adjectives.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
|
|
|
|
This way xz should work on 386SX and 486SX. Floating point
only is needed for verbose output in xz.
|
|
|
|
|
|
When grepping binary files, grep may exit before it has
read all the input. In this case, gzip -q returns 2 (eating
SIGPIPE), but xz and bzip2 show SIGPIPE as the exit status
(e.g. 141). This causes wrong exit status when grepping
xz- or bzip2-compressed binary files.
The fix checks for the special exit status that indicates SIGPIPE.
It uses kill -l which should be supported everywhere since it
is in both SUSv2 (1997) and POSIX.1-2008.
Thanks to James Buren for the bug report.
|
|
|
|
|
|
It was renamed to ax_pthread.m4 in Autoconf Archive.
|
|
Reported here:
http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/4927385
|
|
|
|
Thanks to Bela Lubkin.
|
|
|
|
Thanks to Chris Donawa.
|
|
|
|
|
|
|
|
The scripts are now made executable in the build tree.
This way the scripts can be run like programs in
test_scripts.sh. Previously test_scripts.sh always
used sh but it's not correct if @POSIX_SHELL@ is set
to something else by configure.
Thanks to Jonathan Nieder for the patch.
|
|
xzdiff was clobbering the exit status from diff in a case
statement used to analyze the exit statuses from "xz" when
its operands were two compressed files. Save and restore
diff's exit status to fix this.
The bug is inherited from zdiff in GNU gzip and was fixed
there on 2009-10-09.
Thanks to Jonathan Nieder for the patch and
to Peter Pallinger for reporting the bug.
|
|
|
|
|
|
Thanks to Jim Meyering.
|
|
Thanks to Milo Casagrande.
|
|
|
|
It could do an invalid free() and read past the end
of the uninitialized filters array.
|
|
Thanks to Jim Meyering.
|
|
|
|
|
|
|
|
It is known that the BCJ filter --help text is only
partially translated.
|
|
French needs a space before a colon, e.g. "xz : foo error".
|
|
|
|
|
|
This doesn't matter much in practice since it is unlikely
that anyone would have such environment variable names.
Thanks to Wim Lewis.
|
|
|
|
|
|
Reported-by: Diego Elio Pettenò <flameeyes@gentoo.org>
Signed-off-by: Martin Väth <vaeth@mathematik.uni-wuerzburg.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Spot candidates by running these commands:
git ls-files |xargs perl -0777 -n \
-e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt]o)\s+\1\b/gims)' \
-e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g; print "$ARGV:$n:$v\n"}'
Thanks to Jim Meyering for the original patch.
|
|
|
|
It didn't mention the return value that is used if
an error occurs.
|
|
Empty Block was created if the input buffer was empty.
Empty Block wastes a few bytes of space, but more importantly
it triggers a bug in XZ Utils 5.0.1 and older when trying
to decompress such a file. 5.0.1 and older consider such
files to be corrupt. I thought that no encoder creates empty
Blocks when releasing 5.0.2 but I was wrong.
|
|
This return value was missing from the API comments of
four functions.
|
|
The biggest problem was that the integrity check type
wasn't validated, and e.g. lzma_easy_buffer_encode()
would create a corrupt .xz Stream if given an unsupported
Check ID. Luckily applications don't usually try to use
an unsupport Check ID, so this bug is unlikely to cause
many real-world problems.
|
|
|
|
Passing --disable-decoders to configure broke a few
encoders due to missing #ifdefs in filter_common.c.
Thanks to Jason Gorski for the patch.
|
|
It leaks old filter options structures (hundred bytes or so)
every time the lzma_stream is reinitialized. With the xz tool,
this happens when compressing multiple files.
|
|
|
|
|
|
|
|
|
|
The decoder considered empty LZMA2 streams to be corrupt.
This shouldn't matter much with .xz files, because no encoder
creates empty LZMA2 streams in .xz. This bug is more likely
to cause problems in applications that use raw LZMA2 streams.
|
|
Now it uses "grep -q".
Thanks to Gregory Margo.
|
|
|
|
It didn't work at all. It tried to use the -q option
for grep, but it appended it after "--". This works
around it by redirecting to /dev/null. The downside
is that this can be slower with big files compared
to proper use of "grep -q".
Thanks to Gregory Margo.
|
|
struct suffix_pair isn't needed in compresed_name()
so get rid of it there.
|
|
Now "xz -S .test foo.test" refuses to compress the
file because it already has the suffix .test. The man
page had it documented this way already.
|
|
|
|
Thanks to Jakub Bogusz.
|
|
|
|
|
|
|
|
xz didn't compress setuid/setgid/sticky files and files
with multiple hard links even with --force. This bug was
introduced in 23ac2c44c3ac76994825adb7f9a8f719f78b5ee4.
Thanks to Charles Wilson.
|
|
|
|
Thanks to Cristian Rodríguez for the original patch.
|
|
|
|
|
|
|
|
This fixes portability to systems that lack C99 inttypes.h.
Thanks to Juan Manuel Guerrero.
|
|
Juan Manuel Guerrero had fixed this in his XZ Utils port
to DOS/DJGPP. The bug affects also Windows and OS/2.
|
|
Thanks to Petr Hubený and Marek Černocký.
|
|
|
|
Currently the file list generated by Doxygen has src/ at the
beginning of each path. Paths like common/sysdefs.h and
liblzma/api/lzma.h are easier to read without such a prefix.
Builds from a separate build directory with
mkdir build
cd build
../configure
doxygen Doxyfile
include an even longer prefix /home/someone/src/xz/src; this
patch has the nice side-effect of eliminating that prefix, too.
Fixes: http://bugs.debian.org/572273
|
|
The example programs by Daniel Mealha Cabrita were included
in the git repository, but I had forgot to add them to
Makefile.am. Thus, they didn't get included in the source
package at all by "make dist".
|
|
|
|
|
|
|
|
If any of the reserved members in lzma_stream are non-zero
or non-NULL, LZMA_OPTIONS_ERROR is returned. It is possible
that a new feature in the future is indicated by just setting
a reserved member to some other value, so the old liblzma
version need to catch it as an unsupported feature.
|
|
The non-standard ones from msvcrt.dll appear to work
most of the time with XZ Utils, but there are some
corner cases where things may go very wrong. So it's
good to use the better replacements provided by
MinGW(-w64) runtime.
|
|
This lets compiler use shifting instead of 64-bit division.
|
|
|
|
|
|
Adding support for LZMA_FINISH for Index encoding and
decoding needed tiny additions to the relevant .c files too.
|
|
|
|
lzma_chunk_size() was commented out because it is
currently useless.
|
|
|
|
This is similar to DOS/DJGPP that killing the program
with a signal will print a backtrace or a similar message.
|
|
SA_RESTART is not as portable as I had hoped. It's missing
at least from OpenVMS, QNX, and DJGPP). Luckily we can do
fine without SA_RESTART.
|
|
|
|
For some reason this prevented running the test only
on OS/2 and even on that it broke only recently.
Thanks to Elbert Pol.
|
|
|
|
|
|
|
|
Calling raise() to kill xz when user has pressed C-c
is a bit verbose on OS/2 and DOS/DJGPP. Instead of
calling raise(), set only the exit status to 1.
|
|
This is now simpler and builds only xz.exe.
|
|
|
|
|
|
|
|
|
|
|
|
This is simply for licensing reasons. The 64-bit version
will be built with MinGW-w64 anyway (at least for now),
so using it also for 32-bit build allows using the same
copyright notice about the MinGW-w64/w32 runtime.
Note that using MinGW would require a copyright notice too,
because its runtime is not in the public domain either even
though MinGW's home page claims that it is public domain.
See <http://marc.info/?l=mingw-users&m=126489506214078>.
|
|
Also, put README-Windows.txt to the doc directory like
the other documentation files.
|
|
630a8beda34af0ac153c8051b1bf01230558e422 wasn't good.
|
|
Those are the same thing, and the former makes it a bit
easier to build the code with other build systems, because
one doesn't need to update the version number into custom
config.h.
This change affects only lzmainfo. Other tools were already
using LZMA_VERSION_STRING.
|
|
|