popt: update 1.18 -> 1.19

Patch is merged upstream.

License-update: clarification
dcec86df3c

Backport a regression fix for gptfdisk.

(From OE-Core rev: 262aa17e0eeac5274298ec9a938e5353094b8fa5)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2022-11-20 14:31:21 +01:00
committed by Richard Purdie
parent af0d4a2c43
commit e3f65282c9
4 changed files with 65 additions and 75 deletions

View File

@@ -0,0 +1,59 @@
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)
Upstream-Status: Backport [https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
NEWS | 8 ++++++++
gptcl.cc | 2 +-
support.h | 2 +-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index c7add56..9e153fd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+1.0.10 (?/??/2022):
+-------------------
+
+- Fixed problem that caused sgdisk to crash with errors about being unable
+ to read the disk's partition table when compiled with the latest popt
+ (commit 740, which is pre-release as I type; presumably version 1.19 and
+ later once released).
+
1.0.9 (4/14/2022):
------------------
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) {
diff --git a/support.h b/support.h
index 8ba9ad1..f91f1bc 100644
--- a/support.h
+++ b/support.h
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string>
-#define GPTFDISK_VERSION "1.0.9"
+#define GPTFDISK_VERSION "1.0.9.1"
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64
--
2.30.2

View File

@@ -10,6 +10,7 @@ DEPENDS = "util-linux"
SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz \
file://0001-gptcurses-correctly-include-curses.h.patch \
file://0001-Updated-guid.cc-to-deal-with-minor-change-in-libuuid.patch \
file://0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch \
"
SRC_URI[sha256sum] = "dafead2693faeb8e8b97832b23407f6ed5b3219bc1784f482dd855774e2d50c2"

View File

@@ -1,68 +0,0 @@
From 330b77081c3a4c7ae76cb08602db385b40fa7ff7 Mon Sep 17 00:00:00 2001
From: Simone Weiss <simone.weiss@elektrobit.com>
Date: Mon, 13 Dec 2021 09:29:53 +0000
Subject: [PATCH] popt test output format for ptest
patch test output format to match simple-test as it is used in ptests.
Upstream-Status: Pending
Signed-off-by: Simone Weiss <simone.weiss@elektrobit.com>
Signed-off-by: David Niederpruem <david.niederpruem@elektrobit.com>
---
tests/testit.sh | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/tests/testit.sh b/tests/testit.sh
index 2a7b4aa..50b42e2 100755
--- a/tests/testit.sh
+++ b/tests/testit.sh
@@ -5,12 +5,11 @@ run() {
name=$1; shift
answer=$1; shift
- echo Running test $name.
-
result=`HOME=$builddir $builddir/$prog $*`
if [ "$answer" != "$result" ]; then
- echo "Test \"$prog $*\" failed with: \"$result\" != \"$answer\" "
- exit 2
+ echo "FAIL: $name"
+ else
+ echo "PASS: $name"
fi
}
@@ -23,17 +22,17 @@ run_diff() {
out=$builddir/tmp.out
diff_file=$builddir/tmp.diff
- echo Running test $name.
-
$builddir/$prog $in_file > $out
ret=$?
diff $out $answer_file > $diff_file
diff_ret=$?
if [ "$diff_ret" != "0" ]; then
- echo "Test \"$name\" failed output is in $out, diff is:"
- cat $diff_file
- exit 2
+ echo "FAIL: $name"
+ echo "diff is:"
+ cat $diff_file
+ else
+ echo "PASS: $name"
fi
rm $out $diff_file
}
@@ -174,6 +173,3 @@ Help options:
#run_diff test3 "test3 - 51" test3-data/01.input test3-data/01.answer
#run_diff test3 "test3 - 52" test3-data/02.input test3-data/02.answer
#run_diff test3 "test3 - 53" test3-data/03.input test3-data/03.answer
-
-echo ""
-echo "Passed."
--
2.17.1

View File

@@ -4,16 +4,14 @@ HOMEPAGE = "https://www.rpm.org/"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
LIC_FILES_CHKSUM = "file://COPYING;md5=e0206ac9471d06667e076212db20c5f4"
DEPENDS = "virtual/libiconv"
SRC_URI = "\
http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz \
file://0001-popt-test-output-format-for-ptest.patch \
file://run-ptest \
"
SRC_URI[sha256sum] = "5159bc03a20b28ce363aa96765f37df99ea4d8850b1ece17d1e6ad5c24fdc5d1"
SRC_URI = "http://ftp.rpm.org/popt/releases/popt-1.x/${BP}.tar.gz \
file://run-ptest \
"
SRC_URI[sha256sum] = "c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9"
inherit autotools gettext ptest