Name: lastlog2 Version: 1.1.0 Release: 1test%{?dist} Summary: lastlog reports the last login of a given user or of all users who did ever login on a system. License: BSD-2-Clause URL: https://github.com/thkukuk/lastlog2 Source0: https://github.com/thkukuk/lastlog2/releases/download/v%{version}/lastlog2-%{version}.tar.xz ### Globals ### %global so_ver 1 ### Build Dependencies ### BuildRequires: autoconf BuildRequires: automake BuildRequires: docbook5-style-xsl BuildRequires: gcc BuildRequires: libxslt BuildRequires: meson BuildRequires: pam-devel BuildRequires: sqlite-devel BuildRequires: sqlite-libs BuildRequires: systemd-devel ### Dependencies ### Requires: pam Requires: sqlite %description lastlog reports the last login of a given user or of all users who did ever login on a system. The standard /var/log/lastlog implementation using lastlog.h from glibc uses a 32bit time_t in struct lastlog on bi-arch systems like x86-64 (so which can execute 64bit and 32bit binaries). So even if you have a pure 64bit system, on many architectures using glibc you have a Y2038 problem. For background on the Y2038 problem (32bit time_t counter will overflow) I suggest to start with the wikipedia Year 2038 problem article. There is also a more technical document, describing the problem in more detail, which also contains a list of affected packages. And a more highlevel blog "Y2038, glibc and /var/log/lastlog on 64bit architectures" Additional, /var/log/lastlog can become really huge if there are big UIDs in use on the system. Since it is a sparse file, this is normally not a problem, but depending on the filesystem or the tools used for backup, this can become a real problem. Since there are only few applications which really support lastlog, the data is also not always correct. %package devel Summary: Files needed for developing lastlog2 compatible applications %description devel Provides the files needed for developing lastlog2 compatible applications %prep %autosetup %build %meson %meson_build %install %meson_install mkdir -p $RPM_BUILD_ROOT/%{_includedir}/lastlog2 install -m 644 include/lastlog2.h $RPM_BUILD_ROOT/%{_includedir}/lastlog2 rm $RPM_BUILD_ROOT/%{_includedir}/lastlog2.h %files %license LICENSE %doc NEWS README.md %{_bindir}/lastlog2 %{_pam_libdir}/liblastlog2.so.%{so_ver}* %{_pam_moduledir}/pam_lastlog2.so %{_unitdir}/lastlog2-import.service %{_prefix}/lib/tmpfiles.d/lastlog2.conf %{_mandir}/man8/lastlog2.8.gz %{_mandir}/man8/pam_lastlog2.8.gz %files devel %{_includedir}/lastlog2/lastlog2.h %{_libdir}/liblastlog2.so %{_libdir}/pkgconfig/liblastlog2.pc %changelog * Mon Jun 05 2023 Iker Pedrosa - 1.1.0-1test - Initial release (based on version 1.1.0 upstream code)