git: 165835b999af - main - sysutils/openseachest: Update version 21.06.21=>23.03.1

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Wed, 12 Apr 2023 17:39:21 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=165835b999af1db6266b5cd034e39d38093a3598

commit 165835b999af1db6266b5cd034e39d38093a3598
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-04-12 16:47:58 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-04-12 17:39:06 +0000

    sysutils/openseachest: Update version 21.06.21=>23.03.1
    
    Changelog: https://github.com/Seagate/openSeaChest/releases/tag/v23.03.1
---
 sysutils/openseachest/Makefile                     |  34 +++---
 sysutils/openseachest/distinfo                     |  22 ++--
 .../files/patch-src_openseachest__util__options.c  | 128 ++++++++++++++++++++-
 3 files changed, 149 insertions(+), 35 deletions(-)

diff --git a/sysutils/openseachest/Makefile b/sysutils/openseachest/Makefile
index 8386ebb7fb95..dd7371391eeb 100644
--- a/sysutils/openseachest/Makefile
+++ b/sysutils/openseachest/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	openseachest
-PORTVERSION=	21.06.21
+PORTVERSION=	23.03.1
 DISTVERSIONPREFIX=	v
 CATEGORIES=	sysutils
 
@@ -11,36 +11,34 @@ LICENSE=	MPL20
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
 USES=		dos2unix gmake
-ALL_TARGET=	release
-
 DOS2UNIX_FILES=	src/openseachest_util_options.c
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	Seagate
 GH_PROJECT=	openSeaChest
-GH_TUPLE=	Seagate:opensea-common:dc89150:common/opensea-common \
-		Seagate:opensea-operations:cfd7678:operations/opensea-operations \
-		Seagate:opensea-transport:a2ea73c:transport/opensea-transport \
-		Seagate:wingetopt:1b5b5ad:wingetopt/wingetopt
+GH_TUPLE=	Seagate:opensea-common:5b65caa:common/subprojects/opensea-common \
+		Seagate:opensea-operations:187570b:operations/subprojects/opensea-operations \
+		Seagate:opensea-transport:cca4059:transport/subprojects/opensea-transport \
+		Seagate:wingetopt:92c217a:wingetopt/subprojects/wingetopt
+
+MAKE_JOBS_UNSAFE=	yes
+ALL_TARGET=	release
+
+CFLAGS+=	-Wall -c -std=gnu99
 BUILD_WRKSRC=	${WRKSRC}/Make/gcc
 INSTALL_WRKSRC=	${WRKSRC}/Make/gcc
-CFLAGS+=	-Wall -c -std=gnu99
-MAKE_JOBS_UNSAFE=	yes
+
 EXES=		openSeaChest_Basics openSeaChest_Configure openSeaChest_Erase \
-		openSeaChest_Firmware openSeaChest_FormatUnit \
-		openSeaChest_GenericTests openSeaChest_Info openSeaChest_Logs \
-		openSeaChest_NVMe openSeaChest_PassthroughTest \
-		openSeaChest_PowerControl openSeaChest_Security \
-		openSeaChest_SMART openSeaChest_ZBD
+		openSeaChest_Firmware openSeaChest_GenericTests \
+		openSeaChest_Info openSeaChest_Logs openSeaChest_NVMe \
+		openSeaChest_PassthroughTest openSeaChest_PowerControl \
+		openSeaChest_Security openSeaChest_SMART openSeaChest_ZBD
 .for file in ${EXES}
 PLIST_FILES+=	bin/${file}
 .endfor
 
-.include <bsd.port.pre.mk>
-
 do-install:
 .for exefile in ${EXES}
 	${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/openseachest_exes/${exefile} ${STAGEDIR}${PREFIX}/bin/
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/openseachest/distinfo b/sysutils/openseachest/distinfo
index ad9120ceec01..72a468aba0ee 100644
--- a/sysutils/openseachest/distinfo
+++ b/sysutils/openseachest/distinfo
@@ -1,11 +1,11 @@
-TIMESTAMP = 1630345993
-SHA256 (Seagate-openSeaChest-v21.06.21_GH0.tar.gz) = ab9b458b8389d1a36b9703fd97ac4e4b8d157c028b8ee28315ff96541cc45956
-SIZE (Seagate-openSeaChest-v21.06.21_GH0.tar.gz) = 728115
-SHA256 (Seagate-opensea-common-dc89150_GH0.tar.gz) = 97b6d9dbc1b1ed489a63becc26c2da4ce24aa5a824525e344dd9702db3b021c9
-SIZE (Seagate-opensea-common-dc89150_GH0.tar.gz) = 111481
-SHA256 (Seagate-opensea-operations-cfd7678_GH0.tar.gz) = 297f642bea96ce18fd1380183525983f62d160347868af0b678d8757d5a18aa6
-SIZE (Seagate-opensea-operations-cfd7678_GH0.tar.gz) = 423225
-SHA256 (Seagate-opensea-transport-a2ea73c_GH0.tar.gz) = 1dba2ffb45cd4266600aab151613dbdc8a850a286ff1fa5de7dedfc4b8c9c251
-SIZE (Seagate-opensea-transport-a2ea73c_GH0.tar.gz) = 705111
-SHA256 (Seagate-wingetopt-1b5b5ad_GH0.tar.gz) = 33457d93e768e9e877a84004e8f2d9a597fabe706855d4d18b10d60c650e24b8
-SIZE (Seagate-wingetopt-1b5b5ad_GH0.tar.gz) = 15515
+TIMESTAMP = 1681317398
+SHA256 (Seagate-openSeaChest-v23.03.1_GH0.tar.gz) = aa307959126fd1863a818eb798923172f222760d9830835485e0d49cb7e40739
+SIZE (Seagate-openSeaChest-v23.03.1_GH0.tar.gz) = 849008
+SHA256 (Seagate-opensea-common-5b65caa_GH0.tar.gz) = 888801ae8e145b7c8641314230b812f80f8401166c23ba3ceaa693181f1557a5
+SIZE (Seagate-opensea-common-5b65caa_GH0.tar.gz) = 134787
+SHA256 (Seagate-opensea-operations-187570b_GH0.tar.gz) = 02b066b7954bb1bffa68f66ae20f2dccf9599b0126d5aecc33405181b940d145
+SIZE (Seagate-opensea-operations-187570b_GH0.tar.gz) = 481580
+SHA256 (Seagate-opensea-transport-cca4059_GH0.tar.gz) = f96666592af7b5d50caeda8b10ee70d789b05a343efcfa3d92c03b85ba89f232
+SIZE (Seagate-opensea-transport-cca4059_GH0.tar.gz) = 818645
+SHA256 (Seagate-wingetopt-92c217a_GH0.tar.gz) = 4de8bc7f6bb92361872345bf0a273ae7e76e44f7d4990c6fe439a43cd7796e38
+SIZE (Seagate-wingetopt-92c217a_GH0.tar.gz) = 20882
diff --git a/sysutils/openseachest/files/patch-src_openseachest__util__options.c b/sysutils/openseachest/files/patch-src_openseachest__util__options.c
index 13c7b0bd4dc8..898d2d3d2c6d 100644
--- a/sysutils/openseachest/files/patch-src_openseachest__util__options.c
+++ b/sysutils/openseachest/files/patch-src_openseachest__util__options.c
@@ -1,6 +1,6 @@
---- src/openseachest_util_options.c.orig	2021-05-21 17:50:44 UTC
+--- src/openseachest_util_options.c.orig	2023-04-12 16:13:25 UTC
 +++ src/openseachest_util_options.c
-@@ -108,12 +108,12 @@ void print_Elevated_Privileges_Text()
+@@ -112,12 +112,12 @@ void print_Elevated_Privileges_Text(void)
  
  char* get_current_year(char *temp_year)
  {
@@ -18,16 +18,16 @@
      return temp_year;
  }
  
-@@ -147,7 +147,7 @@ void openseachest_utility_Info(const char *utilityName
+@@ -151,7 +151,7 @@ void openseachest_utility_Info(const char *utilityName
      printf(" %s Version: %s-%s ", utilityName, buildVersion, seaCPublicVersion);
      print_Architecture(architecture);
      printf("\n");
 -    printf(" Build Date: %s\n", __DATE__);
 +    printf(" Build Date: %s\n", "Jan 19 2038");
-     if (0 == strftime(currentTime, 30, "%c", get_Localtime(&g_curTime, &utilTime)))
+     if (0 == strftime(currentTime, CURRENT_TIME_STRING_MAX_LENGTH, "%c", get_Localtime(&g_curTime, &utilTime)))
      {
-         sprintf(currentTime, "Unable to get local time");
-@@ -174,7 +174,7 @@ void utility_Full_Version_Info(const char *utilityName
+         snprintf(currentTime, CURRENT_TIME_STRING_MAX_LENGTH, "Unable to get local time");
+@@ -178,7 +178,7 @@ void utility_Full_Version_Info(const char *utilityName
      printf("\topensea-common Version: %s\n", openseaCommonVersion);
      printf("\topensea-transport Version: %" PRId32".%" PRId32".%" PRId32"\n", seaCPublicMajorVersion, seaCPublicMinorVersion, seaCPublicPatchVersion);
      printf("\topensea-operations Version: %s\n", openseaOperationVersion);
@@ -36,3 +36,119 @@
      printf("\tCompiled Architecture: ");
      print_Architecture(get_Compiled_Architecture());
      printf("\n\tDetected Endianness: ");
+@@ -227,58 +227,58 @@ void print_SeaChest_Util_Exit_Codes(int numberOfToolSp
+ 
+ void get_Scan_Flags(deviceScanFlags *scanFlags, char *optarg)
+ {
+-    if(strncmp("ata", optarg, strlen(optarg)) == 0)                 
+-    {                                                                                                   
+-        scanFlags->scanATA = true;                                                                      
+-    }                                                                                                   
+-    else if (strlen(optarg) == 3 && strncmp("usb", optarg, strlen(optarg)) == 0)            
+-    {                                                                                                   
+-        scanFlags->scanUSB = true;                                                                      
+-    }                                                                                                   
+-    else if (strlen(optarg) == 4 && strncmp("scsi", optarg, strlen(optarg)) == 0)           
+-    {                                                                                                   
+-        scanFlags->scanSCSI = true;                                                                     
+-    }                                                                                                   
+-    else if (strlen(optarg) == 4 && strncmp("nvme", optarg, strlen(optarg)) == 0)           
+-    {                                                                                                   
+-        scanFlags->scanNVMe = true;                                                                     
+-    }                                                                                                   
+-    else if (strlen(optarg) == 4 && strncmp("raid", optarg, strlen(optarg)) == 0)           
+-    {                                                                                                   
+-        scanFlags->scanRAID = true;                                                                     
+-    }                                                                                                   
+-    else if (strlen(optarg) == 12 && strncmp("interfaceATA", optarg, strlen(optarg)) == 0)  
+-    {                                                                                                   
+-        scanFlags->scanInterfaceATA = true;                                                             
+-    }                                                                                                   
+-    else if (strlen(optarg) == 12 && strncmp("interfaceUSB", optarg, strlen(optarg)) == 0)  
+-    {                                                                                                   
+-        scanFlags->scanInterfaceUSB = true;                                                             
+-    }                                                                                                   
+-    else if (strlen(optarg) == 13 && strncmp("interfaceSCSI", optarg, strlen(optarg)) == 0) 
+-    {                                                                                                   
+-        scanFlags->scanInterfaceSCSI = true;                                                            
+-    }                                                                                                   
+-    else if (strlen(optarg) == 13 && strncmp("interfaceNVME", optarg, strlen(optarg)) == 0) 
+-    {                                                                                                   
+-        scanFlags->scanInterfaceNVMe = true;                                                            
+-    }                                                                                                   
+-    else if (strlen(optarg) == 2 && strncmp("sd", optarg, strlen(optarg)) == 0)             
+-    {                                                                                                   
+-        scanFlags->scanSD = true;                                                                       
+-    }                                                                                                   
+-    else if (strlen(optarg) == 6 && strncmp("sgtosd", optarg, strlen(optarg)) == 0)         
+-    {                                                                                                   
+-        scanFlags->scanSDandSG = true;                                                                  
+-    }                                                                                                   
+-    else if (strlen(optarg) == 10 && strncmp("ignoreCSMI", optarg, strlen(optarg)) == 0)    
+-    {                                                                                                   
+-        scanFlags->scanIgnoreCSMI = true;                                                                          
+-    }                                                                                                   
+-    else if (strlen(optarg) == 15 && strncmp("allowDuplicates", optarg, strlen(optarg)) == 0) 
+-    {                                                                                                   
+-        scanFlags->scanAllowDuplicateDevices = true;                                                               
+-    }              
++    if(strncmp("ata", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanATA = true;
++    }
++    else if (strlen(optarg) == 3 && strncmp("usb", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanUSB = true;
++    }
++    else if (strlen(optarg) == 4 && strncmp("scsi", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanSCSI = true;
++    }
++    else if (strlen(optarg) == 4 && strncmp("nvme", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanNVMe = true;
++    }
++    else if (strlen(optarg) == 4 && strncmp("raid", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanRAID = true;
++    }
++    else if (strlen(optarg) == 12 && strncmp("interfaceATA", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanInterfaceATA = true;
++    }
++    else if (strlen(optarg) == 12 && strncmp("interfaceUSB", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanInterfaceUSB = true;
++    }
++    else if (strlen(optarg) == 13 && strncmp("interfaceSCSI", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanInterfaceSCSI = true;
++    }
++    else if (strlen(optarg) == 13 && strncmp("interfaceNVME", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanInterfaceNVMe = true;
++    }
++    else if (strlen(optarg) == 2 && strncmp("sd", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanSD = true;
++    }
++    else if (strlen(optarg) == 6 && strncmp("sgtosd", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanSDandSG = true;
++    }
++    else if (strlen(optarg) == 10 && strncmp("ignoreCSMI", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanIgnoreCSMI = true;
++    }
++    else if (strlen(optarg) == 15 && strncmp("allowDuplicates", optarg, strlen(optarg)) == 0)
++    {
++        scanFlags->scanAllowDuplicateDevices = true;
++    }
+     return;
+ }
+ 
+@@ -4310,4 +4310,3 @@ void print_Persistent_Reservations_Preempt_Abort_Help(
+         printf("\t\t--%s option in order to specify the key to preempt.\n\n", PERSISTENT_RESERVATION_PREEMPT_LONG_OPT_STRING);
+     }
+ }
+-