]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
bzip2: fix 'bzip2 --version > /tmp/aaa 2>&1' hang
authorHongxu Jia <hongxu.jia@windriver.com>
Wed, 13 Nov 2024 12:51:47 +0000 (04:51 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Nov 2024 13:57:33 +0000 (13:57 +0000)
commitae4fe4263ba9d372f9b9e80df4ec4697b51c1f9b
tree80e067f2a7315fcb4d170f98c3c007f203d2ca12
parent3ae9098c8c4cdc635cc449190f340dc20d6e7318
bzip2: fix 'bzip2 --version > /tmp/aaa 2>&1' hang

According to [1]

As of the current version 1.0.8, bzip2 --version will print version
info but it will also continue compressing stdin:

  $ ./bzip2 --version
  bzip2, a block-sorting file compressor.  Version 1.0.8, 13-Jul-2019.

     Copyright (C) 1996-2019 by Julian Seward.

     This program is free software; [...]

  bzip2: I won't write compressed data to a terminal.
  bzip2: For help, type: `bzip2 --help'.

Debian (and its downstreams like Ubuntu) will patch this out [2],
making the < /dev/null unnecessary, port a part of debian patch
to fix the issue

[1] https://stackoverflow.com/questions/59757176/why-using-dev-null-with-a-program-like-bzip2
[2] https://sources.debian.org/src/bzip2/1.0.8-6/debian/patches/20-legacy.patch/

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/bzip2/bzip2/0001-fix-bzip2-version-tmp-aaa-will-hang.patch [new file with mode: 0644]
meta/recipes-extended/bzip2/bzip2_1.0.8.bb