I have re-worked the TSM client package.
It now handles configuration files properly, the MESSAGES file has NetBSD specific hints. The Makefile uses a lot more variables instead of hard-coded information, and it handles the suse_* dependencies more flexibly.
This commit is contained in:
parent
3e5d2688db
commit
8bd2265933
7 changed files with 149 additions and 63 deletions
|
@ -1 +1 @@
|
|||
IBM Tivoli Storage Manager software
|
||||
IBM Tivoli Storage Manager client
|
||||
|
|
26
tsm/MESSAGE
26
tsm/MESSAGE
|
@ -1,8 +1,24 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1 2003/06/19 20:26:48 sfberry Exp $
|
||||
$NetBSD: MESSAGE,v 1.2 2006/02/10 17:12:09 hfath Exp $
|
||||
|
||||
TSM has been installed in
|
||||
${PREFIX}/${MSES}/opt/tivoli
|
||||
with binaries and configuration in
|
||||
${PREFIX}/${MSES}/opt/tivoli/tsm/client/ba/bin
|
||||
Tivoli Storage Manager has been installed in
|
||||
${EMULDIR}/opt/tivoli
|
||||
with binaries in
|
||||
${EMULDIR}/opt/tivoli/tsm/client/ba/bin
|
||||
and configuration in
|
||||
${PKG_SYSCONFDIR}
|
||||
|
||||
NetBSD configuration hints:
|
||||
|
||||
- Make sure 'passworddir' is set in tsm.sys so that the passwd file
|
||||
ends up in ${PKG_SYSCONFDIR} instead of the shadow hierarchy.
|
||||
- The environment variables DSM_DIR, DSM_CONFIG, DSM_LOG
|
||||
need to be set properly. DSM_LOG may inadvertently end up in the emul
|
||||
shadow hierarchy.
|
||||
There is a sample start script in ${PREFIX}/share/examples/tsm.
|
||||
- For backing up the native filesystem hierarchy, use a construct
|
||||
like "ln -s / /.`hostname`" to break out of the emul shadow hierarchy.
|
||||
|
||||
TSM documentation (html and pdf) is installed under
|
||||
${EMULDIR}/opt/tivoli/tsm/client/books.
|
||||
===========================================================================
|
||||
|
|
68
tsm/Makefile
68
tsm/Makefile
|
@ -1,67 +1,75 @@
|
|||
# $NetBSD: Makefile,v 1.4 2004/09/13 15:52:24 hfath Exp $
|
||||
# $NetBSD: Makefile,v 1.5 2006/02/10 17:12:09 hfath Exp $
|
||||
|
||||
DISTNAME= tsm-5.2.2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= ftp://ftp.software.ibm.com/storage/tivoli-storage-management/maintenance/client/v5r2/Linux/Linux86/v522/
|
||||
DISTFILES= ${RPMFILES}
|
||||
RPMFILES= TIVsm-BA.i386.rpm TIVsm-API.i386.rpm
|
||||
|
||||
MAINTAINER= strawberry@toth.org.uk
|
||||
HOMEPAGE= http://www-3.ibm.com/software/tivoli/products/storage-mgr/
|
||||
COMMENT= IBM Tivoli Storage Manager Client
|
||||
|
||||
PKG_SYSCONFSUBDIR= tsm
|
||||
FILESDIR= ${PKGDIR}/files
|
||||
EG_DIR= ${PREFIX}/share/examples/tsm
|
||||
CONF_FILES= ${EG_DIR}/dsm.sys.smp ${PKG_SYSCONFDIR}/dsm.sys \
|
||||
${EG_DIR}/dsm.opt.smp ${PKG_SYSCONFDIR}/dsm.opt
|
||||
|
||||
EXTRACT_ONLY= # empty
|
||||
NO_BUILD= YES
|
||||
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
|
||||
RPMFILES= TIVsm-BA.i386.rpm TIVsm-API.i386.rpm
|
||||
PLIST_DYN= ${WRKDIR}/PLIST_DYNAMIC
|
||||
PLIST_SRC= ${PLIST_DYN} ${PKGDIR}/PLIST
|
||||
PLIST_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
|
||||
DIST_SUBDIR= .
|
||||
|
||||
.include "../../emulators/suse_linux/arch.mk"
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
MANCOMPRESSED?= yes
|
||||
|
||||
EMULSUBDIR= emul/linux
|
||||
EMULDIR= ${PREFIX}/${EMULSUBDIR}
|
||||
TSMCLIENTSUBDIR= opt/tivoli/tsm/client
|
||||
|
||||
ONLY_FOR_PLATFORM= *-*-i386
|
||||
.if (${OPSYS} != "Linux") && (${MACHINE_ARCH} == "i386")
|
||||
DEPENDS+= suse_compat>=6.4:../../emulators/suse_compat
|
||||
DEPENDS+= suse_x11>6.4:../../emulators/suse_x11
|
||||
.endif
|
||||
MESSAGE_SUBST+= EMULDIR=${EMULDIR:Q}
|
||||
|
||||
ONLY_FOR_PLATFORM= NetBSD-[2-9]*-i386
|
||||
|
||||
RPM2PKG= ${PREFIX}/sbin/rpm2pkg
|
||||
BUILD_DEPENDS+= rpm2pkg>=1.3:../../pkgtools/rpm2pkg
|
||||
|
||||
BUILD_DEFS+= RPMFILES
|
||||
.if defined(RPMIGNOREPATH)
|
||||
BUILD_DEFS+= RPMIGNOREPATH
|
||||
.endif
|
||||
RPM2PKGSTRIP= 0
|
||||
RPM2PKGARGS= -d ${PREFIX} -f ${PLIST_DYN} -p ${EMULSUBDIR}
|
||||
.for temp in ${RPMFILES}
|
||||
RPM2PKGARGS+= ${DISTDIR}/${temp}
|
||||
.endfor
|
||||
|
||||
# The SuSE Linux packages have circular dependencies.
|
||||
LDD?= ${TRUE}
|
||||
|
||||
RPM2PKGARGS= -d ${PREFIX} -f ${PLIST_SRC} -p ${EMULSUBDIR}
|
||||
.for TEMP in ${RPMIGNOREPATH}
|
||||
RPM2PKGARGS+= -i ${TEMP}
|
||||
.endfor
|
||||
.for TEMP in ${RPMFILES}
|
||||
RPM2PKGARGS+= ${DISTDIR}/${TEMP}
|
||||
.endfor
|
||||
DEPENDS+= suse_compat>=7.3:../../emulators/${SUSE_DIR_PREFIX}_compat
|
||||
DEPENDS+= suse_x11>=7.3:../../emulators/${SUSE_DIR_PREFIX}_x11
|
||||
|
||||
do-install:
|
||||
${RPM2PKG} ${RPM2PKGARGS}
|
||||
@if ${GREP} -q 'lib.*\.so' ${PLIST_SRC}; then \
|
||||
@if ${GREP} -q 'lib.*\.so' ${PLIST_DYN}; then \
|
||||
${ECHO_MSG} "===> [Automatic Linux shared object handling]"; \
|
||||
${ECHO} "/opt/tivoli/tsm/client/ba/bin" >> ${EMULDIR}/etc/ld.so.conf; \
|
||||
${ECHO} "/opt/tivoli/tsm/client/api/bin" >> ${EMULDIR}/etc/ld.so.conf; \
|
||||
if ! ${GREP} -q "/${TSMCLIENTSUBDIR}/ba/bin" ${EMULDIR}/etc/ld.so.conf; then \
|
||||
${ECHO} "/${TSMCLIENTSUBDIR}/ba/bin" >> ${EMULDIR}/etc/ld.so.conf; \
|
||||
fi; \
|
||||
if ! ${GREP} -q "/${TSMCLIENTSUBDIR}/api/bin" ${EMULDIR}/etc/ld.so.conf; then \
|
||||
${ECHO} "/${TSMCLIENTSUBDIR}/api/bin" >> ${EMULDIR}/etc/ld.so.conf; \
|
||||
fi; \
|
||||
${EMULDIR}/sbin/ldconfig -r ${EMULDIR}; \
|
||||
${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_SRC}; \
|
||||
${ECHO} "@unexec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR} 2>/dev/null" >>${PLIST_SRC}; \
|
||||
${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_DYN}; \
|
||||
${ECHO} "@unexec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR} 2>/dev/null" >>${PLIST_DYN}; \
|
||||
fi
|
||||
|
||||
show-shlib-type:
|
||||
@${ECHO} linux-${MACHINE_ARCH}
|
||||
.include "../../emulators/suse_linux/Makefile.application"
|
||||
|
||||
post-install:
|
||||
${TEST} -f ${EMULDIR}/etc/mtab || ${LN} -s /etc/fstab ${EMULDIR}/etc/mtab
|
||||
@${TEST} -f ${EMULDIR}/etc/mtab || ${LN} -fs /etc/fstab ${EMULDIR}/etc/mtab
|
||||
@${INSTALL_DATA_DIR} ${EG_DIR}
|
||||
@${INSTALL_DATA} ${EMULDIR}/${TSMCLIENTSUBDIR}/ba/bin/dsm.*.smp ${EG_DIR}
|
||||
@${INSTALL_DATA} ${FILESDIR}/tsm_daily.sh ${EG_DIR}
|
||||
@${RM} -f ${PKG_SYSCONFDIR}/en_US && ${LN} -s ${EMULDIR}/${TSMCLIENTSUBDIR}/api/bin/en_US/ ${PKG_SYSCONFDIR}/en_US
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
7
tsm/PLIST
Normal file
7
tsm/PLIST
Normal file
|
@ -0,0 +1,7 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2006/02/10 17:12:09 hfath Exp $
|
||||
share/examples/tsm/dsm.opt.smp
|
||||
share/examples/tsm/dsm.sys.smp
|
||||
share/examples/tsm/tsm_daily.sh
|
||||
@exec ${MKDIR} %D/share/examples/tsm
|
||||
@dirrm share/examples/tsm
|
||||
@unexec ${RM} -f ${PKG_SYSCONFDIR}/en_US
|
20
tsm/TODO
20
tsm/TODO
|
@ -1,23 +1,3 @@
|
|||
|
||||
## Urgent
|
||||
|
||||
- Get some testing.
|
||||
- Copy dsm.{sys,opt}.smp to share/examples/tivoli.
|
||||
- tsm aborts with weird error if the DSM_CONFIG file is not found.
|
||||
- tsm wants /etc/mtab as a link to native /etc/fstab. Document that.
|
||||
- Populate etc/tivoli (dsm.{sys,opt}, and don't forget the
|
||||
en_US -> /emul/linux/opt/tivoli/tsm/client/ba/bin/en_US/ symlink)
|
||||
- Make sure 'passworddir' is set so that the passwd file ends up
|
||||
in /etc/tivoli instead of the shadow hierarchy
|
||||
- Notify the admin that the environment variables DSM_DIR, DSM_CONFIG, DSM_LOG
|
||||
have to be set properly. DSM_LOG may inadvertently end up in the emul
|
||||
shadow hierarchy.
|
||||
- Notify the admin that she needs a construct like 'ln -s / /.mymachine'
|
||||
to break out of the emul shadow hierarchy.
|
||||
|
||||
|
||||
## Less urgent
|
||||
|
||||
- Add other architectures (linuxppc, solaris, ...)
|
||||
- Find a better way of adding library paths to the linux /etc/ld.so.conf
|
||||
- Work out installation on rpm-native platforms (Linux, Solaris, AIX)
|
||||
|
|
14
tsm/distinfo
14
tsm/distinfo
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.3 2005/09/28 06:41:43 rillig Exp $
|
||||
$NetBSD: distinfo,v 1.4 2006/02/10 17:12:09 hfath Exp $
|
||||
|
||||
SHA1 (TIVsm-BA.i386.rpm) = 2f083dee16ac87e9683e8caf63fd95548ea0e26f
|
||||
RMD160 (TIVsm-BA.i386.rpm) = fe3672d052218b45f09c5b6b2b8fc7849a3c4dc2
|
||||
Size (TIVsm-BA.i386.rpm) = 14515561 bytes
|
||||
SHA1 (TIVsm-API.i386.rpm) = 079846fa44894b6db96944f9beb4a7dbf009d08b
|
||||
RMD160 (TIVsm-API.i386.rpm) = f5881f086a34a1b849bc9fb507e13e6794c62f10
|
||||
Size (TIVsm-API.i386.rpm) = 1957315 bytes
|
||||
SHA1 (./TIVsm-BA.i386.rpm) = 2f083dee16ac87e9683e8caf63fd95548ea0e26f
|
||||
RMD160 (./TIVsm-BA.i386.rpm) = fe3672d052218b45f09c5b6b2b8fc7849a3c4dc2
|
||||
Size (./TIVsm-BA.i386.rpm) = 14515561 bytes
|
||||
SHA1 (./TIVsm-API.i386.rpm) = 079846fa44894b6db96944f9beb4a7dbf009d08b
|
||||
RMD160 (./TIVsm-API.i386.rpm) = f5881f086a34a1b849bc9fb507e13e6794c62f10
|
||||
Size (./TIVsm-API.i386.rpm) = 1957315 bytes
|
||||
|
|
75
tsm/files/tsm_daily.sh
Normal file
75
tsm/files/tsm_daily.sh
Normal file
|
@ -0,0 +1,75 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Sample TSM startup file, adjust to your requirements and
|
||||
# call from e.g /etc/daily.local
|
||||
#
|
||||
# Daily (nightly) backup via Tivoli Storage Manager (IBM ADSM)
|
||||
# Set up environment, wrap logfiles and start dsmc.
|
||||
#
|
||||
# NetBSD configuration hints:
|
||||
#
|
||||
# - Make sure 'passworddir' is set in tsm.sys so that the passwd file
|
||||
# ends up in ${PKG_SYSCONFDIR} instead of the shadow hierarchy.
|
||||
# - The environment variables DSM_DIR, DSM_CONFIG, DSM_LOG
|
||||
# need to be set properly. DSM_LOG may inadvertently end up in
|
||||
# the emul shadow hierarchy.
|
||||
# - For backing up the native filesystem hierarchy, use a construct
|
||||
# like "ln -s / /.`hostname`" to break out of the emul shadow hierarchy.
|
||||
#
|
||||
# $NetBSD: tsm_daily.sh,v 1.1 2006/02/10 17:12:09 hfath Exp $
|
||||
|
||||
umask 027
|
||||
|
||||
TSMCONFDIR="/etc/tsm"
|
||||
|
||||
test -d ${TSMCONFDIR} || exit 1
|
||||
|
||||
DSM_DIR="${TSMCONFDIR}"
|
||||
DSM_CONFIG="${TSMCONFDIR}/dsm.opt"
|
||||
DSM_LOG="/var/log"
|
||||
|
||||
export DSM_DIR DSM_CONFIG DSM_LOG
|
||||
|
||||
# Check if the above settings are reasonable
|
||||
if [ ! -d ${TSMCONFDIR} ]
|
||||
then
|
||||
echo "TSM config directory ${TSMCONFDIR} does not exist, aborting." | logger
|
||||
exit 1
|
||||
elif [ ! -f ${DSM_CONFIG} ]
|
||||
echo "TSM config file ${DSM_CONFIG} not found, aborting." | logger
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LC_CTYPE="en_US"
|
||||
LC_ALL="en_US"
|
||||
LANG="en_US"
|
||||
|
||||
export LC_CTYPE LC_ALL LANG
|
||||
|
||||
|
||||
LOGNAME="dsm-runlog"
|
||||
|
||||
# Rotate the logs
|
||||
for ii in 5 4 3 2 1 0; do
|
||||
if [ -f ${DSM_LOG}/${LOGNAME}.${ii} ]
|
||||
then
|
||||
mv ${DSM_LOG}/${LOGNAME}.${ii} ${DSM_LOG}/${LOGNAME}.$((${ii} + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -f ${DSM_LOG}/${LOGNAME} ]
|
||||
then
|
||||
mv ${DSM_LOG}/${LOGNAME} ${DSM_LOG}/${LOGNAME}.0
|
||||
fi
|
||||
|
||||
echo "DSM Daily Backup start: " `date` | logger
|
||||
|
||||
# I'd rather make this a ${PKGBASE}/tivoli/..., or even
|
||||
# ${PKGBASE}/tsm/...
|
||||
|
||||
TSMBINDIR="/emul/linux/opt/tivoli/tsm/client/ba/bin"
|
||||
DSMC=${TSMBINDIR}/dsmc
|
||||
|
||||
${DSMC} incremental > ${DSM_LOG}/${LOGNAME} 2>&1
|
||||
|
||||
echo "DSM Daily Backup finished: " `date` | logger
|
Loading…
Reference in a new issue