Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (0d44940a21353627c0aed37dac30ce49f28d1282)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (0d44940a21353627c0aed37dac30ce49f28d1282)
  • Date: Thu, 7 Jul 2022 22:51:13 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

disk/gparted/DEPENDS
| 2
disk/gparted/DETAILS
| 4
disk/gparted/HISTORY
| 7 +
disk/gparted/PRE_BUILD
| 3
disk/gparted/patches/0001-Replace-NULL-to-PedPartitionFlag-static_cast.patch
| 29 +++++
disk/gparted/patches/0001-Use-POSIX-basename-in-BCache_Info.cc-99-.patch
| 58 ++++++++++
6 files changed, 100 insertions(+), 3 deletions(-)

New commits:
commit 0d44940a21353627c0aed37dac30ce49f28d1282
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

gparted 1.4.0

diff --git a/disk/gparted/DEPENDS b/disk/gparted/DEPENDS
index 682e88e..0139ddc 100755
--- a/disk/gparted/DEPENDS
+++ b/disk/gparted/DEPENDS
@@ -5,7 +5,7 @@ depends DEVICE-MANAGER &&
depends gtkmm3 &&
optional_depends gnome-doc-utils '' '--disable-doc' 'for documentation' &&
optional_depends rarian '' '--disable-scrollkeeper' 'to register help files
with rarian' &&
-suggest_depends dmraid '' '' 'for RAID volume support' &&
+suggest_depends dmraid '--enable-libparted-dmraid' '' 'for RAID volume
support' &&
suggest_depends xfsprogs '' '' 'for XFS volume support' &&
suggest_depends jfsutils '' '' 'for JFS volume support' &&
suggest_depends hfsutils '' '' 'for HFS volume support' &&
diff --git a/disk/gparted/DETAILS b/disk/gparted/DETAILS
index fa9f218..18e4f77 100755
--- a/disk/gparted/DETAILS
+++ b/disk/gparted/DETAILS
@@ -1,6 +1,6 @@
SPELL=gparted
- VERSION=1.3.1
-
SOURCE_HASH=sha512:2dd2b1eae72f627d8f302d34286e684c6b884faf0246f1f534795213d243a9416ff2a7ead48f44958de1ce00248550336176c0df2469ede825b22ed1b5915c76
+ VERSION=1.4.0
+
SOURCE_HASH=sha512:20f94622fc1a2727f1fc9bb39ea9f04f14af06b0ff7e47c2149730d5eb339089b0d3c21cd3c9ce6f971e955a9f6ab89cc32fd5b7545a5e340b451297d87e8f39
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/$SPELL/$SOURCE
SOURCE_DIRECTORY=${BUILD_DIRECTORY}/${SPELL}-${VERSION}
diff --git a/disk/gparted/HISTORY b/disk/gparted/HISTORY
index 198896e..22f4ab0 100644
--- a/disk/gparted/HISTORY
+++ b/disk/gparted/HISTORY
@@ -1,3 +1,10 @@
+2022-07-07 Ismael Luceno <ismael AT sourcemage.org>
+ * PRE_BUILD, DETAILS: updated spell to 1.4.0
+ * DEPENDS: added --enable-libparted-dmraid flag
+ * patches/0001-Replace-NULL-to-PedPartitionFlag-static_cast.patch,
+ patches/0001-Use-POSIX-basename-in-BCache_Info.cc-99-.patch:
+ fixed build against musl libc
+
2022-02-26 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 1.3.1

diff --git a/disk/gparted/PRE_BUILD b/disk/gparted/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/disk/gparted/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git
a/disk/gparted/patches/0001-Replace-NULL-to-PedPartitionFlag-static_cast.patch

b/disk/gparted/patches/0001-Replace-NULL-to-PedPartitionFlag-static_cast.patch
new file mode 100644
index 0000000..4aae89f
--- /dev/null
+++
b/disk/gparted/patches/0001-Replace-NULL-to-PedPartitionFlag-static_cast.patch
@@ -0,0 +1,29 @@
+From Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Thu, 7 Jul 2022 22:18:03 +0200
+Subject: [PATCH] Replace NULL to PedPartitionFlag static_cast
+
+It fails when NULL is defined as std::nullptr_t.
+
+Error:
+GParted_Core.cc: In constructor 'GParted::GParted_Core::GParted_Core()':
+GParted_Core.cc:75:64: error: invalid 'static_cast' from type
'std::nullptr_t' to type 'PedPartitionFlag'
+ 75 | for ( PedPartitionFlag flag = ped_partition_flag_next(
static_cast<PedPartitionFlag>( NULL ) ) ;
+
+---
+ src/GParted_Core.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
+index 46c651933866..6502134d2819 100644
+--- a/src/GParted_Core.cc
++++ b/src/GParted_Core.cc
+@@ -72,7 +72,7 @@ GParted_Core::GParted_Core()
+ ped_exception_set_handler( ped_exception_handler ) ;
+
+ //get valid flags ...
+- for ( PedPartitionFlag flag = ped_partition_flag_next(
static_cast<PedPartitionFlag>( NULL ) ) ;
++ for ( PedPartitionFlag flag = ped_partition_flag_next(
static_cast<PedPartitionFlag>( 0 ) ) ;
+ flag ;
+ flag = ped_partition_flag_next( flag ) )
+ flags .push_back( flag ) ;
diff --git
a/disk/gparted/patches/0001-Use-POSIX-basename-in-BCache_Info.cc-99-.patch
b/disk/gparted/patches/0001-Use-POSIX-basename-in-BCache_Info.cc-99-.patch
new file mode 100644
index 0000000..607580d
--- /dev/null
+++ b/disk/gparted/patches/0001-Use-POSIX-basename-in-BCache_Info.cc-99-.patch
@@ -0,0 +1,58 @@
+From 45c00927b72319f00855c7feaf4dcf109b3e4414 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k AT t-online.de>
+Date: Fri, 8 Apr 2022 08:58:46 +0000
+Subject: [PATCH] Use POSIX basename() in BCache_Info.cc (!99)
+
+Musl libc [1][2] doesn't implement the GNU variant of basename() [3][4],
+obtained via #include <string.h>. Therefore GParted fails to build on
+such distributions:
+
+
fdebug-prefix-map=TOPDIR/build/tmp/work/cortexa57-yoe-linux-musl/gparted/1.4.0-r0/recipe-sysroot-native=-fvisibility-inlines-hidden
-c -o ../../gparted-1.4.0/src/BCache_Info.cc:52:33:
+
+ error: use of undeclared identifier 'basename'; did you mean
'g_basename'?
+ return "/dev/" + Glib::ustring(basename(buf));
+ ^~~~~~~~
+ g_basename
+
+Fix by using the POSIX implementation of basename() [5] instead,
+obtained via #include <libgen.h>, which musl libc does implement [6].
+Note that the POSIX implementation of basename() is allowed to modify
+the string passed to it. This is okay because
+BCache_Info::get_bcache_device() is using a modifiable local character
+buffer.
+
+[1] musl libc
+ https://musl.libc.org/
+[2] Projects using musl
+ https://wiki.musl-libc.org/projects-using-musl.html
+[3] The GNU C Library, 5.10 Finding Tokens in a String
+
https://www.gnu.org/software/libc/manual/html_node/Finding-Tokens-in-a-String.html
+[4] basename(3) - Linux manual page
+ https://man7.org/linux/man-pages/man3/basename.3.html
+[5] POSIX basename()
+ https://pubs.opengroup.org/onlinepubs/009695399/functions/basename.html
+[6] musl source, basename.c
+ http://git.musl-libc.org/cgit/musl/tree/src/misc/basename.c
+
+Closes !99 - Fix undeclared identifier 'basename' build failure with
+ musl libc
+---
+ src/BCache_Info.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/BCache_Info.cc b/src/BCache_Info.cc
+index 129a5178..aecc9ef1 100644
+--- a/src/BCache_Info.cc
++++ b/src/BCache_Info.cc
+@@ -17,7 +17,7 @@
+
+ #include "BCache_Info.h"
+
+-#include <string.h> // GNU version of basename()
++#include <libgen.h> // POSIX version of basename()
+ #include <unistd.h>
+ #include <glibmm/ustring.h>
+ #include <glibmm/fileutils.h>
+--
+GitLab
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (0d44940a21353627c0aed37dac30ce49f28d1282), Ismael Luceno, 07/07/2022

Archive powered by MHonArc 2.6.24.

Top of Page