Hello community,

here is the log from the commit of package pbzip2 for openSUSE:Factory
checked in at Thu Jul 21 09:49:05 CEST 2011.



--------
--- pbzip2/pbzip2.changes       2011-03-29 02:05:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/pbzip2/pbzip2.changes  2011-07-21 
03:31:14.000000000 +0200
@@ -1,0 +2,16 @@
+Thu Jul 21 01:14:35 UTC 2011 - [email protected]
+
+- update to 1.1.5:
+  * SECURITY FIX: fixes excessive output permissions while compress/decompress
+    is in progress; it now emulates the same behaviour as bzip2
+
+-------------------------------------------------------------------
+Wed Apr 27 22:06:59 UTC 2011 - [email protected]
+
+- update to 1.1.4:
+  * fixes a hang on decompress with --ignore-trailing-garbage=1 when producer
+    is interrupted on trailing garbage
+  * adds an example to help for decompression piped to tar
+  * fixes a typo in the Trailing Garbage printed message
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  pbzip2-1.1.3.tar.bz2

New:
----
  pbzip2-1.1.5.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pbzip2.spec ++++++
--- /var/tmp/diff_new_pack.uNxoNM/_old  2011-07-21 09:47:43.000000000 +0200
+++ /var/tmp/diff_new_pack.uNxoNM/_new  2011-07-21 09:47:43.000000000 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           pbzip2
-Version:        1.1.3
+Version:        1.1.5
 Release:        1
 %define pkg_version %{version}
 License:        BSD4c

++++++ pbzip2-1.1.3.tar.bz2 -> pbzip2-1.1.5.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/AUTHORS new/pbzip2-1.1.5/AUTHORS
--- old/pbzip2-1.1.3/AUTHORS    2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/AUTHORS    2011-07-16 18:52:35.000000000 +0200
@@ -199,6 +199,13 @@
                     - Default extension on decompress of .tbz2 changed to .tar 
for
                       bzip2 compatibility (bug #743639)
                     - Print trailing garbage errors even when in quiet mode 
(bug #743635)
+                    - Fixed hang on decompress with 
--ignore-trailing-garbage=1 and higher
+                      numCPU (e.g. > 2) (bug #740502)
+                    - Default extension on decompress of .tbz2 changed to .tar 
for
+                      bzip2 compatibility (bug #743639)
+                    - Print trailing garbage errors even when in quiet mode 
(bug #743635)
+                    - Fixed excessive output permissions while 
compress/decompress
+                      is in progress (bug #807536)
 
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/COPYING new/pbzip2-1.1.5/COPYING
--- old/pbzip2-1.1.3/COPYING    2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/COPYING    2011-07-16 18:52:35.000000000 +0200
@@ -37,4 +37,4 @@
 
 Jeff Gilchrist, Ottawa, Canada.
 [email protected]
-pbzip2 version 1.1.3 of Mar 27, 2011
+pbzip2 version 1.1.5 of Jul 16, 2011
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/ChangeLog new/pbzip2-1.1.5/ChangeLog
--- old/pbzip2-1.1.3/ChangeLog  2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/ChangeLog  2011-07-16 18:52:35.000000000 +0200
@@ -1,3 +1,11 @@
+Changes in 1.1.5 (Jul 16, 2011)
+- Fixed excessive output permissions while compress/decompress
+  is in progress (bug #807536)
+Changes in 1.1.4 (Apr 22, 2011)
+- Fixed hang on decompress with --ignore-trailing-garbage=1 when
+  producer is interrupted on trailing garbage (bug #762464)
+- Added example to help for decompression piped to tar (bug #746806)
+- Fixed typo in Trailing Garbage printed message (bug #746799)
 Changes in 1.1.3 (Mar 27, 2011)
 - Print trailing garbage errors even when in quiet mode (bug #743635)
 - Default extension on decompress of .tbz2 changed to .tar for
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/README new/pbzip2-1.1.5/README
--- old/pbzip2-1.1.3/README     2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/README     2011-07-16 18:52:35.000000000 +0200
@@ -1,6 +1,6 @@
-Mar 27, 2011
+Jul 16, 2011
 
-Parallel BZIP2 v1.1.3 - by: Jeff Gilchrist <[email protected]>
+Parallel BZIP2 v1.1.5 - by: Jeff Gilchrist <[email protected]>
 Available at:  http://compression.ca/
 
 This is the README for pbzip2, a parallel implementation of the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/pbzip2.1 new/pbzip2-1.1.5/pbzip2.1
--- old/pbzip2-1.1.3/pbzip2.1   2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/pbzip2.1   2011-07-16 18:52:35.000000000 +0200
@@ -1,6 +1,6 @@
 .TH pbzip2 1
 .SH NAME
-pbzip2  \-  parallel bzip2 file compressor, v1.1.3
+pbzip2  \-  parallel bzip2 file compressor, v1.1.5
 .SH SYNOPSIS
 .B pbzip2
 .RB [ " \-123456789 " ]
@@ -152,6 +152,11 @@
 processors if autodetect not supported). It will use a maximum of 500MB of
 memory for decompression.  The switches -b, -r, and -1..-9 are not valid for
 decompression.
+.PP
+Example 6: pbzip2 -dc myfile.tar.bz2 | tar x
+.PP
+This example will decompress and untar the file "myfile.tar.bz2" piping
+the output of the decompressing pbzip2 to tar.
 .SH "SEE ALSO"
 bzip2(1)
 gzip(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/pbzip2.cpp new/pbzip2-1.1.5/pbzip2.cpp
--- old/pbzip2-1.1.3/pbzip2.cpp 2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/pbzip2.cpp 2011-07-16 18:52:35.000000000 +0200
@@ -9,7 +9,7 @@
  *           - uses libbzip2 by Julian Seward 
(http://sources.redhat.com/bzip2/)
  *           - Major contributions by Yavor Nikolov 
<[email protected]>
  *
- *     Date  : Mar 27, 2011
+ *     Date  : Jul 16, 2011
  *
  *  TODO
  *  Known Issues
@@ -192,6 +192,11 @@
  *                    - Default extension on decompress of .tbz2 changed to 
.tar for 
  *                      bzip2 compatibility (bug #743639)
  *                    - Print trailing garbage errors even when in quiet mode 
(bug #743635)
+ *                    - Fixed hang on decompress with 
--ignore-trailing-garbage=1 when
+ *                      producer is interrupted on trailing garbage (bug 
#762464)
+ *                    - Fixed excessive output permissions while 
compress/decompress
+ *                      is in progress (bug #807536)
+ *
  *
  *
  *  Specials thanks for suggestions and testing:  Phillippe Welsh,
@@ -248,7 +253,7 @@
  *
  * Jeff Gilchrist, Ottawa, Canada.
  * [email protected]
- * pbzip2 version 1.1.3 of Mar 27, 2011
+ * pbzip2 version 1.1.5 of Jul 16, 2011
  *
  */
 #include "pbzip2.h"
@@ -564,6 +569,53 @@
        return (count - bytesRemaining);
 }
 
+/*
+ * Open output file with least required privileges
+ */
+int safe_open_output(const char *path)
+{
+       return open(path, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, FILE_MODE);
+}
+
+/*
+ * Based on bzip2.c code
+ */
+FILE *safe_fopen_output(const char *path, const char *mode)
+{
+       int fh = safe_open_output(path);
+       if (fh == -1)
+       {
+               return NULL;
+       }
+       
+       FILE *fp = fdopen(fh, mode);
+       if (fp == NULL)
+       {
+               close(fh);
+       }
+
+       return fp;
+}
+
+/**
+ * Check if a given file exists.
+ *
+ * @return true if file exists and false if it doesn't
+ */
+bool check_file_exists( const char * filename )
+{
+       int hOutfile = open( filename, O_RDONLY | O_BINARY );
+       
+       if ( hOutfile == -1 )
+       {
+               return false;
+       }
+       else
+       {
+               close( hOutfile );
+               return true;
+       }
+}
 
 /*
  *********************************************************
@@ -1247,6 +1299,8 @@
 
                if (producerDecompressCheckInterrupt(hInfile, fileData, 
NumBlocks) != 0)
                {
+                       safe_cond_broadcast(fifo->notEmpty); // just in case
+                       syncSetProducerDone(1);
                        return 0;
                }
 
@@ -1272,6 +1326,8 @@
 
                        if (producerDecompressCheckInterrupt(hInfile, fileData, 
NumBlocks) != 0)
                        {
+                               safe_cond_broadcast(fifo->notEmpty); // just in 
case
+                               syncSetProducerDone(1);
                                safe_mutex_unlock(fifo->mut);
                                return 0;
                        }
@@ -1344,7 +1400,8 @@
                #endif
        }
        if ( (syncGetLastGoodBlock() != -1) &&
-               ( (lastElement == NULL) || (lastElement->blockNumber > 
syncGetLastGoodBlock()) ) )
+               ( (lastElement == NULL) || (lastElement->blockNumber > 
syncGetLastGoodBlock())
+                                       || lastElement->isLastInSequence ) )
        {
                isInterrupted = true;
 
@@ -1651,7 +1708,7 @@
        // write to file instead of stdout
        if (OutputStdOut == 0)
        {
-               hOutfile = open(OutFilename, O_RDWR | O_CREAT | O_TRUNC | 
O_BINARY, FILE_MODE);
+               hOutfile = safe_open_output(OutFilename);
                // check to see if file creation was successful
                if (hOutfile == -1)
                {
@@ -1906,7 +1963,7 @@
        // write to file instead of stdout
        if (OutputStdOut == 0)
        {
-               hOutfile = open(OutFilename, O_RDWR | O_CREAT | O_TRUNC | 
O_BINARY, FILE_MODE);
+               hOutfile = safe_open_output(OutFilename);
                // check to see if file creation was successful
                if (hOutfile == -1)
                {
@@ -2149,7 +2206,7 @@
        // see if we are outputting to stdout
        if (OutputStdOut == 0)
        {
-               stream = fopen(OutFilename, "wb");
+               stream = safe_fopen_output(OutFilename, "wb");
                if (stream == NULL)
                {
                        handle_error(EF_NOQUIT, -1,
@@ -3190,8 +3247,8 @@
  */
 void banner()
 {
-       fprintf(stderr, "Parallel BZIP2 v1.1.3 - by: Jeff Gilchrist 
[http://compression.ca]\n";);
-       fprintf(stderr, "[Mar. 27, 2011]               (uses libbzip2 by Julian 
Seward)\n");
+       fprintf(stderr, "Parallel BZIP2 v1.1.5 - by: Jeff Gilchrist 
[http://compression.ca]\n";);
+       fprintf(stderr, "[Jul. 16, 2011]               (uses libbzip2 by Julian 
Seward)\n");
        fprintf(stderr, "Major contributions: Yavor Nikolov 
<[email protected]>\n");
 
        return;
@@ -3246,6 +3303,7 @@
        fprintf(stderr, "Example: pbzip2 -p4 -r -5 myfile.tar second*.txt\n");
        fprintf(stderr, "Example: tar cf myfile.tar.bz2 
--use-compress-prog=pbzip2 dir_to_compress/\n");
        fprintf(stderr, "Example: pbzip2 -d -m500 myfile.tar.bz2\n");
+       fprintf(stderr, "Example: pbzip2 -dc myfile.tar.bz2 | tar x\n");
        fprintf(stderr, "\n");
        exit(-1);
 }
@@ -3803,7 +3861,7 @@
 
                        if (decompress == 1)
                        {
-                               fprintf(stderr, " Ignore Trailng Garbage: %s\n",
+                               fprintf(stderr, " Ignore Trailing Garbage: 
%s\n",
                                         (IgnoreTrailingGarbageFlag == 1) ? 
"on" : "off" );
                        }
                }
@@ -4031,19 +4089,19 @@
                }
 
                // check to see if output file exists
-               if ((force != 1) && (OutputStdOut == 0))
-               {
-                       hOutfile = open(outFilename.c_str(), O_RDONLY | 
O_BINARY);
-                       // check to see if file exists before processing
-                       if (hOutfile != -1)
+               if ((OutputStdOut == 0) && 
check_file_exists(outFilename.c_str()))
+               {       
+                       if (force != 1)
                        {
                                fprintf(stderr, "pbzip2: *ERROR: Output file 
[%s] already exists!  Use -f to overwrite...\n", outFilename.c_str());
                                fprintf(stderr, 
"-------------------------------------------\n");
                                errLevel = 1;
-                               close(hOutfile);
-                               errLevel = 1;
                                continue;
                        }
+                       else
+                       {
+                               remove(outFilename.c_str());
+                       }
                }
 
                if (readEntireFile == 1)
@@ -4116,7 +4174,7 @@
                                // write to file instead of stdout
                                if (OutputStdOut == 0)
                                {
-                                       hOutfile = open(outFilename.c_str(), 
O_RDWR | O_CREAT | O_TRUNC | O_BINARY, FILE_MODE);
+                                       hOutfile = 
safe_open_output(outFilename.c_str());
                                        // check to see if file creation was 
successful
                                        if (hOutfile == -1)
                                        {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/pbzip2.h new/pbzip2-1.1.5/pbzip2.h
--- old/pbzip2-1.1.3/pbzip2.h   2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/pbzip2.h   2011-07-16 18:52:35.000000000 +0200
@@ -16,11 +16,11 @@
 #include <string>
 #include <cctype>
 
+#define        FILE_MODE       (S_IRUSR | S_IWUSR )
+
 #ifndef WIN32
-#define        FILE_MODE       (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
 #define OFF_T          off_t
 #else
-#define        FILE_MODE       (S_IRUSR | S_IWUSR )
 #define OFF_T          __int64
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbzip2-1.1.3/pbzip2.spec new/pbzip2-1.1.5/pbzip2.spec
--- old/pbzip2-1.1.3/pbzip2.spec        2011-03-27 19:10:37.000000000 +0200
+++ new/pbzip2-1.1.5/pbzip2.spec        2011-07-16 18:52:35.000000000 +0200
@@ -1,5 +1,5 @@
 Name:          pbzip2
-Version:       1.1.3
+Version:       1.1.5
 Release:       1%{?dist}
 Summary:       Parallel implementation of bzip2
 URL:           http://www.compression.ca/pbzip2/
@@ -52,6 +52,12 @@
 
 
 %changelog
+* Sat Jul 16 2011 Jeff Gilchrist <[email protected]> - 1.1.5-1
+- Release 1.1.5
+
+* Sat Apr 22 2011 Jeff Gilchrist <[email protected]> - 1.1.4-1
+- Release 1.1.4
+
 * Sun Mar 27 2011 Jeff Gilchrist <[email protected]> - 1.1.3-1
 - Release 1.1.3
 


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to