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

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

Commit Message

Dario Binacchi July 3, 2024, 1:58 p.m. UTC
Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum
fuzz factor to 0") reduced the fuzz factor.

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

    Applying 0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch using patch:
    patching file src/CMakeLists.txt
    Hunk #1 FAILED at 75.
    1 out of 1 hunk FAILED -- saving rejects to file src/CMakeLists.txt.rej

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

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 .checkpackageignore                           |  1 -
 ...xt-allow-override-of-wayland-pkgdata.patch | 20 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

Comments

'Jan Kiszka' via Amarula Linux July 3, 2024, 8:45 p.m. UTC | #1
Hello Dario,

Le 03/07/2024 à 15:58, Dario Binacchi a écrit :
> Commit 8f88a644ed7d6 ("support/scripts/apply-patches.sh: set the maximum
> fuzz factor to 0") reduced the fuzz factor.
> 
> Due to this change, libglfw fails to build with output:
> 
>     Applying 0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch using patch:
>     patching file src/CMakeLists.txt
>     Hunk #1 FAILED at 75.
>     1 out of 1 hunk FAILED -- saving rejects to file src/CMakeLists.txt.rej
> 
> This commit refreshes the package patch on the current package version.

The first patch still produce 2 Hunks while applying:

Applying 0001-Wayland-Remove-extra-cmake-modules-dependency.patch using patch:
patching file CMakeLists.txt
Hunk #1 succeeded at 249 (offset 58 lines).
patching file src/CMakeLists.txt
Hunk #1 succeeded at 40 (offset -5 lines).

I'm not sure how we can catch this easily since patch return without error even
with fuzz 0...

Best regards,
Romain


> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
>  .checkpackageignore                           |  1 -
>  ...xt-allow-override-of-wayland-pkgdata.patch | 20 ++++++++++---------
>  2 files changed, 11 insertions(+), 10 deletions(-)
> 
> diff --git a/.checkpackageignore b/.checkpackageignore
> index ca94fb56b092..fe2545c13db2 100644
> --- a/.checkpackageignore
> +++ b/.checkpackageignore
> @@ -825,7 +825,6 @@ package/libfuse/0001-fix-aarch64-build.patch lib_patch.Upstream
>  package/libfuse/0002-util-ulockmgr_server-c-conditionally-define-closefrom-fix-glibc-2-34.patch lib_patch.Upstream
>  package/libgcrypt/0001-configure.ac-add-an-option-to-disable-tests.patch lib_patch.Upstream
>  package/libglfw/0001-Wayland-Remove-extra-cmake-modules-dependency.patch lib_patch.Upstream
> -package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch lib_patch.Upstream
>  package/libgpiod/0001-build-add-a-configure-switch-for-building-examples.patch lib_patch.Upstream
>  package/libgsm/0001-Misc-fixes-from-Archlinux.patch lib_patch.Upstream
>  package/libgtk2/0001-reduce-dependencies.patch lib_patch.Upstream
> diff --git a/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch b/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
> index 4bcb5e4eb705..268b1248518b 100644
> --- a/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
> +++ b/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
> @@ -1,4 +1,4 @@
> -From 46aaf2b2b4d3ec240b9aad175bb3eddb6ae11ead Mon Sep 17 00:00:00 2001
> +From a2c88988b6cfe4023fe78f13519b56a8ac9f568b Mon Sep 17 00:00:00 2001
>  From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>  Date: Fri, 4 Mar 2022 17:59:19 +0100
>  Subject: [PATCH] src/CMakeLists.txt: allow override of wayland pkgdatadir
> @@ -7,17 +7,19 @@ Allow the user to override WAYLAND_{PROTOCOLS_BASE,CLIENT_PKGDATADIR}
>  (needed when cross-compiling)
>  
>  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> -[Upstream status: https://github.com/glfw/glfw/pull/2053]
> +Upstream: https://github.com/glfw/glfw/pull/2053
> +[Dario: make the patch to be applied with fuzz factor 0]
> +Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>  ---
> - src/CMakeLists.txt | 8 ++++++--
> - 1 file changed, 6 insertions(+), 2 deletions(-)
> + src/CMakeLists.txt | 4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
>  
>  diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> -index 01f191c9..475ce882 100644
> +index 29be6515ae58..1767b3c8ad8f 100644
>  --- a/src/CMakeLists.txt
>  +++ b/src/CMakeLists.txt
> -@@ -75,7 +75,9 @@ if (GLFW_BUILD_WAYLAND)
> -     include(FindPkgConfig)
> +@@ -42,7 +42,9 @@ elseif (_GLFW_WAYLAND)
> + 
>       find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
>       pkg_check_modules(WAYLAND_PROTOCOLS REQUIRED wayland-protocols>=1.15)
>  -    pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)
> @@ -26,7 +28,7 @@ index 01f191c9..475ce882 100644
>  +    endif()
>   
>       macro(wayland_generate protocol_file output_file)
> -         add_custom_command(OUTPUT "${output_file}.h"
> +           add_custom_command(OUTPUT ${output_file}.h
>  -- 
> -2.34.1
> +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/.checkpackageignore b/.checkpackageignore
index ca94fb56b092..fe2545c13db2 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -825,7 +825,6 @@  package/libfuse/0001-fix-aarch64-build.patch lib_patch.Upstream
 package/libfuse/0002-util-ulockmgr_server-c-conditionally-define-closefrom-fix-glibc-2-34.patch lib_patch.Upstream
 package/libgcrypt/0001-configure.ac-add-an-option-to-disable-tests.patch lib_patch.Upstream
 package/libglfw/0001-Wayland-Remove-extra-cmake-modules-dependency.patch lib_patch.Upstream
-package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch lib_patch.Upstream
 package/libgpiod/0001-build-add-a-configure-switch-for-building-examples.patch lib_patch.Upstream
 package/libgsm/0001-Misc-fixes-from-Archlinux.patch lib_patch.Upstream
 package/libgtk2/0001-reduce-dependencies.patch lib_patch.Upstream
diff --git a/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch b/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
index 4bcb5e4eb705..268b1248518b 100644
--- a/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
+++ b/package/libglfw/0002-src-CMakeLists.txt-allow-override-of-wayland-pkgdata.patch
@@ -1,4 +1,4 @@ 
-From 46aaf2b2b4d3ec240b9aad175bb3eddb6ae11ead Mon Sep 17 00:00:00 2001
+From a2c88988b6cfe4023fe78f13519b56a8ac9f568b Mon Sep 17 00:00:00 2001
 From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
 Date: Fri, 4 Mar 2022 17:59:19 +0100
 Subject: [PATCH] src/CMakeLists.txt: allow override of wayland pkgdatadir
@@ -7,17 +7,19 @@  Allow the user to override WAYLAND_{PROTOCOLS_BASE,CLIENT_PKGDATADIR}
 (needed when cross-compiling)
 
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/glfw/glfw/pull/2053]
+Upstream: https://github.com/glfw/glfw/pull/2053
+[Dario: make the patch to be applied with fuzz factor 0]
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
 ---
- src/CMakeLists.txt | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
+ src/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 01f191c9..475ce882 100644
+index 29be6515ae58..1767b3c8ad8f 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -75,7 +75,9 @@ if (GLFW_BUILD_WAYLAND)
-     include(FindPkgConfig)
+@@ -42,7 +42,9 @@ elseif (_GLFW_WAYLAND)
+ 
      find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
      pkg_check_modules(WAYLAND_PROTOCOLS REQUIRED wayland-protocols>=1.15)
 -    pkg_get_variable(WAYLAND_PROTOCOLS_BASE wayland-protocols pkgdatadir)
@@ -26,7 +28,7 @@  index 01f191c9..475ce882 100644
 +    endif()
  
      macro(wayland_generate protocol_file output_file)
-         add_custom_command(OUTPUT "${output_file}.h"
+           add_custom_command(OUTPUT ${output_file}.h
 -- 
-2.34.1
+2.43.0