autoconf/config.log
kernsconfig
diff
+mkcdrec
+mkCDrec_*
--- /dev/null
+# This file provides information about the External dependencies required by
+# Bacula.
+#
+# There are four fields delimited by |. Only the first two fields are
+# required. The other two are used when the top level directory of the
+# archive is not the same as the file name with any suffixes removed.
+#
+# Field 1 is the name of the dependency. It is used to define the
+# name of the three variables which are assigned the values of fields 2 to 4.
+#
+# Field 2 is the URL of the archive. It is assigned to the variable
+# URL_[field1].
+#
+# Field 3 is the top directory of the archive or the name of a directory that
+# must be created and the archive extracted into it. It is assigned to the
+# variable DIR_[field1].
+#
+# Field 4 indicates if the directory specified in field 3 must be created
+# first and the archive extracted into it. It is assigned to the variable
+# MKD_[field1]
+#
+MKCDREC|http://switch.dl.sourceforge.net/sourceforge/mkcdrec/mkCDrec_v0.9.4.tar.gz|mkcdrec
clean:
@$(RMF) *~ 1 2 3 diff
- @$(RMF) config.log config.out config.status
+ @$(RMF) config.log config.out config.status *.log
@rm -rf autom4te.cache
@rm -rf bacula-rescue-$(VERSION).tar.gz
@for subdir in freebsd linux solaris; do \
if [ -f $${subdir}/Makefile ]; then \
- (cd $${subdir}; $(MAKE) clean) \
+ (cd $${subdir}; $(MAKE) clean) \
fi; \
done
+ @if [ -d mkcdrec ]; then \
+ (cd mkcdrec; $(MAKE) clean) \
+ fi
# clean for distribution
distclean: clean
@$(RMF) -r CVS
-
+ @rm -rf mkcdrec mkCDrec_*
+
devclean: clean
@for subdir in freebsd linux solaris; do \
if [ -f $${subdir}/Makefile ]; then \
exec_prefix=${prefix}
fi
+# ------------------------------------------
+# What device to use
+# ------------------------------------------
+DEV=
+AC_ARG_WITH(dev,
+ [ --with-dev=DEVICE specify device (e.g. /dev/hdc)],
+ [
+ if test "x$withval" != "xno" ; then
+ DEV=$withval
+ fi
+ ]
+)
+
# -------------------------------------------
-# check for cdrecord writer location
+# if no --with-dev given check for cdrecord writer location
# get scsibus,target,lun
# -------------------------------------------
-CDSTL="3,0,0"
-if test ! x$CDRECORD = x ; then
- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
- if test x${CDSTL} = x ; then
- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
- fi
- if test x${CDSTL} = x ; then
- CDSTL="3,0,0"
+if test x$DEV = x ; then
+ CDSTL="3,0,0"
+ if test ! x$CDRECORD = x ; then
+ CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
+ if test x${CDSTL} = x ; then
+ CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
+ fi
+ if test x${CDSTL} = x ; then
+ CDSTL="3,0,0"
+ fi
fi
+ DEV="ATA:${CDSTL}"
fi
-AC_SUBST(CDSTL)
+AC_SUBST(DEV)
dnl# --------------------------------------------------------------------------
dnl# CHECKING COMMAND LINE OPTIONS
)
AC_SUBST(STATIC_FD)
+BACULA_BIN=
+# ------------------------------------------
+# Where to get Bacula binaries
+# ------------------------------------------
+AC_ARG_WITH(bacula-bin,
+ [ --with-bacula-bin=PATH specify path to bacula binaries (NOT IMPLEMENTED)],
+ [
+ if test "x$withval" != "xno" ; then
+ BACULA_BIN=$withval
+ fi
+ ]
+)
+AC_SUBST(BACULA_BIN)
+
+BACULA_SCRIPTS=
+# ------------------------------------------
+# Where to get Bacula scripts
+# ------------------------------------------
+AC_ARG_WITH(bacula-scripts,
+ [ --with-bacula-scripts=PATH specify path to bacula scripts],
+ [
+ if test "x$withval" != "xno" ; then
+ BACULA_SCRIPTS=$withval
+ fi
+ ]
+)
+AC_SUBST(BACULA_SCRIPTS)
+
+
+
if test x${bacula} = x -a x${STATIC_FD} = x ; then
AC_MSG_ERROR(You must specify either --with-bacula=PATH or --with-static-fd=PATH)
fi
MCOMMON=./autoconf/Make.common
AC_SUBST_FILE(MCOMMON)
+./build-depkgs
AC_OUTPUT([ \
autoconf/Make.common \
[ ]
)
+
echo "
Configuration on `date`:
Host: $host -- ${DISTNAME} ${DISTVER}
Rescue version: ${VERSION} (${DATE})
+ Bacula scripts location: ${BACULA_SCRIPTS}
Source code location: ${bacula}
Static FD location: ${STATIC_FD}
Specific kernel version: ${KERNEL}
+ CDROM device: ${DEV}
" > config.out
--- /dev/null
+#!/bin/sh
+
+usage()
+{
+ echo "usage: $0 [-h] [-C] [<dependency 1>] [<dependency 2>] ..."
+ echo " -h Displays this usage"
+ echo " -C Clobbers (overwrites) the source code by "
+ echo " reextracting the archive and reapplying any"
+ echo " patches."
+ echo ""
+ echo "<dependency N> Optional dependency, If none are given then all"
+ echo " of them will be built."
+ echo ""
+ echo "Valid dependencies are:"
+ grep -v '^#' < External-depkgs | cut -d'|' -f1 | cut -d'_' -f1 | tr A-Z a-z | sort -u | awk '{ print " " $1 }'
+}
+
+CLOBBER_SOURCE=
+
+while getopts "hHC" opt; do
+ case ${opt} in
+ H|h|\?) usage;exit 1;;
+ C) CLOBBER_SOURCE=true;;
+ esac
+done
+
+[ ${OPTIND} -gt 1 ] && shift `expr ${OPTIND} - 1`
+
+cwd=`pwd`
+cd `dirname $0`
+SCRIPT_DIR=`pwd`
+TOP_DIR=`pwd`
+DEPPKG_DIR=`pwd`
+
+export PATH=${BIN_DIR}:${PATH}
+
+OLD_IFS=${IFS};IFS="|";
+while read package url dir mkd; do
+ case ${package} in
+ \#*) ;;
+ *) eval "URL_${package}=${url};DIR_${package}=${dir};MKD_${package}=${mkd}";;
+ esac
+done < ${SCRIPT_DIR}/External-depkgs
+IFS=${OLD_IFS};unset OLD_IFS
+
+get_source()
+{
+ URL=$1
+ SRC_DIR=$2
+ MAKE_DIR=$3
+ ARCHIVE=`basename ${URL}`
+
+ case ${ARCHIVE} in
+ *.tar.gz) ARCHIVER="tar xzf"; [ -z "${SRC_DIR}" ] && SRC_DIR=`expr "${ARCHIVE}" : '\(.*\)\.tar\.gz'`;;
+ *.tar.bz2) ARCHIVER="tar xjf"; [ -z "${SRC_DIR}" ] && SRC_DIR=`expr "${ARCHIVE}" : '\(.*\)\.tar\.bz2'`;;
+ *.zip) ARCHIVER="unzip -q"; [ -z "${SRC_DIR}" ] && SRC_DIR=`expr "${ARCHIVE}" : '\(.*\)\.zip'`;;
+ *) echo Unsupported archive type - $ARCHIVE; exit 1;;
+ esac
+
+ if [ ! -e "${ARCHIVE}" ]
+ then
+ echo Downloading "${URL}"
+ if wget --passive-ftp "${URL}"
+ then
+ :
+ else
+ echo Unable to download ${ARCHIVE}
+ exit 1
+ fi
+ fi
+
+ if [ ! -e "${SRC_DIR}" -o "${CLOBBER_SOURCE}" = "true" ]
+ then
+ rm -rf ${SRC_DIR}
+ [ "${MAKE_DIR}" = "true" ] && mkdir ${SRC_DIR} && cd ${SRC_DIR}
+ echo Extracting ${ARCHIVE}
+ ${ARCHIVER} ${ARCHIVE} &> ${ARCHIVE}.log
+ cd ${SRC_DIR}
+ return 0
+ fi
+
+ cd ${SRC_DIR}
+ return 1
+}
+
+
+process_mkcdrec()
+{
+ if get_source "${URL_MKCDREC}" "${DIR_MKCDREC}" "${MKD_MKCDREC}"
+ then
+ echo "Have mkcdrec source"
+ fi
+}
+
+
+if [ "$#" -eq 0 ]
+then
+ process_mkcdrec
+else
+ for dependency in "$@"
+ do
+ eval "process_${dependency}"
+ done
+
+fi
PACKAGE_BUGREPORT=
ac_unique_file="version.h"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TRUEPRG FALSEPRG AWK VERSION DATE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MV RM CP ECHO AR CDRECORD build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE CDSTL iso where type KERNEL bacula STATIC_FD hostname DISTNAME DISTVER LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_DIR TRUEPRG FALSEPRG AWK VERSION DATE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA MV RM CP ECHO AR CDRECORD build build_cpu build_vendor build_os host host_cpu host_vendor host_os HAVE_SUN_OS_TRUE HAVE_SUN_OS_FALSE HAVE_OSF1_OS_TRUE HAVE_OSF1_OS_FALSE HAVE_AIX_OS_TRUE HAVE_AIX_OS_FALSE HAVE_HPUX_OS_TRUE HAVE_HPUX_OS_FALSE HAVE_LINUX_OS_TRUE HAVE_LINUX_OS_FALSE HAVE_FREEBSD_OS_TRUE HAVE_FREEBSD_OS_FALSE HAVE_NETBSD_OS_TRUE HAVE_NETBSD_OS_FALSE HAVE_OPENBSD_OS_TRUE HAVE_OPENBSD_OS_FALSE HAVE_BSDI_OS_TRUE HAVE_BSDI_OS_FALSE HAVE_SGI_OS_TRUE HAVE_SGI_OS_FALSE HAVE_IRIX_OS_TRUE HAVE_IRIX_OS_FALSE HAVE_DARWIN_OS_TRUE HAVE_DARWIN_OS_FALSE DEV iso where type KERNEL bacula STATIC_FD BACULA_BIN BACULA_SCRIPTS hostname DISTNAME DISTVER LIBOBJS LTLIBOBJS'
ac_subst_files='MCOMMON'
# Initialize some variables set by options.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-dev=DEVICE specify device (e.g. /dev/hdc)
--with-iso=PATH specify path to iso (not implemented)
--with-cdrom=PATH specify path to cdrom
--with-kernel=version specify complete kernel version (e.g. 2.6.14-2)
--with-bacula=PATH specify path to Bacula source
--with-static-fd=PATH specify path to static FD
+ --with-bacula-bin=PATH specify path to bacula binaries (NOT IMPLEMENTED)
+ --with-bacula-scripts=PATH specify path to bacula scripts
_ACEOF
fi
exec_prefix=${prefix}
fi
+# ------------------------------------------
+# What device to use
+# ------------------------------------------
+DEV=
+
+# Check whether --with-dev or --without-dev was given.
+if test "${with_dev+set}" = set; then
+ withval="$with_dev"
+
+ if test "x$withval" != "xno" ; then
+ DEV=$withval
+ fi
+
+
+fi;
+
# -------------------------------------------
-# check for cdrecord writer location
+# if no --with-dev given check for cdrecord writer location
# get scsibus,target,lun
# -------------------------------------------
-CDSTL="3,0,0"
-if test ! x$CDRECORD = x ; then
- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
- if test x${CDSTL} = x ; then
- CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
- fi
- if test x${CDSTL} = x ; then
- CDSTL="3,0,0"
+if test x$DEV = x ; then
+ CDSTL="3,0,0"
+ if test ! x$CDRECORD = x ; then
+ CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
+ if test x${CDSTL} = x ; then
+ CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
+ fi
+ if test x${CDSTL} = x ; then
+ CDSTL="3,0,0"
+ fi
fi
+ DEV="ATA:${CDSTL}"
fi
fi;
+BACULA_BIN=
+# ------------------------------------------
+# Where to get Bacula binaries
+# ------------------------------------------
+
+# Check whether --with-bacula-bin or --without-bacula-bin was given.
+if test "${with_bacula_bin+set}" = set; then
+ withval="$with_bacula_bin"
+
+ if test "x$withval" != "xno" ; then
+ BACULA_BIN=$withval
+ fi
+
+
+fi;
+
+
+BACULA_SCRIPTS=
+# ------------------------------------------
+# Where to get Bacula scripts
+# ------------------------------------------
+
+# Check whether --with-bacula-scripts or --without-bacula-scripts was given.
+if test "${with_bacula_scripts+set}" = set; then
+ withval="$with_bacula_scripts"
+
+ if test "x$withval" != "xno" ; then
+ BACULA_SCRIPTS=$withval
+ fi
+
+
+fi;
+
+
+
+
if test x${bacula} = x -a x${STATIC_FD} = x ; then
{ { echo "$as_me:$LINENO: error: You must specify either --with-bacula=PATH or --with-static-fd=PATH" >&5
echo "$as_me: error: You must specify either --with-bacula=PATH or --with-static-fd=PATH" >&2;}
MCOMMON=./autoconf/Make.common
+./build-depkgs
ac_config_files="$ac_config_files autoconf/Make.common Makefile linux/Makefile linux/cdrom/Makefile linux/cdrom/bacula/Makefile linux/cdrom/cdtree/boot/isolinux/boot.msg knoppix/cdrom/Makefile knoppix/cdrom/bacula/Makefile freebsd/Makefile solaris/Makefile $PFILES"
ac_config_commands="$ac_config_commands default"
s,@HAVE_IRIX_OS_FALSE@,$HAVE_IRIX_OS_FALSE,;t t
s,@HAVE_DARWIN_OS_TRUE@,$HAVE_DARWIN_OS_TRUE,;t t
s,@HAVE_DARWIN_OS_FALSE@,$HAVE_DARWIN_OS_FALSE,;t t
-s,@CDSTL@,$CDSTL,;t t
+s,@DEV@,$DEV,;t t
s,@iso@,$iso,;t t
s,@where@,$where,;t t
s,@type@,$type,;t t
s,@KERNEL@,$KERNEL,;t t
s,@bacula@,$bacula,;t t
s,@STATIC_FD@,$STATIC_FD,;t t
+s,@BACULA_BIN@,$BACULA_BIN,;t t
+s,@BACULA_SCRIPTS@,$BACULA_SCRIPTS,;t t
s,@hostname@,$hostname,;t t
s,@DISTNAME@,$DISTNAME,;t t
s,@DISTVER@,$DISTVER,;t t
+
echo "
Configuration on `date`:
Host: $host -- ${DISTNAME} ${DISTVER}
Rescue version: ${VERSION} (${DATE})
+ Bacula scripts location: ${BACULA_SCRIPTS}
Source code location: ${bacula}
Static FD location: ${STATIC_FD}
Specific kernel version: ${KERNEL}
+ CDROM device: ${DEV}
" > config.out
--- /dev/null
+#!/bin/sh
+diff -ur mkcdrec ../mkcdrec >diff
.PATH: .
+MKCDREC=@BUILD_DIR@/mkcdrec
+CWD=@BUILD_DIR@/linux/cdrom
first_rule: all
dummy:
copy-bacula:
cp -a bacula/ cdimage/
+pre-mkcdrec:
+ @echo "Patching mkcdrec Config.sh for Bacula"
+ @mkdir -p tmp
+ @rm -f tmp/1 tmp/2 tmp/1
+ @cp ${MKCDREC}/Config.sh tmp/2
+ @echo "s%^BACULA_DIR.*$$%BACULA_DIR=${CWD}/bacula%g" >tmp/1
+ @sed -f tmp/1 tmp/2 >tmp/3
+ @echo "s%^BACULA_RESTORE.*$$%BACULA_RESTORE=\"y\"%g" >tmp/1
+ @sed -f tmp/1 tmp/3 >tmp/4
+ @echo "s%^DVD_Drive.*$$%DVD_Drive=0%g" >tmp/1
+ @sed -f tmp/1 tmp/4 >tmp/5
+ @echo "s%^USECOLOR.*$$%USECOLOR=n%g" >tmp/1
+ @sed -f tmp/1 tmp/5 >${MKCDREC}/Config.sh
+ @rm -rf tmp
+ @cp -f @BACULA_BIN@/bacula-fd bacula/bin
+ @cp -f @BACULA_SCRIPTS@/bacula-fd.conf bacula/bin
+
+main-mkcdrec: dummy
+ @echo "Doing make in mkcdrec directory"
+ (cd ${MKCDREC}; make rescue)
+
+post-mkcdrec:
+ @echo "Cleaning up"
+ cp /tmp/CDrec.iso bootcd.iso
+ chmod 644 bootcd.iso
+ rm -f /tmp/CDrec.iso
+
+
+# This will build the old Bacula rescue
all: kernel binaries bacula initrd iso
+mkcdrec: bacula pre-mkcdrec main-mkcdrec post-mkcdrec
+
copy-static-fd: kernel binaries static-bacula initrd iso
# This needs to be customized for your burner.
+# Use either dev=ATA:x,y,z (as reported by cdrecord -scanbus)
+# or dev=/dev/<device> (e.g. hdc)
burn:
- cdrecord dev=ATA:@CDSTL@ gracetime=2 fs=4096k driveropts=burnfree -v \
+ cdrecord dev=@DEV@ gracetime=2 fs=4096k driveropts=burnfree -v \
-useinfo speed=48 -dao -eject -pad -data "bootcd.iso"
# Blank the CDROM assuming it is +rw
blank:
- cdrecord dev=ATA:@CDSTL@ gracetime=2 -v blank=fast -useinfo speed=48
+ cdrecord dev=@DEV@ gracetime=2 -v blank=fast -useinfo speed=48
scan:
cdrecord -scanbus
@rm -f cdtree/boot/isolinux/vmlinuz
@rm -f cdtree/boot/isolinux/map
@(cd bacula; make distclean)
+ @(cd ${MKCDREC}; make clean)
+ @(cd ${MKCDREC}/busybox; make distclean)
/* */
#undef VERSION
-#define VERSION "1.8.6"
-#define BDATE "01 July 2006"
-#define LSMDATE "01Jul06"
+#define VERSION "2.0.0"
+#define BDATE "29 August 2006"
+#define LSMDATE "29Aug06"