/[packages]/updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec
ViewVC logotype

Annotation of /updates/5/ipsec-tools/current/SPECS/ipsec-tools.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 822446 - (hide annotations) (download)
Wed May 20 15:34:52 2015 UTC (4 years, 2 months ago) by luigiwalser
Original Path: cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec
File size: 5536 byte(s)
add patch to fix null pointer dereference
1 kharec 3447 %define LIBMAJ 0
2     %define libname %mklibname ipsec %LIBMAJ
3     %define libnamedev %mklibname -d ipsec
4    
5     Name: ipsec-tools
6 tmb 496340 Version: 0.8.1
7 luigiwalser 822446 Release: %mkrel 5
8 kharec 3447 Summary: Tools for configuring and using IPSEC
9     License: BSD
10     Group: Networking/Other
11     URL: http://ipsec-tools.sourceforge.net/
12     Source: http://prdownloads.sourceforge.net/ipsec-tools/ipsec-tools-%{version}.tar.bz2
13     Source3: racoon.conf
14     Source4: psk.txt
15     Source6: ipsec-setkey-initscript
16     Source7: racoon-initscript
17     Source8: racoon.sysconfig
18 tmb 220061 Patch0: ipsec-tools-0.8.0-manfix.patch
19 tmb 496340 Patch1: ipsec-tools-0.8.1-includes.patch
20 tmb 220061 Patch3: ipsec-tools-0.8.0-link.patch
21 luigiwalser 822446 Patch4: ipsec-tools-0.8.1-null-ptr-deref.patch
22 kharec 3447 # Fedora patches
23 tmb 220061 Patch103: ipsec-tools-0.8.0-acquires.patch
24     Patch104: ipsec-tools-0.8.0-loopback.patch
25 tmb 220066 Patch105: ipsec-tools-0.8.0-build.patch
26 kharec 3447 # the following patches were also submitted upstream:
27 tmb 220061 Patch111: ipsec-tools-0.8.0-pie.patch
28 ovitters 645222 BuildRequires: openssl-devel
29     BuildRequires: krb5-devel
30     BuildRequires: flex
31     BuildRequires: bison
32 kharec 3447 BuildRequires: libpam-devel
33     Requires: %{libname} = %{version}
34     Requires(pre): rpm-helper
35     Requires: rpm-helper
36     Provides: kvpnc-backend
37    
38     %description
39     This is the IPsec-Tools package. You need this package in order to
40     really use the IPsec functionality in the linux-2.6 and above kernels.
41     This package builds:
42    
43     - libipsec, a PFKeyV2 library
44     - setkey, a program to directly manipulate policies and SAs
45     - racoon, an IKEv1 keying daemon
46    
47     %define old_libname %mklibname ipsec-tools 0
48     %define old_libname_devel %mklibname -d ipsec 0
49    
50     %package -n %{libname}
51     Summary: The shared libraries used by ipsec-tools
52     Group: System/Libraries
53     Requires(post): grep, coreutils
54     Requires(preun): grep, coreutils
55     Requires: grep, coreutils
56     Provides: libipsec = %{version}-%{release}
57     Provides: libipsec-tools = %{version}-%{release}
58     Obsoletes: libipsec-tools
59     Provides: %old_libname = %{version}-%{release}
60     Obsoletes: %old_libname
61    
62     %description -n %{libname}
63     These are the shared libraries for the IPsec-Tools package.
64    
65     %package -n %{libnamedev}
66     Summary: Headers for programs for %libname
67     Group: Development/C
68     Requires: %{libname} = %{version}
69     Provides: libipsec-tools-devel = %{version}-%{release}
70     Provides: libipsec-devel = %{version}-%{release}
71     Obsoletes: libipsec-tools-devel
72     Provides: %{old_libname}-devel = %{version}-%{release}
73     Obsoletes: %{old_libname}-devel
74     Obsoletes: %{old_libname_devel} < 0.7
75    
76    
77     %description -n %{libnamedev}
78     These are development headers for libipsec
79    
80     %prep
81     %setup -q
82     %patch0 -p1 -b .manfix
83     %patch1 -p1 -b .includes
84 tmb 220063 %patch3 -p1 -b .link
85 luigiwalser 822446 %patch4 -p1 -b .nullptr
86 kharec 3447 %patch103 -p1 -b .acquires
87     %patch104 -p1 -b .loopback
88 tmb 220066 %patch105 -p1 -b .build
89 kharec 3447 %patch111 -p1 -b .pie
90    
91     sed -i 's|-Werror||g' configure*
92    
93    
94     %build
95     ./bootstrap
96     %configure2_5x \
97     --prefix=%{_prefix} \
98     --mandir=%{_mandir} \
99     --libdir=/%{_lib} \
100     --sbindir=/sbin \
101     --localstatedir=%{_localstatedir}/lib \
102     --sysconfdir=%{_sysconfdir}/racoon \
103     --with-kernel-headers=%{_includedir} \
104     --enable-shared \
105     --disable-rpath \
106     --enable-hybrid \
107     --enable-frag \
108     --enable-dpd \
109     --enable-adminport \
110     --enable-gssapi \
111     --enable-natt \
112     --with-libpam \
113     --enable-security-context=no \
114     --disable-audit
115     make
116    
117     %install
118     %makeinstall_std
119    
120     mkdir -p $RPM_BUILD_ROOT/etc/racoon/
121    
122     install -m 0600 %{SOURCE3} $RPM_BUILD_ROOT/etc/racoon/racoon.conf
123     install -m 0600 %{SOURCE4} $RPM_BUILD_ROOT/etc/racoon/psk.txt
124     mkdir -m 0700 -p $RPM_BUILD_ROOT/etc/racoon/certs
125    
126     mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
127     install -m 0755 %{SOURCE6} $RPM_BUILD_ROOT/%{_initrddir}/ipsec-setkey
128     install -m 0755 %{SOURCE7} $RPM_BUILD_ROOT/%{_initrddir}/racoon
129    
130     mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
131     # racoon.sysconfig
132     install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/racoon
133    
134     # pam file
135     mkdir -p %{buildroot}%{_sysconfdir}/pam.d
136     cat > %{buildroot}%{_sysconfdir}/pam.d/racoon <<EOF
137     #%PAM-1.0
138     auth required pam_nologin.so
139     auth include system-auth
140     account include system-auth
141     EOF
142    
143     # default ipsec.conf file
144     cat > %{buildroot}%{_sysconfdir}/ipsec.conf <<EOF
145     #!/usr/sbin/setkey -f
146     #
147     # File /etc/ipsec.conf
148    
149     # delete the SAD and SPD
150     flush;
151     spdflush;
152    
153     # Define here your security policies
154    
155     # Example
156     # ipsec between two machines: 192.168.1.10 and 192.168.1.20
157     #
158     # spdadd 192.168.1.10 192.168.1.20 any -P in ipsec
159     # esp/transport//require
160     # ah/transport//require;
161     #
162     # spdadd 192.168.1.20 192.168.1.10 any -P out ipsec
163     # esp/transport//require
164     # ah/transport//require;
165    
166     EOF
167    
168     # remove some files from the sample dir so we can include it
169     # in %%doc. Also fix their permissions
170     rm -f src/racoon/samples/*.in
171     find src/racoon/samples -type f -exec chmod 0644 {} \;
172    
173     %post
174     %_post_service ipsec-setkey
175     %_post_service racoon
176    
177     %preun
178     %_preun_service ipsec-setkey
179     %_preun_service racoon
180    
181     %files
182     %doc ChangeLog NEWS README
183     %doc src/racoon/samples
184     %doc src/racoon/doc/*
185     /sbin/*
186     %{_mandir}/man*/*
187     %dir %{_sysconfdir}/racoon
188     %dir %{_sysconfdir}/racoon/certs
189     %config(noreplace) %{_sysconfdir}/sysconfig/racoon
190     %config(noreplace) %{_sysconfdir}/racoon/psk.txt
191     %config(noreplace) %{_sysconfdir}/racoon/racoon.conf
192     %config(noreplace) %attr(0600,root,root) %{_sysconfdir}/ipsec.conf
193     %config(noreplace) %{_sysconfdir}/pam.d/racoon
194     %attr (0755,root,root) %{_initrddir}/ipsec-setkey
195     %attr (0755,root,root) %{_initrddir}/racoon
196     %dir /var/lib/racoon
197    
198     %files -n %{libname}
199     %doc ChangeLog NEWS README
200     /%{_lib}/*.so.*
201    
202     %files -n %{libnamedev}
203     /%{_lib}/libipsec.la
204     /%{_lib}/libipsec.a
205     /%{_lib}/libipsec.so
206     /%{_lib}/libracoon.la
207     /%{_lib}/libracoon.a
208     /%{_lib}/libracoon.so
209     %{_includedir}/*

  ViewVC Help
Powered by ViewVC 1.1.26