7ae14d201e
Switched to new maintainer source: https://sourceware.org/ml/bzip2-devel/2019-q2/msg00022.html Version 1.0.7 fixes CVE-2016-3189 & CVE-2019-12900 Version 1.0.8 fixes the fix for CVE-2019-12900 from 1.0.7: https://sourceware.org/ml/bzip2-devel/2019-q3/msg00031.html Rebased 0002-improve-build-system.patch. Removed 0003-Make-sure-nSelectors-is-not-out-of-range.patch, applied upstream: https://sourceware.org/git/?p=bzip2.git;a=commitdiff;h=7ed62bfb46e87a9e878712603469440e6882b184 and reverted later on https://sourceware.org/git/?p=bzip2.git;a=commitdiff;h=b07b105d1b66e32760095e3602261738443b9e13 Added upstream sha512 hash and updated license hash after upstream commits: https://sourceware.org/git/?p=bzip2.git;a=history;f=LICENSE;h=81a37eab7a5be1a34456f38adb74928cc9073e9b;hb=HEAD Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
85 lines
2.7 KiB
Diff
85 lines
2.7 KiB
Diff
Improve bzip2 build system
|
|
|
|
This patch makes a number of improvements to the bzip2 build system:
|
|
|
|
* Remove the BIGFILE variable that was used to force largefile
|
|
support. Now, the user of the Makefile is supposed to pass
|
|
-D_FILE_OFFSET_BITS=64 when largefile support is desired.
|
|
|
|
* Use override CFLAGS += so that additional CFLAGS can be passed on
|
|
the command line.
|
|
|
|
* Removed "forced" CFLAGS -O2, -g and -Winline. We don't want them by
|
|
default, and want the build system to use its own ones.
|
|
|
|
* When creating the symbolic links bzegrep, bzfgrep, bzless and
|
|
bzcmp, don't link them to an absolute path, or they'll point to
|
|
some path on the build machine.
|
|
|
|
* Provide an install target for the shared library, which creates the
|
|
appropriate symbolic links.
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
Index: b/Makefile
|
|
===================================================================
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -20,8 +20,7 @@
|
|
RANLIB=ranlib
|
|
LDFLAGS=
|
|
|
|
-BIGFILES=-D_FILE_OFFSET_BITS=64
|
|
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
|
|
+override CFLAGS += -Wall
|
|
|
|
# Where you want it installed when you do 'make install'
|
|
PREFIX=/usr/local
|
|
@@ -90,14 +89,14 @@
|
|
cp -f libbz2.a $(PREFIX)/lib
|
|
chmod a+r $(PREFIX)/lib/libbz2.a
|
|
cp -f bzgrep $(PREFIX)/bin/bzgrep
|
|
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
|
|
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
|
|
+ ln -s -f bzgrep $(PREFIX)/bin/bzegrep
|
|
+ ln -s -f bzgrep $(PREFIX)/bin/bzfgrep
|
|
chmod a+x $(PREFIX)/bin/bzgrep
|
|
cp -f bzmore $(PREFIX)/bin/bzmore
|
|
- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
|
|
+ ln -s -f bzmore $(PREFIX)/bin/bzless
|
|
chmod a+x $(PREFIX)/bin/bzmore
|
|
cp -f bzdiff $(PREFIX)/bin/bzdiff
|
|
- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
|
|
+ ln -s -f bzdiff $(PREFIX)/bin/bzcmp
|
|
chmod a+x $(PREFIX)/bin/bzdiff
|
|
cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
|
|
chmod a+r $(PREFIX)/man/man1/bzgrep.1
|
|
Index: b/Makefile-libbz2_so
|
|
===================================================================
|
|
--- a/Makefile-libbz2_so
|
|
+++ b/Makefile-libbz2_so
|
|
@@ -23,8 +23,7 @@
|
|
|
|
SHELL=/bin/sh
|
|
CC=gcc
|
|
-BIGFILES=-D_FILE_OFFSET_BITS=64
|
|
-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
|
|
+override CFLAGS += -fpic -fPIC -Wall
|
|
|
|
OBJS= blocksort.o \
|
|
huffman.o \
|
|
@@ -37,8 +36,11 @@
|
|
all: $(OBJS)
|
|
$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
|
|
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
|
|
- rm -f libbz2.so.1.0
|
|
- ln -s libbz2.so.1.0.8 libbz2.so.1.0
|
|
+
|
|
+install:
|
|
+ install -m 0755 -D libbz2.so.1.0.8 $(PREFIX)/lib/libbz2.so.1.0.8
|
|
+ ln -sf libbz2.so.1.0.8 $(PREFIX)/lib/libbz2.so
|
|
+ ln -sf libbz2.so.1.0.8 $(PREFIX)/lib/libbz2.so.1.0
|
|
|
|
clean:
|
|
rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
|