Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libHX for openSUSE:Factory checked in at 2022-12-04 14:58:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libHX (Old) and /work/SRC/openSUSE:Factory/.libHX.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libHX" Sun Dec 4 14:58:08 2022 rev:69 rq:1039797 version:4.8 Changes: -------- --- /work/SRC/openSUSE:Factory/libHX/libHX.changes 2022-10-25 11:18:36.845951355 +0200 +++ /work/SRC/openSUSE:Factory/.libHX.new.1835/libHX.changes 2022-12-04 14:58:26.572300861 +0100 @@ -1,0 +2,8 @@ +Sat Dec 3 11:24:21 UTC 2022 - Jan Engelhardt <jeng...@inai.de> + +- Update to release 4.8 + * io: call posix_fadvise when slurping files + * io: fix garbling of slurped data when read from an + unknown-size source + +------------------------------------------------------------------- Old: ---- libHX-4.7.tar.asc libHX-4.7.tar.xz New: ---- libHX-4.8.tar.asc libHX-4.8.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libHX.spec ++++++ --- /var/tmp/diff_new_pack.YGH90r/_old 2022-12-04 14:58:27.116303995 +0100 +++ /var/tmp/diff_new_pack.YGH90r/_new 2022-12-04 14:58:27.120304017 +0100 @@ -18,7 +18,7 @@ Name: libHX %define lname libHX32 -Version: 4.7 +Version: 4.8 Release: 0 Summary: Collection of routines for C and C++ programming License: LGPL-2.1-or-later ++++++ libHX-4.7.tar.xz -> libHX-4.8.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.7/.gitignore new/libHX-4.8/.gitignore --- old/libHX-4.7/.gitignore 2022-10-21 21:46:11.000000000 +0200 +++ new/libHX-4.8/.gitignore 2022-12-03 12:17:30.000000000 +0100 @@ -12,6 +12,7 @@ /build-aux/ /config.* /configure +/configure~ /libtool stamp-h1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.7/config.h.in new/libHX-4.8/config.h.in --- old/libHX-4.7/config.h.in 2022-10-21 21:46:20.159609162 +0200 +++ new/libHX-4.8/config.h.in 2022-12-03 12:19:44.562459721 +0100 @@ -33,6 +33,9 @@ /* Define to 1 if you have the `pipe' function. */ #undef HAVE_PIPE +/* Define to 1 if you have the `posix_fadvise' function. */ +#undef HAVE_POSIX_FADVISE + /* Define to 1 if you have the `setgid' function. */ #undef HAVE_SETGID diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.7/configure new/libHX-4.8/configure --- old/libHX-4.7/configure 2022-10-21 21:46:19.931610750 +0200 +++ new/libHX-4.8/configure 2022-12-03 12:19:44.314458167 +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.7. +# Generated by GNU Autoconf 2.71 for libHX 4.8. # # # 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.7' -PACKAGE_STRING='libHX 4.7' +PACKAGE_VERSION='4.8' +PACKAGE_STRING='libHX 4.8' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1375,7 +1375,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.7 to adapt to many kinds of systems. +\`configure' configures libHX 4.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1446,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libHX 4.7:";; + short | recursive ) echo "Configuration of libHX 4.8:";; esac cat <<\_ACEOF @@ -1561,7 +1561,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libHX configure 4.7 +libHX configure 4.8 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2195,7 +2195,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.7, which was +It was created by libHX $as_me 4.8, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3684,7 +3684,7 @@ # Define the identity of the package. PACKAGE='libhx' - VERSION='4.7' + VERSION='4.8' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -18171,6 +18171,12 @@ printf "%s\n" "#define HAVE_PIPE 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise" +if test "x$ac_cv_func_posix_fadvise" = xyes +then : + printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h + +fi ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" if test "x$ac_cv_func_getegid" = xyes @@ -18759,7 +18765,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.7, which was +This file was extended by libHX $as_me 4.8, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18827,7 +18833,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libHX config.status 4.7 +libHX config.status 4.8 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.7/configure.ac new/libHX-4.8/configure.ac --- old/libHX-4.7/configure.ac 2022-10-21 21:46:11.000000000 +0200 +++ new/libHX-4.8/configure.ac 2022-12-03 12:17:30.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([libHX], [4.7]) +AC_INIT([libHX], [4.8]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -124,7 +124,7 @@ #include <sys/time.h> #include <time.h> ]) -AC_CHECK_FUNCS([fork execv execvp pipe]) +AC_CHECK_FUNCS([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.7/doc/changelog.rst new/libHX-4.8/doc/changelog.rst --- old/libHX-4.7/doc/changelog.rst 2022-10-21 21:46:11.000000000 +0200 +++ new/libHX-4.8/doc/changelog.rst 2022-12-03 12:17:30.000000000 +0100 @@ -1,3 +1,15 @@ +v4.8 (2022-12-03) +================= + +Enhancements: + +* io: call posix_fadvise when slurping files + +Fixes: + +* io: fix garbling of slurped data when read from an unknown-size source + + v4.7 (2022-10-21) ================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libHX-4.7/src/io.c new/libHX-4.8/src/io.c --- old/libHX-4.7/src/io.c 2022-10-21 21:46:11.000000000 +0200 +++ new/libHX-4.8/src/io.c 2022-12-03 12:17:30.000000000 +0100 @@ -7,6 +7,9 @@ * General Public License as published by the Free Software Foundation; * either version 2.1 or (at your option) any later version. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include <sys/stat.h> #include <errno.h> #include <fcntl.h> @@ -694,10 +697,13 @@ if (buf == nullptr) return nullptr; ssize_t rdret; - while ((rdret = read(fd, buf, bufsize - 1 - offset)) > 0) { + while ((rdret = read(fd, buf + offset, bufsize - 1 - offset)) > 0) { offset += rdret; + /* + * Make it so that the next read call is not called + * with an exceptionally small size. + */ if (bufsize - offset >= 4095) - /* any value would work, but >=1 is not all that efficient */ continue; if (bufsize > SSIZE_MAX) /* No more doubling */ @@ -720,6 +726,11 @@ size_t fsize = sb.st_size; /* may truncate from loff_t to size_t */ if (fsize == SIZE_MAX) --fsize; +#ifdef HAVE_POSIX_FADVISE + if (fsize > 0 && posix_fadvise(fd, 0, fsize, + POSIX_FADV_SEQUENTIAL) != 0) + /* ignore */; +#endif char *buf = malloc(fsize + 1); if (buf == NULL) return NULL;