Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pv for openSUSE:Factory checked in at 2024-08-01 22:03:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pv (Old) and /work/SRC/openSUSE:Factory/.pv.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "pv" Thu Aug 1 22:03:49 2024 rev:27 rq:1190636 version:1.8.12 Changes: -------- --- /work/SRC/openSUSE:Factory/pv/pv.changes 2024-07-03 20:29:31.783372908 +0200 +++ /work/SRC/openSUSE:Factory/.pv.new.7232/pv.changes 2024-08-01 22:04:08.043735787 +0200 @@ -1,0 +2,7 @@ +Wed Jul 31 04:48:17 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de> + +- update to 1.8.12: + * fix detection of output block device size + * do not treat a zero/interrupted write as an end of file + +------------------------------------------------------------------- Old: ---- pv-1.8.10.tar.gz pv-1.8.10.tar.gz.asc New: ---- _scmsync.obsinfo build.specials.obscpio pv-1.8.12.tar.gz pv-1.8.12.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pv.spec ++++++ --- /var/tmp/diff_new_pack.NRNzzq/_old 2024-08-01 22:04:09.755806400 +0200 +++ /var/tmp/diff_new_pack.NRNzzq/_new 2024-08-01 22:04:09.759806565 +0200 @@ -2,6 +2,7 @@ # spec file for package pv # # Copyright (c) 2024 SUSE LLC +# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +18,7 @@ Name: pv -Version: 1.8.10 +Version: 1.8.12 Release: 0 Summary: Tool for monitor the progress of data through pipes License: GPL-3.0-or-later ++++++ _scmsync.obsinfo ++++++ mtime: 1722420956 commit: a051dfc47653813f1ff58888dbf59e486d205fac8abc837210cca5c80b11c8bf url: https://src.opensuse.org/jengelh/pv revision: master ++++++ pv-1.8.10.tar.gz -> pv-1.8.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/configure new/pv-1.8.12/configure --- old/pv-1.8.10/configure 2024-06-16 00:25:06.000000000 +0200 +++ new/pv-1.8.12/configure 2024-07-18 23:11:19.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for pv 1.8.10. +# Generated by GNU Autoconf 2.71 for pv 1.8.12. # # Report bugs to <pv@ivarch.com>. # @@ -611,8 +611,8 @@ # Identity of this package. PACKAGE_NAME='pv' PACKAGE_TARNAME='pv' -PACKAGE_VERSION='1.8.10' -PACKAGE_STRING='pv 1.8.10' +PACKAGE_VERSION='1.8.12' +PACKAGE_STRING='pv 1.8.12' PACKAGE_BUGREPORT='pv@ivarch.com' PACKAGE_URL='https://www.ivarch.com/programs/pv.shtml' @@ -1344,7 +1344,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 pv 1.8.10 to adapt to many kinds of systems. +\`configure' configures pv 1.8.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1415,7 +1415,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pv 1.8.10:";; + short | recursive ) echo "Configuration of pv 1.8.12:";; esac cat <<\_ACEOF @@ -1525,7 +1525,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pv configure 1.8.10 +pv configure 1.8.12 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2021,7 +2021,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pv $as_me 1.8.10, which was +It was created by pv $as_me 1.8.12, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3297,7 +3297,7 @@ # Define the identity of the package. PACKAGE='pv' - VERSION='1.8.10' + VERSION='1.8.12' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -9300,7 +9300,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pv $as_me 1.8.10, which was +This file was extended by pv $as_me 1.8.12, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9369,7 +9369,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -pv config.status 1.8.10 +pv config.status 1.8.12 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/pv-1.8.10/configure.ac new/pv-1.8.12/configure.ac --- old/pv-1.8.10/configure.ac 2024-06-16 00:23:26.000000000 +0200 +++ new/pv-1.8.12/configure.ac 2024-07-18 23:09:52.000000000 +0200 @@ -4,7 +4,7 @@ dnl dnl License GPLv3+: GNU GPL version 3 or later; see `docs/COPYING'. -AC_INIT([pv], [1.8.10], [pv@ivarch.com], [pv], [https://www.ivarch.com/programs/pv.shtml]) +AC_INIT([pv], [1.8.12], [pv@ivarch.com], [pv], [https://www.ivarch.com/programs/pv.shtml]) AC_CONFIG_SRCDIR([src/include/config.h.in]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([src/include/config.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/docs/ACKNOWLEDGEMENTS.md new/pv-1.8.12/docs/ACKNOWLEDGEMENTS.md --- old/pv-1.8.10/docs/ACKNOWLEDGEMENTS.md 2024-06-08 22:12:51.000000000 +0200 +++ new/pv-1.8.12/docs/ACKNOWLEDGEMENTS.md 2024-07-17 08:44:48.000000000 +0200 @@ -92,5 +92,7 @@ * [Thomas Bertels](https://codeberg.org/tbertels) - updated French translations ([#83](https://codeberg.org/a-j-wood/pv/pulls/83)) * [kevinruddy](https://codeberg.org/kevinruddy) - added decimal units option ([#85](https://codeberg.org/a-j-wood/pv/pulls/85)) * [xmort](https://codeberg.org/xmort) - added "`--output`" option ([#90](https://codeberg.org/a-j-wood/pv/pulls/90)) + * [bogiord](https://codeberg.org/bogiord) - reported the loss of output block device size detection in 1.8.10, and suggested the fix ([#91](https://codeberg.org/a-j-wood/pv/issues/91)) + * [eborisch](https://codeberg.org/eborisch) - provided fix for misbehaviour when used with "`zfs send`" due to treating zero sized writes (generally due to timer interruption) as end of file ([#92](https://codeberg.org/a-j-wood/pv/pulls/92), [#93](https://codeberg.org/a-j-wood/pv/pulls/93)) --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/docs/NEWS.md new/pv-1.8.12/docs/NEWS.md --- old/pv-1.8.10/docs/NEWS.md 2024-06-16 00:23:16.000000000 +0200 +++ new/pv-1.8.12/docs/NEWS.md 2024-07-18 23:10:02.000000000 +0200 @@ -1,3 +1,8 @@ +### 1.8.12 - 18 July 2024 + + * fix: correct the detection of output block device size that was broken in 1.8.10 ([#91](https://codeberg.org/a-j-wood/pv/issues/91)) + * fix: do not treat a zero/interrupted write as an end of file (pull requests [#92](https://codeberg.org/a-j-wood/pv/pulls/92) and [#93](https://codeberg.org/a-j-wood/pv/pulls/93)) + ### 1.8.10 - 15 June 2024 * feature: new "`--output`" option to write to a file instead of standard output (pull request [#90](https://codeberg.org/a-j-wood/pv/pulls/90)) supplied by [xmort](https://codeberg.org/xmort) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/docs/TODO.md new/pv-1.8.12/docs/TODO.md --- old/pv-1.8.10/docs/TODO.md 2024-04-21 15:00:02.000000000 +0200 +++ new/pv-1.8.12/docs/TODO.md 2024-07-18 23:00:49.000000000 +0200 @@ -20,10 +20,14 @@ * ([#48](https://codeberg.org/a-j-wood/pv/issues/48)) Option to show multiple files with individual sizes and a cumulative total (Zach Riggle - Jul 2021) * ([#49](https://codeberg.org/a-j-wood/pv/issues/49)) Option to provide stats for avg/min/max/stddev throughput (Venky.N.Iyer) * ([#50](https://codeberg.org/a-j-wood/pv/issues/50)) Allow pv to report on a whole pipeline at once (Will Entriken - Feb 2011) + * ([#52](https://codeberg.org/a-j-wood/pv/issues/52)) Strange race condition that affects --wait when writing to GnuPG ([danielyli](https://github.com/danielyli)) * ([#54](https://codeberg.org/a-j-wood/pv/issues/54)) Run command every n percent ([haarp](https://github.com/haarp)) * ([#56](https://codeberg.org/a-j-wood/pv/issues/56)) Support for backgrounding pv, and allowing it to be monitored separately ([jimbobmcgee](https://github.com/jimbobmcgee)) + * ([#59](https://codeberg.org/a-j-wood/pv/issues/59)) Slow transfer under termux but faster if strace is used ([lateautumn233](https://github.com/lateautumn233)) * ([#67](https://codeberg.org/a-j-wood/pv/issues/67)) Wrap another process to monitor its stdin & stdout ([Alex Mason](https://github.com/axman6)) - * ([#76](https://codeberg.org/a-j-wood/pv/issues/76)) Provide a way to test translations without installing - * ([#81](https://codeberg.org/a-j-wood/pv/issues/81)) Keep last output on terminal when "pv -d" is done + * ([#81](https://codeberg.org/a-j-wood/pv/issues/81)) Keep last output on terminal when "`pv -d`" is done ([KimHansen](https://codeberg.org/KimHansen)) + * ([#84](https://codeberg.org/a-j-wood/pv/issues/84)) Allow using "`--size`" with "`--watchfd`" to show total progress of a process ([tbertels](https://codeberg.org/tbertels)) + * ([#87](https://codeberg.org/a-j-wood/pv/issues/87)) Inconsistent buffer filling when writes are stuck, particularly on Cygwin ([basinilya](https://codeberg.org/basinilya)) + * ([#89](https://codeberg.org/a-j-wood/pv/issues/89)) Intermittent terminal settings reset failures after multi PV pipeline completes ([stdedos](https://codeberg.org/stdedos)) Any assistance would be appreciated. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/docs/pv.1 new/pv-1.8.12/docs/pv.1 --- old/pv-1.8.10/docs/pv.1 2024-06-16 00:24:01.000000000 +0200 +++ new/pv-1.8.12/docs/pv.1 2024-07-18 23:10:15.000000000 +0200 @@ -1,4 +1,4 @@ -.TH PV 1 "June 2024" Linux "User Manuals" +.TH PV 1 "July 2024" Linux "User Manuals" .SH NAME pv \- monitor the progress of data through a pipe .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/po/de.po new/pv-1.8.12/po/de.po --- old/pv-1.8.10/po/de.po 2024-06-16 00:26:17.000000000 +0200 +++ new/pv-1.8.12/po/de.po 2024-07-18 23:11:57.000000000 +0200 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: pv@ivarch.com\n" -"POT-Creation-Date: 2024-06-15 23:26+0100\n" +"POT-Creation-Date: 2024-07-18 22:11+0100\n" "Language: de\n" "Content-Type: text/plain; charset=UTF-8\n" "Date: 1999-06-01 15:18:29+0100\n" @@ -254,7 +254,7 @@ msgid "Please report any bugs to: %s" msgstr "Bitte senden Sie Fehlerberichte an %s" -#: src/main/main.c:74 +#: src/main/main.c:71 msgid "state allocation failed" msgstr "Zustandszuweisung fehlgeschlagen" @@ -372,7 +372,7 @@ msgid "yzafpnum KMGTPEZY" msgstr "" -#: src/pv/display.c:750 src/pv/transfer.c:961 +#: src/pv/display.c:750 src/pv/transfer.c:970 msgid "buffer allocation failed" msgstr "Puffer konnte nicht allokiert werden" @@ -380,7 +380,7 @@ msgid "b" msgstr "" -#: src/pv/display.c:859 src/pv/transfer.c:596 +#: src/pv/display.c:859 src/pv/transfer.c:602 msgid "B" msgstr "B" @@ -436,51 +436,51 @@ msgid "pid" msgstr "" -#: src/pv/state.c:36 +#: src/pv/state.c:40 msgid "history structure allocation failed" msgstr "" -#: src/pv/state.c:431 src/pv/state.c:442 +#: src/pv/state.c:444 src/pv/state.c:455 msgid "file list allocation failed" msgstr "" -#: src/pv/transfer.c:458 +#: src/pv/transfer.c:464 msgid "read failed" msgstr "read-Aufruf fehlgeschlagen" -#: src/pv/transfer.c:481 +#: src/pv/transfer.c:487 msgid "warning: read errors detected" msgstr "warnung: lesefehler erkannt" -#: src/pv/transfer.c:497 +#: src/pv/transfer.c:503 msgid "file is not seekable" msgstr "datei ist nicht durchsuchbar" -#: src/pv/transfer.c:575 +#: src/pv/transfer.c:581 msgid "failed to seek past error" msgstr "konnte den Fehler nicht überwinden" -#: src/pv/transfer.c:595 +#: src/pv/transfer.c:601 msgid "skipped past read error" msgstr "über den Lesefehler hinaus verschoben" -#: src/pv/transfer.c:635 +#: src/pv/transfer.c:641 msgid "no transfer buffer allocated" msgstr "" -#: src/pv/transfer.c:676 +#: src/pv/transfer.c:682 msgid "failed to set interval timer" msgstr "" -#: src/pv/transfer.c:697 +#: src/pv/transfer.c:707 msgid "failed to clear interval timer" msgstr "" -#: src/pv/transfer.c:822 +#: src/pv/transfer.c:831 msgid "write failed" msgstr "write-Aufruf fehlgeschlagen" -#: src/pv/transfer.c:1059 +#: src/pv/transfer.c:1068 msgid "select call failed" msgstr "select-Aufruf fehlgeschlagen" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/po/fr.po new/pv-1.8.12/po/fr.po --- old/pv-1.8.10/po/fr.po 2024-06-16 00:26:17.000000000 +0200 +++ new/pv-1.8.12/po/fr.po 2024-07-18 23:11:57.000000000 +0200 @@ -1,7 +1,7 @@ msgid "" msgstr "" "Report-Msgid-Bugs-To: pv@ivarch.com\n" -"POT-Creation-Date: 2024-06-15 23:26+0100\n" +"POT-Creation-Date: 2024-07-18 22:11+0100\n" "Language: fr\n" "Content-Type: text/plain; charset=UTF-8\n" "Date: 1999-06-01 15:18:29+0100\n" @@ -255,7 +255,7 @@ msgid "Please report any bugs to: %s" msgstr "SVP rapporter tous bogues à %s" -#: src/main/main.c:74 +#: src/main/main.c:71 msgid "state allocation failed" msgstr "échec de l'allocation de mémoire de condition" @@ -377,7 +377,7 @@ msgid "yzafpnum KMGTPEZY" msgstr "" -#: src/pv/display.c:750 src/pv/transfer.c:961 +#: src/pv/display.c:750 src/pv/transfer.c:970 msgid "buffer allocation failed" msgstr "échec de l'allocation de mémoire tampon" @@ -385,7 +385,7 @@ msgid "b" msgstr "" -#: src/pv/display.c:859 src/pv/transfer.c:596 +#: src/pv/display.c:859 src/pv/transfer.c:602 msgid "B" msgstr "O" @@ -441,51 +441,51 @@ msgid "pid" msgstr "" -#: src/pv/state.c:36 +#: src/pv/state.c:40 msgid "history structure allocation failed" msgstr "l'allocation de la structure de l'historique a échoué" -#: src/pv/state.c:431 src/pv/state.c:442 +#: src/pv/state.c:444 src/pv/state.c:455 msgid "file list allocation failed" msgstr "échec de l'allocation de la liste de fichiers" -#: src/pv/transfer.c:458 +#: src/pv/transfer.c:464 msgid "read failed" msgstr "la lecture a échoué" -#: src/pv/transfer.c:481 +#: src/pv/transfer.c:487 msgid "warning: read errors detected" msgstr "avertissement : erreurs de lecture détectées" -#: src/pv/transfer.c:497 +#: src/pv/transfer.c:503 msgid "file is not seekable" msgstr "ne peut pas se déplacer dans le fichier" -#: src/pv/transfer.c:575 +#: src/pv/transfer.c:581 msgid "failed to seek past error" msgstr "n'a pas réussi à dépasser l'erreur" -#: src/pv/transfer.c:595 +#: src/pv/transfer.c:601 msgid "skipped past read error" msgstr "erreur de lecture dépassée" -#: src/pv/transfer.c:635 +#: src/pv/transfer.c:641 msgid "no transfer buffer allocated" msgstr "aucun tampon de transfert alloué" -#: src/pv/transfer.c:676 +#: src/pv/transfer.c:682 msgid "failed to set interval timer" msgstr "" -#: src/pv/transfer.c:697 +#: src/pv/transfer.c:707 msgid "failed to clear interval timer" msgstr "" -#: src/pv/transfer.c:822 +#: src/pv/transfer.c:831 msgid "write failed" msgstr "l'écriture a échoué" -#: src/pv/transfer.c:1059 +#: src/pv/transfer.c:1068 msgid "select call failed" msgstr "l'appel de sélection a échoué" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/po/pl.po new/pv-1.8.12/po/pl.po --- old/pv-1.8.10/po/pl.po 2024-06-16 00:26:17.000000000 +0200 +++ new/pv-1.8.12/po/pl.po 2024-07-18 23:11:57.000000000 +0200 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pv@ivarch.com\n" -"POT-Creation-Date: 2024-06-15 23:26+0100\n" +"POT-Creation-Date: 2024-07-18 22:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -248,7 +248,7 @@ msgid "Please report any bugs to: %s" msgstr "Proszę przesyłać zgłoszenia błędów do %s" -#: src/main/main.c:74 +#: src/main/main.c:71 msgid "state allocation failed" msgstr "" @@ -361,7 +361,7 @@ msgid "yzafpnum KMGTPEZY" msgstr "" -#: src/pv/display.c:750 src/pv/transfer.c:961 +#: src/pv/display.c:750 src/pv/transfer.c:970 msgid "buffer allocation failed" msgstr "nie udało się zaalokować bufora" @@ -369,7 +369,7 @@ msgid "b" msgstr "" -#: src/pv/display.c:859 src/pv/transfer.c:596 +#: src/pv/display.c:859 src/pv/transfer.c:602 msgid "B" msgstr "B" @@ -426,52 +426,52 @@ msgid "pid" msgstr "" -#: src/pv/state.c:36 +#: src/pv/state.c:40 msgid "history structure allocation failed" msgstr "" -#: src/pv/state.c:431 src/pv/state.c:442 +#: src/pv/state.c:444 src/pv/state.c:455 msgid "file list allocation failed" msgstr "" -#: src/pv/transfer.c:458 +#: src/pv/transfer.c:464 msgid "read failed" msgstr "błąd odczytu" -#: src/pv/transfer.c:481 +#: src/pv/transfer.c:487 msgid "warning: read errors detected" msgstr "" -#: src/pv/transfer.c:497 +#: src/pv/transfer.c:503 msgid "file is not seekable" msgstr "" -#: src/pv/transfer.c:575 +#: src/pv/transfer.c:581 msgid "failed to seek past error" msgstr "" -#: src/pv/transfer.c:595 +#: src/pv/transfer.c:601 msgid "skipped past read error" msgstr "" -#: src/pv/transfer.c:635 +#: src/pv/transfer.c:641 msgid "no transfer buffer allocated" msgstr "" -#: src/pv/transfer.c:676 +#: src/pv/transfer.c:682 msgid "failed to set interval timer" msgstr "" # "Przewidywany czas ukończenia" for ETA is too long -#: src/pv/transfer.c:697 +#: src/pv/transfer.c:707 msgid "failed to clear interval timer" msgstr "" -#: src/pv/transfer.c:822 +#: src/pv/transfer.c:831 msgid "write failed" msgstr "błąd zapisu" -#: src/pv/transfer.c:1059 +#: src/pv/transfer.c:1068 msgid "select call failed" msgstr "nie udało się wywołać funkcji select" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/po/pt.po new/pv-1.8.12/po/pt.po --- old/pv-1.8.10/po/pt.po 2024-06-16 00:26:17.000000000 +0200 +++ new/pv-1.8.12/po/pt.po 2024-07-18 23:11:57.000000000 +0200 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pv@ivarch.com\n" -"POT-Creation-Date: 2024-06-15 23:26+0100\n" +"POT-Creation-Date: 2024-07-18 22:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -248,7 +248,7 @@ msgid "Please report any bugs to: %s" msgstr "Por favor, reporte quaisquer defeitos para %s" -#: src/main/main.c:74 +#: src/main/main.c:71 msgid "state allocation failed" msgstr "alocação de memória de status falhou" @@ -364,7 +364,7 @@ msgid "yzafpnum KMGTPEZY" msgstr "" -#: src/pv/display.c:750 src/pv/transfer.c:961 +#: src/pv/display.c:750 src/pv/transfer.c:970 msgid "buffer allocation failed" msgstr "erro alocando o buffer" @@ -372,7 +372,7 @@ msgid "b" msgstr "" -#: src/pv/display.c:859 src/pv/transfer.c:596 +#: src/pv/display.c:859 src/pv/transfer.c:602 msgid "B" msgstr "" @@ -428,51 +428,51 @@ msgid "pid" msgstr "" -#: src/pv/state.c:36 +#: src/pv/state.c:40 msgid "history structure allocation failed" msgstr "" -#: src/pv/state.c:431 src/pv/state.c:442 +#: src/pv/state.c:444 src/pv/state.c:455 msgid "file list allocation failed" msgstr "" -#: src/pv/transfer.c:458 +#: src/pv/transfer.c:464 msgid "read failed" msgstr "erro de leitura" -#: src/pv/transfer.c:481 +#: src/pv/transfer.c:487 msgid "warning: read errors detected" msgstr "aviso: erros de leitura detectados" -#: src/pv/transfer.c:497 +#: src/pv/transfer.c:503 msgid "file is not seekable" msgstr "não pode mover dentro do arquivo" -#: src/pv/transfer.c:575 +#: src/pv/transfer.c:581 msgid "failed to seek past error" msgstr "não pode ir além do erro" -#: src/pv/transfer.c:595 +#: src/pv/transfer.c:601 msgid "skipped past read error" msgstr "ignorado erro de leitura" -#: src/pv/transfer.c:635 +#: src/pv/transfer.c:641 msgid "no transfer buffer allocated" msgstr "" -#: src/pv/transfer.c:676 +#: src/pv/transfer.c:682 msgid "failed to set interval timer" msgstr "" -#: src/pv/transfer.c:697 +#: src/pv/transfer.c:707 msgid "failed to clear interval timer" msgstr "" -#: src/pv/transfer.c:822 +#: src/pv/transfer.c:831 msgid "write failed" msgstr "erro de gravação" -#: src/pv/transfer.c:1059 +#: src/pv/transfer.c:1068 msgid "select call failed" msgstr "erro na chamada da função select" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/po/pv.pot new/pv-1.8.12/po/pv.pot --- old/pv-1.8.10/po/pv.pot 2024-06-16 00:26:17.000000000 +0200 +++ new/pv-1.8.12/po/pv.pot 2024-07-18 23:11:57.000000000 +0200 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: pv 1.8.10\n" +"Project-Id-Version: pv 1.8.12\n" "Report-Msgid-Bugs-To: pv@ivarch.com\n" -"POT-Creation-Date: 2024-06-15 23:26+0100\n" +"POT-Creation-Date: 2024-07-18 22:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -248,7 +248,7 @@ msgid "Please report any bugs to: %s" msgstr "" -#: src/main/main.c:74 +#: src/main/main.c:71 msgid "state allocation failed" msgstr "" @@ -360,7 +360,7 @@ msgid "yzafpnum KMGTPEZY" msgstr "" -#: src/pv/display.c:750 src/pv/transfer.c:961 +#: src/pv/display.c:750 src/pv/transfer.c:970 msgid "buffer allocation failed" msgstr "" @@ -368,7 +368,7 @@ msgid "b" msgstr "" -#: src/pv/display.c:859 src/pv/transfer.c:596 +#: src/pv/display.c:859 src/pv/transfer.c:602 msgid "B" msgstr "" @@ -424,51 +424,51 @@ msgid "pid" msgstr "" -#: src/pv/state.c:36 +#: src/pv/state.c:40 msgid "history structure allocation failed" msgstr "" -#: src/pv/state.c:431 src/pv/state.c:442 +#: src/pv/state.c:444 src/pv/state.c:455 msgid "file list allocation failed" msgstr "" -#: src/pv/transfer.c:458 +#: src/pv/transfer.c:464 msgid "read failed" msgstr "" -#: src/pv/transfer.c:481 +#: src/pv/transfer.c:487 msgid "warning: read errors detected" msgstr "" -#: src/pv/transfer.c:497 +#: src/pv/transfer.c:503 msgid "file is not seekable" msgstr "" -#: src/pv/transfer.c:575 +#: src/pv/transfer.c:581 msgid "failed to seek past error" msgstr "" -#: src/pv/transfer.c:595 +#: src/pv/transfer.c:601 msgid "skipped past read error" msgstr "" -#: src/pv/transfer.c:635 +#: src/pv/transfer.c:641 msgid "no transfer buffer allocated" msgstr "" -#: src/pv/transfer.c:676 +#: src/pv/transfer.c:682 msgid "failed to set interval timer" msgstr "" -#: src/pv/transfer.c:697 +#: src/pv/transfer.c:707 msgid "failed to clear interval timer" msgstr "" -#: src/pv/transfer.c:822 +#: src/pv/transfer.c:831 msgid "write failed" msgstr "" -#: src/pv/transfer.c:1059 +#: src/pv/transfer.c:1068 msgid "select call failed" msgstr "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/src/main/main.c new/pv-1.8.12/src/main/main.c --- old/pv-1.8.10/src/main/main.c 2024-06-16 00:12:23.000000000 +0200 +++ new/pv-1.8.12/src/main/main.c 2024-07-18 23:05:04.000000000 +0200 @@ -11,9 +11,6 @@ #include "options.h" #include "pv.h" -/* We do not set this because it breaks "dd" - see below. */ -/* #undef MAKE_OUTPUT_NONBLOCKING */ - #include <stdio.h> #include <string.h> #include <errno.h> @@ -194,27 +191,6 @@ pv_state_inputfiles(state, opts->argc, (const char **) (opts->argv)); } - /* Total size calculation, in normal transfer mode. */ - if (0 == opts->watch_pid) { - /* - * If no size was given, try to calculate the total size. - */ - if (0 == opts->size) { - pv_state_linemode_set(state, opts->linemode); - pv_state_null_terminated_lines_set(state, opts->null_terminated_lines); - opts->size = pv_calc_total_size(state); - debug("%s: %llu", "no size given - calculated", opts->size); - } - - /* - * If the size is unknown, we cannot have an ETA. - */ - if (opts->size < 1) { - opts->eta = false; - debug("%s", "size unknown - ETA disabled"); - } - } - /* * If stderr is not a terminal and we're neither forcing output nor * outputting numerically, we will have nothing to display at all. @@ -265,8 +241,65 @@ opts->interval = 600; /* - * Copy parameters from options into main state. + * Set output file, treating no output or "-" as stdout; we have to + * do this before looking at setting the size, as the size + * calculation looks at the output file if the input size can't be + * calculated (issue #91). + */ + if (NULL == opts->output || 0 == strcmp(opts->output, "-")) { + pv_state_output_set(state, STDOUT_FILENO, "(stdout)"); + } else { + int fd = open(opts->output, O_WRONLY | O_CREAT | O_TRUNC, 0600); /* flawfinder: ignore */ + /* + * flawfinder rationale: the output filename has been + * explicitly provided, and in many cases the operator will + * want to write to device files and other special + * destinations, so there is no sense-checking we can do to + * make this safer. + */ + if (fd < 0) { + fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->output, strerror(errno)); + pv_state_free(state); + opts_free(opts); + return PV_ERROREXIT_ACCESS; + } + pv_state_output_set(state, fd, opts->output); + } + + /* + * Copy the "stop at size" option before checking the total size, + * since calculating the size from the output block device size + * after this may want to force this setting on, and if we set it + * afterwards, we undo the override. + */ + pv_state_stop_at_size_set(state, opts->stop_at_size); + + /* Total size calculation, in normal transfer mode. */ + if (0 == opts->watch_pid) { + /* + * If no size was given, try to calculate the total size. + */ + if (0 == opts->size) { + pv_state_linemode_set(state, opts->linemode); + pv_state_null_terminated_lines_set(state, opts->null_terminated_lines); + opts->size = pv_calc_total_size(state); + debug("%s: %llu", "no size given - calculated", opts->size); + } + + /* + * If the size is unknown, we cannot have an ETA. + */ + if (opts->size < 1) { + opts->eta = false; + debug("%s", "size unknown - ETA disabled"); + } + } + + /* + * Copy the remaining parameters from the options into the main + * state. */ + pv_state_interval_set(state, opts->interval); pv_state_width_set(state, opts->width, opts->width_set_manually); pv_state_height_set(state, opts->height, opts->height_set_manually); @@ -282,7 +315,6 @@ pv_state_null_terminated_lines_set(state, opts->null_terminated_lines); pv_state_skip_errors_set(state, opts->skip_errors); pv_state_error_skip_block_set(state, opts->error_skip_block); - pv_state_stop_at_size_set(state, opts->stop_at_size); pv_state_sync_after_write_set(state, opts->sync_after_write); pv_state_direct_io_set(state, opts->direct_io); pv_state_discard_input_set(state, opts->discard_input); @@ -300,39 +332,6 @@ opts->fineta, opts->rate, opts->average_rate, opts->bytes, opts->bufpercent, opts->lastwritten, opts->name); - /* - * Set output file, treating no output or "-" as stdout - */ - if (NULL == opts->output || 0 == strcmp(opts->output, "-")) { - pv_state_output_set(state, STDOUT_FILENO, "(stdout)"); - } else { - int fd = open(opts->output, O_WRONLY | O_CREAT | O_TRUNC, 0600); /* flawfinder: ignore */ - /* - * flawfinder rationale: the output filename has been - * explicitly provided, and in many cases the operator will - * want to write to device files and other special - * destinations, so there is no sense-checking we can do to - * make this safer. - */ - if (fd < 0) { - fprintf(stderr, "%s: %s: %s\n", opts->program_name, opts->output, strerror(errno)); - pv_state_free(state); - opts_free(opts); - return PV_ERROREXIT_ACCESS; - } - pv_state_output_set(state, fd, opts->output); - } - -#ifdef MAKE_OUTPUT_NONBLOCKING - /* - * Try and make the output use non-blocking I/O. - * - * Note that this can cause problems with (broken) applications - * such as dd when used in a pipeline. - */ - fcntl(state->control.output_fd, F_SETFL, O_NONBLOCK | fcntl(state->control.output_fd, F_GETFL)); -#endif /* MAKE_OUTPUT_NONBLOCKING */ - /* Initialise the signal handling. */ pv_sig_init(state); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/src/pv/state.c new/pv-1.8.12/src/pv/state.c --- old/pv-1.8.10/src/pv/state.c 2024-06-16 00:12:23.000000000 +0200 +++ new/pv-1.8.12/src/pv/state.c 2024-07-18 23:05:04.000000000 +0200 @@ -10,11 +10,15 @@ #include "pv.h" #include "pv-internal.h" +/* We do not set this because it breaks "dd" - see below. */ +/* #undef MAKE_OUTPUT_NONBLOCKING */ + #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <errno.h> +#include <fcntl.h> /* alloc / realloc history buffer */ @@ -385,6 +389,15 @@ free(state->control.output_name); state->control.output_fd = fd; state->control.output_name = pv_strdup(name); +#ifdef MAKE_OUTPUT_NONBLOCKING + /* + * Try and make the output use non-blocking I/O. + * + * Note that this can cause problems with (broken) applications + * such as dd when used in a pipeline. + */ + fcntl(state->control.output_fd, F_SETFL, O_NONBLOCK | fcntl(state->control.output_fd, F_GETFL)); +#endif /* MAKE_OUTPUT_NONBLOCKING */ } void pv_state_average_rate_window_set(pvstate_t state, unsigned int val) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pv-1.8.10/src/pv/transfer.c new/pv-1.8.12/src/pv/transfer.c --- old/pv-1.8.10/src/pv/transfer.c 2024-06-16 00:12:23.000000000 +0200 +++ new/pv-1.8.12/src/pv/transfer.c 2024-07-18 23:05:04.000000000 +0200 @@ -181,6 +181,12 @@ * see if we can write any more, and keep trying, to make sure we empty the * buffer as much as we can. * + * While this is called after a successful write-possible select(), write() is + * not guaranteed to succeed for _all_ sizes; we may end up returning 0 if this + * occurs. (The first write() may return -1 / EINTR if the consumer doesn't + * read any data before our timeout and the buffer of whatever stdout is is + * near-full.) (see https://codeberg.org/a-j-wood/pv/pulls/93) + * * If "sync_after_write" is true, we call fdatasync() after each write() (or * fsync() if _POSIX_SYNCHRONIZED_IO is not > 0). * @@ -686,7 +692,11 @@ state->transfer.write_position, (size_t) (state->transfer.to_write), state->control.sync_after_write); - debug("%s: %ld", "bytes written", (long) nwritten); + if (nwritten < 0) { + debug("%s: %ld: %s", "bytes written", (long) nwritten, strerror(errno)); + } else { + debug("%s: %ld", "bytes written", (long) nwritten); + } #if HAVE_SETITIMER memset(&new_timer, 0, sizeof(new_timer)); new_timer.it_interval.tv_sec = 0; @@ -704,13 +714,7 @@ #endif /* HAVE_SETITIMER */ } - if (0 == nwritten) { - /* - * Write returned 0 - EOF on output. - */ - *eof_out = true; - return 1; - } else if (nwritten > 0) { + if (nwritten > 0) { /* * Write returned >0 - data successfully written. */ @@ -796,15 +800,20 @@ } /* - * If we reach this point, nwritten<0, so there was an error. + * If we reach this point, nwritten<=0, so there may be an error. */ /* - * If a write error occurred but it was EINTR or EAGAIN, just wait a - * bit and then return zero, since this was a transient error. + * If a write error occurred but it was EINTR or EAGAIN, or write(2) + * blocked on first write such that nwritten == 0, just wait a bit and + * then return zero, since this was a transient error. */ - if ((EINTR == errno) || (EAGAIN == errno)) { - debug("%s: %s", "transient write error - waiting briefly", strerror(errno)); + if ((0 == nwritten) || (EINTR == errno) || (EAGAIN == errno)) { + if (0 == nwritten) { + debug("%s", "attempted write blocked - waiting briefly"); + } else { + debug("%s: %s", "transient write error - waiting briefly", strerror(errno)); + } (void) is_data_ready(-1, NULL, -1, NULL, 10000); return 0; }