[-]
[+]
|
Deleted |
bacula.spec
|
@@ -1,347 +0,0 @@
-#
-# spec file for package bacula (Version 2.4.3)
-#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
-#
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
-Name: bacula
-%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
-BuildRequires: gcc-c++ libacl-devel sqlite-devel openssl-devel readline-devel
-BuildRequires: xorg-x11-devel qt qt-devel python python-devel atk-devel
-BuildRequires: cairo-devel expat fontconfig-devel freetype2-devel glib2-devel
-BuildRequires: gtk2-devel libpng-devel pango-devel xorg-x11-devel zlib-devel
-
-%if 0%{?sles_version} > 10 || 0%{?suse_version} > 1010
-BuildRequires: libqwt5-devel libqwt5
-%endif
-
-%if 0%{?suse_version}
-BuildRequires: tcpd-devel glitz-devel
-%endif
-
-%if 0%{?rhel_version} || 0%{?centos_version}
-BuildRequires: tcp_wrappers qt4-devel
-%endif
-
-License: GPL v2 or later
-Group: Productivity/Archiving/Backup
-Autoreqprov: on
-Version: 2.4.3
-Release: 1
-Summary: Bacula--The Network Backup Solution: Client Part
-URL: http://www.bacula.org
-Source0: %{name}-%{version}.tar.gz
-Source10: bacula-dir.init
-Source11: bacula-fd.init
-Source12: bacula-sd.init
-Source20: bacula-dir.fw
-Source21: bacula-fd.fw
-Source22: bacula-sd.fw
-#Patch: %{name}-%{version}-cflags.diff
-Patch1: 001-check-python26.diff
-Patch2: 2.4.3-cancel-after-network-outage.patch
-Patch3: 2.4.3-orphaned-jobs.patch
-Patch4: 2.4.3-prune-deadlock.patch
-Patch5: 2.4.3-update-slots.patch
-Patch6: 2.4.3-win32-runscript-unicode-path.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-
-%description
-Bacula comes by night and sucks the vital essence from your computers.
-Bacula is a set of computer programs that permit you (or the system
-administrator) to manage backup, recovery, and verification of computer
-data across a network of computers of different kinds. In technical
-terms, it is a network client/server-based backup program. Bacula is
-relatively easy to use and efficient, while offering many advanced
-storage management features that make it easy to find and recover lost
-or damaged files.
-
-
-
-%debug_package
-%package server
-Summary: Bacula - The Network Backup Solution - server part
-Group: Productivity/Archiving/Backup
-Requires: bacula = %{version}
-Autoreqprov: on
-
-%description server
-Bacula - It comes by night and sucks the vital essence from your
-computers. Bacula is a set of computer programs that permit you (or the
-system administrator) to manage backup, recovery, and verification of
-computer data across a network of computers of different kinds. In
-technical terms, it is a network client/server based backup program.
-Bacula is relatively easy to use and efficient, while offering many
-advanced storage management features that make it easy to find and
-recover lost or damaged files. This package contains Bacula server
-daemons.
-
-%package gui
-Summary: Bacula - The Network Backup Solution - admin GUI
-Group: Productivity/Archiving/Backup
-Requires: bacula = %{version}
-Autoreqprov: on
-
-%description gui
-Bacula - It comes by night and sucks the vital essence from your
-computers. Bacula is a set of computer programs that permit you (or the
-system administrator) to manage backup, recovery, and verification of
-computer data across a network of computers of different kinds. In
-technical terms, it is a network client/server based backup program.
-Bacula is relatively easy to use and efficient, while offering many
-advanced storage management features that make it easy to find and
-recover lost or damaged files. This package contains Bacula GUI
-programs bat (QT) and tray monitor (KDE/Gnome).
-
-
-
-%prep
-%setup -q
-#%patch
-%patch1 -p1
-%patch2
-%patch3
-%patch4
-%patch5
-%patch6
-
-%build
-unset NOFORTIFY
-%if 0%{?suse_version} >= 1100
-# bacula will crash otherwise
-NOFORTIFY='-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0'
-%endif
-CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS $NOFORTIFY" LDFLAGS="-L%{_libdir}" ./configure \
- --prefix=%{_prefix} \
- --libexecdir=%{_libdir} \
- --sbindir=%{_sbindir} \
- --bindir=%{_bindir} \
- --libdir=%{_libdir} \
- --infodir=%{_infodir} \
- --mandir=%{_mandir} \
- --sysconfdir=%{_sysconfdir}/bacula \
- --with-working-dir=/var/lib/bacula/working \
- --with-scriptdir=/usr/lib/bacula \
- --with-sqlite3 \
- --with-openssl \
- --with-python=/usr/ \
- --enable-bat \
- --enable-tray-monitor \
- --with-tcp-wrappers
-make CFLAGS="$RPM_OPT_FLAGS $NOFORTIFY" LDFLAGS="-L%{_libdir}"
-
-%install
-make DESTDIR=$RPM_BUILD_ROOT install
-install -m 755 src/qt-console/bat $RPM_BUILD_ROOT/%{_sbindir}/bat
-mkdir -p $RPM_BUILD_ROOT/etc/init.d
-install -m 755 %SOURCE10 $RPM_BUILD_ROOT/etc/init.d/bacula-dir
-install -m 755 %SOURCE11 $RPM_BUILD_ROOT/etc/init.d/bacula-fd
-install -m 755 %SOURCE12 $RPM_BUILD_ROOT/etc/init.d/bacula-sd
-ln -sf ../../etc/init.d/bacula-fd $RPM_BUILD_ROOT/%{_sbindir}/rcbacula-fd
-ln -sf ../../etc/init.d/bacula-sd $RPM_BUILD_ROOT/%{_sbindir}/rcbacula-sd
-ln -sf ../../etc/init.d/bacula-dir $RPM_BUILD_ROOT/%{_sbindir}/rcbacula-dir
-# remove /etc/bacula/startmysql
-# and /etc/bacula/stopmysql
-# as they are not needed (bug #145310)
-##rm $RPM_BUILD_ROOT/etc/bacula/startmysql $RPM_BUILD_ROOT/etc/bacula/stopmysql
-##rm $RPM_BUILD_ROOT/etc/bacula/bacula-ctl-dir $RPM_BUILD_ROOT/etc/bacula/bacula-ctl-fd $RPM_BUILD_ROOT/etc/bacula/bacula-ctl-sd
-rm $RPM_BUILD_ROOT/usr/lib/bacula/startmysql $RPM_BUILD_ROOT/usr/lib/bacula/stopmysql
-rm $RPM_BUILD_ROOT/usr/lib/bacula/bacula-ctl-dir $RPM_BUILD_ROOT/usr/lib/bacula/bacula-ctl-fd $RPM_BUILD_ROOT/usr/lib/bacula/bacula-ctl-sd
-#install fw definitions
-mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}/
-install -m 755 %SOURCE20 $RPM_BUILD_ROOT/%{_fwdefdir}/bacula-dir
-install -m 755 %SOURCE21 $RPM_BUILD_ROOT/%{_fwdefdir}/bacula-fd
-install -m 755 %SOURCE22 $RPM_BUILD_ROOT/%{_fwdefdir}/bacula-sd
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%preun
-%stop_on_removal bacula-fd
-
-%postun
-%restart_on_update bacula-fd
-%insserv_cleanup
-
-%preun server
-%stop_on_removal bacula-dir bacula-sd
-
-%postun server
-%restart_on_update bacula-dir bacula-sd
-%insserv_cleanup
-
-%files
-%defattr(-,root,root)
-%config /etc/init.d/bacula-fd
-%doc ABOUT-NLS COPYING INSTALL LICENSE README VERIFYING ReleaseNotes projects
-%{_sbindir}/bacula-fd
-%{_sbindir}/rcbacula-fd
-%{_sbindir}/bconsole
-%{_sbindir}/btraceback
-%config(noreplace) /etc/bacula/bacula-fd.conf
-%config(noreplace) /etc/bacula/bconsole.conf
-/usr/lib/bacula/btraceback.dbx
-/usr/lib/bacula/btraceback.gdb
-/usr/lib/bacula/gconsole
-/usr/lib/bacula/mtx-changer
-/usr/lib/bacula/bacula
-/usr/lib/bacula/dvd-handler
-/usr/lib/bacula/disk-changer
-/usr/lib/bacula/bconsole
-%dir /etc/bacula
-%dir /usr/lib/bacula
-%dir /var/lib/bacula
-%dir /var/lib/bacula/working
-%config %{_fwdefdir}/bacula-fd
|
[-]
[+]
|
Deleted |
001-check-python26.diff
^
|
@@ -1,73 +0,0 @@
---- bacula-2.4.3/configure.ori 2008-12-21 22:03:04.000000000 +0100
-+++ bacula-2.4.3/configure 2008-12-21 22:20:11.000000000 +0100
-@@ -15620,37 +15620,45 @@
- PYTHON_LIBS=
- if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
-- for python_root in /usr /usr/local /usr/sfw; do
-- for ver in python2.2 python2.3 python2.4 python2.5; do
-- if test -f $python_root/include/${ver}/Python.h; then
-- PYTHON_INCDIR=-I$python_root/include/${ver}
-- if test -d $python_root/lib64/${ver}/config; then
-- PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
-- else
-- PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
-- fi
-- break
-- fi
-+ if [ -a /usr/bin/python-config ] ; then
-+ PYTHON_INCDIR=`python-config --includes`
-+ PYTHON_LIBS=`python-config --libs`
-+ else
-+ for python_root in /usr /usr/local /usr/sfw; do
-+ for ver in python2.2 python2.3 python2.4 python2.5; do
-+ if test -f $python_root/include/${ver}/Python.h; then
-+ PYTHON_INCDIR=-I$python_root/include/${ver}
-+ if test -d $python_root/lib64/${ver}/config; then
-+ PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
-+ else
-+ PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
-+ fi
-+ break
-+ fi
-+ done
- done
-- done
-- if test x$PYTHON_INCDIR = x; then
-- if test -f $prefix/include/Python.h; then
-- PYTHON_INCDIR=-I$prefix/include
-- if test -d $prefix/lib64/config; then
-- PYTHON_LIBS="-L$prefix/lib64/config -lpython"
-- else
-- PYTHON_LIBS="-L$prefix/lib/config -lpython"
-- fi
-- else
-- { echo "$as_me:$LINENO: result: no" >&5
-+ if test x$PYTHON_INCDIR = x; then
-+ if test -f $prefix/include/Python.h; then
-+ PYTHON_INCDIR=-I$prefix/include
-+ if test -d $prefix/lib64/config; then
-+ PYTHON_LIBS="-L$prefix/lib64/config -lpython"
-+ else
-+ PYTHON_LIBS="-L$prefix/lib/config -lpython"
-+ fi
-+ else
-+ { echo "$as_me:$LINENO: result: no" >&5
- echo "${ECHO_T}no" >&6; }
-- { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
-+ { { echo "$as_me:$LINENO: error: Unable to find Python.h in standard locations" >&5
- echo "$as_me: error: Unable to find Python.h in standard locations" >&2;}
-- { (exit 1); exit 1; }; }
-+ { (exit 1); exit 1; }; }
-+ fi
- fi
- fi
- else
-- if test -f $withval/Python.h; then
-+ if test -x $withval/bin/python-config ; then
-+ PYTHON_INCDIR=`python-config --includes`
-+ PYTHON_LIBS=`python-config --libs`
-+ elif test -f $withval/Python.h; then
- PYTHON_INCDIR=-I$withval
- PYTHON_LIBS="-L$withval/config -lpython"
- elif test -f $withval/include/Python.h; then
|
[-]
[+]
|
Deleted |
2.4.3-cancel-after-network-outage.patch
^
|
@@ -1,135 +0,0 @@
-
- This patch fixes a problem when canceling job if client looses
- connection while being backed up
- Apply the patch to version 2.4.3 (and previous versions) with:
-
- cd <bacula-source>
- patch -p0 <2.4.3-cancel-after-network-outage.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/dird/backup.c
-===================================================================
---- src/dird/backup.c (révision 7772)
-+++ src/dird/backup.c (copie de travail)
-@@ -240,14 +240,16 @@
- }
- return false;
-
--/* Come here only after starting SD thread */
-+/* Come here only after starting SD thread
-+ * and we don't expect any EndJob message because the
-+ * the client don't have recieve the "backup" command.
-+ */
- bail_out:
- set_jcr_job_status(jcr, JS_ErrorTerminated);
-- Dmsg1(400, "wait for sd. use=%d\n", jcr->use_count());
-- /* Cancel SD */
-- cancel_storage_daemon_job(jcr);
-- wait_for_storage_daemon_termination(jcr);
-- Dmsg1(400, "after wait for sd. use=%d\n", jcr->use_count());
-+ Dmsg1(400, "wait for sd and fd. use=%d\n", jcr->use_count());
-+ /* Get status from SD and FD */
-+ wait_for_job_termination(jcr, false /* don't expect EndJob message*/);
-+ Dmsg1(400, "after wait for sd and fd. use=%d\n", jcr->use_count());
- return false;
- }
-
-@@ -258,7 +260,7 @@
- * are done, we return the job status.
- * Also used by restore.c
- */
--int wait_for_job_termination(JCR *jcr)
-+int wait_for_job_termination(JCR *jcr, bool expect_EndJob)
- {
- int32_t n = 0;
- BSOCK *fd = jcr->file_bsock;
-@@ -270,30 +272,51 @@
- int Encrypt = 0;
-
- set_jcr_job_status(jcr, JS_Running);
-- /* Wait for Client to terminate */
-- while ((n = bget_dirmsg(fd)) >= 0) {
-- if (!fd_ok &&
-- (sscanf(fd->msg, EndJob, &jcr->FDJobStatus, &JobFiles,
-- &ReadBytes, &JobBytes, &Errors, &VSS, &Encrypt) == 7 ||
-- sscanf(fd->msg, OldEndJob, &jcr->FDJobStatus, &JobFiles,
-- &ReadBytes, &JobBytes, &Errors) == 5)) {
-- fd_ok = true;
-- set_jcr_job_status(jcr, jcr->FDJobStatus);
-- Dmsg1(100, "FDStatus=%c\n", (char)jcr->JobStatus);
-- } else {
-- Jmsg(jcr, M_WARNING, 0, _("Unexpected Client Job message: %s\n"),
-- fd->msg);
-+
-+
-+ if (fd) {
-+ /* Wait for Client to terminate
-+ * In some conditions, the client isn't able to send
-+ * any messages and we should not wait for ages
-+ */
-+ int OK=true;
-+ int ret;
-+ while (OK && expect_EndJob) {
-+
-+ /* Even if the job is canceled, we let a chance to FD to
-+ * send EndJob message
-+ */
-+ if (job_canceled(jcr)) {
-+ OK=false;
-+ }
-+
-+ /* wait for data few minutes */
-+ ret = fd->wait_data_intr(3*60, 0);
-+ if (ret == 1) { /* get data */
-+ n = bget_dirmsg(fd);
-+ if (n >= 0 &&
-+ (sscanf(fd->msg, EndJob, &jcr->FDJobStatus, &JobFiles,
-+ &ReadBytes, &JobBytes, &Errors, &VSS, &Encrypt) == 7 ||
-+ sscanf(fd->msg, OldEndJob, &jcr->FDJobStatus, &JobFiles,
-+ &ReadBytes, &JobBytes, &Errors) == 5)) {
-+ fd_ok = true;
-+ set_jcr_job_status(jcr, jcr->FDJobStatus);
-+ OK=false; /* end of loop */
-+ } else {
-+ Jmsg(jcr, M_WARNING, 0, _("Unexpected Client Job message: %s\n"),
-+ fd->msg);
-+ }
-+ } /* else get timeout or network error */
-+
-+ if (is_bnet_error(fd)) {
-+ Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
-+ job_type_to_str(jcr->JobType), fd->bstrerror());
-+ OK=false;
-+ }
- }
-- if (job_canceled(jcr)) {
-- break;
-- }
-- }
-
-- if (is_bnet_error(fd)) {
-- Jmsg(jcr, M_FATAL, 0, _("Network error with FD during %s: ERR=%s\n"),
-- job_type_to_str(jcr->JobType), fd->bstrerror());
-+ fd->signal(BNET_TERMINATE); /* tell Client we are terminating */
- }
-- fd->signal(BNET_TERMINATE); /* tell Client we are terminating */
-
- /* Force cancel in SD if failing */
- if (job_canceled(jcr) || !fd_ok) {
-Index: src/dird/protos.h
-===================================================================
---- src/dird/protos.h (révision 7772)
-+++ src/dird/protos.h (copie de travail)
-@@ -52,7 +52,7 @@
- extern bool find_recycled_volume(JCR *jcr, bool InChanger, MEDIA_DBR *mr);
-
- /* backup.c */
--extern int wait_for_job_termination(JCR *jcr);
-+extern int wait_for_job_termination(JCR *jcr, bool expect_EndJob=true);
- extern bool do_backup_init(JCR *jcr);
- extern bool do_backup(JCR *jcr);
- extern void backup_cleanup(JCR *jcr, int TermCode);
|
[-]
[+]
|
Deleted |
2.4.3-orphaned-jobs.patch
^
|
@@ -1,24 +0,0 @@
-
- This patch fixes a case of orphaned jobs (and possible deadlock)
- during pruning.
- Apply it to Bacula 2.4.3 (possibly earlier versions) with:
-
- cd <bacula-source>
- patch -p0 <2.4.3-orphaned-jobs.patch
- ./configure <your-options>
- make
- ...
- make install
-
-Index: src/dird/ua_prune.c
-===================================================================
---- src/dird/ua_prune.c (revision 7949)
-+++ src/dird/ua_prune.c (working copy)
-@@ -468,6 +468,7 @@
- break;
- }
- }
-+ endeach_jcr(jcr);
- if (skip) {
- continue;
- }
|
[-]
[+]
|
Deleted |
2.4.3-prune-deadlock.patch
^
|
@@ -1,56 +0,0 @@
-
- This patch corrects a deadlock that can occure when using the catalog
- as message backend and the director decides to prune volumes.
-
- Apply it to Bacula 2.4.3 (possibly earlier versions)
- with:
-
- cd <bacula-source>
- patch -p0 <2.4.3-prune-deadlock.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/lib/jcr.c
-===================================================================
---- src/lib/jcr.c (révision 8063)
-+++ src/lib/jcr.c (copie de travail)
-@@ -438,7 +438,6 @@
-
- #endif
-
-- dequeue_messages(jcr);
- lock_jcr_chain();
- jcr->dec_use_count(); /* decrement use count */
- if (jcr->use_count() < 0) {
-@@ -455,6 +454,7 @@
- remove_jcr(jcr); /* remove Jcr from chain */
- unlock_jcr_chain();
-
-+ dequeue_messages(jcr);
- job_end_pop(jcr); /* pop and call hooked routines */
-
- Dmsg1(3400, "End job=%d\n", jcr->JobId);
-Index: src/dird/ua_prune.c
-===================================================================
---- src/dird/ua_prune.c (révision 8100)
-+++ src/dird/ua_prune.c (copie de travail)
-@@ -435,8 +435,6 @@
- return 0; /* cannot prune Archived volumes */
- }
-
-- db_lock(ua->db);
--
- /*
- * Now add to the list of JobIds for Jobs written to this Volume
- */
-@@ -477,6 +475,5 @@
- }
-
- bail_out:
-- db_unlock(ua->db);
- return count;
- }
-
|
[-]
[+]
|
Deleted |
2.4.3-update-slots.patch
^
|
@@ -1,79 +0,0 @@
-
- This patch corrects a problem when removing a volume from
- an autochanger and the slot is still empty when running
- update slots command. #1175
-
- Apply it to version 2.4.3 with:
-
- cd <bacula-source>
- patch -p0 <2.4.3-update-slots.patch
- ./configure <your-options>
- make
- ...
- make install
-
-Index: src/cats/sql_update.c
-===================================================================
---- src/cats/sql_update.c (revision 7854)
-+++ src/cats/sql_update.c (working copy)
-@@ -445,14 +445,28 @@
- db_make_inchanger_unique(JCR *jcr, B_DB *mdb, MEDIA_DBR *mr)
- {
- char ed1[50], ed2[50];
-- if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0 &&
-- mr->MediaId != 0) {
-- Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
-- "Slot=%d AND StorageId=%s AND MediaId!=%s",
-- mr->Slot,
-- edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2));
-- Dmsg1(400, "%s\n", mdb->cmd);
-- UPDATE_DB(jcr, mdb, mdb->cmd);
-+ if (mr->InChanger != 0 && mr->Slot != 0 && mr->StorageId != 0) {
-+
-+ if (mr->MediaId != 0) {
-+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
-+ "Slot=%d AND StorageId=%s AND MediaId!=%s",
-+ mr->Slot,
-+ edit_int64(mr->StorageId, ed1), edit_int64(mr->MediaId, ed2));
-+
-+ } else if (mr->VolumeName[0]) { /* We have a volume name */
-+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
-+ "Slot=%d AND StorageId=%s AND VolumeName!='%s'",
-+ mr->Slot,
-+ edit_int64(mr->StorageId, ed1), mr->VolumeName);
-+
-+ } else { /* used by ua_label to reset all volume with this slot */
-+ Mmsg(mdb->cmd, "UPDATE Media SET InChanger=0 WHERE "
-+ "Slot=%d AND StorageId=%s",
-+ mr->Slot,
-+ edit_int64(mr->StorageId, ed1), mr->VolumeName);
-+ }
-+ Dmsg1(100, "%s\n", mdb->cmd);
-+ UPDATE_DB(jcr, mdb, mdb->cmd);
- }
- }
-
-Index: src/cats/sql_create.c
-===================================================================
---- src/cats/sql_create.c (revision 7854)
-+++ src/cats/sql_create.c (working copy)
-@@ -459,14 +459,13 @@
- "WHERE MediaId=%d", dt, mr->MediaId);
- stat = UPDATE_DB(jcr, mdb, mdb->cmd);
- }
-+ /*
-+ * Make sure that if InChanger is non-zero any other identical slot
-+ * has InChanger zero.
-+ */
-+ db_make_inchanger_unique(jcr, mdb, mr);
- }
-
-- /*
-- * Make sure that if InChanger is non-zero any other identical slot
-- * has InChanger zero.
-- */
-- db_make_inchanger_unique(jcr, mdb, mr);
--
- db_unlock(mdb);
- return stat;
- }
|
[-]
[+]
|
Deleted |
2.4.3-win32-runscript-unicode-path.patch
^
|
@@ -1,289 +0,0 @@
-
- This patch fix #1110 about a problem when executing a program with
- Unicode path.
-
- It can be applied to 2.4.3 (and previous versions) with:
-
- cd <bacula-source>
- patch -p0 <2.4.3-win32-runscript-unicode-path.patch
- ./configure <your-options>
- make
- ...
- make install
-
-
-Index: src/win32/compat/compat.cpp
-===================================================================
---- src/win32/compat/compat.cpp (révision 7772)
-+++ src/win32/compat/compat.cpp (copie de travail)
-@@ -1807,6 +1807,97 @@
- }
-
- /**
-+ * Create the process with UTF8 API
-+ */
-+static BOOL
-+CreateChildProcessW(const char *comspec, const char *cmdLine,
-+ PROCESS_INFORMATION *hProcInfo,
-+ HANDLE in, HANDLE out, HANDLE err)
-+{
-+ STARTUPINFOW siStartInfo;
-+ BOOL bFuncRetn = FALSE;
-+
-+ // Set up members of the STARTUPINFO structure.
-+ ZeroMemory( &siStartInfo, sizeof(siStartInfo) );
-+ siStartInfo.cb = sizeof(siStartInfo);
-+ // setup new process to use supplied handles for stdin,stdout,stderr
-+
-+ siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-+ siStartInfo.wShowWindow = SW_SHOWMINNOACTIVE;
-+
-+ siStartInfo.hStdInput = in;
-+ siStartInfo.hStdOutput = out;
-+ siStartInfo.hStdError = err;
-+
-+ // Convert argument to WCHAR
-+ POOLMEM *cmdLine_wchar = get_pool_memory(PM_FNAME);
-+ POOLMEM *comspec_wchar = get_pool_memory(PM_FNAME);
-+
-+ UTF8_2_wchar(&cmdLine_wchar, cmdLine);
-+ UTF8_2_wchar(&comspec_wchar, comspec);
-+
-+ // Create the child process.
-+ Dmsg2(150, "Calling CreateProcess(%s, %s, ...)\n", comspec_wchar, cmdLine_wchar);
-+
-+ // try to execute program
-+ bFuncRetn = p_CreateProcessW((WCHAR*)comspec_wchar,
-+ (WCHAR*)cmdLine_wchar,// command line
-+ NULL, // process security attributes
-+ NULL, // primary thread security attributes
-+ TRUE, // handles are inherited
-+ 0, // creation flags
-+ NULL, // use parent's environment
-+ NULL, // use parent's current directory
-+ &siStartInfo, // STARTUPINFO pointer
-+ hProcInfo); // receives PROCESS_INFORMATION
-+
-+ free_pool_memory(cmdLine_wchar);
-+ free_pool_memory(comspec_wchar);
-+
-+ return bFuncRetn;
-+}
-+
-+
-+/**
-+ * Create the process with ANSI API
-+ */
-+static BOOL
-+CreateChildProcessA(const char *comspec, char *cmdLine,
-+ PROCESS_INFORMATION *hProcInfo,
-+ HANDLE in, HANDLE out, HANDLE err)
-+{
-+ STARTUPINFOA siStartInfo;
-+ BOOL bFuncRetn = FALSE;
-+
-+ // Set up members of the STARTUPINFO structure.
-+ ZeroMemory( &siStartInfo, sizeof(siStartInfo) );
-+ siStartInfo.cb = sizeof(siStartInfo);
-+ // setup new process to use supplied handles for stdin,stdout,stderr
-+ siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-+ siStartInfo.wShowWindow = SW_SHOWMINNOACTIVE;
-+
-+ siStartInfo.hStdInput = in;
-+ siStartInfo.hStdOutput = out;
-+ siStartInfo.hStdError = err;
-+
-+ // Create the child process.
-+ Dmsg2(150, "Calling CreateProcess(%s, %s, ...)\n", comspec, cmdLine);
-+
-+ // try to execute program
-+ bFuncRetn = p_CreateProcessA(comspec,
-+ cmdLine, // command line
-+ NULL, // process security attributes
-+ NULL, // primary thread security attributes
-+ TRUE, // handles are inherited
-+ 0, // creation flags
-+ NULL, // use parent's environment
-+ NULL, // use parent's current directory
-+ &siStartInfo,// STARTUPINFO pointer
-+ hProcInfo);// receives PROCESS_INFORMATION
-+ return bFuncRetn;
-+}
-+
-+/**
- * OK, so it would seem CreateProcess only handles true executables:
- * .com or .exe files. So grab $COMSPEC value and pass command line to it.
- */
-@@ -1815,44 +1906,30 @@
- {
- static const char *comspec = NULL;
- PROCESS_INFORMATION piProcInfo;
-- STARTUPINFOA siStartInfo;
- BOOL bFuncRetn = FALSE;
-
-- if (comspec == NULL) {
-+ if (!p_CreateProcessA || !p_CreateProcessW)
-+ return INVALID_HANDLE_VALUE;
-+
-+ if (comspec == NULL)
- comspec = getenv("COMSPEC");
-- }
- if (comspec == NULL) // should never happen
- return INVALID_HANDLE_VALUE;
-
- // Set up members of the PROCESS_INFORMATION structure.
- ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) );
-
-- // Set up members of the STARTUPINFO structure.
--
-- ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
-- siStartInfo.cb = sizeof(STARTUPINFO);
-- // setup new process to use supplied handles for stdin,stdout,stderr
- // if supplied handles are not used the send a copy of our STD_HANDLE
- // as appropriate
-- siStartInfo.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
-- siStartInfo.wShowWindow = SW_SHOWMINNOACTIVE;
-+ if (in == INVALID_HANDLE_VALUE)
-+ in = GetStdHandle(STD_INPUT_HANDLE);
-
-- if (in != INVALID_HANDLE_VALUE)
-- siStartInfo.hStdInput = in;
-- else
-- siStartInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
-+ if (out == INVALID_HANDLE_VALUE)
-+ out = GetStdHandle(STD_OUTPUT_HANDLE);
-
-- if (out != INVALID_HANDLE_VALUE)
-- siStartInfo.hStdOutput = out;
-- else
-- siStartInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
-- if (err != INVALID_HANDLE_VALUE)
-- siStartInfo.hStdError = err;
-- else
-- siStartInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
-+ if (err == INVALID_HANDLE_VALUE)
-+ err = GetStdHandle(STD_ERROR_HANDLE);
-
-- // Create the child process.
--
- char *exeFile;
- const char *argStart;
-
-@@ -1860,43 +1937,32 @@
- return INVALID_HANDLE_VALUE;
- }
-
-- int cmdLen = strlen(comspec) + 4 + strlen(exeFile) + strlen(argStart) + 1;
-+ POOL_MEM cmdLine(PM_FNAME);
-+ Mmsg(cmdLine, "%s /c %s%s", comspec, exeFile, argStart);
-
-- char *cmdLine = (char *)alloca(cmdLen);
--
-- snprintf(cmdLine, cmdLen, "%s /c %s%s", comspec, exeFile, argStart);
--
- free(exeFile);
-
-- Dmsg2(150, "Calling CreateProcess(%s, %s, ...)\n", comspec, cmdLine);
-+ if (p_CreateProcessW && p_MultiByteToWideChar) {
-+ bFuncRetn = CreateChildProcessW(comspec, cmdLine.c_str(), &piProcInfo,
-+ in, out, err);
-+ } else {
-+ bFuncRetn = CreateChildProcessA(comspec, cmdLine.c_str(), &piProcInfo,
-+ in, out, err);
-+ }
-
-- // try to execute program
-- bFuncRetn = CreateProcessA(comspec,
-- cmdLine, // command line
-- NULL, // process security attributes
-- NULL, // primary thread security attributes
|
|
Deleted |
bacula-2.4.3.tar.gz
^
|
[-]
[+]
|
Deleted |
bacula-dir.fw
^
|
@@ -1,4 +0,0 @@
-## Description: Bacula Director
-
-# space separated list of allowed TCP ports
-TCP="9101"
|
[-]
[+]
|
Deleted |
bacula-dir.init
^
|
@@ -1,88 +0,0 @@
-#! /bin/sh
-
-# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
-# All rights reserved.
-
-### BEGIN INIT INFO
-# Provides: bacula-dir
-# Required-Start: $local_fs $remote_fs $network mysql
-# Required-Stop: $local_fs $remote_fs $network mysql
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: bacula director
-# Description: Bacula network backup system director daemon
-### END INIT INFO
-
-# Shell functions sourced from /etc/rc.status:
-# rc_check check and set local and overall rc status
-# rc_status check and set local and overall rc status
-# rc_status -v ditto but be verbose in local rc status
-# rc_status -v -r ditto and clear the local rc status
-# rc_failed set local and overall rc status to failed
-# rc_failed <num> set local and overall rc status to <num><num>
-# rc_reset clear local rc status (overall remains)
-# rc_exit exit appropriate to overall rc status
-
-. /etc/rc.status
-
-BACULA_FD_BIN=/usr/sbin/bacula-dir
-test -x $BACULA_FD_BIN || { echo "$BACULA_FD_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-
-case "$1" in
- start)
- echo -n "Starting the Bacula Director daemon"
- startproc -q $BACULA_FD_BIN -c /etc/bacula/bacula-dir.conf
-
- rc_status -v
- ;;
-
-
- stop)
- echo -n "Shutting down the Bacula Director daemon"
-
- killproc -TERM $BACULA_FD_BIN
-
- rc_status -v
- ;;
- try-restart|condrestart)
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
- ;;
- restart)
- $0 stop
- $0 start
-
- rc_status
- ;;
- force-reload)
-
- $0 try-restart
- rc_status
- ;;
- reload)
- rc_failed 3
- rc_status -v
- ;;
- status)
- echo -n "Checking for service the Bacula Director daemon"
- checkproc $BACULA_FD_BIN
- rc_status -v
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
- exit 1
- ;;
-esac
-rc_exit
-
|
[-]
[+]
|
Deleted |
bacula-fd.fw
^
|
@@ -1,4 +0,0 @@
-## Description: Bacula File Daemon
-
-# space separated list of allowed TCP ports
-TCP="9102"
|
[-]
[+]
|
Deleted |
bacula-fd.init
^
|
@@ -1,89 +0,0 @@
-#! /bin/sh
-
-# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
-# All rights reserved.
-
-
-### BEGIN INIT INFO
-# Provides: bacula-fd
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: bacula file daemon
-# Description: Bacula network backup system file daemon
-### END INIT INFO
-
-# Shell functions sourced from /etc/rc.status:
-# rc_check check and set local and overall rc status
-# rc_status check and set local and overall rc status
-# rc_status -v ditto but be verbose in local rc status
-# rc_status -v -r ditto and clear the local rc status
-# rc_failed set local and overall rc status to failed
-# rc_failed <num> set local and overall rc status to <num><num>
-# rc_reset clear local rc status (overall remains)
-# rc_exit exit appropriate to overall rc status
-
-. /etc/rc.status
-
-BACULA_FD_BIN=/usr/sbin/bacula-fd
-test -x $BACULA_FD_BIN || { echo "$BACULA_FD_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-
-case "$1" in
- start)
- echo -n "Starting the Bacula File daemon"
- startproc -q $BACULA_FD_BIN -c /etc/bacula/bacula-fd.conf
-
- rc_status -v
- ;;
-
-
- stop)
- echo -n "Shutting down the Bacula File daemon"
-
- killproc -TERM $BACULA_FD_BIN
-
- rc_status -v
- ;;
- try-restart|condrestart)
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
- ;;
- restart)
- $0 stop
- $0 start
-
- rc_status
- ;;
- force-reload)
-
- $0 try-restart
- rc_status
- ;;
- reload)
- rc_failed 3
- rc_status -v
- ;;
- status)
- echo -n "Checking for service the Bacula File daemon"
- checkproc $BACULA_FD_BIN
- rc_status -v
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
- exit 1
- ;;
-esac
-rc_exit
-
|
[-]
[+]
|
Deleted |
bacula-sd.fw
^
|
@@ -1,4 +0,0 @@
-## Description: Bacula Storage Daemon
-
-# space separated list of allowed TCP ports
-TCP="9103"
|
[-]
[+]
|
Deleted |
bacula-sd.init
^
|
@@ -1,88 +0,0 @@
-#! /bin/sh
-
-# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
-# All rights reserved.
-
-### BEGIN INIT INFO
-# Provides: bacula-sd
-# Required-Start: $local_fs $remote_fs $network
-# Required-Stop: $local_fs $remote_fs $network
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: bacula storage daemon
-# Description: Bacula network backup system storage daemon
-### END INIT INFO
-
-# Shell functions sourced from /etc/rc.status:
-# rc_check check and set local and overall rc status
-# rc_status check and set local and overall rc status
-# rc_status -v ditto but be verbose in local rc status
-# rc_status -v -r ditto and clear the local rc status
-# rc_failed set local and overall rc status to failed
-# rc_failed <num> set local and overall rc status to <num><num>
-# rc_reset clear local rc status (overall remains)
-# rc_exit exit appropriate to overall rc status
-
-. /etc/rc.status
-
-BACULA_SD_BIN=/usr/sbin/bacula-sd
-test -x $BACULA_SD_BIN || { echo "$BACULA_SD_BIN not installed";
- if [ "$1" = "stop" ]; then exit 0;
- else exit 5; fi; }
-
-
-case "$1" in
- start)
- echo -n "Starting the Bacula Storage daemon"
- startproc -q $BACULA_SD_BIN -c /etc/bacula/bacula-sd.conf
-
- rc_status -v
- ;;
-
-
- stop)
- echo -n "Shutting down the Bacula Storage daemon"
-
- killproc -TERM $BACULA_SD_BIN
-
- rc_status -v
- ;;
- try-restart|condrestart)
- if test "$1" = "condrestart"; then
- echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
- fi
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset
- fi
- rc_status
- ;;
- restart)
- $0 stop
- $0 start
-
- rc_status
- ;;
- force-reload)
-
- $0 try-restart
- rc_status
- ;;
- reload)
- rc_failed 3
- rc_status -v
- ;;
- status)
- echo -n "Checking for service the Bacula Storage daemon"
- checkproc $BACULA_SD_BIN
- rc_status -v
- ;;
- *)
- echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
- exit 1
- ;;
-esac
-rc_exit
-
|