Hello community,

here is the log from the commit of package star for openSUSE:Factory checked in 
at 2014-05-27 18:23:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/star (Old)
 and      /work/SRC/openSUSE:Factory/.star.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "star"

Changes:
--------
--- /work/SRC/openSUSE:Factory/star/star.changes        2013-12-10 
20:08:41.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.star.new/star.changes   2014-05-27 
18:23:43.000000000 +0200
@@ -1,0 +2,6 @@
+Mon May 26 15:06:49 UTC 2014 - vdziewie...@suse.com
+
+-Fix Bug 858660 - star does not detect gzip failures:
+       bnc#858660_detect_gzip_failures.patch
+
+-------------------------------------------------------------------

New:
----
  bnc#858660_detect_gzip_failures.patch

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

Other differences:
------------------
++++++ star.spec ++++++
--- /var/tmp/diff_new_pack.fn0TSg/_old  2014-05-27 18:23:46.000000000 +0200
+++ /var/tmp/diff_new_pack.fn0TSg/_new  2014-05-27 18:23:46.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package star
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -36,6 +36,8 @@
 Patch8:         star-getline.diff
 Patch9:         star-fexecve.diff
 Patch10:        star-1.5.1-bufferoverflow.patch
+#PATCH-FIX-OPENSUSE-bnc#858660
+Patch11:        bnc#858660_detect_gzip_failures.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  autoconf
 BuildRequires:  e2fsprogs-devel
@@ -87,6 +89,7 @@
 %patch8
 %patch9
 %patch10 -p1
+%patch11 -p1
 
 %build
 # bugzilla#134113: incompatible license and unused: SKH: removed

++++++ bnc#858660_detect_gzip_failures.patch ++++++
Index: star-1.5/star/buffer.c
===================================================================
--- star-1.5.orig/star/buffer.c
+++ star-1.5/star/buffer.c
@@ -37,6 +37,8 @@ static        char sccsid[] =
 #endif
 
 #include <stdio.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include <schily/stdlib.h>
 #include <schily/unistd.h>
 #include <schily/libport.h>    /* getpagesize() */
@@ -1731,6 +1733,10 @@ checkerrs()
                        errmsgno(EX_BAD, "Problems with restore database.\n");
                return (TRUE);
        }
+       if (xstats.s_comprerrs > 0) {
+               errmsgno(EX_BAD, "Compress program returned error[%d].\n", 
xstats.s_comprerrs);
+               return (TRUE);
+       }
        return (FALSE);
 }
 
@@ -1806,6 +1812,16 @@ die(err)
        excomerrno(err, "Cannot recover from error - exiting.\n");
 }
 
+void sigchld_handler(int sig)
+{
+       int status;
+       pid_t pid;
+       while ((pid = wait4(compresspid, &status, 0, NULL)) > 0) {
+               if (pid == compresspid)
+                       xstats.s_comprerrs = WEXITSTATUS(status);
+       }
+
+}
 /*
  * Quick hack to implement a -z flag. May be changed soon.
  */
@@ -1821,6 +1837,8 @@ compressopen()
        int     mypid;
        char    *zip_prog = "gzip";
 
+       compresspid = 0;
+
        if (compress_prg)
                zip_prog = compress_prg;
        else if (bzflag)
@@ -1880,6 +1898,7 @@ compressopen()
 #else
        if (fpipe(pp) == 0)
                comerr("Compress pipe failed\n");
+       signal(SIGCHLD, sigchld_handler);
        mypid = fork();
        if (mypid < 0)
                comerr("Compress fork failed\n");
@@ -1909,7 +1928,10 @@ compressopen()
                        fexecl(zip_prog, tarf, pp[1], null, zip_prog, "-d", 
(char *)NULL);
                errmsg("Compress: exec of '%s' failed\n", zip_prog);
                _exit(-1);
+       } else {
+               compresspid = mypid;
        }
+
        fclose(tarf);
        if (cflag) {
                tarf = pp[1];
Index: star-1.5/star/star.c
===================================================================
--- star-1.5.orig/star/star.c
+++ star-1.5/star/star.c
@@ -112,6 +112,7 @@ char        strvers[] = "1.5";              /* The pure ver
 char   *vers;                          /* the full version string      */
 
 struct star_stats      xstats;         /* for printing statistics      */
+pid_t compresspid = 0;
 
 extern BOOL            havepat;        /* Pattern matching in use      */
 
Index: star-1.5/star/star.h
===================================================================
--- star-1.5.orig/star/star.h
+++ star-1.5/star/star.h
@@ -823,9 +823,11 @@ struct star_stats {
        int     s_setxattr;     /* set xattr for file failed              */
 #endif
        int     s_restore;      /* other incremental restore specific     */
+       int     s_comprerrs;    /* errors of compress-subprogram */
 };
 
 extern struct  star_stats      xstats;
+extern  pid_t compresspid;      /* pid of compress-subprogram child */
 
 
 #include <schily/param.h>
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to