diff --git a/0001-fcoemon-Rework-daemonizing-and-error-handling.patch b/0001-fcoemon-Rework-daemonizing-and-error-handling.patch deleted file mode 100644 index e1d1b0f..0000000 --- a/0001-fcoemon-Rework-daemonizing-and-error-handling.patch +++ /dev/null @@ -1,78 +0,0 @@ -From f3af6bad75d7f6c90b9a170cbf9e4748ab4bb24e Mon Sep 17 00:00:00 2001 -From: Johannes Thumshirn -Date: Mon, 18 May 2015 17:02:59 +0000 -Subject: fcoemon: Rework daemonizing and error handling - -Rework error handling, which leads to daemonizing later in order to get the -error handling into effect. - -Signed-off-by: Johannes Thumshirn -Signed-off-by: Vasu Dev ---- - fcoemon.c | 31 ++++++++++++++++++++++--------- - 1 file changed, 22 insertions(+), 9 deletions(-) - -diff --git a/fcoemon.c b/fcoemon.c -index 3b5210c..c5edd1b 100644 ---- a/fcoemon.c -+++ b/fcoemon.c -@@ -3719,11 +3719,6 @@ int main(int argc, char **argv) - if (argc != optind) - fcm_usage(); - -- if (!fcm_fg && daemon(0, !fcoe_config.use_syslog)) { -- FCM_LOG("Starting daemon failed"); -- exit(EXIT_FAILURE); -- } -- - umask(0); - - /* -@@ -3770,22 +3765,40 @@ int main(int argc, char **argv) - } - - fcm_fcoe_init(); -- fcm_fc_events_init(); -- fcm_link_init(); /* NETLINK_ROUTE protocol */ -+ rc = fcm_fc_events_init(); -+ if (rc != 0) -+ exit(1); -+ -+ rc = fcm_link_init(); /* NETLINK_ROUTE protocol */ -+ if (rc != 0) -+ goto err_cleanup; -+ - fcm_dcbd_init(); -- fcm_srv_create(&srv_info); -+ rc = fcm_srv_create(&srv_info); -+ if (rc != 0) -+ goto err_cleanup; -+ -+ if (!fcm_fg && daemon(0, !fcoe_config.use_syslog)) { -+ FCM_LOG("Starting daemon failed"); -+ goto err_cleanup; -+ } -+ - sa_select_set_callback(fcm_handle_changes); - - rc = sa_select_loop(); - if (rc < 0) { - FCM_LOG_ERR(rc, "select error\n"); -- exit(EXIT_FAILURE); -+ goto err_cleanup; - } - fcm_dcbd_shutdown(); - fcm_srv_destroy(&srv_info); - if (rc == SIGHUP) - fcm_cleanup(); - return 0; -+ -+err_cleanup: -+ fcm_cleanup(); -+ exit(1); - } - - /******************************************************* --- -1.8.4.5 - diff --git a/0002-fcoemon-fix-IEEE-state-machine.patch b/0002-fcoemon-fix-IEEE-state-machine.patch deleted file mode 100644 index cb593f1..0000000 --- a/0002-fcoemon-fix-IEEE-state-machine.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 91c0c8c0a37af40b3fb4a37df6490a226348d152 Mon Sep 17 00:00:00 2001 -From: Vasu Dev -Date: Fri, 5 Jun 2015 14:52:10 -0700 -Subject: fcoemon: fix IEEE state machine - -Fix IEEE state machine for these issues:- - - - fcoeadm scan not working - - fcoeadm reset not working - - periodic fipvlan issuance even after fcoe instance created - -These issues are due to current IEEE states are not correctly -handled. The validate_ieee_info() return either activate or -wait actions and out of that only activate is really used to -enable fcoe instance and none other action are applicable in -IEEE state machine, so reduced to only activate and then -advance the state machine to new IEEE_ACTIVE state to allow -processing of scan & reset command once interface activated. - -This also fixes fipvlan issuance issue beside fixing scan and -reset fcoeadm commands. - -Signed-off-by: Vasu Dev -Tested-By: Jack Morgan ---- - fcoemon.c | 19 +++++++------------ - fcoemon.h | 1 + - 2 files changed, 8 insertions(+), 12 deletions(-) - -diff --git a/fcoemon.c b/fcoemon.c -index c5edd1b..c0af99b 100644 ---- a/fcoemon.c -+++ b/fcoemon.c -@@ -1341,6 +1341,7 @@ STR_ARR(ieee_states, "Unknown", "Out of range", - [IEEE_INIT] = "IEEE_INIT", - [IEEE_GET_STATE] = "IEEE_GET_STATE", - [IEEE_DONE] = "IEEE_DONE", -+ [IEEE_ACTIVE] = "IEEE_ACTIVE", - ); - - static void -@@ -3054,20 +3055,14 @@ static void fcm_netif_ieee_advance(struct fcm_netif *ff) - break; - case IEEE_DONE: - action = validate_ieee_info(ff); -- switch (action) { -- case FCP_DESTROY_IF: -- case FCP_ENABLE_IF: -- case FCP_ACTIVATE_IF: -+ if (action == FCP_ACTIVATE_IF) { - fcp_action_set(ff->ifname, action); -- break; -- case FCP_DISABLE_IF: -- case FCP_ERROR: -- fcp_action_set(ff->ifname, FCP_DISABLE_IF); -- break; -- case FCP_WAIT: -- default: -- break; -+ ieee_state_set(ff, IEEE_ACTIVE); - } -+ break; -+ case IEEE_ACTIVE: -+ /* TBD enable and disable if needed in IEEE mode */ -+ break; - default: - break; - } -diff --git a/fcoemon.h b/fcoemon.h -index c2ed7b1..3869bae 100644 ---- a/fcoemon.h -+++ b/fcoemon.h -@@ -80,6 +80,7 @@ enum ieee_state { - IEEE_INIT = 0, /* Starting state */ - IEEE_GET_STATE, /* Getting IEEE DCB state */ - IEEE_DONE, /* Received IEEE DCB state */ -+ IEEE_ACTIVE, /* IEEE is in ACTIVE state */ - IEEE_ERROR, /* Error receiving IEEE DCB state */ - }; - --- -1.8.4.5 - diff --git a/0006-fipvlan-fixup-return-value-on-error.patch b/0006-fipvlan-fixup-return-value-on-error.patch deleted file mode 100644 index 34c47ba..0000000 --- a/0006-fipvlan-fixup-return-value-on-error.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 311c26a073f4397f10408c288af28cf593f46336 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Tue, 13 May 2014 09:44:17 +0200 -Subject: fipvlan: fixup return value on error - -fipvlan should return 1 on error or ENODEV (=19) if no interfaces -were found. - -Signed-off-by: Hannes Reinecke ---- - fipvlan.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/fipvlan.c b/fipvlan.c -index 288b011..9f3b07d 100644 ---- a/fipvlan.c -+++ b/fipvlan.c -@@ -981,7 +981,7 @@ int main(int argc, char **argv) - - ns = rtnl_socket(); - if (ns < 0) { -- rc = ns; -+ rc = 1; - goto ns_err; - } - pfd_add(ns); -@@ -1001,7 +1001,7 @@ int main(int argc, char **argv) - "no interfaces to perform discovery on"); - else - FIP_LOG("no interfaces to perform discovery on"); -- exit(1); -+ exit(ENODEV); - } - - do_vlan_discovery(); --- -1.8.4.5 - diff --git a/fcoe-utils-1.0.30.tar.xz b/fcoe-utils-1.0.30.tar.xz deleted file mode 100644 index 56a0e54..0000000 --- a/fcoe-utils-1.0.30.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a525e256f02f4cb95ff231b7e239d2ff21bcbde4c659fa12cea61e5a53464567 -size 121480 diff --git a/fcoe-utils-1.0.31.tar.xz b/fcoe-utils-1.0.31.tar.xz new file mode 100644 index 0000000..adf4b81 --- /dev/null +++ b/fcoe-utils-1.0.31.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a7688bf8ae744f205c1bc6ea1d011ecf3665f2581442f34ad2ca8b0bc95691c +size 123252 diff --git a/fcoe-utils.changes b/fcoe-utils.changes index f73ef48..1154631 100644 --- a/fcoe-utils.changes +++ b/fcoe-utils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Feb 18 11:34:47 UTC 2016 - jthumshirn@suse.com + +- Update to version 1.0.31 + * Removed merged patches: + + 0001-fcoemon-Rework-daemonizing-and-error-handling.patch + + 0002-fcoemon-fix-IEEE-state-machine.patch + + 0006-fipvlan-fixup-return-value-on-error.patch + ------------------------------------------------------------------- Mon Aug 3 12:35:16 CEST 2015 - hare@suse.de diff --git a/fcoe-utils.spec b/fcoe-utils.spec index b474a08..fe31e8b 100644 --- a/fcoe-utils.spec +++ b/fcoe-utils.spec @@ -1,7 +1,7 @@ # # spec file for package fcoe-utils # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,32 +20,27 @@ Name: fcoe-utils Url: http://www.open-fcoe.org BuildRequires: autoconf BuildRequires: automake -BuildRequires: libHBAAPI2-devel >= 2.2.10 -BuildRequires: libhbalinux2-devel >= 1.0.17 +BuildRequires: libpciaccess-devel BuildRequires: libtool BuildRequires: open-lldp-devel +BuildRequires: pkg-config BuildRequires: systemd-devel Requires: device-mapper Requires: iproute -Requires: libhbalinux2 Requires: open-lldp %systemd_requires -Version: 1.0.30 +Version: 1.0.31 Release: 0 Summary: FCoE userspace management tools License: GPL-2.0 Group: System/Daemons # git://open-fcoe.org/fcoe/fcoe-utils.git Source0: %{name}-%{version}.tar.xz -# Patches from git repository -Patch1: 0001-fcoemon-Rework-daemonizing-and-error-handling.patch -Patch2: 0002-fcoemon-fix-IEEE-state-machine.patch # Patches to be upstreamed Patch3: 0003-systemctl-cannot-start-fcoemon.socket.patch Patch4: 0004-fcoemon-Correctly-handle-options-in-the-service-file.patch Patch5: 0005-fcoe.service-Add-foreground-to-prevent-fcoemon-to-be.patch -Patch6: 0006-fipvlan-fixup-return-value-on-error.patch Patch7: 0007-fipvlan-clean-up-state-machine-for-pfd_add.patch Patch8: 0008-Use-correct-socket-for-fcoemon.socket.patch @@ -60,12 +55,9 @@ connections. %prep %setup -q -%patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch101 -p1