-
+03Feb04
+- Correct problems with jobs scheduled at a later time by hand.
+ Missing unlock(), backward test on pthread_create status.
+- Fix setip crash reported by Alan Brown.
+- Create bacula.spec.in in SuSE directory from Scott.
+- Fix missing unlock() in ua_status on access denial.
+- Lots of little cleanups, improving jcr use_count debug printing.
+- Add EMSG to mem_pool utilization statistics.
+01Feb04
+- New bacula.spec.in file from Scott
+- Add Scott's spec file to the platforms/suse directory
+- Modify configure.in to make platforms/suse/bacula.spec
+- Do not allow a resource name to be specified twice.
+
+2004-01-30 Version 1.33-30Jan04 Release
+30Jan04
+- Apply Jess Guardiani's second fix to list autochanger volumes without
+ opening the drive (necessary on FreeBSD if no tape is in the drive).
+- Added Postgresql configure search libraries recommended by Alan Brown.
+29Jan04
+- Reworked the command line handler in restore to walk through the
+ arguments one at a time. This makes the file= entries work correctly.
+ Also reworked the code that takes the MediaType and finds a
+ storage device.
+26Jan04
+- I've noticed that the backups of Rufus, my development machine, can be
+ "stuck" for about 12 hours, then suddenly they run. In running the
+ debugger, I see that it was stuck on the select() statement waiting
+ for the Hello. Why this happens I am not sure. I re-organized the code
+ a bit because it didn't seem to be as robust as it could, but I cannot
+ explain the problem.
+- As a consequence of the above, I have implemented a new bsock timer that
+ can be started and stopped. This is based on Nic Bellamy's new watchdog
+ code. The timer is set with start_bsock_timer(bsock, timeout); If the
+ timeout expires, the bsock will be marked as timed_out and interrupted
+ with a pthread_kill() on the current thread.
+- Added 5 minute bsock timers to all the opening Hello/authentication
+ exchanges between the various daemons.
+24Jan04
+- New spec file from Scott.
+- New patch file from Scott for create_sqlite_database
+- Fix crash in run command if invalid pool specified on the command line
+ and then the user cancels the Pool prompt.
+- Separate Console and ConsoleFont resources in gnome2 conf files.
+- Remove possibly bad ASSERTs from bnet.c
+- Remove open() of device in dircmd.c, which fails on FreeBSD with
+ an autoloader -- thanks to Jesse Guardiani for this fix.
+20Jan04
+- Remove all "hostname -s" from configure except for RedHat. Use uname -n instead.
+- Implement SetIP command.
+- Implement Close On Poll in Device resource on SD.
+- Implement Full, Inc, and Diff Pools.
+- Implement Access control lists for Consoles.
+18Jan04
+- Define default working_dir as /var/bacula/working.
+- Implement setip console command to set new IP address for a Client.
+17Jan04
+- Implement maximum network buffer size directives.
+- Good first cut at access control lists for the console.
+- Optimize restore to select only latest Differential backup after
+ the Full, and then all following Incremental backups. Previously
+ everything after Full was selected.
+16Jan04
+- Organize kernstodo a bit (more to be done).
+- Add client IP address to BSOCK structure.
+- Use bit fields where appropriate in BSOCK structure.
+- Pass UAContext to ua authenticate in Director, and make it
+ set the appropriate console (or NULL for none).
+- Tweak restore "run" argument handling and add "files" keyword.
+- Add device name or Volume name to some SD messages.
+15Jan04
+- First cut multiple consoles.
14Jan04
- Update kernstodo
- Add quit command to restore tree handler.
- Call pthread_cancel on SD msgchan only if the threadid is non-zero.
07Jan04
- Change RH autostart scripts to start in Dan's order.
+
+2004-01-06 Version 1.33-06Jan04 Release
06Jan04
- Correct calculation of week of month in scheduler and in scheduled
listing.
- "Close on Poll = yes/no" in SD Device resource.
- "Volume Poll Interval = time-interval" in SD Device resource.
- "Two EOF = yes/no" in SD Device resource.
-- "Close on Poll = yes/no" in SD Device resource.
- "Maximum Network Buffer Size = size" in SD Device resource.
- "Maximum Network Buffer Size = size" in FD FileDaemon (or Client) resource.
- "Console" new resource in Director conf file.
platforms/suse/Makefile \
platforms/suse/bacula-fd \
platforms/suse/bacula-sd \
- platforms/suse/bacula-dir"
+ platforms/suse/bacula-dir \
+ platforms/suse/bacula.spec"
;;
suse5)
DISTNAME=suse
platforms/suse/Makefile \
platforms/suse/bacula-fd \
platforms/suse/bacula-sd \
- platforms/suse/bacula-dir"
+ platforms/suse/bacula-dir \
+ platforms/suse/bacula.spec"
;;
suse5)
DISTNAME=suse
http://howtos.linux.com/guides/nag2/x-087-2-nfs.mountd.shtml
For 1.33
+- Allow "delete job jobid=xx jobid=xxx".
+- Allow "delete job jobid=xxx,yyy,aaa-bbb" i.e. list + ranges.
+- Implement multiple Volume in "purge jobs volume=".
+- Implement a JobSet, which groups any number of jobs. If the
+ JobSet is started, all the jobs are started together.
+ Allow Pool, Level, and Schedule overrides.
+- Enhance cancel to timout BSOCK packets after a specific delay.
- When I restore to Windows the Created, Accessed and Modifiedtimes are
those of the time of the restore, not those of the originalfile.
The dates you will find in your restore log seem to be the original
- Write a Qmsg() to be used in bnet.c to prevent recursion. Queue the
message. If dequeueing toss the messages. Lock while dequeuing so that
it cannot be called recursively and set dequeuing flag.
-- Look at ASSERT() at 384 src/lib/bnet.c
-- Add all pools in Dir conf to DB.
+- Add all pools in Dir conf to DB also update them to catch changed
+ LabelFormats and such.
- Symbolic link a directory to another one, then backup the symbolic
link.
- Build console in client-only build.
Incremental Backup Pool = yyy
Differential Backup Pool = zzz
}
+- Look at ASSERT() at 384 src/lib/bnet.c
# Whitebox Enterprise build
%define wb3 0
%{?build_wb3:%define wb3 1}
+# SuSE 9.0 build
+%define su9 0
+%{?build_su9:%define su9 1}
# database defines
# set mysql for MySQL support, leave unset for sqlite support
Distribution: The Bacula Team
Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
-BuildRequires: libstdc++-devel, libtermcap-devel, libxml2-devel, zlib-devel
+BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
%if %{rh7}
+BuildRequires: libtermcap-devel
BuildRequires: gtk+-devel >= 1.2
BuildRequires: gnome-libs-devel >= 1.4
BuildRequires: glibc-devel >= 2.2
BuildRequires: ORBit-devel
BuildRequires: bonobo-devel
BuildRequires: GConf-devel
+%else if %{su9}
+BuildRequires: termcap
+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
+BuildRequires: libbonoboui-devel >= 2.0
+BuildRequires: bonobo-activation-devel
+BuildRequires: gconf2-devel
+BuildRequires: linc-devel
%else
+BuildRequires: libtermcap-devel
BuildRequires: gtk2-devel >= 2.0
BuildRequires: libgnomeui-devel >= 2.0
BuildRequires: glibc-devel >= 2.3
Group: System Environment/Daemons
Provides: bacula-dir, bacula-sd, bacula-fd
Requires: readline, perl, atk, ncurses, pango, libstdc++
-Requires: libtermcap, libxml2, zlib
+Requires: libxml2, zlib
%if %{rh7}
Requires: gtk+ >= 1.2
Requires: gnome-libs >= 1.4
Requires: ORBit
Requires: bonobo
Requires: GConf
+Requires: libtermcap
+%else if %{su9}
+Requires: gtk2 >= 2.0
+Requires: libgnomeui >= 2.0
+Requires: glibc >= 2.3
+Requires: ORBit2
+Requires: libart_lgpl >= 2.0
+Requires: libbonobo >= 2.0
+Requires: libbonoboui >= 2.0
+Requires: bonobo-activation
+Requires: gconf2
+Requires: linc
+Requires: termcap
%else
Requires: gtk2 >= 2.0
Requires: libgnomeui >= 2.0
Requires: bonobo-activation
Requires: GConf2
Requires: linc
+Requires: libtermcap
%endif
%if %{mysql}
Requires: mysql >= 3.23
%build
+%if %{su9}
+export LDFLAGS="-L/usr/lib/termcap"
+%endif
+
cwd=${PWD}
cd %{depkgs}
%if ! %{mysql}
%install
cwd=${PWD}
-mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
%endif
# install the init scripts
-cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-dir
-cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-fd
-cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/rc.d/init.d/bacula-sd
+%if %{su9}
+cp platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
+cp platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
+cp platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
+%else
+cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
+cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
+cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
+%endif
# install the menu stuff
cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
%attr(0754,root,root) /etc/bacula/startmysql
%attr(0754,root,root) /etc/bacula/stopmysql
%attr(0754,root,root) /etc/bacula/mtx-changer
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
+%attr(0754,root,root) /etc/init.d/bacula-dir
+%attr(0754,root,root) /etc/init.d/bacula-fd
+%attr(0754,root,root) /etc/init.d/bacula-sd
%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
%attr(0644,root,root) /usr/man/man1/*
%attr(0754,root,root) /etc/bacula/make_catalog_backup
%attr(0754,root,root) /etc/bacula/make_sqlite_tables
%attr(0754,root,root) /etc/bacula/mtx-changer
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-dir
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-sd
+%attr(0754,root,root) /etc/init.d/bacula-dir
+%attr(0754,root,root) /etc/init.d/bacula-fd
+%attr(0754,root,root) /etc/init.d/bacula-sd
%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
%attr(0644,root,root) /usr/man/man1/*
%defattr(-,root,root)
%attr(0754,root,root) /etc/bacula/fd
-%attr(0754,root,root) /etc/rc.d/init.d/bacula-fd
+%attr(0754,root,root) /etc/init.d/bacula-fd
%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
%attr(0644,root,root) /etc/logrotate.d/bacula
rm -rf /etc/bacula/rescue/diskinfo/*
%changelog
+* Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added build configuration for SuSE.
+- Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
* Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
- added patch for create_sqlite_database to fix the installed bindir
- added execute of create_sqlite_database to post of sqlite package
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
-# Source function library
-. /etc/rc.d/init.d/functions
RETVAL=0
case "$1" in
start)
echo -n "Starting the Bacula Director: "
- daemon @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
+ /sbin/startproc @sbindir@/bacula-dir $2 -c @sysconfdir@/bacula-dir.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-dir
;;
stop)
echo -n "Stopping the Director daemon: "
- killproc @sbindir@/bacula-dir
+ /sbin/killproc @sbindir@/bacula-dir
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-dir
$0 start
;;
status)
- status @sbindir@/bacula-dir
+ /sbin/checkproc @sbindir@/bacula-dir
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
-# Source function library
-. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n "Starting the Bacula File daemon: "
- daemon @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
+ /sbin/startproc @sbindir@/bacula-fd $2 -c @sysconfdir@/bacula-fd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-fd
;;
stop)
echo -n "Stopping the Bacula File daemon: "
- killproc @sbindir@/bacula-fd
+ /sbin/killproc @sbindir@/bacula-fd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-fd
$0 start
;;
status)
- status @sbindir@/bacula-fd
+ /sbin/checkproc @sbindir@/bacula-fd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
#
-# Source function library
-. /etc/rc.d/init.d/functions
case "$1" in
start)
echo -n "Starting the Bacula Storage daemon: "
- daemon @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
+ /sbin/startproc @sbindir@/bacula-sd $2 -c @sysconfdir@/bacula-sd.conf
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch @subsysdir@/bacula-sd
;;
stop)
echo -n "Stopping the Bacula Storage daemon: "
- killproc @sbindir@/bacula-sd
+ /sbin/killproc @sbindir@/bacula-sd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f @subsysdir@/bacula-sd
$0 start
;;
status)
- status @sbindir@/bacula-sd
+ /sbin/checkproc @sbindir@/bacula-sd
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
--- /dev/null
+# Platform Build Configuration
+
+# basic defines for every build
+%define depkgs ../depkgs
+%define depkgs_version 24Jul03
+%define tomsrtbt tomsrtbt-2.0.103
+
+# platform defines - set one below or define the build_xxx on the command line
+# RedHat builds
+%define rh7 0
+%{?build_rh7:%define rh7 1}
+%define rh8 0
+%{?build_rh8:%define rh8 1}
+%define rh9 0
+%{?build_rh9:%define rh9 1}
+# Fedora Core 1 build
+%define fc1 0
+%{?build_fc1:%define fc1 1}
+# Whitebox Enterprise build
+%define wb3 0
+%{?build_wb3:%define wb3 1}
+# SuSE 9.0 build
+%define su9 0
+%{?build_su9:%define su9 1}
+
+# database defines
+# set mysql for MySQL support, leave unset for sqlite support
+%define mysql 0
+%{?build_mysql:%define mysql 1}
+
+Summary: Bacula - The Network Backup Solution
+Name: bacula
+Version: @VERSION@
+Release: 1
+Group: System Environment/Daemons
+Copyright: GPL v2
+Source0:http://www.prdownloads.sourceforge.net/bacula/%{name}-%{version}.tar.gz
+Source1:http://www.prdownloads.sourceforge.net/bacula/depkgs-%{depkgs_version}.tar.gz
+Source2:http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/%{tomsrtbt}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-root
+URL: http://www.bacula.org/
+Vendor: The Bacula Team
+Distribution: The Bacula Team
+Packager: D. Scott Barninger <barninger@fairfieldcomputers.com>
+BuildRequires: readline-devel, atk-devel, ncurses-devel, pango-devel
+BuildRequires: libstdc++-devel, libxml2-devel, zlib-devel
+%if %{rh7}
+BuildRequires: libtermcap-devel
+BuildRequires: gtk+-devel >= 1.2
+BuildRequires: gnome-libs-devel >= 1.4
+BuildRequires: glibc-devel >= 2.2
+BuildRequires: ORBit-devel
+BuildRequires: bonobo-devel
+BuildRequires: GConf-devel
+%else if %{su9}
+BuildRequires: termcap
+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
+BuildRequires: libbonoboui-devel >= 2.0
+BuildRequires: bonobo-activation-devel
+BuildRequires: gconf2-devel
+BuildRequires: linc-devel
+%else
+BuildRequires: libtermcap-devel
+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
+BuildRequires: libbonoboui-devel >= 2.0
+BuildRequires: bonobo-activation-devel
+BuildRequires: GConf2-devel
+BuildRequires: linc-devel
+%endif
+
+%if %{mysql}
+BuildRequires: mysql-devel >= 3.23
+%endif
+
+%description
+Bacula - It comes by night and sucks the vital essence from your computers.
+
+Bacula is a set of computer programs that permit you (or the system
+administrator) to manage backup, recovery, and verification of computer
+data across a network of computers of different kinds. In technical terms,
+it is a network client/server based backup program. Bacula is relatively
+easy to use and efficient, while offering many advanced storage management
+features that make it easy to find and recover lost or damaged files.
+Bacula source code has been released under the GPL version 2 license.
+
+%if %{mysql}
+%package mysql
+%else
+%package sqlite
+%endif
+
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+Provides: bacula-dir, bacula-sd, bacula-fd
+Requires: readline, perl, atk, ncurses, pango, libstdc++
+Requires: libxml2, zlib
+%if %{rh7}
+Requires: gtk+ >= 1.2
+Requires: gnome-libs >= 1.4
+Requires: glibc >= 2.2
+Requires: ORBit
+Requires: bonobo
+Requires: GConf
+Requires: libtermcap
+%else if %{su9}
+Requires: gtk2 >= 2.0
+Requires: libgnomeui >= 2.0
+Requires: glibc >= 2.3
+Requires: ORBit2
+Requires: libart_lgpl >= 2.0
+Requires: libbonobo >= 2.0
+Requires: libbonoboui >= 2.0
+Requires: bonobo-activation
+Requires: gconf2
+Requires: linc
+Requires: termcap
+%else
+Requires: gtk2 >= 2.0
+Requires: libgnomeui >= 2.0
+Requires: glibc >= 2.3
+Requires: ORBit2
+Requires: libart_lgpl >= 2.0
+Requires: libbonobo >= 2.0
+Requires: libbonoboui >= 2.0
+Requires: bonobo-activation
+Requires: GConf2
+Requires: linc
+Requires: libtermcap
+%endif
+%if %{mysql}
+Requires: mysql >= 3.23
+Requires: mysql-server >= 3.23
+%endif
+
+%if %{mysql}
+%description mysql
+%else
+%description sqlite
+%endif
+
+Bacula - It comes by night and sucks the vital essence from your computers.
+
+Bacula is a set of computer programs that permit you (or the system
+administrator) to manage backup, recovery, and verification of computer
+data across a network of computers of different kinds. In technical terms,
+it is a network client/server based backup program. Bacula is relatively
+easy to use and efficient, while offering many advanced storage management
+features that make it easy to find and recover lost or damaged files.
+Bacula source code has been released under the GPL version 2 license.
+
+%if %{mysql}
+This build requires MySQL to be installed separately as the catalog database.
+%else
+This build incorporates sqlite as the catalog database, statically compiled.
+%endif
+
+%package client
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+Provides: bacula-fd
+Requires: readline, perl, libstdc++, zlib
+%if %{rh7}
+Requires: gtk+ >= 1.2
+Requires: gnome-libs >= 1.4
+Requires: glibc >= 2.2
+%else
+Requires: gtk2 >= 2.0
+Requires: libgnomeui >= 2.0
+Requires: glibc >= 2.3
+%endif
+
+%description client
+Bacula - It comes by night and sucks the vital essence from your computers.
+
+Bacula is a set of computer programs that permit you (or the system
+administrator) to manage backup, recovery, and verification of computer
+data across a network of computers of different kinds. In technical terms,
+it is a network client/server based backup program. Bacula is relatively
+easy to use and efficient, while offering many advanced storage management
+features that make it easy to find and recover lost or damaged files.
+Bacula source code has been released under the GPL version 2 license.
+
+This is the File daemon (Client) only package.
+
+%package rescue
+
+Summary: Bacula - The Network Backup Solution
+Group: System Environment/Daemons
+Requires: coreutils, util-linux, libc5, bacula-fd
+
+%description rescue
+Bacula - It comes by night and sucks the vital essence from your computers.
+
+Bacula is a set of computer programs that permit you (or the system
+administrator) to manage backup, recovery, and verification of computer
+data across a network of computers of different kinds. In technical terms,
+it is a network client/server based backup program. Bacula is relatively
+easy to use and efficient, while offering many advanced storage management
+features that make it easy to find and recover lost or damaged files.
+Bacula source code has been released under the GPL version 2 license.
+
+This package installs scripts for disaster recovery and builds rescue
+floppy disks for bare metal recovery. This package includes tomsrtbt
+(http://www.toms.net/rb/, by Tom Oehser, Tom@Toms.NET) to provide a tool
+to build a boot floppy disk.
+
+You need to have the bacula-sqlite, bacula-mysql or bacula-client package for
+your platform installed and configured before installing this package.
+
+%prep
+
+%setup -b 1
+%setup -b 2
+
+%build
+
+%if %{su9}
+export LDFLAGS="-L/usr/lib/termcap"
+%endif
+
+cwd=${PWD}
+cd %{depkgs}
+%if ! %{mysql}
+make sqlite
+%endif
+make mtx
+cd ${cwd}
+
+# patch the make_sqlite_tables script for installation bindir
+patch src/cats/make_sqlite_tables.in src/cats/make_sqlite_tables.in.patch
+
+# patch the create_sqlite_database script for installation bindir
+patch src/cats/create_sqlite_database.in src/cats/create_sqlite_database.in.patch
+
+# patch the make_catalog_backup script for installation bindir
+patch src/cats/make_catalog_backup.in src/cats/make_catalog_backup.in.patch
+
+%configure \
+ --prefix=/usr \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/bacula \
+ --with-scriptdir=/etc/bacula \
+ --enable-smartalloc \
+ --enable-gnome \
+ --enable-static-fd \
+%if %{mysql}
+ --with-mysql \
+%else
+ --with-sqlite=${cwd}/../depkgs/sqlite \
+%endif
+ --with-working-dir=/var/bacula \
+ --with-pid-dir=/var/run \
+ --with-subsys-dir=/var/lock/subsys
+make
+
+cd src/filed
+strip static-bacula-fd
+cd ../../
+
+%install
+
+cwd=${PWD}
+mkdir -p $RPM_BUILD_ROOT/etc/init.d
+mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
+mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
+mkdir -p $RPM_BUILD_ROOT/usr/share/gnome/apps/System
+mkdir -p $RPM_BUILD_ROOT/usr/share/applications
+mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue
+mkdir -p $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt
+
+%if ! %{mysql}
+mkdir -p $RPM_BUILD_ROOT/usr/lib/sqlite
+%endif
+
+make \
+ prefix=$RPM_BUILD_ROOT/usr \
+ sbindir=$RPM_BUILD_ROOT/usr/sbin \
+ sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
+ scriptdir=$RPM_BUILD_ROOT/etc/bacula \
+ working_dir=$RPM_BUILD_ROOT/var/bacula \
+ install
+
+cd %{depkgs}
+make \
+ prefix=$RPM_BUILD_ROOT/usr \
+ sbindir=$RPM_BUILD_ROOT/usr/sbin \
+ sysconfdir=$RPM_BUILD_ROOT/etc/bacula \
+ working_dir=$RPM_BUILD_ROOT/var/bacula \
+ mandir=$RPM_BUILD_ROOT/usr/man \
+ mtx-install
+cd ${cwd}
+
+%if ! %{mysql}
+# fixme - make installs the mysql scripts for sqlite build
+rm -f $RPM_BUILD_ROOT/etc/bacula/startmysql
+rm -f $RPM_BUILD_ROOT/etc/bacula/stopmysql
+rm -f $RPM_BUILD_ROOT/etc/bacula/grant_mysql_privileges
+%endif
+
+# install the init scripts
+%if %{su9}
+cp platforms/suse/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
+cp platforms/suse/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
+cp platforms/suse/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
+%else
+cp platforms/redhat/bacula-dir $RPM_BUILD_ROOT/etc/init.d/bacula-dir
+cp platforms/redhat/bacula-fd $RPM_BUILD_ROOT/etc/init.d/bacula-fd
+cp platforms/redhat/bacula-sd $RPM_BUILD_ROOT/etc/init.d/bacula-sd
+%endif
+
+# install the menu stuff
+cp scripts/bacula.png $RPM_BUILD_ROOT/usr/share/pixmaps/bacula.png
+cp scripts/bacula.desktop.gnome1 $RPM_BUILD_ROOT/usr/share/gnome/apps/System/bacula.desktop
+cp scripts/bacula.desktop.gnome2 $RPM_BUILD_ROOT/usr/share/applications/bacula.desktop
+
+# install sqlite
+%if ! %{mysql}
+cp ../depkgs/sqlite/sqlite $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite
+cp ../depkgs/sqlite/sqlite.h $RPM_BUILD_ROOT/usr/lib/sqlite/sqlite.h
+cp ../depkgs/sqlite/libsqlite.a $RPM_BUILD_ROOT/usr/lib/sqlite/libsqlite.a
+%endif
+
+# install the logrotate file
+cp scripts/logrotate $RPM_BUILD_ROOT/etc/logrotate.d/bacula
+
+# install the rescue stuff
+# these are the rescue scripts
+cp rescue/linux/backup.etc.list $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/format_floppy $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/getdiskinfo $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/make_rescue_disk $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/restore_bacula $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/restore_etc $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/run_grub $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/run_lilo $RPM_BUILD_ROOT/etc/bacula/rescue/
+cp rescue/linux/sfdisk.bz2 $RPM_BUILD_ROOT/etc/bacula/rescue/
+
+# this is the static file daemon
+cp src/filed/static-bacula-fd $RPM_BUILD_ROOT/etc/bacula/rescue/bacula-fd
+
+# this is the tom's root boot disk
+cp ../%{tomsrtbt}/* $RPM_BUILD_ROOT/etc/bacula/rescue/tomsrtbt/
+
+%clean
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
+
+%if %{mysql}
+
+%files mysql
+%defattr(-,root,root)
+
+%attr(0754,root,root) /etc/bacula/bacula
+%attr(0754,root,root) /etc/bacula/console
+%attr(0754,root,root) /etc/bacula/fd
+%attr(0754,root,root) /etc/bacula/gconsole
+%attr(0754,root,root) /etc/bacula/create_mysql_database
+%attr(0754,root,root) /etc/bacula/delete_catalog_backup
+%attr(0754,root,root) /etc/bacula/drop_bacula_tables
+%attr(0754,root,root) /etc/bacula/drop_mysql_tables
+%attr(0754,root,root) /etc/bacula/make_bacula_tables
+%attr(0754,root,root) /etc/bacula/make_catalog_backup
+%attr(0754,root,root) /etc/bacula/make_mysql_tables
+%attr(0754,root,root) /etc/bacula/grant_mysql_privileges
+%attr(0754,root,root) /etc/bacula/startmysql
+%attr(0754,root,root) /etc/bacula/stopmysql
+%attr(0754,root,root) /etc/bacula/mtx-changer
+%attr(0754,root,root) /etc/init.d/bacula-dir
+%attr(0754,root,root) /etc/init.d/bacula-fd
+%attr(0754,root,root) /etc/init.d/bacula-sd
+
+%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
+%attr(0644,root,root) /usr/man/man1/*
+%attr(0644,root,root) /usr/share/pixmaps/bacula.png
+%attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
+%attr(0644,root,root) /usr/share/applications/bacula.desktop
+%attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
+%attr(0644,root,root) /etc/logrotate.d/bacula
+
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
+%attr(0640,root,root) /etc/bacula/query.sql
+%attr(0640,root,root) %dir /var/bacula
+
+%attr(0750,root,root) /usr/sbin/*
+
+%post mysql
+# delete then add our links
+/sbin/chkconfig --del bacula-dir
+/sbin/chkconfig --del bacula-fd
+/sbin/chkconfig --del bacula-sd
+/sbin/chkconfig --add bacula-dir
+/sbin/chkconfig --add bacula-fd
+/sbin/chkconfig --add bacula-sd
+
+# add execute permissions for console
+chmod 0755 /usr/sbin/gnome-console
+
+# grant privileges and create tables
+# this will error out harmlessly if tables already exist
+echo "Granting privileges for MySQL user bacula..."
+/etc/bacula/grant_mysql_privileges
+echo "Creating MySQL bacula database..."
+/etc/bacula/create_mysql_database
+echo "Creating bacula tables..."
+/etc/bacula/make_mysql_tables
+
+%preun mysql
+# delete our links
+/sbin/chkconfig --del bacula-dir
+/sbin/chkconfig --del bacula-fd
+/sbin/chkconfig --del bacula-sd
+
+%else
+
+%files sqlite
+%defattr(-,root,root)
+
+%attr(0754,root,root) /etc/bacula/bacula
+%attr(0754,root,root) /etc/bacula/console
+%attr(0754,root,root) /etc/bacula/fd
+%attr(0754,root,root) /etc/bacula/gconsole
+%attr(0754,root,root) /etc/bacula/create_sqlite_database
+%attr(0754,root,root) /etc/bacula/delete_catalog_backup
+%attr(0754,root,root) /etc/bacula/drop_bacula_tables
+%attr(0754,root,root) /etc/bacula/drop_sqlite_tables
+%attr(0754,root,root) /etc/bacula/make_bacula_tables
+%attr(0754,root,root) /etc/bacula/make_catalog_backup
+%attr(0754,root,root) /etc/bacula/make_sqlite_tables
+%attr(0754,root,root) /etc/bacula/mtx-changer
+%attr(0754,root,root) /etc/init.d/bacula-dir
+%attr(0754,root,root) /etc/init.d/bacula-fd
+%attr(0754,root,root) /etc/init.d/bacula-sd
+
+%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
+%attr(0644,root,root) /usr/man/man1/*
+%attr(0644,root,root) /usr/share/pixmaps/bacula.png
+%attr(0644,root,root) /usr/share/gnome/apps/System/bacula.desktop
+%attr(0644,root,root) /usr/share/applications/bacula.desktop
+%attr(0644,root,root) %config(noreplace) /etc/bacula/gnome-console.conf
+%attr(0644,root,root) /etc/logrotate.d/bacula
+
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-dir.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-sd.conf
+%attr(0640,root,root) %config(noreplace) /etc/bacula/console.conf
+%attr(0640,root,root) /etc/bacula/query.sql
+%attr(0640,root,root) /usr/lib/sqlite/libsqlite.a
+%attr(0640,root,root) /usr/lib/sqlite/sqlite.h
+%attr(0640,root,root) %dir /var/bacula
+
+%attr(0750,root,root) /usr/sbin/*
+%attr(0750,root,root) /usr/lib/sqlite/sqlite
+
+%post sqlite
+# delete then add our links
+/sbin/chkconfig --del bacula-dir
+/sbin/chkconfig --del bacula-fd
+/sbin/chkconfig --del bacula-sd
+/sbin/chkconfig --add bacula-dir
+/sbin/chkconfig --add bacula-fd
+/sbin/chkconfig --add bacula-sd
+
+# add execute permission for console
+chmod 0755 /usr/sbin/gnome-console
+
+# create the database and tables
+echo "Creating SQLite database..."
+/etc/bacula/create_sqlite_database
+echo "Creating the SQLite tables..."
+/etc/bacula/make_sqlite_tables
+
+%preun sqlite
+# delete our links
+/sbin/chkconfig --del bacula-dir
+/sbin/chkconfig --del bacula-fd
+/sbin/chkconfig --del bacula-sd
+
+%endif
+
+%files client
+%defattr(-,root,root)
+
+%attr(0754,root,root) /etc/bacula/fd
+%attr(0754,root,root) /etc/init.d/bacula-fd
+
+%attr(0644,root,root) %doc COPYING ChangeLog INSTALL README ReleaseNotes doc/*
+%attr(0644,root,root) /etc/logrotate.d/bacula
+
+%attr(0640,root,root) %config(noreplace) /etc/bacula/bacula-fd.conf
+%attr(0640,root,root) %dir /var/bacula
+
+%attr(0750,root,root) /usr/sbin/bacula-fd
+%attr(0750,root,root) /usr/sbin/btraceback
+%attr(0750,root,root) /usr/sbin/btraceback.gdb
+%attr(0750,root,root) /usr/sbin/smtp
+
+
+%post client
+# delete then add our links
+/sbin/chkconfig --del bacula-fd
+/sbin/chkconfig --add bacula-fd
+
+%preun client
+# delete our links
+/sbin/chkconfig --del bacula-fd
+
+%files rescue
+%defattr(-,root,root)
+%attr(0644,root,root) /etc/bacula/rescue/backup.etc.list
+%attr(0754,root,root) /etc/bacula/rescue/format_floppy
+%attr(0754,root,root) /etc/bacula/rescue/getdiskinfo
+%attr(0754,root,root) /etc/bacula/rescue/make_rescue_disk
+%attr(0754,root,root) /etc/bacula/rescue/restore_bacula
+%attr(0754,root,root) /etc/bacula/rescue/restore_etc
+%attr(0754,root,root) /etc/bacula/rescue/run_grub
+%attr(0754,root,root) /etc/bacula/rescue/run_lilo
+%attr(0644,root,root) /etc/bacula/rescue/sfdisk.bz2
+%attr(0754,root,root) /etc/bacula/rescue/bacula-fd
+/etc/bacula/rescue/tomsrtbt/*
+
+%post rescue
+# link our current installed conf file to the rescue directory
+ln -s /etc/bacula-fd.conf /etc/bacula/rescue/bacula-fd.conf
+
+echo
+echo "Ready to create the rescue files for this system."
+echo "Press <enter> to continue..."
+read A
+echo
+
+# run getdiskinfo
+echo "Running getdiskinfo..."
+cd /etc/bacula/rescue
+./getdiskinfo
+
+echo
+echo "Finished."
+echo "To create a boot disk run \"./install.s\" from the /etc/bacula/rescue/tomsrtbt/"
+echo "directory. To make the bacula rescue disk run"
+echo "\"./make_rescue_disk --copy-static-bacula --copy-etc-files\" "
+echo "from the /etc/bacula/rescue directory. To recreate the rescue"
+echo "information for this system run ./getdiskinfo again."
+echo
+
+%preun rescue
+# remove the files created after the initial rpm installation
+rm -f /etc/bacula/rescue/bacula-fd.conf
+rm -f /etc/bacula/rescue/partition.*
+rm -f /etc/bacula/rescue/format.*
+rm -f /etc/bacula/rescue/mount_drives
+rm -f /etc/bacula/rescue/start_network
+rm -f /etc/bacula/rescue/sfdisk
+rm -rf /etc/bacula/rescue/diskinfo/*
+
+%changelog
+* Sat Jan 31 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added build configuration for SuSE.
+- Thanks to Matt Vollmar <matt at panamschool.edu.sv> for his input
+* Sat Jan 24 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added patch for create_sqlite_database to fix the installed bindir
+- added execute of create_sqlite_database to post of sqlite package
+* Sat Jan 10 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- added virtual package Provides bacula-dir, bacula-sd, bacula-fd
+- added bacula-fd as Requires for rescue package
+- added build tag for Fedora Core 1
+- cleaned up dependancies for all builds
+* Thu Jan 1 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- removed rh_version from package names
+- added platform build configuration section to beginning of file
+* Tue Nov 25 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- removed make_static_bacula script from rescue package install
+* Sun Nov 23 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- Added define at top of file for depkgs version
+- Added rescue sub-package
+- Moved requires statements into proper sub-package locations
+* Mon Oct 27 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- Corrected Requires for Gnome 1.4/2.0 builds
+* Fri Oct 24 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- Added separate Source declaration for depkgs
+- added patch for make_catalog_backup script
+* Mon May 11 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- Misc changes to mysql/sqlite build and rh7/8 menu differences
+- Added rh_version to sub-package names
+- Added installed but missing file /etc/bacula/gconsole
+- rm'd /etc/bacula/grant_mysql_privileges on sqlite builds
+* Thu May 08 2003 Kern Sibbald <kern at sibbald.com>
+- Update spec for version 1.31 and combine client
+* Sun Mar 30 2003 D. Scott Barninger <barninger at fairfieldcomputers.com>
+- Initial spec file
control_jcr = (JCR *) self->data;
- Dmsg1(200, "job_monitor_watchdog %p called\n", self);
+ Dmsg1(400, "job_monitor_watchdog %p called\n", self);
lock_jcr_chain();
bool cancel;
if (jcr->JobId == 0) {
- Dmsg2(200, "Skipping JCR %p (%s) with JobId 0\n",
+ Dmsg2(400, "Skipping JCR %p (%s) with JobId 0\n",
jcr, jcr->Job);
/* Keep reference counts correct */
free_locked_jcr(jcr);
goto bail_out;
}
jcr->JobId = jcr->jr.JobId;
- ASSERT(jcr->jr.JobId > 0);
Dmsg4(50, "Created job record JobId=%d Name=%s Type=%c Level=%c\n",
jcr->JobId, jcr->Job, jcr->jr.Type, jcr->jr.Level);
/* Queue the job to be run */
if ((stat = jobq_add(&job_queue, jcr)) != 0) {
- Emsg1(M_ABORT, 0, _("Could not add job queue: ERR=%s\n"), strerror(stat));
+ Jmsg(jcr, M_FATAL, 0, _("Could not add job queue: ERR=%s\n"), strerror(stat));
+ goto bail_out;
}
Dmsg0(100, "Done run_job()\n");
wait_pkt *sched_pkt;
- Dmsg1(100, "jobq_add jobid=%d\n", jcr->JobId);
if (jq->valid != JOBQ_VALID) {
return EINVAL;
}
jcr->use_count++; /* mark jcr in use by us */
+ Dmsg3(100, "jobq_add jobid=%d jcr=0x%x use_count=%d\n", jcr->JobId, jcr, jcr->use_count);
if (!job_canceled(jcr) && wtime > 0) {
set_thread_concurrency(jq->max_workers + 2);
sched_pkt = (wait_pkt *)malloc(sizeof(wait_pkt));
sched_pkt->jcr = jcr;
sched_pkt->jq = jq;
stat = pthread_create(&id, &jq->attr, sched_wait, (void *)sched_pkt);
- if (!stat) { /* thread not created */
+ if (stat != 0) { /* thread not created */
jcr->use_count--; /* release jcr */
}
return stat;
Dmsg1(100, "Prepended job=%d to ready queue\n", jcr->JobId);
} else {
/* Add this job to the wait queue in priority sorted order */
- foreach_dlist (li, jq->waiting_jobs) {
+ foreach_dlist(li, jq->waiting_jobs) {
Dmsg2(100, "waiting item jobid=%d priority=%d\n",
li->jcr->JobId, li->jcr->JobPriority);
if (li->jcr->JobPriority > jcr->JobPriority) {
bool found = false;
jobq_item_t *item;
- Dmsg1(100, "jobq_remove jobid=%d\n", jcr->JobId);
+ Dmsg2(100, "jobq_remove jobid=%d jcr=0x%x\n", jcr->JobId, jcr);
if (jq->valid != JOBQ_VALID) {
return EINVAL;
}
return stat;
}
- foreach_dlist (item, jq->waiting_jobs) {
+ foreach_dlist(item, jq->waiting_jobs) {
if (jcr == item->jcr) {
found = true;
break;
}
}
if (!found) {
+ pthread_mutex_unlock(&jq->mutex);
+ Dmsg2(100, "jobq_remove jobid=%d jcr=0x%x not in wait queue\n", jcr->JobId, jcr);
return EINVAL;
}
/* Move item to be the first on the list */
jq->waiting_jobs->remove(item);
jq->ready_jobs->prepend(item);
+ Dmsg2(100, "jobq_remove jobid=%d jcr=0x%x moved to ready queue\n", jcr->JobId, jcr);
stat = start_server(jq);
static int setip_cmd(UAContext *ua, char *cmd)
{
CLIENT *client;
- if (!ua->cons && acl_access_ok(ua, Client_ACL, ua->cons->hdr.name)) {
+ if (!ua->cons || !acl_access_ok(ua, Client_ACL, ua->cons->hdr.name)) {
bsendmsg(ua, _("Illegal command from this console.\n"));
return 1;
}
*/
int do_a_dot_command(UAContext *ua, char *cmd)
{
- unsigned int i;
+ int i;
int len, stat;
- int found;
+ bool found = false;
- found = 0;
stat = 1;
- Dmsg1(200, "Dot command: %s\n", ua->UA_sock->msg);
+ Dmsg1(400, "Dot command: %s\n", ua->UA_sock->msg);
if (ua->argc == 0) {
return 1;
}
if (len == 1) {
return 1; /* no op */
}
- for (i=0; i<comsize; i++) { /* search for command */
+ for (i=0; i<(int)comsize; i++) { /* search for command */
if (strncasecmp(ua->argk[0], _(commands[i].key), len) == 0) {
stat = (*commands[i].func)(ua, cmd); /* go execute command */
- found = 1;
+ found = true;
break;
}
}
if (!found) {
- strcat(ua->UA_sock->msg, _(": is an illegal command\n"));
+ pm_strcat(&ua->UA_sock->msg, _(": is an illegal command\n"));
ua->UA_sock->msglen = strlen(ua->UA_sock->msg);
bnet_send(ua->UA_sock);
}
int woy, twoy;
int tod, tom;
- Dmsg0(200, "enter find_runs()\n");
-
sched = job->schedule;
if (sched == NULL) { /* scheduled? */
return NULL; /* no nothing to report */
tm.tm_min = run->minute;
tm.tm_sec = 0;
runtime = mktime(&tm);
- Dmsg2(200, "truntime=%d now=%d\n", runtime, now);
+// Dmsg2(200, "truntime=%d now=%d\n", runtime, now);
if (runtime < tomorrow) {
return run; /* found it, return run resource */
}
uint32_t selected_files;
char *where;
RBSR *bsr;
- POOLMEM *fname;
- POOLMEM *path;
+ POOLMEM *fname; /* filename only */
+ POOLMEM *path; /* path only */
POOLMEM *query;
- int fnl;
- int pnl;
+ int fnl; /* filename length */
+ int pnl; /* path length */
bool found;
NAME_LIST name_list;
};
int level, num_jobs = 0;
bool hdr_printed = false;
- Dmsg0(200, "enter find_runs()\n");
+ Dmsg0(200, "enter list_sched_jobs()\n");
/* Loop through all jobs */
LockRes();
} else {
bsendmsg(ua, "\n");
}
- Dmsg0(200, "Leave find_runs()\n");
+ Dmsg0(200, "Leave list_sched_jobs_runs()\n");
}
static void list_running_jobs(UAContext *ua)
char level[10];
bool pool_mem = false;
+ Dmsg0(200, "enter list_run_jobs()\n");
lock_jcr_chain();
for (jcr=NULL; (jcr=get_next_jcr(jcr)); njobs++) {
if (jcr->JobId == 0) { /* this is us */
if (njobs == 0) {
unlock_jcr_chain();
bsendmsg(ua, _("No Running Jobs.\n"));
+ Dmsg0(200, "leave list_run_jobs()\n");
return;
}
njobs = 0;
bsendmsg(ua, _("Level JobId Job Status\n"));
bsendmsg(ua, _("====================================================================\n"));
for (jcr=NULL; (jcr=get_next_jcr(jcr)); njobs++) {
- if (!acl_access_ok(ua, Job_ACL, jcr->job->hdr.name)) {
- continue;
- }
- if (jcr->JobId == 0) { /* this is us */
+ if (jcr->JobId == 0 || !acl_access_ok(ua, Job_ACL, jcr->job->hdr.name)) {
njobs--;
free_locked_jcr(jcr);
continue;
free_locked_jcr(jcr);
}
unlock_jcr_chain();
-
bsendmsg(ua, "\n");
+ Dmsg0(200, "leave list_run_jobs()\n");
}
static void list_terminated_jobs(UAContext *ua)
P(jcr_chain_mutex);
jcr->use_count--; /* decrement use count */
- Dmsg3(200, "Dec jcr 0x%x use_count=%d jobid=%d\n", jcr, jcr->use_count, jcr->JobId);
+ Dmsg3(200, "Dec free_jcr 0x%x use_count=%d jobid=%d\n", jcr, jcr->use_count, jcr->JobId);
if (jcr->use_count > 0) { /* if in use */
V(jcr_chain_mutex);
- Dmsg2(200, "jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "free_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
return;
}
remove_jcr(jcr);
void free_locked_jcr(JCR *jcr)
{
jcr->use_count--; /* decrement use count */
- Dmsg2(200, "Dec jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "Dec free_locked_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
if (jcr->use_count > 0) { /* if in use */
return;
}
P(jcr->mutex);
jcr->use_count++;
V(jcr->mutex);
- Dmsg2(200, "Inc jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "Inc get_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
break;
}
}
P(jcr->mutex);
jcr->use_count++;
V(jcr->mutex);
- Dmsg2(200, "Inc jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "Inc get_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
break;
}
}
P(jcr->mutex);
jcr->use_count++;
V(jcr->mutex);
- Dmsg2(200, "Inc jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "Inc get_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
break;
}
}
P(jcr->mutex);
jcr->use_count++;
V(jcr->mutex);
- Dmsg2(200, "Inc jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
+ Dmsg2(200, "Inc get_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
break;
}
}
}
-JCR *get_next_jcr(JCR *jcr)
+JCR *get_next_jcr(JCR *prev_jcr)
{
- JCR *rjcr;
+ JCR *jcr;
- if (jcr == NULL) {
- rjcr = jobs;
+ if (prev_jcr == NULL) {
+ jcr = jobs;
} else {
- rjcr = jcr->next;
+ jcr = prev_jcr->next;
}
- if (rjcr) {
- P(rjcr->mutex);
- rjcr->use_count++;
- V(rjcr->mutex);
- Dmsg1(200, "Inc jcr use_count=%d\n", rjcr->use_count);
+ if (jcr) {
+ P(jcr->mutex);
+ jcr->use_count++;
+ V(jcr->mutex);
+ Dmsg2(200, "Inc get_next_jcr 0x%x use_count=%d\n", jcr, jcr->use_count);
}
- return rjcr;
+ return jcr;
}
bool init_jcr_subsystem(void)
BSOCK *fd;
time_t timer_start;
- Dmsg0(200, "Start JCR timeout checks\n");
+ Dmsg0(400, "Start JCR timeout checks\n");
/* Walk through all JCRs checking if any one is
* blocked for more than specified max time.
void close_memory_pool()
{
struct abufhead *buf, *next;
- int i;
sm_check(__FILE__, __LINE__, False);
P(mutex);
- for (i=1; i<=PM_MAX; i++) {
+ for (int i=1; i<=PM_MAX; i++) {
buf = pool_ctl[i].free_buf;
while (buf) {
next = buf->next;
static char *pool_name(int pool)
{
- static char *name[] = {"NoPool", "FNAME ", "MSG ", "EMSG "};
+ static char *name[] = {"NoPool", "NAME ", "FNAME ", "MSG ", "EMSG "};
static char buf[30];
if (pool >= 0 && pool <= PM_MAX) {
*/
void print_memory_pool_stats()
{
- int i;
-
Dmsg0(-1, "Pool Maxsize Maxused Inuse\n");
- for (i=0; i<=PM_MAX; i++)
+ for (int i=0; i<=PM_MAX; i++)
Dmsg4(-1, "%5s %7d %7d %5d\n", pool_name(i), pool_ctl[i].max_size,
pool_ctl[i].max_used, pool_ctl[i].in_use);
}
}
if (!found) {
- scan_err1(lc, "message type: %s not found", str);
+ scan_err1(lc, _("message type: %s not found"), str);
/* NOT REACHED */
}
}
free_pool_memory(msg);
/* Store the name both pass 1 and pass 2 */
+ if (*(item->value)) {
+ scan_err2(lc, _("Attempt to redefine name \"%s\" to \"%s\"."),
+ *(item->value), lc->str);
+ }
*(item->value) = bstrdup(lc->str);
scan_to_eol(lc);
set_bit(index, res_all.hdr.item_present);
#undef VERSION
#define VERSION "1.33"
#define VSTRING "1"
-#define BDATE "30 Jan 2004"
-#define LSMDATE "30Jan04"
+#define BDATE "03 Feb 2004"
+#define LSMDATE "03Feb04"
/* Debug flags */
#undef DEBUG