Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
09f081da28
!13 【轻量级 PR】:fix format in smp_utils.spec.
From: @cossbow 
Reviewed-by: @liubo254 
Signed-off-by: @liubo254
2024-08-01 02:50:01 +00:00
客串一回
3d24bd2de7
fix format in smp_utils.spec.
https://gitee.com/src-openeuler/smp_utils/issues/IAGVUG

Signed-off-by: 客串一回 <cossbow@qq.com>
2024-07-31 10:11:42 +00:00
openeuler-ci-bot
293029b310
!11 [sync] PR-9: rebuild the version to 0.99-3
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-24 01:05:39 +00:00
LLamport
97353be279 rebuild the version to 0.99-3
(cherry picked from commit a13e548d428c0d67f2bae5e0bac32edbf0fcea39)
2022-10-21 17:43:47 +08:00
openeuler-ci-bot
261e36b916 !6 smp_utils delete -Sgit from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
2021-07-31 08:05:03 +00:00
chenyanpanHW
0b4b9c7b26
delete -Sgit from %autosetup, and delete BuildRequires git 2021-07-31 15:37:23 +08:00
openeuler-ci-bot
7223b29c14 !4 smp_utils: update to 0.99 version
Merge pull request !4 from liuzhiqiang/master
2020-07-16 15:50:21 +08:00
Zhiqiang Liu
cca76f63a6 smp_utils: update to 0.99 version
smp_utils: update to 0.99 version

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
2020-07-16 10:17:11 +08:00
openeuler-ci-bot
9b920ad58b !3 add yaml file for ci
Merge pull request !3 from liuzhiqiang/master
2020-07-02 17:08:56 +08:00
Zhiqiang Liu
b8a4aadb7e add yaml file for ci 2020-07-02 12:52:55 +08:00
6 changed files with 20 additions and 126 deletions

View File

@ -1,36 +0,0 @@
diff --git a/lib/smp_aac_io.c b/lib/smp_aac_io.c
index 110d0cc..ef91f71 100644
--- a/lib/smp_aac_io.c
+++ b/lib/smp_aac_io.c
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <fcntl.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
diff --git a/lib/smp_lin_bsg.c b/lib/smp_lin_bsg.c
index 0995ded..e19a166 100644
--- a/lib/smp_lin_bsg.c
+++ b/lib/smp_lin_bsg.c
@@ -40,6 +40,7 @@
#include <fcntl.h>
//#include <curses.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
diff --git a/lib/smp_mptctl_io.c b/lib/smp_mptctl_io.c
index 5512913..def386d 100644
--- a/lib/smp_mptctl_io.c
+++ b/lib/smp_mptctl_io.c
@@ -15,6 +15,7 @@
#include <fcntl.h>
//#include <curses.h>
#include <unistd.h>
+#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>

View File

@ -1,80 +0,0 @@
From 8e7ca311f55fe2074e5b02a17249c5a707edeb3c Mon Sep 17 00:00:00 2001
From: doug-gilbert <32302704+doug-gilbert@users.noreply.github.com>
Date: Wed, 28 Feb 2018 11:49:45 -0500
Subject: [PATCH 12/13] Add files via upload
smp_conf_phy_event: fix file pointer leak;
---
diff --git a/src/smp_conf_phy_event.c b/src/smp_conf_phy_event.c
index b2ad100..70ce4f5 100644
--- a/src/smp_conf_phy_event.c
+++ b/src/smp_conf_phy_event.c
@@ -336,6 +336,7 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
char line[512];
int off = 0;
int in_len, k, j, m, have_stdin, ind, bit0, err;
+ int ret = 0;
char * lcp;
FILE * fp;
unsigned int unum;
@@ -376,7 +377,8 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
if ((k < in_len) && ('#' != lcp[k])) {
fprintf(stderr, "build_joint_arr: syntax error at "
"line %d, pos %d\n", j + 1, m + k + 1);
- return 1;
+ ret = 1;
+ goto fini;
}
for (k = 0; k < 1024; ++k) {
unum = get_unum(lcp, &err);
@@ -386,7 +388,8 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
if (ind >= max_arr_len) {
fprintf(stderr, "build_joint_arr: array length "
"exceeded\n");
- return 1;
+ ret = 1;
+ goto fini;
}
if (bit0)
thres_arr[ind] = unum;
@@ -394,7 +397,8 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
if (unum > 255) {
fprintf(stderr, "build_joint_arr: pes (%u) too "
"large\n", unum);
- return 1;
+ ret = 1;
+ goto fini;
}
pes_arr[ind] = (unsigned char)unum;
}
@@ -412,7 +416,8 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
fprintf(stderr, "build_joint_arr: error in "
"line %d, at pos %d\n", j + 1,
(int)(lcp - line + 1));
- return 1;
+ ret = 1;
+ goto fini;
}
}
off += (k + 1);
@@ -420,10 +425,14 @@ build_joint_arr(const char * file_name, unsigned char * pes_arr,
if (0x1 & off) {
fprintf(stderr, "build_joint_arr: expect LBA,NUM pairs but decoded "
"odd number\n from %s\n", have_stdin ? "stdin" : file_name);
- return 1;
+ ret = 1;
+ goto fini;
}
*arr_len = off >> 1;
- return 0;
+fini:
+ if (! have_stdin)
+ fclose(fp);
+ return ret;
}
static void
--
2.19.1

Binary file not shown.

BIN
smp_utils-0.99.tgz Normal file

Binary file not shown.

View File

@ -1,14 +1,12 @@
Name: smp_utils Name: smp_utils
Version: 0.98 Version: 0.99
Release: 15 Release: 4
Summary: Utilities for SAS management protocol (SMP) Summary: Utilities for SAS management protocol (SMP)
License: BSD License: BSD
URL: http://sg.danny.cz/sg/smp_utils.html URL: http://sg.danny.cz/sg/smp_utils.html
Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tgz Source0: http://sg.danny.cz/sg/p/%{name}-%{version}.tgz
Patch0: 0000-smp_utils-0.98-sysmacros.patch
Patch1: 0001-Add-files-via-upload.patch
BuildRequires: gcc,git BuildRequires: gcc
Provides: %{name}-libs %{name}-libs%{?_isa} Provides: %{name}-libs %{name}-libs%{?_isa}
Obsoletes: %{name}-libs Obsoletes: %{name}-libs
@ -24,7 +22,6 @@ easy to port to other operating systems.
Warning: These utilities access SAS expanders (storage switches) and Warning: These utilities access SAS expanders (storage switches) and
the incorrect usage of them may render your system and others inoperable. the incorrect usage of them may render your system and others inoperable.
%package devel %package devel
Summary: Static library and header files for the smputils library Summary: Static library and header files for the smputils library
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -41,7 +38,7 @@ Requires: man
This package contains the help info for %{name}. This package contains the help info for %{name}.
%prep %prep
%autosetup -n %{name}-%{version} -p1 -Sgit %autosetup -n %{name}-%{version} -p1
%build %build
%configure --disable-static %configure --disable-static
@ -51,13 +48,11 @@ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?smp_mflags} CFLAGS="%{optflags} -DSMP_UTILS_LINUX" make %{?smp_mflags} CFLAGS="%{optflags} -DSMP_UTILS_LINUX"
%install %install
make install \ make install \
PREFIX=%{_prefix} \ PREFIX=%{_prefix} \
DESTDIR=%{buildroot} DESTDIR=%{buildroot}
%files %files
%doc ChangeLog COVERAGE CREDITS README %doc ChangeLog COVERAGE CREDITS README
%license COPYING %license COPYING
@ -72,8 +67,19 @@ make install \
%files help %files help
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Wed Jul 31 2024 JiangJianJun <jiangjianjun3@huawei.com> - 0.99-4
- DESC: fix spec format
* Wed Oct 19 2022 Kunlin Yang <yangkunlin7@huawei.com> - 0.99-3
- rebuild the version to 0.99-3
* Sat Jul 31 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.99-2
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git
* Thu Jul 16 2020 Zhiqiang Liu <liuzhiqiang26@huawei.com> -0.99-1
- update to v0.99 version
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> -0.98-15 * Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> -0.98-15
- rename patches - rename patches

4
smp_utils.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: doug-gilbert/smp_utils
tag_prefix: "release-"
seperator: "."