Skip to content

Instantly share code, notes, and snippets.

@gonter
Last active April 26, 2021 13:52
Show Gist options
  • Save gonter/9b6cf623a470405d9e46f696b6a8df4b to your computer and use it in GitHub Desktop.
Save gonter/9b6cf623a470405d9e46f696b6a8df4b to your computer and use it in GitHub Desktop.
TSM (Tivoli Storage Manager) on Ubuntu 16.04

TSM (Tivoli Storage Manager) on Ubuntu 16.04

original packages

IBM packages can be found here:

some patching required

Apparently, two symbols are now missing, these two patches helped me.

  • hook.001.patch
  • hook.002.patch

Obviously, these can be rolled into one patch (the #define should go inside the #if-block). Also, the kernel version number should be verified, however, it did the trick for me.

There are still warnings which might be important, but I did not check into that yet.

hook.001.patch

+#define f_dentry f_path.dentry /* formerly in <linux/fs.h> */

hook.002.patch

+# if ( LINUX_VERSION_CODE > KERNEL_VERSION(3,19,0) )
+#include <linux/fs_pin.h>
+#endif
+
 #include "jbb.h"

compilation

$ make
Makefile:8: *** RELNUM is required. Example: make RELNUM=7.1.1.0.  Stop.

This example is wrong. RELNUM has a different format (and version). This worked for me:

make RELNUM=7.1.4-0 deb

Notice the dash instead of the dot before the last digit. The installation failed with the wrong version number format and it took me awhile to spot the difference …

installation

Maybe I did something wrong, but it appears that the order of packages is important. The obvious dpkg invokation did not work:

dpkg -i *.deb

In the end, I installed each package individually in the order given in tivsm-helper.pl which can now be called as

./tivsm-helper.pl install
commit 65e8bff030ec52f95b088dfc2de920f678856ba3
Author: Gerhard Gonter <[email protected]>
Date: Wed Apr 27 18:02:36 2016 +0200
hacking in old definition for f_dentry from <linux/fs.h>
diff --git a/jbb_gpl/hook.c b/jbb_gpl/hook.c
index cabc49b..b754cbd 100755
--- a/jbb_gpl/hook.c
+++ b/jbb_gpl/hook.c
@@ -499,6 +499,7 @@ static void unhook_fs(unhook_mode_e cl) {
up_write(&hook_sem);
}
+#define f_dentry f_path.dentry /* formerly in <linux/fs.h> */
static struct file_operations *get_fops(struct file *filp, char *from) {
struct file_operations *fops=0;
commit b800ffe3dae7200ab86207a59bf50f6305e09c84
Author: Gerhard Gonter <[email protected]>
Date: Wed Apr 27 18:11:16 2016 +0200
add #include <linux/fs_pin.h> for more modern kernels; check if this kernel version is appropriate
diff --git a/jbb_gpl/hook.c b/jbb_gpl/hook.c
index b754cbd..b662d32 100755
--- a/jbb_gpl/hook.c
+++ b/jbb_gpl/hook.c
@@ -89,6 +89,10 @@ driver_xxxx - Module specific functions such as open, close and ioctl.
#include <asm/uaccess.h> /* VERIFY_WRITE */
#include <asm/io.h>
+# if ( LINUX_VERSION_CODE > KERNEL_VERSION(3,19,0) )
+#include <linux/fs_pin.h>
+#endif
+
#include "jbb.h"
MODULE_LICENSE("GPL");
#!/usr/bin/perl
=head1 NAME
tivsm-helper.pl
=head1 DESCRIPTION
=head2 display current packages, when they are installed
./tivsm-helper.pl
=head2 install the packages
./tivsm-helper.pl install
=head2 remove the packages
ATTN: use at own risk!
./tivsm-helper.pl remove
=cut
use strict;
my %packages= (
'gskcrypt64' => 'gskcrypt64_8.0-50.52.linux.x86_64.deb',
'gskssl64' => 'gskssl64_8.0-50.52.linux.x86_64.deb',
'tivsm-filepath' => 'tivsm-filepath-7.1.4-0.deb',
'tivsm-api64' => 'tivsm-api64.amd64.deb',
'tivsm-apicit' => 'tivsm-apicit.amd64.deb',
'tivsm-ba' => 'tivsm-ba.amd64.deb',
'tivsm-bacit' => 'tivsm-bacit.amd64.deb',
'tivsm-bahdw' => 'tivsm-bahdw.amd64.deb',
'tivsm-jbb' => 'tivsm-jbb.amd64.deb'
);
# the order of packages seems to be very important for the installation!
my @packages= qw(
gskcrypt64
gskssl64
tivsm-filepath
tivsm-api64
tivsm-apicit
tivsm-ba
tivsm-bacit
tivsm-bahdw
tivsm-jbb
);
# print "packages: [", join (' ', @packages), "]\n";
my %op_modes= map { $_ => 1 } qw(show remove install);
my $op_mode= 'show';
while (my $arg= shift (@ARGV))
{
if (exists($op_modes{$arg})) { $op_mode= $arg; }
}
if ($op_mode eq 'show')
{
system (qw(dpkg -l gsk* tivsm*));
}
elsif ($op_mode eq 'remove')
{
}
elsif ($op_mode eq 'install')
{
foreach my $pkg (@packages)
{
system ('dpkg', '--install', $packages{$pkg});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment