Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libHX for openSUSE:Factory checked in at 2024-02-23 16:41:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libHX (Old) and /work/SRC/openSUSE:Factory/.libHX.new.1770 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libHX" Fri Feb 23 16:41:39 2024 rev:79 rq:1149598 version:4.23 Changes: -------- --- /work/SRC/openSUSE:Factory/libHX/libHX.changes 2023-12-26 18:27:05.000996344 +0100 +++ /work/SRC/openSUSE:Factory/.libHX.new.1770/libHX.changes 2024-02-23 16:41:50.451749553 +0100 @@ -1,0 +2,8 @@ +Thu Feb 15 16:11:39 UTC 2024 - Jan Engelhardt <[email protected]> + +- Update to release 4.23 + * io: use smaller chunks with sendfile(2) to work around + unusual API behavior + * io: make HX_copy_file() utilize copy_file_range when available + +------------------------------------------------------------------- Old: ---- libHX-4.21.tar.asc libHX-4.21.tar.xz New: ---- libHX-4.23.tar.asc libHX-4.23.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libHX.spec ++++++ --- /var/tmp/diff_new_pack.2h68uB/_old 2024-02-23 16:41:50.883765214 +0100 +++ /var/tmp/diff_new_pack.2h68uB/_new 2024-02-23 16:41:50.883765214 +0100 @@ -1,7 +1,7 @@ # # spec file for package libHX # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: libHX %define lname libHX32 -Version: 4.21 +Version: 4.23 Release: 0 Summary: Collection of routines for C and C++ programming License: LGPL-2.1-or-later ++++++ libHX-4.21.tar.xz -> libHX-4.23.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/config.h.in new/libHX-4.23/config.h.in --- old/libHX-4.21/config.h.in 2023-12-20 14:10:50.605757189 +0100 +++ new/libHX-4.23/config.h.in 2024-02-15 17:30:43.398275427 +0100 @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if you have the `copy_file_range' function. */ +#undef HAVE_COPY_FILE_RANGE + /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/configure new/libHX-4.23/configure --- old/libHX-4.21/configure 2023-12-20 14:10:46.312448896 +0100 +++ new/libHX-4.23/configure 2024-02-15 17:30:39.284961128 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for libHX 4.21. +# Generated by GNU Autoconf 2.71 for libHX 4.23. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -618,8 +618,8 @@ # Identity of this package. PACKAGE_NAME='libHX' PACKAGE_TARNAME='libhx' -PACKAGE_VERSION='4.21' -PACKAGE_STRING='libHX 4.21' +PACKAGE_VERSION='4.23' +PACKAGE_STRING='libHX 4.23' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -668,6 +668,8 @@ libdl_LIBS HAVE_DLFCN_H_FALSE HAVE_DLFCN_H_TRUE +WITH_SUN_LD_FALSE +WITH_SUN_LD_TRUE WITH_GNU_LD_FALSE WITH_GNU_LD_TRUE pkgconfigdir @@ -1375,7 +1377,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libHX 4.21 to adapt to many kinds of systems. +\`configure' configures libHX 4.23 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1448,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 4.21:";; + short | recursive ) echo "Configuration of libHX 4.23:";; esac cat <<\_ACEOF @@ -1561,7 +1563,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 4.21 +libHX configure 4.23 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2195,7 +2197,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libHX $as_me 4.21, which was +It was created by libHX $as_me 4.23, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3684,7 +3686,7 @@ # Define the identity of the package. PACKAGE='libhx' - VERSION='4.21' + VERSION='4.23' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -17579,6 +17581,20 @@ WITH_GNU_LD_FALSE= fi +if test -n "$LD" && $LD -z help >/dev/null 2>/dev/null +then : + with_sun_ld=yes +else $as_nop + with_sun_ld=no +fi + if test "$with_sun_ld" = yes; then + WITH_SUN_LD_TRUE= + WITH_SUN_LD_FALSE='#' +else + WITH_SUN_LD_TRUE='#' + WITH_SUN_LD_FALSE= +fi + LIBS_system="$LIBS" ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" @@ -18151,6 +18167,12 @@ fi +ac_fn_c_check_func "$LINENO" "copy_file_range" "ac_cv_func_copy_file_range" +if test "x$ac_cv_func_copy_file_range" = xyes +then : + printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h + +fi ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" if test "x$ac_cv_func_fork" = xyes then : @@ -18375,6 +18397,10 @@ as_fn_error $? "conditional \"WITH_GNU_LD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WITH_SUN_LD_TRUE}" && test -z "${WITH_SUN_LD_FALSE}"; then + as_fn_error $? "conditional \"WITH_SUN_LD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_DLFCN_H_TRUE}" && test -z "${HAVE_DLFCN_H_FALSE}"; then as_fn_error $? "conditional \"HAVE_DLFCN_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18769,7 +18795,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libHX $as_me 4.21, which was +This file was extended by libHX $as_me 4.23, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18837,7 +18863,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libHX config.status 4.21 +libHX config.status 4.23 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/configure.ac new/libHX-4.23/configure.ac --- old/libHX-4.21/configure.ac 2023-12-20 14:10:29.529213309 +0100 +++ new/libHX-4.23/configure.ac 2024-02-15 17:25:36.606354473 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libHX], [4.21]) +AC_INIT([libHX], [4.23]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -61,6 +61,8 @@ CHECK_GCC_FVISIBILITY AM_CONDITIONAL([WITH_GNU_LD], [test "$with_gnu_ld" = yes]) +AS_IF([test -n "$LD" && $LD -z help >/dev/null 2>/dev/null], [with_sun_ld=yes], [with_sun_ld=no]) +AM_CONDITIONAL([WITH_SUN_LD], [test "$with_sun_ld" = yes]) LIBS_system="$LIBS" AC_CHECK_HEADERS([dlfcn.h sys/resource.h sys/un.h]) @@ -122,7 +124,7 @@ #include <sys/time.h> #include <time.h> ]) -AC_CHECK_FUNCS([fork execv execvp pipe posix_fadvise]) +AC_CHECK_FUNCS([copy_file_range fork execv execvp pipe posix_fadvise]) AC_CHECK_FUNCS([getegid geteuid getpid getppid]) AC_CHECK_FUNCS([initgroups setgid]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/doc/changelog.rst new/libHX-4.23/doc/changelog.rst --- old/libHX-4.21/doc/changelog.rst 2023-12-20 14:09:21.432940891 +0100 +++ new/libHX-4.23/doc/changelog.rst 2024-02-15 17:25:43.159657826 +0100 @@ -1,3 +1,15 @@ +v4.23 (2024-02-15) +================== + +Fixes: + +* io: use smaller chunks with sendfile(2) to work around unusual API behavior + +Enhancements: + +* io: make HX_copy_file() utilize copy_file_range when available + + v4.21 (2023-12-20) ================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/src/Makefile.am new/libHX-4.23/src/Makefile.am --- old/libHX-4.21/src/Makefile.am 2023-11-30 02:29:53.565640334 +0100 +++ new/libHX-4.23/src/Makefile.am 2024-02-04 23:44:08.208501461 +0100 @@ -13,6 +13,9 @@ if WITH_GNU_LD libHX_la_LDFLAGS += -Wl,--version-script=${srcdir}/libHX.map endif +if WITH_SUN_LD +libHX_la_LDFLAGS += -Wl,-M,${srcdir}/libHX.map +endif EXTRA_libHX_la_DEPENDENCIES = libHX.map if MINGW32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/src/Makefile.in new/libHX-4.23/src/Makefile.in --- old/libHX-4.21/src/Makefile.in 2023-12-20 14:10:46.012450645 +0100 +++ new/libHX-4.23/src/Makefile.in 2024-02-15 17:30:38.991629153 +0100 @@ -91,8 +91,9 @@ build_triplet = @build@ host_triplet = @host@ @WITH_GNU_LD_TRUE@am__append_1 = -Wl,--version-script=${srcdir}/libHX.map -@MINGW32_TRUE@am__append_2 = ux-file.c ux-mmap.c -@MINGW32_TRUE@am__append_3 = -lws2_32 +@WITH_SUN_LD_TRUE@am__append_2 = -Wl,-M,${srcdir}/libHX.map +@MINGW32_TRUE@am__append_3 = ux-file.c ux-mmap.c +@MINGW32_TRUE@am__append_4 = -lws2_32 check_PROGRAMS = tc-compile$(EXEEXT) tc-cast$(EXEEXT) \ tc-deque$(EXEEXT) tc-dir$(EXEEXT) tc-format$(EXEEXT) \ tc-io$(EXEEXT) tc-list$(EXEEXT) tc-list2$(EXEEXT) \ @@ -104,13 +105,13 @@ $(am__EXEEXT_1) TESTS = tc-format$(EXEEXT) tc-option$(EXEEXT) tc-strchr2$(EXEEXT) \ tc-string$(EXEEXT) tc-strquote$(EXEEXT) $(am__EXEEXT_2) -@HAVE_CXX_TRUE@am__append_4 = tx-compile tx-cast tx-deque tx-dir \ +@HAVE_CXX_TRUE@am__append_5 = tx-compile tx-cast tx-deque tx-dir \ @HAVE_CXX_TRUE@ tx-intdiff tx-list tx-list2 \ @HAVE_CXX_TRUE@ tx-misc tx-netio \ @HAVE_CXX_TRUE@ tx-option tx-proc tx-rand tx-strchr2 tx-string \ @HAVE_CXX_TRUE@ tx-strquote tx-time -@HAVE_CXX_TRUE@am__append_5 = tx-strchr2 tx-strquote +@HAVE_CXX_TRUE@am__append_6 = tx-strchr2 tx-strquote subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gcc4_visibility.m4 \ @@ -767,10 +768,11 @@ AM_CXXFLAGS = ${regular_CXXFLAGS} lib_LTLIBRARIES = libHX.la libHX_la_SOURCES = deque.c dl.c format.c io.c map.c mc.c misc.c opt.c \ - proc.c rand.c socket.c string.c time.c $(am__append_2) + proc.c rand.c socket.c string.c time.c $(am__append_3) libHX_la_LIBADD = ${libdl_LIBS} -lm ${libpthread_LIBS} ${librt_LIBS} \ - ${libsocket_LIBS} $(am__append_3) -libHX_la_LDFLAGS = -no-undefined -version-info 39:0:7 $(am__append_1) + ${libsocket_LIBS} $(am__append_4) +libHX_la_LDFLAGS = -no-undefined -version-info 39:0:7 $(am__append_1) \ + $(am__append_2) EXTRA_libHX_la_DEPENDENCIES = libHX.map EXTRA_DIST = internal.h map_int.h libHX.map uxcompat.h analyze.sh tc_cast_CFLAGS = ${AM_CFLAGS} -std=gnu99 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/src/io.c new/libHX-4.23/src/io.c --- old/libHX-4.21/src/io.c 2023-11-27 11:41:58.890076306 +0100 +++ new/libHX-4.23/src/io.c 2024-02-15 17:23:20.596974250 +0100 @@ -7,6 +7,7 @@ * General Public License as published by the Free Software Foundation; * either version 2.1 or (at your option) any later version. */ +#define _GNU_SOURCE 1 #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -630,15 +631,37 @@ } #if __linux__ -static ssize_t HX_sendfile_linux(int dst, int src, size_t count) +#ifdef HAVE_COPY_FILE_RANGE +static ssize_t HX_cfr_linux(int dst, int src, size_t count) { - long pagesize = sysconf(_SC_PAGE_SIZE); - size_t xfersize; ssize_t ret, xferd = 0; + /* + * Use INT(32)_MAX rather than SSIZE_MAX, as there is an issue with + * overflow detection pending. + * https://lore.kernel.org/linux-man/[email protected]/ + */ + size_t xfersize = INT_MAX; + if (count > xfersize) + count = xfersize; + while ((ret = copy_file_range(src, nullptr, dst, nullptr, count, 0)) > 0) + xferd += ret; + if (xferd > 0) + return xferd; + if (ret < 0) + return -errno; + return 0; +} +#endif - if (pagesize < 0) - pagesize = 4096; - xfersize = SSIZE_MAX - pagesize; +static ssize_t HX_sendfile_linux(int dst, int src, size_t count) +{ + ssize_t ret, xferd = 0; + /* + * Use INT(32)_MAX rather than SSIZE_MAX, as there is an issue with + * overflow detection pending. + * https://lore.kernel.org/linux-man/[email protected]/ + */ + size_t xfersize = INT_MAX; if (count > xfersize) count = xfersize; while ((ret = sendfile(dst, src, nullptr, count)) > 0) @@ -686,7 +709,13 @@ EXPORT_SYMBOL ssize_t HX_sendfile(int dst, int src, size_t count) { #if __linux__ - ssize_t ret = HX_sendfile_linux(dst, src, count); + ssize_t ret; +#ifdef HAVE_COPY_FILE_RANGE + ret = HX_cfr_linux(dst, src, count); + if (ret != -ENOSYS && ret != -EXDEV) + return ret; +#endif + ret = HX_sendfile_linux(dst, src, count); if (ret != -ENOSYS) return ret; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/src/string.c new/libHX-4.23/src/string.c --- old/libHX-4.21/src/string.c 2023-11-29 00:52:52.868893993 +0100 +++ new/libHX-4.23/src/string.c 2024-02-15 17:15:42.712341074 +0100 @@ -1036,7 +1036,7 @@ * UB. Thus check for range and apply the negation after the * conversion to ULL. */ - if (q > ULLONG_MAX) { + if (q >= static_cast(double, ULLONG_MAX)) { errno = ERANGE; return ULLONG_MAX; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.21/src/tc-socket.c new/libHX-4.23/src/tc-socket.c --- old/libHX-4.21/src/tc-socket.c 2023-06-26 04:56:59.529133391 +0200 +++ new/libHX-4.23/src/tc-socket.c 2024-01-16 19:13:21.757257796 +0100 @@ -17,6 +17,7 @@ static int t_parse(void) { char host[32] = "bogus"; + uint16_t port = 4321; if (HX_addrport_split("[::1]", host, sizeof(host), nullptr) != 1 || strcmp(host, "::1") != 0) return 1; @@ -26,6 +27,9 @@ if (HX_addrport_split("", host, sizeof(host), nullptr) != 1 || strcmp(host, "") != 0) return 1; + if (HX_addrport_split("[]:", host, sizeof(host), &port) != 1 || + strcmp(host, "") != 0 || port != 0) + return 1; return 0; }
