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

Contents of /cauldron/ipsec-tools/current/SPECS/ipsec-tools.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1378193 - (show annotations) (download)
Sun Mar 17 04:20:38 2019 UTC (6 months, 4 weeks ago) by daviddavid
File size: 5509 byte(s)
- add debian patch to build against openssl 1.1

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

  ViewVC Help
Powered by ViewVC 1.1.26