]> git.sur5r.net Git - bacula/bacula/commitdiff
- Remove timed wait for VSS on Win2K3 as it is not yet
authorKern Sibbald <kern@sibbald.com>
Fri, 7 Apr 2006 08:22:17 +0000 (08:22 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 7 Apr 2006 08:22:17 +0000 (08:22 +0000)
  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

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2884 91ce42f0-d328-0410-95d8-f526ca767f89

18 files changed:
bacula/ChangeLog
bacula/ReleaseNotes
bacula/kes-1.38
bacula/kes-1.39
bacula/patches/1.38.6-script.patch [new file with mode: 0644]
bacula/platforms/mandrake/bacula.spec.in
bacula/platforms/redhat/bacula.spec.in
bacula/platforms/suse/bacula.spec.in
bacula/scripts/bacula-ctl-dir.in
bacula/scripts/bacula-ctl-fd.in
bacula/scripts/bacula-ctl-sd.in
bacula/scripts/bacula.in
bacula/src/dird/migrate.c
bacula/src/lib/alist.h
bacula/src/lib/dlist.h
bacula/src/lib/parse_conf.h
bacula/src/lib/protos.h
bacula/src/stored/acquire.c

index 5825c672d311df487e3311a646a10b8b1f899303..ccb15454edec4d4ba15e4233928583758e023b07 100644 (file)
@@ -1,5 +1,155 @@
 
-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
@@ -71,7 +221,7 @@ Beta release 23Dec05:
   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
@@ -183,9 +333,9 @@ Beta release 20Dec05:
 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.
@@ -237,7 +387,7 @@ Changes to 1.38.1: 15 November 2005
   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.
@@ -411,7 +561,7 @@ Changes to 1.37.39:
 - 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
@@ -422,7 +572,7 @@ Changes to 1.37.39:
 - 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
@@ -447,7 +597,7 @@ Changes to 1.37.37:
 - 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
@@ -484,7 +634,7 @@ Changes to 1.37.36 released 22 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.
@@ -543,7 +693,7 @@ Changes to 1.37.34:
   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()
@@ -672,7 +822,7 @@ Changes to 1.37.31:
    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.
@@ -705,12 +855,12 @@ Changes to 1.37.31:
 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.
@@ -790,7 +940,7 @@ Changes to 1.37.28:
   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.
@@ -808,12 +958,12 @@ Changes to 1.37.28:
 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.
@@ -904,7 +1054,7 @@ Changes from Nicolas Boichat:
    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.
@@ -937,8 +1087,8 @@ Changes from Nicolas Boichat:
 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()
@@ -1038,7 +1188,7 @@ Changes to 1.37.19:
 - 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
@@ -1178,7 +1328,7 @@ Changes to 1.37.14:
   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
@@ -1346,21 +1496,21 @@ Changes to 1.37.6:
 - 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   
@@ -1375,7 +1525,7 @@ Changes to 1.37.6:
 - 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.
@@ -1441,7 +1591,7 @@ Changes to 1.37.4:
   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.
@@ -1496,7 +1646,7 @@ Changes to 1.37.3:
 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.
@@ -1552,7 +1702,7 @@ Changes to 1.37.3:
   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
@@ -1568,7 +1718,7 @@ Changes to 1.37.3:
   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.
@@ -1698,7 +1848,7 @@ Changes to 1.37.2:
 - 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).
@@ -1751,7 +1901,7 @@ Changes to 1.37.2:
 - 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.
@@ -1768,7 +1918,7 @@ Changes to 1.37.*:
 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).
@@ -1782,7 +1932,7 @@ Changes to 1.37.*:
 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.
@@ -1815,7 +1965,7 @@ Changes to 1.37.*:
    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.
@@ -1848,5 +1998,5 @@ Changes to 1.37.*:
 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'
index f83d2f3946204195930bcd61fcb81bece16b7909..09a0a9ca778fd5cba242a17aaacd47bf20b46ff8 100644 (file)
@@ -1,10 +1,16 @@
 
-          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
@@ -36,6 +42,8 @@ New features:
   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
@@ -54,6 +62,48 @@ Major bug fixes:
 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.     
index aec4edd730eb236d98d7538245df9e250e0f859e..5e38d64a0d511e9f2ab64d87087a387dc794d9c2 100644 (file)
@@ -2,6 +2,21 @@
                         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
index 75959fe56f8d7e269c21ba144231a93b4927562b..f751dd15ee6a8eb0685afb7ac7f8b5ed06f23d0d 100644 (file)
@@ -2,6 +2,21 @@
                         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
diff --git a/bacula/patches/1.38.6-script.patch b/bacula/patches/1.38.6-script.patch
new file mode 100644 (file)
index 0000000..7bce5fd
--- /dev/null
@@ -0,0 +1,63 @@
+
+ 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
+       ;;
+    *)
index f6a1730653edf5f31f3e94ff505540070866de73..f0fa1a5dfa8b4a77555df21ff292a6c9ea4e7e4a 100644 (file)
@@ -5,7 +5,7 @@
 
 # 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
@@ -18,7 +18,8 @@
 %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
@@ -121,7 +122,7 @@ exit 1
 %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
@@ -130,6 +131,8 @@ exit 1
 %else
 %define gconsole 1
 %endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
 
 Summary: Bacula - The Network Backup Solution
 Name: bacula
@@ -142,6 +145,8 @@ Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.t
 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
@@ -152,19 +157,23 @@ Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
 %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
@@ -176,10 +185,12 @@ BuildRequires: freetype2-devel
 %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
@@ -194,24 +205,28 @@ BuildRequires: libpng-devel
 %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
@@ -222,9 +237,11 @@ BuildRequires: freetype-devel
 %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
@@ -235,9 +252,11 @@ BuildRequires: freetype-devel
 %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
@@ -560,6 +579,9 @@ server packages.
 %setup -T -D -b 3
 %setup -T -D -b 4
 
+%patch0
+%patch1 -p1
+
 %build
 
 %if %{su9} || %{su10}
@@ -613,9 +635,9 @@ export LDFLAGS=-L/usr/lib64/mysql
         --with-scriptdir=/etc/bacula \
         --enable-smartalloc \
         --enable-client-only \
-       %if %{mdk}
-       --disable-nls \
-       %endif
+        %if %{mdk}
+        --disable-nls \
+        %endif
         --enable-static-fd
 
 make
@@ -715,6 +737,11 @@ rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
 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
@@ -863,6 +890,10 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
 %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
@@ -934,7 +965,8 @@ if [ -s /etc/bacula/console.conf ];then
         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
@@ -947,24 +979,41 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1133,12 +1182,20 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1239,6 +1296,10 @@ fi
 %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
index f6a1730653edf5f31f3e94ff505540070866de73..f0fa1a5dfa8b4a77555df21ff292a6c9ea4e7e4a 100644 (file)
@@ -5,7 +5,7 @@
 
 # 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
@@ -18,7 +18,8 @@
 %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
@@ -121,7 +122,7 @@ exit 1
 %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
@@ -130,6 +131,8 @@ exit 1
 %else
 %define gconsole 1
 %endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
 
 Summary: Bacula - The Network Backup Solution
 Name: bacula
@@ -142,6 +145,8 @@ Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.t
 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
@@ -152,19 +157,23 @@ Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
 %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
@@ -176,10 +185,12 @@ BuildRequires: freetype2-devel
 %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
@@ -194,24 +205,28 @@ BuildRequires: libpng-devel
 %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
@@ -222,9 +237,11 @@ BuildRequires: freetype-devel
 %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
@@ -235,9 +252,11 @@ BuildRequires: freetype-devel
 %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
@@ -560,6 +579,9 @@ server packages.
 %setup -T -D -b 3
 %setup -T -D -b 4
 
+%patch0
+%patch1 -p1
+
 %build
 
 %if %{su9} || %{su10}
@@ -613,9 +635,9 @@ export LDFLAGS=-L/usr/lib64/mysql
         --with-scriptdir=/etc/bacula \
         --enable-smartalloc \
         --enable-client-only \
-       %if %{mdk}
-       --disable-nls \
-       %endif
+        %if %{mdk}
+        --disable-nls \
+        %endif
         --enable-static-fd
 
 make
@@ -715,6 +737,11 @@ rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
 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
@@ -863,6 +890,10 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
 %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
@@ -934,7 +965,8 @@ if [ -s /etc/bacula/console.conf ];then
         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
@@ -947,24 +979,41 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1133,12 +1182,20 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1239,6 +1296,10 @@ fi
 %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
index f6a1730653edf5f31f3e94ff505540070866de73..f0fa1a5dfa8b4a77555df21ff292a6c9ea4e7e4a 100644 (file)
@@ -5,7 +5,7 @@
 
 # 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
@@ -18,7 +18,8 @@
 %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
@@ -121,7 +122,7 @@ exit 1
 %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
@@ -130,6 +131,8 @@ exit 1
 %else
 %define gconsole 1
 %endif
+# specifically disallow gconsole if desired
+%{?nobuild_gconsole:%define gconsole 0}
 
 Summary: Bacula - The Network Backup Solution
 Name: bacula
@@ -142,6 +145,8 @@ Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.t
 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
@@ -152,19 +157,23 @@ Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
 %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
@@ -176,10 +185,12 @@ BuildRequires: freetype2-devel
 %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
@@ -194,24 +205,28 @@ BuildRequires: libpng-devel
 %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
@@ -222,9 +237,11 @@ BuildRequires: freetype-devel
 %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
@@ -235,9 +252,11 @@ BuildRequires: freetype-devel
 %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
@@ -560,6 +579,9 @@ server packages.
 %setup -T -D -b 3
 %setup -T -D -b 4
 
+%patch0
+%patch1 -p1
+
 %build
 
 %if %{su9} || %{su10}
@@ -613,9 +635,9 @@ export LDFLAGS=-L/usr/lib64/mysql
         --with-scriptdir=/etc/bacula \
         --enable-smartalloc \
         --enable-client-only \
-       %if %{mdk}
-       --disable-nls \
-       %endif
+        %if %{mdk}
+        --disable-nls \
+        %endif
         --enable-static-fd
 
 make
@@ -715,6 +737,11 @@ rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
 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
@@ -863,6 +890,10 @@ chmod 644 $RPM_BUILD_ROOT/etc/bacula/tray-monitor.conf
 %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
@@ -934,7 +965,8 @@ if [ -s /etc/bacula/console.conf ];then
         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
@@ -947,24 +979,41 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1133,12 +1182,20 @@ if [ -z "$HAVE_BACULA" ]; then
         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
@@ -1239,6 +1296,10 @@ fi
 %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
index a418c4ddb7e865547c2ecb59e4d76eb06d37f080..37d22aff86c52e189545d9528fa53b0ca7ea8bd4 100644 (file)
@@ -61,27 +61,27 @@ killproc() {
    # 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"
index 6f0610074df15b32709d433200bca054e6f14bf3..f3552c32d1cc69221ecbabd5804b89014a968633 100644 (file)
@@ -61,27 +61,27 @@ killproc() {
    # 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"
index d918cbcbe5ce6107fc62c17a4b2e444850da019c..9586bfc84c0524f35032bc3072b5b9de2158b34e 100644 (file)
@@ -61,27 +61,27 @@ killproc() {
    # 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"
index 9b0c2253abb2a6018bd25e209c280029ab37d7f4..0382ab8f20577053461960f824842ac6ac0d9f85 100755 (executable)
 #  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
       ;;
 
    *)
index 1efd2441644b20d20bff3ad74f130a8dcf731b19..6194de9025b7d2598cf04b2415c5fbe9fc350f95 100644 (file)
@@ -398,7 +398,7 @@ static bool get_job_to_migrate(JCR *jcr)
    int stat, rc;
    char *p;
    dlist *item_chain;
-   uitem *item
+   uitem *item = NULL;
    char prbuf[500];
    regex_t preg;
 
index 168257570370322b1fe8c9ef8d6e9daa5654ce58..e1c6e39ae78d377ba20e18b4f70b9f0545c02597 100644 (file)
  *
  * 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,
index 40c54f013379ee396a81b902b6bd5c9afa2599d2..32933ad608518254b7205dc94949e0dc3736be86 100644 (file)
@@ -2,7 +2,7 @@
  *   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;
index 754a009cc75ba7a5b4927addf036dcc084de0aa5..4943f6abe66c195fe025f341687b4376f4b54008 100644 (file)
@@ -2,22 +2,17 @@
  *   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.
 
  */
 
@@ -32,14 +27,14 @@ typedef void (MSG_RES_HANDLER)(LEX *lc, RES_ITEM *item, int index, int pass);
 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 */
 
@@ -114,15 +109,16 @@ void save_resource(int type, RES_ITEM *item, int pass);
 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);
index e24292a7c311ad7574597db4d7ab31a07d79e2fb..1361b37541d40b27b57fd77b20656031e665ea20 100644 (file)
@@ -4,22 +4,17 @@
  *   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.
 
  */
 
index 34b28609862e99a480acad067d92bee711086fbf..edb5f7002ed38fcc2ebcf39d860d1578329cd22f 100644 (file)
@@ -88,6 +88,7 @@ bool acquire_device_for_read(DCR *dcr)
       int stat;
       DCR *dcr_save = jcr->dcr;
 
+      lock_reservations();
       jcr->dcr = NULL;
       memset(&rctx, 0, sizeof(RCTX));
       rctx.jcr = jcr;
@@ -109,6 +110,7 @@ bool acquire_device_for_read(DCR *dcr)
        */
       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();