2007-01-16 00:29:34 +01:00
|
|
|
#
|
2015-02-11 16:46:30 +01:00
|
|
|
# spec file for package pen
|
2007-01-16 00:29:34 +01:00
|
|
|
#
|
2019-03-13 11:03:05 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:29:34 +01:00
|
|
|
#
|
2008-08-22 01:50:28 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-03-14 13:36:22 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:29:34 +01:00
|
|
|
#
|
|
|
|
|
2008-08-22 01:50:28 +02:00
|
|
|
|
2007-01-16 00:29:34 +01:00
|
|
|
Name: pen
|
2015-02-11 16:46:30 +01:00
|
|
|
Version: 0.26.1
|
|
|
|
Release: 0
|
2019-03-14 13:36:22 +01:00
|
|
|
Summary: A simple load balancer for TCP-based protocols
|
|
|
|
License: GPL-2.0-or-later
|
|
|
|
Group: Productivity/Clustering/HA
|
|
|
|
URL: http://siag.nu/pen/
|
2015-02-11 16:46:30 +01:00
|
|
|
Source0: http://siag.nu/pub/pen/%{name}-%{version}.tar.gz
|
2007-01-16 00:29:34 +01:00
|
|
|
Source1: %{name}.cfg
|
|
|
|
Source2: init.%{name}
|
|
|
|
Source3: runpen.sh
|
2019-03-13 11:03:05 +01:00
|
|
|
Source4: pen.service
|
2019-03-14 13:36:22 +01:00
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%systemd_requires
|
2007-01-16 00:29:34 +01:00
|
|
|
|
|
|
|
%description
|
2019-03-14 13:36:22 +01:00
|
|
|
Pen is a load balancer for "simple" TCP-based protocols such as HTTP or
|
|
|
|
SMTP. It allows several servers to appear as one to the outside and
|
2007-01-16 00:29:34 +01:00
|
|
|
automatically detects servers that are down and distributes clients
|
|
|
|
among the available servers. This gives high availability and scalable
|
|
|
|
performance.
|
|
|
|
|
|
|
|
The load balancing algorithm keeps track of clients and will try to
|
|
|
|
send them back to the server they visited the last time. This is useful
|
|
|
|
for applications that maintain state between connections in the server,
|
|
|
|
including most modern web applications.
|
|
|
|
|
|
|
|
When pen detects that a server is unavailable, it scans for another
|
|
|
|
starting with the server after the most recently used one. That way we
|
|
|
|
get load balancing and "fair" failover for free.
|
|
|
|
|
|
|
|
Correctly configured, pen can ensure that a server farm is always
|
|
|
|
available, even when individual servers are brought down for
|
|
|
|
maintenance or reconfiguration.
|
|
|
|
|
|
|
|
The final single point of failure, pen itself, can be eliminated by
|
2019-03-14 13:36:22 +01:00
|
|
|
running pen on several servers, using VRRP to decide which is active.
|
2007-01-16 00:29:34 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2007-11-09 22:50:00 +01:00
|
|
|
%configure \
|
2007-01-16 00:29:34 +01:00
|
|
|
--with-daemon
|
2019-03-14 13:36:22 +01:00
|
|
|
make %{?_smp_mflags}
|
2007-01-16 00:29:34 +01:00
|
|
|
|
|
|
|
%install
|
2019-03-14 13:36:22 +01:00
|
|
|
mkdir -p %{buildroot}/%{_sbindir}
|
|
|
|
%make_install
|
2007-01-16 00:29:34 +01:00
|
|
|
# Install pen init script
|
2019-03-14 13:36:22 +01:00
|
|
|
install -d %{buildroot}/%{_datadir}/pen/scripts
|
|
|
|
install -m 0744 %{SOURCE2} %{buildroot}/%{_datadir}/pen/scripts/rcpen
|
|
|
|
install -d %{buildroot}/%{_unitdir}
|
|
|
|
install -m 0444 %{SOURCE4} %{buildroot}/%{_unitdir}/pen.service
|
|
|
|
install -m 0744 %{SOURCE3} %{buildroot}%{_bindir}/runpen.sh
|
|
|
|
install -d %{buildroot}%{_sysconfdir}
|
|
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}.cfg
|
|
|
|
ln -sf service %{buildroot}%{_sbindir}/rcpen
|
|
|
|
mkdir -p %{buildroot}/%{_docdir}
|
|
|
|
mv %{buildroot}%{_prefix}/doc/pen %{buildroot}/%{_docdir}
|
2007-01-16 00:29:34 +01:00
|
|
|
|
2019-03-13 11:03:05 +01:00
|
|
|
%pre
|
|
|
|
%service_add_pre pen.service
|
2007-01-16 00:29:34 +01:00
|
|
|
|
2019-03-13 11:03:05 +01:00
|
|
|
%post
|
|
|
|
%service_add_post pen.service
|
2007-01-16 00:29:34 +01:00
|
|
|
|
|
|
|
%preun
|
2019-03-13 11:03:05 +01:00
|
|
|
%service_del_preun pen.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun pen.service
|
2007-01-16 00:29:34 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%{_docdir}/*
|
2019-03-14 13:36:22 +01:00
|
|
|
%{_mandir}/man1/*.1%{?ext_man}
|
2019-03-13 11:03:05 +01:00
|
|
|
%{_datadir}/pen
|
|
|
|
%{_unitdir}/pen.service
|
2019-03-14 13:36:22 +01:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_bindir}/runpen.sh
|
|
|
|
%{_bindir}/mergelogs
|
|
|
|
%{_bindir}/penctl
|
|
|
|
%{_bindir}/penlog
|
|
|
|
%{_bindir}/penlogd
|
|
|
|
%{_sbindir}/rc%{name}
|
|
|
|
%config(noreplace) %{_sysconfdir}/%{name}.cfg
|
2008-08-22 01:50:28 +02:00
|
|
|
|
2007-06-21 22:48:06 +02:00
|
|
|
%changelog
|