Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
b893aa83b0
!52 Updated guid.cc to deal with minor change in libuuid
From: @lv_1245 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-12-19 11:09:46 +00:00
lvyy
3717ce89da Updated guid.cc to deal with minor change in libuuid 2024-12-19 01:46:56 +00:00
openeuler-ci-bot
0196474eca
!40 [sync] PR-37: fix problem that caused sgdisk to crash when using the latest popt
From: @openeuler-sync-bot 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-09-27 01:14:24 +00:00
lvyy
a4ea04f9f6 fix problem that caused sgdisk to crash when using the latest popt
(cherry picked from commit ad4252e20ef67219cdb2abbf5e9a65717747da45)
2024-09-26 11:12:32 +08:00
openeuler-ci-bot
c1bcdec584
!30 update to gptfdisk-1.0.9
From: @twicy 
Reviewed-by: @swf504, @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-12-14 03:32:35 +00:00
tangyuchen
6be9011d4c update to gptfdisk-1.0.9
Signed-off-by: tangyuchen <tangyuchen5@huawei.com>
2022-12-08 17:30:45 +08:00
openeuler-ci-bot
47da5e6fc5
!28 [sync] PR-27: Remove stray debugging code
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-10-29 09:06:13 +00:00
wangzhiqiang
aab81caacb remove stray debugging code
(cherry picked from commit 3f5441bd773a6d63e4594c25733d56e5f9539c6f)
2022-10-29 16:39:12 +08:00
openeuler-ci-bot
5c4382fadb
!26 [sync] PR-24: Fix compiler error for option -Werror=format-security
From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-03-10 06:27:49 +00:00
Qwei
d64ed2a346 Fix compiler error for option -Werror=format-security
After ncurses upgrade to 6.3, it introduces a format-security
compile error.
To fix it, a format literal string is added.

Reference: https://gitee.com/src-openeuler/gcc/issues/I4W7ZB

Signed-off-by: Qwei <qiang.wei@suse.com>
(cherry picked from commit 8f28c7fb9a82913fd4406df3fa87d47964428195)
2022-03-10 14:15:54 +08:00
6 changed files with 119 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d Mon Sep 17 00:00:00 2001
From: Rod Smith <rodsmith@rodsbooks.com>
Date: Fri, 15 Apr 2022 18:10:14 -0400
Subject: [PATCH] Fix failure & crash of sgdisk when compiled with latest popt
(commit 740; presumably eventually release 1.19)
Conflict:no
Reference:https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d
---
gptcl.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gptcl.cc b/gptcl.cc
index 34c9421..0d578eb 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = (char*) poptGetArg(poptCon);
+ device = strdup((char*) poptGetArg(poptCon));
poptResetContext(poptCon);
if (device != NULL) {
--
2.33.0

View File

@ -0,0 +1,43 @@
From f5de3401b974ce103ffd93af8f9d43505a04aaf9 Mon Sep 17 00:00:00 2001
From: Damian Kurek <starfire24680@gmail.com>
Date: Thu, 7 Jul 2022 03:39:16 +0000
Subject: [PATCH] Fix NULL dereference when duplicating string argument
poptGetArg can return NULL if there are no additional arguments, which
makes strdup dereference NULL on strlen
Conflict:no
Reference:https://sourceforge.net/p/gptfdisk/code/ci/f5de3401b974ce103ffd93af8f9d43505a04aaf9
---
gptcl.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gptcl.cc b/gptcl.cc
index 0d578eb..ab95239 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = strdup((char*) poptGetArg(poptCon));
- poptResetContext(poptCon);
+ device = (char*) poptGetArg(poptCon);
if (device != NULL) {
+ device = strdup(device);
+ poptResetContext(poptCon);
JustLooking(); // reset as necessary
BeQuiet(); // Tell called functions to be less verbose & interactive
if (LoadPartitions((string) device)) {
@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
cerr << "Error encountered; not saving changes.\n";
retval = 4;
} // if
+ free(device);
} // if (device != NULL)
poptFreeContext(poptCon);
return retval;
--
2.33.0

View File

@ -0,0 +1,27 @@
From 6a8416cbd12d55f882bb751993b94f72d338d96f Mon Sep 17 00:00:00 2001
From: Rod Smith <rodsmith@rodsbooks.com>
Date: Sat, 16 Apr 2022 09:32:04 -0400
Subject: [PATCH] Updated guid.cc to deal with minor change in libuuid
Conflict:Delete modifications to NEWS.
Reference:https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f
---
guid.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/guid.cc b/guid.cc
index 1e73ab7..d3e4fd5 100644
--- a/guid.cc
+++ b/guid.cc
@@ -141,7 +141,7 @@ void GUIDData::Zero(void) {
void GUIDData::Randomize(void) {
int i, uuidGenerated = 0;
-#ifdef _UUID_UUID_H
+#if defined (_UUID_UUID_H) || defined (_UL_LIBUUID_UUID_H)
uuid_generate(uuidData);
ReverseBytes(&uuidData[0], 4);
ReverseBytes(&uuidData[4], 2);
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: gdisk
Version: 1.0.8
Release: 1
Version: 1.0.9
Release: 3
Summary: GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools
License: GPLv2
URL: http://www.rodsbooks.com/gdisk
@ -8,6 +8,10 @@ Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz
BuildRequires:ncurses-devel util-linux-devel gcc-c++ popt-devel
Patch0001: 0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch
Patch0002: 0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch
Patch0003: 0003-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch
%description
GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools.
rather than on the older MBR partition tables.
@ -48,6 +52,21 @@ install -Dp -m 0644 fixparts.8 %{buildroot}%{_mandir}/man8/fixparts.8
%{_mandir}/man8/*
%changelog
* Thu Dec 19 2024 lvyy <lyunmail@163.com> - 1.0.9-3
- Updated guid.cc to deal with minor change in libuuid
* Tue Sep 24 2024 lvyy <lyunmail@163.com> - 1.0.9-2
- DESC: fix problem that caused sgdisk to crash when using the latest popt
* Thu Dec 8 2022 tangyuchen <tangyuchen5@huawei.com> - 1.0.9-1
- update to gptfdisk-1.0.9
* Sat Oct 29 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 1.0.8-3
- remove stray debugging code
* Tue Mar 8 02:11:35 UTC 2022 - Qiang Wei <qiang.wei@suse.com> - 1.0.8-2
- Fix compiler error for option -Werror=format-security
* Wed Nov 17 2021 Wenchao Hao <haowenchao@huawei.com> - 1.0.8-1
- update to gptfdisk-1.0.8

Binary file not shown.

BIN
gptfdisk-1.0.9.tar.gz Normal file

Binary file not shown.