From 4fce33c92476246e61b5d13c4c171b5b44bb6d3c Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@yoctoproject.org>
Date: Wed, 1 Jan 2025 07:57:40 +0000
Subject: [PATCH] blktool: upgrade 4-7.1 -> 4-8

---
 .../blktool/0001-fix-typos-in-manpage.patch      |  8 ++------
 .../blktool/blktool/0002-fix-string-error.patch  |  8 ++------
 ...ument-for-BLKROSET-it-must-be-const-int.patch |  8 ++------
 .../blktool/0004-fix-ftbfs-glibc-2.28.patch      | 16 +++++++++++++---
 .../blktool/{blktool_4-7.1.bb => blktool_4-8.bb} |  1 +
 5 files changed, 20 insertions(+), 21 deletions(-)
 rename meta/recipes-extended/blktool/{blktool_4-7.1.bb => blktool_4-8.bb} (94%)

diff --git a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
index 25a2fabe15..4bd2aeb535 100644
--- a/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
+++ b/meta/recipes-extended/blktool/blktool/0001-fix-typos-in-manpage.patch
@@ -1,14 +1,13 @@
-From 9cb1667f9d3a9bcfc3b83466cd8d3b79f0554ff0 Mon Sep 17 00:00:00 2001
+From ad64135ef4df5d1ad8b0d43b57c7655088a53dbe Mon Sep 17 00:00:00 2001
 From: Azat Khuzhin <a3at.mail@gmail.com>
 Date: Wed, 8 Jul 2015 01:37:09 +0300
-Subject: [PATCH 1/3] fix typos in manpage
+Subject: [PATCH] fix typos in manpage
 
 This patch is taken from
 ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
 ---
  blktool.8 | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
@@ -35,6 +34,3 @@ index a1f5c96..45b7724 100644
  
  .TP
  .B multiple-count
--- 
-2.1.4
-
diff --git a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
index 401e41e3ed..418d91dcaa 100644
--- a/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
+++ b/meta/recipes-extended/blktool/blktool/0002-fix-string-error.patch
@@ -1,14 +1,13 @@
-From ddb1071da2c78d8155aab62e9f0d46f69500200f Mon Sep 17 00:00:00 2001
+From 93f773ce627bfa36c4f6b0584c494ace07cebbd1 Mon Sep 17 00:00:00 2001
 From: Azat Khuzhin <a3at.mail@gmail.com>
 Date: Wed, 8 Jul 2015 01:42:24 +0300
-Subject: [PATCH 2/3] fix string error
+Subject: [PATCH] fix string error
 
 This patch is taken from
 ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
 ---
  util.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
@@ -26,6 +25,3 @@ index 1f3a9ca..2ccf56a 100644
  	if (blkdev >= 0)
  		close(blkdev);
  	exit(1);
--- 
-2.1.4
-
diff --git a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
index d1f1e797fe..4f11c1f98a 100644
--- a/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
+++ b/meta/recipes-extended/blktool/blktool/0003-Fix-3-d-argument-for-BLKROSET-it-must-be-const-int.patch
@@ -1,7 +1,7 @@
-From 68faa63aaad81f4a289e4a03173ab4cf798deb53 Mon Sep 17 00:00:00 2001
+From e91edf28a5afa98de8b420430bf80e3e741060f4 Mon Sep 17 00:00:00 2001
 From: Azat Khuzhin <a3at.mail@gmail.com>
 Date: Sat, 1 Nov 2014 22:24:32 +0300
-Subject: [PATCH 3/3] Fix 3-d argument for BLKROSET it must be 'const int *'
+Subject: [PATCH] Fix 3-d argument for BLKROSET it must be 'const int *'
 
 Most of *SET ioctls have int type for 3-d argument, except BLKROSET.
 So add bc_arg_type enum, build it into bool_comand and install arg_type
@@ -15,7 +15,6 @@ ftp://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
 ---
  blktool.c | 11 +++++++++--
  blktool.h |  7 +++++++
@@ -73,6 +72,3 @@ index fce4387..85add83 100644
  };
  
  struct class_operations {
--- 
-2.1.4
-
diff --git a/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch
index 65bca65100..8c2eae3747 100644
--- a/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch
+++ b/meta/recipes-extended/blktool/blktool/0004-fix-ftbfs-glibc-2.28.patch
@@ -1,5 +1,9 @@
+From bb7bb94f87b2266a3d76b320094d023b8fe46cde Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@debian.org>
+Date: Wed, 27 Mar 2019 15:09:17 +0100
+Subject: [PATCH] blktool: update to 4-7.1
+
 Description: Fix FTBFS with glibc 2.28
-Author: Adrian Bunk <bunk@debian.org>
 Bug-Debian: https://bugs.debian.org/917055
 
 This patch is taken from
@@ -7,8 +11,14 @@ http://ftp.debian.org/debian/pool/main/b/blktool/blktool_4-7.1.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
 Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---- blktool-4.orig/blktool.c
-+++ blktool-4/blktool.c
+---
+ blktool.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/blktool.c b/blktool.c
+index 221a195..3d450ab 100644
+--- a/blktool.c
++++ b/blktool.c
 @@ -18,6 +18,7 @@
  #include <unistd.h>
  #include <sys/stat.h>
diff --git a/meta/recipes-extended/blktool/blktool_4-7.1.bb b/meta/recipes-extended/blktool/blktool_4-8.bb
similarity index 94%
rename from meta/recipes-extended/blktool/blktool_4-7.1.bb
rename to meta/recipes-extended/blktool/blktool_4-8.bb
index bb44befb56..12080e6442 100644
--- a/meta/recipes-extended/blktool/blktool_4-7.1.bb
+++ b/meta/recipes-extended/blktool/blktool_4-8.bb
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 
 DEPENDS = "glib-2.0"
 
+SRC_URI[sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
 SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/${BPN}/${BPN}_4.orig.tar.gz;name=tarball \
            file://0001-fix-typos-in-manpage.patch \
            file://0002-fix-string-error.patch \
-- 
2.44.1

