Commit 93c73148 authored by José María Fernández's avatar José María Fernández
Browse files

Added newer version of Tivoli storage manager

parent 89d707e5
AUX dsmc.conf.d 196 SHA256 ae57f5f1f61131c4368cb61733fe4e92d52dfc4edcb5a2f02efcc8b59525db48 SHA512 5697da5a820f328e80c78063be2216572b544e4195efbb0866d15f781be8d155aac257b3bb843e67d466b2c1b37efdc3922397cf49fdf5cc18f0c5c08808f634 WHIRLPOOL 8b64f60c9e3421904fba90847879bd7710f7574a2c17b2d082acf393f658cad364281c427bad8bef37d4830f29ee5e4d1fba43bbb3d429410a847df5d2f209c4
AUX dsmc.init.d 718 SHA256 5569331e74ee6bcde091ead0fbfcce849d6687f649ec7bfd58fecd8ce08a5c43 SHA512 01cf7775b0a7e3ad84cc2c35bd73ae3ce6a4fb1c1968da6cfe9d97a8804833970af32873f895181d7d2220b0787e96b67c4b5f8ff4b6d450ee3a5d92735a6f2c WHIRLPOOL 872f6365a79db16234ae32c2701d65f12d475cf02ccdd44863d96baef022a7e33c9c86d5a4fa808e3e6a9dcec0aca416be91dba341be45e17e20e10d6fd9c979
AUX dsmc.service 184 SHA256 03682dfbe17ed6069e66cb999d1718c06e71bec20f5d0ce29cbb56e9414ec1c7 SHA512 b047251e3fb7d006315b0f069adac62bc3c7f6ccc835ab59a2975a3f206151de8b0cb6a8f414d0f41922a961378376d79d61e38cd7be2aa5743822f365f87bf6 WHIRLPOOL 78d16392b4e95d0f2e0b37687da928d2e1f558b90be1c1f8731714899cddf6d1a63d9858158b52031d805e48f811060cfd0a75afa494554687344e7de88a59b6
AUX dsmcad.init.d-r1 531 SHA256 b9dbb60c3ae4e9d81e9ad5b8da11cfd4650a1798960a58f08e4d69a7405ab9bb SHA512 b69166e9e004d81a7f43551e5f1189c3a545afc67e5029009e9693fbed20a247f922975fec695542f0a3afd7c0c5a4ee6c026678de4812b00488afc45699699a WHIRLPOOL a9e8a67a39f2526804adaaa69002a243ccad8a1a56b03f15708fc514352f4902afbb8aa197b0a043a62ad898e6c93f282e9bf26bdd8e447f55911c3341aa72a5
AUX dsmcad.service 224 SHA256 120f075c5c6006809d6b4bfdf2f75308eae95cf818df18e90f663215fe291900 SHA512 e3572098abf5b2831d10a3b649337b5c9f1cd9fda4ed58844408b6fe31fdc68a3bbc197eab227f9808bc9ab4b4a7488c766aaa472e801d88631b6b8ec398eb45 WHIRLPOOL 38b5d74e301f3839362d1c1052562af508b76831c4128ea7d634b6f17aa6cb84681f728ac2a32593cbc669b880a803be072e04cf70dd9a744d0ce939c53a042a
AUX tsm.logrotate 60 SHA256 b92ba6a1fa11b82fd32e48efbc8ed362fd46a0d3ae021c699d24200df67ebbc1 SHA512 2f412c61a21dbb2c69b2c12130ae12844787d998098de269da2b8a284c2ed86f7244c2854d7050f2a521b3fbe7239f1ec4339f3b434c67b9cd57980fe5de5a92 WHIRLPOOL 2280c3631725e7d9ab51ad72f3d03b131c5c1036f2e213146f4e206feb32502520f31668e5c26956072e506f8fd476a0fb8b2e7f7dd3ee4936437b2e008aec0e
DIST 7.1.6.4-TIV-TSMBAC-LinuxX86.tar 229109760 SHA256 fe28415cb67144b99ce3c25c4fbd47eccbfd40ca6f844a5edfe8bc612655a3d9 SHA512 274215b9540bf75cb8a167a9fac0e4e5d20b9efe45ab1ec1ecb21ee3d93947589cc6cd12e418137f7c6744d5316430d1271f428fc4eb74226c1923d4cd58f156 WHIRLPOOL 061664fbe387650832b530ef18443a8ea406256662977b1b635f3243ba97143c6d7e01a968f84c51c406f4a533bac11563d1b07e8614d2361ff8449629831626
EBUILD tsm-7.1.6.4.ebuild 7043 SHA256 9a5f423ab13fdb1c5a0786982929e309349f4d5f8bee0282d45a9d7f5535841e SHA512 edf8c2acb53d6dd0a8d8d5e8c8f4c9e818f4692a62ba3bb677b1e7050f54ab2311037fbc17eb1fa40eff8b5db027d2a7b1c874472666aecb682e5571c514f287 WHIRLPOOL 4557857bb16df0ab9d2ca1ce5d16b450cc6b5f590427fa80994d98fb0a4d11b7a743abbefc58a4007096ef102e5a0a8d761a31ae9590cad1b3be768620217ee3
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Config file for /etc/init.d/tivoli
# See your TSM manual for valid ops
#DSMC_OPTS=""
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
use net
after dns
}
start() {
ebegin "Starting dsmc"
start-stop-daemon --start --background --nicelevel 15 \
--make-pidfile --pidfile /var/run/dsmc.pid \
--exec /opt/tivoli/tsm/client/ba/bin/dsmc sched ${DSMC_OPTS}
eend $?
}
stop() {
ebegin "Stopping dsmc"
# For whatever reason SIGTERM doesn't affect the dsmc process, but
# SIGHUP makes it exit cleanly
start-stop-daemon --stop \
--signal 1 \
--pidfile /var/run/dsmc.pid
eend $?
}
[Unit]
Description=Tivoli Storage Manager (TSM) - dsmc
After=network.target
[Service]
Nice=15
ExecStart=/opt/tivoli/tsm/client/ba/bin/dsmc sched
[Install]
WantedBy=multi-user.target
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
command=/opt/tivoli/tsm/client/ba/bin/dsmcad
depend() {
use net
after dns dsmc
}
start() {
ebegin "Starting dsmcad"
start-stop-daemon --start --nicelevel 15 \
--exec ${command}
eend $?
}
stop() {
ebegin "Stopping dsmcad"
start-stop-daemon --stop \
--signal 1 \
--exec ${command}
eend $?
}
[Unit]
Description=Tivoli Storage Manager (TSM) - dsmcad
After=network.target dsmc.service
[Service]
Type=forking
Nice=15
ExecStart=/opt/tivoli/tsm/client/ba/bin/dsmcad
GuessMainPID=no
[Install]
WantedBy=multi-user.target
/var/log/tsm/*.log {
create 0660 root tsm
delaycompress
}
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit versionator multilib eutils readme.gentoo-r1 rpm systemd user pax-utils
DESCRIPTION="Tivoli Storage Manager (TSM) Backup/Archive (B/A) Client and API"
HOMEPAGE="http://www.tivoli.com/"
MY_PV_MAJOR=$(get_major_version)
MY_PV_MINOR=$(get_version_component_range 2)
MY_PV_TINY=$(get_version_component_range 3)
MY_PV_PATCH=$(get_version_component_range 4)
MY_PV_NODOTS="${MY_PV_MAJOR}${MY_PV_MINOR}${MY_PV_TINY}"
MY_PVR_ALLDOTS=${PV}
if [[ ${MY_PV_PATCH} == 0 ]]; then
MY_RELEASE_PATH=maintenance
else
MY_RELEASE_PATH=patches
fi
BASE_URI="ftp://ftp.software.ibm.com/storage/tivoli-storage-management/"
BASE_URI+="${MY_RELEASE_PATH}/client/v${MY_PV_MAJOR}r${MY_PV_MINOR}/"
BASE_URI+="Linux/LinuxX86/BA/v${MY_PV_NODOTS}/"
SRC_TAR="${MY_PVR_ALLDOTS}-TIV-TSMBAC-LinuxX86.tar"
SRC_URI="${BASE_URI}${SRC_TAR}"
RESTRICT="strip" # Breaks libPiIMG.so and libPiSNAP.so
LICENSE="Apache-1.1 Apache-2.0 JDOM BSD-2 CC-PD Boost-1.0 MIT CPL-1.0 HPND Exolab
dom4j EPL-1.0 FTL icu unicode IBM Info-ZIP LGPL-2 LGPL-2.1 openafs-krb5-a
ZLIB MPL-1.0 MPL-1.1 NPL-1.1 openssl OPENLDAP RSA public-domain W3C
|| ( BSD GPL-2+ ) gSOAP libpng tsm"
SLOT="0"
KEYWORDS="~amd64 -*"
IUSE="acl java +tsm_cit +tsm_hw"
QA_PREBUILT="*"
# not available (yet?)
#MY_LANGS="cs:CS_CZ de:DE_DE es:ES_ES fr:FR_FR hu:HU_HU it:IT_IT ja:JA_JP
# ko:KO_KR pl:PL_PL pt-BR:PT_BR ru:RU_RU zh-CN:ZH_CN zh-TW:ZH_TW"
MY_LANG_PV="${MY_PVR_ALLDOTS}-"
for lang in ${MY_LANGS}; do
IUSE="${IUSE} l10n_${lang%:*}"
SRC_URI="${SRC_URI} l10n_${lang%:*}? ( \
${BASE_URI}TIVsm-msg.${lang#*:}.x86_64.rpm -> \
${MY_LANG_PV}TIVsm-msg.${lang#*:}.x86_64.rpm )"
done
unset lang
DEPEND=""
RDEPEND="
dev-libs/expat
dev-libs/libxml2
=sys-fs/fuse-2*
acl? ( sys-apps/acl )
java? ( virtual/jre:1.7 )
"
S="${WORKDIR}"
pkg_setup() {
enewgroup tsm
DOC_CONTENTS="
Note that you have to be either root or member of the group tsm to
be able to use the Tivoli Storage Manager client."
}
src_unpack() {
local rpm rpms lang
unpack ${SRC_TAR}
cd "${S}"
for rpm in *.rpm; do
case ${rpm} in
TIVsm-APIcit.*|TIVsm-BAcit.*)
use tsm_cit && rpms="${rpms} ./${rpm}"
;;
TIVsm-BAhdw.*)
use tsm_hw && rpms="${rpms} ./${rpm}"
;;
TIVsm-JBB.*|*-filepath-*)
# "journal based backup" for all filesystems
# requires a kernel module.
# "Linux Filepath source code" available
# by request from vendor
;;
*)
rpms="${rpms} ./${rpm}"
;;
esac
done
for rpm in ${A}; do
case ${rpm} in
*.rpm)
rpms="${rpms} ${rpm}"
;;
esac
done
rpm_unpack ${rpms}
# Avoid strange error messages caused by read-only files
chmod -R u+w "${S}" || die
}
src_install(){
cp -a opt "${D}" || die
cp -a usr "${D}" || die
# The RPM files contain postinstall scripts which can be extracted
# e.g. using https://bugs.gentoo.org/attachment.cgi?id=234663 .
# Below we try to mimic the behaviour of these scripts.
# We don't deal with SELinux compliance (yet), though.
local RPM_INSTALL_PREFIX CLIENTDIR i
RPM_INSTALL_PREFIX=/opt
CLIENTDIR=$RPM_INSTALL_PREFIX/tivoli/tsm/client
# Create links for messages; this is spread over several postin scripts.
#for i in $(cd "${D}"${CLIENTDIR}/lang; ls -1d ??_??); do
# dosym ../../lang/${i} $CLIENTDIR/ba/bin/${i}
# dosym ../../lang/${i} $CLIENTDIR/api/bin64/${i}
#done
# Mimic TIVsm-API64 postinstall script
for i in libgpfs.so libdmapi.so; do
dosym ../..$CLIENTDIR/api/bin64/${i} /usr/lib64/${i}
done
# The TIVsm-BA postinstall script only does messages and ancient upgrades
# The gscrypt64 postinstall script only deals with s390[x] SELinux
# and the symlink for the iccs library which we handle in the loop below.
# Move stuff from /usr/local to /opt, #452332
mv "${D}"/usr/local/ibm "${D}"/opt/ || die
rmdir "${D}"/usr/local || die
# Mimic gskssl64 postinstall script
for i in sys p11 km ssl drld kicc ldap cms acmeidup valn dbfl iccs; do
dosym ../../opt/ibm/gsk8_64/lib64/libgsk8${i}_64.so \
/usr/lib64/libgsk8${i}_64.so
done
for i in capicmd ver; do
dosym ../../opt/ibm/gsk8_64/bin/gsk8${i}_64 /usr/bin/gsk${i}_64
done
# Done with the postinstall scripts as the RPMs contain them.
# Now on to some more Gentoo-specific installation.
[[ -d "${D}usr/lib" ]] && die "Using 32bit lib dir in 64bit only system"
# Avoid "QA Notice: Found an absolute symlink in a library directory"
local target
find "${D}"usr/lib* -lname '/*' | while read i; do
target=$(readlink "${i}")
rm -v "${i}" || die
dosym "../..${target}" "${i#${D}}"
done
fowners :tsm /opt/tivoli/tsm/client/ba/bin/dsmtca
fperms 4710 /opt/tivoli/tsm/client/ba/bin/dsmtca
keepdir /var/log/tsm
insinto /etc/logrotate.d
newins "${FILESDIR}/tsm.logrotate" tsm
keepdir /etc/tivoli
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.sys.smp" "${D}/etc/tivoli/dsm.sys" || die
echo ' PasswordDir "/etc/tivoli/"' >> ${D}/etc/tivoli/dsm.sys
echo ' PasswordAccess generate' >> ${D}/etc/tivoli/dsm.sys
# Added the hostname to be more friendly, the admin will need to edit this file anyway
echo ' NodeName' `hostname` >> ${D}/etc/tivoli/dsm.sys
echo ' ErrorLogName "/var/log/tsm/dsmerror.log"' >> ${D}/etc/tivoli/dsm.sys
echo ' SchedLogName "/var/log/tsm/dsmsched.log"' >> ${D}/etc/tivoli/dsm.sys
dosym ../../../../../../etc/tivoli/dsm.sys /opt/tivoli/tsm/client/ba/bin/dsm.sys
cp -a "${S}/opt/tivoli/tsm/client/ba/bin/dsm.opt.smp" "${D}/etc/tivoli/dsm.opt"
dosym ../../../../../../etc/tivoli/dsm.opt /opt/tivoli/tsm/client/ba/bin/dsm.opt
# Setup the env
dodir /etc/env.d
ENV_FILE="${D}/etc/env.d/80tivoli"
echo 'DSM_CONFIG="/etc/tivoli/dsm.opt"' >> ${ENV_FILE}
echo 'DSM_DIR="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
echo 'DSM_LOG="/var/log/tsm"' >> ${ENV_FILE}
echo 'ROOTPATH="/opt/tivoli/tsm/client/ba/bin"' >> ${ENV_FILE}
echo 'SEARCH_DIRS_MASK="/opt/tivoli/tsm/client/ba/bin"' > "${T}/80${PN}" || die
insinto "/etc/revdep-rebuild"
doins "${T}/80${PN}"
newconfd "${FILESDIR}/dsmc.conf.d" dsmc
newinitd "${FILESDIR}/dsmc.init.d" dsmc
newinitd "${FILESDIR}/dsmcad.init.d-r1" dsmcad
# Need this for hardened, otherwise a cryptic "connection to server lost" message appears
pax-mark -m "${D}/opt/tivoli/tsm/client/ba/bin/dsmc"
systemd_dounit "${FILESDIR}/dsmc.service"
systemd_dounit "${FILESDIR}/dsmcad.service"
readme.gentoo_create_doc
}
pkg_postinst() {
local i dirs
for i in /var/log/tsm/dsm{error,sched,j,webcl}.log; do
if [[ ! -e $i ]]; then
touch $i || die
chown :tsm $i || die
chmod 0660 $i || die
fi
done
# Bug #375041: the log directory itself should not be world writable.
# Have to do this in postinst due to bug #141619
chown root:tsm /var/log/tsm || die
chmod 0750 /var/log/tsm || die
# Bug 508052: directories used to be too restrictive, have to widen perms.
dirs=( /opt/tivoli $(find /opt/tivoli/tsm -type d) )
chown root:root "${dirs[@]}" || die
chmod 0755 "${dirs[@]}" || die
readme.gentoo_print_elog
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment