From caa07e8b2054836036ff16de4144daadc8d849b6 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 8 Apr 2023 07:18:46 +0200 Subject: [PATCH] Drop local libite patches in favor of libite v2.5.3 Signed-off-by: Joachim Wiberg --- buildroot | 2 +- ...urn-value-when-copying-a-single-file.patch | 30 -------- ...for-missing-dst-when-dst-is-a-direct.patch | 29 -------- ...opying-empty-files-to-non-existing-d.patch | 68 ------------------- 4 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 patches/libite/2.5.2/0001-rsync-fix-return-value-when-copying-a-single-file.patch delete mode 100644 patches/libite/2.5.2/0002-rsync-fix-check-for-missing-dst-when-dst-is-a-direct.patch delete mode 100644 patches/libite/2.5.2/0003-copyfile-allow-copying-empty-files-to-non-existing-d.patch diff --git a/buildroot b/buildroot index 3790a1f4..58814174 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 3790a1f4b6163f106cc87512efe01e22404296b4 +Subproject commit 588141749e57c0edb4df2daaef8697f98800a8b2 diff --git a/patches/libite/2.5.2/0001-rsync-fix-return-value-when-copying-a-single-file.patch b/patches/libite/2.5.2/0001-rsync-fix-return-value-when-copying-a-single-file.patch deleted file mode 100644 index 7e06dcd6..00000000 --- a/patches/libite/2.5.2/0001-rsync-fix-return-value-when-copying-a-single-file.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 90fdcdeb39e35193fe4e8f5d5277cf9ca28d5055 Mon Sep 17 00:00:00 2001 -From: Joachim Wiberg -Date: Sun, 2 Apr 2023 22:16:50 +0200 -Subject: [PATCH 1/4] rsync: fix return value when copying a single file -Organization: Addiva Elektronik - -Signed-off-by: Joachim Wiberg ---- - src/rsync.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/rsync.c b/src/rsync.c -index 392e1d2..92b8d63 100644 ---- a/src/rsync.c -+++ b/src/rsync.c -@@ -85,9 +85,9 @@ int rsync(char *src, char *dst, int opt, int (*filter)(const char *file)) - return 1; - - if (copy(src, dst, keep_mtim)) -- result++; -+ return 1; - -- return errno; -+ return 0; - } - - /* Copy dir as well? */ --- -2.34.1 - diff --git a/patches/libite/2.5.2/0002-rsync-fix-check-for-missing-dst-when-dst-is-a-direct.patch b/patches/libite/2.5.2/0002-rsync-fix-check-for-missing-dst-when-dst-is-a-direct.patch deleted file mode 100644 index e9916cf7..00000000 --- a/patches/libite/2.5.2/0002-rsync-fix-check-for-missing-dst-when-dst-is-a-direct.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d61b847e557e5162163dffd1abd4b5d9bedc6d7a Mon Sep 17 00:00:00 2001 -From: Joachim Wiberg -Date: Sun, 2 Apr 2023 22:17:09 +0200 -Subject: [PATCH 2/4] rsync: fix check for missing dst when dst is a directory -Organization: Addiva Elektronik - -Signed-off-by: Joachim Wiberg ---- - src/rsync.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/rsync.c b/src/rsync.c -index 92b8d63..695fac3 100644 ---- a/src/rsync.c -+++ b/src/rsync.c -@@ -77,7 +77,9 @@ int rsync(char *src, char *dst, int opt, int (*filter)(const char *file)) - char **files; /* Array of file names. */ - struct stat st; - -- if (!fisdir(dst)) -+ errno = 0; -+ -+ if (stat(dst, &st) && fisslashdir(dst)) - makedir(dst, 0755); - - if (!fisdir(src)) { --- -2.34.1 - diff --git a/patches/libite/2.5.2/0003-copyfile-allow-copying-empty-files-to-non-existing-d.patch b/patches/libite/2.5.2/0003-copyfile-allow-copying-empty-files-to-non-existing-d.patch deleted file mode 100644 index b7491c0a..00000000 --- a/patches/libite/2.5.2/0003-copyfile-allow-copying-empty-files-to-non-existing-d.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4e9b5c13c16f7e7261a15143d9418385274a008e Mon Sep 17 00:00:00 2001 -From: Joachim Wiberg -Date: Sun, 2 Apr 2023 22:17:47 +0200 -Subject: [PATCH 3/4] copyfile: allow copying empty files to non-existing - destination dirs -Organization: Addiva Elektronik - -Signed-off-by: Joachim Wiberg ---- - src/copyfile.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/copyfile.c b/src/copyfile.c -index afbbda9..af34012 100644 ---- a/src/copyfile.c -+++ b/src/copyfile.c -@@ -38,6 +38,7 @@ static int adjust_target(const char *src, char **dst) - { - int isdir = 0; - -+ retry: - if (fisdir(*dst)) { - int slash = 0; - char *tmp, *ptr = strrchr(src, '/'); -@@ -58,6 +59,13 @@ static int adjust_target(const char *src, char **dst) - - sprintf(tmp, "%s%s%s", *dst, slash ? "" : "/", ptr); - *dst = tmp; -+ } else { -+ struct stat st; -+ -+ if (stat(*dst, &st) && fisslashdir(*dst)) { -+ makedir(*dst, 0755); -+ goto retry; -+ } - } - - return isdir; -@@ -67,7 +75,7 @@ static int adjust_target(const char *src, char **dst) - * breaks loop on error and EOF */ - static ssize_t do_copy(int in, int out, size_t num, char *buffer, size_t len) - { -- ssize_t ret = 0, size = 0; -+ ssize_t ret = 0, size = -1; - - do { - size_t count = num > len ? len : num; -@@ -76,6 +84,8 @@ static ssize_t do_copy(int in, int out, size_t num, char *buffer, size_t len) - if (ret <= 0) { - if (ret == -1 && EINTR == errno) - continue; -+ if (ret == 0 && size == -1) -+ size = 0; - break; - } - -@@ -194,7 +204,7 @@ ssize_t copyfile(const char *src, const char *dst, int len, int opt) - } - - size = do_copy(in, out, num, buffer, BUFSIZ); -- if (!size && errno) -+ if (size < 0) - saved_errno = errno; - else if (keep_mtim) - set_mtime(in, out); --- -2.34.1 -