From ea8b0a11552854ae07bcc2db3202a7c25d11c8b8347e968df58a5f7b4a9dba74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 14:17:34 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main lastlog2 revision b290f430d9e3de6030272112a2fa7003 --- .gitattributes | 23 +++++++++ lastlog2-1.3.1.tar.xz | 3 ++ lastlog2.changes | 106 +++++++++++++++++++++++++++++++++++++++++ lastlog2.spec | 107 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 239 insertions(+) create mode 100644 .gitattributes create mode 100644 lastlog2-1.3.1.tar.xz create mode 100644 lastlog2.changes create mode 100644 lastlog2.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/lastlog2-1.3.1.tar.xz b/lastlog2-1.3.1.tar.xz new file mode 100644 index 0000000..44762ed --- /dev/null +++ b/lastlog2-1.3.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cef58ce4d7c78ed44bcf4c5c1c1f54438542a9df99484138430a4612f2fded08 +size 16392 diff --git a/lastlog2.changes b/lastlog2.changes new file mode 100644 index 0000000..f3b55f5 --- /dev/null +++ b/lastlog2.changes @@ -0,0 +1,106 @@ +------------------------------------------------------------------- +Fri Feb 16 13:59:34 UTC 2024 - Thorsten Kukuk + +- Verson 1.3.1 + - pam_lastlog2: improve ll2_read_entry error handling [bsc#1220000] + +------------------------------------------------------------------- +Wed Feb 14 11:04:48 UTC 2024 - Thorsten Kukuk + +- Version 1.3.0 + - fix sqlite3_step error handling + +------------------------------------------------------------------- +Wed Oct 18 13:47:30 UTC 2023 - Thorsten Kukuk + +- Fix lastlog.8 .so reference + +------------------------------------------------------------------- +Fri Sep 8 08:48:54 UTC 2023 - Thorsten Kukuk + +- Version 1.2.0 + - show_lastlogin: Don't read if no database + - Fix -flto for clang + - Documentation fixes + +------------------------------------------------------------------- +Thu Apr 13 12:38:05 UTC 2023 - Thorsten Kukuk + +- Add lastlog symlink for compatibility + +------------------------------------------------------------------- +Tue Apr 11 09:56:19 UTC 2023 - Thorsten Kukuk + +- Version 1.1.0 + - Add option to install lastlog compat symlink + - lastlog2: add --service option + - liblastlog2: sort output according to user names + +------------------------------------------------------------------- +Wed Apr 5 14:23:21 UTC 2023 - Thorsten Kukuk + +- Version 1.0.1 + - liblastlog2: fix memory leak + +------------------------------------------------------------------- +Wed Apr 5 13:12:56 UTC 2023 - Thorsten Kukuk + +- Version 1.0.0 + - Add PAM service name to database + - pam_lastlog2: Try XDG_VTNR if PAM_TTY is not a tty + - lastlog2: Fix header alignment + +------------------------------------------------------------------- +Mon Apr 3 20:34:17 UTC 2023 - Thorsten Kukuk + +- Require pam-config 2.4 or newer (postlogin read fix) + +------------------------------------------------------------------- +Mon Apr 3 12:51:05 UTC 2023 - Thorsten Kukuk + +- Require current enough pam-config for silent_if= option +- Don't print lastlog messages with display manager + +------------------------------------------------------------------- +Mon Apr 3 10:01:03 UTC 2023 - Thorsten Kukuk + +- Version 0.7.0 + - pam_lastlog2: add silent_if= option + - pam_lastlog2: try PAM_XDISPLAY if PAM_RHOST is not set + +------------------------------------------------------------------- +Wed Mar 29 12:19:00 UTC 2023 - Thorsten Kukuk + +- Version 0.6.2 + - Add more test cases + - Add --version option for lastlog2 + - Fix a Y2038 problem on 32bit architectures + +------------------------------------------------------------------- +Thu Mar 23 13:43:39 UTC 2023 - Thorsten Kukuk + +- Version 0.6.1 + - Fix some compiler warnings + +------------------------------------------------------------------- +Wed Mar 22 09:54:04 UTC 2023 - Thorsten Kukuk + +- Version 0.6.0 + - Create STRICT table (#1) + - Use bind for DELETE and REPLACE statements (#2) + +------------------------------------------------------------------- +Fri Mar 17 17:16:54 UTC 2023 - Thorsten Kukuk + +- Version 0.5.0 + - Import old lastlog data + +------------------------------------------------------------------- +Fri Mar 17 13:33:38 UTC 2023 - Thorsten Kukuk + +- Add manual pages + +------------------------------------------------------------------- +Mon Mar 13 14:48:44 UTC 2023 - Thorsten Kukuk + +- Initial version 0.0.1 diff --git a/lastlog2.spec b/lastlog2.spec new file mode 100644 index 0000000..663449b --- /dev/null +++ b/lastlog2.spec @@ -0,0 +1,107 @@ +# +# spec file for package lastlog2 +# +# 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 liblastlog2-1 +Name: lastlog2 +Version: 1.3.1 +Release: 0 +Summary: Reports most recent login of users +License: BSD-2-Clause +URL: https://github.com/thkukuk/lastlog2 +Source: %{name}-%{version}.tar.xz +BuildRequires: docbook5-xsl-stylesheets +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(sqlite3) +Requires(pre): pam-config >= 2.4 +Requires(post): pam-config >= 2.4 + +%description +pam_lastlog2 and lastlog2 are Y2038 safe versions of the old lastlog utility. pam_lastlog2 collects all data in a sqlite3 database and lastlog2 formats and prints the contents. The username, port, and last login time will be printed. + +%package -n %{lname} +Summary: PAM module to report most recent login of users + +%description -n %{lname} +The liblastlog2 provides various interfaces to read, write or modify the lastlog 2 database. + +%package devel +Summary: Development files for liblastlog2 +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 lastlog2 database. + +%prep +%setup -q + +%build +%meson -Dman=true -Dcompat-symlink=true +%meson_build + +%install +%meson_install +echo ".so lastlog2.8" > %{buildroot}%{_mandir}/man8/lastlog.8 + +%check +%meson_test + +%pre +%service_add_pre lastlog2-import.service + +%preun +%service_del_preun lastlog2-import.service + +%post +%tmpfiles_create lastlog2.conf +%service_add_post lastlog2-import.service +pam-config -a --lastlog2 --lastlog2-silent_if=gdm,gdm-password,lxdm,lightdm,mdm,sddm + +%postun +if [ "$1" -eq 0 ]; then + pam-config -d --lastlog2 +fi +%service_del_postun lastlog2-import.service + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/lastlog +%{_bindir}/lastlog2 +%{_unitdir}/lastlog2-import.service +%{_tmpfilesdir}/lastlog2.conf +%{_pam_moduledir}/pam_lastlog2.so +%ghost %{_localstatedir}/lib/lastlog +%{_mandir}/man8/lastlog.8%{?ext_man} +%{_mandir}/man8/lastlog2.8%{?ext_man} +%{_mandir}/man8/pam_lastlog2.8%{?ext_man} + +%files -n %{lname} +%license LICENSE +%{_libdir}/liblastlog2.so.* + +%files devel +%{_libdir}/liblastlog2.so +%{_includedir}/lastlog2.h +%{_libdir}/pkgconfig/liblastlog2.pc + +%changelog