tcp_wrappers/tcp_wrappers.spec

157 lines
5.2 KiB
RPMSpec
Raw Permalink Normal View History

%define majver %(echo %version | cut -d. -f1-2)
%define patchver %(echo %version | cut -d. -f3)
Name: tcp_wrappers
Version: 7.6.31
Release: 2mamba
Summary: A security tool which acts as a wrapper for TCP daemons
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://ftp.porcupine.org/pub/security/
Source: http://ftp.porcupine.org/pub/security/%{name}_%{majver}.tar.gz
Source1: http://http.us.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_%{majver}.q-%{patchver}.debian.tar.xz
Patch0: %{name}-7.6-conf.patch
Patch1: %{name}-7.6-setenv.patch
Patch2: %{name}-7.6-security.patch
Patch3: %{name}-7.6-strerror.patch
Patch4: %{name}-7.6-fixgethostbyname.patch
Patch5: %{name}-7.6-ldflags.patch
Patch6: %{name}-7.6-sig.patch
Patch7: %{name}-7.6-malloc.patch
Patch8: %{name}-7.6-shared_lib_plus_plus-1.patch
License: Distributable
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libnsl-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The tcp_wrappers package provides small daemon programs which can monitor and filter incoming requests for systat, finger, ftp, telnet, rlogin, rsh, exec, tftp, talk and other network services.
Install the tcp_wrappers program if you need a security tool for filtering incoming network services requests.
%package -n libwrap
Summary: A security library which acts as a wrapper for TCP daemons
Group: System/Libraries
%description -n libwrap
The tcp_wrappers package provides small daemon programs which can monitor and filter incoming requests for systat, finger, ftp, telnet, rlogin, rsh, exec, tftp, talk and other network services.
This package contains the static libraries and header files for the tcp_wrappers program.
%package -n libwrap-devel
Summary: A security library which acts as a wrapper for TCP daemons
Group: Development/Libraries
Requires: libwrap = %{version}-%{release}
Obsoletes: tcp_wrappers-devel
Provides: tcp_wrappers-devel
%description -n libwrap-devel
The tcp_wrappers package provides small daemon programs which can monitor and filter incoming requests for systat, finger, ftp, telnet, rlogin, rsh, exec, tftp, talk and other network services.
This package contains the static libraries and header files for the tcp_wrappers program.
%debug_package
%prep
%setup -q -n %{name}_%{majver} -a1
for p in `sed -e 's:^:debian/patches/:' debian/patches/series`; do patch -p1 < $p; done
#%patch8 -p1
%patch2 -p1
#%patch4 -p1
#%patch6 -p1
#%patch7 -p1
sed -i "s|/usr/lib/|%{_libdir}|g" Makefile
%build
%if "%{_host}" != "%{_build}"
sed -i "s|-lwrap|-lnsl -lwrap|" Makefile
%endif
%make linux -j1 LDFLAGS="-pie" CC=%{_host}-gcc MY_LIB="-lnsl"
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m0755 shared/libwrap.so.0.7.6 %{buildroot}%{_libdir}/libwrap.so.0.7.6
ln -s libwrap.so.0.7.6 %{buildroot}%{_libdir}/libwrap.so.0
ln -s libwrap.so.0.7.6 %{buildroot}%{_libdir}/libwrap.so
install -D -m0755 libwrap.a %{buildroot}%{_libdir}/libwrap.a
install -D -m0644 tcpd.h %{buildroot}%{_includedir}/tcpd.h
for f in safe_finger tcpd tcpdchk tcpdmatch try-from; do
install -D -m0755 $f %{buildroot}%{_sbindir}/$f
install -D -m0644 $f.8 %{buildroot}%{_mandir}/man8/$f.8
done
for f in hosts_access hosts_options; do
install -D -m0644 $f.5 %{buildroot}%{_mandir}/man5/$f.5
done
for f in hosts_access; do
install -D -m0644 $f.3 %{buildroot}%{_mandir}/man3/$f.3
done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_sbindir}/safe_finger
%{_sbindir}/tcpd
%{_sbindir}/tcpdchk
%{_sbindir}/tcpdmatch
%{_sbindir}/try-from
%{_mandir}/man5/hosts_access.5*
%{_mandir}/man5/hosts_options.5*
%{_mandir}/man8/tcpd.8*
%{_mandir}/man8/tcpdchk.8*
%{_mandir}/man8/tcpdmatch.8*
%{_mandir}/man8/try-from.8*
%{_mandir}/man8/safe_finger.8*
%{_mandir}/man8/safe_finger.8*
%files -n libwrap
%defattr(-,root,root)
%{_libdir}/libwrap.so.*
%doc DISCLAIMER
%files -n libwrap-devel
%defattr(-,root,root)
%{_includedir}/tcpd.h
%{_libdir}/libwrap.a
%{_libdir}/libwrap.so
%{_mandir}/man3/hosts_access.3*
#%{_mandir}/man3/hosts_ctl.3*
#%{_mandir}/man3/request_init.3*
#%{_mandir}/man3/request_set.3*
%doc BLURB CHANGES README*
%changelog
* Sat Nov 28 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.31-2mamba
- fix symlinks to real libwrap.so.ver
* Fri Nov 27 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.31-1mamba
- update to 7.6.31
- rebuilt with debug package, debian patches, and specfile fixes
* Fri Sep 21 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6-4mamba
- added shared_lib_plus_plus patch for dynamic library and build fixes for other packages
- use Makefile for install, remove specfile code
- created libwrap and libwrap-devel (obsoleting tcp_wrappers-devel)
* Mon Jun 26 2006 Davide Madrisan <davide.madrisan@qilinux.it> 7.6-3qilnx
- specfile fixed
* Tue Sep 13 2005 Davide Madrisan <davide.madrisan@qilinux.it> 7.6-2qilnx
- specfile fixes
- misc security fixes
- fixed gcc compilation errors
* Thu Apr 17 2003 Luca Tinelli <luca.tinelli@qinet.it> 7.6-1qilnx
- first build