%define usedietlibc %{?_without_dietlibc: 0} %{?!_without_dietlibc: 1} Name: ucspi-tcp Version: 0.88 Release: 15%{?dist} Summary: Command-line tools for building TCP client-server applications Group: System Environment/Daemons License: Public Domain URL: http://cr.yp.to/%{name}.html Source0: http://cr.yp.to/%{name}/%{name}-%{version}.tar.gz Source1: http://smarden.org/pape/djb/manpages/%{name}-%{version}-man.tar.gz Source2: ucspi-tcp-0.88.tcprebuild.sh BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Provides: tcp-superserver%{?_isa} = %{name}-%{release}, tcpserver%{?_isa} = %{name}-%{release} %if %{?usedietlibc} BuildRequires: dietlibc %endif Obsoletes: rblsmtpd # Fixes the errno issue Patch0: http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch # Add per-IP limits Patch1: ucspi-tcp-0.88-periplimit.7.patch # Allow custom rblsmtpd error messages Patch2: http://www.qmail.org/ucspi-rss.diff # Increases the size of the return message rblsmtpd sends back from 200 to 512 Patch3: ucspi-tcp-0.88.larger_messages.patch # Modify rblsmtpd to dump instead of assigning a default rbl list. Patch4: http://pyropus.ca/software/misc/rblsmtpd-nodefaultrbl.patch # Change all references from bin to sbin Patch5: ucspi-tcp-0.88.bin-to-sbin.patch # Change the 4 demo programs (who@, etc...) to not depend on a specific path for tcpclient Patch6: ucspi-tcp-0.88.portable-demo-progs.patch # Set the RBLFAILOPEN variable when rblsmtpd times out on an rbl check Patch7: ucspi-tcp-0.88.rblfailopen.patch # Allow for non-root rebuilding Patch8: ucspi-tcp-0.88.nochowninstall.patch # Terminate execl args with a NULL ptr, not a 0 Patch9: ucspi-tcp-0.88.null.patch %description The ucspi-tcp package contains various easy-to-use command-line tools for building TCP client-server applications; including tcpserver, which is used by qmail and other packages. This package includes support for longer and custom error messages within rblsmtpd, per-IP connection limits in tcpserver, and without a default RBL list. It also includes manual pages by Gerrit Pape. %prep %setup -q %setup -q -D -T -a 1 %patch0 -p1 -b .errno %patch1 -p1 -b .periplimit %patch2 -p1 -b .ucspi-rss %patch3 -b .larger_messages %patch4 -p1 -b .nodefaultrbl %patch5 -b .bin-to-sbin %patch6 -b .portable-demo-progs %patch7 -b .rblfailopen %patch8 -b .nochowninstall %patch9 -b .null %build echo "%{_prefix}" > conf-home %if %{?usedietlibc} echo "diet -v -Os gcc -DREALLY_SMALL -finline-functions -g -Wall -Os" > conf-cc echo "diet gcc -s" > conf-ld %else echo "gcc -DREALLY_SMALL -finline-functions -g -Wall -Os" > conf-cc echo "gcc -s" > conf-ld %endif make %install rm -fR %{buildroot} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_sysconfdir}/tcprules.d # The next steps make sure that instcheck and install will # do their job in %{buildroot}%{_prefix} and not %{_prefix} rm -f install instcheck auto_home.o auto_home.c echo "%{buildroot}%{_prefix}" > conf-home make install instcheck ./install ./instcheck # Move demo apps from /usr/sbin to /usr/bin mv -f %{buildroot}%{_sbindir}/{tcpclient,mconnect,*@,delcr,addcr,tcpcat} %{buildroot}%{_bindir} # Install other utility scripts install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/tcprebuild # Install man pages install -m 644 %{name}-%{version}-man/*.1 %{buildroot}%{_mandir}/man1/ %clean rm -fR %{buildroot} %files %defattr(-,root,root) %doc TODO VERSION CHANGES README* %attr(755,root,root) %{_bindir}/* %attr(755,root,root) %{_sbindir}/* %{_mandir}/man1/* %dir %{_sysconfdir}/tcprules.d %changelog * Mon Sep 30 2013 Japheth Cleaver 0.88-15 - rblsmtpd: ucspi-tcp-0.88.null.patch to fix failing to exec * Mon Sep 30 2013 Japheth Cleaver 0.88-14 - rebuild with current dietlibc * Wed Jan 09 2013 Japheth Cleaver 0.88-13 - rebuild with current dietlibc - spec file cleanup * Wed Mar 02 2011 Japheth Cleaver 0.88-12 - specify perms (some client scripts were installed 644) * Fri Feb 18 2011 Japheth Cleaver 0.88-11.1 - add usedietlibc flag - remove auto_home.c when rebuilding install, sticks around on x86_64 arches * Mon May 17 2010 Japheth Cleaver 0.88-11 - rebuilt for rhel6 beta - patch install check for non-root rebuild * Wed Nov 19 2008 Japheth Cleaver 0.88-10 - rebuilt * Sat Sep 01 2007 Japheth Cleaver 0.88-9 - add tcprebuild script * Wed Aug 15 2007 Japheth Cleaver 0.88-8 - switch to nodefaultrbl - add RBLFAILOPEN patch * Tue Oct 17 2006 Japheth Cleaver 0.88-7 - rebuilt statically with dietlibc - increase length of custom error message from 500 to 511 chars * Thu Apr 27 2006 Japheth Cleaver 0.88-6 - remove MySQL define flag -- it's an unneeded patch nowadays - spec file cleanup as a result * Wed Dec 14 2005 Japheth Cleaver 0.88-5 - add MySQL as a defineable option. use if you still need POP- before-SMTP functionality, but removes dependancy if you don't. - rewrite checkipsmtp and move to qmail package. - misc spec file cleanups * Tue Nov 22 2005 Japheth Cleaver 0.88-4 - add checkipsmtp script as wrapper for tcprulescheck of qmail-smtpd.cdb * Mon Nov 21 2005 Japheth Cleaver 0.88-3 - rebuild for FC4 and MySQL 5 * Thu Apr 21 2005 Japheth Cleaver 0.88-2 - add per-IP limit patch - spec file tweaks and cleanup * Wed Feb 04 2004 Japheth Cleaver 0.88-1 - created new spec file - built for Fedora Core 1 - include sample tcpserver.mysql config file. Echo out instructions. - patch Matt Simerson's tcpserver patch so that there's a consistent patchlevel - also patch to move /var/qmail/control/sql file to /etc/tcprules.d/mysql - install all tools into /usr/sbin instead of /usr/local/bin. Yay RedHat.