Release v10
Sync spec file with upstream Correct suse rpmbuild in spec file
This commit is contained in:
parent
40c452b778
commit
d71d8b796f
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
|||||||
/tlog-7.tar.gz
|
/tlog-7.tar.gz
|
||||||
/tlog-8.tar.gz
|
/tlog-8.tar.gz
|
||||||
/tlog-9.tar.gz
|
/tlog-9.tar.gz
|
||||||
|
/tlog-10.tar.gz
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (tlog-9.tar.gz) = 7ffcc34d0d84238e33cd4207a3268955551a4e47e230186c5f6ac985e72024c9bc78bf3bbeb7c8c592ba32ce8c0385d591d44ce035d2cdd009897039df1f5160
|
SHA512 (tlog-10.tar.gz) = a70596d5a492678bea55a00e91b6fa0f6a55a7a7c3bf256351975807d9137f6647f9f35ea5d6867399d9fae4a4d84eda473c4a6740a04e34fb0c8898bfbbbdc1
|
||||||
|
BIN
tlog-6.tar.gz
BIN
tlog-6.tar.gz
Binary file not shown.
136
tlog.spec
136
tlog.spec
@ -1,25 +1,78 @@
|
|||||||
|
%global _hardened_build 1
|
||||||
|
|
||||||
|
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||||
|
# If it's RHEL6 and older
|
||||||
|
%bcond_with systemd
|
||||||
|
%else
|
||||||
|
%bcond_without systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if "%{_vendor}" == "debbuild"
|
||||||
|
# Set values to make debian builds work well
|
||||||
|
%global _defaultdocdir /usr/share/doc/%{name}
|
||||||
|
%global _buildshell /bin/bash
|
||||||
|
%global _lib lib/%(%{__dpkg_architecture} -qDEB_HOST_MULTIARCH)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Compatibility macros
|
||||||
|
%{!?_tmpfilesdir:%global _tmpfilesdir %{_prefix}/lib/tmpfiles.d}
|
||||||
|
%{!?make_build:%global make_build %{__make} %{?_smp_mflags}}
|
||||||
|
|
||||||
Name: tlog
|
Name: tlog
|
||||||
Version: 9
|
Version: 10
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Terminal I/O logger
|
Summary: Terminal I/O logger
|
||||||
|
|
||||||
|
%if "%{_vendor}" == "debbuild"
|
||||||
|
# Required for Debian
|
||||||
|
Packager: Justin Stephenson <jstephen@redhat.com>
|
||||||
|
Group: admin
|
||||||
|
License: GPL-2.0+
|
||||||
|
%else
|
||||||
|
Group: Applications/System
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/Scribery/%{name}
|
|
||||||
Source: https://github.com/Scribery/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: gcc
|
|
||||||
BuildRequires: json-c-devel
|
|
||||||
BuildRequires: curl-devel
|
|
||||||
BuildRequires: m4
|
|
||||||
BuildRequires: libutempter-devel
|
|
||||||
# If it's not RHEL6 and older
|
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
|
|
||||||
BuildRequires: systemd-devel
|
|
||||||
BuildRequires: systemd-units
|
|
||||||
%endif
|
%endif
|
||||||
Requires(post): sed
|
|
||||||
Requires(postun): sed
|
|
||||||
|
|
||||||
|
URL: https://github.com/Scribery/%{name}
|
||||||
|
Source: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: m4
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
|
||||||
|
%if "%{_vendor}" == "debbuild"
|
||||||
|
BuildRequires: libjson-c-dev
|
||||||
|
BuildRequires: libcurl4-gnutls-dev
|
||||||
|
BuildRequires: libutempter-dev
|
||||||
|
# Debian/Ubuntu doesn't automatically pull this in...
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
|
||||||
|
%if %{with systemd}
|
||||||
|
BuildRequires: libsystemd-dev
|
||||||
|
# Expanded form of systemd_requires macro
|
||||||
|
Requires: systemd-sysv
|
||||||
|
Requires(preun): systemd
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(postun): systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%else
|
||||||
|
BuildRequires: pkgconfig(json-c)
|
||||||
|
BuildRequires: pkgconfig(libcurl)
|
||||||
|
%if %{defined suse_version}
|
||||||
|
BuildRequires: utempter-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: libutempter-devel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with systemd}
|
||||||
|
BuildRequires: pkgconfig(libsystemd)
|
||||||
|
%{?systemd_requires}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Tlog is a terminal I/O recording program similar to "script", but used in
|
Tlog is a terminal I/O recording program similar to "script", but used in
|
||||||
@ -27,49 +80,31 @@ place of a user's shell, starting the recording and executing the real user's
|
|||||||
shell afterwards. The recorded I/O can then be forwarded to a logging server
|
shell afterwards. The recorded I/O can then be forwarded to a logging server
|
||||||
in JSON format.
|
in JSON format.
|
||||||
|
|
||||||
%global _hardened_build 1
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# If it's not RHEL6 and older
|
%configure --disable-rpath --disable-static --enable-utempter %{!?with_systemd:--disable-journal} --docdir=%{_defaultdocdir}/%{name}
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
|
%make_build
|
||||||
%configure --disable-rpath --disable-static --enable-utempter
|
|
||||||
# Else, if it's RHEL6 or older
|
|
||||||
%else
|
|
||||||
%configure --disable-rpath --disable-static --disable-journal
|
|
||||||
%endif
|
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make %{?_smp_mflags} check
|
%make_build check
|
||||||
|
|
||||||
%pre
|
|
||||||
getent group %{name} >/dev/null ||
|
|
||||||
groupadd -r %{name}
|
|
||||||
getent passwd %{name} >/dev/null ||
|
|
||||||
useradd -r -g %{name} -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
|
|
||||||
-c "Tlog terminal I/O logger" %{name}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot}
|
%make_install
|
||||||
rm %{buildroot}/%{_libdir}/*.la
|
rm %{buildroot}/%{_libdir}/*.la
|
||||||
|
|
||||||
# Remove development files as we're not doing a devel package yet
|
# Remove development files as we're not doing a devel package yet
|
||||||
rm %{buildroot}/%{_libdir}/*.so
|
rm %{buildroot}/%{_libdir}/*.so
|
||||||
rm -r %{buildroot}/usr/include/%{name}
|
rm -r %{buildroot}/usr/include/%{name}
|
||||||
|
|
||||||
# If it's not RHEL6 and older
|
%if %{with systemd}
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
|
|
||||||
# Create tmpfiles.d configuration for the lock dir
|
# Create tmpfiles.d configuration for the lock dir
|
||||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||||
{
|
{
|
||||||
echo "# Type Path Mode UID GID Age Argument"
|
echo "# Type Path Mode UID GID Age Argument"
|
||||||
echo "d /run/%{name} 0755 %{name} %{name}"
|
echo "d /run/%{name} 0755 %{name} %{name}"
|
||||||
} > %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
} > %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||||
# Create the lock dir
|
|
||||||
mkdir -p %{buildroot}/run
|
|
||||||
install -d -m 0755 %{buildroot}/run/%{name}
|
|
||||||
# Else, if it's RHEL6 or older
|
# Else, if it's RHEL6 or older
|
||||||
%else
|
%else
|
||||||
# Create the lock dir
|
# Create the lock dir
|
||||||
@ -88,12 +123,10 @@ rm -r %{buildroot}/usr/include/%{name}
|
|||||||
%{_datadir}/%{name}
|
%{_datadir}/%{name}
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
# If it's not RHEL6 and older
|
%if %{with systemd}
|
||||||
%if 0%{?rhel} == 0 || 0%{?rhel} >= 7
|
%{_tmpfilesdir}/%{name}.conf
|
||||||
%config(noreplace) %{_tmpfilesdir}/%{name}.conf
|
|
||||||
%dir %attr(-,%{name},%{name}) /run/%{name}
|
|
||||||
# Else if it's RHEL6 or older
|
|
||||||
%else
|
%else
|
||||||
|
# If it's RHEL6 and older
|
||||||
%dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
|
%dir %attr(-,%{name},%{name}) %{_localstatedir}/run/%{name}
|
||||||
%endif
|
%endif
|
||||||
%dir %{_sysconfdir}/%{name}
|
%dir %{_sysconfdir}/%{name}
|
||||||
@ -101,8 +134,23 @@ rm -r %{buildroot}/usr/include/%{name}
|
|||||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-rec-session.conf
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-rec-session.conf
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-play.conf
|
%config(noreplace) %{_sysconfdir}/%{name}/%{name}-play.conf
|
||||||
|
|
||||||
|
%pre
|
||||||
|
getent group %{name} >/dev/null ||
|
||||||
|
groupadd -r %{name}
|
||||||
|
getent passwd %{name} >/dev/null ||
|
||||||
|
useradd -r -g %{name} -d %{_localstatedir}/run/%{name} -s /sbin/nologin \
|
||||||
|
-c "Tlog terminal I/O logger" %{name}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%if 0%{?el7} || 0%{?suse_version} >= 1315
|
||||||
|
# For RHEL7 and SUSE Linux distributions, creation doesn't happen automatically
|
||||||
|
%tmpfiles_create %{name}.conf
|
||||||
|
%endif
|
||||||
|
%if 0%{?ubuntu} || 0%{?debian}
|
||||||
|
# For Debian/Ubuntu, creation doesn't happen automatically
|
||||||
|
systemd-tmpfiles --create %{name}.conf >/dev/null 2>&1 || :
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
Loading…
Reference in New Issue
Block a user