Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wtmpdb for openSUSE:Factory checked in at 2023-07-12 17:26:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wtmpdb (Old) and /work/SRC/openSUSE:Factory/.wtmpdb.new.8922 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wtmpdb" Wed Jul 12 17:26:40 2023 rev:6 rq:1097971 version:0.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/wtmpdb/wtmpdb.changes 2023-06-23 21:52:17.590515959 +0200 +++ /work/SRC/openSUSE:Factory/.wtmpdb.new.8922/wtmpdb.changes 2023-07-12 17:26:52.842329775 +0200 @@ -1,0 +2,19 @@ +Sat Jul 1 23:43:32 UTC 2023 - Jan Engelhardt <jeng...@inai.de> + +- https://en.opensuse.org/SourceUrls +- Use noun phrase for Summary. +- Wrap descriptions at 70 (for yast2 textmode). + +------------------------------------------------------------------- +Thu Jun 29 12:09:19 UTC 2023 - Thorsten Kukuk <ku...@suse.com> + +- Update to ersion 0.7.1 + - wtmpdb last: Support "YYYY-MM-DD", "today" and "yesterday" as + time option + +------------------------------------------------------------------- +Tue Jun 27 06:30:33 UTC 2023 - Thorsten Kukuk <ku...@suse.com> + +- Add last compat symlink and manual page + +------------------------------------------------------------------- Old: ---- wtmpdb-0.7.0.tar.xz New: ---- wtmpdb-0.7.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wtmpdb.spec ++++++ --- /var/tmp/diff_new_pack.uHwTJE/_old 2023-07-12 17:26:53.466333411 +0200 +++ /var/tmp/diff_new_pack.uHwTJE/_new 2023-07-12 17:26:53.474333458 +0200 @@ -18,12 +18,12 @@ %define lname libwtmpdb0 Name: wtmpdb -Version: 0.7.0 +Version: 0.7.1 Release: 0 -Summary: Reports last logged in users and system reboots +Summary: Database for recording the last logged in users and system reboots License: BSD-2-Clause URL: https://github.com/thkukuk/wtmpdb -Source: %{name}-%{version}.tar.xz +Source: https://github.com/thkukuk/wtmpdb/releases/download/v0.7.1/%{name}-%{version}.tar.xz BuildRequires: docbook5-xsl-stylesheets BuildRequires: meson BuildRequires: pkgconfig @@ -32,33 +32,42 @@ BuildRequires: pkgconfig(sqlite3) Requires(post): pam-config Requires(postun):pam-config +# Split provide for last +Provides: util-linux:/usr/bin/last %description -pam_wtmpdb and wtmpdb are Y2038 safe versions of wtmp and the last utility. pam_wtmpdb collects all data in a sqlite3 database and wtmpdb creates boot and shutdown entries or formats and prints the contents of the wtmp database. +pam_wtmpdb and wtmpdb are Y2038-safe versions of wtmp and the last +utility. pam_wtmpdb collects all data in a sqlite3 database and the +wtmpdb utility creates boot and shutdown entries or formats and +prints the contents of the wtmp database. %package -n %{lname} Summary: PAM module to store login and logout of users %description -n %{lname} -The libwtmpdb provides various interfaces to read, write or modify the wtmpdb database. +The libwtmpdb provides various interfaces to read, write or modify +the wtmpdb database. %package devel Summary: Development files for libwtmpdb Requires: %{lname} = %{version} %description devel -This package contains all necessary include files and libraries needed -to develop applications that needs to read, write or modify the wtmpdb database. +This package contains all necessary include files and libraries +needed to develop applications that needs to read, write or modify +the wtmpdb database. %prep -%setup -q +%autosetup %build -%meson -Dman=true +%meson -Dman=true -Dcompat-symlink=true %meson_build %install %meson_install +mkdir -p %{buildroot}%{_mandir}/man1 +echo ".so wtmpdb.8" > %{buildroot}%{_mandir}/man1/last.1 %check %meson_test @@ -86,6 +95,7 @@ %files %license LICENSE +%{_bindir}/last %{_bindir}/wtmpdb %{_unitdir}/wtmpdb-update-boot.service %{_unitdir}/wtmpdb-rotate.service @@ -93,6 +103,7 @@ %{_tmpfilesdir}/wtmpdb.conf %{_pam_moduledir}/pam_wtmpdb.so %ghost %{_localstatedir}/lib/wtmpdb +%{_mandir}/man1/last.1%{?ext_man} %{_mandir}/man8/wtmpdb.8%{?ext_man} %{_mandir}/man8/pam_wtmpdb.8%{?ext_man} ++++++ wtmpdb-0.7.0.tar.xz -> wtmpdb-0.7.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wtmpdb-0.7.0/NEWS new/wtmpdb-0.7.1/NEWS --- old/wtmpdb-0.7.0/NEWS 2023-06-22 15:27:58.000000000 +0200 +++ new/wtmpdb-0.7.1/NEWS 2023-06-29 14:05:36.000000000 +0200 @@ -1,3 +1,6 @@ +Version 0.7.1 +* wtmpdb last: Support "YYYY-MM-DD", "today" and "yesterday" as time option + Version 0.7.0 * wtmpdb rotate: use sqlite3_bind_* internal * wtmpdb last: Implement -x, -d, -i and -w options diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wtmpdb-0.7.0/man/wtmpdb.8.xml new/wtmpdb-0.7.1/man/wtmpdb.8.xml --- old/wtmpdb-0.7.0/man/wtmpdb.8.xml 2023-06-22 15:27:58.000000000 +0200 +++ new/wtmpdb-0.7.1/man/wtmpdb.8.xml 2023-06-29 14:05:36.000000000 +0200 @@ -189,7 +189,11 @@ </varlistentry> </variablelist> <para> - <replaceable>TIME</replaceable> must be in the format <option>"YYYY-MM-DD HH:MM:SS"</option>. + <replaceable>TIME</replaceable> must be in the format + <option>"YYYY-MM-DD HH:MM:SS"</option>, + <option>"YYYY-MM-DD"</option>, <option>"today"</option> or + <option>"yesterday"</option> (time will be set to 00:00:00 + if not specified). </para> </listitem> </varlistentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wtmpdb-0.7.0/meson.build new/wtmpdb-0.7.1/meson.build --- old/wtmpdb-0.7.0/meson.build 2023-06-22 15:27:58.000000000 +0200 +++ new/wtmpdb-0.7.1/meson.build 2023-06-29 14:05:36.000000000 +0200 @@ -11,7 +11,7 @@ 'b_pie=true', 'warning_level=3',], license : ['BSD-2-Clause',], - version : '0.7.0', + version : '0.7.1', ) conf = configuration_data() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wtmpdb-0.7.0/src/wtmpdb.c new/wtmpdb-0.7.1/src/wtmpdb.c --- old/wtmpdb-0.7.0/src/wtmpdb.c 2023-06-22 15:27:58.000000000 +0200 +++ new/wtmpdb-0.7.1/src/wtmpdb.c 2023-06-29 14:05:36.000000000 +0200 @@ -115,16 +115,38 @@ } static int -parse_time (const char *str, time_t *time) +parse_time (const char *str, time_t *arg) { struct tm res; - char *r = strptime (str, "%Y-%m-%d %T", &res); + if (strcmp (str, "today") == 0) + { + time_t t = time (NULL); + localtime_r (&t, &res); + res.tm_isdst = -1; + res.tm_sec = res.tm_min = res.tm_hour = 0; + } + else if (strcmp (str, "yesterday") == 0) + { + time_t t = time (NULL); + localtime_r (&t, &res); + res.tm_isdst = -1; + res.tm_mday--; + res.tm_sec = res.tm_min = res.tm_hour = 0; + } + else + { + char *r = strptime (str, "%Y-%m-%d %T", &res); - if (r == NULL || *r != '\0') - return -1; + if (r == NULL || *r != '\0') + { + r = strptime (str, "%Y-%m-%d", &res); + if (r == NULL || *r != '\0') + return -1; + } + } - *time = mktime (&res); + *arg = mktime (&res); return 0; } @@ -522,7 +544,7 @@ if (entries == 0 || wtmpdb_backup == NULL) printf ("No old entries found\n"); else - printf ("%lli entries moved to %s\n", + printf ("%lli entries moved to %s\n", (long long unsigned int)entries, wtmpdb_backup); free (wtmpdb_backup);