commit 0b42fd5943c0eeaa50dc5e0de755d1d8c8f047d1030a7458177ab8862d3afcba Author: Thorsten Kukuk Date: Mon Mar 13 15:20:07 2023 +0000 - Initial version 0.0.1 OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/lastlog2?expand=0&rev=1 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/lastlog2-0.0.1.tar.xz b/lastlog2-0.0.1.tar.xz new file mode 100644 index 0000000..a72c85c --- /dev/null +++ b/lastlog2-0.0.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b44d8b351d22bc99648dbe164ef56e86d1d0f2ab9db58cde5fe6f2a42ebc15a +size 8924 diff --git a/lastlog2.changes b/lastlog2.changes new file mode 100644 index 0000000..1fba138 --- /dev/null +++ b/lastlog2.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +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..9310b4f --- /dev/null +++ b/lastlog2.spec @@ -0,0 +1,88 @@ +# +# spec file for package lastlog2 +# +# Copyright (c) 2023 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-0 +Name: lastlog2 +Version: 0.0.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: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(sqlite3) +PreReq: pam-config + +%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 +%meson_build + +%install +%meson_install + +%check +%meson_test + +%post +pam-config -a --lastlog2 + +%postun +if [ "$1" -eq 0 ]; then + pam-config -d --lastlog2 +fi + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/lastlog2 +%{_tmpfilesdir}/lastlog2.conf +%{_pam_moduledir}/pam_lastlog2.so + +%files -n %{lname} +%license LICENSE +%{_libdir}/liblastlog2.so.* + +%files devel +%{_libdir}/liblastlog2.so +%{_includedir}/lastlog2.h + +%changelog