[med-svn] r17911 - trunk/packages/arb/trunk/debian/patches

Andreas Tille tille at moszumanska.debian.org
Tue Sep 2 14:33:39 UTC 2014


Author: tille
Date: 2014-09-02 14:33:39 +0000 (Tue, 02 Sep 2014)
New Revision: 17911

Modified:
   trunk/packages/arb/trunk/debian/patches/10_upstream_r12793__show_db_load_progress
   trunk/packages/arb/trunk/debian/patches/20_upstream_r12794__socket_permissions
Log:
DEP3 headers for patches


Modified: trunk/packages/arb/trunk/debian/patches/10_upstream_r12793__show_db_load_progress
===================================================================
--- trunk/packages/arb/trunk/debian/patches/10_upstream_r12793__show_db_load_progress	2014-09-02 14:28:32 UTC (rev 17910)
+++ trunk/packages/arb/trunk/debian/patches/10_upstream_r12793__show_db_load_progress	2014-09-02 14:33:39 UTC (rev 17911)
@@ -1,14 +1,20 @@
-Index: trunk/ARBDB/ad_load.cxx
-===================================================================
---- trunk/ARBDB/ad_load.cxx (revision 12438)
-+++ trunk/ARBDB/ad_load.cxx (revision 12793)
-@@ -18,4 +18,5 @@
+Author: Elmar Pruesse <elmar at pruesse.net>
+Last-Update: Tue, 02 Sep 2014 15:15:06 +0200
+Description: backported patch showing progress while ARB is loading a database
+ (needed as indicator/splash screen while ARB is launching)
+
+--- a/ARBDB/ad_load.cxx
++++ b/ARBDB/ad_load.cxx
+@@ -17,6 +17,7 @@
+ #include <arb_str.h>
  #include <arb_file.h>
  #include <arb_defs.h>
 +#include <arb_progress.h>
  
  #include "gb_key.h"
-@@ -656,9 +657,15 @@
+ #include "gb_localdata.h"
+@@ -655,12 +656,18 @@ static void DEBUG_DUMP_INDENTED(long dee
+ #endif // DEBUG_READ
  // ----------------------------------------
  
 -
@@ -18,36 +24,45 @@
      GB_MAIN_TYPE *Main = GB_MAIN(gbc_dest);
  
      DEBUG_DUMP_INDENTED(deep, GBS_global_string("Reading container with %li items", nitems));
-+
+ 
 +    progress.inc_to(ftell(in));
 +    if (progress.aborted()) {
 +        GB_export_error(progress.error_if_aborted());
 +        return -1;
 +    }
- 
++
      gb_create_header_array(gbc_dest, (int)nitems);
-@@ -850,5 +858,5 @@
+     gb_header_list *header = GB_DATA_LIST_HEADER(gbc_dest->d);
+     if (deep == 0 && GBCONTAINER_MAIN(gbc_dest)->allow_corrupt_file_recovery) {
+@@ -849,7 +856,7 @@ static long gb_read_bin_rek_V2(FILE *in,
+             case GB_DB: {
                  long size = gb_get_number(in);
                  // gbc->d.size  is automatically incremented
 -                if (gb_read_bin_rek_V2(in, gbc, size, version, reversed, deep+1)) {
 +                if (gb_read_bin_rek_V2(in, gbc, size, version, reversed, deep+1, progress)) {
                      if (!GBCONTAINER_MAIN(gbc_dest)->allow_corrupt_file_recovery) {
                          return -1;
-@@ -923,5 +931,5 @@
+                     }
+@@ -922,7 +929,7 @@ inline bool read_keyword(const char *exp
+     return as_expected;
  }
  
 -static long gb_read_bin(FILE *in, GBCONTAINER *gbc, bool allowed_to_load_diff) {
 +static long gb_read_bin(FILE *in, GBCONTAINER *gbc, bool allowed_to_load_diff, arb_progress& progress) {
      int   c = 1;
      long  i;
-@@ -1154,5 +1162,5 @@
+     long  error;
+@@ -1153,7 +1160,7 @@ static long gb_read_bin(FILE *in, GBCONT
+             if (Main->clock<=0) Main->clock++;
              // fall-through
          case 1: // master arb file
 -            error = gb_read_bin_rek_V2(in, gbc, nodecnt, version, reversed, 0);
 +            error = gb_read_bin_rek_V2(in, gbc, nodecnt, version, reversed, 0, progress);
              break;
          default:
-@@ -1446,5 +1454,8 @@
+             GB_internal_errorf("Sorry: This ARB Version does not support database format V%li", version);
+@@ -1445,7 +1452,10 @@ static GBDATA *GB_login(const char *cpat
+                 i = (input != stdin) ? gb_read_in_uint32(input, 0) : 0;
  
                  if (is_binary_db_id(i)) {
 -                    i = gb_read_bin(input, gbc, false);     // read or map whole db
@@ -57,7 +72,9 @@
 +                    }
                      gbc = Main->root_container;
                      fclose(input);
-@@ -1487,5 +1498,8 @@
+ 
+@@ -1486,7 +1496,10 @@ static GBDATA *GB_login(const char *cpat
+                             }
                              i = gb_read_in_uint32(input, 0);
                              if (is_binary_db_id(i)) {
 -                                err = gb_read_bin(input, gbc, true);
@@ -67,17 +84,19 @@
 +                                }
                                  fclose (input);
  
-Index: trunk/CORE/arb_progress.cxx
-===================================================================
---- trunk/CORE/arb_progress.cxx (revision 11401)
-+++ trunk/CORE/arb_progress.cxx (revision 12792)
-@@ -23,4 +23,5 @@
+                                 if (err) {
+--- a/CORE/arb_progress.cxx
++++ b/CORE/arb_progress.cxx
+@@ -22,6 +22,7 @@ struct null_counter: public arb_progress
+ 
      void inc() OVERRIDE {}
      void implicit_inc() OVERRIDE {}
 +    void inc_to(int x) OVERRIDE {}
      void done() OVERRIDE {}
      void restart(int) OVERRIDE {}
-@@ -143,4 +144,11 @@
+     void force_update() OVERRIDE {}
+@@ -142,6 +143,13 @@ public:
+ 
      void inc()          OVERRIDE { explicit_counter += 1; update_display_if_needed(); }
      void implicit_inc() OVERRIDE { implicit_counter += 1; update_display_if_needed(); }
 +    void inc_to(int x) {
@@ -89,25 +108,30 @@
 +    }
      
      void done() OVERRIDE {
-Index: trunk/CORE/arb_progress.h
-===================================================================
---- trunk/CORE/arb_progress.h (revision 12147)
-+++ trunk/CORE/arb_progress.h (revision 12792)
-@@ -45,4 +45,5 @@
+         implicit_counter = explicit_counter = maxcount;
+--- a/CORE/arb_progress.h
++++ b/CORE/arb_progress.h
+@@ -44,6 +44,7 @@ public:
+ 
      virtual void inc()                              = 0;
      virtual void implicit_inc()                     = 0;
 +    virtual void inc_to(int x)                      = 0;
      virtual void child_updates_gauge(double gauge)  = 0;
      virtual void done()                             = 0;
-@@ -132,4 +133,5 @@
+     virtual void force_update()                     = 0;
+@@ -131,6 +132,7 @@ public:
+     void force_update() { counter->force_update(); }
  
      void inc() { counter->inc(); }
 +    void inc_to(int x) { counter->inc_to(x); }
      void done() { counter->done(); }
      void auto_subtitles(const char *prefix) { counter->auto_subtitles(prefix); }
-@@ -245,4 +247,5 @@
  
+@@ -244,6 +246,7 @@ public:
+     const arb_progress& operator++() { inc(); return *this; } // ++progress
+ 
      void inc_by(int count) { arb_assert(count>0); while (count--) inc(); }
 +    void inc_to(int x) { used->inc_to(x); }
  
      void sub_progress_skipped() { used->child_terminated(); }
+ 

Modified: trunk/packages/arb/trunk/debian/patches/20_upstream_r12794__socket_permissions
===================================================================
--- trunk/packages/arb/trunk/debian/patches/20_upstream_r12794__socket_permissions	2014-09-02 14:28:32 UTC (rev 17910)
+++ trunk/packages/arb/trunk/debian/patches/20_upstream_r12794__socket_permissions	2014-09-02 14:33:39 UTC (rev 17911)
@@ -1,15 +1,20 @@
-Index: trunk/SH/arb_launcher
-===================================================================
---- trunk/SH/arb_launcher (revision 12288)
-+++ trunk/SH/arb_launcher (revision 12794)
-@@ -297,5 +297,5 @@
+Author: Elmar Pruesse <elmar at pruesse.net>  
+Last-Update: Tue, 02 Sep 2014 15:15:06 +0200
+Description: backported security fix
+
+--- a/SH/arb_launcher
++++ b/SH/arb_launcher
+@@ -296,7 +296,7 @@ create_pipe_reader() {
+     trap "term_handler $NAMED_PIPE" TERM
      trap "rm -f $NAMED_PIPE" EXIT
  
 -    { mkfifo $NAMED_PIPE && listen_pipe $NAMED_PIPE ; } || \
 +    { mkfifo -m 600 $NAMED_PIPE && listen_pipe $NAMED_PIPE ; } || \
        { echo "Error creating pipe '$NAMED_PIPE'" ; kill $PARENT_PID ; }
  
-@@ -326,6 +326,7 @@
+     debug "Pipe reader for '$NAMED_PIPE' terminates.."
+@@ -325,8 +325,9 @@ wait_for_pipe() {
+ }
  
  get_pipe_name() {
 -    local SOCKETDIR=$HOME/.arb_tmp/sockets
@@ -19,3 +24,4 @@
 +    chmod 0700 "$SOCKETDIR"
      echo "$SOCKETDIR/arb_launcher.$ARB_PID"
  
+     # instead of the above code, use the following to test a pipe-creation failure:




More information about the debian-med-commit mailing list