Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package acpi for openSUSE:Factory checked in at 2025-05-03 20:58:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/acpi (Old) and /work/SRC/openSUSE:Factory/.acpi.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "acpi" Sat May 3 20:58:56 2025 rev:16 rq:1274070 version:1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/acpi/acpi.changes 2021-01-04 19:09:35.331402481 +0100 +++ /work/SRC/openSUSE:Factory/.acpi.new.30101/acpi.changes 2025-05-03 21:01:19.695533908 +0200 @@ -1,0 +2,19 @@ +Sun Apr 27 08:41:45 UTC 2025 - mun...@googlemail.com + +- Update to version 1.8 + * Make sure filename is NULL terminated. + * Update German manpage + * Allow different output formats for (dis)charge information. + * Display estimated end time for {,dis}charging, too. + * fix: battery runtime estimation with negative sysfs values + Some drivers (example: qualcomm-battmgr, present on Snapdragon + X1 laptops) expose the current_now and power_now values in + sysfs as negative int when the device is discharging, positive + when charging. + This breaks the battery runtime estimation in acpi, as it + expects a uint32 for power_now. + Use the absolute values of power_now to fix the problem, and + does the same for current_now to respect the ABI documentation. +- Add german man page + +------------------------------------------------------------------- Old: ---- acpi-1.7.tar.gz New: ---- acpi-1.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ acpi.spec ++++++ --- /var/tmp/diff_new_pack.KnRXSP/_old 2025-05-03 21:01:21.067592215 +0200 +++ /var/tmp/diff_new_pack.KnRXSP/_new 2025-05-03 21:01:21.083592895 +0200 @@ -1,7 +1,7 @@ # # spec file for package acpi # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,11 +17,10 @@ Name: acpi -Version: 1.7 +Version: 1.8 Release: 0 Summary: Command-line ACPI client License: GPL-2.0-or-later -Group: System/Daemons URL: https://sourceforge.net/projects/acpiclient/ Source: https://sourceforge.net/projects/acpiclient/files/acpiclient/%{version}/%{name}-%{version}.tar.gz # Package was split from acpid package @@ -43,9 +42,12 @@ %install %make_install +install -D -m 0644 acpi.de.1 %{buildroot}%{_mandir}/de/man1/acpi.1 + %files %license COPYING -%doc AUTHORS ChangeLog README +%doc AUTHORS README %{_bindir}/acpi %{_mandir}/man1/acpi.1%{?ext_man} +%{_mandir}/de/man1/acpi.1%{?ext_man} ++++++ acpi-1.7.tar.gz -> acpi-1.8.tar.gz ++++++ ++++ 8368 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/COPYING new/acpi-1.8/COPYING --- old/acpi-1.7/COPYING 2009-03-15 16:11:02.000000000 +0100 +++ new/acpi-1.8/COPYING 2010-03-24 00:34:05.000000000 +0100 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,17 +303,16 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/ChangeLog new/acpi-1.8/ChangeLog --- old/acpi-1.7/ChangeLog 2012-01-13 12:44:11.000000000 +0100 +++ new/acpi-1.8/ChangeLog 1970-01-01 01:00:00.000000000 +0100 @@ -1,130 +0,0 @@ -2012-01-13 Michael Meskes <mes...@debian.org> - - * Fixed case sensitivity when checking for status file. - * release 1.6 - -2011-03-09 Luca Capello <l...@pca.it> - - * main.c: use spaces to align -h output - -2010-03-28 Michael Meskes <mes...@debian.org> - - * Print error message if no information can be retrieved e.g. because acpi is - not activated. - * Read power_now and use it to replace current_now if the battery is reporting - energy values. - * released 1.5 - -2009-06-04 Michael Meskes <mes...@debian.org> - - * fixed floating point exception when voltage_now is 0 - -2009-03-25 Michael Meskes <mes...@debian.org> - - * released 1.4 - -2009-03-23 Michael Meskes <mes...@debian.org> - - * fixed state information for thermal zones - * added output of all trip points - * straightlined old crufty user interface - -2009-03-19 Michael Meskes <mes...@debian.org> - - * fixed battery output to cope with systems giving energy values but no - voltage value - -2009-02-11 Michael Meskes <mes...@debian.org> - - * charge and energy values are not equivalent, correctly convert them - * released 1.3 - -2008-09-17 Michael Meskes <mes...@debian.org> - - * released 1.2 - -2008-09-11 Michael Meskes <mes...@debian.org> - - * made capacity information dependant on option - * also show last full capacity - -2008-08-22 Michael Meskes <mes...@debian.org> - - * fixed wording in manpage with regard to default path for new interface - * fixed buffer underrun in parse_field() - * do not use unsigned int if values can be negative - * fixed calculation of (dis)charging time (seconds/minutes mismatch) - * display design capacity - -2008-06-17 Michael Meskes <mes...@debian.org> - - * released 1.1 - * just another possible type entry - * some more code cleanup - * removed support for old /proc file structure, only the last version of - the /proc file structure is supported - -2008-06-13 Michael Meskes <mes...@debian.org> - - * release 1.0 - * added output for cooling devices - -2008-06-06 Michael Meskes <mes...@debian.org> - - * added new /sys interface - * forked/took over as upstream because I wasn't able to contact Grahame - -2005-04-14 Grahame Bowland <grah...@angrygoats.net> - - * release 0.09 - * fixes Debian bug ids: #169351, #226306 - * better handling of "unknown" "charging rate" and "present state" fields - * reformatted from 4 space to tab indents - * use VERSION from config.h rather than hard-coding it twice. - -2005-04-12 Grahame Bowland <grah...@angrygoats.net> - - * release 0.08 - * fixes a number of bugs from Debian: #288378, #275564, #229870 - * now using monotone for version control. - -2003-11-10 Grahame Bowland <grah...@angrygoats.net> - - * release 0.0.7 - * merge patches from Joey Hess - * cleanups, updated email address to grah...@angrygoats.net - * grah...@azale.net does *not* contact me any more. - -2002-04-07 Grahame Bowland <grah...@angrygoats.net> - - * release 0.0.5 - * merge another patch from Joey Hess - * (hopefully) fix bug with ac_adaptor on old ACPI - - -2002-04-06 Grahame Bowland <grah...@angrygoats.net> - - * release 0.0.4 - * Added support for the -V option. - * Merged patch from Joey Hess <j...@debian.org> to add - * compatibility with older versions of the ACPI /proc - layout. - -2002-04-03 Grahame Bowland <grah...@angrygoats.net> - - * release 0.0.3 - * fix to work with new /proc layout, as of ACPI patch 20020329 - -2001-??-?? Grahame Bowland <grah...@angrygoats.net> - - * release 0.0.2 - * Acer TM517 support; bugfixes by Ulrich Hahn - * autoconf/automake for builds now - * general bugfixes - -2002-??-?? Grahame Bowland <grah...@angrygoats.net> - - * Initial Release (0.0.1) - - -- Grahame Bowland <grah...@angrygoats.net> - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/INSTALL new/acpi-1.8/INSTALL --- old/acpi-1.7/INSTALL 2009-03-15 16:11:02.000000000 +0100 +++ new/acpi-1.8/INSTALL 2025-02-27 20:55:49.000000000 +0100 @@ -23,7 +23,7 @@ called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. - If you are building from CVS you have to run 'autoreconf -i' first to + If you are building from git you have to run 'autoreconf -i' first to generate all files you need for the build process. The simplest way to compile this package is: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/README new/acpi-1.8/README --- old/acpi-1.7/README 2009-03-15 16:11:02.000000000 +0100 +++ new/acpi-1.8/README 2013-11-16 22:49:44.000000000 +0100 @@ -14,5 +14,8 @@ please include a tar file of /proc/acpi or /sys/class depending on the interface you used. This will allow me to test the behaviour of the program. +The Changelog file that was available in older versions has been removed. +Please use the git log instead to see which changes occured between version. + Michael Meskes mes...@debian.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/acpi.1 new/acpi-1.8/acpi.1 --- old/acpi-1.7/acpi.1 2010-05-12 14:56:34.000000000 +0200 +++ new/acpi-1.8/acpi.1 2025-02-27 20:36:47.000000000 +0100 @@ -14,6 +14,12 @@ show battery information .IP "\fB-a | --ac-adapter\fP " 10 show ac adapter information +.IP "\fB-r | --remaining-time\fP " 10 +show remaining time of (dis)charge +.IP "\fB-e | --end-time\fP " 10 +show end time of (dis)charge +.IP "\fB-F | --format-time\fP " 10 +chose the format for the end time of (dis)charge, using the syntax of \fBstrftime\fP(3) .IP "\fB-t | --thermal\fP " 10 show thermal information .IP "\fB-c | --cooling\fP " 10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/acpi.c new/acpi-1.8/acpi.c --- old/acpi-1.7/acpi.c 2012-01-13 12:48:28.000000000 +0100 +++ new/acpi-1.8/acpi.c 2025-02-27 21:12:08.000000000 +0100 @@ -1,7 +1,7 @@ /* provides a simple client program that reads ACPI status from the /proc filesystem * - * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> - * (C) 2008-2012 Michael Meskes <mes...@debian.org> + * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * (C) 2008-2013 Michael Meskes <mes...@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ #include <unistd.h> @@ -26,6 +27,7 @@ #include <getopt.h> #include <string.h> #include <errno.h> +#include <time.h> #include "list.h" #include "acpi.h" @@ -84,7 +86,7 @@ break; } } else { - strncpy(attr, given_attr, BUF_SIZE); + strncpy(attr, given_attr, BUF_SIZE-1); } strncpy(value, p, BUF_SIZE); if (attr[strlen(attr) - 1] == '\n') @@ -247,7 +249,7 @@ return n; } -void print_battery_information(struct list *batteries, int show_empty_slots, int show_capacity) +void print_battery_information(struct list *batteries, int show_empty_slots, int show_capacity, int show_remaining_time, int show_end_time, char *end_time_format) { struct list *battery = batteries; struct list *fields; @@ -265,9 +267,12 @@ int last_capacity_unit = -1; int hours, minutes, seconds; int percentage; - char *state = NULL, *poststr; + char *state = NULL, *poststr, *prestr; int type_battery = TRUE; char capacity_unit[4] = "mAh"; + char stm[BUF_SIZE]; + time_t end_time; + struct tm end_time_tm; fields = battery->data; while (fields) { @@ -287,9 +292,9 @@ } else if (!strcasecmp(value->attr, "present rate")) { present_rate = get_unit_value(value->value); } else if (!strcmp(value->attr, "current_now")) { - present_rate = get_unit_value(value->value) / 1000; + present_rate = abs(get_unit_value(value->value)) / 1000; } else if (!strcmp(value->attr, "power_now")) { - present_rate = get_unit_value(value->value) / 1000; + present_rate = abs(get_unit_value(value->value)) / 1000; } else if (!strcasecmp(value->attr, "last full capacity")) { last_capacity = get_unit_value(value->value); if (!state) @@ -365,6 +370,7 @@ if (present_rate > MIN_PRESENT_RATE) { seconds = 3600 * (last_capacity - remaining_capacity) / present_rate; poststr = " until charged"; + prestr = " fully charged at"; } else { poststr = "charging at zero rate - will never fully charge."; seconds = -1; @@ -373,6 +379,7 @@ if (present_rate > MIN_PRESENT_RATE) { seconds = 3600 * remaining_capacity / present_rate; poststr = " remaining"; + prestr = " fully discharged at"; } else { poststr = "discharging at zero rate - will never fully discharge."; seconds = -1; @@ -383,11 +390,22 @@ } if (seconds > 0) { - hours = seconds / 3600; - seconds -= 3600 * hours; - minutes = seconds / 60; - seconds -= 60 * minutes; - printf(", %02d:%02d:%02d%s", hours, minutes, seconds, poststr); + if (show_remaining_time) { + hours = seconds / 3600; + seconds -= 3600 * hours; + minutes = seconds / 60; + seconds -= 60 * minutes; + printf(", %02d:%02d:%02d%s", hours, minutes, seconds, poststr); + } + + end_time = time(NULL) + seconds; + if (show_end_time && localtime_r(&end_time, &end_time_tm)) { + if (end_time_format && strftime(stm, sizeof(stm), end_time_format, &end_time_tm)) { + printf(",%s %s", prestr, stm); + } else { + printf(",%s %02i:%02d:%02d", prestr, end_time_tm.tm_hour, end_time_tm.tm_min, end_time_tm.tm_sec); + } + } } else if (poststr != NULL) { printf(", %s", poststr); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/acpi.de.1 new/acpi-1.8/acpi.de.1 --- old/acpi-1.7/acpi.de.1 2009-03-23 16:31:06.000000000 +0100 +++ new/acpi-1.8/acpi.de.1 2025-02-27 20:42:43.000000000 +0100 @@ -14,6 +14,12 @@ zeigt den Batterieladestand an .IP "\fB-a | --ac-adapter\fP " 10 zeigt an, ob die Batterie geladen wird +.IP "\fB-r | --remaining-time\fP " 10 +zeigt die verbleibende (Ent-)Ladezeit +.IP "\fB-e | --end-time\fP " 10 +zeigt die Endzeit des (Ent)Ladens +.IP "\fB-F | --format-time\fP " 10 +bestimmt das Format der Endzeit des (Ent-)Ladens in der Syntax von \fBstrftime\fP(3) .IP "\fB-t | --thermal\fP " 10 zeigt die Temperatur an .IP "\fB-c | --cooling\fP " 10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/acpi.h new/acpi-1.8/acpi.h --- old/acpi-1.7/acpi.h 2009-03-23 16:23:12.000000000 +0100 +++ new/acpi-1.8/acpi.h 2025-02-27 20:36:47.000000000 +0100 @@ -1,8 +1,8 @@ /* provides a simple client program that reads ACPI status from the /proc * filesystem * - * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> - * Michael Meskes <mes...@debian.org> + * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * (C) 2008-2013 Michael Meskes <mes...@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ #ifndef _ACPI_H @@ -60,7 +61,7 @@ void free_devices(struct list *devices); -void print_battery_information(struct list *batteries, int show_empty_slots, int show_capacity); +void print_battery_information(struct list *batteries, int show_empty_slots, int show_capacity, int show_remaining_time, int show_end_time, char *end_time_format); void print_ac_adapter_information(struct list *batteries, int show_empty_slots); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/compile new/acpi-1.8/compile --- old/acpi-1.7/compile 2013-11-05 12:37:16.000000000 +0100 +++ new/acpi-1.8/compile 2025-02-28 09:49:11.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2024-06-19.01; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2024 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) @@ -143,7 +143,7 @@ # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in - *.o | *.[oO][bB][jJ]) + *.o | *.lo | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift @@ -248,14 +248,18 @@ right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-autom...@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>. EOF exit $? ;; -v | --v*) - echo "compile $scriptversion" + echo "compile (GNU Automake) $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +343,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/config.h.in new/acpi-1.8/config.h.in --- old/acpi-1.7/config.h.in 2013-11-05 12:37:15.000000000 +0100 +++ new/acpi-1.8/config.h.in 2025-02-28 09:49:11.000000000 +0100 @@ -21,8 +21,5 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* Version number of package */ #undef VERSION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/configure.ac new/acpi-1.8/configure.ac --- old/acpi-1.7/configure.ac 2013-11-05 12:34:05.000000000 +0100 +++ new/acpi-1.8/configure.ac 2025-02-27 21:18:34.000000000 +0100 @@ -1,10 +1,10 @@ -AC_INIT([acpi], [1.7]) -AM_INIT_AUTOMAKE -AM_CONFIG_HEADER([config.h]) +AC_INIT([acpi],[1.8]) +AM_INIT_AUTOMAKE([foreign]) +AC_CONFIG_HEADERS([config.h]) AC_PROG_CC -AC_HEADER_STDC AC_ARG_PROGRAM AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) -AC_OUTPUT([Makefile]) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/create_tarball.sh new/acpi-1.8/create_tarball.sh --- old/acpi-1.7/create_tarball.sh 2013-11-05 12:37:08.000000000 +0100 +++ new/acpi-1.8/create_tarball.sh 2025-02-27 21:18:42.000000000 +0100 @@ -2,7 +2,7 @@ # start this script inside the acpi source tree to create a releasable tarball -version=`grep AC_INIT configure.ac |sed -e 's/AC_INIT(\[acpi\], \[//' -e 's/\])//'` +version=`grep AC_INIT configure.ac |sed -e 's/AC_INIT(\[acpi\],\[//' -e 's/\])//'` major=`echo $version |cut -f1 -d"."` minor=`echo $version |cut -f2 -d"."` if [ -d ../acpi-$major.$minor ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/list.c new/acpi-1.8/list.c --- old/acpi-1.7/list.c 2009-03-15 16:11:02.000000000 +0100 +++ new/acpi-1.8/list.c 2013-11-16 22:52:14.000000000 +0100 @@ -1,6 +1,7 @@ /* a simple implementation of linked lists * - * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * (C) 2008-2013 Michael Meskes <mes...@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +15,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ #include <stdio.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/list.h new/acpi-1.8/list.h --- old/acpi-1.7/list.h 2009-03-15 16:11:02.000000000 +0100 +++ new/acpi-1.8/list.h 2013-11-16 22:53:28.000000000 +0100 @@ -1,6 +1,7 @@ /* a simple implementation of linked lists * - * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * (C) 2008-2013 Michael Meskes <mes...@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +15,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ #ifndef _LIST_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/main.c new/acpi-1.8/main.c --- old/acpi-1.7/main.c 2013-10-31 19:59:18.000000000 +0100 +++ new/acpi-1.8/main.c 2025-02-28 09:48:45.000000000 +0100 @@ -1,8 +1,8 @@ /* provides a simple client program that reads ACPI status from the /proc * filesystem * - * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> - * Copyright (C) 2008-2012 Michael Meskes <mes...@debian.org> + * Copyright (C) 2001 Grahame Bowland <grah...@angrygoats.net> + * (C) 2008-2013 Michael Meskes <mes...@debian.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,8 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA */ #include <stdio.h> @@ -32,12 +33,12 @@ { COOLING_DEV, "fan", "thermal", "cooling_device" } }; -static void do_show_batteries(char *acpi_path, int show_empty_slots, int show_details, int proc_interface) +static void do_show_batteries(char *acpi_path, int show_empty_slots, int show_details, int show_remaining_time, int show_end_time, char *end_time_format, int proc_interface) { struct list *batteries; batteries = find_devices(acpi_path, BATTERY, proc_interface); - print_battery_information(batteries, show_empty_slots, show_details); + print_battery_information(batteries, show_empty_slots, show_details, show_remaining_time, show_end_time, end_time_format); free_devices(batteries); } @@ -90,6 +91,9 @@ " - battery capacity information\n" " - temperature trip points\n" " -a, --ac-adapter ac adapter information\n" +" -r, --remaining-time show remaining time for (dis)charge\n" +" -e, --end-time show end time for (dis)charge\n" +" -F, --format-time <str> specify end-time format string\n" " -t, --thermal thermal information\n" " -c, --cooling cooling information\n" " -V, --everything show every device, overrides above options\n" @@ -125,6 +129,9 @@ { "everything", 0, 0, 'V' }, { "proc", 0, 0, 'p' }, { "details", 0, 0, 'i' }, + { "remaining-time", 0, 0, 'r' }, + { "end-time", 0, 0, 'e' }, + { "format-time", 1, 0, 'F' }, { 0, 0, 0, 0 }, }; @@ -136,17 +143,20 @@ int show_cooling = FALSE; int show_empty_slots = FALSE; int show_details = FALSE; + int show_remaining_time = 2; + int show_end_time = FALSE; int proc_interface = FALSE; int temperature_units = TEMP_CELSIUS; int ch, option_index; char *acpi_path = strdup(ACPI_PATH_SYS); + char *end_time_format = NULL; if (!acpi_path) { fprintf(stderr, "Out of memory in main()\n"); return -1; } - while ((ch = getopt_long(argc, argv, "ipVbtashvfkcd:", long_options, &option_index)) != -1) { + while ((ch = getopt_long(argc, argv, "F:eripVbtashvfkcd:", long_options, &option_index)) != -1) { switch (ch) { case 'V': show_batteries = show_ac_adapter = show_thermal = show_cooling = show_details = TRUE; @@ -178,6 +188,22 @@ case 'k': temperature_units = TEMP_KELVIN; break; + case 'r': + show_remaining_time = TRUE; + break; + case 'e': + show_end_time = TRUE; + if (show_remaining_time==2) { + show_remaining_time = FALSE; + } + break; + case 'F': + end_time_format = strdup(optarg); + if (!end_time_format) { + fprintf(stderr, "Out of memory in main()\n"); + return -1; + } + break; case 'p': proc_interface = TRUE; free(acpi_path); @@ -201,12 +227,22 @@ } } + + /* if neither -e nor -r was chosen, show remaining time, for backward compatibility */ + if (show_remaining_time==2) { + show_remaining_time = TRUE; + } + + if (end_time_format && !show_end_time) { + fprintf(stderr, "Warning: ignoring the time format since option -e is not specified"); + } + /* if nothing was chosen, we show the battery information */ if (!show_batteries && !show_ac_adapter && !show_thermal && !show_cooling) show_batteries = TRUE; if (show_batteries) { - do_show_batteries(acpi_path, show_empty_slots, show_details, proc_interface); + do_show_batteries(acpi_path, show_empty_slots, show_details, show_remaining_time, show_end_time, end_time_format, proc_interface); } if (show_ac_adapter) { do_show_ac_adapter(acpi_path, show_empty_slots, proc_interface); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/acpi-1.7/missing new/acpi-1.8/missing --- old/acpi-1.7/missing 2013-11-05 12:37:16.000000000 +0100 +++ new/acpi-1.8/missing 2025-02-28 09:49:11.000000000 +0100 @@ -1,9 +1,11 @@ #! /bin/sh -# Common wrapper for a few potentially missing GNU programs. +# Common wrapper for a few potentially missing GNU and other programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2024-06-07.14; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells + +# Copyright (C) 1996-2024 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +19,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -54,18 +56,20 @@ -v, --version output version information and exit Supported PROGRAM values: - aclocal autoconf autoheader autom4te automake makeinfo - bison yacc flex lex help2man +aclocal autoconf autogen autoheader autom4te automake autoreconf +bison flex help2man lex makeinfo perl yacc Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. -Send bug reports to <bug-autom...@gnu.org>." +Report bugs to <bug-autom...@gnu.org>. +GNU Automake home page: <https://www.gnu.org/software/automake/>. +General help using GNU software: <https://www.gnu.org/gethelp/>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" + echo "missing (GNU Automake) $scriptversion" exit $? ;; @@ -101,14 +105,14 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in - aclocal|automake) + aclocal|automake|autoreconf) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" @@ -123,6 +127,9 @@ echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; + *) + : + ;; esac } @@ -137,48 +144,55 @@ printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + autoheader_deps="'acconfig.h'" + automake_deps="'Makefile.am'" + aclocal_deps="'acinclude.m4'" case $normalized_program in + aclocal*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$configure_deps." + ;; autoconf*) - echo "You should only need it if you modified 'configure.ac'," - echo "or m4 files included by it." - program_details 'autoconf' + echo "You should only need it if you modified $configure_deps." + ;; + autogen*) + echo "You should only need it if you modified a '.def' or '.tpl' file." + echo "You may want to install the GNU AutoGen package:" + echo "<$gnu_software_URL/autogen/>" ;; autoheader*) - echo "You should only need it if you modified 'acconfig.h' or" + echo "You should only need it if you modified $autoheader_deps or" echo "$configure_deps." - program_details 'autoheader' ;; automake*) - echo "You should only need it if you modified 'Makefile.am' or" - echo "$configure_deps." - program_details 'automake' - ;; - aclocal*) - echo "You should only need it if you modified 'acinclude.m4' or" + echo "You should only need it if you modified $automake_deps or" echo "$configure_deps." - program_details 'aclocal' ;; - autom4te*) + autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." - program_details 'autom4te' + echo "the 'autom4te' program to be rebuilt." + ;; + autoreconf*) + echo "You should only need it if you modified $aclocal_deps or" + echo "$automake_deps or $autoheader_deps or $automake_deps or" + echo "$configure_deps." ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; - lex*|flex*) - echo "You should only need it if you modified a '.l' file." - echo "You may want to install the Fast Lexical Analyzer package:" - echo "<$flex_URL>" - ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." @@ -189,6 +203,12 @@ echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; + perl*) + echo "You should only need it to run GNU Autoconf, GNU Automake, " + echo " assorted other tools, or if you modified a Perl source file." + echo "You may want to install the Perl 5 language interpreter:" + echo "<$perl_URL>" + ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" @@ -197,6 +217,7 @@ echo "case some other package contains this missing '$1' program." ;; esac + program_details "$normalized_program" } give_advice "$1" | sed -e '1s/^/WARNING: /' \ @@ -207,9 +228,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: