Bug#1055875: util-linux: FTBFS on hurd-i386

2023-11-13 Thread Chris Hofstaedtler
* Samuel Thibault  [231113 12:27]:
> Svante Signell, le lun. 13 nov. 2023 12:08:56 +0100, a ecrit:
> > util-linux FTBFS on hurd-i386 (built in the past, last successful build was
> > 2.39.1-4).
> 
> In general, better discuss directly with upstream.

Indeed. Please, generally send (build) fixes upstream and once
committed I'll happily take commit ids and apply them in Debian.
This is a much better workflow, as the patch will also 'stick' for
new versions etc.

> They commited a
> different fix, as attached: just not include hooks.c on non-linux :)

Thank you!

> 
> Samuel

> commit 1e0ad14b3ac08d855cda6de346a65f9b834e00db
> Author: Karel Zak 
> Date:   Mon Sep 18 13:08:57 2023 +0200
> 
> build-sys: fix libmount/src/hooks.c use
> 
> Reported-by: Samuel Thibault 
> Signed-off-by: Karel Zak 

[..]



Bug#1055875: util-linux: FTBFS on hurd-i386

2023-11-13 Thread Samuel Thibault
Hello,

Svante Signell, le lun. 13 nov. 2023 12:08:56 +0100, a ecrit:
> util-linux FTBFS on hurd-i386 (built in the past, last successful build was
> 2.39.1-4).

In general, better discuss directly with upstream. They commited a
different fix, as attached: just not include hooks.c on non-linux :)

Samuel
commit 1e0ad14b3ac08d855cda6de346a65f9b834e00db
Author: Karel Zak 
Date:   Mon Sep 18 13:08:57 2023 +0200

build-sys: fix libmount/src/hooks.c use

Reported-by: Samuel Thibault 
Signed-off-by: Karel Zak 

diff --git a/libmount/meson.build b/libmount/meson.build
index ba95acf37..a9d4d7780 100644
--- a/libmount/meson.build
+++ b/libmount/meson.build
@@ -17,7 +17,6 @@ configure_file(
 lib_mount_sources = '''
   src/mountP.h
   src/cache.c
-  src/hooks.c
   src/fs.c
   src/init.c
   src/iter.c
diff --git a/libmount/src/Makemodule.am b/libmount/src/Makemodule.am
index d474aea0c..367bc4673 100644
--- a/libmount/src/Makemodule.am
+++ b/libmount/src/Makemodule.am
@@ -11,7 +11,6 @@ libmount_la_SOURCES = \
libmount/src/mountP.h \
libmount/src/cache.c \
libmount/src/fs.c \
-   libmount/src/hooks.c \
libmount/src/init.c \
libmount/src/iter.c \
libmount/src/lock.c \
@@ -31,6 +30,7 @@ libmount_la_SOURCES += \
libmount/src/context.c \
libmount/src/context_mount.c \
libmount/src/context_umount.c \
+   libmount/src/hooks.c \
libmount/src/hook_mount.c \
libmount/src/hook_mount_legacy.c \
libmount/src/hook_mkdir.c \


Bug#1055875: util-linux: FTBFS on hurd-i386

2023-11-13 Thread Svante Signell
Source: util-linux
Version: 2.39.2-5
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hi,

util-linux FTBFS on hurd-i386 (built in the past, last successful build was
2.39.1-4).

A patch enabling a successful build is attached:
libmount_src_hooks.c.diff where mnt_context_is_fake()
is defined only if USE_LIBMOUNT_MOUNTFD_SUPPORT is defined. And
USE_LIBMOUNT_MOUNTFD_SUPPORT is only defined on GNU/Linux systems.

Alternately #ifdef __linux__ instead of #ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
could be used as condition. Maybe that would be a better solution.

Configure reports:
configure: WARNING: non-linux system; not building libmount_mountfd_support,
among in total 47 warnings for not building on a non-linux system.

Thanks!




--- a/libmount/src/hooks.c	2023-08-17 09:56:12.0 +0200
+++ b/libmount/src/hooks.c	2023-11-11 19:29:01.0 +0100
@@ -315,11 +315,14 @@
 {
 	int rc = 0;
 
+#ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
 	if (mnt_context_is_fake(cxt))
 		DBG(CXT, ul_debugobj(cxt, " FAKE call"));
 	else
 		rc = hook->func(cxt, hook->hookset, hook->data);
-
+#else
+		rc = hook->func(cxt, hook->hookset, hook->data);
+#endif
 	hook->executed = 1;
 	if (!rc)
 		rc = call_depend_hooks(cxt, hook->hookset->name, hook->stage);
@@ -364,10 +367,14 @@
 
 		DBG(CXT, ul_debugobj(cxt, "calling %s [first]", hs->name));
 
+#ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
 		if (mnt_context_is_fake(cxt))
 			DBG(CXT, ul_debugobj(cxt, " FAKE call"));
 		else
 			rc = hs->firstcall(cxt, hs, NULL);
+#else
+			rc = hs->firstcall(cxt, hs, NULL);
+#endif
 		if (!rc)
 			rc = call_depend_hooks(cxt, hs->name, stage);
 		if (rc < 0)