diff options
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/gimp-fix-metadata-editor.patch | 25 | ||||
-rw-r--r-- | gnu/packages/patches/gimp-fix-tiff-load.patch | 25 | ||||
-rw-r--r-- | gnu/packages/patches/linuxdcpp-openssl-1.1.patch | 26 | ||||
-rw-r--r-- | gnu/packages/patches/nss-3.115-disable-broken-tests.patch | 34 | ||||
-rw-r--r-- | gnu/packages/patches/nss-3.115-disable-pkix-ocsp-tests.patch | 13 | ||||
-rw-r--r-- | gnu/packages/patches/zig-0.15-fix-runpath.patch | 122 |
6 files changed, 219 insertions, 26 deletions
diff --git a/gnu/packages/patches/gimp-fix-metadata-editor.patch b/gnu/packages/patches/gimp-fix-metadata-editor.patch new file mode 100644 index 0000000000..848227ff4b --- /dev/null +++ b/gnu/packages/patches/gimp-fix-metadata-editor.patch @@ -0,0 +1,25 @@ +From 51311f913d9f417d121f59b83d560c7b4b853d1c Mon Sep 17 00:00:00 2001 +From: Simon Budig <simon@budig.de> +Date: Sat, 20 May 2023 22:25:40 +0200 +Subject: [PATCH] metadata: shut up a weird warning + +--- + plug-ins/metadata/metadata-editor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plug-ins/metadata/metadata-editor.c b/plug-ins/metadata/metadata-editor.c +index a3992e40ddc..5bf6ef709f1 100644 +--- a/plug-ins/metadata/metadata-editor.c ++++ b/plug-ins/metadata/metadata-editor.c +@@ -2846,7 +2846,7 @@ metadata_dialog_editor_set_metadata (GExiv2Metadata *metadata, + } + else + { +- if (! g_strv_contains (values, equiv_values[evi])) ++ if (! g_strv_contains ((const gchar * const *) values, equiv_values[evi])) + { + gchar *tmpvalue; + +-- +GitLab + diff --git a/gnu/packages/patches/gimp-fix-tiff-load.patch b/gnu/packages/patches/gimp-fix-tiff-load.patch new file mode 100644 index 0000000000..ba12d0892f --- /dev/null +++ b/gnu/packages/patches/gimp-fix-tiff-load.patch @@ -0,0 +1,25 @@ +From a2458f1528e5733574bb26ff5452b1329116e6db Mon Sep 17 00:00:00 2001 +From: Simon Budig <simon@budig.de> +Date: Sat, 20 May 2023 18:40:41 +0200 +Subject: [PATCH] file-tiff-load: fix mismatching variable type + +--- + plug-ins/file-tiff/file-tiff-load.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plug-ins/file-tiff/file-tiff-load.c b/plug-ins/file-tiff/file-tiff-load.c +index 0aafbaec5fd..a26e7af2752 100644 +--- a/plug-ins/file-tiff/file-tiff-load.c ++++ b/plug-ins/file-tiff/file-tiff-load.c +@@ -1297,8 +1297,8 @@ load_image (GFile *file, + + /* any resolution info in the file? */ + { +- gfloat xres = 72.0; +- gfloat yres = 72.0; ++ gdouble xres = 72.0; ++ gdouble yres = 72.0; + gushort read_unit; + GimpUnit unit = GIMP_UNIT_PIXEL; /* invalid unit */ + + diff --git a/gnu/packages/patches/linuxdcpp-openssl-1.1.patch b/gnu/packages/patches/linuxdcpp-openssl-1.1.patch deleted file mode 100644 index 6f9912afd8..0000000000 --- a/gnu/packages/patches/linuxdcpp-openssl-1.1.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/dcpp/CryptoManager.cpp.orig 2011-04-17 17:57:09 UTC -+++ b/dcpp/CryptoManager.cpp -@@ -107,12 +107,20 @@ CryptoManager::CryptoManager() - }; - - if(dh) { -- dh->p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0); -- dh->g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0); -+ BIGNUM *p, *g; - -- if (!dh->p || !dh->g) { -+ p = BN_bin2bn(dh4096_p, sizeof(dh4096_p), 0); -+ g = BN_bin2bn(dh4096_g, sizeof(dh4096_g), 0); -+ -+ if (!p || !g) { - dh.reset(); - } else { -+#if OPENSSL_VERSION_NUMBER < 0x10100005L -+ dh->p = p; -+ dh->g = g; -+#else -+ DH_set0_pqg(dh, p, NULL, g); -+#endif - SSL_CTX_set_options(serverContext, SSL_OP_SINGLE_DH_USE); - SSL_CTX_set_options(serverVerContext, SSL_OP_SINGLE_DH_USE); - SSL_CTX_set_tmp_dh(serverContext, (DH*)dh); diff --git a/gnu/packages/patches/nss-3.115-disable-broken-tests.patch b/gnu/packages/patches/nss-3.115-disable-broken-tests.patch new file mode 100644 index 0000000000..2cb3a6be7b --- /dev/null +++ b/gnu/packages/patches/nss-3.115-disable-broken-tests.patch @@ -0,0 +1,34 @@ +These tests are broken in 3.101.3. + +See https://bugzilla.mozilla.org/show_bug.cgi?id=1964304 + +--- nss-3.113.orig/nss/tests/tools/tools.sh 2025-08-25 16:49:02.402086648 -0700 ++++ nss-3.113/nss/tests/tools/tools.sh 2025-08-25 16:49:23.677993887 -0700 +@@ -550,27 +550,6 @@ + html_msg $ret 0 "Importing private key pbmac1 hmac-sha-512 from PKCS#12 file" + check_tmpfile + +- echo "${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-bad-iter.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I" +- ${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-bad-iter.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I 2>&1 +- ret=$? +- html_msg $ret 19 "Fail to list private key with bad iterator" +- check_tmpfile +- +- echo "${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-bad-salt.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I" +- ${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-bad-salt.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I 2>&1 +- ret=$? +- echo "Fail to list private key with bad salt val=$ret" +- html_msg $ret 19 "Fail to import private key with bad salt" +- check_tmpfile +- +- echo "${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-no-length.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I " +- ${BINDIR}/pk12util -l ${TOOLSDIR}/data/pbmac1-invalid-no-length.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -W '1234' -I 2>&1 +- ret=$? +- echo "Fail to import private key with no length val=$ret" +- html_msg $ret 19 "Fail to import private key with no length" +- check_tmpfile +-} +- + ############################## tools_p12 ############################### + # local shell function to test basic functionality of pk12util + ######################################################################## diff --git a/gnu/packages/patches/nss-3.115-disable-pkix-ocsp-tests.patch b/gnu/packages/patches/nss-3.115-disable-pkix-ocsp-tests.patch new file mode 100644 index 0000000000..d8e489883c --- /dev/null +++ b/gnu/packages/patches/nss-3.115-disable-pkix-ocsp-tests.patch @@ -0,0 +1,13 @@ +These tests require network. + +diff -x .svn -x .git -urN nss-3.113.orig/nss/tests/ssl/ssl.sh nss-3.113/nss/tests/ssl/ssl.sh +--- nss-3.113.orig/nss/tests/ssl/ssl.sh 2025-08-25 16:49:02.398086665 -0700 ++++ nss-3.113/nss/tests/ssl/ssl.sh 2025-08-26 15:46:11.718401605 -0700 +@@ -1600,7 +1600,6 @@ + if using_sql ; then + ssl_policy_listsuites + ssl_policy_selfserv +- ssl_policy_pkix_ocsp + ssl_policy + fi + ;;
\ No newline at end of file diff --git a/gnu/packages/patches/zig-0.15-fix-runpath.patch b/gnu/packages/patches/zig-0.15-fix-runpath.patch new file mode 100644 index 0000000000..7216c97b57 --- /dev/null +++ b/gnu/packages/patches/zig-0.15-fix-runpath.patch @@ -0,0 +1,122 @@ +From d35c341322f6e84607350058007bd5be3d1d294a Mon Sep 17 00:00:00 2001 +From: Hilton Chain <hako@ultrarare.space> +Date: Fri, 29 Nov 2024 14:13:46 +0800 +Subject: [PATCH] Fix RUNPATH issue. + +Add needed libraries and libc to RUNPATH when CROSS_LIBRARY_PATH or LIBRARY_PATH +is set. +--- + lib/std/Build/Step/Compile.zig | 2 ++ + src/link/Elf.zig | 7 +++++++ + src/link/Lld.zig | 7 +++++++ + src/main.zig | 34 +++++++++++++++++++++++++++++++++- + 4 files changed, 49 insertions(+), 1 deletion(-) + +diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig +index 79d3694c02..7f6bddbea6 100644 +--- a/lib/std/Build/Step/Compile.zig ++++ b/lib/std/Build/Step/Compile.zig +@@ -794,6 +794,8 @@ fn runPkgConfig(compile: *Compile, lib_name: []const u8) !PkgConfigResult { + try zig_cflags.append(arg); + } else if (mem.startsWith(u8, arg, wl_rpath_prefix)) { + try zig_cflags.appendSlice(&[_][]const u8{ "-rpath", arg[wl_rpath_prefix.len..] }); ++ } else if (mem.startsWith(u8, arg, "-Wl,-rpath=")) { ++ try zig_libs.appendSlice(&[_][]const u8{ "-L", arg["-Wl,-rpath=".len..] }); + } else if (b.debug_pkg_config) { + return compile.step.fail("unknown pkg-config flag '{s}'", .{arg}); + } +diff --git a/src/link/Elf.zig b/src/link/Elf.zig +index 99d0ad71b0..8017f4c088 100644 +--- a/src/link/Elf.zig ++++ b/src/link/Elf.zig +@@ -988,6 +988,13 @@ fn dumpArgvInit(self: *Elf, arena: Allocator) !void { + try argv.appendSlice(gpa, &.{ "-rpath", rpath }); + } + ++ if (std.zig.system.NativePaths.isGuix(arena) and comp.config.link_libc and comp.config.link_mode == .dynamic) { ++ if (self.base.comp.libc_installation) |libc_installation| { ++ try argv.append(gpa, "-rpath"); ++ try argv.append(gpa, libc_installation.crt_dir.?); ++ } ++ } ++ + try argv.appendSlice(gpa, &.{ + "-z", + try std.fmt.allocPrint(arena, "stack-size={d}", .{self.base.stack_size}), +diff --git a/src/link/Lld.zig b/src/link/Lld.zig +index 48872f7077..814f661692 100644 +--- a/src/link/Lld.zig ++++ b/src/link/Lld.zig +@@ -1071,6 +1071,13 @@ fn elfLink(lld: *Lld, arena: Allocator) !void { + } + } + ++ if (std.zig.system.NativePaths.isGuix(arena) and comp.config.link_libc and link_mode == .dynamic) { ++ if (comp.libc_installation) |libc_installation| { ++ try argv.append("-rpath"); ++ try argv.append(libc_installation.crt_dir.?); ++ } ++ } ++ + if (have_dynamic_linker and + (comp.config.link_libc or comp.root_mod.resolved_target.is_explicit_dynamic_linker)) + { +diff --git a/src/main.zig b/src/main.zig +index 02b1b8f84b..ddc4ae8014 100644 +--- a/src/main.zig ++++ b/src/main.zig +@@ -3910,7 +3910,7 @@ fn createModule( + create_module.want_native_include_dirs = true; + } + +- if (create_module.each_lib_rpath orelse resolved_target.is_native_os) { ++ if (create_module.each_lib_rpath orelse false) { + try create_module.rpath_list.ensureUnusedCapacity(arena, create_module.lib_directories.items.len); + for (create_module.lib_directories.items) |lib_directory| { + create_module.rpath_list.appendAssumeCapacity(lib_directory.path.?); +@@ -3982,6 +3982,28 @@ fn createModule( + else => {}, + }; + ++ if (std.zig.system.NativePaths.isGuix(arena)) { ++ for (create_module.link_inputs.items) |link_input| { ++ if (link_input.path()) |lib| { ++ const lib_name = lib.sub_path; ++ if (Compilation.classifyFileExt(lib_name) == .shared_library) { ++ if (fs.path.isAbsolute(lib_name)) { ++ const lib_dir_path = fs.path.dirname(lib_name).?; ++ try create_module.rpath_list.append(arena, lib_dir_path); ++ continue; ++ } ++ for (create_module.lib_directories.items) |lib_dir| { ++ const lib_dir_path = lib_dir.path.?; ++ if (try libPathExists(arena, lib_dir_path, lib_name)) { ++ try create_module.rpath_list.append(arena, lib_dir_path); ++ break; ++ } ++ } ++ } ++ } ++ } ++ } ++ + create_module.resolved_options = Compilation.Config.resolve(create_module.opts) catch |err| switch (err) { + error.WasiExecModelRequiresWasi => fatal("only WASI OS targets support execution model", .{}), + error.SharedMemoryIsWasmOnly => fatal("only WebAssembly CPU targets support shared memory", .{}), +@@ -7633,3 +7655,13 @@ fn addLibDirectoryWarn2( + .path = path, + }); + } ++ ++fn libPathExists(arena: Allocator, lib_dir_path: []const u8, lib_name: []const u8) !bool { ++ const lib_path = try std.fmt.allocPrint(arena, "{s}{s}{s}", .{ ++ lib_dir_path, ++ fs.path.sep_str, ++ lib_name, ++ }); ++ fs.cwd().access(lib_path, .{}) catch return false; ++ return true; ++} +-- +2.50.1 + |