We received a preinstalled customer server the other day, for which we had declared “as-is” support only, since it is running Lucid Lynx. Now today, I started getting the TSM client to work. Was kinda weird, since at first dsmc was reporting something like this:

# ./dsmc: no such file or directory

After fiddling with it a bit more, here are the control files, as well as the prerm and postinst-scripts for TIVSM-API, TIVSM-API64 and TIVSM-BA:

tivsm-api/debian/control:

1
2
3
4
5
6
7
8
9
Source: tivsm-api
Section: non-free
Priority: extra
Maintainer: root <root@localhost>

Package: tivsm-api
Architecture: all
Depends: ${shlibs:Depends}
Description: IBM Tivoli Storage Manager API

tivsm-api/debian/tivsm-api.postinst:

1
2
3
4
5
6
7
8
9
for library in /opt/tivoli/tsm/client/api/bin/*.so; do
        ln -s $library /usr/lib/${library##*/}
done

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
        ldconfig
fi
# End automatically added section

tivsm-api/debian/tivsm-api.prerm:

1
2
3
for library in /opt/tivoli/tsm/client/api/bin/*.so; do
        rm -f /usr/lib/${library##*/}
done

tivsm-api64/debian/control:

1
2
3
4
5
6
7
8
9
Source: tivsm-api64
Section: non-free
Priority: extra
Maintainer: root <root@localhost>

Package: tivsm-api64
Architecture: amd64
Depends: ${shlibs:Depends}
Description: IBM Tivoli Storage Manager API

tivsm-api64/debian/postinst:

1
2
3
4
5
6
7
8
9
for library in /opt/tivoli/tsm/client/api/bin64/*.so; do
        ln -s $library /usr/lib64/${library##*/}
done

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
        ldconfig
fi
# End automatically added section

tivsm-api64/debian/prerm:

1
2
3
4
5
6
7
8
9
for library in /opt/tivoli/tsm/client/api/bin64/*.so; do
        rm -f /usr/lib64/${library##*/}
done

# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
        ldconfig
fi
# End automatically added section

tivsm-ba/debian/control:

1
2
3
4
5
6
7
8
9
Source: tivsm-ba
Section: non-free
Priority: extra
Maintainer: root <root@localhost>

Package: tivsm-ba
Architecture: any
Depends: ${shlibs:Depends}, lib32stdc++6 [amd64], libc6-i386 [amd64], lib32gcc1 [amd64]
Description: IBM Tivoli Storage Manager Client

tivsm-ba/debian/tivsm-ba.postinst:

1
2
3
4
5
ln -s /opt/tivoli/tsm/client/lang/EN_US /opt/tivoli/tsm/client/ba/bin/EN_US

for binary in dsmadmc dsmagent dsmc dsmcad dsmj dsmswitch dsmtca dsmtrace; do
        ln -s /opt/tivoli/tsm/client/ba/bin/$binary /usr/bin/$binary
done

tivsm-ba/debian/tivsm-ba.prerm:

1
2
3
4
5
rm -f /opt/tivoli/tsm/client/ba/bin/EN_US

for binary in dsmadmc dsmagent dsmc dsmcad dsmj dsmswitch dsmtca dsmtrace; do
        rm -f /usr/bin/$binary
done

All that was left to do, was simply adding a -n to the dh_makeshlibs call in each packages debian/rules file, otherwise dh_makeshlibs would overwrite my shiny postinst/prerm actions!