なかまです。 FreeS/WAN のrpmのパッケージを作ってみたんですが、VinePlusにまぜ てらうにはどうしたらよいでしょう?...とは言うものの、根本的に当方 にはSMPなマシンが無いのでSMPのテスト出来ません。(^^; SRPMS/freeswan-1.99-0vl0.src.rpm RPMS/i386/freeswan-1.99-0vl0.i386.rpm RPMS/i386/freeswan-doc-1.99-0vl0.i386.rpm RPMS/i386/freeswan-module-1.99_2.4.19_0vl26-0vl0.i386.rpm RPMS/i386/freeswan-module-smp-1.99_2.4.19_0vl26-0vl0.i386.rpm と、こんな感じで出来ます。 Vine 2.1.5 でも、モジュールの場所はkernel2.4みたいになりますが 一応動くのは確認しました。 と言うわけで、どなたか拾ってもらえませんか。(爆死)(^^; -------------------------- ここから ------------------------ # To make nosrc.rpm # rpm -bs --define 'nosrc:1' # Note that this is NOT a relocatable package %define x509_patch_version 0.9.15 %define freeswan_version 1.99 %define kernel_version 2.4.19-0vl26 %define pkernel_version 2.4.19_0vl26 Summary: Linux FreeS/WAN is an implementation of IPSEC & IKE for Linux. Name: freeswan Vendor: Project Vine Distribution: Vine Linux Packager: Ei-ji Nakama <nakama@xxxxxxxxxxxx> Version: %{freeswan_version} Release: 0vl0 Source0: ftp://ftp.xs4all.nl:/pub/crypto/%{name}/%{name}-%{freeswan_version}.tar.gz Source1: ftp://ftp.xs4all.nl:/pub/crypto/%{name}/%{name}-%{freeswan_version}.tar.gz.md5 Source2: ftp://ftp.xs4all.nl:/pub/crypto/%{name}/%{name}-%{freeswan_version}.tar.gz.sig Source3: http://www.strongsec.com/freeswan/x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}.tar.gz Source4: http://www.strongsec.com/freeswan/x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}.tar.gz.sig License: GPL Group: System/Servers BuildRequires: kernel-source = %{kernel_version} BuildRequires: kernel-headers = %{kernel_version} BuildRoot: %{_tmppath}/%{name}-root URL: https://www.freeswan.org/ Prereq: /sbin/chkconfig %{?nosrc:NoSource: 0} Provides: freeswan = %{freeswan_version} Obsoletes: freeswan < %{freeswan_version} %package doc Summary: FreeS/WAN Document Version: %{freeswan_version} Group: Documentation Provides: freeswan-doc = %{freeswan_version} Obsoletes: freeswan-doc < %{freeswan_version} %package module Summary: FreeS/WAN kernel module Version: %{freeswan_version}_%{pkernel_version} Group: System Environment/Kernel Requires: kernel = %{kernel_version} %package module-smp Summary: FreeS/WAN kernel module smp Version: %{freeswan_version}_%{pkernel_version} Group: System Environment/Kernel Requires: kernel-smp = %{kernel_version} %description -l ja LinuxのIPSEC実装. %description -l ja doc LinuxのIPSEC実装のドキュメント. %description -l ja module LinuxのIPSEC実装のカーネルモジュール. %description -l ja module-smp LinuxのIPSEC実装のSMPカーネルモジュール. %prep %setup -q -n freeswan-%{freeswan_version} # x509 patch tar xzf %{SOURCE3} cp x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}/%name.diff . cp x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}/README ./README.x509patch cp x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}/CHANGES ./CHANGES.x509patch install -m 0644 x509patch-%{x509_patch_version}-%{name}-%{freeswan_version}/ipsec.secrets.template ./ipsec.secrets.template.x509patch mv README README.main patch -p1 < %name.diff # - ScriptはFINALCONFDIRを見てないので perl -p -i -e "s|file=/etc/ipsec.secrets|file=/etc/freeswan/ipsec.secrets|" utils/showhostkey # - 基本的に make rpm を使います perl -p -i -e "s|FINALCONFDIR=/etc|FINALCONFDIR=/etc/freeswan|" Makefile.inc perl -p -i -e "s|INC_USRLOCAL=/usr/local|INC_USRLOCAL=/usr|" Makefile.inc perl -p -i -e "s|RPMBUILD=rpmbuild|RPMBUILD=rpm|" Makefile.inc perl -p -i -e "s|RH_KERNELSRC=/usr/src/linux-2.4|RH_KERNELSRC=${RPM_BUILD_DIR}/%{name}-%{freeswan_version}/linux|" Makefile.inc # redhatじゃないと、rhconfig.hは無いし、あまり関係は無い様ですが perl -p -i -e "s|^(.*)rhconfig.h-new(.*)\n$||is" Makefile # - make rpmの最後で、spec作ってパッケージにしてるけど # - Vine用にしたいから、以降は泥仕事 perl -p -i -e "s|^(.*)make KERNELSRC=(.*)rpms\n$||is" Makefile # Kernel Source Copy. mkdir ${RPM_BUILD_DIR}/%{name}-%{freeswan_version}/linux cp -aR /usr/src/linux/* linux/ # athlonとBOOTは要らないと思う rm -f linux/configs/kernel-*-athlon*.config rm -f linux/configs/kernel-*-BOOT.config %build rm -rf $RPM_BUILD_ROOT make rpm # SMPでビルドした場合とそうでない場合とでできあがる場所が異なります # んで泥くさい事になってます mkdir -p tmp.rpmbuild/lib/modules/%{kernel_version}/kernel/net/ipsec mkdir -p tmp.rpmbuild/lib/modules/%{kernel_version}smp/kernel/net/ipsec mv tmp.rpmbuild/lib/modules/*/kernel/net/ipsec/* tmp.rpmbuild/lib/modules/ mv tmp.rpmbuild/lib/modules/ipsec*smp tmp.rpmbuild/lib/modules/%{kernel_version}smp/kernel/net/ipsec mv tmp.rpmbuild/lib/modules/ipsec* tmp.rpmbuild/lib/modules/%{kernel_version}/kernel/net/ipsec mkdir -p tmp.rpmbuild/usr/doc/%{name}-%{freeswan_version} cp -aR [A-Z]* doc tmp.rpmbuild/usr/doc/%{name}-%{freeswan_version}/ %install mkdir -p $RPM_BUILD_ROOT (cd tmp.rpmbuild ; cp -aR * $RPM_BUILD_ROOT/) %post is=%{_sysconfdir}/freeswan/ipsec.secrets; if [ ! -f $is ]; then ipsec newhostkey --output $is && chmod 400 $is; else ipsec newhostkey --output $is.rpmnew && chmod 400 $is.rpmnew; fi %post module (cd /lib/modules/%{kernel_version}/kernel/net/ipsec;ln ipsec.o-`uname -m` ipsec.o) /sbin/depmod -a %{kernel_version} %post module-smp (cd /lib/modules/%{kernel_version}smp/kernel/net/ipsec;ln ipsec.o-`uname -m`-smp ipsec.o) /sbin/depmod -a %{kernel_version}smp %preun %preun module /etc/rc.d/init.d/ipsec stop %preun module-smp /etc/rc.d/init.d/ipsec stop %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/sbin/ipsec /usr/lib/ipsec/* /etc/rc.d/init.d/ipsec %attr(0644,root,root) %config /etc/freeswan/ipsec.conf %attr(0755,root,root) %config /etc/freeswan/ipsec.d/cacerts %attr(0755,root,root) %config /etc/freeswan/ipsec.d/crls %attr(0700,root,root) %config /etc/freeswan/ipsec.d/private /usr/man/man3/ipsec_*.3* /usr/man/man5/ipsec_*.5* /usr/man/man5/ipsec.*.5* /usr/man/man8/ipsec_*.8* /usr/man/man8/ipsec.8* %files doc /usr/doc/%{name}-%{freeswan_version}/* %files module %defattr (-,root,root) /lib/modules/%{kernel_version}/kernel/net/ipsec/* %files module-smp %defattr (-,root,root) /lib/modules/%{kernel_version}smp/kernel/net/ipsec/* %changelog * Mon Jan 20 2003 Ei-ji Nakama <nakama@xxxxxxxxxxxx> - 1.99 - x509patch-0.9.15 patch - Create. -------------------------- ここまで ------------------------ -- e-mail : Ei-ji Nakama <nakama@xxxxxxxxxxxx>