about summary refs log tree commit diff
path: root/debian
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2021-07-15 16:44:48 +0200
committerSebastien Bacher <seb128@ubuntu.com>2021-07-15 16:48:26 +0200
commit9620d85f8199de5bdb98f13f7ccf585c9d86d085 (patch)
tree824ba2662f4ddf20d8e96c62b97c8642d1c49626 /debian
parent15043b335c50415d3bad408227f6e888ac2e60df (diff)
* debian/patches/ubuntu_revert_systemd.patch:
  - restore the workaround for the systemd and lxd issue, it's still
    needed (lp: #1936312)
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/ubuntu_revert_systemd.patch48
3 files changed, 57 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 447fd115..00e5e83e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+network-manager (1.32.2-0ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/patches/ubuntu_revert_systemd.patch:
+    - restore the workaround for the systemd and lxd issue, it's still
+      needed (lp: #1936312)
+
+ -- Sebastien Bacher <seb128@ubuntu.com>  Thu, 15 Jul 2021 16:43:32 +0200
+
 network-manager (1.32.2-0ubuntu1) impish; urgency=medium
 
   * New upstream version
diff --git a/debian/patches/series b/debian/patches/series
index c25f5936..3be90f06 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,4 +3,4 @@ Force-online-state-with-unmanaged-devices.patch
 # Ubuntu patches
 Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch
 Update-dnsmasq-parameters.patch
-
+ubuntu_revert_systemd.patch
diff --git a/debian/patches/ubuntu_revert_systemd.patch b/debian/patches/ubuntu_revert_systemd.patch
new file mode 100644
index 00000000..1eb2508b
--- /dev/null
+++ b/debian/patches/ubuntu_revert_systemd.patch
@@ -0,0 +1,48 @@
+Index: network-manager/src/libnm-platform/nm-linux-platform.c
+===================================================================
+--- network-manager.orig/src/libnm-platform/nm-linux-platform.c
++++ network-manager/src/libnm-platform/nm-linux-platform.c
+@@ -29,7 +29,6 @@
+ #include <poll.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <sys/statvfs.h>
+ #include <unistd.h>
+ 
+ #include "libnm-glib-aux/nm-c-list.h"
+@@ -9525,34 +9524,12 @@ constructed(GObject *_object)
+     }
+ }
+ 
+-/* Similar to systemd's path_is_read_only_fs(), at
+- * https://github.com/systemd/systemd/blob/v246/src/basic/stat-util.c#L132 */
+-static int
+-path_is_read_only_fs(const char *path)
+-{
+-    struct statvfs st;
+-
+-    if (statvfs(path, &st) < 0)
+-        return -errno;
+-
+-    if (st.f_flag & ST_RDONLY)
+-        return TRUE;
+-
+-    /* On NFS, statvfs() might not reflect whether we can actually
+-     * write to the remote share. Let's try again with
+-     * access(W_OK) which is more reliable, at least sometimes. */
+-    if (access(path, W_OK) < 0 && errno == EROFS)
+-        return TRUE;
+-
+-    return FALSE;
+-}
+-
+ NMPlatform *
+ nm_linux_platform_new(gboolean log_with_ptr, gboolean netns_support)
+ {
+     gboolean use_udev = FALSE;
+ 
+-    if (nmp_netns_is_initial() && path_is_read_only_fs("/sys") == FALSE)
++    if (nmp_netns_is_initial() && access("/sys", W_OK) == 0)
+         use_udev = TRUE;
+ 
+     return g_object_new(NM_TYPE_LINUX_PLATFORM,