From 88c46a1bdedaf6cda6af99c504986a3d95627fd0fcdb5aeb14a3fd24b0a0ab54 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Thu, 30 Mar 2023 13:15:35 +0000 Subject: [PATCH] - Initial package OBS-URL: https://build.opensuse.org/package/show/Linux-PAM/wtmpdb?expand=0&rev=1 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + wtmpdb-0.1.0.tar.xz | 3 ++ wtmpdb.changes | 4 ++ wtmpdb.spec | 103 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 wtmpdb-0.1.0.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/wtmpdb-0.1.0.tar.xz b/wtmpdb-0.1.0.tar.xz new file mode 100644 index 0000000..2255e0f --- /dev/null +++ b/wtmpdb-0.1.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b036523c4d82b054ce3664c934e21f82939946db1ca484231aad27b7ff50ccc5 +size 12120 diff --git a/wtmpdb.changes b/wtmpdb.changes new file mode 100644 index 0000000..f13e547 --- /dev/null +++ b/wtmpdb.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +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..5f40544 --- /dev/null +++ b/wtmpdb.spec @@ -0,0 +1,103 @@ +# +# spec file for package wtmpdb +# +# 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 libwtmpdb0 +Name: wtmpdb +Version: 0.1.0 +Release: 0 +Summary: Reports last logged in users and system reboots +License: BSD-2-Clause +URL: https://github.com/thkukuk/wtmpdb +Source: %{name}-%{version}.tar.xz +BuildRequires: docbook5-xsl-stylesheets +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(sqlite3) +PreReq: pam-config + +%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. + +%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 +%setup -q + +%build +%meson -Dman=true +%meson_build + +%install +%meson_install + +%check +%meson_test + +%pre +%service_add_pre wtmpdb-update-boot.service + +%preun +%service_del_preun wtmpdb-update-boot.service + +%post +%tmpfiles_create wtmpdb.conf +%service_add_post wtmpdb-update-boot.service +pam-config -a --wtmpdb + +%postun +if [ "$1" -eq 0 ]; then + pam-config -d --wtmpdb +fi +%service_del_postun_without_restart wtmpdb-update-boot.service + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files +%license LICENSE +%{_bindir}/wtmpdb +%{_unitdir}/wtmpdb-update-boot.service +%{_tmpfilesdir}/wtmpdb.conf +%{_pam_moduledir}/pam_wtmpdb.so +%ghost %{_localstatedir}/lib/wtmpdb +#%{_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