Wednesday, January 7, 2009

librelp RPM spec

If you are planning to use relp feature in rsyslog, then you must install librelp. Here is my configure line for rsyslog-4.1.3:

./configure RELP_LIBS=-L/usr/local/librelp/lib -lrelp -lrt RELP_CFLAGS=-I/usr/local/librelp/include --prefix=/usr/local/rsyslog --enable-gnutls --enable-relp

and librelp spec file.

%define product_name librelp
%define product_version 0.1.1
%define rpm_release 1%{?dist}

%define product_nameversion %{product_name}-%{product_version}
%define product_source_dir %{product_nameversion}
%define product_tarball %{product_nameversion}.tar.gz
%define product_prefix /usr/local/librelp

Summary: Rsyslog librelp support library
Name: %{product_name}
Version: %{product_version}
Release: %{rpm_release}
License: GPLv3
Packager: VVK
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{product_nameversion}-build-root

librelp is an easy to use library for the RELP protocol. RELP in turn provides reliable event logging over the network (and consequently RELP stands for Reliable Event Logging Protocol).
RELP (and hence) librelp assures that no message is lost, not even when connections break and a peer becomes unavailable. The current version of RELP has a minimal window of opportunity for message duplication after a session has been broken due to network problems. In this case, a few messages may be duplicated (a problem that also exists with plain tcp syslog). Future versions of RELP will address this shortcoming.

rm -rf ${RPM_BUILD_ROOT}
%setup -q -n %{product_nameversion}

umask 022
./configure --prefix=%{product_prefix}

umask 022
mkdir -p ${RPM_BUILD_ROOT}/etc/
make install DESTDIR=${RPM_BUILD_ROOT}
echo "/usr/local/librelp/lib" > ${RPM_BUILD_ROOT}/etc/
%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

rm -rf ${RPM_BUILD_ROOT}


* Sat Sep 01 2007 VVK - 0.1.1-1
- Initial build.
- Built on CentOS 5

I did not build an RPM for rsyslog, because I decided to go with the 2.x series, and there is already an RPM for it in the CentOS repo. I did not want to waste the effort I put into compiling rsyslog-4.1.3 and librelp, so I decided to turn it into a blog post...maybe someone out there will find it useful :-)


No comments:

Post a Comment