%define _use_internal_dependency_generator 0 Name: perl-CGI-SpeedyCGI Version: 2.22 Release: 3.ker.rhel3 Packager: Milan Kerslager Summary: Speed up perl scripts by running them persistently. License: Distributable Group: Development/Libraries URL: http://search.cpan.org/search?mode=module&query=SpeedyCGI BuildRoot: %{_tmppath}/%{name}-root BuildRequires: perl >= 0:5.00503 Source0: CGI-SpeedyCGI-%{version}.tar.gz #BuildRequires: perl-Digest-HMAC %description SpeedyCGI is a way to run perl scripts persistently, which can make them run much more quickly. A script can be made to to run persistently by changing the interpreter line at the top of the script from: #!/usr/bin/perl to #!/usr/bin/speedy After the script is initially run, instead of exiting, the perl interpreter is kept running. During subsequent runs, this interpreter is used to handle new executions instead of starting a new perl interpreter each time. A very fast frontend program, written in C, is executed for each request. This fast frontend then contacts the persistent Perl process, which is usually already running, to do the work and return the results. By default each perl script runs in its own Unix process, so one perl script can't interfere with another. Command line options can also be used to deal with programs that have memory leaks or other problems that might keep them from otherwise running persistently. SpeedyCGI can be used to speed up perl CGI scripts. It conforms to the CGI specification, and does not run perl code inside the web server. Since the perl interpreter runs outside the web server, it can't cause problems for the web server itself. SpeedyCGI also provides an Apache module so that under the Apache web server, scripts can be run without the overhead of doing a fork/exec for each request. With this module a small amount of frontend code is run within the web server - the perl interpreters still run outside the server. SpeedyCGI and PersistentPerl are currently both names for the same code. SpeedyCGI was the original name, but because people weren't sure what it did, the name PersistentPerl was picked as an alias. At some point SpeedyCGI will probably be replaced by PersistentPerl, or become a sub-class of PersistentPerl to avoid always having two distributions. %package -n %{name}-suidroot Summary: Speed up perl scripts by running them persistently with SUID root bit enabled. License: Distributable Group: Development/Libraries %description -n %{name}-suidroot SpeedyCGI is a way to run perl scripts persistently, which can make them run much more quickly. This package contains SUID root enabled version (for OpenWebmail). %prep %setup -q -n CGI-SpeedyCGI-%{version} %build echo | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor perl -pi -e 's@^(DEFINE = .*)@$1 -DIAMSUID@' speedy/Makefile make make test %clean rm -rf $RPM_BUILD_ROOT %install rm -rf $RPM_BUILD_ROOT eval `perl '-V:installarchlib'` mkdir -p $RPM_BUILD_ROOT/$installarchlib make install [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \; find $RPM_BUILD_ROOT/usr -type f -print | \ sed "s@^$RPM_BUILD_ROOT@@g" | \ grep -v perllocal.pod | \ grep -v "\.packlist" > CGI-SpeedyCGI-%{version}-filelist if [ "$(cat CGI-SpeedyCGI-%{version}-filelist)X" = "X" ] ; then echo "ERROR: EMPTY FILE LIST" exit -1 fi # SUID root binary (for OpenWebmail) cp -a $RPM_BUILD_ROOT/usr/bin/speedy $RPM_BUILD_ROOT/usr/bin/speedy_suid %files -f CGI-SpeedyCGI-%{version}-filelist %defattr(-,root,root) %doc docs COPYING README README.html %files -n %{name}-suidroot %attr(4555,root,root) /usr/bin/speedy_suid %changelog * Mon May 10 2004 Milan Kerslager 2.22-3.ker.rhel3 - SUID root subpackage * Mon Feb 16 2004 Milan Kerslager 2.22-2.ker.rhel3 - rebuild * Mon Apr 28 2003 Milan Kerslager - initial version