[ewg] [PATCH]

Vladimir Sokolovsky vlad at mellanox.co.il
Tue Aug 26 00:33:19 PDT 2008


Doron Shoham wrote:
> Hi Vlad,
> 
> I want to remove stgt from being compiled on ia64 and ppc64 architectures.
> I added the following lines to sub set_availability on install.pl:
> 
>     if ($arch =~ m/ppc|ia/) {
>             $packages_info{'tgt-generic'}{'available'} = 0;
>     }
> 
> but it didn't work - it got compiled anyway.
> 
> What is the correct way for doing so?
> 
> Thanks,
> Doron
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Hi Doron,

You have another reference to 'tgt-generic' package, probably lower then the code above:
# tgt
if ($kernel =~ m/2.6.16.[0-9.]*-[0-9.]*-[A-Za-z0-9.]*|el5/) {
	$packages_info{'tgt-generic'}{'available'} = 1;
}

Note: Currently 'tgt-generic' is available on all kernels and platforms. It is set to be
available in the %packages_info. So, the code above is useless.
Should it be installed on SLES10/RHEL5 only?

Another question: why do you need 'stgt' package in the install.pl? Currently,
it can't be selected because it is not in the list of @user_packages and if it was
added to the ofed.conf then it will add 'tgt-generic' to the list of selected packages
instead...

Please check the following patch that fixes issues above:

Disable 'tgt-generic' on ppc64 and ia64 platforms.

Signed-off-by: Vladimir Sokolovsky <vlad at mellanox.co.il>
---
  install.pl |   20 ++++++++++++++------
  1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/install.pl b/install.pl
index b31f30b..efd619c 100755
--- a/install.pl
+++ b/install.pl
@@ -323,7 +323,7 @@ my @user_packages = ("libibverbs", "libibverbs-devel", "libibverbs-devel-static"
                       "perftest", "mstflint",
                       "qlvnictools", "sdpnetstat", "srptools", "rds-tools",
                       "ibutils", "infiniband-diags", "qperf", "qperf-debuginfo",
-                     "ofed-docs", "ofed-scripts", "tgt-generic", @mpi_packages
+                     "ofed-docs", "ofed-scripts", "tgt-generic", "tgt", @mpi_packages
                       );

  my @basic_kernel_packages = ("kernel-ib");
@@ -1240,28 +1240,28 @@ my %packages_info = (
          'tgt-generic' =>
              { name => ($distro eq 'SuSE') ? 'tgt': 'scsi-target-utils', parent => "tgt-generic",
              selected => 0, installed => 0, rpm_exist => 0, rpm_exist32 => 0,
-            available => 1, mode => "user", dist_req_build => ["openssl-devel"],
+            available => 0, mode => "user", dist_req_build => [],
              dist_req_inst => [], ofa_req_build => ["libibverbs-devel", "librdmacm-devel"],
              ofa_req_inst => ["librdmacm", "libibverbs-devel"],
              install32 => 0, exception => 1, configure_options => '' },
          'stgt' =>
              { name => "stgt", parent => "tgt-generic",
              selected => 0, installed => 0, rpm_exist => 0, rpm_exist32 => 0,
-            available => 1, mode => "user", dist_req_build => ["openssl-devel"],
+            available => 0, mode => "user", dist_req_build => [],
              dist_req_inst => [], ofa_req_build => ["libibverbs-devel", "librdmacm-devel"],
              ofa_req_inst => ["librdmacm", "libibverbs-devel"],
              install32 => 0, exception => 1 },
          'tgt' =>
              { name => "tgt", parent => "tgt-generic",
              selected => 0, installed => 0, rpm_exist => 0, rpm_exist32 => 0,
-            available => 1, mode => "user", dist_req_build => ["openssl-devel"],
+            available => 0, mode => "user", dist_req_build => [],
              dist_req_inst => [], ofa_req_build => ["libibverbs-devel", "librdmacm-devel"],
              ofa_req_inst => ["librdmacm", "libibverbs-devel"],
              install32 => 0, exception => 1 },
          'scsi-target-utils' =>
              { name => "scsi-target-utils", parent => "tgt-generic",
              selected => 0, installed => 0, rpm_exist => 0, rpm_exist32 => 0,
-            available => 1, mode => "user", dist_req_build => ["openssl-devel"],
+            available => 0, mode => "user", dist_req_build => [],
              dist_req_inst => [], ofa_req_build => ["libibverbs-devel", "librdmacm-devel"],
              ofa_req_inst => ["librdmacm", "libibverbs-devel"],
              install32 => 0, exception => 1 },
@@ -1625,8 +1625,16 @@ sub set_availability
      }

      # tgt
-    if ($kernel =~ m/2.6.16.[0-9.]*-[0-9.]*-[A-Za-z0-9.]*|el5/) {
+    if ($arch =~ m/ppc64|powerpc|ia64/) {
+            $packages_info{'tgt-generic'}{'available'} = 0;
+            $packages_info{'tgt'}{'available'} = 0;
+            $packages_info{'stgt'}{'available'} = 0;
+            $packages_info{'scsi-target-utils'}{'available'} = 0;
+    } elsif ($kernel =~ m/2.6.16.[0-9.]*-[0-9.]*-[A-Za-z0-9.]*|el5/) {
              $packages_info{'tgt-generic'}{'available'} = 1;
+            $packages_info{'tgt'}{'available'} = 1;
+            $packages_info{'stgt'}{'available'} = 1;
+            $packages_info{'scsi-target-utils'}{'available'} = 1;
      }

      # QLogic vnic
-- 
1.5.4.3




More information about the ewg mailing list