]> git.pld-linux.org Git - packages/wtmpdb.git/commitdiff
- new
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 23 Dec 2023 11:23:28 +0000 (12:23 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 23 Dec 2023 11:23:28 +0000 (12:23 +0100)
split-usr.patch [new file with mode: 0644]
wtmpdb.spec [new file with mode: 0644]

diff --git a/split-usr.patch b/split-usr.patch
new file mode 100644 (file)
index 0000000..89d71b4
--- /dev/null
@@ -0,0 +1,11 @@
+--- wtmpdb-0.10.0/meson.build~ 2023-12-13 14:56:33.000000000 +0100
++++ wtmpdb-0.10.0/meson.build  2023-12-23 12:19:19.234489409 +0100
+@@ -86,7 +86,7 @@
+ if prefixdir != rootprefixdir and rootprefixdir != '/' and not prefixdir.strip('/').startswith(rootprefixdir.strip('/') + '/')
+         error('Prefix is not below root prefix (now rootprefix=@0@ prefix=@1@)'.format(rootprefixdir, prefixdir))
+ endif
+-systemunitdir = prefixdir / 'lib/systemd/system'
++systemunitdir = '/lib/systemd/system'
+ tmpfilesdir = prefixdir / 'lib/tmpfiles.d'
+ libpam = cc.find_library('pam')
diff --git a/wtmpdb.spec b/wtmpdb.spec
new file mode 100644 (file)
index 0000000..bdffdff
--- /dev/null
@@ -0,0 +1,106 @@
+Summary:       Y2038 safe version of wtmp
+Name:          wtmpdb
+Version:       0.10.0
+Release:       1
+License:       BSD
+Group:         Libraries
+Source0:       https://github.com/thkukuk/wtmpdb/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Source0-md5: e745d4fa82fc66978a4c152e89bb2db4
+Patch0:                split-usr.patch
+URL:           https://github.com/thkukuk/wtmpdb
+BuildRequires: audit-libs-devel
+BuildRequires: libxslt-progs
+BuildRequires: meson >= 0.50.0
+BuildRequires: ninja >= 1.5
+BuildRequires: pam-devel
+BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.736
+BuildRequires: sqlite3-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The main features of wtmpdb are:
+
+- It's using sqlite3 as database backend.
+
+- Data is mainly collected via a PAM module, so that every tool can
+  make use of it, without modifying existing packages. For cases where
+  this is not possible, there is a library libwtmpdb.
+
+- The wtmpdb last output is as compatible as possible with the old
+  last implementation, but not all options are yet supported. For
+  compatibility reasons, a symlink last pointing to wtmpdb can be
+  created.
+
+IMPORTANT To be Y2038 safe on 32bit architectures, the binaries needs
+to be build with a 64bit time_t. This should be the standard on 64bit
+architectures.
+
+%package -n pam-pam_wtmpdb
+Summary:       PAM module to record login and logout times of users
+Group:         Base
+Requires:      %{name} = %{version}-%{release}
+
+%description -n pam-pam_wtmpdb
+PAM module to record login and logout times of users.
+
+%package devel
+Summary:       Header files for wtmpdb library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki wtmpdb
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for wtmpdb library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki wtmpdb.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%meson build \
+       -Dsplit-usr=true
+
+%ninja_build -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/var/lib/wtmpdb
+
+%ninja_install -C build
+
+:> $RPM_BUILD_ROOT/var/lib/wtmpdb/wtmp.db
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS README.md
+%attr(755,root,root) %{_bindir}/wtmpdb
+%attr(755,root,root) %{_libdir}/libwtmpdb.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libwtmpdb.so.0
+%{_mandir}/man8/wtmpdb.8*
+%{systemdunitdir}/wtmpdb-rotate.service
+%{systemdunitdir}/wtmpdb-rotate.timer
+%{systemdunitdir}/wtmpdb-update-boot.service
+%{systemdtmpfilesdir}/wtmpdb.conf
+%dir /var/lib/wtmpdb
+%ghost /var/lib/wtmpdb/wtmp.db
+
+%files -n pam-pam_wtmpdb
+%defattr(644,root,root,755)
+%attr(755,root,root) /%{_lib}/security/pam_wtmpdb.so
+%{_mandir}/man8/pam_wtmpdb.8*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwtmpdb.so
+%{_includedir}/wtmpdb.h
+%{_pkgconfigdir}/libwtmpdb.pc
This page took 0.121211 seconds and 4 git commands to generate.