Hello community,

here is the log from the commit of package open-iscsi for openSUSE:Factory 
checked in at 2014-07-13 14:05:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/open-iscsi (Old)
 and      /work/SRC/openSUSE:Factory/.open-iscsi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "open-iscsi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/open-iscsi/open-iscsi.changes    2014-06-16 
21:43:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.open-iscsi.new/open-iscsi.changes       
2014-07-13 14:05:47.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Jul  8 16:27:39 CEST 2014 - h...@suse.de
+
+- Remove unused variable 'path'
+- Parse 'origin' value from iBFT
+- iscsi_offload: fix detection of bnx2i (bnc#886198)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ open-iscsi-Factory-latest.diff.bz2 ++++++
--- /var/tmp/diff_new_pack.VWthj6/_old  2014-07-13 14:05:48.000000000 +0200
+++ /var/tmp/diff_new_pack.VWthj6/_new  2014-07-13 14:05:48.000000000 +0200
@@ -898,7 +898,7 @@
 +[Install]
 +WantedBy=sockets.target
 diff --git a/include/fw_context.h b/include/fw_context.h
-index 1640859b475f..6563d6883b09 100644
+index 1640859b475f..295b54d3d0c9 100644
 --- a/include/fw_context.h
 +++ b/include/fw_context.h
 @@ -30,6 +30,9 @@
@@ -911,6 +911,14 @@
  
        /* target settings */
        int target_port;
+@@ -45,6 +48,7 @@ struct boot_context {
+       char initiatorname[TARGET_NAME_MAXLEN + 1];
+ 
+       /* network settings */
++      char origin[2];
+       char dhcp[NI_MAXHOST];
+       char iface[IF_NAMESIZE];
+       char mac[18];
 diff --git a/include/iscsi_err.h b/include/iscsi_err.h
 index aabea4ea8011..125f443a2f25 100644
 --- a/include/iscsi_err.h
@@ -18764,11 +18772,18 @@
 +# space separated list of allowed UDP broadcast ports
 +BROADCAST="isns"
 diff --git a/rpm/open-iscsi.changes b/rpm/open-iscsi.changes
-index 2e21afc6bc7b..900c2fc1f44e 100644
+index 2e21afc6bc7b..32b0cce7a799 100644
 --- a/rpm/open-iscsi.changes
 +++ b/rpm/open-iscsi.changes
-@@ -1,4 +1,307 @@
+@@ -1,4 +1,314 @@
  -------------------------------------------------------------------
++Tue Jul  8 16:27:39 CEST 2014 - h...@suse.de
++
++- Remove unused variable 'path'
++- Parse 'origin' value from iBFT
++- iscsi_offload: fix detection of bnx2i (bnc#886198)
++
++-------------------------------------------------------------------
 +Fri Jun  6 16:49:19 CEST 2014 - h...@suse.de
 +
 +- Valgrind fixes for iscsiuio (bnc#881692)
@@ -19075,7 +19090,7 @@
  Fri Dec  9 15:09:01 CET 2011 - h...@suse.de
  
  - iscsiadm: Return correct error when login fails (bnc#715071)
-@@ -40,6 +343,11 @@ Fri Nov  4 09:15:52 CET 2011 - h...@suse.de
+@@ -40,6 +350,11 @@ Fri Nov  4 09:15:52 CET 2011 - h...@suse.de
  - Stop iscsiuio when run inside initrd (bnc#728095)
  
  -------------------------------------------------------------------
@@ -19087,7 +19102,7 @@
  Mon Oct 24 09:13:19 CEST 2011 - h...@suse.de
  
  - Update iscsiuio to 0.7.0.14f (bnc#687392)
-@@ -101,6 +409,11 @@ Tue Jun 21 15:09:46 CEST 2011 - h...@suse.de
+@@ -101,6 +416,11 @@ Tue Jun 21 15:09:46 CEST 2011 - h...@suse.de
  - Include scripts for automated build
  
  -------------------------------------------------------------------
@@ -19099,7 +19114,7 @@
  Wed Feb  2 11:32:12 CET 2011 - mweckbec...@suse.de
  
  - Fix the following issues:
-@@ -224,6 +537,11 @@ Wed Nov 18 10:33:27 CET 2009 - h...@suse.de
+@@ -224,6 +544,11 @@ Wed Nov 18 10:33:27 CET 2009 - h...@suse.de
  - Read initiatorname correctly from sysfs (bnc#541882)
  
  -------------------------------------------------------------------
@@ -19111,7 +19126,7 @@
  Wed Aug 19 12:58:13 CEST 2009 - h...@suse.de
  
  - Synchronize startup settings (bnc#514273)
-@@ -231,11 +549,24 @@ Wed Aug 19 12:58:13 CEST 2009 - h...@suse.de
+@@ -231,11 +556,24 @@ Wed Aug 19 12:58:13 CEST 2009 - h...@suse.de
  - Do not use temp file in iscsi_discovery (bnc#528711)
  
  -------------------------------------------------------------------
@@ -26727,6 +26742,26 @@
                return 1;
        return 0;
  }
+diff --git a/usr/sysfs.c b/usr/sysfs.c
+index 7f31c1ada0a4..d00c9255661d 100644
+--- a/usr/sysfs.c
++++ b/usr/sysfs.c
+@@ -671,7 +671,6 @@ int sysfs_set_param(char *id, char *subsys, char 
*attr_name,
+       char devpath[PATH_SIZE];
+       size_t sysfs_len;
+       char path_full[PATH_SIZE];
+-      const char *path;
+       int rc = 0, fd;
+ 
+       if (!sysfs_lookup_devpath_by_subsys_id(devpath, sizeof(devpath),
+@@ -684,7 +683,6 @@ int sysfs_set_param(char *id, char *subsys, char 
*attr_name,
+       sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
+       if(sysfs_len >= sizeof(path_full))
+               sysfs_len = sizeof(path_full) - 1;
+-      path = &path_full[sysfs_len];
+       strlcat(path_full, devpath, sizeof(path_full));
+       strlcat(path_full, "/", sizeof(path_full));
+       strlcat(path_full, attr_name, sizeof(path_full));
 diff --git a/usr/transport.c b/usr/transport.c
 index e6e3dfc23dd1..2f385198a065 100644
 --- a/usr/transport.c
@@ -26875,8 +26910,41 @@
  #define ISCSI_VERSION_FILE    "/sys/module/scsi_transport_iscsi/version"
  
  #endif
+diff --git a/utils/fwparam_ibft/fw_entry.c b/utils/fwparam_ibft/fw_entry.c
+index b6f05c14e5aa..295e905620eb 100644
+--- a/utils/fwparam_ibft/fw_entry.c
++++ b/utils/fwparam_ibft/fw_entry.c
+@@ -192,10 +192,12 @@ static void dump_network(struct boot_context *context)
+       if (strlen(context->mac))
+               printf("%s = %s\n", IFACE_HWADDR, context->mac);
+       /*
+-       * If this has a valid address then DHCP was used (broadcom sends
+-       * 0.0.0.0).
++       * If the 'origin' field is '3' then DHCP is used.
++       * Otherwise evaluate the 'dhcp' field, if this has a valid
++       * address then DHCP was used (broadcom sends 0.0.0.0).
+        */
+-      if (strlen(context->dhcp) && strcmp(context->dhcp, "0.0.0.0"))
++      if ((strlen(context->origin) && !strcmp(context->origin, "3")) ||
++          (strlen(context->dhcp) && strcmp(context->dhcp, "0.0.0.0")))
+               printf("%s = DHCP\n", IFACE_BOOT_PROTO);
+       else
+               printf("%s = STATIC\n", IFACE_BOOT_PROTO);
+diff --git a/utils/fwparam_ibft/fwparam_ibft_sysfs.c 
b/utils/fwparam_ibft/fwparam_ibft_sysfs.c
+index 9185c85d0230..2dc6f6d5fe54 100644
+--- a/utils/fwparam_ibft/fwparam_ibft_sysfs.c
++++ b/utils/fwparam_ibft/fwparam_ibft_sysfs.c
+@@ -201,6 +201,8 @@ static int fill_nic_context(char *id, struct boot_context 
*context)
+                     sizeof(context->secondary_dns));
+       sysfs_get_str(id, IBFT_SUBSYS, "dhcp", context->dhcp,
+                     sizeof(context->dhcp));
++      sysfs_get_str(id, IBFT_SUBSYS, "origin", context->origin,
++                    sizeof(context->origin));
+       return 0;
+ }
+ 
 diff --git a/utils/fwparam_ibft/fwparam_sysfs.c 
b/utils/fwparam_ibft/fwparam_sysfs.c
-index 3997363eb044..2f37b5936e7d 100644
+index 3997363eb044..09dd9fd5cbbc 100644
 --- a/utils/fwparam_ibft/fwparam_sysfs.c
 +++ b/utils/fwparam_ibft/fwparam_sysfs.c
 @@ -200,6 +200,9 @@ static int fill_nic_context(char *subsys, char *id,
@@ -26889,7 +26957,16 @@
        sysfs_get_str(id, subsys, "ip-addr", context->ipaddr,
                      sizeof(context->ipaddr));
        sysfs_get_str(id, subsys, "vlan", context->vlan,
-@@ -224,6 +227,8 @@ static void fill_initiator_context(char *subsys, struct 
boot_context *context)
+@@ -214,6 +217,8 @@ static int fill_nic_context(char *subsys, char *id,
+                     sizeof(context->secondary_dns));
+       sysfs_get_str(id, subsys, "dhcp", context->dhcp,
+                     sizeof(context->dhcp));
++      sysfs_get_str(id, subsys, "origin", context->origin,
++                    sizeof(context->origin));
+       return 0;
+ }
+ 
+@@ -224,6 +229,8 @@ static void fill_initiator_context(char *subsys, struct 
boot_context *context)
                      sizeof(context->initiatorname));
        sysfs_get_str("initiator", subsys, "isid", context->isid,
                      sizeof(context->isid));
@@ -26898,7 +26975,7 @@
  }
  static int fill_tgt_context(char *subsys, char *id,
                            struct boot_context *context)
-@@ -240,6 +245,9 @@ static int fill_tgt_context(char *subsys, char *id,
+@@ -240,6 +247,9 @@ static int fill_tgt_context(char *subsys, char *id,
        if (rc)
                return rc;
  
@@ -26960,10 +27037,50 @@
  # Author: Dan Bar Dov <d...@voltaire.com>
  
 diff --git a/utils/iscsi_offload b/utils/iscsi_offload
-index 950825d4a5cc..38eec08394dc 100644
+index 950825d4a5cc..7cd1dadcc688 100644
 --- a/utils/iscsi_offload
 +++ b/utils/iscsi_offload
-@@ -217,8 +217,11 @@ if iscsiadm -m iface -I $ioe_iface > /dev/null 2>&1 ; then
+@@ -101,6 +101,23 @@ iscsi_macaddress_from_pcifn()
+     done
+ }
+ 
++update_iface_setting() {
++    local iface="$1"
++    local name="$2"
++    local value="$3"
++
++    iface_value=$(iscsiadm -m iface -I $iface | sed -n "s/$name = 
\(.*\)/\1/p")
++    if [ "$iface_value" = "<empty>" ] ; then
++      iface_value=
++    fi
++    if [ "$iface_value" != "$value" ] ; then
++      if ! iscsiadm -m iface -I $iface -o update -n "$name" -v "$value" ; then
++          return 1
++      fi
++    fi
++    return 0
++}
++
+ while getopts di:t options ; do
+     case $options in
+       d ) mode=dhcp;;
+@@ -116,6 +133,7 @@ done
+ shift $(($OPTIND - 1))
+ 
+ IFNAME=$1
++ibft_mode="none"
+ 
+ if [ -z "$IFNAME" ] ; then
+     echo "No interface specified"
+@@ -210,6 +228,7 @@ fi
+ gen_iface="$mod.$mac"
+ ioe_iface="${IFNAME}-${mod}"
+ 
++# Get existing settings
+ if iscsiadm -m iface -I $ioe_iface > /dev/null 2>&1 ; then
+     ioe_mac=$(iscsiadm -m iface -I $ioe_iface 2> /dev/null| sed -n 
"s/iface\.hwaddress = \(.*\)/\1/p")
+     ioe_mod=$(iscsiadm -m iface -I $ioe_iface 2> /dev/null| sed -n 
"s/iface\.transport_name = \(.*\)/\1/p")
+@@ -217,8 +236,12 @@ if iscsiadm -m iface -I $ioe_iface > /dev/null 2>&1 ; then
      if [ "$ipaddr" == "<empty>" ] ; then
        ipaddr=
      fi
@@ -26972,11 +27089,33 @@
 +    ioe_mod=$mod
  else
 -    iscsiadm -m iface -I $ioe_iface --op=new
++    # Create new interface
 +    iscsiadm -m iface -I $ioe_iface --op=new 2> /dev/null
      ioe_mac=
      ioe_mod=
      ipaddr=
-@@ -245,29 +248,39 @@ elif [ "$ioe_mod" != "$mod" ] ; then
+@@ -229,60 +252,77 @@ if [ -z "$dry_run" ] ; then
+       if [ -n "$ioe_mac" ] ; then
+           echo "Warning: Updating MAC address on iface $ioe_iface"
+       fi
+-      iscsiadm -m iface -I $ioe_iface -o update -n iface.hwaddress -v $mac
++      update_iface_setting $ioe_iface iface.hwaddress "$mac"
+     fi
+ 
+     if [ "$ioe_mod" != "$mod" ] ; then
+       if [ -n "$ioe_mod" ] ; then
+           echo "Warning: Update transport on iface $ioe_iface"
+       fi
+-      iscsiadm -m iface -I $ioe_iface -o update -n iface.transport_name -v 
$mod
++      update_iface_setting $ioe_iface iface.transport_name "$mod"
+     fi
+ elif [ -z "$ipaddr" ] ; then
+     ipaddr=$(iscsiadm -m iface -I $gen_iface 2> /dev/null| sed -n 
"s/iface\.ipaddress = \(.*\)/\1/p")
++    if [ "$ipaddr" = "<empty>" ] ; then
++      ipaddr=
++    fi
+ elif [ "$ioe_mod" != "$mod" ] ; then
+     echo "Warning: Transport mismatch on iface $ioe_iface: $ioe_mod should be 
$mod"
  fi
  
  # Check iBFT setting
@@ -27000,8 +27139,6 @@
        elif [ "$ibft_origin" -eq 3 ] ; then
 -          ibft_mode=dhcp
 +          ibft_mode="dhcp"
-+      else
-+          ibft_mode="unknown"
        fi
 -      read ibft_dhcp < $if/dhcp
 -      if [ "$ibft_dhcp" -a "$ibft_mode" != "dhcp" ] ; then
@@ -27015,6 +27152,8 @@
 -          read ibft_ipaddr < $if/ip-addr
 -          read ibft_gateway < $if/gateway
 -          read ibft_mask < $if/subnet-mask
++          ibft_gateway=
++          ibft_mask=
 +          break
        fi
 +      [ -f $if/ip-addr ] && read ibft_ipaddr < $if/ip-addr
@@ -27027,7 +27166,29 @@
  if [ -z "$optaddr" ] && [ "$ibft_ipaddr" ] ; then
      optaddr=$ibft_ipaddr
  fi
-@@ -297,7 +310,6 @@ elif [ "$mode" = "static" ] && [ "$ipaddr" = "$optaddr" ] 
; then
+ 
+ # Check if the interface needs to be configured
+ if [ -z "$mode" ] ; then
+-    if [ "$optaddr" = "$ibft_ipaddr" ] ; then
++    if [ "$ibft_mode" != "none" ] ; then
+       echo "$mac ibft"
+-    elif [ "$ipaddr" = "<empty>" ] ; then
++      mode="ibft"
++    elif [ -z "$ipaddr" ] ; then
+       echo "$mac none"
++      mode="none"
+     elif [ "$ipaddr" = "0.0.0.0" ] ; then
+       echo "$mac dhcp"
+       ipaddr=
+-    else 
++      mode="dhcp"
++    else
+       echo "$mac ip $ipaddr"
++      mode="static"
+     fi
+     [ "$dry_run" ] && exit 0
+ elif [ "$mode" = "dhcp" ] ; then
+@@ -297,28 +337,36 @@ elif [ "$mode" = "static" ] && [ "$ipaddr" = "$optaddr" 
] ; then
  fi
  
  if [ "$mod" = "be2iscsi" ] ; then
@@ -27035,6 +27196,51 @@
      exit 4
  fi
  
+-if ! iscsiadm -m iface -I $ioe_iface -o update -n iface.ipaddress -v $optaddr 
; then
++if ! update_iface_setting $ioe_iface iface.ipaddress "$optaddr" ; then
+     echo "Failed to set IP address: $?"
+     exit 1
+ fi
+-if [ "$ibft_mode" = "dhcp" ] ; then
+-    iscsiadm -m iface -I $ioe_iface --op=update \
+-      --name iface.gateway --value=""
+-    iscsiadm -m iface -I $ioe_iface --op=update \
+-      --name=iface.subnet_mask --value=""
+-elif [ "$ibft_mode" = "static" ] ; then
+-    if [ "$ibft_gateway" ] ; then
+-      iscsiadm -m iface -I $ioe_iface --op=update \
+-          --name=iface.gateway --value="$ibft_gateway"
+-    fi
+-    if [ "$ibft_mask" ] ; then
+-      iscsiadm -m iface -I $ioe_iface --op=update \
+-          --name=iface.subnet_mask --value=$ibft_mask
+-    fi
++if ! update_iface_setting $gen_iface iface.ipaddress "$optaddr" ; then
++    echo "Failed to set IP address for generic interface: $?"
++    exit 1
++fi
++
++if ! update_iface_setting $ioe_iface iface.gateway "$ibft_gateway" ; then
++    echo "Failed to set gateway address: $?"
++    exit 1
++fi
++
++if ! update_iface_setting $gen_iface iface.gateway "$ibft_gateway" ; then
++    echo "Failed to set gateway address for generic interface: $?"
++    exit 1
++fi
++
++if ! update_iface_setting $ioe_iface iface.subnet_mask "$ibft_mask" ; then
++    echo "Failed to set subnet mask: $?"
++    exit 1
++fi
++
++if ! update_iface_setting $gen_iface iface.subnet_mask "$ibft_mask" ; then
++    echo "Failed to set subnet mask for generic interface: $?"
++    exit 1
+ fi
+ 
+ if [ "$mod" = "qla4xxx" ] ; then
 diff --git a/utils/open-isns/Makefile.in b/utils/open-isns/Makefile.in
 index a27199cad294..54cb75b04ba1 100644
 --- a/utils/open-isns/Makefile.in

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to