commit 621af0ac05bf26c20841222343b8861137ce22c2
parent af08a024bdff6515b3ef812e0ece22e9e6672794
Author: St John Karp <contact@stjo.hn>
Date: Sun, 3 Jul 2022 07:25:27 -0400
flatpak: Remove two patches that I don't believe are needed
Removed bubblewrap-musl.patch and fix-musl.patch, which don't seem
to be needed as Flatpak builds fine without them.
Diffstat:
2 files changed, 0 insertions(+), 63 deletions(-)
diff --git a/flatpak/flatpak/patches/bubblewrap-musl.patch b/flatpak/flatpak/patches/bubblewrap-musl.patch
@@ -1,46 +0,0 @@
-add normpath(), originally written for xbps.
-diff --git bind-mount.c.orig bind-mount.c
-index 045fa0e..d05b540 100644
---- a/bubblewrap/bind-mount.c.orig
-+++ b/bubblewrap/bind-mount.c
-@@ -23,6 +23,28 @@
- #include "utils.h"
- #include "bind-mount.h"
-
-+#ifndef __GLIBC__
-+static char *
-+normpath(char *path)
-+{
-+ char *seg = NULL, *p = NULL;
-+
-+ for (p = path, seg = NULL; *p; p++) {
-+ if (strncmp(p, "/../", 4) == 0 || strncmp(p, "/..", 4) == 0) {
-+ memmove(seg ? seg : p, p+3, strlen(p+3) + 1);
-+ return normpath(path);
-+ } else if (strncmp(p, "/./", 3) == 0 || strncmp(p, "/.", 3) == 0) {
-+ memmove(p, p+2, strlen(p+2) + 1);
-+ } else if (strncmp(p, "//", 2) == 0 || strncmp(p, "/", 2) == 0) {
-+ memmove(p, p+1, strlen(p+1) + 1);
-+ }
-+ if (*p == '/')
-+ seg = p;
-+ }
-+ return path;
-+}
-+#endif
-+
- static char *
- skip_token (char *line, bool eat_whitespace)
- {
-@@ -397,7 +419,11 @@ bind_mount (int proc_fd,
- path, so to find it in the mount table we need to do that too. */
- resolved_dest = realpath (dest, NULL);
- if (resolved_dest == NULL)
-+#ifdef __GLIBC__
- return 2;
-+#else
-+ resolved_dest = normpath(strdup(dest));
-+#endif
-
- mount_tab = parse_mountinfo (proc_fd, resolved_dest);
- if (mount_tab[0].mountpoint == NULL)
diff --git a/flatpak/flatpak/patches/fix-musl.patch b/flatpak/flatpak/patches/fix-musl.patch
@@ -1,17 +0,0 @@
---- 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
-+