Skip to contentSkip to conversation

package/libblockdev: bump to version 3.1.0

PATCH Applied Giulio Benetti 2 participants 3 messages Jan 22, 2024 – Feb 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/libblockdev: bump to version 3.1.0

* Rework strerror_l() patch by declaring it only in utils.h as a macro
* select BR2_PACKAGE_UTIL_LINUX_LIBUUID since it's now mandatory

---
V1->V2:
* reworked local strerror_l() patch as a macro to avoid adding a second patch
* selected BR2_PACKAGE_UTIL_LINUX_LIBUUID by default

---
 ...-replacement-function-for-strerror_l.patch | 160 ++++--------------
 package/libblockdev/Config.in                 |   5 +-
 package/libblockdev/libblockdev.hash          |   2 +-
 package/libblockdev/libblockdev.mk            |   2 +-
 4 files changed, 35 insertions(+), 134 deletions(-)
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +31 -129
index 987d28f82e..e5819a4e9c 100644
@@ -1,29 +1,25 @@
-From 2acf5a8d4858035396ee45d96c824e0481644d36 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-Date: Sat, 29 Aug 2020 16:04:15 +0200
+From 01883cc14904e55d90955ad7cd9fc55bc18364ac Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Sat, 20 Jan 2024 13:29:28 +0100
 Subject: [PATCH] Provide replacement function for strerror_l()
 
 strerror_l() is not implemented in some C libraries, such as uClibc,
-so let's provide a simple replacement function that falls back on
-strerror().
+so let's provide a simple replacement define that falls back on
+strerror() in utils.h header and include it where missing.
 
-Upstream status: Not Applicable since it's due uclibc only
+Upstream: N/A since it's due uclibc only
 
 Signed-off-by: Thomas Petazzoni <[email protected]>
 Signed-off-by: Giulio Benetti <[email protected]>
-[Giulio: ported to version 3.0+]
+[Giulio: ported to version 3.0 and 3.1]
 ---
- configure.ac                    | 2 ++
- src/plugins/crypto.c            | 7 +++++++
- src/plugins/nvme/nvme-error.c   | 8 ++++++++
- src/plugins/nvme/nvme-fabrics.c | 8 ++++++++
- src/plugins/nvme/nvme-op.c      | 8 ++++++++
- src/plugins/part.c              | 9 +++++++++
- src/utils/module.c              | 8 +++++++-
- 7 files changed, 49 insertions(+), 1 deletion(-)
+ configure.ac       | 2 ++
+ src/utils/module.c | 1 +
+ src/utils/utils.h  | 4 ++++
+ 3 files changed, 7 insertions(+)
 
 diff --git a/configure.ac b/configure.ac
-index 0a8ce4a7..dfbddb39 100644
+index 02b26e3e..67341134 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -120,6 +120,8 @@ AC_CHECK_HEADERS([dlfcn.h string.h unistd.h sys/fcntl.h sys/ioctl.h linux/random
@@ -35,127 +31,33 @@ index 0a8ce4a7..dfbddb39 100644
  AC_ARG_WITH([escrow],
      AS_HELP_STRING([--with-escrow], [support escrow @<:@default=yes@:>@]),
      [],
-diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
-index c5f719ca..b2ae3f56 100644
---- a/src/plugins/crypto.c
-+++ b/src/plugins/crypto.c
-@@ -62,6 +62,13 @@
- 
- #define UNUSED __attribute__((unused))
- 
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: crypto
-  * @short_description: plugin for operations with encrypted devices
-diff --git a/src/plugins/nvme/nvme-error.c b/src/plugins/nvme/nvme-error.c
-index 4bd4d771..618b6aef 100644
---- a/src/plugins/nvme/nvme-error.c
-+++ b/src/plugins/nvme/nvme-error.c
-@@ -34,6 +34,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
- 
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
- 
- /**
-  * bd_nvme_error_quark: (skip)
-diff --git a/src/plugins/nvme/nvme-fabrics.c b/src/plugins/nvme/nvme-fabrics.c
-index 1877845f..5fcbeddc 100644
---- a/src/plugins/nvme/nvme-fabrics.c
-+++ b/src/plugins/nvme/nvme-fabrics.c
-@@ -36,6 +36,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
- 
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
- 
- /* nvme-cli defaults */
- #define PATH_NVMF_CONFIG  "/etc/nvme/config.json"
-diff --git a/src/plugins/nvme/nvme-op.c b/src/plugins/nvme/nvme-op.c
-index dbef4f3a..7bafd7a3 100644
---- a/src/plugins/nvme/nvme-op.c
-+++ b/src/plugins/nvme/nvme-op.c
-@@ -35,6 +35,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
- 
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
- 
- /**
-  * bd_nvme_device_self_test:
-diff --git a/src/plugins/part.c b/src/plugins/part.c
-index 46d31137..6234e013 100644
---- a/src/plugins/part.c
-+++ b/src/plugins/part.c
-@@ -26,6 +26,15 @@
- 
- #include "part.h"
- 
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: part
-  * @short_description: plugin for operations with partition tables
 diff --git a/src/utils/module.c b/src/utils/module.c
-index 6557c3ab..69dd4731 100644
+index 6557c3ab..5893f0ac 100644
 --- a/src/utils/module.c
 +++ b/src/utils/module.c
-@@ -74,6 +74,13 @@ static void set_kmod_logging (struct kmod_ctx *ctx) {
-     kmod_set_log_fn (ctx, utils_kmod_log_redirect, NULL);
- }
+@@ -28,6 +28,7 @@
+ #include "module.h"
+ #include "exec.h"
+ #include "logging.h"
++#include "utils.h"
+ 
+ #define UNUSED __attribute__((unused))
+ 
+diff --git a/src/utils/utils.h b/src/utils/utils.h
+index 801a8b6e..b2bdf0d0 100644
+--- a/src/utils/utils.h
++++ b/src/utils/utils.h
+@@ -9,6 +9,10 @@
+ #include "dbus.h"
+ #include "logging.h"
  
 +#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
++#define strerror_l(errnum, locale)      strerror(errnum)
 +#endif
 +
  /**
-  * bd_utils_have_kernel_module:
-  * @module_name: name of the kernel module to check
-@@ -259,7 +266,6 @@ gboolean bd_utils_unload_kernel_module (const gchar *module_name, GError **error
-     return TRUE;
- }
- 
--
- static BDUtilsLinuxVersion detected_linux_ver;
- static gboolean have_linux_ver = FALSE;
- 
+  * SECTION: utils
+  * @short_description: library providing utility functions used by the blockdev library and its plugins
 -- 
 2.34.1
 
package/libblockdev/Config.in +2 -3
index 527ba79e4e..e0449628b4 100644
@@ -8,6 +8,8 @@ config BR2_PACKAGE_LIBBLOCKDEV
 	depends on BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_KMOD
 	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	help
 	  libblockdev is a C library supporting GObject introspection
 	  for manipulation of block devices. It has a plugin-based
@@ -30,7 +32,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
 config BR2_PACKAGE_LIBBLOCKDEV_FS
 	bool "filesystem"
 	depends on BR2_ENABLE_LOCALE # parted
-	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
 	select BR2_PACKAGE_PARTED
 	select BR2_PACKAGE_E2FSPROGS
@@ -62,7 +63,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_PART
 	bool "part"
 	depends on BR2_ENABLE_LOCALE # parted
 	select BR2_PACKAGE_PARTED
-	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
 
 comment "part plugin needs a toolchain w/ locale"
@@ -70,7 +70,6 @@ comment "part plugin needs a toolchain w/ locale"
 
 config BR2_PACKAGE_LIBBLOCKDEV_SWAP
 	bool "swap"
-	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 
 endif
package/libblockdev/libblockdev.hash +1 -1
index 5f9a8a7e6c..79700a4996 100644
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  49841ff92db0ab032931e6f2b5eab63e5969b0ddc14b067b60e46a6eb6c60e47  libblockdev-3.0.4.tar.gz
+sha256  41e4af66c9d78e795302d37825dfd88a4970f82da7b4ebe6487feba2afae44fb  libblockdev-3.1.0.tar.gz
 sha256  97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946  LICENSE
package/libblockdev/libblockdev.mk +1 -1
index e0fca2b95c..ebf01acfb5 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBBLOCKDEV_VERSION = 3.0.4
+LIBBLOCKDEV_VERSION = 3.1.0
 LIBBLOCKDEV_SITE = https://github.com/storaged-project/libblockdev/releases/download/$(LIBBLOCKDEV_VERSION)-1
 LIBBLOCKDEV_LICENSE = LGPL-2.1
 LIBBLOCKDEV_LICENSE_FILES = LICENSE
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 20 lines · Giulio Benetti

* Rework strerror_l() patch by declaring it only in utils.h as a macro
* select BR2_PACKAGE_UTIL_LINUX_LIBUUID since it's now mandatory

---
V1->V2:
* reworked local strerror_l() patch as a macro to avoid adding a second patch
* selected BR2_PACKAGE_UTIL_LINUX_LIBUUID by default

---
  ...-replacement-function-for-strerror_l.patch | 160 ++++--------------
  package/libblockdev/Config.in                 |   5 +-
  package/libblockdev/libblockdev.hash          |   2 +-
  package/libblockdev/libblockdev.mk            |   2 +-
  4 files changed, 35 insertions(+), 134 deletions(-)
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -0
index 987d28f82e..e5819a4e9c 100644

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch line 2

Quoted 5 lines
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +2 -3
@@ -1,29 +1,25 @@
-From 2acf5a8d4858035396ee45d96c824e0481644d36 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-Date: Sat, 29 Aug 2020 16:04:15 +0200
+From 01883cc14904e55d90955ad7cd9fc55bc18364ac Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>

You really should have kept Thomas as the author.

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch line 10

Quoted 11 lines
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +4 -3
+Date: Sat, 20 Jan 2024 13:29:28 +0100
  Subject: [PATCH] Provide replacement function for strerror_l()
 
  strerror_l() is not implemented in some C libraries, such as uClibc,
-so let's provide a simple replacement function that falls back on
-strerror().
+so let's provide a simple replacement define that falls back on
+strerror() in utils.h header and include it where missing.
 
-Upstream status: Not Applicable since it's due uclibc only
+Upstream: N/A since it's due uclibc only

This fixes check-package, so it must be removed from .checkpackageignore.

Applied to master with those two fixed, thanks.

Regards,
Arnout

Quoted 223 lines
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +25 -123
  Signed-off-by: Thomas Petazzoni <[email protected]>
  Signed-off-by: Giulio Benetti <[email protected]>
-[Giulio: ported to version 3.0+]
+[Giulio: ported to version 3.0 and 3.1]
  ---
- configure.ac                    | 2 ++
- src/plugins/crypto.c            | 7 +++++++
- src/plugins/nvme/nvme-error.c   | 8 ++++++++
- src/plugins/nvme/nvme-fabrics.c | 8 ++++++++
- src/plugins/nvme/nvme-op.c      | 8 ++++++++
- src/plugins/part.c              | 9 +++++++++
- src/utils/module.c              | 8 +++++++-
- 7 files changed, 49 insertions(+), 1 deletion(-)
+ configure.ac       | 2 ++
+ src/utils/module.c | 1 +
+ src/utils/utils.h  | 4 ++++
+ 3 files changed, 7 insertions(+)
 
  diff --git a/configure.ac b/configure.ac
-index 0a8ce4a7..dfbddb39 100644
+index 02b26e3e..67341134 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -120,6 +120,8 @@ AC_CHECK_HEADERS([dlfcn.h string.h unistd.h sys/fcntl.h sys/ioctl.h linux/random
@@ -35,127 +31,33 @@ index 0a8ce4a7..dfbddb39 100644
   AC_ARG_WITH([escrow],
       AS_HELP_STRING([--with-escrow], [support escrow @<:@default=yes@:>@]),
       [],
-diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
-index c5f719ca..b2ae3f56 100644
---- a/src/plugins/crypto.c
-+++ b/src/plugins/crypto.c
-@@ -62,6 +62,13 @@
-
- #define UNUSED __attribute__((unused))
-
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: crypto
-  * @short_description: plugin for operations with encrypted devices
-diff --git a/src/plugins/nvme/nvme-error.c b/src/plugins/nvme/nvme-error.c
-index 4bd4d771..618b6aef 100644
---- a/src/plugins/nvme/nvme-error.c
-+++ b/src/plugins/nvme/nvme-error.c
-@@ -34,6 +34,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /**
-  * bd_nvme_error_quark: (skip)
-diff --git a/src/plugins/nvme/nvme-fabrics.c b/src/plugins/nvme/nvme-fabrics.c
-index 1877845f..5fcbeddc 100644
---- a/src/plugins/nvme/nvme-fabrics.c
-+++ b/src/plugins/nvme/nvme-fabrics.c
-@@ -36,6 +36,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /* nvme-cli defaults */
- #define PATH_NVMF_CONFIG  "/etc/nvme/config.json"
-diff --git a/src/plugins/nvme/nvme-op.c b/src/plugins/nvme/nvme-op.c
-index dbef4f3a..7bafd7a3 100644
---- a/src/plugins/nvme/nvme-op.c
-+++ b/src/plugins/nvme/nvme-op.c
-@@ -35,6 +35,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /**
-  * bd_nvme_device_self_test:
-diff --git a/src/plugins/part.c b/src/plugins/part.c
-index 46d31137..6234e013 100644
---- a/src/plugins/part.c
-+++ b/src/plugins/part.c
-@@ -26,6 +26,15 @@
-
- #include "part.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: part
-  * @short_description: plugin for operations with partition tables
  diff --git a/src/utils/module.c b/src/utils/module.c
-index 6557c3ab..69dd4731 100644
+index 6557c3ab..5893f0ac 100644
  --- a/src/utils/module.c
  +++ b/src/utils/module.c
-@@ -74,6 +74,13 @@ static void set_kmod_logging (struct kmod_ctx *ctx) {
-     kmod_set_log_fn (ctx, utils_kmod_log_redirect, NULL);
- }
+@@ -28,6 +28,7 @@
+ #include "module.h"
+ #include "exec.h"
+ #include "logging.h"
++#include "utils.h"
+
+ #define UNUSED __attribute__((unused))
+
+diff --git a/src/utils/utils.h b/src/utils/utils.h
+index 801a8b6e..b2bdf0d0 100644
+--- a/src/utils/utils.h
++++ b/src/utils/utils.h
+@@ -9,6 +9,10 @@
+ #include "dbus.h"
+ #include "logging.h"
 
  +#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+	return strerror(errnum);
-+}
++#define strerror_l(errnum, locale)      strerror(errnum)
  +#endif
  +
   /**
-  * bd_utils_have_kernel_module:
-  * @module_name: name of the kernel module to check
-@@ -259,7 +266,6 @@ gboolean bd_utils_unload_kernel_module (const gchar *module_name, GError **error
-     return TRUE;
- }
-
--
- static BDUtilsLinuxVersion detected_linux_ver;
- static gboolean have_linux_ver = FALSE;
-
+  * SECTION: utils
+  * @short_description: library providing utility functions used by the blockdev library and its plugins
  --
  2.34.1
 
package/libblockdev/Config.in +2 -3
index 527ba79e4e..e0449628b4 100644
@@ -8,6 +8,8 @@ config BR2_PACKAGE_LIBBLOCKDEV
  	depends on BR2_ENABLE_LOCALE
  	select BR2_PACKAGE_KMOD
  	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
  	help
  	  libblockdev is a C library supporting GObject introspection
  	  for manipulation of block devices. It has a plugin-based
@@ -30,7 +32,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO
  config BR2_PACKAGE_LIBBLOCKDEV_FS
  	bool "filesystem"
  	depends on BR2_ENABLE_LOCALE # parted
-	select BR2_PACKAGE_UTIL_LINUX
  	select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
  	select BR2_PACKAGE_PARTED
  	select BR2_PACKAGE_E2FSPROGS
@@ -62,7 +63,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_PART
  	bool "part"
  	depends on BR2_ENABLE_LOCALE # parted
  	select BR2_PACKAGE_PARTED
-	select BR2_PACKAGE_UTIL_LINUX
  	select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
 
  comment "part plugin needs a toolchain w/ locale"
@@ -70,7 +70,6 @@ comment "part plugin needs a toolchain w/ locale"
 
  config BR2_PACKAGE_LIBBLOCKDEV_SWAP
  	bool "swap"
-	select BR2_PACKAGE_UTIL_LINUX
  	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 
  endif
package/libblockdev/libblockdev.hash +1 -1
index 5f9a8a7e6c..79700a4996 100644
@@ -1,3 +1,3 @@
  # Locally calculated
-sha256  49841ff92db0ab032931e6f2b5eab63e5969b0ddc14b067b60e46a6eb6c60e47  libblockdev-3.0.4.tar.gz
+sha256  41e4af66c9d78e795302d37825dfd88a4970f82da7b4ebe6487feba2afae44fb  libblockdev-3.1.0.tar.gz
  sha256  97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946  LICENSE
package/libblockdev/libblockdev.mk +0 -0
index e0fca2b95c..ebf01acfb5 100644

package/libblockdev/libblockdev.mk line 10

Quoted 8 lines
package/libblockdev/libblockdev.mk +1 -1
@@ -4,7 +4,7 @@
  #
  ################################################################################
 
-LIBBLOCKDEV_VERSION = 3.0.4
+LIBBLOCKDEV_VERSION = 3.1.0
  LIBBLOCKDEV_SITE = https://github.com/storaged-project/libblockdev/releases/download/$(LIBBLOCKDEV_VERSION)-1
  LIBBLOCKDEV_LICENSE = LGPL-2.1
  LIBBLOCKDEV_LICENSE_FILES = LICENSE

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 18 lines · Arnout Vandecappelle via buildroot
Quoted 15 lines · Giulio Benetti

* Rework strerror_l() patch by declaring it only in utils.h as a macro
* select BR2_PACKAGE_UTIL_LINUX_LIBUUID since it's now mandatory

---
V1->V2:
* reworked local strerror_l() patch as a macro to avoid adding a second patch
* selected BR2_PACKAGE_UTIL_LINUX_LIBUUID by default
---
  ...-replacement-function-for-strerror_l.patch | 160 ++++-------------- package/libblockdev/Config.in                 |   5 +- package/libblockdev/libblockdev.hash          |   2 +- package/libblockdev/libblockdev.mk            |   2 +-

  4 files changed, 35 insertions(+), 134 deletions(-)
Quoted 14 lines

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch line 2

Quoted 12 lines
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -1
index 987d28f82e..e5819a4e9c 100644
--- 

a/package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch
+++
b/package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +2 -3
@@ -1,29 +1,25 @@
-From 2acf5a8d4858035396ee45d96c824e0481644d36 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <[email protected]>
-Date: Sat, 29 Aug 2020 16:04:15 +0200
+From 01883cc14904e55d90955ad7cd9fc55bc18364ac Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>

 You really should have kept Thomas as the author.

Ah yes, I've messed up a bit,

Quoted 12 lines

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch line 10

Quoted 10 lines
package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +4 -3
+Date: Sat, 20 Jan 2024 13:29:28 +0100
   Subject: [PATCH] Provide replacement function for strerror_l()
   strerror_l() is not implemented in some C libraries, such as uClibc,
-so let's provide a simple replacement function that falls back on
-strerror().
+so let's provide a simple replacement define that falls back on
+strerror() in utils.h header and include it where missing.
-Upstream status: Not Applicable since it's due uclibc only
+Upstream: N/A since it's due uclibc only

 This fixes check-package, so it must be removed from .checkpackageignore.

Thank you, this is new to me. I'll take care on next patches.

Thank you for reviewing!

Best regards

Signature · 2 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
Quoted 232 lines

 Applied to master with those two fixed, thanks.

 Regards,
 Arnout

Quoted 225 lines

-[Giulio: ported to version 3.0+] +[Giulio: ported to version 3.0 and 3.1]
  ---
- configure.ac                    | 2 ++
- src/plugins/crypto.c            | 7 +++++++
- src/plugins/nvme/nvme-error.c   | 8 ++++++++
- src/plugins/nvme/nvme-fabrics.c | 8 ++++++++
- src/plugins/nvme/nvme-op.c      | 8 ++++++++
- src/plugins/part.c              | 9 +++++++++
- src/utils/module.c              | 8 +++++++-
- 7 files changed, 49 insertions(+), 1 deletion(-)
+ configure.ac       | 2 ++
+ src/utils/module.c | 1 +
+ src/utils/utils.h  | 4 ++++
+ 3 files changed, 7 insertions(+)
  diff --git a/configure.ac b/configure.ac

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +1 -1
-index 0a8ce4a7..dfbddb39 100644
+index 02b26e3e..67341134 100644

  --- a/configure.ac
  +++ b/configure.ac
  @@ -120,6 +120,8 @@ AC_CHECK_HEADERS([dlfcn.h string.h unistd.h sys/fcntl.h sys/ioctl.h linux/random

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -0
@@ -35,127 +31,33 @@ index 0a8ce4a7..dfbddb39 100644
    AC_ARG_WITH([escrow],

       AS_HELP_STRING([--with-escrow], [support escrow @<:@default=yes@:>@]),
       [],

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -19
-diff --git a/src/plugins/crypto.c b/src/plugins/crypto.c
-index c5f719ca..b2ae3f56 100644
---- a/src/plugins/crypto.c
-+++ b/src/plugins/crypto.c
-@@ -62,6 +62,13 @@
-
- #define UNUSED __attribute__((unused))
-
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: crypto
-  * @short_description: plugin for operations with encrypted devices
-diff --git a/src/plugins/nvme/nvme-error.c 

b/src/plugins/nvme/nvme-error.c

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -19
-index 4bd4d771..618b6aef 100644
---- a/src/plugins/nvme/nvme-error.c
-+++ b/src/plugins/nvme/nvme-error.c
-@@ -34,6 +34,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /**
-  * bd_nvme_error_quark: (skip)
-diff --git a/src/plugins/nvme/nvme-fabrics.c 

b/src/plugins/nvme/nvme-fabrics.c

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +0 -57
-index 1877845f..5fcbeddc 100644
---- a/src/plugins/nvme/nvme-fabrics.c
-+++ b/src/plugins/nvme/nvme-fabrics.c
-@@ -36,6 +36,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /* nvme-cli defaults */
- #define PATH_NVMF_CONFIG  "/etc/nvme/config.json"
-diff --git a/src/plugins/nvme/nvme-op.c b/src/plugins/nvme/nvme-op.c
-index dbef4f3a..7bafd7a3 100644
---- a/src/plugins/nvme/nvme-op.c
-+++ b/src/plugins/nvme/nvme-op.c
-@@ -35,6 +35,14 @@
- #include "nvme.h"
- #include "nvme-private.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-
- /**
-  * bd_nvme_device_self_test:
-diff --git a/src/plugins/part.c b/src/plugins/part.c
-index 46d31137..6234e013 100644
---- a/src/plugins/part.c
-+++ b/src/plugins/part.c
-@@ -26,6 +26,15 @@
-
- #include "part.h"
-
-+#define UNUSED __attribute__((unused))
-+
-+#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED)
-+{
-+    return strerror(errnum);
-+}
-+#endif
-+
- /**
-  * SECTION: part
-  * @short_description: plugin for operations with partition tables

  diff --git a/src/utils/module.c b/src/utils/module.c

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +1 -1
-index 6557c3ab..69dd4731 100644
+index 6557c3ab..5893f0ac 100644

  --- a/src/utils/module.c
  +++ b/src/utils/module.c
-@@ -74,6 +74,13 @@ static void set_kmod_logging (struct kmod_ctx *ctx) { -     kmod_set_log_fn (ctx, utils_kmod_log_redirect, NULL);
- }
+@@ -28,6 +28,7 @@
+ #include "module.h"
+ #include "exec.h"
+ #include "logging.h"
++#include "utils.h"

package/libblockdev/0001-Provide-replacement-function-for-strerror_l.patch +10 -0
+
+ #define UNUSED __attribute__((unused))
+
+diff --git a/src/utils/utils.h b/src/utils/utils.h
+index 801a8b6e..b2bdf0d0 100644
+--- a/src/utils/utils.h
++++ b/src/utils/utils.h
+@@ -9,6 +9,10 @@
+ #include "dbus.h"
+ #include "logging.h"

  +#if !defined(HAVE_STRERROR_L)
-+static char *strerror_l(int errnum, locale_t locale UNUSED) -+{
-+    return strerror(errnum);
-+}
++#define strerror_l(errnum, locale)      strerror(errnum) +#endif
  +
   /**
-  * bd_utils_have_kernel_module:
-  * @module_name: name of the kernel module to check -@@ -259,7 +266,6 @@ gboolean bd_utils_unload_kernel_module (const gchar *module_name, GError **error
-     return TRUE;
- }
-

Signature · 8 lines
- static BDUtilsLinuxVersion detected_linux_ver;
- static gboolean have_linux_ver = FALSE;
-
+  * SECTION: utils
+  * @short_description: library providing utility functions used by 
the blockdev library and its plugins
  --
  2.34.1
package/libblockdev/Config.in +0 -0
index 527ba79e4e..e0449628b4 100644
@@ -8,6 +8,8 @@ config BR2_PACKAGE_LIBBLOCKDEV

      depends on BR2_ENABLE_LOCALE
      select BR2_PACKAGE_KMOD
      select BR2_PACKAGE_LIBGLIB2
+    select BR2_PACKAGE_UTIL_LINUX
+    select BR2_PACKAGE_UTIL_LINUX_LIBUUID
      help
        libblockdev is a C library supporting GObject introspection for manipulation of block devices. It has a plugin-based

package/libblockdev/Config.in +0 -0
@@ -30,7 +32,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_CRYPTO

  config BR2_PACKAGE_LIBBLOCKDEV_FS
      bool "filesystem"
      depends on BR2_ENABLE_LOCALE # parted
-    select BR2_PACKAGE_UTIL_LINUX
      select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
      select BR2_PACKAGE_PARTED
      select BR2_PACKAGE_E2FSPROGS

package/libblockdev/Config.in +0 -0
@@ -62,7 +63,6 @@ config BR2_PACKAGE_LIBBLOCKDEV_PART

      bool "part"
      depends on BR2_ENABLE_LOCALE # parted select BR2_PACKAGE_PARTED
-    select BR2_PACKAGE_UTIL_LINUX
      select BR2_PACKAGE_UTIL_LINUX_LIBFDISK comment "part plugin needs a toolchain w/ locale"

package/libblockdev/Config.in +0 -0
@@ -70,7 +70,6 @@ comment "part plugin needs a toolchain w/ locale"

  config BR2_PACKAGE_LIBBLOCKDEV_SWAP
      bool "swap"
-    select BR2_PACKAGE_UTIL_LINUX
      select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
  endif

package/libblockdev/libblockdev.hash +0 -1
index 5f9a8a7e6c..79700a4996 100644
@@ -1,3 +1,3 @@
   # Locally calculated
-sha256  

49841ff92db0ab032931e6f2b5eab63e5969b0ddc14b067b60e46a6eb6c60e47 libblockdev-3.0.4.tar.gz +sha256
41e4af66c9d78e795302d37825dfd88a4970f82da7b4ebe6487feba2afae44fb libblockdev-3.1.0.tar.gz sha256 97bdc721d875501b6243a456333fdfdb1ab64d31c4da2554de845caf4674b946  LICENSE

package/libblockdev/libblockdev.mk +0 -0
index e0fca2b95c..ebf01acfb5 100644
@@ -4,7 +4,7 @@
   #
 
Quoted 10 lines
Quoted 6 lines
package/libblockdev/libblockdev.mk +1 -1
 ################################################################################
-LIBBLOCKDEV_VERSION = 3.0.4
+LIBBLOCKDEV_VERSION = 3.1.0

  LIBBLOCKDEV_SITE = https://github.com/storaged-project/libblockdev/releases/download/$(LIBBLOCKDEV_VERSION)-1
  LIBBLOCKDEV_LICENSE = LGPL-2.1
  LIBBLOCKDEV_LICENSE_FILES = LICENSE

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot