-Release 1.38.4 16Jan06 released 17 Jan 06:
+Release 1.38.6 (28Mar06) released 29Mar06
+28Mar06
+- Back port from 1.39 fixes to lib/jcr.c to use foreach_jcr()
+ and new jcr chain locking.
+26Mar06
+- Fix a long standing bug in the bacula start/stop scripts.
+- Attempt to add the new bacula-ctl-* files to the rpm.
+- Switch to using typeof() for list traversing to avoid
+ as many FC5 g++ compiler warnings as possible.
+25Mar06
+- Split the bacula start/start script into four files:
+ bacula -- starts and stops calling other scripts
+ bacula-ctl-dir -- starts/stops the director
+ bacula-ctl-fd -- starts/stops the File daemon
+ bacula-ctl-sd -- starts/stops the Storage daemon
+24Mar06
+- Create datestyle fix for PostgreSQL. Fixes bug #574.
+- Correct editing of JobId from int to int64 in fd_cmds.c
+- Eliminate FileSet name race with bash_spaces() and multiple
+ threads by bashing in a local.
+- Fix error return from 'use storage' to print a correct error
+ message rather than nothing.
+- Correct false re-read last block error message when two jobs
+ are simultaneously writing at the end of a tape.
+- Simplify exit conditions in the reserve.c code to avoid
+ possible non-release of reservation_lock().
+- Suffle lock order in reserve to avoid deadlock between
+ reservation lock and device mutex.
+- Add Thorsten's VSS timeout code to 1.38 branch.
+21Mar06
+- Initialize jcr mutex before first use. Thanks to Thorsten for
+ tracking this down for me !!!! as it broke the Win32 build.
+20Mar06
+- Integrate addition of line count limitation to bsmtp -l from
+ Sebastian Stark <stark at tuebingen.mpg.de>
+17Mar06
+- Implement regex test program in tools directory.
+- Attempt to fix time problem with bsmtp with foreign langs.
+- Add strip_trailing_newline() submitted by user.
+
+Release 1.38.6 beta6
+16Mar06
+- Fix bug #537 to allow arbitrary time to mount a volume for
+ restore, if polling is turned on.
+- Disallow multiple storage specifications for a job. Should fix Arno's
+ problem.
+- Add back a missing store of poolid in jr.poolid.
+- If dir_user or dir-group is specified in ./configure apply it to
+ the working-dir. Fixes bug #533.
+- If rescheduling a job cancel the previous incarnation with the SD.
+ Fixes bugs #566 and 557.
+- Fix bug #567 do_message() definition type conflict.
+
+Release 1.38.6 beta5
+14Mar06
+- Add more jcr methods and make mutex and use_count private.
+- Create lock/unlock methods for jcr.
+- Fix PostgreSQL bug doing sql_data_seeek() by explicitly reading
+ records to get to seek position.
+- Integrate patch from bug #561 to correct conio.c signal definitions.
+- Fix Rescheduling failed Jobs. Ensure that SD message thread
+ terminates correctly by doing pthread_kill(). Do not destroy
+ SD cond wait variable between executions of the job. Use local
+ mutex for cond variable to avoid blocking jcr chain. Fix poor
+ use of jcr use count in jobq.c for restarted jobs.
+- Fix obsolete usage of foreach_dlist() to use foreach_jcr() in
+ lib/jcr.c -- prevents locking the jcr chaing.
+- Apply patch from bug #564, which corrects listing volumes with
+ multiple autochangers. Apply same fix to next volume list.
+- Fix bug #562 where restore bootstrap file is not unique.
+- Use new routine lock_reservations() to lock the reservations
+ system, and call it while looking for a volume in askdir.c.
+ This could possibly fix bug #543.
+- Stop SD command loop if job is canceled.
+
+Beta4 attached to a bug report but not distributed.
+04Mar06
+- Fix new sql_use_result() code to properly release the
+ buffers in all cases.
+- Convert to using new Python class definitons with (object).
+- Use the keyword ujobid to mean the unique job id; job or jobname
+ to mean the Job name given on the Name directive, and jobid to
+ be the numeric (non-unique) job id.
+- Allow listing by any of the above.
+- Add the user friendly job report code for reporting job elapsed time
+ and rates with suffexes.
+- Add Priority and JobLevel as Python settable items.
+- Use TEMPORARY table creation where the table is created by
+ Bacula.
+- Add new code submitted by Eric for waiting on specific jobid.
+- Add ACL checking for the dot commands.
+- Fix restore of writable FIFOs.
+- Fix a bug in bpipe where the string was freed too early.
+
+26Feb06
+- Fix bug reported by Arno listing blocks with bls
+- Update the po files at Eric's request.
+
+Release 1.38.6-beta2 25Feb06
+25Feb06
+- Add sql_use_result() define.
+
+Release 1.38.6 beta1 24Feb06
+24Feb06
+- Don't open default catalog if not in ACL.
+22Feb06
+- Add virtual disk autochanger code.
+- Add user supplied bug fix to make two autochangers work
+ correctly using StorageId with InChanger checks.
+- Correct new/old_jcr confusion in copy_storage().
+- Remove & from Job during scan in msgchan.c -- probably
+ trashed the stack.
+- When getting the next Volume if no Volume in Append mode
+ exists and we are dealing with an Autochanger, search
+ for a Scratch Volume.
+- Check for missing value in dot commands -- bug fix.
+- Fix bug in update barcodes command line scanning.
+- Make sure Pool Max Vols is respected.
+- Check that user supplied a value before referencing
+ it in restore -- pointed out by Karl Hakimian.
+- Add Karl Hakimian's table insert code.
+- Don't ask user to select a specific Volume when
+ updating all volumes in a Pool.
+- Remove reservation if set for read when removing dcr.
+- Lock code that requests next appendable volume so that
+ two jobs to get the same Volume at the same time.
+- Add new Device Type = xxx code. Values are file, tape,
+ dvd, and fifo.
+- Preserve certain modes (ST_LABEL|ST_APPEND|ST_READ) across
+ a re-open to change read/write permission on a device.
+- Correct a misplaced double quote in certain autochanger
+ scripts.
+- Make make_catalog_backup.in a bit more portable.
+- Implement Karl Hakimian's sql_use_result(), which speeds
+ up restore tree building and reduces the memory load.
+- Correct a number of minor bugs in getting a Volume from
+ the Scratch Pool.
+- Implement additional command line options for update Volume.
+- Don't require user to enter a Volume name when updating
+ all Volumes in a pool.
+
+Release 1.38.5 released 19Jan06:
+19Jan06
+- Apply label barcodes fix supplied by Rudolf Cejka.
+18Jan06
+- Modify standard rpm installation to set SD group to disk
+ so that SD will by default have access to tape drives.
+- Allow users to specify user/group and start options
+ for each daemon in /etc/sysconf/bacula file.
+
+Release 1.38.4 14Jan06 released 17 Jan 06:
16Jan06
- Add two new queries to query.sql provided by Arno. One
list volumes known to the Storage device, and the other
volume so that it can handle multiple returns from the wait
code.
- Modify the wait code to permit multiple returns.
-- Return a zero when "autochanger drives" is called and
+- Return a zero when 'autochanger drives' is called and
it is not an autochanger.
- Make rewind_dev() a method taking a DCR as an argument.
This permits closing and reopening the drive if the
04Dec05
- Apply days keyword patch from Alexander.Bergolth at wu-wien.ac.at
If this patch is applied, the number of days can be specified with
- "list nextvol days=xx"
+ 'list nextvol days=xx'
or
- "status dir days=xx"
+ 'status dir days=xx'
My use case is to be able to preview the next scheduled job (and the
next tape to be used) on fridays if there are no scheduled jobs during
the weekend.
the user.
- Add Solaris ACL detection in configure.in as supplied by
Attila Fulop.
-- Implement "autochanger drives" protocol so that Dir knows
+- Implement 'autochanger drives' protocol so that Dir knows
how many drives an autochanger has.
- Do not request drive number in label, ... if only one drive.
- Turn off debug code.
- Make new_volume walk through all Vols looking for dev
to release.
16Sep05
-- Make "quit" command in console always allowed.
+- Make 'quit' command in console always allowed.
- Remove the storage list between each console command to
keep Dir from remembering a previously selected SD.
- Add code to reservation VOLRES subroutines to try to ensure
- Apply Nicolas' dvd-freespace.in patch.
- Make sure SQL table names are not translated.
- Eliminate incorrect message saying barcodes not
- found in "label barcodes" -- fixes bug report.
+ found in 'label barcodes' -- fixes bug report.
Changes to 1.37.38:
07Sep05
- Correct ssize_t problem in build of Win32
- Add code to llprint pools and volumes to debug next item.
- From bug report, fix resetting Pool defaults in Volume. It
- was a typo "Max" was missing in several places.
+ was a typo 'Max' was missing in several places.
- Don't allow translation of database Volume Status values.
Changes to 1.37.37 released 26 Aug 05
other searches.
- Fix picking up drive in Dir so that it is not done in
the status command.
-- Eliminate double check on "loaded" for autochanger.
+- Eliminate double check on 'loaded' for autochanger.
17Aug05
- Start coding better reservation algorithm
- Always look for slot for label command.
search to avoid two threads competing for the same
resource.
- Correct a return code in find_suitable_device_for_job()
- Possibly cause of "busy writing to another volume".
+ Possibly cause of 'busy writing to another volume'.
03Aug05
- Modify open() for tape so nonblocking really works.
- Use fcntl() to reset blocking status rather than close()
been adapted.
- Remove set_exit_on_error function
07Apr05
- - Fix "unknown device type" problem with DVD devices.
+ - Fix 'unknown device type' problem with DVD devices.
- Fix crash when there is no media in the DVD drive.
09Jan05
- Update the documentation and ReleaseNotes.
29Dec04
- Add VolParts field in Media table
- Add MaximumPartSize directive in Device (SD configuration file)
- - File Volumes can now be splitted in multiple files ("parts")
- - Fix SQL error in sql_list while doing "llist jobmedia"
+ - File Volumes can now be splitted in multiple files ('parts')
+ - Fix SQL error in sql_list while doing 'llist jobmedia'
Changes to 1.37.30 released 16 July 2005:
14Jul05
-- Fix "dir" command scanning field misalignment in
+- Fix 'dir' command scanning field misalignment in
wx-console.
- Switch to using the wxWidgets Unicode library.
- Include msvcr71.dll in distribution.
file sizes for restore and dir of catalog, otherwise
GB sizes are truncated -- fixes bug report.
- Modify wx-console to know about 10 character widths.
-- Allow decending into top level directory if "recurse=no"
+- Allow decending into top level directory if 'recurse=no'
is set. Fixes a bug report.
- Install pthreadVCE.dll when installing console or wx-console
on Win32 systems. Fixes bug report.
30Jun05
- Detect device mounted for DVD and suppress be sure to
mount message after label.
-- Set Cleaning tape status to "Cleaning" and force no
+- Set Cleaning tape status to 'Cleaning' and force no
MediaType.
- Get DVD writing working with new standard Bacula open()
code.
- Rename get_filename() to make more sense.
-- Detect "is already mounted on" on mount command so to avoid
+- Detect 'is already mounted on' on mount command so to avoid
error if device is already mounted.
- Eliminated guess_name() code. It may be necessary to
add it back later.
been adapted.
- Remove set_exit_on_error function
07Apr05
- - Fix "unknown device type" problem with DVD devices.
+ - Fix 'unknown device type' problem with DVD devices.
- Fix crash when there is no media in the DVD drive.
09Jan05
- Update the documentation and ReleaseNotes.
29Dec04
- Add VolParts field in Media table
- Add MaximumPartSize directive in Device (SD configuration file)
- - File Volumes can now be splitted in multiple files ("parts")
- - Fix SQL error in sql_list while doing "llist jobmedia"
+ - File Volumes can now be splitted in multiple files ('parts')
+ - Fix SQL error in sql_list while doing 'llist jobmedia'
Changes to 1.37.23:
- Renamed to make unique version for open_next_part()
- Make restore.bsr have unique name.
- Allow user to define bsr filename on restore command line
with bootstrap=xxx.bsr
-- Add limit=nnn to "list jobs" command.
+- Add limit=nnn to 'list jobs' command.
- Remove old restore code that did not use .bsr file.
- unlink automatically generated bsr file.
- Cleanup heartbeat code so that duped fd is almost sure
by a user.
26Apr05
- Apply Tru64 patch supplied by Pascal Pederiva <freebsd@paped.com>
-- Apply Unicode fixes for Win32 from "Thorsten Engel"
+- Apply Unicode fixes for Win32 from 'Thorsten Engel'
<thorsten.engel@matrix-computer.com>
- More work on Python read feature in FD.
22Apr05
- Fix scanf of PoolId in catreq to handle 64 bit Ids.
10Mar05
- Add new ua_update.c file and move update_cmd there.
-- Modify "update slots" to obtain actual number of slots.
+- Modify 'update slots' to obtain actual number of slots.
- Tweak autochanger code to handle new slots request.
- Modify autochanger code to lock/unlock around slots and
update slots code.
09Mar05
- Patch the FD so that it does not issue an error message if
it attempts to restore the permissions on a Win32 drive.
-- Edit "Resource-name" (physical-name) for the device name
+- Edit 'Resource-name' (physical-name) for the device name
everywhere in the SD.
- Remove .linked.tex files in preparation for cutover to
using .tex in place of .wml.
08Mar05
- Copy latest config.sub and config.guess from autoconf.
- Try new way of identifying drives with:
- "resource-name" (physical-name)
+ 'resource-name' (physical-name)
More work need to a complete conversion.
07Mar05
- Rework some of the autochanger data so that the DIR has
- Force all the Media Type records of all devices in an Autochanger
to be the same.
06Mar05
-- Add new "run" command to Job resource in DIR. This permits
+- Add new 'run' command to Job resource in DIR. This permits
cloning a job as many times as you want.
- Pass PoolId to SD on Query request. It is now used in the
Find_media catalog request.
attempt to fix a bug report.
23Feb05
- Corrected SunOs to SunOS in btraceback (user submitted).
-- Applied patch from Roger Haa¥kansson <hson@ludd.luth.se>
+- Applied patch from Roger Haakansson <hson@ludd.luth.se>
to warn the user of defective AWKs during ./configure.
20Feb05
- Add some changes submitted by a user for HP client build.
15Feb05
- Fix Media LabelDate and FirstWritten to be correctly set.
- Fix deadlock in multiple simultaneous jobs.
-- Fix tape "truncation"/"number of files" after restore bug.
+- Fix tape 'truncation'/'number of files' after restore bug.
10Feb05
- Ensure that correct error messages are returned when
reading an ANSI label.
boot correctly.
- Implement ANSI labels -- not yet tested.
This required changes to DB format. No upgrade script yet.
- Note, more work needed to modify "update" command to handle
+ Note, more work needed to modify 'update' command to handle
changing label types, also must restrict volume name lengths
to 6 characters.
- Add new Device, Storage, and MediaType records to DB. No
a single alist, and imply sending data to each Storage daemon
simultaneously.
- Implement Device query command between DIR and SD.
-- Allow DIR to "reserve" a Device. It will then be acquired
+- Allow DIR to 'reserve' a Device. It will then be acquired
when the FD connects to the SD.
- Turn all DIR resources into classes, and implement a few class
methods -- more to come.
- Remove duplicate code from chksum.h (mentioned by Preben).
13Dec04
- Integrate Tim Oberfoell <oberfoell@web.de> patch to ACLs
- to handle both the "standard" and "default" ACLs.
+ to handle both the 'standard' and 'default' ACLs.
12Dec04
- Integrated Preben 'Peppe' Guldberg <peppe@wielders.org>
three cleanup patches (btest, verify, find).
- Add python 2.3 to config search list (user submitted patch)
- Add JobStatus to Python variables.
28Nov04
-- Add "python restart" command in Console.
+- Add 'python restart' command in Console.
- Make built-in variables table driven.
- First cut of Python Events for Bacula. Director only.
StartJob, EndJob, NewVolume events.
19Oct05
- configure: add check for dd, remove check for df
- block.c:do_dvd_size_checks: Check we are writing to a dvd before doing tests
- (reported by David Raine on the list, "[Bacula-users] LTO drive - End Of Volume error").
+ (reported by David Raine on the list, '[Bacula-users] LTO drive - End Of Volume error').
- Update bacula-sd.conf.in to use dvd-handler correctly.
- dvd.c:dvd_write_part: Increase timeout when writing the first part (see the code for
more details).
16Oct05
- Remove scripts/dvd-freespace and scripts/dvd-writepart, as they are now
merged into scripts/dvd-handler. Note: Documentation needs to be updated.
- - scripts/dvd-handler: "zero" brand-new DVD+/-RW to fix a problem with some
+ - scripts/dvd-handler: 'zero' brand-new DVD+/-RW to fix a problem with some
DVD-writers, thanks to Arno Lehmann for reporting this, and providing the
way to fix it.
- new scripts/dvd-handler. Note: it also needs a patched version of dvd+rw-tools.
been adapted.
- Remove set_exit_on_error function
07Apr05
- - Fix "unknown device type" problem with DVD devices.
+ - Fix 'unknown device type' problem with DVD devices.
- Fix crash when there is no media in the DVD drive.
09Jan05
- Update the documentation and ReleaseNotes.
29Dec04
- Add VolParts field in Media table
- Add MaximumPartSize directive in Device (SD configuration file)
- - File Volumes can now be splitted in multiple files ("parts")
- - Fix SQL error in sql_list while doing "llist jobmedia"
+ - File Volumes can now be splitted in multiple files ('parts')
+ - Fix SQL error in sql_list while doing 'llist jobmedia'
- Release Notes for Bacula 1.38.6-beta6
+ Release Notes for Bacula 1.38.7
Bacula code: Total files = 419 Total lines = 137,078 (*.h *.c *.in)
20,440 additional lines of code since version 1.36.3
!!!! Important !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ In Bacula version 1.38.5 and prior, there was apparently a
+ compiler bug that caused the Storage daemon to seg fault.
+ I have applied a workaround in version 1.38.6 and greater that
+ seems to work. If you experience problems, follow the instructions
+ below.
+
If you are compiling for a 64 bit machine, you need to ensure
that the code is compiled with the -O0 (- oh zero) option otherwise
the SD will crash on most all operations -- apparently due to
be started by the scheduler. If you disable a job and restart
Bacula or reload the .conf file, the job will be re-enabled.
- Add a new Job resource directive "enable = yes|no".
+- There is a new program named regex in the tools directory that
+ allows you to try regular expressions on your system.
Major bug fixes:
- Fix race condition in multiple-drive autochangers where
Minor bug fixes:
- See below:
+Release 1.38.6-1 (05Apr06) released
+- Remove timed wait for VSS on Win2K3 as it is not yet
+ implemented.
+- Correct bacula.in script to reference bacula-ctl-xx in the
+ sysconfig directory rather than the bin directory.
+
+Release 1.38.6 (28Mar06) released 29Mar06
+28Mar06
+- Back port from 1.39 fixes to lib/jcr.c to use foreach_jcr()
+ and new jcr chain locking.
+26Mar06
+- Fix a long standing bug in the bacula start/stop scripts.
+- Attempt to add the new bacula-ctl-* files to the rpm.
+- Switch to using typeof() for list traversing to avoid
+ as many FC5 g++ compiler warnings as possible.
+25Mar06
+- Split the bacula start/start script into four files:
+ bacula -- starts and stops calling other scripts
+ bacula-ctl-dir -- starts/stops the director
+ bacula-ctl-fd -- starts/stops the File daemon
+ bacula-ctl-sd -- starts/stops the Storage daemon
+- Create datestyle fix for PostgreSQL. Fixes bug #574.
+- Correct editing of JobId from int to int64 in fd_cmds.c
+- Eliminate FileSet name race with bash_spaces() and multiple
+ threads by bashing in a local.
+- Fix error return from 'use storage' to print a correct error
+ message rather than nothing.
+- Correct false re-read last block error message when two jobs
+ are simultaneously writing at the end of a tape.
+- Simplify exit conditions in the reserve.c code to avoid
+ possible non-release of reservation_lock().
+- Suffle lock order in reserve to avoid deadlock between
+ reservation lock and device mutex.
+- Add Thorsten's VSS timeout code to 1.38 branch.
+- Initialize jcr mutex before first use. Thanks to Thorsten for
+ tracking this down for me !!!! as it broke the Win32 build.
+- Integrate addition of line count limitation to bsmtp -l from
+ Sebastian Stark <stark at tuebingen.mpg.de>
+- Implement regex test program in tools directory.
+- Attempt to fix time problem with bsmtp with foreign langs.
+- Add strip_trailing_newline() submitted by user.
+
Release 1.38.6 beta6 16Mar06
- Fix bug #537 to allow arbitrary time to mount a volume for
restore, if polling is turned on.
Kern Sibbald
General:
+Release 1.38.7 (06Apr06) released 07Apr06
+- Remove timed wait for VSS on Win2K3 as it is not yet
+ implemented.
+- Correct bacula.in script to reference bacula-ctl-xx in the
+ sysconfig directory rather than the bin directory.
+
+Release 1.38.6 (28Mar06) released 29Mar06
+28Mar06
+- Back port from 1.39 fixes to lib/jcr.c to use foreach_jcr()
+ and new jcr chain locking.
+26Mar06
+- Fix a long standing bug in the bacula start/stop scripts.
+- Attempt to add the new bacula-ctl-* files to the rpm.
+- Switch to using typeof() for list traversing to avoid
+ as many FC5 g++ compiler warnings as possible.
25Mar06
- Split the bacula start/start script into four files:
bacula -- starts and stops calling other scripts
Kern Sibbald
General:
+- Remove timed wait for VSS on Win2K3 as it is not yet
+ implemented.
+- Correct bacula.in script to reference bacula-ctl-xx in the
+ sysconfig directory rather than the bin directory.
+26Mar06
+- Fix a long standing bug in the bacula start/stop scripts.
+- Attempt to add the new bacula-ctl-* files to the rpm.
+- Switch to using typeof() for list traversing to avoid
+ as many FC5 g++ compiler warnings as possible.
+25Mar06
+- Split the bacula start/start script into four files:
+ bacula -- starts and stops calling other scripts
+ bacula-ctl-dir -- starts/stops the director
+ bacula-ctl-fd -- starts/stops the File daemon
+ bacula-ctl-sd -- starts/stops the Storage daemon
24Mar06
- Create datestyle fix for PostgreSQL. Fixes bug #574.
- Correct editing of JobId from int to int64 in fd_cmds.c
--- /dev/null
+
+ This patch fixes a bug in the bacula start/stop script where
+ the binary directory is used rather than the scripts directory.
+ Apply the patch to version 1.38.6 with:
+
+ cd <bacula-source>
+ patch -p0 <1.38.6-script.patch
+ make Makefiles
+ make install
+ ...
+
+Index: scripts/bacula.in
+===================================================================
+RCS file: /cvsroot/bacula/bacula/scripts/bacula.in,v
+retrieving revision 1.13.2.3
+diff -u -r1.13.2.3 bacula.in
+--- scripts/bacula.in 28 Mar 2006 16:42:19 -0000 1.13.2.3
++++ scripts/bacula.in 29 Mar 2006 16:24:51 -0000
+@@ -13,25 +13,22 @@
+ # easier to "steal" this code for the development
+ # environment where they are different.
+ #
+-BACFDBIN=@sbindir@
+ BACFDCFG=@sysconfdir@
+-BACSDBIN=@sbindir@
+ BACSDCFG=@sysconfdir@
+-BACDIRBIN=@sbindir@
+ BACDIRCFG=@sysconfdir@
+
+ case "$1" in
+ start)
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+ ;;
+
+ stop)
+ # Stop the FD first so that SD will fail jobs and update catalog
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
+ echo
+ sleep 6
+ ;;
+@@ -42,9 +39,9 @@
+ ;;
+
+ status)
+- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
+- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
+- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
++ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
++ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
++ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
+ ;;
+
+ *)
# basic defines for every build
%define depkgs ../depkgs
-%define depkgs_version 22Jun05
+%define depkgs_version 28Mar06
%define sqlite_bindir /usr/lib/bacula/sqlite
%define working_dir /var/bacula
%define director_daemon_user bacula
%define group_file /etc/group
%define useradd /usr/sbin/useradd
%define groupadd /usr/sbin/groupadd
-%define _rescuever 1.8.2
+%define usermod /usr/sbin/usermod
+%define _rescuever 1.8.3
# platform defines - set one below or define the build_xxx on the command line
# RedHat builds
%define _dist %(grep -i SuSE /etc/SuSE-release)
%endif
%if %{mdk}
-%define _dist %(grep Mandrake /etc/mandrake-release)
+%define _dist %(grep Mand /etc/mandrake-release)
%endif
# Should we build gconsole, possible only if gnome >= 2.0 available
%else
%define gconsole 1
%endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
Summary: Bacula - The Network Backup Solution
Name: bacula
Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3:http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
Source4:http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Patch0: bacula-1.38.6-script.patch
+Patch1: bacula-1.38.6-makefile.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define _rescuesrc ../%{name}-rescue-%{_rescuever}
BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
-BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
+BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
BuildRequires: openssl-devel
+%if %{gconsole}
+BuildRequires: pkgconfig
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
-BuildRequires: ORBit-devel
%endif
%if %{su9}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su9} && %{gconsole}
BuildRequires: libgnome >= 2.0
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%endif
%if %{su10}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su10} && %{gconsole}
BuildRequires: libgnome >= 2.12
BuildRequires: gtk2-devel >= 2.8
BuildRequires: libgnomeui-devel >= 2.12
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.10
%endif
%if %{mdk}
BuildRequires: libtermcap-devel
+BuildRequires: libstdc++-static-devel
+BuildRequires: glibc-static-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{mdk} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui2-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: libORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo2_0-devel
BuildRequires: libbonoboui2_0-devel
BuildRequires: libbonobo-activation-devel
BuildRequires: libGConf2-devel
-BuildRequires: libstdc++-static-devel
-BuildRequires: glibc-static-devel
BuildRequires: freetype2-devel
%endif
%if %{fc3}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc3} && %{gconsole}
BuildRequires: gtk2-devel >= 2.4
BuildRequires: libgnomeui-devel >= 2.8
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.6
BuildRequires: libgnomeui-devel >= 2.10
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%setup -T -D -b 3
%setup -T -D -b 4
+%patch0
+%patch1 -p1
+
%build
%if %{su9} || %{su10}
--with-scriptdir=/etc/bacula \
--enable-smartalloc \
--enable-client-only \
- %if %{mdk}
- --disable-nls \
- %endif
+ %if %{mdk}
+ --disable-nls \
+ %endif
--enable-static-fd
make
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+# fixme - make installs gconsole script for build without gconsole
+%if ! %{gconsole}
+rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
+%endif
+
rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
# install the init scripts
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
%attr(-, root, %{daemon_group}) /etc/bacula/rescue
+%attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
%attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
fi
-# create the daemon user and group
+# create the daemon users and groups
+# first create the groups if they don't exist
HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
%{groupadd} -r %{daemon_group} > /dev/null 2>&1
echo "The group %{storage_daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now create the users if they do not exist
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
echo "The user %{storage_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
echo "The user %{director_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary groups, this is ok to call even if the users already exist
+# we only do this if the user is NOT root
+IS_ROOT=%{director_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{director_daemon_user} -G %{daemon_group}
+fi
+IS_ROOT=%{storage_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
+fi
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%if %{mysql}
%post mysql
echo "The group %{daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary group, this is ok to call even if the user already exists
+# we only do this if the user is NOT root
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%post client
# add our link
%endif
%changelog
+* Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.38.6 release
+- fix problem specifying more than one primary group for user bacula
+- add build switch to not build gconsole regardless of platform
* Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
- add centos3 build tag
- fix link error of static-fd on Mandrake with --disable-nls
# basic defines for every build
%define depkgs ../depkgs
-%define depkgs_version 22Jun05
+%define depkgs_version 28Mar06
%define sqlite_bindir /usr/lib/bacula/sqlite
%define working_dir /var/bacula
%define director_daemon_user bacula
%define group_file /etc/group
%define useradd /usr/sbin/useradd
%define groupadd /usr/sbin/groupadd
-%define _rescuever 1.8.2
+%define usermod /usr/sbin/usermod
+%define _rescuever 1.8.3
# platform defines - set one below or define the build_xxx on the command line
# RedHat builds
%define _dist %(grep -i SuSE /etc/SuSE-release)
%endif
%if %{mdk}
-%define _dist %(grep Mandrake /etc/mandrake-release)
+%define _dist %(grep Mand /etc/mandrake-release)
%endif
# Should we build gconsole, possible only if gnome >= 2.0 available
%else
%define gconsole 1
%endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
Summary: Bacula - The Network Backup Solution
Name: bacula
Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3:http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
Source4:http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Patch0: bacula-1.38.6-script.patch
+Patch1: bacula-1.38.6-makefile.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define _rescuesrc ../%{name}-rescue-%{_rescuever}
BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
-BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
+BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
BuildRequires: openssl-devel
+%if %{gconsole}
+BuildRequires: pkgconfig
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
-BuildRequires: ORBit-devel
%endif
%if %{su9}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su9} && %{gconsole}
BuildRequires: libgnome >= 2.0
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%endif
%if %{su10}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su10} && %{gconsole}
BuildRequires: libgnome >= 2.12
BuildRequires: gtk2-devel >= 2.8
BuildRequires: libgnomeui-devel >= 2.12
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.10
%endif
%if %{mdk}
BuildRequires: libtermcap-devel
+BuildRequires: libstdc++-static-devel
+BuildRequires: glibc-static-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{mdk} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui2-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: libORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo2_0-devel
BuildRequires: libbonoboui2_0-devel
BuildRequires: libbonobo-activation-devel
BuildRequires: libGConf2-devel
-BuildRequires: libstdc++-static-devel
-BuildRequires: glibc-static-devel
BuildRequires: freetype2-devel
%endif
%if %{fc3}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc3} && %{gconsole}
BuildRequires: gtk2-devel >= 2.4
BuildRequires: libgnomeui-devel >= 2.8
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.6
BuildRequires: libgnomeui-devel >= 2.10
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%setup -T -D -b 3
%setup -T -D -b 4
+%patch0
+%patch1 -p1
+
%build
%if %{su9} || %{su10}
--with-scriptdir=/etc/bacula \
--enable-smartalloc \
--enable-client-only \
- %if %{mdk}
- --disable-nls \
- %endif
+ %if %{mdk}
+ --disable-nls \
+ %endif
--enable-static-fd
make
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+# fixme - make installs gconsole script for build without gconsole
+%if ! %{gconsole}
+rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
+%endif
+
rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
# install the init scripts
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
%attr(-, root, %{daemon_group}) /etc/bacula/rescue
+%attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
%attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
fi
-# create the daemon user and group
+# create the daemon users and groups
+# first create the groups if they don't exist
HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
%{groupadd} -r %{daemon_group} > /dev/null 2>&1
echo "The group %{storage_daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now create the users if they do not exist
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
echo "The user %{storage_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
echo "The user %{director_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary groups, this is ok to call even if the users already exist
+# we only do this if the user is NOT root
+IS_ROOT=%{director_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{director_daemon_user} -G %{daemon_group}
+fi
+IS_ROOT=%{storage_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
+fi
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%if %{mysql}
%post mysql
echo "The group %{daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary group, this is ok to call even if the user already exists
+# we only do this if the user is NOT root
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%post client
# add our link
%endif
%changelog
+* Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.38.6 release
+- fix problem specifying more than one primary group for user bacula
+- add build switch to not build gconsole regardless of platform
* Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
- add centos3 build tag
- fix link error of static-fd on Mandrake with --disable-nls
# basic defines for every build
%define depkgs ../depkgs
-%define depkgs_version 22Jun05
+%define depkgs_version 28Mar06
%define sqlite_bindir /usr/lib/bacula/sqlite
%define working_dir /var/bacula
%define director_daemon_user bacula
%define group_file /etc/group
%define useradd /usr/sbin/useradd
%define groupadd /usr/sbin/groupadd
-%define _rescuever 1.8.2
+%define usermod /usr/sbin/usermod
+%define _rescuever 1.8.3
# platform defines - set one below or define the build_xxx on the command line
# RedHat builds
%define _dist %(grep -i SuSE /etc/SuSE-release)
%endif
%if %{mdk}
-%define _dist %(grep Mandrake /etc/mandrake-release)
+%define _dist %(grep Mand /etc/mandrake-release)
%endif
# Should we build gconsole, possible only if gnome >= 2.0 available
%else
%define gconsole 1
%endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
Summary: Bacula - The Network Backup Solution
Name: bacula
Source2: Release_Notes-%{version}-%{release}.tar.gz
Source3:http://www.prdownloads.sourceforge.net/bacula/%{name}-docs-%{version}.tar.gz
Source4:http://www.prdownloads.sourceforge.net/bacula/%{name}-rescue-%{_rescuever}.tar.gz
+Patch0: bacula-1.38.6-script.patch
+Patch1: bacula-1.38.6-makefile.patch
BuildRoot: %{_tmppath}/%{name}-root
URL: http://www.bacula.org/
Vendor: The Bacula Team
%define _rescuesrc ../%{name}-rescue-%{_rescuever}
BuildRequires: atk-devel, ncurses-devel, pango-devel, perl
-BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel, pkgconfig
+BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
BuildRequires: openssl-devel
+%if %{gconsole}
+BuildRequires: pkgconfig
+%endif
%if %{rh7}
BuildRequires: libtermcap-devel
BuildRequires: glibc-devel >= 2.2
-BuildRequires: ORBit-devel
%endif
%if %{su9}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su9} && %{gconsole}
BuildRequires: libgnome >= 2.0
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%endif
%if %{su10}
BuildRequires: termcap
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{su10} && %{gconsole}
BuildRequires: libgnome >= 2.12
BuildRequires: gtk2-devel >= 2.8
BuildRequires: libgnomeui-devel >= 2.12
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.10
%endif
%if %{mdk}
BuildRequires: libtermcap-devel
+BuildRequires: libstdc++-static-devel
+BuildRequires: glibc-static-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{mdk} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui2-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: libORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo2_0-devel
BuildRequires: libbonoboui2_0-devel
BuildRequires: libbonobo-activation-devel
BuildRequires: libGConf2-devel
-BuildRequires: libstdc++-static-devel
-BuildRequires: glibc-static-devel
BuildRequires: freetype2-devel
%endif
%if %{fc3}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc3} && %{gconsole}
BuildRequires: gtk2-devel >= 2.4
BuildRequires: libgnomeui-devel >= 2.8
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.6
BuildRequires: libgnomeui-devel >= 2.10
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.3
BuildRequires: libbonobo-devel >= 2.8
%endif
%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4}
BuildRequires: libtermcap-devel
+BuildRequires: glibc-devel >= 2.3
+%endif
+%if ! %{rh7} && ! %{su9} && ! %{su10} && ! %{mdk} && ! %{fc3} && ! %{fc4} && %{gconsole}
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
-BuildRequires: glibc-devel >= 2.3
BuildRequires: ORBit2-devel
BuildRequires: libart_lgpl-devel >= 2.0
BuildRequires: libbonobo-devel >= 2.0
%setup -T -D -b 3
%setup -T -D -b 4
+%patch0
+%patch1 -p1
+
%build
%if %{su9} || %{su10}
--with-scriptdir=/etc/bacula \
--enable-smartalloc \
--enable-client-only \
- %if %{mdk}
- --disable-nls \
- %endif
+ %if %{mdk}
+ --disable-nls \
+ %endif
--enable-static-fd
make
rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
%endif
+# fixme - make installs gconsole script for build without gconsole
+%if ! %{gconsole}
+rm -f $RPM_BUILD_ROOT/etc/bacula/gconsole
+%endif
+
rm -f $RPM_BUILD_ROOT/usr/sbin/static-bacula-fd
# install the init scripts
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.dbx
%attr(-, root, %{daemon_group}) /etc/bacula/btraceback.gdb
%attr(-, root, %{daemon_group}) /etc/bacula/rescue
+%attr(-, root, %{daemon_group}) /etc/bacula/disk-changer
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-dir
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-fd
+%attr(-, root, %{daemon_group}) /etc/bacula/bacula-ctl-sd
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-dir
%attr(-, root, %{daemon_group}) /etc/init.d/bacula-fd
%attr(-, root, %{storage_daemon_group}) /etc/bacula/dvd-handler
cp -p /etc/bacula/console.conf /etc/bacula/bconsole.conf
fi
-# create the daemon user and group
+# create the daemon users and groups
+# first create the groups if they don't exist
HAVE_BACULA=`grep %{daemon_group} %{group_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
%{groupadd} -r %{daemon_group} > /dev/null 2>&1
echo "The group %{storage_daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now create the users if they do not exist
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{storage_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{storage_daemon_group} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{storage_daemon_user} > /dev/null 2>&1
echo "The user %{storage_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{director_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{director_daemon_user} > /dev/null 2>&1
echo "The user %{director_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary groups, this is ok to call even if the users already exist
+# we only do this if the user is NOT root
+IS_ROOT=%{director_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{director_daemon_user} -G %{daemon_group}
+fi
+IS_ROOT=%{storage_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{storage_daemon_user} -G %{daemon_group},%{storage_daemon_group}
+fi
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%if %{mysql}
%post mysql
echo "The group %{daemon_group} has been added to %{group_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# we do not use the -g option allowing the primary group to be set to system default
+# this will be a unique group on redhat type systems or the group users on some systems
HAVE_BACULA=`grep %{file_daemon_user} %{user_file} 2>/dev/null`
if [ -z "$HAVE_BACULA" ]; then
- %{useradd} -r -c "Bacula" -d %{working_dir} -g %{daemon_group} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
+ %{useradd} -r -c "Bacula" -d %{working_dir} -M -n -s /sbin/nologin %{file_daemon_user} > /dev/null 2>&1
echo "The user %{file_daemon_user} has been added to %{user_file}."
echo "See the manual chapter \"Running Bacula\" for details."
fi
+# now we add the supplementary group, this is ok to call even if the user already exists
+# we only do this if the user is NOT root
+IS_ROOT=%{file_daemon_user}
+if [ "$IS_ROOT" != "root" ]; then
+%{usermod} %{file_daemon_user} -G %{daemon_group}
+fi
%post client
# add our link
%endif
%changelog
+* Sun Apr 02 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
+- 1.38.6 release
+- fix problem specifying more than one primary group for user bacula
+- add build switch to not build gconsole regardless of platform
* Sun Jan 29 2006 D. Scott Barninger <barninger@fairfieldcomputers.com>
- add centos3 build tag
- fix link error of static-fd on Mandrake with --disable-nls
# Kill it.
if [ "$pid" != "" ] ; then
if [ "$notset" = "1" ] ; then
- if ${PS} -p $pid>/dev/null 2>&1; then
+ if ${PS} -p "$pid">/dev/null 2>&1; then
# TERM first, then KILL if not dead
kill -TERM $pid 2>/dev/null
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 3
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
kill -KILL $pid 2>/dev/null
fi
fi
fi
fi
- ${PS} -p $pid >/dev/null 2>&1
+ ${PS} -p "$pid" >/dev/null 2>&1
RC=$?
[ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
# RC=$((! $RC))
# use specified level only
else
- if ${PS} -p $pid >/dev/null 2>&1; then
+ if ${PS} -p "$pid" >/dev/null 2>&1; then
kill $killlevel $pid 2>/dev/null
RC=$?
[ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
# Kill it.
if [ "$pid" != "" ] ; then
if [ "$notset" = "1" ] ; then
- if ${PS} -p $pid>/dev/null 2>&1; then
+ if ${PS} -p "$pid">/dev/null 2>&1; then
# TERM first, then KILL if not dead
kill -TERM $pid 2>/dev/null
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 3
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
kill -KILL $pid 2>/dev/null
fi
fi
fi
fi
- ${PS} -p $pid >/dev/null 2>&1
+ ${PS} -p "$pid" >/dev/null 2>&1
RC=$?
[ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
# RC=$((! $RC))
# use specified level only
else
- if ${PS} -p $pid >/dev/null 2>&1; then
+ if ${PS} -p "$pid" >/dev/null 2>&1; then
kill $killlevel $pid 2>/dev/null
RC=$?
[ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
# Kill it.
if [ "$pid" != "" ] ; then
if [ "$notset" = "1" ] ; then
- if ${PS} -p $pid>/dev/null 2>&1; then
+ if ${PS} -p "$pid">/dev/null 2>&1; then
# TERM first, then KILL if not dead
kill -TERM $pid 2>/dev/null
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 1
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
sleep 3
- if ${PS} -p $pid >/dev/null 2>&1 ; then
+ if ${PS} -p "$pid" >/dev/null 2>&1 ; then
kill -KILL $pid 2>/dev/null
fi
fi
fi
fi
- ${PS} -p $pid >/dev/null 2>&1
+ ${PS} -p "$pid" >/dev/null 2>&1
RC=$?
[ $RC -eq 0 ] && failure "$base shutdown" || success "$base shutdown"
# RC=$((! $RC))
# use specified level only
else
- if ${PS} -p $pid >/dev/null 2>&1; then
+ if ${PS} -p "$pid" >/dev/null 2>&1; then
kill $killlevel $pid 2>/dev/null
RC=$?
[ $RC -eq 0 ] && success "$base $killlevel" || failure "$base $killlevel"
# easier to "steal" this code for the development
# environment where they are different.
#
-BACFDBIN=@sbindir@
BACFDCFG=@sysconfdir@
-BACSDBIN=@sbindir@
BACSDCFG=@sysconfdir@
-BACDIRBIN=@sbindir@
BACDIRCFG=@sysconfdir@
case "$1" in
start)
- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
;;
stop)
# Stop the FD first so that SD will fail jobs and update catalog
- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd $1 $2
- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd $1 $2
- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir $1 $2
+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd $1 $2
+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd $1 $2
+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir $1 $2
echo
+ sleep 6
;;
restart)
$0 stop
- sleep 5
$0 start
;;
status)
- [ -x ${BACSDBIN}/bacula-ctl-sd ] && ${BACSDBIN}/bacula-ctl-sd status
- [ -x ${BACFDBIN}/bacula-ctl-fd ] && ${BACFDBIN}/bacula-ctl-fd status
- [ -x ${BACDIRBIN}/bacula-ctl-dir ] && ${BACDIRBIN}/bacula-ctl-dir status
+ [ -x ${BACSDCFG}/bacula-ctl-sd ] && ${BACSDCFG}/bacula-ctl-sd status
+ [ -x ${BACFDCFG}/bacula-ctl-fd ] && ${BACFDCFG}/bacula-ctl-fd status
+ [ -x ${BACDIRCFG}/bacula-ctl-dir ] && ${BACDIRCFG}/bacula-ctl-dir status
;;
*)
int stat, rc;
char *p;
dlist *item_chain;
- uitem *item;
+ uitem *item = NULL;
char prbuf[500];
regex_t preg;
*
* Loop var through each member of list
*/
+#ifdef HAVE_GCC
+#define foreach_alist(var, list) \
+ for((var)=(typeof(var))(list)->first(); (var); (var)=(typeof(var))(list)->next() )
+#else
#define foreach_alist(var, list) \
for((*((void **)&(var))=(void*)((list)->first())); \
(var); \
(*((void **)&(var))=(void*)((list)->next())))
-
-#ifdef the_easy_way
-#define foreach_alist(var, list) \
- for(((void*)(var))=(list)->first(); (var); ((void*)(var))=(list)->next()); )
#endif
+
/* Second arg of init */
enum {
owned_by_alist = true,
* Version $Id$
*/
/*
- Copyright (C) 2004-2006 Kern Sibbald
+ Copyright (C) 2004-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*
* Loop var through each member of list
*/
+#ifdef HAVE_GCC
#define foreach_dlist(var, list) \
- for((var)=NULL; (*((void **)&(var))=(void*)((list)->next(var))); )
-
-#ifdef the_old_way
+ for((var)=NULL; ((var)=(typeof(var))(list)->next(var)); )
+#else
#define foreach_dlist(var, list) \
- for((var)=NULL; (((void *)(var))=(list)->next(var)); )
+ for((var)=NULL; (*((void **)&(var))=(void*)((list)->next(var))); )
#endif
+
struct dlink {
void *next;
void *prev;
* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
struct RES_ITEM {
const char *name; /* Resource name i.e. Director, ... */
MSG_RES_HANDLER *handler; /* Routine storing the resource item */
- void **value; /* Where to store the item */
+ char **value; /* Where to store the item */
int code; /* item code/additional info */
int flags; /* flags: default, required, ... */
int default_value; /* default value */
};
/* For storing name_addr items in res_items table */
-#define ITEM(x) ((void **)&res_all.x)
+#define ITEM(x) ((char **)&res_all.x)
#define MAX_RES_ITEMS 70 /* maximum resource items per RES */
const char *res_to_str(int rcode);
/* Loop through each resource of type, returning in var */
+#ifdef HAVE_GCC
#define foreach_res(var, type) \
- for(var=NULL; (*((void **)&(var))=(void *)GetNextRes((type), (RES *)var));)
-
-#ifdef the_old_way
+ for((var)=NULL; ((var)=(typeof(var))GetNextRes((type), (RES *)var));)
+#else
#define foreach_res(var, type) \
- for((var)=NULL; (((void *)(var))=GetNextRes((type), (RES *)var));)
+ for(var=NULL; (*((void **)&(var))=(void *)GetNextRes((type), (RES *)var));)
#endif
+
void store_str(LEX *lc, RES_ITEM *item, int index, int pass);
void store_dir(LEX *lc, RES_ITEM *item, int index, int pass);
void store_password(LEX *lc, RES_ITEM *item, int index, int pass);
* Version $Id$
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2000-2006 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
int stat;
DCR *dcr_save = jcr->dcr;
+ lock_reservations();
jcr->dcr = NULL;
memset(&rctx, 0, sizeof(RCTX));
rctx.jcr = jcr;
*/
stat = search_res_for_device(rctx);
release_msgs(jcr); /* release queued messages */
+ unlock_reservations();
if (stat == 1) {
DCR *new_dcr = jcr->read_dcr;
dev->unblock();