%define upstream_name Server-Starter %define upstream_version 0.12 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 2 Summary: A superdaemon for hot-deploying server programs License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-module/Server/%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(ExtUtils::MakeMaker) >= 6.420.0 BuildRequires: perl(Getopt::Long) BuildRequires: perl(List::MoreUtils) BuildRequires: perl(Proc::Wait3) BuildRequires: perl(Scope::Guard) BuildRequires: perl(Test::TCP) >= 0.110.0 BuildArch: noarch %description It is often a pain to write a server program that supports graceful restarts, with no resource leaks. the Server::Starter manpage, solves the problem by splitting the task into two. One is the start_server manpage, a script provided as a part of the module, which works as a superdaemon that binds to zero or more TCP ports or unix sockets, and repeatedly spawns the server program that actually handles the necessary tasks (for example, responding to incoming commenctions). The spawned server programs under the Server::Starter manpage call accept(2) and handle the requests. To gracefully restart the server program, send SIGHUP to the superdaemon. The superdaemon spawns a new server program, and if (and only if) it starts up successfully, sends SIGTERM to the old server program. By using the Server::Starter manpage it is much easier to write a hot-deployable server. Following are the only requirements a server program to be run under the Server::Starter manpage should conform to: %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %make %check %make test %install %makeinstall_std %files %doc Changes META.yml MYMETA.yml README %{_mandir}/man3/* %perl_vendorlib/* /usr/bin/start_server /usr/share/man/man1/start_server.1.xz %changelog * Sun Jan 13 2013 umeabot <umeabot> 0.120.0-2.mga3 + Revision: 372585 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Sep 26 2012 jquelin <jquelin> 0.120.0-1.mga3 + Revision: 298107 - update to 0.12 - imported package perl-Server-Starter