Compare commits

...

No commits in common. "c10s" and "c8" have entirely different histories.
c10s ... c8

17 changed files with 416 additions and 310 deletions

1
.fcoe-utils.metadata Normal file
View File

@ -0,0 +1 @@
263e7e1c31e5c834126afb0a510a852268bd07af SOURCES/fcoe-utils-1.0.33-848bcc6.tar.gz

42
.gitignore vendored
View File

@ -1,41 +1 @@
# standard autotools stuff
.deps/
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
compile
config.log
config.status
configure
depcomp
install-sh
missing
# other autoconf generated files
fcoe-utils.spec
fcoeplumb
fcoe_utils_version.h
# compile generated files
*.o
fcoeadm
fcoemon
fipvlan
fcping
fcnsq
fcrls
etc/initd/fcoe
# build.sh generated files
fcoe-utils-*.tar.gz
fcoe-utils-*.rpm
/fcoe-utils-1.0.18.tar.bz2
/fcoe-utils-1.0.19.tar.bz2
/fcoe-utils-1.0.20.tar.bz2
/fcoe-utils-1.0.21.tar.bz2
/fcoe-utils-1.0.22.tar.bz2
/fcoe-utils-1.0.23.tar.bz2
/fcoe-utils-1.0.24.tar.bz2
/fcoe-utils-1.0.25.tar.bz2
/fcoe-utils-1.0.27.tar.bz2
SOURCES/fcoe-utils-1.0.33-848bcc6.tar.gz

View File

@ -1,95 +0,0 @@
From c54147b3ada8c37a536a4df90e8707538021ed20 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Fri, 4 Feb 2022 09:21:47 -0800
Subject: [PATCH 1/1] fcoemon: add snprintf string precision modifiers in
fcm_netif_advance
GCC 12 is warning of potential snprintf truncations
fcm_netif.ifname is an IFNAMSIZ array, but formating with %s doesn't
understand that, so add a precision modifier every time we print it to
limit the output. This allows the compiler to verify that the output
buffer is of sufficient length to never truncate.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fcoemon.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/fcoemon.c b/fcoemon.c
index 8c08bc5a032..b85f276c7df 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -3135,55 +3135,55 @@ static void fcm_netif_advance(struct fcm_netif *ff)
case FCD_ERROR:
break;
case FCD_GET_DCB_STATE:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_DCB, 0,
- (u_int) strlen(ff->ifname), ff->ifname);
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname);
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_SEND_CONF:
snprintf(params, sizeof(params), "%x1%x02",
ff->ff_app_info.enable,
ff->ff_app_info.willing);
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_SET_CONFIG, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, params);
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, params);
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PFC_CONFIG:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_PFC, 0,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_APP_CONFIG:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_CONFIG, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PFC_OPER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_OPER, FEATURE_PFC, 0,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_APP_OPER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_OPER, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_GET_PEER:
- snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%s%s",
+ snprintf(buf, sizeof(buf), "%c%x%2.2x%2.2x%2.2x%2.2x%.*s%s",
DCB_CMD, CLIF_RSP_VERSION,
CMD_GET_PEER, FEATURE_APP, APP_FCOE_STYPE,
- (u_int) strlen(ff->ifname), ff->ifname, "");
+ (u_int) strlen(ff->ifname), IFNAMSIZ, ff->ifname, "");
ff->response_pending = fcm_dcbd_request(buf);
break;
case FCD_DONE:
--
2.34.1

View File

@ -1,34 +0,0 @@
From 78a5e2e17bba531b41101ca036a5bb1a0d5caca5 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 6 Feb 2024 21:15:33 -0500
Subject: [PATCH 2/2] Don't attempt to memcpy() zero bytes
add_rtattr_nest() is called in several places in the code. As part of
its operation, it calls add_rtattr(nm type, NULL, 0) which results in
NULL and 0 being passed to memcpy(). This fails with -Werror=nonnull
on recent GCC.
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
---
lib/rtnetlink.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c
index 3b8413718997568a20752791807b19c1f299955e..faa60d7c12f68af175d223b6c3c3257a982e4f37 100644
--- a/lib/rtnetlink.c
+++ b/lib/rtnetlink.c
@@ -172,7 +172,10 @@ static void add_rtattr(struct nlmsghdr *n, int type, const void *data, int alen)
rta->rta_type = type;
rta->rta_len = len;
- memcpy(RTA_DATA(rta), data, alen);
+ if (alen > 0)
+ {
+ memcpy(RTA_DATA(rta), data, alen);
+ }
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
}
--
2.43.0

View File

@ -0,0 +1,115 @@
From 729135eea0ed39b3dfd57b7ea15f284e67af532f Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Mon, 18 Jan 2021 13:37:39 -0800
Subject: [PATCH 1/1] Revert "fcoemon: Correctly handle options in the service
file"
This reverts commit b06c3df0f0b06c1ad37b3bbf8bd602b24318aae6.
---
doc/fcoemon.txt | 6 +++---
etc/systemd/fcoe.service | 4 ++--
fcoemon.c | 24 +++++++++---------------
3 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/doc/fcoemon.txt b/doc/fcoemon.txt
index ba70478d141..3bfb3581a1b 100644
--- a/doc/fcoemon.txt
+++ b/doc/fcoemon.txt
@@ -53,13 +53,13 @@ OPTIONS
-------
*-f*, *--foreground*::
Run *fcoemon* in the foreground.
-*-d*, *--debug=yes|no*::
- Enable or disable debugging messages.
+*-d*, *--debug*::
+ Enable debugging messages.
*-l*, *--legacy*::
Force fcoemon to use the legacy /sys/module/libfcoe/parameters/
interface. The default is to use the newer /sys/bus/fcoe/ interfaces
if they are available.
-*-s*, *--syslog=yes|no*::
+*-s*, *--syslog*::
Use syslogd for logging. The default behavior is to log to stdout
and stderr.
*-h*, *--help*::
diff --git a/etc/systemd/fcoe.service b/etc/systemd/fcoe.service
index b1d95671573..5e5c8a2b67b 100644
--- a/etc/systemd/fcoe.service
+++ b/etc/systemd/fcoe.service
@@ -4,9 +4,9 @@ After=syslog.target network.target
[Service]
Type=simple
-EnvironmentFile=/etc/fcoe/config
+EnvironmentFile=/etc/sysconfig/fcoe
ExecStartPre=/sbin/modprobe -qa $SUPPORTED_DRIVERS
-ExecStart=/usr/sbin/fcoemon --foreground --debug=$DEBUG --syslog=$SYSLOG
+ExecStart=/usr/sbin/fcoemon $FCOEMON_OPTS
[Install]
WantedBy=multi-user.target
diff --git a/fcoemon.c b/fcoemon.c
index 8c08bc5a032..0cc36fec304 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -335,9 +335,9 @@ static int fcoe_vid_from_ifname(const char *ifname);
* Table for getopt_long(3).
*/
static struct option fcm_options[] = {
- {"debug", 1, NULL, 'd'},
+ {"debug", 0, NULL, 'd'},
{"legacy", 0, NULL, 'l'},
- {"syslog", 1, NULL, 's'},
+ {"syslog", 0, NULL, 's'},
{"exec", 1, NULL, 'e'},
{"foreground", 0, NULL, 'f'},
{"version", 0, NULL, 'v'},
@@ -3271,9 +3271,9 @@ static void fcm_usage(void)
{
printf("Usage: %s\n"
"\t [-f|--foreground]\n"
- "\t [-d|--debug=yes|no]\n"
+ "\t [-d|--debug]\n"
"\t [-l|--legacy]\n"
- "\t [-s|--syslog=yes|no]\n"
+ "\t [-s|--syslog]\n"
"\t [-v|--version]\n"
"\t [-h|--help]\n\n", progname);
exit(1);
@@ -3729,28 +3729,22 @@ int main(int argc, char **argv)
sa_log_flags = 0;
openlog(sa_log_prefix, LOG_CONS, LOG_DAEMON);
- while ((c = getopt_long(argc, argv, "fd:hls:v",
+ while ((c = getopt_long(argc, argv, "fdhlsv",
fcm_options, NULL)) != -1) {
switch (c) {
case 'f':
fcm_fg = 1;
break;
case 'd':
- if (!strncmp(optarg, "yes", 3) ||
- !strncmp(optarg, "YES", 3)) {
- fcoe_config.debug = 1;
- enable_debug_log(1);
- }
+ fcoe_config.debug = 1;
+ enable_debug_log(1);
break;
case 'l':
force_legacy = true;
break;
case 's':
- if (!strncmp(optarg, "yes", 3) ||
- !strncmp(optarg, "YES", 3)) {
- fcoe_config.use_syslog = 1;
- enable_syslog(1);
- }
+ fcoe_config.use_syslog = 1;
+ enable_syslog(1);
break;
case 'v':
printf("%s\n", FCOE_UTILS_VERSION);
--
2.26.2

View File

@ -0,0 +1,78 @@
From 1e6837c8ce063399eeb9580104da33f807e15443 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Tue, 23 Mar 2021 11:16:06 -0700
Subject: [PATCH 2/5] Revert "Make gcc compiler happy about ifname string
truncation."
This change dropped the "." from between the physical interface name and
the vlan number, making fipvlan created vlan names incompatible with
fcoeadm commands that ended up calling get_pci_dev_from_netdev in
lib/sysfs_hba.c (fcoeadm -i). That requirement should be fixed, but for
now lets deal with the fipvlan naming regression.
safe_makevlan_name isn't doing anything that can't be handled by
checking the return from snprintf
This reverts commit eee875e6526786031ec916274deec92148677c38.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fipvlan.c | 34 +---------------------------------
1 file changed, 1 insertion(+), 33 deletions(-)
diff --git a/fipvlan.c b/fipvlan.c
index c8a07339314..fe8d7955cc5 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -595,36 +595,6 @@ static int rtnl_listener_handler(struct nlmsghdr *nh, UNUSED void *arg)
return -1;
}
-static int
-safe_makevlan_name(char *vlan_name, size_t vsz,
- char *ifname, int vlan_num, char *suffix)
-{
- size_t ifsz = strlen(ifname);
- size_t susz = strlen(suffix); /* should never be NULL */
- int nusz;
- char numbuf[16];
- char *cp = vlan_name;
-
- nusz = snprintf(numbuf, sizeof(numbuf), "%d", vlan_num);
-
- if ((ifsz + susz + nusz + 2) > vsz) {
- FIP_LOG_ERR(EINVAL,
- "Cannot make VLAN name from ifname=\"%s\", vlan %d, and suffix=\"%s\"\n",
- ifname, vlan_num, suffix);
- return -EINVAL;
- }
- memcpy(cp, ifname, ifsz);
- cp += ifsz;
- memcpy(cp, numbuf, nusz);
- cp += nusz;
- if (susz > 0) {
- memcpy(cp, suffix, susz);
- cp += susz;
- }
- *cp = '\0';
- return 0;
-}
-
static int
create_and_start_vlan(struct fcf *fcf, bool vn2vn)
{
@@ -654,10 +624,8 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn)
real_dev->ifname, fcf->vlan, vlan->ifname);
rc = 0;
} else {
- rc = safe_makevlan_name(vlan_name, sizeof(vlan_name),
+ snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
real_dev->ifname, fcf->vlan, config.suffix);
- if (rc < 0)
- return rc;
rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
if (rc < 0)
printf("Failed to create VLAN device %s\n\t%s\n",
--
2.26.2

View File

@ -0,0 +1,38 @@
From b9885692cb283a674e04528486984fb61f92a190 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Tue, 23 Mar 2021 11:21:17 -0700
Subject: [PATCH 3/5] fix VLAN device name overflow check
check snprintf return for truncation
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fipvlan.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/fipvlan.c b/fipvlan.c
index fe8d7955cc5..3ce913d5eaf 100644
--- a/fipvlan.c
+++ b/fipvlan.c
@@ -624,8 +624,16 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn)
real_dev->ifname, fcf->vlan, vlan->ifname);
rc = 0;
} else {
- snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
- real_dev->ifname, fcf->vlan, config.suffix);
+ rc = snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
+ real_dev->ifname, fcf->vlan,
+ config.suffix);
+ if (rc < 0 || rc >= IFNAMSIZ) {
+ printf("Failed to create VLAN device "
+ "(name %s.%d%s is too long)\n",
+ real_dev->ifname, fcf->vlan,
+ config.suffix);
+ return -EINVAL;
+ }
rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
if (rc < 0)
printf("Failed to create VLAN device %s\n\t%s\n",
--
2.26.2

View File

@ -0,0 +1,35 @@
From 108387a2aa986a8107faa7548f3f9e9c084749d2 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Wed, 24 Mar 2021 09:50:51 -0700
Subject: [PATCH 4/5] fix regressions caused by safe_makepath change in
libopenfcoe.c
This needs to use strlen(dname) not sizeof(dname) or the directory path
is truncated. On a 64-bit arch an 8 byte truncation kind of looks like
a valid path '/sys/bus' which is sort of funny unless you're debugging
it.
This caused fcoeadm --fcf to fail to read in FCF info, and fcoeadm
--lesb to fail to find the link error status block counters.
Signed-off-by: Chris Leech <cleech@redhat.com>
---
libopenfcoe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libopenfcoe.c b/libopenfcoe.c
index 452ee803e63..cd35c868eee 100644
--- a/libopenfcoe.c
+++ b/libopenfcoe.c
@@ -58,7 +58,7 @@ out_err:
static char *safe_makepath(char *path, size_t path_sz,
char *dname, char *fname)
{
- size_t dsz = sizeof(dname);
+ size_t dsz = strlen(dname);
size_t fsz = strlen(fname);
char *cp = path;
--
2.26.2

View File

@ -0,0 +1,35 @@
From c4fe62dd3d26b30fdcf94c94f74bc0b9f7034c17 Mon Sep 17 00:00:00 2001
From: Chris Leech <cleech@redhat.com>
Date: Wed, 24 Mar 2021 10:17:52 -0700
Subject: [PATCH 5/5] minor fcoeadm output issues
Signed-off-by: Chris Leech <cleech@redhat.com>
---
fcoeadm_display.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fcoeadm_display.c b/fcoeadm_display.c
index 585ecfae54e..c2ef33b82cf 100644
--- a/fcoeadm_display.c
+++ b/fcoeadm_display.c
@@ -132,7 +132,7 @@ static void show_port_info(struct port_attributes *lp_info)
printf(" Port Name: %s\n",
lp_info->port_name);
- printf(" Fabric Name: %s\n",
+ printf(" Fabric Name: %s\n",
lp_info->fabric_name);
printf(" Speed: %s\n",
@@ -853,7 +853,7 @@ static void print_fcoe_fcf_device(void *ep, UNUSED void *arg)
buf = temp;
printf(" Connection Mode: %s\n", buf);
printf(" Fabric Name: 0x%016" PRIx64 "\n", fcf->fabric_name);
- printf(" Switch Name 0x%016" PRIx64 "\n", fcf->switch_name);
+ printf(" Switch Name: 0x%016" PRIx64 "\n", fcf->switch_name);
mac2str(fcf->mac, mac, MAX_STR_LEN);
printf(" MAC Address: %s\n", mac);
printf(" FCF Priority: %u\n", fcf->priority);
--
2.26.2

View File

@ -0,0 +1,25 @@
From db650524cb395827cf0d5a43bd07f77396513cd7 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 7 Aug 2018 21:23:38 -0700
Subject: [PATCH 1/1] set default DCB_REQUIRED to 'no'
---
etc/cfg-ethx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/cfg-ethx b/etc/cfg-ethx
index c5aaf36b4625..e2eb3309ccc7 100644
--- a/etc/cfg-ethx
+++ b/etc/cfg-ethx
@@ -8,7 +8,7 @@ FCOE_ENABLE="yes"
## Default: no
# Indicate if DCB service is required at the Ethernet port
# Normally set to "yes"
-DCB_REQUIRED="yes"
+DCB_REQUIRED="no"
## Type: yes/no
## Default: no
--
2.14.4

5
SOURCES/fcoe.config Normal file
View File

@ -0,0 +1,5 @@
# All supported drivers listed here are loaded when service starts
SUPPORTED_DRIVERS="libfc bnx2fc qedf"
# Add --debug to enable debug messages
FCOEMON_OPTS="--syslog"

12
SOURCES/fcoe.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Open-FCoE Inititator.
After=syslog.target network.target lldpad.service
[Service]
Type=forking
EnvironmentFile=/etc/sysconfig/fcoe
ExecStartPre=/sbin/modprobe -qa $SUPPORTED_DRIVERS
ExecStart=/usr/sbin/fcoemon $FCOEMON_OPTS
[Install]
WantedBy=multi-user.target

25
SOURCES/quickstart.txt Normal file
View File

@ -0,0 +1,25 @@
Quick Start guide for Open-FCoE
===============================
1. Install fcoe-utils package. This should also install dcbd, libhbaapi and
libhbalinux as dependencies.
2. Rename /etc/fcoe/cfg-ethx so it corresponds with name of your network
interface (e.g. /etc/fcoe/cfg-eth0). Copy and rename this file accordingly
if you have more interfaces, which should be fcoe-enabled
3. Modify configuration files to enable FCoE. Set FCOE_ENABLE="yes" and
DCB_REQUIRED="yes".
3. Run 'systemctl enable fcoe.service' to start FCoE per run level. This
will setup FCoE to start on reboot.
4. Run 'systemctl enable lldpad.service' to start LLDP agent per run
level. This will setup DCB to start on reboot.
5. Run 'systemctl start lldpad.service' to start LLDP agent.
6. Run 'dcbtool sc ethX dcb on; dcbtool sc ethX app:0 e:1;' for each fcoe-enabled
interface to setup DCB for FCoE.
7. Run 'systemctl start fcoe.sertvice' to start FCoE.

View File

@ -1,25 +1,35 @@
# https://fedoraproject.org/wiki/Packaging:Guidelines#Compiler_flags
%global _hardened_build 1
# v1.0.34-2
%global commit0 b233050792cc5fa54ba1da257706ca2b5ef3c987
# v1.0.33-9-g848bcc6ba8c
%global commit0 848bcc6ba8cda1f344663b4e73f1bc4857bcb4e3
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
Name: fcoe-utils
Version: 1.0.34
Release: 11.git%{shortcommit0}%{?dist}
Version: 1.0.33
Release: 4.git%{shortcommit0}%{?dist}
Summary: Fibre Channel over Ethernet utilities
License: GPL-2.0-only
Group: Applications/System
License: GPLv2
URL: http://www.open-fcoe.org
Source0: https://github.com/openSUSE/fcoe-utils/archive/%{commit0}.tar.gz#/%{name}-%{version}-%{shortcommit0}.tar.gz
Source1: quickstart.txt
Source2: fcoe.service
Source3: fcoe.config
ExcludeArch: ppc s390
Patch0: fcoe-utils-set-default-DCB_REQUIRED-to-no.patch
Patch1: 0001-Revert-fcoemon-Correctly-handle-options-in-the-servi.patch
Patch2: 0002-Revert-Make-gcc-compiler-happy-about-ifname-string-t.patch
Patch3: 0003-fix-VLAN-device-name-overflow-check.patch
Patch4: 0004-fix-regressions-caused-by-safe_makepath-change-in-li.patch
Patch5: 0005-minor-fcoeadm-output-issues.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: libpciaccess-devel
BuildRequires: libtool
BuildRequires: lldpad-devel >= 0.9.43
BuildRequires: systemd
BuildRequires: make
Requires: lldpad >= 0.9.43
Requires: iproute
Requires: device-mapper-multipath
@ -27,14 +37,6 @@ Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Patch1: 0001-fcoemon-add-snprintf-string-precision-modifiers-in-f.patch
# https://github.com/openSUSE/fcoe-utils/pull/25
Patch2: 0002-Don-t-attempt-to-memcpy-zero-bytes.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
%description
Fibre Channel over Ethernet utilities
fcoeadm - command line tool for configuring FCoE interfaces
@ -42,138 +44,72 @@ fcoemon - service to configure DCB Ethernet QOS filters, works with lldpad
%prep
%autosetup -p1 -n fcoe-utils-%{commit0}
%if 0%{?rhel} >= 8
# RHEL dropped support for software fcoe (fcoe.ko)
sed -i 's/^\(SUPPORTED_DRIVERS\)=".*"$/\1="bnx2fc qedf"/' etc/config
# make the defaults sane for supported offload drivers
sed -i 's/^\(DCB_REQUIRED\)=".*"$/\1="no"/' etc/cfg-ethx
%endif
cp -v %{SOURCE1} quickstart.txt
%build
./bootstrap.sh
%configure --with-systemdsystemunitdir=%{_unitdir}
%configure
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -rf %{buildroot}/etc/init.d
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig %{buildroot}%{_unitdir}
rm -f %{buildroot}%{_unitdir}/*
install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/fcoe
mkdir -p %{buildroot}%{_libexecdir}/fcoe
for file in \
contrib/*.sh \
debug/*sh
do install -m 755 ${file} %{buildroot}%{_libexecdir}/fcoe/
done
# We supply our own config for fcoe.service
rm -f %{buildroot}/%{_sysconfdir}/fcoe/config
%post
%systemd_post fcoe.service fcoemon.socket
%systemd_post fcoe.service
%preun
%systemd_preun fcoe.service fcoemon.socket
%systemd_preun fcoe.service
%postun
%systemd_postun_with_restart fcoe.service fcoemon.socket
%systemd_postun_with_restart fcoe.service
%files
%doc README COPYING QUICKSTART
%doc README COPYING QUICKSTART quickstart.txt
%{_sbindir}/*
%{_mandir}/man8/*
%{_unitdir}/fcoe.service
%{_unitdir}/fcoemon.socket
%{_sysconfdir}/fcoe/
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
%config(noreplace) %{_sysconfdir}/fcoe/config
%config(noreplace) %{_sysconfdir}/sysconfig/fcoe
%{_datadir}/bash-completion/completions/*
%{_libexecdir}/fcoe/
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.0.34-11.gitb233050
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Jun 10 2021 Chris Leech <cleech@redhat.com> - 1.0.33-4.git848bcc6
- rebuilt for 8.5
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.0.34-10.gitb233050
- Bump release for June 2024 mass rebuild
* Tue Mar 23 2021 Chris Leech <cleech@redhat.com> - 1.0.33-3.git848bcc6
- 1918561 regression in fipvlan VLAN name generation and fcoeadm commands
* Tue Feb 06 2024 Stephen Gallagher <sgallagh@redhat.com> - 1.0.34-9.gitb233050
- FTBFS: Don't attempt to memcpy() zero bytes
* Mon Jan 18 2021 Chris Leech <cleech@redhat.com> - 1.0.33-2.git848bcc6
- 1897503 revert breaking upstream change to command line options
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-8.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 03 2020 Chris Leech <cleech@redhat.com> - 1.0.33-1.git848bcc6
- 1889536 add back default change of DCB_REQUIRED="no" for RHEL 8
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-7.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 03 2020 Chris Leech <cleech@redhat.com> - 1.0.33-0.git848bcc6
- 1889536 new version
* Mon Oct 30 2023 Chris Leech <cleech@redhat.com> - 1.0.34-6.gitb233050
- use SPDX in license tag
* Fri Dec 06 2019 Chris Leech <cleech@redhat.com> - 1.0.32-7
- 1776492 fcoemon: fix ignored devices from recv buffer resize bug
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-5.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-4.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-3.gitb233050
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Feb 04 2022 Chris Leech <cleech@redhat.com> - 1.0.34-2.gitb233050
- FTBFS: more gcc 12 snprintf truncation issues on 32-bit arch
* Fri Jan 28 2022 Chris Leech <cleech@redhat.com> - 1.0.34-1.gitb233050
- FTBFS: update with gcc 12 fix from upstream
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-0.git14ef0d2.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.34-0.git14ef0d2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Apr 14 2021 Chris Leech <cleech@redhat.com> - 1.0.34-0.git14ef0d2
- upstream 1.0.34
- drop gcc11 warning disabling patch, warnings have been addressed upstream
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.33-6.git848bcc6
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Tue Feb 02 2021 Chris Leech <cleech@redhat.com> - 1.0.33-5.git848bcc6
- add in RHEL conditional for removed fcoe.ko support
* Mon Feb 01 2021 Chris Leech <cleech@redhat.com> - 1.0.33-4.git848bcc6
- drop any differences with upstream service and config files
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.33-3.gitfe376de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Nov 14 2020 Jeff Law <law@redhat.com> - 1.0.33-2.gitfe376de
- Disable fatal diagnostic from gcc-11 for fping
* Wed Oct 28 2020 Jeff Law <law@redhat.com> - 1.0.33-1.gitfe376de
- Disable fatal diagnostics from gcc-11 for fipvlan
* Mon Sep 21 2020 Chris Leech <cleech@redhat.com> - 1.0.33-0.gitfe376de
- FTBFS: fix gcc 10.2 truncation and overflow errors
- rebase to 1.0.33+ from new upstream location
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-12.git9834b34
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-11.git9834b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-10.git9834b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-9.git9834b34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Tue Jun 04 2019 Chris Leech <cleech@redhat.com> - 1.0.32-8.git9834b34
- fix more string function issues breaking the build with newer gcc
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.32-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Aug 07 2018 Chris Leech <cleech@redhat.com> - 1.0.32-6
- remove fcoe from SUPPORTED_DRIVERS in /etc/sysconfig/fcoe
- add qedf to SUPPORTED_DRIVERS in /etc/sysconf/fcoe
- added upstream fix for large fcoe ctrl numbers
* Fri Mar 16 2018 Chris Leech <cleech@redhat.com> - 1.0.32-5
- fix some newer gcc 8 truncation format errors

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1 +0,0 @@
SHA512 (fcoe-utils-1.0.34-b233050.tar.gz) = 8fc7df765fb7a2a17f9d3b9ce67b2499b7f602671d75be663cb7a668b0cbdfe7126796548c16496dac964549c695de844e6599c026a71f3b67d3d5fe6c29f858

View File

@ -1,23 +0,0 @@
---
- hosts: localhost
roles:
- role: standard-test-source
tags:
- always
- role: standard-test-basic
tags:
- classic
required_packages: # Install test dependencies
- fcoe-utils
tests:
- start-fcoe:
run: "systemctl start fcoe.service"
- stop-fcoe:
run: "systemctl stop fcoe.service"
- restart-fcoe:
run: "systemctl restart fcoe.service"
- check_status:
run: "systemctl status fcoe.service"