1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

Compare commits

...

12 Commits

Author SHA1 Message Date
Sébastien Helleu b62c87d9eb Version 4.5.1 2024-12-23 08:47:56 +01:00
Sébastien Helleu 18be2b3151 core: fix typo in ChangeLog 2024-12-23 08:37:06 +01:00
Sébastien Helleu 8a9a652d03 relay: fix description of relay clients after /upgrade 2024-12-22 19:34:31 +01:00
Sébastien Helleu f8c48b8000 relay: fix crash after /upgrade when relay clients are connected 2024-12-22 19:34:29 +01:00
Sébastien Helleu 42c65cebcb api: allow to add empty buffer with function infolist_new_var_buffer
This fixes the following error with `/upgrade` command when relay clients are
connected:

  relay: failed to save upgrade data
2024-12-22 19:34:20 +01:00
Sébastien Helleu c9c57eeee2 Revert "ci: fix macOS CI"
Remove workaround for https://github.com/actions/runner-images/issues/10984

This reverts commit 2555c378a2.
2024-12-22 10:56:07 +01:00
Sébastien Helleu 8c63243941 core: fix detection of dl library (issue #2218)
This fixes the linking to curl and ncurses on macOS.
2024-12-21 18:11:57 +01:00
Sébastien Helleu 732bfe4a48 core: add option POST_BUILD in add_custom_command
This fixes the following CMake warning:

CMake Warning (dev) at src/gui/curses/normal/CMakeLists.txt:73 (add_custom_command):
  Exactly one of PRE_BUILD, PRE_LINK, or POST_BUILD must be given.  Assuming
  POST_BUILD to preserve backward compatibility.

  Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
  Run "cmake --help-policy CMP0175" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.
2024-12-21 18:11:08 +01:00
Sébastien Helleu 46f322c10f logger: fix path displayed when the logs directory can not be created 2024-12-21 17:16:15 +01:00
Sébastien Helleu 52cb5bbbe0 core: update ChangeLog 2024-12-20 07:39:18 +01:00
zeromind b634270f2a perl: set locale only on supported Perl versions
restrict setting the locale only if the Perl version supports it (>=5.27.9)

fixes #2219
2024-12-20 07:38:33 +01:00
Sébastien Helleu f4dbdb93d7 Version 4.5.1-dev 2024-12-20 07:38:14 +01:00
10 changed files with 52 additions and 21 deletions
+1 -3
View File
@@ -381,9 +381,7 @@ jobs:
/usr/local/bin/python3.11 \
/usr/local/bin/python3.11-config \
;
# workaround for https://github.com/actions/runner-images/issues/10984
brew uninstall --ignore-dependencies --force pkg-config@0.29.2
brew install asciidoctor aspell cjson guile lua ruby
brew install asciidoctor aspell cjson guile lua pkg-config ruby
- uses: actions/checkout@v4
+10
View File
@@ -1,5 +1,15 @@
# WeeChat ChangeLog
## Version 4.5.1 (2024-12-23)
### Fixed
- relay: fix crash after `/upgrade` when relay clients are connected
- api: fix creation of empty buffer in function infolist_new_var_buffer
- core: fix detection of dl library ([#2218](https://github.com/weechat/weechat/issues/2218))
- logger: fix path displayed when the logs directory can not be created
- perl: fix build with Perl < 5.7.29 ([#2219](https://github.com/weechat/weechat/issues/2219), [#2220](https://github.com/weechat/weechat/issues/2220))
## Version 4.5.0 (2024-12-15)
### Changed
+1 -3
View File
@@ -247,9 +247,7 @@ find_library(DL_LIBRARY
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
)
if(DL_LIBRARY)
string(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
list(APPEND EXTRA_LIBS dl)
list(APPEND EXTRA_LIBS ${DL_LIBRARY})
endif()
add_subdirectory(icons)
+14 -4
View File
@@ -247,17 +247,27 @@ infolist_new_var_buffer (struct t_infolist_item *item,
{
struct t_infolist_var *new_var;
if (!item || !name || !name[0] || (size <= 0))
if (!item || !name || !name[0])
return NULL;
if (size < 0)
size = 0;
new_var = malloc (sizeof (*new_var));
if (new_var)
{
new_var->name = strdup (name);
new_var->type = INFOLIST_BUFFER;
new_var->value = malloc (size);
if (new_var->value)
memcpy (new_var->value, pointer, size);
if (pointer && (size > 0))
{
new_var->value = malloc (size);
if (new_var->value)
memcpy (new_var->value, pointer, size);
}
else
{
new_var->value = NULL;
}
new_var->size = size;
new_var->prev_var = item->last_var;
+1
View File
@@ -72,6 +72,7 @@ target_link_libraries(${EXECUTABLE}
# It may be removed in future.
add_custom_command(
TARGET ${EXECUTABLE}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E remove -f "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
COMMAND ${CMAKE_COMMAND} -E create_symlink "weechat${CMAKE_EXECUTABLE_SUFFIX}" "weechat-curses${CMAKE_EXECUTABLE_SUFFIX}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
-8
View File
@@ -265,15 +265,7 @@ logger_buffer_create_log_file (struct t_logger_buffer *logger_buffer)
/* create directory */
if (!logger_create_directory ())
{
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to create directory for logs "
"(\"%s\")"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
weechat_config_string (logger_config_file_path));
return 0;
}
if (!logger_buffer->log_filename)
logger_buffer_set_log_filename (logger_buffer);
if (!logger_buffer->log_filename)
+8
View File
@@ -182,7 +182,15 @@ logger_create_directory ()
if (file_path)
{
if (!weechat_mkdir_parents (file_path, 0700))
{
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to create directory for logs "
"(\"%s\")"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
file_path);
rc = 0;
}
free (file_path);
}
else
+8
View File
@@ -579,11 +579,15 @@ weechat_perl_load (const char *filename, const char *code)
wcwidth160 = wcwidth (160);
perl_construct (perl_current_interpreter);
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 28) || (PERL_REVISION == 5 && PERL_VERSION == 27 && PERL_SUBVERSION >= 9)
if (wcwidth (160) != wcwidth160)
{
/* restore the locale that's broken in some versions of Perl */
Perl_setlocale (LC_ALL, "");
}
#else
(void) wcwidth160;
#endif
temp_script.interpreter = (PerlInterpreter *) perl_current_interpreter;
perl_parse (perl_current_interpreter, weechat_perl_api_init,
@@ -1320,11 +1324,15 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
wcwidth160 = wcwidth (160);
perl_construct (perl_main);
#if PERL_REVISION >= 6 || (PERL_REVISION == 5 && PERL_VERSION >= 28) || (PERL_REVISION == 5 && PERL_VERSION == 27 && PERL_SUBVERSION >= 9)
if (wcwidth (160) != wcwidth160)
{
/* restore the locale that's broken in some versions of Perl */
Perl_setlocale (LC_ALL, "");
}
#else
(void) wcwidth160;
#endif
perl_parse (perl_main, weechat_perl_api_init, perl_args_count,
perl_args, NULL);
+7 -1
View File
@@ -1589,7 +1589,8 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
if (new_client)
{
new_client->id = weechat_infolist_integer (infolist, "id");
new_client->desc = NULL;
str = weechat_infolist_string (infolist, "desc");
new_client->desc = (str) ? strdup (str) : NULL;
new_client->sock = weechat_infolist_integer (infolist, "sock");
new_client->server_port = weechat_infolist_integer (infolist, "server_port");
/* "tls" replaces "ssl" in WeeChat 4.0.0 */
@@ -1696,6 +1697,11 @@ relay_client_new_with_infolist (struct t_infolist *infolist)
new_client->partial_ws_frame_size = ws_frame_size;
}
}
else
{
new_client->partial_ws_frame = NULL;
new_client->partial_ws_frame_size = 0;
}
str = weechat_infolist_string (infolist, "partial_message");
new_client->partial_message = (str) ? strdup (str) : NULL;
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
#
weechat_stable="4.5.0"
weechat_devel="4.5.0"
weechat_stable="4.5.1"
weechat_devel="4.5.1"
stable_major=$(echo "${weechat_stable}" | cut -d"." -f1)
stable_minor=$(echo "${weechat_stable}" | cut -d"." -f2)