diff options
Diffstat (limited to 'devel/dbus/files')
-rw-r--r-- | devel/dbus/files/patch-Makefile.in | 11 | ||||
-rw-r--r-- | devel/dbus/files/patch-cmake_ConfigureChecks.cmake | 18 | ||||
-rw-r--r-- | devel/dbus/files/patch-cmake_DBus1Config.pkgconfig.in | 13 | ||||
-rw-r--r-- | devel/dbus/files/patch-cmake_config.h.cmake | 15 | ||||
-rw-r--r-- | devel/dbus/files/patch-configure | 25 | ||||
-rw-r--r-- | devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c | 95 |
6 files changed, 6 insertions, 171 deletions
diff --git a/devel/dbus/files/patch-Makefile.in b/devel/dbus/files/patch-Makefile.in deleted file mode 100644 index ab137db64f19..000000000000 --- a/devel/dbus/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2020-03-27 09:19:12 UTC -+++ Makefile.in -@@ -508,7 +508,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --SUBDIRS = dbus bus tools test doc -+SUBDIRS = dbus bus tools doc - pkgconfigdir = $(libdir)/pkgconfig - pkgconfig_DATA = dbus-1.pc - cmakeconfigdir = $(libdir)/cmake/DBus1 diff --git a/devel/dbus/files/patch-cmake_ConfigureChecks.cmake b/devel/dbus/files/patch-cmake_ConfigureChecks.cmake deleted file mode 100644 index eb301120f17e..000000000000 --- a/devel/dbus/files/patch-cmake_ConfigureChecks.cmake +++ /dev/null @@ -1,18 +0,0 @@ ---- cmake/ConfigureChecks.cmake.orig 2024-01-01 18:36:58 UTC -+++ cmake/ConfigureChecks.cmake -@@ -17,6 +17,7 @@ check_include_file(io.h HAVE_IO_H) # inte - check_include_file(grp.h HAVE_GRP_H) # dbus-sysdeps-util-win.c - check_include_file(inttypes.h HAVE_INTTYPES_H) # dbus-pipe.h - check_include_file(io.h HAVE_IO_H) # internal -+check_include_file(linux/close_range.h HAVE_LINUX_CLOSE_RANGE_H) - check_include_file(locale.h HAVE_LOCALE_H) - check_include_file(memory.h HAVE_MEMORY_H) - check_include_file(signal.h HAVE_SIGNAL_H) -@@ -31,6 +32,7 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H) - check_include_file(sys/random.h HAVE_SYS_RANDOM_H) - check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H) - check_include_file(sys/stat.h HAVE_SYS_STAT_H) -+check_include_file(sys/syscall.h HAVE_SYS_SYSCALL_H) - check_include_file(sys/types.h HAVE_SYS_TYPES_H) - check_include_file(sys/uio.h HAVE_SYS_UIO_H) - check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H) diff --git a/devel/dbus/files/patch-cmake_DBus1Config.pkgconfig.in b/devel/dbus/files/patch-cmake_DBus1Config.pkgconfig.in deleted file mode 100644 index cf9b0e58b41f..000000000000 --- a/devel/dbus/files/patch-cmake_DBus1Config.pkgconfig.in +++ /dev/null @@ -1,13 +0,0 @@ -Fix location of pkgconfig directory on FreeBSD. - ---- cmake/DBus1Config.pkgconfig.in.orig 2022-10-02 14:06:53 UTC -+++ cmake/DBus1Config.pkgconfig.in -@@ -8,7 +8,7 @@ - # [1] This variable is not required if DBus1_LIBRARIES is added - # to a target with target_link_libraries - --get_filename_component(DBus1_PKGCONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/../../pkgconfig" ABSOLUTE) -+get_filename_component(DBus1_PKGCONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../libdata/pkgconfig" ABSOLUTE) - get_filename_component(DBus1_NEARBY_ARCH_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../dbus-1.0/include" ABSOLUTE) - find_package(PkgConfig) - if(DEFINED ENV{PKG_CONFIG_DIR}) diff --git a/devel/dbus/files/patch-cmake_config.h.cmake b/devel/dbus/files/patch-cmake_config.h.cmake deleted file mode 100644 index c256ee2c6fbd..000000000000 --- a/devel/dbus/files/patch-cmake_config.h.cmake +++ /dev/null @@ -1,15 +0,0 @@ ---- cmake/config.h.cmake.orig 2022-10-02 14:06:53 UTC -+++ cmake/config.h.cmake -@@ -198,6 +198,12 @@ - /* Define to 1 if you have clearenv */ - #cmakedefine HAVE_CLEARENV 1 - -+/* Define to 1 if you have closefrom */ -+#cmakedefine HAVE_CLOSEFROM 1 -+ -+/* Define to 1 if you have close_range */ -+#cmakedefine HAVE_CLOSE_RANGE 1 -+ - /* Define to 1 if you have writev */ - #cmakedefine HAVE_WRITEV 1 - diff --git a/devel/dbus/files/patch-configure b/devel/dbus/files/patch-configure deleted file mode 100644 index 8b8b5d8d13b9..000000000000 --- a/devel/dbus/files/patch-configure +++ /dev/null @@ -1,25 +0,0 @@ ---- configure.orig 2023-09-01 14:31:27 UTC -+++ configure -@@ -3419,6 +3419,8 @@ as_fn_append ac_func_c_list " clearenv HAVE_CLEARENV" - as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" - as_fn_append ac_func_c_list " accept4 HAVE_ACCEPT4" - as_fn_append ac_func_c_list " clearenv HAVE_CLEARENV" -+as_fn_append ac_func_c_list " close_range HAVE_CLOSE_RANGE" -+as_fn_append ac_func_c_list " closefrom HAVE_CLOSEFROM" - as_fn_append ac_func_c_list " fpathconf HAVE_FPATHCONF" - as_fn_append ac_func_c_list " getgrouplist HAVE_GETGROUPLIST" - as_fn_append ac_func_c_list " getpeereid HAVE_GETPEEREID" -@@ -3449,11 +3451,13 @@ as_fn_append ac_header_c_list " errno.h errno_h HAVE_E - as_fn_append ac_header_c_list " crt_externs.h crt_externs_h HAVE_CRT_EXTERNS_H" - as_fn_append ac_header_c_list " dirent.h dirent_h HAVE_DIRENT_H" - as_fn_append ac_header_c_list " errno.h errno_h HAVE_ERRNO_H" -+as_fn_append ac_header_c_list " linux/close_range.h linux_close_range_h HAVE_LINUX_CLOSE_RANGE_H" - as_fn_append ac_header_c_list " locale.h locale_h HAVE_LOCALE_H" - as_fn_append ac_header_c_list " signal.h signal_h HAVE_SIGNAL_H" - as_fn_append ac_header_c_list " sys/prctl.h sys_prctl_h HAVE_SYS_PRCTL_H" - as_fn_append ac_header_c_list " sys/random.h sys_random_h HAVE_SYS_RANDOM_H" - as_fn_append ac_header_c_list " sys/resource.h sys_resource_h HAVE_SYS_RESOURCE_H" -+as_fn_append ac_header_c_list " sys/syscall.h sys_syscall_h HAVE_SYS_SYSCALL_H" - as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" - as_fn_append ac_header_c_list " ws2tcpip.h ws2tcpip_h HAVE_WS2TCPIP_H" - as_fn_append ac_func_c_list " getpwnam_r HAVE_GETPWNAM_R" diff --git a/devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c b/devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c index d8671714af28..015ab3167155 100644 --- a/devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c +++ b/devel/dbus/files/patch-dbus_dbus-sysdeps-unix.c @@ -1,14 +1,6 @@ ---- dbus/dbus-sysdeps-unix.c.orig 2023-08-16 10:29:50 UTC +--- dbus/dbus-sysdeps-unix.c.orig 2024-12-16 12:21:54 UTC +++ dbus/dbus-sysdeps-unix.c -@@ -37,6 +37,7 @@ - #include "dbus-credentials.h" - #include "dbus-nonce.h" - -+#include <limits.h> - #include <sys/types.h> - #include <stdlib.h> - #include <string.h> -@@ -59,9 +60,16 @@ +@@ -62,6 +62,10 @@ #include <grp.h> #include <arpa/inet.h> @@ -19,48 +11,11 @@ #ifdef HAVE_ERRNO_H #include <errno.h> #endif -+#ifdef HAVE_LINUX_CLOSE_RANGE_H -+#include <linux/close_range.h> -+#endif - #ifdef HAVE_SYSLOG_H - #include <syslog.h> - #endif -@@ -80,6 +88,9 @@ - #ifdef HAVE_SYS_RANDOM_H - #include <sys/random.h> - #endif -+#ifdef HAVE_SYS_SYSCALL_H -+#include <sys/syscall.h> -+#endif - - #ifdef HAVE_ADT - #include <bsm/adt.h> -@@ -137,6 +148,21 @@ - - #endif /* Solaris */ - -+#if defined(__linux__) && defined(__NR_close_range) && !defined(HAVE_CLOSE_RANGE) -+/* The kernel headers are new enough to have the close_range syscall, -+ * but glibc isn't new enough to have the syscall wrapper, so call the -+ * syscall directly. */ -+static inline int -+close_range (unsigned int first, -+ unsigned int last, -+ unsigned int flags) -+{ -+ return syscall (__NR_close_range, first, last, flags); -+} -+/* Now we can call that inline wrapper as though it was provided by glibc. */ -+#define HAVE_CLOSE_RANGE -+#endif -+ - /** - * Ensure that the standard file descriptors stdin, stdout and stderr - * are open, by opening /dev/null if necessary. -@@ -2325,6 +2351,25 @@ _dbus_read_credentials_socket (DBusSocket clien +@@ -2372,6 +2376,25 @@ _dbus_read_credentials_socket (DBusSocket clien + { pid_read = cr.unp_pid; uid_read = cr.unp_euid; - } ++ } +#elif defined(LOCAL_PEERCRED) + struct xucred cr; + socklen_t cr_len = sizeof (cr); @@ -79,44 +34,6 @@ + { + pid_read = cr.cr_pid; + uid_read = cr.cr_uid; -+ } + } #elif defined(HAVE_CMSGCRED) /* We only check for HAVE_CMSGCRED, but we're really assuming that the - * presence of that struct implies SCM_CREDS. Supported by at least -@@ -4791,7 +4836,24 @@ _dbus_close_all (void) - void - _dbus_close_all (void) - { -+#ifdef HAVE_CLOSE_RANGE -+ if (close_range (3, INT_MAX, 0) == 0) -+ return; -+#endif -+ -+ /* Some library implementations of closefrom() are not async-signal-safe, -+ * and we call _dbus_close_all() after forking, so we only do this on -+ * operating systems where we know that closefrom() is a system call */ -+#if defined(HAVE_CLOSEFROM) && ( \ -+ defined(__FreeBSD__) || \ -+ defined(__NetBSD__) || \ -+ defined(__OpenBSD__) || \ -+ defined(__sun__) && defined(F_CLOSEFROM) \ -+) -+ closefrom (3); -+#else - act_on_fds_3_and_up (close_ignore_error); -+#endif - } - - /** -@@ -4801,6 +4863,11 @@ _dbus_fd_set_all_close_on_exec (void) - void - _dbus_fd_set_all_close_on_exec (void) - { -+#if defined(HAVE_CLOSE_RANGE) && defined(CLOSE_RANGE_CLOEXEC) -+ if (close_range (3, INT_MAX, CLOSE_RANGE_CLOEXEC) == 0) -+ return; -+#endif -+ - act_on_fds_3_and_up (_dbus_fd_set_close_on_exec); - } - |