From aed6e80e4e8cbf1fc788f9a909574f981cb426e2 Mon Sep 17 00:00:00 2001
From: Vignesh Raman <vignesh.raman@collabora.com>
Date: Fri, 25 Mar 2022 16:27:50 +0530
Subject: [PATCH] meson: do not fail if rsync is not installed with meson
 0.57.2

Fixes: https://github.com/mesonbuild/meson/issues/8641

Backport fix from,
https://github.com/systemd/systemd/commit/7c5fd25119a495009ea62f79e5daec34cc464628

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
---
 ...c-is-not-installed-with-meson-0.57.2.patch | 53 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 debian/patches/meson-do-not-fail-if-rsync-is-not-installed-with-meson-0.57.2.patch

diff --git a/debian/patches/meson-do-not-fail-if-rsync-is-not-installed-with-meson-0.57.2.patch b/debian/patches/meson-do-not-fail-if-rsync-is-not-installed-with-meson-0.57.2.patch
new file mode 100644
index 00000000..f05e33c0
--- /dev/null
+++ b/debian/patches/meson-do-not-fail-if-rsync-is-not-installed-with-meson-0.57.2.patch
@@ -0,0 +1,53 @@
+From 7c5fd25119a495009ea62f79e5daec34cc464628 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 12 Apr 2021 14:03:32 +0200
+Subject: [PATCH] meson: do not fail if rsync is not installed with meson
+ 0.57.2
+
+https://github.com/mesonbuild/meson/issues/8641
+
+Our CI started to fail. Even if the change is reverted in meson,
+we need a quick workaround here.
+---
+ man/meson.build | 25 ++++++++++++++-----------
+ 1 file changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/man/meson.build b/man/meson.build
+index 3cae8446cd..f9c4b83dc8 100644
+--- a/man/meson.build
++++ b/man/meson.build
+@@ -184,17 +184,20 @@ html = custom_target(
+         depends : html_pages,
+         command : ['echo'])
+ 
+-run_target(
+-        'doc-sync',
+-        depends : man_pages + html_pages,
+-        command : ['rsync', '-rlv',
+-                   '--delete-excluded',
+-                   '--include=man',
+-                   '--include=*.html',
+-                   '--exclude=*',
+-                   '--omit-dir-times',
+-                   meson.current_build_dir(),
+-                   get_option('www-target')])
++rsync = find_program('rsync', required : false)
++if rsync.found()
++        run_target(
++                'doc-sync',
++                depends : man_pages + html_pages,
++                command : [rsync, '-rlv',
++                           '--delete-excluded',
++                           '--include=man',
++                           '--include=*.html',
++                           '--exclude=*',
++                           '--omit-dir-times',
++                           meson.current_build_dir(),
++                           get_option('www-target')])
++endif
+ 
+ ############################################################
+ 
+-- 
+2.30.2
+
diff --git a/debian/patches/series b/debian/patches/series
index 3df9f030..22ac7f5e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -42,3 +42,4 @@ apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch
 apertis/basic-linux-Sync-if_arp.h-with-Linux-5.14.patch
 apertis/systemd-journal-flush-Add-a-requirement-on-var.mount.patch
 meson.build-change-operator-combining-bools-from-to-and.patch
+meson-do-not-fail-if-rsync-is-not-installed-with-meson-0.57.2.patch
-- 
GitLab