[1/1] package/freerdp: update the patches to be applied with fuzz 0

Message ID 20240702073926.2379089-1-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [1/1] package/freerdp: update the patches to be applied with fuzz 0
Related show

Commit Message

Dario Binacchi July 2, 2024, 7:39 a.m. UTC
Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum
fuzz factor to 0") reduced the fuzz factor.

Due to this change, freerdp fails to build with output:

    Applying 0001-Fix-variable-declaration-in-loop.patch using patch:
    patching file client/X11/xf_graphics.c
    Hunk #1 FAILED at 386.
    Hunk #2 succeeded at 456 (offset 61 lines).
    1 out of 2 hunks FAILED -- saving rejects to file client/X11/xf_graphics.c.rej

    Applying 0002-Fixed-variable-declaration-in-loop.patch using patch:
    patching file client/X11/xf_graphics.c
    Hunk #1 succeeded at 246 (offset 6 lines).
    Hunk #2 FAILED at 255.
    1 out of 2 hunks FAILED -- saving rejects to file client/X11/xf_graphics.c.rej

This commit refreshes the package patches on the current package version.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 .../0001-Fix-variable-declaration-in-loop.patch | 17 +++++++++++------
 ...002-Fixed-variable-declaration-in-loop.patch | 17 +++++++++++------
 2 files changed, 22 insertions(+), 12 deletions(-)

Comments

'Krzysztof Kozlowski' via Amarula Linux July 2, 2024, 7:56 a.m. UTC | #1
On 02/07/2024 09:39, Dario Binacchi wrote:
> Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum
> fuzz factor to 0") reduced the fuzz factor.
> 
> Due to this change, freerdp fails to build with output:
> 
>      Applying 0001-Fix-variable-declaration-in-loop.patch using patch:
>      patching file client/X11/xf_graphics.c
>      Hunk #1 FAILED at 386.
>      Hunk #2 succeeded at 456 (offset 61 lines).
>      1 out of 2 hunks FAILED -- saving rejects to file client/X11/xf_graphics.c.rej
> 
>      Applying 0002-Fixed-variable-declaration-in-loop.patch using patch:
>      patching file client/X11/xf_graphics.c
>      Hunk #1 succeeded at 246 (offset 6 lines).
>      Hunk #2 FAILED at 255.
>      1 out of 2 hunks FAILED -- saving rejects to file client/X11/xf_graphics.c.rej
> 
> This commit refreshes the package patches on the current package version.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   .../0001-Fix-variable-declaration-in-loop.patch | 17 +++++++++++------
>   ...002-Fixed-variable-declaration-in-loop.patch | 17 +++++++++++------
>   2 files changed, 22 insertions(+), 12 deletions(-)
> 
> diff --git a/package/freerdp/0001-Fix-variable-declaration-in-loop.patch b/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
> index 799a92734be7..ec1795364afe 100644
> --- a/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
> +++ b/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
> @@ -1,27 +1,29 @@
> -From ddde652460350b962d32036981ff8ed77ed2f1ed Mon Sep 17 00:00:00 2001
> +From 48f25939f4a48b01072f3cd2ece1e36a41c0ad44 Mon Sep 17 00:00:00 2001
>   From: Armin Novak <armin.novak@thincast.com>
>   Date: Wed, 16 Sep 2020 09:30:37 +0200
>   Subject: [PATCH] Fix variable declaration in loop
>   
>   Upstream: https://github.com/FreeRDP/FreeRDP/commit/ddde652460350b962d32036981ff8ed77ed2f1ed
>   Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Dario: make the patch to be applied with fuzz factor 0]
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>   ---
>    client/X11/xf_graphics.c | 3 ++-
>    1 file changed, 2 insertions(+), 1 deletion(-)
>   
>   diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c
> -index 76fbef5bd6..bf71b563c3 100644
> +index 5aa1fd48b5a3..c8f24362aec7 100644
>   --- a/client/X11/xf_graphics.c
>   +++ b/client/X11/xf_graphics.c
> -@@ -386,6 +386,7 @@ static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer)
> - static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
> - {
> +@@ -447,6 +447,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
> + 	WLog_DBG(TAG, "%s: %p", __func__, pointer);
> +
>    #ifdef WITH_XCURSOR
>   +	UINT32 i;
>    	xfContext* xfc = (xfContext*)context;
>    	xfPointer* xpointer = (xfPointer*)pointer;
>    
> -@@ -395,7 +396,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
> +@@ -456,7 +457,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
>    	free(xpointer->cursorWidths);
>    	free(xpointer->cursorHeights);
>    
> @@ -30,3 +32,6 @@ index 76fbef5bd6..bf71b563c3 100644
>    	{
>    		XFreeCursor(xfc->display, xpointer->cursors[i]);
>    	}
> +--
> +2.43.0
> +
> diff --git a/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch b/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
> index 1a4e89943073..838844d63523 100644
> --- a/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
> +++ b/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
> @@ -1,19 +1,21 @@
> -From 4f8a48d96e472e43a5f856c449f61669792ce9fa Mon Sep 17 00:00:00 2001
> +From b0b856590b523869358875594841f3e6c2919569 Mon Sep 17 00:00:00 2001
>   From: akallabeth <akallabeth@posteo.net>
>   Date: Tue, 22 Sep 2020 07:43:56 +0200
>   Subject: [PATCH] Fixed variable declaration in loop
>   
>   Upstream: https://github.com/FreeRDP/FreeRDP/commit/4f8a48d96e472e43a5f856c449f61669792ce9fa
>   Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Dario: make the patch to be applied with fuzz factor 0]
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>   ---
>    client/X11/xf_graphics.c | 4 ++--
>    1 file changed, 2 insertions(+), 2 deletions(-)
>   
>   diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c
> -index bf71b563c3..c50726c8e4 100644
> +index c8f24362aec7..c8b604cc6ad4 100644
>   --- a/client/X11/xf_graphics.c
>   +++ b/client/X11/xf_graphics.c
> -@@ -240,7 +240,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpP
> +@@ -246,7 +246,7 @@ static BOOL xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpPo
>    	double xscale;
>    	double yscale;
>    	size_t size;
> @@ -22,12 +24,15 @@ index bf71b563c3..c50726c8e4 100644
>    
>    	if (!context || !pointer || !context->gdi)
>    		return FALSE;
> -@@ -255,7 +255,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpP
> - 	xTargetSize = pointer->width * xscale;
> - 	yTargetSize = pointer->height * yscale;
> +@@ -264,7 +264,7 @@ static BOOL xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpPo
> + 	WLog_DBG(TAG, "%s: scaled: %" PRIu32 "x%" PRIu32 ", desktop: %" PRIu32 "x%" PRIu32, __func__,
> + 	         xfc->scaledWidth, xfc->savedHeight, settings->DesktopWidth, settings->DesktopHeight);
>    
>   -	for (int i = 0; i < xpointer->nCursors; i++)
>   +	for (i = 0; i < xpointer->nCursors; i++)
>    	{
>    		if (xpointer->cursorWidths[i] == xTargetSize && xpointer->cursorHeights[i] == yTargetSize)
>    		{
> +--
> +2.43.0
> +

To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.

Patch

diff --git a/package/freerdp/0001-Fix-variable-declaration-in-loop.patch b/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
index 799a92734be7..ec1795364afe 100644
--- a/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
+++ b/package/freerdp/0001-Fix-variable-declaration-in-loop.patch
@@ -1,27 +1,29 @@ 
-From ddde652460350b962d32036981ff8ed77ed2f1ed Mon Sep 17 00:00:00 2001
+From 48f25939f4a48b01072f3cd2ece1e36a41c0ad44 Mon Sep 17 00:00:00 2001
 From: Armin Novak <armin.novak@thincast.com>
 Date: Wed, 16 Sep 2020 09:30:37 +0200
 Subject: [PATCH] Fix variable declaration in loop
 
 Upstream: https://github.com/FreeRDP/FreeRDP/commit/ddde652460350b962d32036981ff8ed77ed2f1ed
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Dario: make the patch to be applied with fuzz factor 0]
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 ---
  client/X11/xf_graphics.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c
-index 76fbef5bd6..bf71b563c3 100644
+index 5aa1fd48b5a3..c8f24362aec7 100644
 --- a/client/X11/xf_graphics.c
 +++ b/client/X11/xf_graphics.c
-@@ -386,6 +386,7 @@ static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer)
- static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
- {
+@@ -447,6 +447,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
+ 	WLog_DBG(TAG, "%s: %p", __func__, pointer);
+ 
  #ifdef WITH_XCURSOR
 +	UINT32 i;
  	xfContext* xfc = (xfContext*)context;
  	xfPointer* xpointer = (xfPointer*)pointer;
  
-@@ -395,7 +396,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
+@@ -456,7 +457,7 @@ static void xf_Pointer_Free(rdpContext* context, rdpPointer* pointer)
  	free(xpointer->cursorWidths);
  	free(xpointer->cursorHeights);
  
@@ -30,3 +32,6 @@  index 76fbef5bd6..bf71b563c3 100644
  	{
  		XFreeCursor(xfc->display, xpointer->cursors[i]);
  	}
+-- 
+2.43.0
+
diff --git a/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch b/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
index 1a4e89943073..838844d63523 100644
--- a/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
+++ b/package/freerdp/0002-Fixed-variable-declaration-in-loop.patch
@@ -1,19 +1,21 @@ 
-From 4f8a48d96e472e43a5f856c449f61669792ce9fa Mon Sep 17 00:00:00 2001
+From b0b856590b523869358875594841f3e6c2919569 Mon Sep 17 00:00:00 2001
 From: akallabeth <akallabeth@posteo.net>
 Date: Tue, 22 Sep 2020 07:43:56 +0200
 Subject: [PATCH] Fixed variable declaration in loop
 
 Upstream: https://github.com/FreeRDP/FreeRDP/commit/4f8a48d96e472e43a5f856c449f61669792ce9fa
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Dario: make the patch to be applied with fuzz factor 0]
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 ---
  client/X11/xf_graphics.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c
-index bf71b563c3..c50726c8e4 100644
+index c8f24362aec7..c8b604cc6ad4 100644
 --- a/client/X11/xf_graphics.c
 +++ b/client/X11/xf_graphics.c
-@@ -240,7 +240,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpP
+@@ -246,7 +246,7 @@ static BOOL xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpPo
  	double xscale;
  	double yscale;
  	size_t size;
@@ -22,12 +24,15 @@  index bf71b563c3..c50726c8e4 100644
  
  	if (!context || !pointer || !context->gdi)
  		return FALSE;
-@@ -255,7 +255,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpP
- 	xTargetSize = pointer->width * xscale;
- 	yTargetSize = pointer->height * yscale;
+@@ -264,7 +264,7 @@ static BOOL xf_Pointer_GetCursorForCurrentScale(rdpContext* context, const rdpPo
+ 	WLog_DBG(TAG, "%s: scaled: %" PRIu32 "x%" PRIu32 ", desktop: %" PRIu32 "x%" PRIu32, __func__,
+ 	         xfc->scaledWidth, xfc->savedHeight, settings->DesktopWidth, settings->DesktopHeight);
  
 -	for (int i = 0; i < xpointer->nCursors; i++)
 +	for (i = 0; i < xpointer->nCursors; i++)
  	{
  		if (xpointer->cursorWidths[i] == xTargetSize && xpointer->cursorHeights[i] == yTargetSize)
  		{
+-- 
+2.43.0
+