Witam. 

Bawilem się ostatniio openSWANem, i coś mnie podkusiło do zbudowania wersji 
2.6. Nie działało. Ale teraz działa, załączam spec i nowy prefix.patch. Dwa 
kolejne patche zakomentowane w specu, buduje się bez nich. Nie wiem czy to 
jest dobry pomysł, czy zły, bo nie wnikalem zbytnio w to, co te patche robią. 
Wygląda na to, że całość działa bez nich, aczkolwiek nie sprawdziłem jeszcze 
czy to w ogóle gdzieś się łączy, miałem drugą stronę za firewallem niestety.
Jakby ktoś(tm) mógł sprawdzić, i ewentualnie wrzucić do CVS-u, albo podesłać 
info, że to kaszanka i dlaczego PLD nie bedzie mieć 2.6 ?? :-)  


-- 
Piotr Gbyliczek

# $Revision: 1.37 $, $Date: 2008/08/25 07:45:12 $
# NOTE:
# 32-bit tncfg and starter won't work on 64-bit kernels because of FUBAR ioctls
# (only ifru_data pointer is supported in 32->64 conversion of SIOCDEVPRIV ioctl,
#  but openswan puts some static data in structure there)
Summary:	Open Source implementation of IPsec for the Linux operating system
Summary(pl.UTF-8):	Otwarta implementacja IPseca dla systemu operacyjnego Linux
Name:		openswan
Version:	2.6.20
Release:	1
Epoch:		0
License:	GPL/BSD
Group:		Networking/Daemons
Source0:	http://www.openswan.org/download/%{name}-%{version}.tar.gz
# Source0-md5:	2e4751e39b2421406692e767e96a6f14
Source1:	%{name}.init
Patch0:		%{name}-prefix.patch
Patch1:		%{name}-bash.patch
Patch2:		%{name}-enable_des.patch
URL:		http://www.openswan.org/
BuildRequires:	bison
BuildRequires:	flex
BuildRequires:	gmp-devel
BuildRequires:	rpmbuild(macros) >= 1.268
BuildRequires:	xmlto
BuildRequires:	man2html
BuildRequires:	sed >= 4.0
Requires(post,preun):	/sbin/chkconfig
Requires:	bash
Requires:	rc-scripts
Provides:	freeswan
Obsoletes:	freeswan
Obsoletes:	ipsec-tools
Obsoletes:	strongswan
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Openswan is an Open Source implementation of IPsec for the Linux 2.6.x
operating system. Is it a code fork of the FreeS/WAN project, started
by a few of the developers who were growing frustrated with the
politics surrounding the FreeS/WAN project.

%description -l pl.UTF-8
Openswan to otwarta implementacja IPseca dla systemu operacyjnego
Linux 2.6.x. Jest to odgałęzienie kodu z projektu FreeS/WAN,
rozpoczęte przez kilku programistów coraz bardziej sfrustrowanych
polityką otaczającą projekt FreeS/WAN.

%prep
%setup -q
%patch0 -p1
#%patch1 -p1
#%patch2 -p1

%{__sed} -i -e "s#/lib/ipsec#/%{_lib}/ipsec#g#" Makefile
%{__sed} -i -e "s#/lib/freeswan$#/%{_lib}/freeswan#g#" Makefile
%{__sed} -i -e "s#/lib/ipsec#/%{_lib}/ipsec#g#" Makefile.inc

%build
%{__make} programs \
	CC="%{__cc}" \
	USERCOMPILE="%{rpmcflags}"

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/pluto}

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ipsec
%{__sed} -i -e "s#/lib/ipsec#/%{_lib}/ipsec#g#" $RPM_BUILD_ROOT/etc/rc.d/init.d/ipsec

for l in `find $RPM_BUILD_ROOT%{_mandir}/man3 -type l` ; do
	d=`readlink $l`
	rm -f $l
	echo ".so $d" > $l
done

# just man pages converted to HTML
rm -rf $RPM_BUILD_ROOT%{_docdir}/openswan/*.[358].html

# API not exported - kill for now
rm -rf $RPM_BUILD_ROOT%{_mandir}/man3

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add ipsec
%service ipsec restart "IPSEC daemon"

%preun
if [ "$1" = "0" ]; then
	%service ipsec stop
	/sbin/chkconfig --del ipsec
fi

%files
%defattr(644,root,root,755)
%doc BUGS CHANGES CREDITS LICENSE README doc
%attr(755,root,root) %{_sbindir}/*
%dir %{_libdir}/ipsec
%attr(755,root,root) %{_libdir}/ipsec/*
%attr(754,root,root) /etc/rc.d/init.d/ipsec
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ipsec.conf
%dir %{_sysconfdir}/ipsec.d
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ipsec.d/*
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rc.d/*
%dir /var/run/pluto
%{_mandir}/man5/*
%{_mandir}/man8/*

# devel docs (but no devel libs)
#%{_mandir}/man3/*

%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[email protected]>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log: openswan.spec,v $
Revision 1.37  2008/08/25 07:45:12  marcus
- up to 2.4.13, last in 2.4.x openswan series, upgrade to 2.6.x on DEVEL needed

Revision 1.36  2007/12/25 21:54:47  zbyniu
- up to 2.4.11

Revision 1.35  2007-10-01 13:00:58  glen
- update to 2.4.9

Revision 1.34  2007/04/25 21:07:18  mguevara
- rel 2, added openswan-enable_des.patch for enabling des

Revision 1.33  2007/03/25 12:59:59  areq
- 2.4.7

Revision 1.32  2007/02/13 07:16:51  glen
- tabs in preamble

Revision 1.31  2007/02/12 00:49:17  baggins
- converted to UTF-8

Revision 1.30  2006/08/06 21:16:12  areq
- 2.4.6

Revision 1.29  2006/05/19 06:47:55  marcus
- up to 2.4.5. works.

Revision 1.28  2006/03/12 22:45:47  glen
- use %service, adapterized

Revision 1.27  2006/02/12 19:40:50  marcus
- build html man pages and then removing is not necessary

Revision 1.26  2006/02/11 11:07:04  marcus
- rel.2.

Revision 1.25  2006/01/11 18:47:40  qboosh
- note about 32-bit user/64-bit kernel incompatibility

Revision 1.24  2006/01/11 15:28:29  qboosh
- added /var/run/pluto dir

Revision 1.23  2006/01/11 10:42:17  qboosh
- optflags, cleanups

Revision 1.22  2005/12/20 00:07:55  glen
- add CVE refs

Revision 1.21  2005/12/13 14:11:32  glen
- adapterized (sorted %verify attrs)

Revision 1.20  2005/12/02 11:14:44  areq
- 2.4.4 (resolves CVE-2005-3671, CVE-2005-3732)

Revision 1.19  2005/07/10 18:21:52  areq
- 2.3.1

Revision 1.18  2005/04/04 12:55:23  zawadaa
- add BR lynx
- STBR

Revision 1.17  2005/02/10 14:40:25  radzio
- CAN references for last update

Revision 1.16  2005/02/01 22:24:37  krolik
- up to 2.3.0 (security update)
- changed Source0
- STBR
  [fixes CAN-2005-0162 (GENERIC-MAP-NOMATCH)]

Revision 1.15  2004/12/01 01:27:35  zbyniu
- added PreReq: rc-scripts and Requires(): /sbin/chkconfig for daemon

Revision 1.14  2004/11/28 14:47:54  marcus
- openswan.init need sed'ing too

Revision 1.13  2004/11/28 12:14:29  havner
- try this way

Revision 1.12  2004/11/28 12:09:35  havner
- terminate seds, BR sed

Revision 1.11  2004/11/28 12:05:39  havner
- try to fix amd64 build

Revision 1.10  2004/11/25 21:23:42  marcus
- work for me, rel.1.
  (tested with kernel 2.4.27 on i686)

Revision 1.9  2004/11/24 19:46:17  marcus
- added Provides/Obsoletes

Revision 1.8  2004/11/24 19:40:53  marcus
- added bash patch

Revision 1.7  2004/10/06 11:19:48  qboosh
- sorted BRs, reverted docs breakage

Revision 1.6  2004/09/28 20:38:59  jasio
- added additional BR's: bison and flex.

Revision 1.5  2004/09/18 20:36:48  paszczus
- updated to 2.2.0
- added BR: htmldoc (for docs)
- cleanups

Revision 1.4  2004/08/10 12:03:08  deejay1
- up to 2.1.4 - see CAN-2004-0590

Revision 1.3  2004/05/25 16:25:45  qboosh
- pl, cleanups

Revision 1.2  2004/05/25 14:39:24  krzak
- openswan.init - fixed a bit
- small fixes

Revision 1.1  2004/05/25 10:39:28  krzak
- initial PLD release
diff -Nuard openswan-2.1.2.orig/Makefile.inc openswan-2.1.2/Makefile.inc
--- openswan-2.1.2.orig/Makefile.inc	2004-05-07 05:12:52.000000000 +0200
+++ openswan-2.1.2/Makefile.inc	2004-05-25 12:02:02.000000000 +0200
@@ -62,7 +62,7 @@
 DESTDIR?=
 
 # "local" part of tree, used in building other pathnames
-INC_USRLOCAL=/usr/local
+INC_USRLOCAL=/usr
 
 # PUBDIR is where the "ipsec" command goes; beware, many things define PATH
 # settings which are assumed to include it (or at least, to include *some*
@@ -71,7 +71,7 @@
 
 # BINDIR is where sub-commands get put, FINALBINDIR is where the "ipsec"
 # command will look for them when it is run. Also called LIBEXECDIR.
-FINALLIBEXECDIR?=$(INC_USRLOCAL)/libexec/ipsec
+FINALLIBEXECDIR?=$(INC_USRLOCAL)/lib/ipsec
 LIBEXECDIR=$(DESTDIR)$(FINALBINDIR)
 
 FINALBINDIR=${FINALLIBEXECDIR}
@@ -91,7 +91,7 @@
 # location within INC_USRLOCAL
 INC_MANDIR=man
 # the full pathname
-MANTREE=$(DESTDIR)$(INC_USRLOCAL)/$(INC_MANDIR)
+MANTREE=$(DESTDIR)$(INC_USRLOCAL)/share/$(INC_MANDIR)
 # all relevant subdirectories of MANTREE
 MANPLACES=man3 man5 man8
 
@@ -294,7 +294,7 @@
 USE_OE?=no
 ifeq ($(USE_OE),no)
 # warning: examples subdirectory is statically defined here
-OE_FLAG=\#Disable Opportunistic Encryption\\ninclude ${FINALCONFDDIR}/examples/no_oe.conf
+OE_FLAG=\#Disable Opportunistic Encryption\\ninclude ${FINALCONFDDIR}/no_oe.conf
 else
 endif
 
--- openswan-2.4.9/programs/examples/Makefile~	2007-10-01 15:45:22.000000000 +0300
+++ openswan-2.4.9/programs/examples/Makefile	2007-10-01 15:59:30.299660808 +0300
@@ -16,7 +16,7 @@
 OPENSWANSRCDIR?=$(shell cd ../..; pwd)
 include ${OPENSWANSRCDIR}/Makefile.inc
 
-CONFDSUBDIR=examples
+CONFDSUBDIR=.
 CONFDFILES=l2tp-cert.conf l2tp-psk.conf linux-linux.conf sysctl.conf xauth.conf ipv6.conf
 
 include ${srcdir}../Makefile.program
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym