From 002186c0167df82afbd07a2cffabcd803fcc0d85 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 23 Dec 2021 22:08:36 +0000 Subject: [PATCH 1/6] Document log files having their creation date appended. --- data/example.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/example.conf b/data/example.conf index 67d60e3b9..1c0d5a01f 100644 --- a/data/example.conf +++ b/data/example.conf @@ -660,6 +660,8 @@ log * - a channel name * - a filename * - globops + * + * If you specify a filename the current date in the format ".YYYYMMDD" will be appended to the path. */ target = "services.log" From 66bf55fb7fe5cc9d9f2b1e359dcb115ea527fc29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hendrik=20J=C3=A4ger?= Date: Mon, 20 Dec 2021 12:58:13 +0100 Subject: [PATCH 2/6] Fix missing spaces in de_DE --- language/anope.de_DE.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/anope.de_DE.po b/language/anope.de_DE.po index ff238f43a..4b85b154e 100644 --- a/language/anope.de_DE.po +++ b/language/anope.de_DE.po @@ -10935,12 +10935,12 @@ msgstr "" #: modules/commands/cs_invite.cpp:76 #, fuzzy, c-format msgid "You have been invited to %s by %s." -msgstr "Du wurdest zu %seingeladen." +msgstr "Du wurdest zu %s eingeladen." #: modules/commands/cs_invite.cpp:81 #, c-format msgid "You have been invited to %s." -msgstr "Du wurdest zu %seingeladen." +msgstr "Du wurdest zu %s eingeladen." #: modules/protocol/ratbox.cpp:166 modules/commands/ns_recover.cpp:96 #, c-format From 69dbcba069db62393f2aa2868662a7fd2073d31b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 28 Dec 2021 11:45:32 +0000 Subject: [PATCH 3/6] Allow specifying multiple dependency libraries like foo|bar. --- cmake/Anope.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake index 44b4ea3ba..488d0f4f1 100644 --- a/cmake/Anope.cmake +++ b/cmake/Anope.cmake @@ -445,12 +445,18 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS) string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY}) # Iterate through the libraries given foreach(LIBRARY ${REQUIRED_LIBRARY}) + # If the library has multiple names extract the alternate. + unset(LIBRARY_ALT) + if (${LIBRARY} MATCHES "^.+\\|.+$") + string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY}) + string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY}) + endif(${LIBRARY} MATCHES "^.+\\|.+$") # Locate the library to see if it exists if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) - find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS}) + find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS}) else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) - find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH) - find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS}) + find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH) + find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS}) endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) # If the library was found, we will add it to the linker flags if(FOUND_${LIBRARY}_LIBRARY) From 7a28d81b441e5c29f0e0a988306f7c5988bf20c6 Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Tue, 28 Dec 2021 20:11:54 +0100 Subject: [PATCH 4/6] Reflect OpenLDAP 2.5 upstream change from libldap_r to libldap Starting with OpenLDAP 2.5 upstream decided to merge the non-threaded libldap_r library into the threaded libldap library. And starting with OpenLDAP 2.6 common Linux distributions such as Fedora do not ship the compatibility symbolic link anymore (which leads to a build failure), thus the linking tests for libldap_r and uses alternatively libldap. See also: - https://lists.openldap.org/hyperkitty/list/openldap-announce@openldap.org/thread/BH3VDPG6IYYF5L5U6LZGHHKMJY5HFA3L/ - https://bugzilla.redhat.com/show_bug.cgi?id=2032707 --- modules/extra/m_ldap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 34f1310c4..a462c46b1 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -9,8 +9,8 @@ * Based on the original code of Services by Andy Church. */ -/* RequiredLibraries: ldap_r,lber */ -/* RequiredWindowsLibraries: libldap_r,liblber */ +/* RequiredLibraries: ldap_r|ldap,lber */ +/* RequiredWindowsLibraries: libldap_r|libldap,liblber */ #include "module.h" #include "modules/ldap.h" From a1a1b3ad018c7a54b82a2b0f4dcbac9691f6ba8b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 28 Dec 2021 19:16:47 +0000 Subject: [PATCH 5/6] Add a build time check that OpenLDAP is reentrant. --- modules/extra/m_ldap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index a462c46b1..1005d2efe 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -16,6 +16,11 @@ #include "modules/ldap.h" #include +#if defined LDAP_API_FEATURE_X_OPENLDAP_REENTRANT && !LDAP_API_FEATURE_X_OPENLDAP_REENTRANT +# error Anope requires OpenLDAP to be built as reentrant. +#endif + + class LDAPService; static Pipe *me; From 2c18601d8f3a3b5ab8ddb3ecdd90a2c69c7fbc88 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 28 Dec 2021 21:18:22 +0000 Subject: [PATCH 6/6] Fix linking against libraries by their alternate name. --- cmake/Anope.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake index 488d0f4f1..1b924bc5d 100644 --- a/cmake/Anope.cmake +++ b/cmake/Anope.cmake @@ -460,15 +460,17 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS) endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR}) # If the library was found, we will add it to the linker flags if(FOUND_${LIBRARY}_LIBRARY) - # Get the path only of the library, to add it to linker flags - get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH) if(MSVC) # For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies append_to_list(EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}") else(MSVC) - # For all others, add the library paths and libraries + # Get the path only of the library, to add it to library paths. + get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH) append_to_list(LIBRARY_PATHS "${LIBRARY_PATH}") - append_to_list(LIBRARIES "${LIBRARY}") + # Extract the library short name, add it to the library path + get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE) + string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME}) + append_to_list(LIBRARIES ${LIBRARY_NAME}) endif(MSVC) else(FOUND_${LIBRARY}_LIBRARY) # In the case of the library not being found, we fatally error so CMake stops trying to generate