summaryrefslogtreecommitdiffstats
path: root/debian
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:18:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:18:15 +0000
commit8564e5b84ec6fe95ad63dee07323fafda6b34243 (patch)
tree0125a4bb18d213250deada9ec9b1786175d28b15 /debian
parentUpdating source format. (diff)
downloaddpkg-8564e5b84ec6fe95ad63dee07323fafda6b34243.tar.xz
dpkg-8564e5b84ec6fe95ad63dee07323fafda6b34243.zip
Adding patch from Raphaël Hertzog <hertzog@debian.org> to fallback on /bin/mv when rename syscall fails with EXDEV (Closes: #836211).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/progress-linux/0001-overlayfs.patch35
-rw-r--r--debian/patches/series1
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/progress-linux/0001-overlayfs.patch b/debian/patches/progress-linux/0001-overlayfs.patch
new file mode 100644
index 0000000..13d5ffb
--- /dev/null
+++ b/debian/patches/progress-linux/0001-overlayfs.patch
@@ -0,0 +1,35 @@
+Author: Raphaël Hertzog <hertzog@debian.org>
+Description: Fallback on /bin/mv when rename syscall fails with EXDEV (Closes: #836211).
+ Work-around EXDEV error returned by overlayfs when trying to move away a
+ directory by calling "mv" which will do a full copy of the tree followed
+ by a removal of the source tree.
+
+diff -Naurp dpkg.orig/src/archives.c dpkg/src/archives.c
+--- dpkg.orig/src/archives.c
++++ dpkg/src/archives.c
+@@ -1029,6 +1029,25 @@ tarobject(struct tar_archive *tar, struc
+ if (rename(fnamevb.buf,fnametmpvb.buf))
+ ohshite(_("unable to move aside '%.255s' to install new version"),
+ ti->name);
++ if (rename(fnamevb.buf,fnametmpvb.buf)) {
++ if (errno == EXDEV) {
++ struct command cmd;
++ pid_t pid;
++
++ command_init(&cmd, "mv", "move directory aside");
++ command_add_args(&cmd, "mv", fnamevb.buf, fnametmpvb.buf, NULL);
++ pid = subproc_fork();
++
++ if (pid == 0)
++ command_exec(&cmd);
++
++ subproc_reap(pid, "mv", 0);
++ command_destroy(&cmd);
++ } else {
++ ohshite(_("unable to move aside '%.255s' to install new version"),
++ ti->name);
++ }
++ }
+ } else if (S_ISLNK(stab.st_mode)) {
+ int rc;
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..39ab66d
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+progress-linux/0001-overlayfs.patch