commit 5becd7512cf25cc68baf9c5fe8dcfafb35547a51 Author: zyppe <210hcl@gmail.com> Date: Fri Feb 9 18:52:52 2024 +0800 Initialize for bzip2 diff --git a/.bzip2.metadata b/.bzip2.metadata new file mode 100644 index 0000000..5575e24 --- /dev/null +++ b/.bzip2.metadata @@ -0,0 +1,3 @@ +34400e535a9018e93fc04f509811df340e8f9b48b06467b9c025400ac0a4898d bzip2-1.0.8.tar.gz +177581b7d15974456156466a3a23e041ca8d7bb09e05526b763abf111ea5a7a9 bznew.1.gz +d89d958af48180ebbb3fcb29454e40c8cb842fbdec9a35458c0defffdcc6f241 bznew.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3b59753 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bzip2-1.0.8.tar.gz +bznew.1.gz +bznew.gz diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..c38f1f2 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,7 @@ +libbz2-1 + obsoletes "bzip2- <= " + provides "bzip2- = " + targettype x86 provides "baselibs-x86:/usr/lib/libbz2.so.1" +libbz2-devel + requires -libbz2- + requires "libbz2-1- = " diff --git a/bzip2-1.0.6.2-autoconfiscated.patch b/bzip2-1.0.6.2-autoconfiscated.patch new file mode 100644 index 0000000..eca3361 --- /dev/null +++ b/bzip2-1.0.6.2-autoconfiscated.patch @@ -0,0 +1,394 @@ +--- + Makefile.am | 137 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + README.autotools | 41 ++++++++++++++++ + autogen.sh | 8 +++ + bzip2.pc.in | 11 ++++ + bzlib.h | 4 + + configure.ac | 62 ++++++++++++++++++++++++ + m4/visibility.m4 | 78 +++++++++++++++++++++++++++++++ + 7 files changed, 340 insertions(+), 1 deletion(-) + +Index: bzip2-1.0.8/Makefile.am +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/Makefile.am +@@ -0,0 +1,137 @@ ++ACLOCAL_AMFLAGS = -I m4 ++lib_LTLIBRARIES = libbz2.la ++AM_CFLAGS = $(CFLAG_VISIBILITY) ++libbz2_la_SOURCES = \ ++ blocksort.c \ ++ huffman.c \ ++ crctable.c \ ++ randtable.c \ ++ compress.c \ ++ decompress.c \ ++ bzlib.c ++ ++libbz2_la_LDFLAGS = \ ++ -version-info $(BZIP2_LT_CURRENT):$(BZIP2_LT_REVISION):$(BZIP2_LT_AGE) \ ++ -no-undefined ++ ++include_HEADERS = bzlib.h ++ ++noinst_HEADERS = bzlib_private.h ++ ++bin_PROGRAMS = bzip2 bzip2recover ++ ++bzip2_SOURCES = bzip2.c ++bzip2_LDADD = libbz2.la ++ ++bzip2recover_SOURCES = bzip2recover.c ++bzip2recover_LDADD = libbz2.la ++ ++bin_SCRIPTS = bzgrep bzmore bzdiff ++ ++man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 ++ ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = bzip2.pc ++ ++$(pkgconfig_DATA): $(srcdir)/bzip2.pc.in config.status ++ ++install-exec-hook: ++ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'` ++ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'` ++ $(LN_S) `echo "bzmore" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform)'` ++ $(LN_S) `echo "bzdiff" | sed 's,^.*/,,;$(transform)'` $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'` ++ ++install-data-hook: ++ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1 ++ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1 ++ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1 ++ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1 ++ echo ".so man1/`echo "bzmore" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1 ++ echo ".so man1/`echo "bzdiff" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1 ++ ++uninstall-hook: ++ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform)'` ++ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'` ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1 ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1 ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1 ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1 ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1 ++ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1 ++ ++test: bzip2 ++ @cat $(srcdir)/words1 ++ ./bzip2 -1 <$(srcdir)/sample1.ref >sample1.rb2 ++ ./bzip2 -2 <$(srcdir)/sample2.ref >sample2.rb2 ++ ./bzip2 -3 <$(srcdir)/sample3.ref >sample3.rb2 ++ ./bzip2 -d <$(srcdir)/sample1.bz2 >sample1.tst ++ ./bzip2 -d <$(srcdir)/sample2.bz2 >sample2.tst ++ ./bzip2 -ds <$(srcdir)/sample3.bz2 >sample3.tst ++ cmp $(srcdir)/sample1.bz2 sample1.rb2 ++ cmp $(srcdir)/sample2.bz2 sample2.rb2 ++ cmp $(srcdir)/sample3.bz2 sample3.rb2 ++ cmp sample1.tst $(srcdir)/sample1.ref ++ cmp sample2.tst $(srcdir)/sample2.ref ++ cmp sample3.tst $(srcdir)/sample3.ref ++ @cat $(srcdir)/words3 ++ ++manual: $(srcdir)/manual.html $(srcdir)/manual.ps $(srcdir)/manual.pdf ++ ++manual.ps: $(MANUAL_SRCS) ++ cd $(srcdir); ./xmlproc.sh -ps manual.xml ++ ++manual.pdf: $(MANUAL_SRCS) ++ cd $(srcdir); ./xmlproc.sh -pdf manual.xml ++ ++manual.html: $(MANUAL_SRCS) ++ cd $(srcdir); ./xmlproc.sh -html manual.xml ++ ++EXTRA_DIST = \ ++ $(bin_SCRIPTS) \ ++ $(man_MANS) \ ++ README.autotools \ ++ README.XML.STUFF \ ++ bz-common.xsl \ ++ bz-fo.xsl \ ++ bz-html.xsl \ ++ bzip.css \ ++ bzip2.1.preformatted \ ++ bzip2.pc.in \ ++ bzip2.txt \ ++ dlltest.c \ ++ dlltest.dsp \ ++ entities.xml \ ++ format.pl \ ++ libbz2.def \ ++ libbz2.dsp \ ++ makefile.msc \ ++ manual.html \ ++ manual.pdf \ ++ manual.ps \ ++ manual.xml \ ++ mk251.c \ ++ sample1.bz2 \ ++ sample1.ref \ ++ sample2.bz2 \ ++ sample2.ref \ ++ sample3.bz2 \ ++ sample3.ref \ ++ spewG.c \ ++ unzcrash.c \ ++ words0 \ ++ words1 \ ++ words2 \ ++ words3 \ ++ xmlproc.sh +Index: bzip2-1.0.8/README.autotools +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/README.autotools +@@ -0,0 +1,41 @@ ++bzip2 autoconfiscated ++===================== ++ ++Temporarily at http://ftp.suse.com/pub/people/sbrabec/bzip2/ expecting ++that it will become a new upstream version to prevent per-distribution ++shared library patching done by nearly each Linux vendor separately. ++ ++Autoconfiscation brings standard ./configure ; make ; make install ++installation, seamless support of DESTDIR, automatic check for supported ++CFLAGS, standard shared library support, automatic large files CFLAGS ++check and all things that are supported by automake. ++ ++It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS. ++Now configure should automatically detect correct build flags. ++ ++In case of any problem or question with autotools support feel free to ++contact me: Stanislav Brabec ++ ++Autoconfiscated version binaries are exactly equal to ++bzip2-1.0.6.tar.gz. There are only few changes. See below. ++ ++ ++New features: ++ ++Trivial link man pages for bzcat and bunzip2 added. ++ ++bzip2.pc file for pkg-config. Packages can use it for checks. ++ ++ ++Incompatible changes: ++ ++soname change. Libtool has no support for two parts soname suffix (e. g. ++libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is ++why soname must change. But I see not a big problem with it. Several ++distributions already use the new number instead of the non-standard ++number from Makefile-libbz2_so. ++ ++Shared library exports only public symbols. ++ ++To be super-safe, I incremented minor number of the library file, so ++both instances of the shared library can live together. +Index: bzip2-1.0.8/autogen.sh +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/autogen.sh +@@ -0,0 +1,8 @@ ++mv LICENSE COPYING ++mv CHANGES NEWS ++touch AUTHORS ++touch ChangeLog ++libtoolize --force ++aclocal ++automake --add-missing --gnu ++autoconf +Index: bzip2-1.0.8/bzip2.pc.in +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/bzip2.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++bindir=@bindir@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: bzip2 ++Description: Lossless, block-sorting data compression ++Version: @VERSION@ ++Libs: -L${libdir} -lbz2 ++Cflags: -I${includedir} +Index: bzip2-1.0.8/bzlib.h +=================================================================== +--- bzip2-1.0.8.orig/bzlib.h ++++ bzip2-1.0.8/bzlib.h +@@ -91,9 +91,11 @@ typedef + # endif + #else + # define BZ_API(func) func +-# define BZ_EXTERN extern + #endif + ++#ifndef BZ_EXTERN ++#define BZ_EXTERN extern ++#endif + + /*-- Core (low-level) library functions --*/ + +Index: bzip2-1.0.8/configure.ac +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/configure.ac +@@ -0,0 +1,62 @@ ++# -*- Autoconf -*- ++# Process this file with autoconf to produce a configure script. ++ ++AC_PREREQ([2.57]) ++AC_INIT([bzip2], [1.0.8], [Julian Seward ]) ++BZIP2_LT_CURRENT=1 ++BZIP2_LT_REVISION=6 ++BZIP2_LT_AGE=0 ++AC_CONFIG_SRCDIR([bzlib.h]) ++AC_CONFIG_MACRO_DIR([m4]) ++ ++AM_INIT_AUTOMAKE([foreign subdir-objects]) ++AM_MAINTAINER_MODE ++ ++# Checks for programs. ++AC_PROG_AWK ++AC_PROG_CC_STDC ++AC_PROG_CC_C_O ++AC_USE_SYSTEM_EXTENSIONS ++AC_PROG_INSTALL ++AC_PROG_LN_S ++AC_PROG_MAKE_SET ++LT_INIT([disable-static pic-only]) ++PKG_PROG_PKG_CONFIG ++gl_VISIBILITY ++# Checks for libraries. ++ ++# Checks for header files. ++ ++# Checks for typedefs, structures, and compiler characteristics. ++ ++# Check for system features. ++AC_SYS_LARGEFILE ++ ++AC_MSG_CHECKING([whether compiler understands -Wall]) ++save_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Wall" ++AC_TRY_COMPILE([], [], [ ++ AC_MSG_RESULT([yes]) ++], [ ++ AC_MSG_RESULT([no]) ++ CFLAGS="$save_CFLAGS" ++]) ++ ++AC_MSG_CHECKING([whether compiler understands -Winline]) ++save_CFLAGS="$CFLAGS" ++CFLAGS="$CFLAGS -Winline" ++AC_TRY_COMPILE([], [], [ ++ AC_MSG_RESULT([yes]) ++], [ ++ AC_MSG_RESULT([no]) ++ CFLAGS="$save_CFLAGS" ++]) ++ ++# Checks for library functions. ++ ++# Write the output. ++AC_SUBST([BZIP2_LT_CURRENT]) ++AC_SUBST([BZIP2_LT_REVISION]) ++AC_SUBST([BZIP2_LT_AGE]) ++AC_CONFIG_FILES([Makefile bzip2.pc]) ++AC_OUTPUT +Index: bzip2-1.0.8/m4/visibility.m4 +=================================================================== +--- /dev/null ++++ bzip2-1.0.8/m4/visibility.m4 +@@ -0,0 +1,78 @@ ++# visibility.m4 serial 4 (gettext-0.18.2) ++dnl Copyright (C) 2005, 2008, 2010-2011 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++ ++dnl From Bruno Haible. ++ ++dnl Tests whether the compiler supports the command-line option ++dnl -fvisibility=hidden and the function and variable attributes ++dnl __attribute__((__visibility__("hidden"))) and ++dnl __attribute__((__visibility__("default"))). ++dnl Does *not* test for __visibility__("protected") - which has tricky ++dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on ++dnl MacOS X. ++dnl Does *not* test for __visibility__("internal") - which has processor ++dnl dependent semantics. ++dnl Does *not* test for #pragma GCC visibility push(hidden) - which is ++dnl "really only recommended for legacy code". ++dnl Set the variable CFLAG_VISIBILITY. ++dnl Defines and sets the variable HAVE_VISIBILITY. ++ ++AC_DEFUN([gl_VISIBILITY], ++[ ++ AC_REQUIRE([AC_PROG_CC]) ++ CFLAG_VISIBILITY= ++ HAVE_VISIBILITY=0 ++ if test -n "$GCC"; then ++ dnl First, check whether -Werror can be added to the command line, or ++ dnl whether it leads to an error because of some other option that the ++ dnl user has put into $CC $CFLAGS $CPPFLAGS. ++ AC_MSG_CHECKING([whether the -Werror option is usable]) ++ AC_CACHE_VAL([gl_cv_cc_vis_werror], [ ++ gl_save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[]], [[]])], ++ [gl_cv_cc_vis_werror=yes], ++ [gl_cv_cc_vis_werror=no]) ++ CFLAGS="$gl_save_CFLAGS"]) ++ AC_MSG_RESULT([$gl_cv_cc_vis_werror]) ++ dnl Now check whether visibility declarations are supported. ++ AC_MSG_CHECKING([for simple visibility declarations]) ++ AC_CACHE_VAL([gl_cv_cc_visibility], [ ++ gl_save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -fvisibility=hidden" ++ dnl We use the option -Werror and a function dummyfunc, because on some ++ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning ++ dnl "visibility attribute not supported in this configuration; ignored" ++ dnl at the first function definition in every compilation unit, and we ++ dnl don't want to use the option in this case. ++ if test $gl_cv_cc_vis_werror = yes; then ++ CFLAGS="$CFLAGS -Werror" ++ fi ++ AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar; ++ extern __attribute__((__visibility__("default"))) int exportedvar; ++ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); ++ extern __attribute__((__visibility__("default"))) int exportedfunc (void); ++ void dummyfunc (void) {} ++ ]], ++ [[]])], ++ [gl_cv_cc_visibility=yes], ++ [gl_cv_cc_visibility=no]) ++ CFLAGS="$gl_save_CFLAGS"]) ++ AC_MSG_RESULT([$gl_cv_cc_visibility]) ++ if test $gl_cv_cc_visibility = yes; then ++ CFLAG_VISIBILITY="-fvisibility=hidden" ++ HAVE_VISIBILITY=1 ++ AC_DEFINE([BZ_EXTERN], [__attribute__((__visibility__("default")))], [To make symbol visible]) ++ fi ++ fi ++ AC_SUBST([CFLAG_VISIBILITY]) ++ AC_SUBST([HAVE_VISIBILITY]) ++ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], ++ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) ++]) diff --git a/bzip2-ocloexec.patch b/bzip2-ocloexec.patch new file mode 100644 index 0000000..18f53e3 --- /dev/null +++ b/bzip2-ocloexec.patch @@ -0,0 +1,21 @@ +Index: bzip2-1.0.7/bzlib.c +=================================================================== +--- bzip2-1.0.7.orig/bzlib.c 2019-06-27 20:15:39.000000000 +0200 ++++ bzip2-1.0.7/bzlib.c 2019-06-27 23:10:21.399272583 +0200 +@@ -1414,7 +1414,15 @@ BZFILE * bzopen_or_bzdopen + } + mode++; + } +- strcat(mode2, writing ? "w" : "r" ); ++ ++ /* open fds with O_CLOEXEC _only_ when we are the initiator ++ * aka. bzopen() but not bzdopen() */ ++ if(open_mode == 0) { ++ strcat (mode2, writing ? "we" : "re" ); ++ } else { ++ strcat(mode2, writing ? "w" : "r" ); ++ } ++ + strcat(mode2,"b"); /* binary mode */ + + if (open_mode==0) { diff --git a/bzip2-point-to-doc-pkg.patch b/bzip2-point-to-doc-pkg.patch new file mode 100644 index 0000000..5b760c8 --- /dev/null +++ b/bzip2-point-to-doc-pkg.patch @@ -0,0 +1,14 @@ +Index: bzip2-1.0.7/README +=================================================================== +--- bzip2-1.0.7.orig/README 2019-06-27 20:15:39.000000000 +0200 ++++ bzip2-1.0.7/README 2019-06-27 23:10:21.387272546 +0200 +@@ -17,7 +17,8 @@ in the file LICENSE. + + Complete documentation is available in Postscript form (manual.ps), + PDF (manual.pdf) or html (manual.html). A plain-text version of the +-manual page is available as bzip2.txt. ++manual page is available as bzip2.txt. bzip2 documentation is ++available in separate bzip2-doc package. + + + HOW TO BUILD -- UNIX diff --git a/bzip2-rpmlintrc b/bzip2-rpmlintrc new file mode 100644 index 0000000..a8e9080 --- /dev/null +++ b/bzip2-rpmlintrc @@ -0,0 +1,4 @@ +# This line is mandatory to access the configuration functions +from Config import * + +addFilter("bzip2 explicit-lib-dependency libbz2-1") diff --git a/bzip2.changes b/bzip2.changes new file mode 100644 index 0000000..03d817a --- /dev/null +++ b/bzip2.changes @@ -0,0 +1,268 @@ +* Mon Jun 7 2021 jengelh@inai.de +- Drop --with-pic (no effect with --disable-static) +- Use %%autosetup (rediff bzip2-1.0.6.2-autoconfiscated.patch to p1) +* Wed Oct 30 2019 suse+build@de-korte.org +- Use correct version in autotools patchset + M bzip2-1.0.6.2-autoconfiscated.patch +* Mon Jul 22 2019 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 2019 mpluskal@suse.com +- Update bug reference +- Fix downloaded patches +* Thu Jun 27 2019 bjorn.lie@gmail.com +- Update to version 1.0.7: + * Fix undefined behavior in the macros SET_BH, CLEAR_BH, & + ISSET_BH. + * bzip2: Fix return value when combining --test,-t and -q. + * bzip2recover: Fix buffer overflow for large argv[0]. + * bzip2recover: Fix use after free issue with outFile + (CVE-2016-3189). + * Make sure nSelectors is not out of range (CVE-2019-12900 + bsc#1139083) +- Drop patches fixed upstream: + * bzip2-unsafe_strcpy.patch. + * bzip2-1.0.6-CVE-2016-3189.patch. +- Refresh patches with quilt. +* Thu Apr 18 2019 kstreitova@suse.com +- add bzip2-1.0.6-CVE-2016-3189.patch to fix a heap use after + free vulnerability that was reported in bzip2recover [bsc#985657] + [CVE-2016-3189] +* Tue Aug 21 2018 christophe@krop.fr +- Replace the URL. The bzip.org owner changed [bsc#1104445]. +- Remove the URL from the 'Source' line. The 1.0.6 version is not + available. +- Run spec-cleaner. +* Wed Feb 28 2018 tchvatal@suse.com +- Update autotools patchset: + D bzip2-1.0.6-autoconfiscated.patch + A bzip2-1.0.6.2-autoconfiscated.patch +* Thu Feb 22 2018 fvogt@suse.com +- Use %%license (boo#1082318) +* Sat Nov 4 2017 bwiedemann@suse.com +- Fix build on Fedora and Mageia +* Tue Oct 31 2017 sbrabec@suse.com +- Update bzip2-1.0.6-autoconfiscated.patch: + * Bump version to 1.0.6. + * Fix script symlinks on platforms with EXEEXT. +* Tue Jun 6 2017 mpluskal@suse.com +- Drop implicit pie building +- Try profiled build +- Move autoreconf to build section +* Thu Mar 23 2017 kstreitova@suse.com +- cleanup with spec-cleaner +* Thu Mar 24 2016 kstreitova@suse.com +- add bzip2-1.0.6-bzgrep_return_value.patch to fix bzgrep wrapper + that always returns 0 as an exit code when grepping multiple + archives [bsc#970260] +* Wed Jan 13 2016 idonmez@suse.com +- Remove bzip2-faster.patch, it causes a crash with libarchive and + valgrind points out uninitialized memory. See + https://github.com/libarchive/libarchive/issues/637#issuecomment-170612576 +* Thu Jan 8 2015 olaf@aepfle.de +- Avoid noarch sub package in SLE_11 +* Mon Dec 29 2014 tchvatal@suse.com +- Cleanup a bit. +- Remove the profiling stuff as it should not be used nowdays. + At least even factory builds without it. +- Provide libbz2.so.1.0 as other distros do, so we can run tiny + things like steam. +- Respect cflags again, borked by previous commit. +* Fri Dec 19 2014 meissner@suse.com +- build with PIE +* Mon Nov 3 2014 ledest@gmail.com +- fix basisms in bzgrep and bznew +- add patches: + * bzip2-1.0.6-fix-bashisms.patch +* Tue Sep 2 2014 vcizek@suse.com +- revert the bzip2-handle_pipe_input_with-f_option.patch because it + breaks other programs using the bzip2 library +* Wed Aug 6 2014 idonmez@suse.com +- Implement %%check +* Tue Aug 5 2014 vcizek@suse.com +- handle pipe input with the -f option (bnc#884004) + * added bzip2-handle_pipe_input_with-f_option.patch +* Thu Jul 31 2014 dimstar@opensuse.org +- Rename rpmlintrc to %%{name}-rpmlintrc. + Follow the packaging guidelines. +* Thu Mar 21 2013 mmeister@suse.com +- Added url as source. + Please see http://en.opensuse.org/SourceUrls +* Mon Jan 21 2013 idonmez@suse.com +- Add %%{version} to Obsoletes/Provides +* Mon Jan 21 2013 jengelh@inai.de +- Executing autoreconf requires autoconf +- Set RPM groups to the common ones we use for library and + "-devel" packages +* Sun Feb 12 2012 crrodriguez@opensuse.org +- Put libraries back into %%{_libdir}, /usr merge project. +* Thu Jan 26 2012 sitter@kde.org +- Drop bzip2-maxlen20.patch as pre-2005 compatibility should not + be a concern anymore. +* Sat Jan 7 2012 crrodriguez@opensuse.org +- bzlib: open file descriptors with O_CLOEXEC, but just like + the zlib case, only when bzopen() is used and not bzdopen() + to avoid messing up with the caller's semantics. + It is responsability of to initiator to set that flag in such case. +- Replace error prone list of exported symbols with proper use of + GCC visibility features. +* Fri Sep 30 2011 coolo@suse.com +- add libtool as buildrequire to make the spec file more reliable +* Sat Sep 17 2011 jengelh@medozas.de +- Remove redundant tags/sections from specfile +* Wed Aug 10 2011 puzel@novell.com +- package all documentation files referenced by README; also + point to bzip2-doc package (bnc#709260) +* Tue Jul 26 2011 jengelh@medozas.de +- Update baselibs.conf to ship libbz2-devel-32bit +* Mon Nov 29 2010 cristian.rodriguez@opensuse.org +- extend bzip2-1.0.6-autoconfiscated.patch to support + an LD version script so we export only public symbols +* Wed Nov 3 2010 puzel@novell.com +- use new version of autoconfiscate patch (by sbrabec) +* Thu Sep 23 2010 puzel@novell.com +- update to bzip2-1.0.6 + - fixes CVE-2010-0405 +- drop bzip2-CVE-2010-0405 (upstream) +* Tue Sep 21 2010 puzel@novell.com +- add bzip2-CVE-2010-0405.patch (bnc#636978) +- fix copy-paste error in profile_bzip2() +* Mon Jun 28 2010 jengelh@medozas.de +- use %%_smp_mflags +* Wed Dec 16 2009 jengelh@medozas.de +- package documentation as noarch +* Sat Dec 12 2009 jengelh@medozas.de +- add baselibs.conf as a source +* Tue Nov 24 2009 sbrabec@suse.cz +- Package migrated to autoconf. +* Sun Jun 7 2009 crrodriguez@suse.de +- remove static libraries see bnc#509945 for details +* Wed Dec 10 2008 olh@suse.de +- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade + (bnc#437293) +* Thu Oct 30 2008 olh@suse.de +- obsolete old -XXbit packages (bnc#437293) +* Fri Aug 1 2008 jw@suse.de +- added missing header to bznew [bnc#413261] +* Wed May 14 2008 coolo@suse.de +- fix rename of xxbit packages +* Thu Apr 10 2008 ro@suse.de +- added baselibs.conf file to build xxbit packages + for multilib support +* Thu Apr 3 2008 lmichnovic@suse.cz +- update to version 1.5 + * Fixes CERT-FI 20469 as it applies to bzip2 + which obsoletes bzip2-CVE-2008-1372-CERT-FI-20469.patch +- installing scripts bzdiff, bzgrep, bzmore + and symlinks bzless, bzcmp [bnc#376464] +- addded CFLAGS in Makefile-libbz2_so (cflags.patch) +- fix unsafe strcpy in bzip2recover (unsafe_strcpy.patch) + Thanks to Red Hat. +* Wed Mar 19 2008 nadvornik@suse.cz +- fixed buffer overflows CVE-2008-1372 [bnc#372047] +* Thu Dec 6 2007 lmichnovic@suse.cz +- bznew can now repack also .tar.gz files [#342612] + The dot in suffix is explicitly checked +* Thu Nov 8 2007 lmichnovic@suse.cz +- added README, LICENSE, CHANGES files to libbz2-1 package +* Sun Jun 3 2007 schwab@suse.de +- Fix dependency. +* Wed May 30 2007 lmichnovic@suse.cz +- renamed lib to libbz2-1 according to Shared Library Packaging + Policy +- calling ldconfig for libbz2-1 package +* Fri May 25 2007 dmueller@suse.de +- build with profile feedback enabled (7-15%% speedup) +* Fri Mar 30 2007 rguenther@suse.de +- Add PreReq to libbz2 from bzip2 to work around update problems +* Fri Mar 23 2007 rguenther@suse.de +- Split off doc, libbz2 and libbz2-devel packages +* Mon Jan 15 2007 lmichnovic@suse.cz +- Update to version 1.0.4 + * Fixes some minor bugs since the last version, 1.0.3. + * Fix file permissions race problem (CAN-2005-0953). + * Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD + scan. + * 'const'/prototype cleanups in the C code. + * Change default install location to /usr/local, and handle + multiple 'make install's without error. + * Sanitise file names more carefully in bzgrep. Fixes + CAN-2005-0758 to the extent that applies to bzgrep. + * Use 'mktemp' rather than 'tempfile' in bzdiff. + * Tighten up a couple of assertions in blocksort.c following + automated analysis. + * Fix minor doc/comment bugs. +* Mon Oct 16 2006 dmueller@suse.de +- strip .la files +* Wed Jan 25 2006 mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Jan 17 2006 schwab@suse.de +- Don't strip binaries. +* Fri Aug 12 2005 mls@suse.de +- make decompress much faster +- compile with -O3 +- go back to maxlen=20 when compressing +* Thu Aug 4 2005 ro@suse.de +- next libdir: only package lib* +* Thu Aug 4 2005 ro@suse.de +- do not package all of libdir (debuginfo) +* Mon Aug 1 2005 mjancar@suse.cz +- update to 1.0.3 +* Tue Jun 28 2005 kukuk@suse.de +- Move shared libraries to /%%{_lib} +* Thu Mar 24 2005 werner@suse.de +- Add bznew, a changeed version of the gzip znew. +* Tue Apr 20 2004 mmj@suse.de +- Fix strict aliasing +* Sun Jan 11 2004 adrian@suse.de +- add %%defattr and %%run_ldconfig +* Wed Jul 23 2003 tcrhak@suse.cz +- fixed URL +* Tue Jul 23 2002 tcrhak@suse.cz +- renamed to bzip2 +* Tue Feb 5 2002 tcrhak@suse.cz +- update to version 1.0.2 +- bziped tarball +* Thu Mar 8 2001 nadvornik@suse.cz +- re-added /usr/include/bzlib.h +* Thu Mar 8 2001 bk@suse.de +- Replaced the -malign options with -mcpu=pentiumpro +* Tue Mar 6 2001 bk@suse.de +- add version info to libbz2 link to fix the library version number +- if i386, add -malign-loops=2 -malign-jumps=2 -malign-functions=2 +* Thu Nov 30 2000 aj@suse.de +- New version, compile with LFS support. +* Tue Oct 3 2000 kukuk@suse.de +- Set libdir for 64bit architectures +* Mon May 22 2000 nadvornik@suse.cz +- update to 1.0.0 +* Wed Apr 26 2000 nadvornik@suse.cz +- changed Group +* Mon Apr 10 2000 nadvornik@suse.cz +- added URL +* Tue Apr 4 2000 nadvornik@suse.cz +- fixed to compile +* Mon Apr 3 2000 bk@suse.de +- added libbz2 shared library support for s390 +* Thu Mar 2 2000 fehr@suse.de +- moved man pages to /usr/share/man +* Mon Sep 13 1999 bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Mon Sep 13 1999 fehr@suse.de +- update to 0.9.5d +* Thu Jul 1 1999 ro@suse.de +- update to 0.9.0c +* Fri Sep 18 1998 ro@suse.de +- update to 0.9.0b (including libbz2 and bzlib.h) +* Thu Oct 30 1997 fehr@suse.de +- add bzip package to S.u.S.E. distribution diff --git a/bzip2.spec b/bzip2.spec new file mode 100644 index 0000000..44b35ad --- /dev/null +++ b/bzip2.spec @@ -0,0 +1,134 @@ +# +# spec file for package bzip2 +# +# Copyright (c) 2022-2023 ZhuningOS +# + + +%define libname libbz2-1 +Name: bzip2 +Version: 1.0.8 +Release: 150400.1.122 +Summary: A Program for Compressing Files +License: BSD-3-Clause +Group: Productivity/Archiving/Compression +URL: https://sourceware.org/bzip2 +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 +Patch0: bzip2-1.0.6.2-autoconfiscated.patch +Patch3: bzip2-point-to-doc-pkg.patch +Patch4: bzip2-ocloexec.patch +BuildRequires: autoconf >= 2.57 +BuildRequires: libtool +BuildRequires: pkgconfig +# The following is a kludge to get updating bzip2 to after the split work +Requires(pre): %{libname} +Provides: bzip = %{version} +Obsoletes: bzip < %{version} + +%description +The bzip2 program is a program for compressing files. + +%package doc +Summary: The bzip2 program and Library Documentation +Group: Documentation/Other +BuildArch: noarch + +%description doc +The bzip2 program and library documentation. + +%package -n %{libname} +Summary: The bzip2 runtime library +Group: System/Libraries + +%description -n %{libname} +The bzip2 runtime library + +%package -n libbz2-devel +Summary: The bzip2 runtime library development files +Group: Development/Libraries/C and C++ +Requires: %{libname} = %{version} +Requires: glibc-devel + +%description -n libbz2-devel +The bzip2 runtime library development files. + +%prep +%autosetup -p1 + +%build +autoreconf -fiv +%configure \ + --disable-static +%if 0%{?do_profiling} + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" + %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" test + %make_build clean + %make_build CFLAGS="%{optflags} %{cflags_profile_feedback}" +%else + %make_build CFLAGS="%{optflags}" +%endif + +%install +%make_install pkgconfigdir=%{_libdir}/pkgconfig +gzip -9 manual.ps +gzip -dc %{SOURCE1} > bznew +install -Dpm 0755 bznew %{buildroot}%{_bindir}/bznew +install -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1 +# Steam and prolly others still use the 1.0 name, so we need to be +# compatible +# Remove this when all distros use the autotools based bzip2 release +ln -s libbz2.so.1 %{buildroot}/%{_libdir}/libbz2.so.1.0 + +find %{buildroot} -type f -name "*.la" -delete -print + +%post -n %{libname} -p /sbin/ldconfig +%postun -n %{libname} -p /sbin/ldconfig + +%check +%make_build test + +%files +%{_bindir}/bunzip2 +%{_bindir}/bzcat +%{_bindir}/bzcmp +%{_bindir}/bzdiff +%{_bindir}/bzegrep +%{_bindir}/bzfgrep +%{_bindir}/bzgrep +%{_bindir}/bzip2 +%{_bindir}/bzip2recover +%{_bindir}/bzless +%{_bindir}/bzmore +%{_bindir}/bznew +%{_mandir}/man1/bunzip2.1%{?ext_man} +%{_mandir}/man1/bzcat.1%{?ext_man} +%{_mandir}/man1/bzcmp.1%{?ext_man} +%{_mandir}/man1/bzdiff.1%{?ext_man} +%{_mandir}/man1/bzegrep.1%{?ext_man} +%{_mandir}/man1/bzfgrep.1%{?ext_man} +%{_mandir}/man1/bzgrep.1%{?ext_man} +%{_mandir}/man1/bzip2.1%{?ext_man} +%{_mandir}/man1/bzless.1%{?ext_man} +%{_mandir}/man1/bzmore.1%{?ext_man} +%{_mandir}/man1/bznew.1%{?ext_man} + +%files doc +%doc manual.ps.gz manual*.html bzip2.txt manual.pdf + +%files -n %{libname} +%{_libdir}/libbz2.so.* + +%files -n libbz2-devel +%license LICENSE +%doc CHANGES +%{_includedir}/bzlib.h +%{_libdir}/libbz2.so +%{_libdir}/pkgconfig/bzip2.pc + +%changelog