SHA256
1
0
forked from pool/bzip2

Accepting request 718277 from home:kstreitova:branches:Archiving

- Update to version 1.0.8:
  * Accept as many selectors as the file format allows.
    This relaxes the fix for CVE-2019-12900 from 1.0.7
    so that bzip2 allows decompression of bz2 files that
    use (too) many selectors again.
  * Fix handling of large (> 4GB) files on Windows.
  * Cleanup of bzdiff and bzgrep scripts so they don't use
    any bash extensions and handle multiple archives correctly.
- remove (applied upstream)
  * bzip2-1.0.6-fix-bashisms.patch
  * bzip2-1.0.6-bzgrep_return_value.patch
- use a new Source url

OBS-URL: https://build.opensuse.org/request/show/718277
OBS-URL: https://build.opensuse.org/package/show/Archiving/bzip2?expand=0&rev=79
This commit is contained in:
Martin Pluskal 2019-07-24 14:23:52 +00:00 committed by Git OBS Bridge
parent 280db28620
commit d784bd33f0
6 changed files with 21 additions and 52 deletions

View File

@ -1,27 +0,0 @@
Index: bzip2-1.0.7/bzgrep
===================================================================
--- bzip2-1.0.7.orig/bzgrep 2019-06-27 23:10:21.375272508 +0200
+++ bzip2-1.0.7/bzgrep 2019-06-27 23:10:21.415272635 +0200
@@ -65,8 +65,20 @@ for i do
else
j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
j=`printf "%s" "$j" | tr '\n' ' '`
- bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
- r=$?
+ # A trick adapted from
+ # https://groups.google.com/forum/#!original/comp.unix.shell/x1345iu10eg/Nn1n-1r1uU0J
+ # that has the same effect as the following bash code:
+ # bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
+ # r=${PIPESTATUS[1]}
+ exec 3>&1
+ eval `
+ exec 4>&1 >&3 3>&-
+ {
+ bzip2 -cdfq "$i" 4>&-
+ } | {
+ $grep $opt "$pat" 4>&-; echo "r=$?;" >&4
+ } | sed "s|^|${j}:|"
+ `
fi
test "$r" -ne 0 && res="$r"
done

View File

@ -1,15 +0,0 @@
Index: bzip2-1.0.7/bzgrep
===================================================================
--- bzip2-1.0.7.orig/bzgrep 2019-06-27 20:15:39.000000000 +0200
+++ bzip2-1.0.7/bzgrep 2019-06-27 23:12:37.027916706 +0200
@@ -63,9 +63,7 @@ for i do
bzip2 -cdfq "$i" | $grep $opt "$pat"
r=$?
else
- j=${i//\\/\\\\}
- j=${j//|/\\|}
- j=${j//&/\\&}
+ j=$(echo "$i" | sed 's/\\/&&/g;s/|/\\&/g;s/&/\\&/g')
j=`printf "%s" "$j" | tr '\n' ' '`
bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|"
r=$?

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e768a87c5b1a79511499beb41500bcc4caf203726fff46a6f5f9ad27fe08ab2b
size 809680

BIN
bzip2-1.0.8.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Jul 22 11:08:53 UTC 2019 - Kristyna Streitova <kstreitova@suse.com>
- Update to version 1.0.8:
* Accept as many selectors as the file format allows.
This relaxes the fix for CVE-2019-12900 from 1.0.7
so that bzip2 allows decompression of bz2 files that
use (too) many selectors again.
* Fix handling of large (> 4GB) files on Windows.
* Cleanup of bzdiff and bzgrep scripts so they don't use
any bash extensions and handle multiple archives correctly.
- remove (applied upstream)
* bzip2-1.0.6-fix-bashisms.patch
* bzip2-1.0.6-bzgrep_return_value.patch
- use a new Source url
-------------------------------------------------------------------
Fri Jun 28 07:42:24 UTC 2019 - Martin Pluskal <mpluskal@suse.com>

View File

@ -18,24 +18,21 @@
%define libname libbz2-1
Name: bzip2
Version: 1.0.7
Version: 1.0.8
Release: 0
Summary: A Program for Compressing Files
License: BSD-3-Clause
Group: Productivity/Archiving/Compression
URL: https://sourceware.org/bzip2
Source: %{name}-%{version}.tar.gz
Source0: https://sourceware.org/pub/bzip2/%{name}-%{version}.tar.gz
Source1: bznew.gz
Source2: bznew.1.gz
Source3: baselibs.conf
Source100: bzip2-rpmlintrc
# PATCH-FEATURE-OPENSUSE bzip2-1.0.6-autoconfiscated.patch sbrabec@suse.cz -- Convert to a standard autoconf based package.
Patch0: ftp://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/bzip2-1.0.6.2-autoconfiscated.patch
Patch1: bzip2-1.0.6-fix-bashisms.patch
Patch3: bzip2-point-to-doc-pkg.patch
Patch4: bzip2-ocloexec.patch
# PATCH-FIX-UPSTREAM bnc#970260 kstreitova@suse.com -- fix a wrong exit code when grepping multiple archives
Patch5: bzip2-1.0.6-bzgrep_return_value.patch
BuildRequires: autoconf >= 2.57
BuildRequires: libtool
BuildRequires: pkgconfig
@ -74,10 +71,8 @@ The bzip2 runtime library development files.
%prep
%setup -q
%patch0
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
autoreconf -fiv