1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--- a/common/flatpak-utils.c
+++ b/common/flatpak-utils.c
@@ -36,6 +36,7 @@
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
+#include <sys/file.h>
#include <sys/types.h>
#include <sys/utsname.h>
--- a/config.h.in
+++ b/config.h.in
@@ -140,3 +140,14 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
+
+/* taken from glibc unistd.h and fixes musl */
+#ifndef TEMP_FAILURE_RETRY
+#define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
--- a/builder/builder-module.c
+++ b/builder/builder-module.c
@@ -771,7 +771,7 @@
g_ptr_array_add (args, g_strdup ("flatpak"));
g_ptr_array_add (args, g_strdup ("build"));
- source_dir_path_canonical = canonicalize_file_name (source_dir_path);
+ source_dir_path_canonical = realpath (source_dir_path, NULL);
if (builder_context_get_build_runtime (context))
builddir = "/run/build-runtime/";
--- a/builder/builder-source-shell.c
+++ b/builder/builder-source-shell.c
@@ -130,7 +130,7 @@
g_ptr_array_add (args, g_strdup ("flatpak"));
g_ptr_array_add (args, g_strdup ("build"));
- source_dir_path_canonical = canonicalize_file_name (source_dir_path);
+ source_dir_path_canonical = realpath (source_dir_path, NULL);
g_ptr_array_add (args, g_strdup ("--nofilesystem=host"));
g_ptr_array_add (args, g_strdup_printf ("--filesystem=%s", source_dir_path_canonical));
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -2862,7 +2862,7 @@
somewhere the bind mount will be on the target of that, not
at that exact path. */
g_autofree char *basedir_orig = g_file_get_path (self->basedir);
- g_autofree char *basedir = canonicalize_file_name (basedir_orig);
+ g_autofree char *basedir = realpath (basedir_orig, NULL);
g_debug ("running trigger %s", name);
|