* origin/staging-next: (62 commits) Re-Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)" openldap: fix cross-compilation makeBinaryWrapper: fix codesign on aarch64-darwin python3Packages.ldap: fix linking with openldap 2.5+ Revert "lua: fix on darwin by using makeBinaryWrapper (#172749)" wine: enable parallel build again pkgsi686Linux.gdb: fix formatting for 32-bit systems gtk4: Fix incorrect merge nixos/openldap: use upstream unit defaults openldap: update maintainers openldap: 2.4.58 -> 2.6.2 Revert "Add mingwW64-llvm cross-system." lua: fix on darwin by using makeBinaryWrapper (#172749) python310Packages.python-mimeparse: execute tests pandas: fix darwin build gtk3: 3.24.33 -> 3.24.33-2022-03-11 gtk4: patch fixing g-c-c crashes e2fsprogs: patch for CVE-2022-1304 firefox-unwrapped: fix cross compilation rustc: expose correct llvmPackages for cross compile ...main
commit
3673f148b3
@ -0,0 +1,26 @@ |
||||
{ stdenv |
||||
, lib |
||||
, makeSetupHook |
||||
, dieHook |
||||
, writeShellScript |
||||
, tests |
||||
, cc ? stdenv.cc |
||||
, sanitizers ? [] |
||||
}: |
||||
|
||||
makeSetupHook { |
||||
deps = [ dieHook ] |
||||
# https://github.com/NixOS/nixpkgs/issues/148189 |
||||
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) cc; |
||||
|
||||
substitutions = { |
||||
cc = "${cc}/bin/cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}"; |
||||
|
||||
# Extract the function call used to create a binary wrapper from its embedded docstring |
||||
passthru.extractCmd = writeShellScript "extract-binary-wrapper-cmd" '' |
||||
strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p' |
||||
''; |
||||
|
||||
passthru.tests = tests.makeBinaryWrapper; |
||||
}; |
||||
} ./make-binary-wrapper.sh |
@ -0,0 +1,94 @@ |
||||
From 3593e2c299c0ac0402f23d44cdbe8e6ff3687b68 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= <ondra@mistotebe.net>
|
||||
Date: Thu, 27 Jan 2022 10:35:56 +0000
|
||||
Subject: [PATCH] Check whether libldap is threadsafe on startup.
|
||||
|
||||
Closes #432
|
||||
---
|
||||
Lib/ldap/constants.py | 2 --
|
||||
Modules/constants.c | 10 ++++++++++
|
||||
setup.cfg | 6 ++++--
|
||||
setup.py | 1 -
|
||||
4 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Lib/ldap/constants.py b/Lib/ldap/constants.py
|
||||
index 1c1d76a..f76609b 100644
|
||||
--- a/Lib/ldap/constants.py
|
||||
+++ b/Lib/ldap/constants.py
|
||||
@@ -341,9 +341,7 @@ CONSTANTS = (
|
||||
# XXX - these should be errors
|
||||
Int('URL_ERR_BADSCOPE'),
|
||||
Int('URL_ERR_MEM'),
|
||||
- # Int('LIBLDAP_R'),
|
||||
|
||||
- Feature('LIBLDAP_R', 'HAVE_LIBLDAP_R'),
|
||||
Feature('SASL_AVAIL', 'HAVE_SASL'),
|
||||
Feature('TLS_AVAIL', 'HAVE_TLS'),
|
||||
Feature('INIT_FD_AVAIL', 'HAVE_LDAP_INIT_FD'),
|
||||
diff --git a/Modules/constants.c b/Modules/constants.c
|
||||
index 07d6065..8d6f63b 100644
|
||||
--- a/Modules/constants.c
|
||||
+++ b/Modules/constants.c
|
||||
@@ -197,6 +197,8 @@ int
|
||||
LDAPinit_constants(PyObject *m)
|
||||
{
|
||||
PyObject *exc, *nobj;
|
||||
+ struct ldap_apifeature_info info = { 1, "X_OPENLDAP_THREAD_SAFE", 0 };
|
||||
+ int thread_safe = 0;
|
||||
|
||||
/* simple constants */
|
||||
|
||||
@@ -221,6 +223,14 @@ LDAPinit_constants(PyObject *m)
|
||||
return -1;
|
||||
Py_INCREF(LDAPexception_class);
|
||||
|
||||
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE
|
||||
+ if (ldap_get_option(NULL, LDAP_OPT_API_FEATURE_INFO, &info) == LDAP_SUCCESS) {
|
||||
+ thread_safe = (info.ldapaif_version == 1);
|
||||
+ }
|
||||
+#endif
|
||||
+ if (PyModule_AddIntConstant(m, "LIBLDAP_R", thread_safe) != 0)
|
||||
+ return -1;
|
||||
+
|
||||
/* Generated constants -- see Lib/ldap/constants.py */
|
||||
|
||||
#define add_err(n) do { \
|
||||
diff --git a/setup.cfg b/setup.cfg
|
||||
index 2e372ba..a75f186 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -5,7 +5,9 @@ license_file = LICENCE
|
||||
defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
|
||||
extra_compile_args =
|
||||
extra_objects =
|
||||
-libs = ldap_r lber
|
||||
+# Uncomment this if your libldap is not thread-safe and you need libldap_r
|
||||
+# instead
|
||||
+#libs = ldap_r lber
|
||||
|
||||
[install]
|
||||
compile = 1
|
||||
@@ -13,7 +15,7 @@ optimize = 1
|
||||
|
||||
[bdist_rpm]
|
||||
provides = python-ldap
|
||||
-requires = python libldap-2_4
|
||||
+requires = python libldap-2
|
||||
vendor = python-ldap project
|
||||
packager = python-ldap team
|
||||
distribution_name = openSUSE 11.x
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 119b571..b193957 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -132,7 +132,6 @@ setup(
|
||||
extra_objects = LDAP_CLASS.extra_objects,
|
||||
runtime_library_dirs = (not sys.platform.startswith("win"))*LDAP_CLASS.library_dirs,
|
||||
define_macros = LDAP_CLASS.defines + \
|
||||
- ('ldap_r' in LDAP_CLASS.libs or 'oldap_r' in LDAP_CLASS.libs)*[('HAVE_LIBLDAP_R',None)] + \
|
||||
('sasl' in LDAP_CLASS.libs or 'sasl2' in LDAP_CLASS.libs or 'libsasl' in LDAP_CLASS.libs)*[('HAVE_SASL',None)] + \
|
||||
('ssl' in LDAP_CLASS.libs and 'crypto' in LDAP_CLASS.libs)*[('HAVE_TLS',None)] + \
|
||||
[
|
||||
--
|
||||
2.36.0
|
||||
|
@ -0,0 +1,36 @@ |
||||
From 99852365513266afdd793289813e8e565186c9e6 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Wed, 23 Mar 2022 11:39:49 +0000
|
||||
Subject: [PATCH] dlltool: Use the output name as basis for deterministic temp
|
||||
prefixes
|
||||
|
||||
PR 28885
|
||||
* dlltool.c (main): use imp_name rather than dll_name when
|
||||
generating a temporary file name.
|
||||
---
|
||||
binutils/ChangeLog | 9 +++++++++
|
||||
binutils/dlltool.c | 7 ++++---
|
||||
2 files changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
|
||||
index d95bf3f5470..89871510b45 100644
|
||||
--- a/binutils/dlltool.c
|
||||
+++ b/binutils/dlltool.c
|
||||
@@ -3992,10 +3992,11 @@ main (int ac, char **av)
|
||||
if (tmp_prefix == NULL)
|
||||
{
|
||||
/* If possible use a deterministic prefix. */
|
||||
- if (dll_name)
|
||||
+ if (imp_name || delayimp_name)
|
||||
{
|
||||
- tmp_prefix = xmalloc (strlen (dll_name) + 2);
|
||||
- sprintf (tmp_prefix, "%s_", dll_name);
|
||||
+ const char *input = imp_name ? imp_name : delayimp_name;
|
||||
+ tmp_prefix = xmalloc (strlen (input) + 2);
|
||||
+ sprintf (tmp_prefix, "%s_", input);
|
||||
for (i = 0; tmp_prefix[i]; i++)
|
||||
if (!ISALNUM (tmp_prefix[i]))
|
||||
tmp_prefix[i] = '_';
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,68 @@ |
||||
Fix iWerror=format build for 32-bit systems.
|
||||
https://sourceware.org/pipermail/gdb-patches/2022-May/189288.html
|
||||
--- a/sim/cris/sim-if.c
|
||||
+++ b/sim/cris/sim-if.c
|
||||
@@ -257,7 +257,8 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
|
||||
|
||||
if (verbose)
|
||||
sim_io_printf (sd,
|
||||
- "Loading segment at 0x%" BFD_VMA_FMT "x, size 0x%lx\n",
|
||||
+ "Loading segment at 0x%" BFD_VMA_FMT "x, "
|
||||
+ "size 0x%" BFD_VMA_FMT "x\n",
|
||||
lma, phdr[i].p_filesz);
|
||||
|
||||
if (bfd_seek (abfd, phdr[i].p_offset, SEEK_SET) != 0
|
||||
@@ -265,7 +266,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
|
||||
{
|
||||
sim_io_eprintf (sd,
|
||||
"%s: could not read segment at 0x%" BFD_VMA_FMT "x, "
|
||||
- "size 0x%lx\n",
|
||||
+ "size 0x%" BFD_VMA_FMT "x\n",
|
||||
STATE_MY_NAME (sd), lma, phdr[i].p_filesz);
|
||||
free (buf);
|
||||
return FALSE;
|
||||
@@ -275,7 +276,7 @@ cris_load_elf_file (SIM_DESC sd, struct bfd *abfd, sim_write_fn do_write)
|
||||
{
|
||||
sim_io_eprintf (sd,
|
||||
"%s: could not load segment at 0x%" BFD_VMA_FMT "x, "
|
||||
- "size 0x%lx\n",
|
||||
+ "size 0x%" BFD_VMA_FMT "x\n",
|
||||
STATE_MY_NAME (sd), lma, phdr[i].p_filesz);
|
||||
free (buf);
|
||||
return FALSE;
|
||||
@@ -572,7 +573,8 @@ cris_handle_interpreter (SIM_DESC sd, struct bfd *abfd)
|
||||
memory area, so we go via a temporary area. Luckily, the
|
||||
interpreter is supposed to be small, less than 0x40000
|
||||
bytes. */
|
||||
- sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,0x%lx",
|
||||
+ sim_do_commandf (sd, "memory region 0x%" BFD_VMA_FMT "x,"
|
||||
+ "0x%" BFD_VMA_FMT "x",
|
||||
interp_load_addr, interpsiz);
|
||||
|
||||
/* Now that memory for the interpreter is defined, load it. */
|
||||
--- a/sim/m32c/syscalls.c
|
||||
+++ b/sim/m32c/syscalls.c
|
||||
@@ -299,8 +299,8 @@ m32c_syscall (int id)
|
||||
|
||||
rv = gettimeofday (&tv, 0);
|
||||
if (trace)
|
||||
- printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec,
|
||||
- tv.tv_usec, tvaddr);
|
||||
+ printf ("gettimeofday: %lld sec %lld usec to 0x%x\n",
|
||||
+ (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr);
|
||||
mem_put_si (tvaddr, tv.tv_sec);
|
||||
mem_put_si (tvaddr + 4, tv.tv_usec);
|
||||
put_reg (r0, rv);
|
||||
--- a/sim/rx/syscalls.c
|
||||
+++ b/sim/rx/syscalls.c
|
||||
@@ -270,8 +270,8 @@ rx_syscall (int id)
|
||||
|
||||
rv = gettimeofday (&tv, 0);
|
||||
if (trace)
|
||||
- printf ("gettimeofday: %ld sec %ld usec to 0x%x\n", tv.tv_sec,
|
||||
- tv.tv_usec, tvaddr);
|
||||
+ printf ("gettimeofday: %lld sec %lld usec to 0x%x\n",
|
||||
+ (long long)tv.tv_sec, (long long)tv.tv_usec, tvaddr);
|
||||
mem_put_si (tvaddr, tv.tv_sec);
|
||||
mem_put_si (tvaddr + 4, tv.tv_usec);
|
||||
put_reg (1, rv);
|
@ -1,24 +1,17 @@ |
||||
diff -ur a/gdb/main.c b/gdb/main.c
|
||||
--- a/gdb/main.c 2020-02-08 13:50:14.000000000 +0100
|
||||
+++ b/gdb/main.c 2020-02-24 10:02:07.731806739 +0100
|
||||
@@ -567,9 +567,17 @@
|
||||
gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
|
||||
}
|
||||
--- a/gdb/main.c
|
||||
+++ b/gdb/main.c
|
||||
@@ -708,8 +708,12 @@ captured_main_1 (struct captured_main_args *context)
|
||||
if (gdb_sysroot.empty ())
|
||||
gdb_sysroot = TARGET_SYSROOT_PREFIX;
|
||||
|
||||
- debug_file_directory
|
||||
- = xstrdup (relocate_gdb_directory (DEBUGDIR,
|
||||
- DEBUGDIR_RELOCATABLE).c_str ());
|
||||
+ debug_file_directory = getenv ("NIX_DEBUG_INFO_DIRS");
|
||||
+ if (debug_file_directory != NULL)
|
||||
+ // This might be updated later using
|
||||
+ // $ set debug-file-directory /to/some/path
|
||||
+ // which will use xfree. We must then have a xmallocated
|
||||
+ // copy of the string that can be xfeed later.
|
||||
+ debug_file_directory = xstrdup (debug_file_directory);
|
||||
- = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE);
|
||||
+ const char * nix_debug = getenv ("NIX_DEBUG_INFO_DIRS");
|
||||
+ if (nix_debug != NULL)
|
||||
+ debug_file_directory = nix_debug;
|
||||
+ else
|
||||
+ debug_file_directory
|
||||
+ = xstrdup (relocate_gdb_directory (DEBUGDIR,
|
||||
+ DEBUGDIR_RELOCATABLE).c_str ());
|
||||
+ = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE);
|
||||
|
||||
gdb_datadir = relocate_gdb_directory (GDB_DATADIR,
|
||||
GDB_DATADIR_RELOCATABLE);
|
||||
|
Loading…
Reference in new issue