X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=cipe.spec;h=024495f05938a856cc8be8a3e3393b0f460d63cb;hb=da03665e1afa9b8aeb00f2e16253256816b1e375;hp=f5fbf8ab5a5d679de800dd2e1b9770e8d30d4db5;hpb=6f30e1632403f6cf514a479da403aa6639057944;p=packages%2Fcipe.git diff --git a/cipe.spec b/cipe.spec index f5fbf8a..024495f 100644 --- a/cipe.spec +++ b/cipe.spec @@ -1,28 +1,34 @@ -%define _kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2) -%define _kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g) -%define smpstr %{?_with_smp:-smp} -%define smp %{?_with_smp:1}%{!?_with_smp:0} - +# +# Conditional build: +# _without_dist_kernel - without kernel from distribution +# Summary: CIPE - encrypted IP over UDP tunneling Summary(pl): CIPE - szyfrowany tunel IP po UDP Name: cipe -Version: 1.5.2 -Release: 3 +Version: 1.5.4 +%define _rel 1 +Release: %{_rel} License: GPL Group: Networking/Daemons -Group(de): Netzwerkwesen/Server -Group(pl): Sieciowe/Serwery Source0: http://sites.inka.de/bigred/sw/%{name}-%{version}.tar.gz +# Source0-md5: 9d88f2d090fcafcd0e2fa73b018b6e16 Source1: %{name}.inetd Patch0: %{name}-autoconf.patch Patch1: %{name}-makefile.patch +Patch2: %{name}-pk%{name}-real-peer.patch +Patch3: %{name}-get_fast_time.patch +Patch4: %{name}-alpha.patch +URL: http://sites.inka.de/bigred/devel/cipe.html +BuildRequires: %{kgcc_package} +BuildRequires: /usr/bin/openssl BuildRequires: autoconf BuildRequires: automake -BuildRequires: openssl-devel >= 0.9.6 -BuildRequires: %{_bindir}/openssl +%{!?_without_dist_kernel:BuildRequires: kernel-headers} +BuildRequires: openssl-devel >= 0.9.7d +BuildRequires: rpmbuild(macros) >= 1.118 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _sysconfdir /etc +%define __cc %{kgcc} %description CIPE (the name is shortened from *Crypto IP Encapsulation*) is a @@ -36,94 +42,163 @@ tworzenia szyfrowanych tuneli IP. Mo routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i podobnych zastosowaniach. -%package pkcipe +%package pkcipe-client Summary: The PKCIPE public key tool for CIPE Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE Group: Networking/Daemons -Group(de): Netzwerkwesen/Server -Group(pl): Sieciowe/Serwery -Prereq: %{_bindir}/openssl +Requires: /usr/bin/openssl Requires: %{name} = %{version} +Obsoletes: %{name}-pkcipe -%description pkcipe +%description pkcipe-client CIPE (the name is shortened from *Crypto IP Encapsulation*) is a package for an encrypting IP tunnel device. This can be used to build encrypting routers for VPN (Virtual Private Networks) and similar -applications. -This package contains PKCIPE, which simplifies setup of CIPE tunnels by -using autoconfiguration and public/private key mechanisms. +applications. This package contains PKCIPE, which simplifies setup of +CIPE tunnels by using autoconfiguration and public/private key +mechanisms. -%description pkcipe -l pl +%description pkcipe-client -l pl CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i -podobnych zastosowaniach. -Ten pakiet zawiera PKCIPE, który uprasza ustawienie tuneli CIPE przez +podobnych zastosowaniach. Ten pakiet zawiera PKCIPE, który uprasza +ustawienie tuneli CIPE przez korzystanie z autokonfiguracji oraz +mechanizmów kluczy publicznych/prywatnych. + +%package pkcipe-server +Summary: The PKCIPE public key tool for CIPE - server side +Summary(pl): PKCIPE - narzêdzie do wykorzystania kluczy publicznych w CIPE +Group: Networking/Daemons +Requires: %{name}-pkcipe-client = %{version} +Requires: inetdaemon + +%description pkcipe-server +CIPE (the name is shortened from *Crypto IP Encapsulation*) is a +package for an encrypting IP tunnel device. This can be used to build +encrypting routers for VPN (Virtual Private Networks) and similar +applications. This package contains server part PKCIPE, which +simplifies setup of CIPE tunnels by using autoconfiguration and +public/private key mechanisms. + +%description pkcipe-server -l pl +CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do +tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania +routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i +podobnych zastosowaniach. Ten pakiet zawiera PKCIPE do u¿ycia po +stronie serwera, który uprasza ustawienie tuneli CIPE przez korzystanie z autokonfiguracji oraz mechanizmów kluczy publicznych/prywatnych. -%package -n kernel%{smpstr}-cipe +%package -n kernel-cipe +Summary: CIPE kernel module +Summary(pl): Modu³ j±dra CIPE +Release: %{_rel}@%{_kernel_ver_str} +Group: Base/Kernel +%{!?_without_dist_kernel:%requires_releq_kernel_up} +Requires(post,postun): /sbin/depmod + +%description -n kernel-cipe +CIPE (the name is shortened from *Crypto IP Encapsulation*) is a +package for an encrypting IP tunnel device. This can be used to build +encrypting routers for VPN (Virtual Private Networks) and similar +applications. This package contains a kernel module compiled for +%{_kernel_ver}%{smpstr}. + +%description -n kernel-cipe -l pl +CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do +tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania +routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i +podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela +skompilowany dla %{_kernel_ver}%. + +%package -n kernel-smp-cipe Summary: CIPE kernel module Summary(pl): Modu³ j±dra CIPE -Release: %{release}@%{_kernel_ver_str} +Release: %{_rel}@%{_kernel_ver_str} Group: Base/Kernel -Group(de): Grundsätzlich/Kern -Group(pl): Podstawowe/J±dro -Prereq: /sbin/depmod +%{!?_without_dist_kernel:%requires_releq_kernel_smp} +Requires(post,postun): /sbin/depmod -%description -n kernel%{smpstr}-cipe +%description -n kernel-smp-cipe CIPE (the name is shortened from *Crypto IP Encapsulation*) is a package for an encrypting IP tunnel device. This can be used to build encrypting routers for VPN (Virtual Private Networks) and similar applications. This package contains a kernel module compiled for %{_kernel_ver}%{smpstr}. -%description -n kernel%{smpstr}-cipe -l pl +%description -n kernel-smp-cipe -l pl CIPE (nazwa to skrót od *Crypto IP Encapsulation*) to pakiet do tworzenia szyfrowanych tuneli IP. Mo¿na je wykorzystaæ do budowania routerów szyfruj±cych w VPNach (Prywatnych Sieciach Wirtualnych) i podobnych zastosowaniach. Ten pakiet zawiera modu³ kernela -skompilowany dla %{_kernel_ver}%{smpstr}. +skompilowany dla %{_kernel_ver}-smp. %prep %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +# %patch3 -p1 +%patch4 -p1 %build mv -f conf/aclocal.m4 conf/acinclude.m4 -aclocal -I conf --output=conf/aclocal.m4 -autoconf -l conf/ -%if %{smp} +%{__aclocal} -I conf --output=conf/aclocal.m4 +%{__autoconf} --include conf/ + +%configure \ + --with-linux=%{_kernelsrcdir} \ + --with-ciped=%{_sbindir}/ciped-cb + +%{__make} modules + +%configure \ + --with-linux=%{_kernelsrcdir} \ + --with-ciped=%{_sbindir}/ciped-db \ + --enable-protocol=4 + +%{__make} modules + +mkdir modules/ +mv -f */cip?b.o modules/ + +%{__make} clean + DEFS="-D__SMP__ -D__KERNEL_SMP=1" \ -%endif %configure \ --with-linux=%{_kernelsrcdir} \ --with-ciped=%{_sbindir}/ciped-cb \ -%if %{smp} --enable-smp -%endif + +%{__make} + +DEFS="-D__SMP__ -D__KERNEL_SMP=1" \ +%configure \ + --with-linux=%{_kernelsrcdir} \ + --with-ciped=%{_sbindir}/ciped-cb \ + --enable-smp \ + --enable-protocol=4 %{__make} %install rm -rf $RPM_BUILD_ROOT - install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \ $RPM_BUILD_ROOT%{_sysconfdir}/cipe/pk \ $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc \ + $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc \ $RPM_BUILD_ROOT%{_var}/run/cipe \ $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd install pkcipe/pkcipe $RPM_BUILD_ROOT%{_sbindir} install pkcipe/rsa-keygen $RPM_BUILD_ROOT%{_bindir} -install */cipcb.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc -install */ciped-cb $RPM_BUILD_ROOT%{_sbindir} +mv -f modules/cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc +install */cip?b.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc +install */ciped-?b $RPM_BUILD_ROOT%{_sbindir} install cipe.info $RPM_BUILD_ROOT%{_infodir} install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/pkcipe -gzip -9nf README* tcpdump.patch CHANGES - %clean rm -rf $RPM_BUILD_ROOT @@ -133,40 +208,55 @@ rm -rf $RPM_BUILD_ROOT %postun [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 -%post pkcipe +%post pkcipe-client [ ! -f %{_sysconfdir}/cipe/identity.priv ] && %{_bindir}/rsa-keygen %{_sysconfdir}/cipe/identity + +%post pkcipe-server if [ -f /var/lock/subsys/rc-inetd ]; then - /etc/rc.d/init.d/rc-inetd reload 1>&2 + /etc/rc.d/init.d/rc-inetd reload 1>&2 else - echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2 + echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2 fi -%postun pkcipe +%postun pkcipe-server if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then /etc/rc.d/init.d/rc-inetd reload fi -%post -n kernel%{smpstr}-cipe -/sbin/depmod -a +%post -n kernel-cipe +%depmod %{_kernel_ver} + +%postun -n kernel-cipe +%depmod %{_kernel_ver} -%postun -n kernel%{smpstr}-cipe -/sbin/depmod -a +%post -n kernel-smp-cipe +%depmod %{_kernel_ver}smp + +%postun -n kernel-smp-cipe +%depmod %{_kernel_ver}smp %files %defattr(644,root,root,755) -%doc *.gz samples +%doc README* tcpdump.patch CHANGES samples %{_infodir}/* -%attr(755,root,root) %{_sbindir}/ciped-cb +%attr(755,root,root) %{_sbindir}/ciped-* %dir %{_sysconfdir}/cipe %attr(755,root,root) %dir %{_var}/run/cipe -%files pkcipe +%files pkcipe-client %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/rsa-keygen %attr(755,root,root) %{_sbindir}/pkcipe %attr(700,root,root) %dir %{_sysconfdir}/cipe/pk -%attr(640,root,root) %config %verify(not size mtime md5) /etc/sysconfig/rc-inetd/pkcipe -%files -n kernel%{smpstr}-cipe +%files pkcipe-server +%defattr(644,root,root,755) +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/pkcipe + +%files -n kernel-cipe +%defattr(644,root,root,755) +/lib/modules/%{_kernel_ver}/misc/cip*.o* + +%files -n kernel-smp-cipe %defattr(644,root,root,755) -%attr(600,root,root) /lib/modules/*/misc/cipcb.o +/lib/modules/%{_kernel_ver}smp/misc/cip*.o*