]> git.sur5r.net Git - bacula/bacula/commitdiff
various see kes-1.33
authorKern Sibbald <kern@sibbald.com>
Sat, 24 Jan 2004 16:19:05 +0000 (16:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 24 Jan 2004 16:19:05 +0000 (16:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1018 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/platforms/redhat/bacula.spec.in
bacula/src/cats/create_sqlite_database.in.patch [new file with mode: 0644]
bacula/src/console/console.c
bacula/src/console2.glade
bacula/src/dird/ua_run.c
bacula/src/lib/bnet.c
bacula/src/stored/dircmd.c

index 75c47ba49b5e0d3b5b1f7101081c531437355b59..8160b3f5be48534e204a14cb52b27ff3bd85ac1b 100644 (file)
@@ -56,7 +56,7 @@ BuildRequires: ORBit2-devel
 BuildRequires: libart_lgpl-devel >= 2.0
 BuildRequires: libbonobo-devel >= 2.0
 BuildRequires: libbonoboui-devel >= 2.0
-BuildRequires: bonobo-activation-devel >= 2.0
+BuildRequires: bonobo-activation-devel
 BuildRequires: GConf2-devel
 BuildRequires: linc-devel
 %endif
@@ -102,7 +102,7 @@ Requires: ORBit2
 Requires: libart_lgpl >= 2.0
 Requires: libbonobo >= 2.0
 Requires: libbonoboui >= 2.0
-Requires: bonobo-activation >= 2.0
+Requires: bonobo-activation
 Requires: GConf2
 Requires: linc
 %endif
@@ -204,6 +204,9 @@ cd ${cwd}
 # patch the make_sqlite_tables script for installation bindir
 patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
 
+# patch the create_sqlite_database script for installation bindir
+patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
+
 # patch the make_catalog_backup script for installation bindir
 patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
 
@@ -214,7 +217,7 @@ patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
         --with-scriptdir=/etc/bacula \
         --enable-smartalloc \
         --enable-gnome \
-       --enable-static-fd \
+          --enable-static-fd \
 %if %{mysql}
         --with-mysql \
 %else
@@ -431,7 +434,10 @@ echo "Creating bacula tables..."
 # add execute permission for console
 chmod 0755 /usr/sbin/gnome-console
 
-# create the tables
+# create the database and tables
+echo "Creating SQLite database..."
+/etc/bacula/create_sqlite_database
+echo "Creating the SQLite tables..."
 /etc/bacula/make_sqlite_tables
 
 %preun sqlite
@@ -518,6 +524,9 @@ rm -f /etc/bacula/rescue/sfdisk
 rm -rf /etc/bacula/rescue/diskinfo/*
 
 %changelog
+* Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added patch for create_sqlite_database to fix the installed bindir
+- added execute of create_sqlite_database to post of sqlite package
 * Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
 - added virtual package Provides bacula-dir, bacula-sd, bacula-fd
 - added bacula-fd as Requires for rescue package
diff --git a/bacula/src/cats/create_sqlite_database.in.patch b/bacula/src/cats/create_sqlite_database.in.patch
new file mode 100644 (file)
index 0000000..85d2dcb
--- /dev/null
@@ -0,0 +1,4 @@
+5c5
+< bindir=@SQL_BINDIR@
+---
+> bindir=/usr/lib/sqlite
index 6436ab9a3549e23e4470ff775e47356b1fa3eedb..3e3dc3cf7bd1ab1658eb99335900d20362e8876b 100644 (file)
@@ -404,6 +404,7 @@ try_again:
    LockRes();
    CONRES *cons = (CONRES *)GetNextRes(R_CONSOLE, (RES *)NULL);
    UnlockRes();
+   /* If cons==NULL, default console will be used */
    if (!authenticate_director(&jcr, dir, cons)) {
       fprintf(stderr, "ERR=%s", UA_sock->msg);
       terminate_console(0);
index 2c2619445c32b04c76388e4e1e8967d9aff2e93f..c62ae83ae82825aae9f62c5d9d5a68ca1efd5f21 100644 (file)
@@ -2,6 +2,7 @@
 <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
 <glade-interface>
+<requires lib="gnome"/>
 
 <widget class="GtkWindow" id="app1">
   <property name="visible">True</property>
              </child>
 
              <child>
-               <widget class="GtkHBox" id="hbox28">
+               <widget class="GtkAlignment" id="alignment1">
                  <property name="visible">True</property>
-                 <property name="homogeneous">False</property>
-                 <property name="spacing">0</property>
+                 <property name="xalign">0.5</property>
+                 <property name="yalign">0.5</property>
+                 <property name="xscale">1</property>
+                 <property name="yscale">1</property>
 
                  <child>
-                   <widget class="GtkHBox" id="hbox29">
+                   <widget class="GtkHBox" id="hbox28">
                      <property name="visible">True</property>
                      <property name="homogeneous">False</property>
                      <property name="spacing">0</property>
 
                      <child>
-                       <widget class="GtkLabel" id="label63">
+                       <widget class="GtkHBox" id="hbox29">
                          <property name="visible">True</property>
-                         <property name="label" translatable="yes">Job:</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
+                         <property name="homogeneous">False</property>
+                         <property name="spacing">0</property>
 
-                     <child>
-                       <widget class="GtkCombo" id="combo_job">
-                         <property name="visible">True</property>
-                         <property name="value_in_list">True</property>
-                         <property name="allow_empty">False</property>
-                         <property name="case_sensitive">False</property>
-                         <property name="enable_arrow_keys">True</property>
-                         <property name="enable_arrows_always">False</property>
-
-                         <child internal-child="entry">
-                           <widget class="GtkEntry" id="entry_job">
+                         <child>
+                           <widget class="GtkLabel" id="label63">
+                             <property name="width_request">66</property>
+                             <property name="height_request">16</property>
                              <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">False</property>
-                             <property name="visibility">True</property>
-                             <property name="max_length">0</property>
-                             <property name="text" translatable="yes"></property>
-                             <property name="has_frame">True</property>
-                             <property name="invisible_char" translatable="yes">*</property>
-                             <property name="activates_default">False</property>
-                             <signal name="changed" handler="on_entry_job_changed"/>
+                             <property name="label" translatable="yes">Job:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
                            </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
                          </child>
 
-                         <child internal-child="list">
-                           <widget class="GtkList" id="convertwidget6">
+                         <child>
+                           <widget class="GtkCombo" id="combo_job">
                              <property name="visible">True</property>
-                             <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+                             <property name="value_in_list">True</property>
+                             <property name="allow_empty">False</property>
+                             <property name="case_sensitive">False</property>
+                             <property name="enable_arrow_keys">True</property>
+                             <property name="enable_arrows_always">False</property>
+
+                             <child internal-child="entry">
+                               <widget class="GtkEntry" id="entry_job">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="editable">False</property>
+                                 <property name="visibility">True</property>
+                                 <property name="max_length">0</property>
+                                 <property name="text" translatable="yes"></property>
+                                 <property name="has_frame">True</property>
+                                 <property name="invisible_char" translatable="yes">*</property>
+                                 <property name="activates_default">False</property>
+                                 <signal name="changed" handler="on_entry_job_changed"/>
+                               </widget>
+                             </child>
 
-                             <child>
-                               <widget class="GtkListItem" id="convertwidget7">
+                             <child internal-child="list">
+                               <widget class="GtkList" id="convertwidget6">
                                  <property name="visible">True</property>
+                                 <property name="selection_mode">GTK_SELECTION_BROWSE</property>
 
                                  <child>
-                                   <widget class="GtkLabel" id="convertwidget8">
+                                   <widget class="GtkListItem" id="convertwidget7">
                                      <property name="visible">True</property>
-                                     <property name="label" translatable="yes"></property>
-                                     <property name="use_underline">False</property>
-                                     <property name="use_markup">False</property>
-                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                                     <property name="wrap">False</property>
-                                     <property name="selectable">False</property>
-                                     <property name="xalign">0</property>
-                                     <property name="yalign">0.5</property>
-                                     <property name="xpad">0</property>
-                                     <property name="ypad">0</property>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="convertwidget8">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes"></property>
+                                         <property name="use_underline">False</property>
+                                         <property name="use_markup">False</property>
+                                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                         <property name="wrap">False</property>
+                                         <property name="selectable">False</property>
+                                         <property name="xalign">0</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                     </child>
                                    </widget>
                                  </child>
                                </widget>
                              </child>
                            </widget>
+                           <packing>
+                             <property name="padding">1</property>
+                             <property name="expand">True</property>
+                             <property name="fill">True</property>
+                           </packing>
                          </child>
-                       </widget>
-                       <packing>
-                         <property name="padding">1</property>
-                         <property name="expand">True</property>
-                         <property name="fill">True</property>
-                       </packing>
-                     </child>
-
-                     <child>
-                       <widget class="GtkLabel" id="label64">
-                         <property name="visible">True</property>
-                         <property name="label" translatable="yes">   Type:</property>
-                         <property name="use_underline">False</property>
-                         <property name="use_markup">False</property>
-                         <property name="justify">GTK_JUSTIFY_CENTER</property>
-                         <property name="wrap">False</property>
-                         <property name="selectable">False</property>
-                         <property name="xalign">0.5</property>
-                         <property name="yalign">0.5</property>
-                         <property name="xpad">0</property>
-                         <property name="ypad">0</property>
-                       </widget>
-                       <packing>
-                         <property name="padding">0</property>
-                         <property name="expand">False</property>
-                         <property name="fill">False</property>
-                       </packing>
-                     </child>
 
-                     <child>
-                       <widget class="GtkCombo" id="combo_type">
-                         <property name="visible">True</property>
-                         <property name="value_in_list">True</property>
-                         <property name="allow_empty">False</property>
-                         <property name="case_sensitive">False</property>
-                         <property name="enable_arrow_keys">True</property>
-                         <property name="enable_arrows_always">False</property>
-
-                         <child internal-child="entry">
-                           <widget class="GtkEntry" id="entry_type">
+                         <child>
+                           <widget class="GtkLabel" id="label64">
                              <property name="visible">True</property>
-                             <property name="can_focus">True</property>
-                             <property name="editable">False</property>
-                             <property name="visibility">True</property>
-                             <property name="max_length">0</property>
-                             <property name="text" translatable="yes"></property>
-                             <property name="has_frame">True</property>
-                             <property name="invisible_char" translatable="yes">*</property>
-                             <property name="activates_default">False</property>
+                             <property name="label" translatable="yes">   Type:</property>
+                             <property name="use_underline">False</property>
+                             <property name="use_markup">False</property>
+                             <property name="justify">GTK_JUSTIFY_CENTER</property>
+                             <property name="wrap">False</property>
+                             <property name="selectable">False</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xpad">0</property>
+                             <property name="ypad">0</property>
                            </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
                          </child>
 
-                         <child internal-child="list">
-                           <widget class="GtkList" id="convertwidget9">
+                         <child>
+                           <widget class="GtkCombo" id="combo_type">
+                             <property name="width_request">141</property>
+                             <property name="height_request">24</property>
                              <property name="visible">True</property>
-                             <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+                             <property name="value_in_list">True</property>
+                             <property name="allow_empty">False</property>
+                             <property name="case_sensitive">False</property>
+                             <property name="enable_arrow_keys">True</property>
+                             <property name="enable_arrows_always">False</property>
+
+                             <child internal-child="entry">
+                               <widget class="GtkEntry" id="entry_type">
+                                 <property name="visible">True</property>
+                                 <property name="can_focus">True</property>
+                                 <property name="editable">False</property>
+                                 <property name="visibility">True</property>
+                                 <property name="max_length">0</property>
+                                 <property name="text" translatable="yes"></property>
+                                 <property name="has_frame">True</property>
+                                 <property name="invisible_char" translatable="yes">*</property>
+                                 <property name="activates_default">False</property>
+                               </widget>
+                             </child>
 
-                             <child>
-                               <widget class="GtkListItem" id="convertwidget10">
+                             <child internal-child="list">
+                               <widget class="GtkList" id="convertwidget9">
                                  <property name="visible">True</property>
+                                 <property name="selection_mode">GTK_SELECTION_BROWSE</property>
 
                                  <child>
-                                   <widget class="GtkLabel" id="convertwidget11">
+                                   <widget class="GtkListItem" id="convertwidget10">
                                      <property name="visible">True</property>
-                                     <property name="label" translatable="yes"></property>
-                                     <property name="use_underline">False</property>
-                                     <property name="use_markup">False</property>
-                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
-                                     <property name="wrap">False</property>
-                                     <property name="selectable">False</property>
-                                     <property name="xalign">0</property>
-                                     <property name="yalign">0.5</property>
-                                     <property name="xpad">0</property>
-                                     <property name="ypad">0</property>
+
+                                     <child>
+                                       <widget class="GtkLabel" id="convertwidget11">
+                                         <property name="visible">True</property>
+                                         <property name="label" translatable="yes"></property>
+                                         <property name="use_underline">False</property>
+                                         <property name="use_markup">False</property>
+                                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                         <property name="wrap">False</property>
+                                         <property name="selectable">False</property>
+                                         <property name="xalign">0</property>
+                                         <property name="yalign">0.5</property>
+                                         <property name="xpad">0</property>
+                                         <property name="ypad">0</property>
+                                       </widget>
+                                     </child>
                                    </widget>
                                  </child>
                                </widget>
                              </child>
                            </widget>
+                           <packing>
+                             <property name="padding">0</property>
+                             <property name="expand">False</property>
+                             <property name="fill">False</property>
+                           </packing>
                          </child>
                        </widget>
                        <packing>
-                         <property name="padding">6</property>
+                         <property name="padding">0</property>
+                         <property name="expand">True</property>
+                         <property name="fill">True</property>
+                       </packing>
+                     </child>
+
+                     <child>
+                       <widget class="GtkLabel" id="label114">
+                         <property name="visible">True</property>
+                         <property name="label" translatable="yes"> </property>
+                         <property name="use_underline">False</property>
+                         <property name="use_markup">False</property>
+                         <property name="justify">GTK_JUSTIFY_LEFT</property>
+                         <property name="wrap">False</property>
+                         <property name="selectable">False</property>
+                         <property name="xalign">0.5</property>
+                         <property name="yalign">0.5</property>
+                         <property name="xpad">0</property>
+                         <property name="ypad">0</property>
+                       </widget>
+                       <packing>
+                         <property name="padding">30</property>
                          <property name="expand">False</property>
                          <property name="fill">False</property>
                        </packing>
                      </child>
                    </widget>
-                   <packing>
-                     <property name="padding">0</property>
-                     <property name="expand">True</property>
-                     <property name="fill">True</property>
-                   </packing>
-                 </child>
-
-                 <child>
-                   <widget class="GtkLabel" id="label65">
-                     <property name="visible">True</property>
-                     <property name="label" translatable="yes"> </property>
-                     <property name="use_underline">False</property>
-                     <property name="use_markup">False</property>
-                     <property name="justify">GTK_JUSTIFY_CENTER</property>
-                     <property name="wrap">False</property>
-                     <property name="selectable">False</property>
-                     <property name="xalign">0.5</property>
-                     <property name="yalign">0.5</property>
-                     <property name="xpad">0</property>
-                     <property name="ypad">0</property>
-                   </widget>
-                   <packing>
-                     <property name="padding">30</property>
-                     <property name="expand">False</property>
-                     <property name="fill">False</property>
-                   </packing>
                  </child>
                </widget>
                <packing>
 
                  <child>
                    <widget class="GtkLabel" id="label66">
+                     <property name="width_request">65</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Client:</property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkLabel" id="label68">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">FileSet: </property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkButton" id="view_fileset_button">
+                     <property name="width_request">93</property>
+                     <property name="height_request">26</property>
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
                      <property name="label" translatable="yes">  View FileSet  </property>
 
                  <child>
                    <widget class="GtkLabel" id="label70">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Level:</property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkLabel" id="label72">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Pool:</property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkLabel" id="label96">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Storage:</property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkLabel" id="label98">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Messages:</property>
                      <property name="use_underline">False</property>
 
                  <child>
                    <widget class="GtkLabel" id="label77">
+                     <property name="width_request">66</property>
+                     <property name="height_request">16</property>
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Where: </property>
                      <property name="use_underline">False</property>
 
              <child>
                <widget class="GtkLabel" id="label100">
+                 <property name="width_request">66</property>
+                 <property name="height_request">16</property>
                  <property name="visible">True</property>
                  <property name="label" translatable="yes">When:</property>
                  <property name="use_underline">False</property>
index e95e050b06867492cb826fadbf2fc426cd1784f9..275340955668f3a4ce9ac1559b70ee3d27e96397 100644 (file)
@@ -289,11 +289,14 @@ int run_cmd(UAContext *ua, char *cmd)
       pool = (POOL *)GetResWithName(R_POOL, pool_name);
       if (!pool) {
          bsendmsg(ua, _("Pool \"%s\" not found.\n"), pool_name);
-        pool = get_pool_resource(ua);
+        pool = select_pool_resource(ua);
       }
    } else {
       pool = job->pool;            /* use default */
    }
+   if (!pool) {
+      return 1;
+   }
 
    if (client_name) {
       client = (CLIENT *)GetResWithName(R_CLIENT, client_name);
index 76350d7d30b42fba30f9ef204e42fc79a89a902c..c55d953c5d22e3c0a4fe6bb481a8a1f8673cac56 100644 (file)
@@ -318,11 +318,10 @@ bnet_send(BSOCK *bsock)
    int32_t pktsiz;
    int32_t msglen;
 
-   if (bsock->errors || bsock->terminated) {
+   if (bsock->errors || bsock->terminated || bsock->msglen > 1000000) {
       return 0;
    }
    msglen = bsock->msglen;
-   ASSERT(bsock->msglen < 1000000);
    pktsiz = htonl((int32_t)bsock->msglen);
    /* send int32_t containing size of data packet */
    bsock->timer_start = watchdog_time; /* start timer */
@@ -354,7 +353,6 @@ bnet_send(BSOCK *bsock)
 
    bsock->out_msg_no++;              /* increment message number */
    if (bsock->msglen <= 0) {         /* length only? */
-      ASSERT(msglen == bsock->msglen);
       return 1;                      /* yes, no data */
    }
 
@@ -381,7 +379,6 @@ bnet_send(BSOCK *bsock)
       }
       return 0;
    }
-   ASSERT(msglen == bsock->msglen);
    return 1;
 }
 
index b3ddd6341821d2953b4798ea5bc9f2824509bf80..89748b4c0d5e7d05e0acef0effc474739e5d00ff 100644 (file)
@@ -300,12 +300,8 @@ static int do_label(JCR *jcr, int relabel)
 
         P(dev->mutex);               /* Use P to avoid indefinite block */
         if (!(dev->state & ST_OPENED)) {
-           if (open_dev(dev, newname, READ_WRITE) < 0) {
-               bnet_fsend(dir, _("3994 Connot open device: %s\n"), strerror_dev(dev));
-           } else {
-              label_volume_if_ok(jcr, dev, oldname, newname, poolname, slot, relabel);
-              force_close_dev(dev);
-           }
+           label_volume_if_ok(jcr, dev, oldname, newname, poolname, slot, relabel);
+           force_close_dev(dev);
          /* Under certain "safe" conditions, we can steal the lock */
         } else if (dev->dev_blocked && 
                    (dev->dev_blocked == BST_UNMOUNTED ||