Skip to content

Commit

Permalink
Add 9.8 SDK spec and patches
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoxmoz committed Oct 19, 2023
1 parent 03eaf2c commit 0c7bf6d
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
79 changes: 79 additions & 0 deletions SDK/NetApp/NetApp-SDK-9.8.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# $Id$
%define debug_package %{nil}
%define perl_vendorlib /usr/lib64/perl5/vendor_perl

Summary: NetApp's SDK for interacting with filers
Name: NetApp-SDK
Version: 9.8P6
Release: 1%{?dist}
License: NetApp SDK License Agreement rev. Aug2020
Group: Development/Libraries
Source: https://mysupport.netapp.com/api/sw-download-service/productdownloads/63691/download/netapp-manageability-sdk-%{version}-linux.zip
Patch0: %{name}-%{version}-perlfix-OCUMAPI.patch
Patch1: %{name}-%{version}-perlfix-OntapClusterAPI.patch
URL: http://support.netapp.com
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Vendor: Mozilla IT

%description
Empty placeholder


%package Perl
Summary: A Perl SDK for interacting with NetApp filers
BuildArch: noarch
Prefix: %{perl_vendorlib}

%description Perl
The NetApp Manageability SDK provides resources to develop applications that monitor and manage NetApp storage systems.

%prep
%setup -q -n netapp-manageability-sdk-%{version}
%patch0 -p0
%patch1 -p0

%build

%install
%{__mkdir} -p $RPM_BUILD_ROOT%{perl_vendorlib}/%{name}
%{__cp} lib/perl/NetApp/NaServer.pm $RPM_BUILD_ROOT%{perl_vendorlib}/%{name}
%{__cp} lib/perl/NetApp/NaElement.pm $RPM_BUILD_ROOT%{perl_vendorlib}/%{name}
%{__cp} lib/perl/NetApp/OCUMAPI.pm $RPM_BUILD_ROOT%{perl_vendorlib}/%{name}
%{__cp} lib/perl/NetApp/OntapClusterAPI.pm $RPM_BUILD_ROOT%{perl_vendorlib}/%{name}
# You could add more files here, maybe even wildcard it. But I like a tidy directory.

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files Perl
%defattr(-,root,root,-)
%{perl_vendorlib}/%{name}/*

%changelog
* Sat Sep 23 2023 Greg Cox <[email protected]> 9.8P6
- SDK 9.8P6

* Sun Jan 1 2023 Greg Cox <[email protected]> 9.8P5
- SDK 9.8P5

* Wed Mar 24 2021 Greg Cox <[email protected]> 9.8P1
- SDK 9.8P1

* Mon Mar 30 2020 Greg Cox <[email protected]> 9.7
- SDK 9.7

* Mon Dec 31 2018 Greg Cox <[email protected]> 9.5
- SDK 9.5

* Fri Feb 2 2018 Greg Cox <[email protected]> 9.3
- SDK 9.3

* Tue Sep 26 2017 Greg Cox <[email protected]> 5.7
- SDK 5.7

* Tue Dec 20 2016 Greg Cox <[email protected]> 5.6
- SDK 5.6

* Wed May 4 2016 Greg Cox <[email protected]> 5.4P2
- SDK 5.4P2

15 changes: 15 additions & 0 deletions SDK/NetApp/NetApp-SDK-9.8P6-perlfix-OCUMAPI.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Certain times an empty $flag can make it through, which is noticed under use strict
# This was reported to NTAP and is BURT 1115364.
#
--- lib/perl/NetApp/OCUMAPI-old.pm 2018-10-24 04:49:12.000000000 +0000
+++ lib/perl/NetApp/OCUMAPI.pm 2018-12-31 17:01:19.040567041 +0000
@@ -5460,7 +5460,7 @@

sub IsArrayFlag {
my ($self, $flag) = @_;
- return ($flag & FIELD_ARRAY) == FIELD_ARRAY;
+ return $flag ? (($flag & FIELD_ARRAY) == FIELD_ARRAY) : 0;
}

sub IsEncryptedFlag {
15 changes: 15 additions & 0 deletions SDK/NetApp/NetApp-SDK-9.8P6-perlfix-OntapClusterAPI.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Certain times an empty $flag can make it through, which is noticed under use strict
# This was reported to NTAP and is BURT 1115364.
#
--- lib/perl/NetApp/OntapClusterAPI-old.pm 2018-10-24 04:49:08.000000000 +0000
+++ lib/perl/NetApp/OntapClusterAPI.pm 2018-12-31 17:04:03.964955587 +0000
@@ -118097,7 +118097,7 @@

sub IsArrayFlag {
my ($self, $flag) = @_;
- return ($flag & FIELD_ARRAY) == FIELD_ARRAY;
+ return $flag ? (($flag & FIELD_ARRAY) == FIELD_ARRAY) : 0;
}

sub IsEncryptedFlag {
2 changes: 2 additions & 0 deletions SDK/NetApp/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
I don't want to get into the legality angle of distributing proprietary software.
This is just to facilitate building the SDK as a somewhat sane RPM.

9.8 is the end of the line for this SDK.

0 comments on commit 0c7bf6d

Please sign in to comment.