From 40b3975ae0ab99a27fdebec13c32844c897a1687b37958cb824a3ed079bc5c71 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Fri, 26 Jul 2024 13:45:21 +0000 Subject: [PATCH] - Update to version 0.13.0+git.20240726: * Release version 0.13.0 * Fix variable overflow and check for it (#15) OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/wtmpdb?expand=0&rev=37 --- .gitattributes | 23 +++++ .gitignore | 1 + _service | 15 ++++ _servicedata | 7 ++ wtmpdb-0.12.0+git.20240508.tar.xz | 3 + wtmpdb-0.13.0+git.20240726.tar.xz | 3 + wtmpdb.changes | 141 ++++++++++++++++++++++++++++++ wtmpdb.spec | 120 +++++++++++++++++++++++++ 8 files changed, 313 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 _servicedata create mode 100644 wtmpdb-0.12.0+git.20240508.tar.xz create mode 100644 wtmpdb-0.13.0+git.20240726.tar.xz create mode 100644 wtmpdb.changes create mode 100644 wtmpdb.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..a7d19ba --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + https://github.com/thkukuk/wtmpdb.git + git + enable + wtmpdb + main + 0.13.0+git.%cd + + + *.tar + xz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..ca45423 --- /dev/null +++ b/_servicedata @@ -0,0 +1,7 @@ + + + https://github.com/SUSE/pam-config.git + + + https://github.com/thkukuk/wtmpdb.git + b2a2b7649f1c78a4afd5eb0268434491d2099da8 \ No newline at end of file diff --git a/wtmpdb-0.12.0+git.20240508.tar.xz b/wtmpdb-0.12.0+git.20240508.tar.xz new file mode 100644 index 0000000..3e50ab5 --- /dev/null +++ b/wtmpdb-0.12.0+git.20240508.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b47b5d5641e7d28ef4420198bf45ddbfd7115bff2ea138a567505d8d8c84026 +size 21512 diff --git a/wtmpdb-0.13.0+git.20240726.tar.xz b/wtmpdb-0.13.0+git.20240726.tar.xz new file mode 100644 index 0000000..f379dba --- /dev/null +++ b/wtmpdb-0.13.0+git.20240726.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0716862fa8c0f5a5e63be76591a29ffe0b241cec8b6d23eeaae7a49fb50f426e +size 21564 diff --git a/wtmpdb.changes b/wtmpdb.changes new file mode 100644 index 0000000..1468e6d --- /dev/null +++ b/wtmpdb.changes @@ -0,0 +1,141 @@ +------------------------------------------------------------------- +Fri Jul 26 13:40:32 UTC 2024 - kukuk@suse.com + +- Update to version 0.13.0+git.20240726: + * Release version 0.13.0 + * Fix variable overflow and check for it (#15) + +------------------------------------------------------------------- +Wed May 08 08:54:44 UTC 2024 - kukuk@suse.com + +- Update to version 0.12.0+git.20240508: + - boot: Query systemd if soft-reboot was done + +------------------------------------------------------------------- +Mon Jan 8 14:53:09 UTC 2024 - Thorsten Kukuk + +- Update to version 0.11.0 + - last: add support for time-format option + +------------------------------------------------------------------- +Wed Dec 13 14:01:00 UTC 2023 - Thorsten Kukuk + +- Update to version 0.10.0 + - last: support matching for username and/or tty + +------------------------------------------------------------------- +Thu Oct 26 13:07:54 UTC 2023 - Thorsten Kukuk + +- Update to version 0.9.3 + - wtmpdb last: don't print date in the future if there is no + db entry + +------------------------------------------------------------------- +Tue Sep 19 07:53:57 UTC 2023 - Stefan Schubert + +- Update to version 0.9.2 + - Set busy timeout for DB access: The process is waiting until + 5 seconds for DB connection if the DB is locked by another + process. + +------------------------------------------------------------------- +Tue Aug 22 13:47:10 UTC 2023 - Thorsten Kukuk + +- Fix last.1 manual page reference +- Update to version 0.9.1 + - Fix printf format specifier on 32bit + +------------------------------------------------------------------- +Mon Aug 14 15:04:26 UTC 2023 - Thorsten Kukuk + +- Update to version 0.9.0 + - Try to detect systemctl soft-reboot + - Many conversation warning/error fixes + +------------------------------------------------------------------- +Wed Aug 9 14:13:17 UTC 2023 - Thorsten Kukuk + +- Update to version 0.8.0 + - wtmpdb boottime: print boot time + +------------------------------------------------------------------- +Sat Jul 1 23:43:32 UTC 2023 - Jan Engelhardt + +- 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 + +- Update to version 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 + +- Add last compat symlink and manual page + +------------------------------------------------------------------- +Wed Jun 21 06:52:21 UTC 2023 - Thorsten Kukuk + +- Update to version 0.7.0 + - wtmpdb rotate: use sqlite3_bind_* internal + - wtmpdb last: Implement -x, -d, -i and -w options + +------------------------------------------------------------------- +Wed Jun 7 15:18:21 UTC 2023 - Thorsten Kukuk + +- Update to version 0.6.0 + - wtmpdb rotate: move old log entries into wtmpdb_.db + +------------------------------------------------------------------- +Wed Apr 26 09:11:23 UTC 2023 - Thorsten Kukuk + +- Update to version 0.5.0 + - Use uint64_t instead of usec_t to avoid conflicts + - wtmpdb boot: more accurate calculation of boot time + +------------------------------------------------------------------- +Mon Apr 24 09:46:56 UTC 2023 - Thorsten Kukuk + +- Use Requires(pre) and Requires(post) instead of PreReq + +------------------------------------------------------------------- +Tue Apr 18 06:21:02 UTC 2023 - Thorsten Kukuk + +- Update to version 0.4.0 + - libwtmpdb: Use project version for library version + - libwtmpdb: Always use _PATH_WTMPDB as fallback + +------------------------------------------------------------------- +Mon Apr 17 13:28:05 UTC 2023 - Thorsten Kukuk + +- Skip pam_wtmpdb for sshd + +------------------------------------------------------------------- +Wed Apr 12 13:28:47 UTC 2023 - Thorsten Kukuk + +- Update to version 0.3.0 + - pam_wtmpdb: Add skip_if option + - Add manual pages + - wtmpdb last: fix wtmp begins timestamp if no matching entry was found + - wtmpdb last: Add --since and --until options + - Add compat symlink for "last" + - wtmpdb last: add --present option + - wtmpdb last: implement -n/--limit + - pam_wtmpdb: Try XDG_VTNR if PAM_TTY is not a tty + +------------------------------------------------------------------- +Mon Apr 3 09:17:15 UTC 2023 - Thorsten Kukuk + +- Update to version 0.2.0 + - pam_lastlog: support PAM_XDISPLAY + - wtmpdb last: show PAM service on request + - wtmpdb: log audit records for boot/shutdown + +------------------------------------------------------------------- +Thu Mar 30 13:12:09 UTC 2023 - Thorsten Kukuk + +- Initial package diff --git a/wtmpdb.spec b/wtmpdb.spec new file mode 100644 index 0000000..90ae50e --- /dev/null +++ b/wtmpdb.spec @@ -0,0 +1,120 @@ +# +# spec file for package wtmpdb +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libwtmpdb0 +Name: wtmpdb +Version: 0.13.0+git.20240726 +Release: 0 +Summary: Database for recording the last logged in users and system reboots +License: BSD-2-Clause +URL: https://github.com/thkukuk/wtmpdb +Source: https://github.com/thkukuk/wtmpdb/releases/download/v0.10.0/%{name}-%{version}.tar.xz +BuildRequires: docbook5-xsl-stylesheets +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(audit) +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(pam) +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 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. + +%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. + +%prep +%autosetup + +%build +%meson -Dman=true -Dcompat-symlink=true +%meson_build + +%install +%meson_install +mkdir -p %{buildroot}%{_mandir}/man1 +echo ".so man8/wtmpdb.8" > %{buildroot}%{_mandir}/man1/last.1 + +%check +%meson_test + +%pre +%service_add_pre wtmpdb-update-boot.service wtmpdb-rotate.timer + +%preun +%service_del_preun wtmpdb-update-boot.service wtmpdb-rotate.timer + +%post +%tmpfiles_create wtmpdb.conf +%service_add_post wtmpdb-update-boot.service wtmpdb-rotate.timer +pam-config -a --wtmpdb --wtmpdb-skip_if=sshd + +%postun +if [ "$1" -eq 0 ]; then + pam-config -d --wtmpdb +fi +%service_del_postun_without_restart wtmpdb-update-boot.service +%service_del_postun wtmpdb-rotate.timer + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/last +%{_bindir}/wtmpdb +%{_unitdir}/wtmpdb-update-boot.service +%{_unitdir}/wtmpdb-rotate.service +%{_unitdir}/wtmpdb-rotate.timer +%{_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} + +%files -n %{lname} +%license LICENSE +%{_libdir}/libwtmpdb.so.* + +%files devel +%{_libdir}/libwtmpdb.so +%{_includedir}/wtmpdb.h +%{_libdir}/pkgconfig/libwtmpdb.pc + +%changelog