/[packages]/updates/8/openssl/current/SPECS/openssl.spec
ViewVC logotype

Annotation of /updates/8/openssl/current/SPECS/openssl.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 547610 - (hide annotations) (download)
Mon Oct 28 10:07:24 2013 UTC (10 years, 5 months ago) by guillomovitch
Original Path: cauldron/openssl/current/SPECS/openssl.spec
File size: 10350 byte(s)
add upstream patch to fix null pointer issue (mga #11549)
1 guillomovitch 257018 %define maj 1.0.0
2 blino 733 %define engines_name %mklibname openssl-engines %{maj}
3     %define libname %mklibname openssl %{maj}
4     %define develname %mklibname openssl -d
5     %define staticname %mklibname openssl -s -d
6    
7     %define conflict1 %mklibname openssl 0.9.7
8     %define conflict2 %mklibname openssl 0.9.8
9    
10     # Number of threads to spawn when testing some threading fixes.
11     #define thread_test_threads %{?threads:%{threads}}%{!?threads:1}
12    
13 guillomovitch 494272 %define with_krb5 0
14 blino 733
15     Summary: Secure Sockets Layer communications libs & utils
16     Name: openssl
17 luigiwalser 397936 Version: 1.0.1e
18 guillomovitch 547610 Release: %mkrel 5
19 blino 733 License: BSD-like
20     Group: System/Libraries
21     URL: http://www.openssl.org/
22 fwang 394893 Source0: http://www.openssl.org/source/%{name}-%{version}.tar.gz
23     Source1: http://www.openssl.org/source/%{name}-%{version}.tar.gz.asc
24 blino 733 Source2: Makefile.certificate
25     Source3: make-dummy-cert
26     Source4: openssl-thread-test.c
27     # (gb) 0.9.7b-4mdk: Handle RPM_OPT_FLAGS in Configure
28 guillomovitch 256937 Patch2: openssl-1.0.1c-optflags.patch
29 blino 733 # (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)
30     # http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF
31     Patch6: openssl-0.9.8-beta6-icpbrasil.diff
32 guillomovitch 256937 # http://qa.mandriva.com/show_bug.cgi?id=32621
33     Patch15: openssl-0.9.8e-crt.patch
34 guillomovitch 547610 # upstream patch
35     Patch8: openssl.git-147dbb2fe3bead7a10e2f280261b661ce7af7adc.patch
36 guillomovitch 256937
37     # fedora patches
38 guillomovitch 191618 Patch7: openssl-1.0.0f-defaults.patch
39 blino 733 Patch12: openssl-0.9.6-x509.patch
40 guillomovitch 256937 Patch13: openssl-0.9.8j-version-add-engines.patch
41     Patch16: openssl-1.0.0-beta5-enginesdir.patch
42 guillomovitch 256938 Patch17: openssl-1.0.1-pkgconfig-krb5.patch
43 sander85 432014 Patch18: openssl-1.0.1e-manfix.patch
44 guillomovitch 256937
45 blino 733 # MIPS and ARM support
46 guillomovitch 256937 Patch300: openssl-1.0.1c-mips.patch
47     Patch301: openssl-1.0.1c-arm.patch
48 blino 733 Requires: %{libname} = %{version}-%{release}
49     Requires: perl-base
50     Requires: rootcerts
51 guillomovitch 337573 %if %with_krb5
52 guillomovitch 256938 BuildRequires: krb5-devel
53 guillomovitch 337573 %endif
54 blino 733 BuildRequires: multiarch-utils >= 1.0.3
55     BuildRequires: chrpath
56     BuildRequires: zlib-devel
57     # (tv) for test suite:
58     BuildRequires: bc
59    
60     %description
61     The openssl certificate management tool and the shared libraries that provide
62     various encryption and decription algorithms and protocols, including DES, RC4,
63     RSA and SSL.
64    
65     %package -n %{engines_name}
66     Summary: Engines for openssl
67     Group: System/Libraries
68     Obsoletes: openssl-engines < 1.0.0a-5
69     Provides: openssl-engines = %{version}-%{release}
70    
71     %description -n %{engines_name}
72     This package provides engines for openssl.
73    
74     %package -n %{libname}
75     Summary: Secure Sockets Layer communications libs
76     Group: System/Libraries
77     Requires: %{engines_name} >= %{version}-%{release}
78     Provides: %{libname} = %{version}-%{release}
79    
80     %description -n %{libname}
81     The libraries files are needed for various cryptographic algorithms
82     and protocols, including DES, RC4, RSA and SSL.
83    
84     %package -n %{develname}
85     Summary: Secure Sockets Layer communications libs & headers & utils
86     Group: Development/Other
87     Requires: %{libname} = %{version}-%{release}
88     Provides: libopenssl-devel
89     Provides: openssl-devel = %{version}-%{release}
90     Obsoletes: openssl-devel
91     # temporary opsolete, will be a conflict later. a compat package
92     # with openssl-0.9.7 devel libs will be provided soon
93     Obsoletes: %{conflict1}-devel
94     Obsoletes: %{conflict2}-devel
95     Obsoletes: %{mklibname openssl 1.0.0}-devel
96     Provides: %{name}-devel = %{version}-%{release}
97    
98     %description -n %{develname}
99     The libraries and include files needed to compile apps with support
100     for various cryptographic algorithms and protocols, including DES, RC4, RSA
101     and SSL.
102    
103     %package -n %{staticname}
104     Summary: Secure Sockets Layer communications static libs
105     Group: Development/Other
106     Requires: %{develname} = %{version}-%{release}
107     Provides: libopenssl-static-devel
108     Provides: openssl-static-devel = %{version}-%{release}
109     # temporary opsolete, will be a conflict later. a compat package
110     # with openssl-0.9.7 static-devel libs will be provided soon
111     Obsoletes: %{conflict1}-static-devel
112     Obsoletes: %{conflict2}-static-devel
113     Obsoletes: %{mklibname openssl 1.0.0}-static-devel
114     Provides: %{name}-static-devel = %{version}-%{release}
115    
116     %description -n %{staticname}
117     The static libraries needed to compile apps with support for various
118     cryptographic algorithms and protocols, including DES, RC4, RSA and SSL.
119    
120     %prep
121    
122     %setup -q -n %{name}-%{version}
123     %patch2 -p1 -b .optflags
124     %patch6 -p0 -b .icpbrasil
125     %patch7 -p1 -b .defaults
126 guillomovitch 547610 %patch8 -p1 -b .SSL_get_certificate
127 blino 733 %patch12 -p1 -b .x509
128     %patch13 -p1 -b .version-add-engines
129     %patch15 -p1 -b .crt
130 guillomovitch 256937 %patch16 -p1 -b .engines
131 guillomovitch 256938 %patch17 -p1 -b .krb5
132 sander85 432014 %patch18 -p1 -b .manfix
133 blino 733
134     %patch300 -p1 -b .mips
135     %patch301 -p1 -b .arm
136    
137     perl -pi -e "s,^(OPENSSL_LIBNAME=).+$,\1%{_lib}," Makefile.org engines/Makefile
138    
139     cp %{SOURCE2} Makefile.certificate
140     cp %{SOURCE3} make-dummy-cert
141     cp %{SOURCE4} openssl-thread-test.c
142    
143     %build
144     %serverbuild
145    
146     # Figure out which flags we want to use.
147     # default
148     sslarch=%{_os}-%{_arch}
149     %ifarch %ix86
150     sslarch=linux-elf
151     if ! echo %{_target} | grep -q i[56]86 ; then
152     sslflags="no-asm"
153     fi
154     %endif
155     %ifarch sparcv9
156     sslarch=linux-sparcv9
157     %endif
158     %ifarch alpha
159     sslarch=linux-alpha-gcc
160     %endif
161     %ifarch s390
162     sslarch="linux-generic32 -DB_ENDIAN -DNO_ASM"
163     %endif
164     %ifarch s390x
165     sslarch="linux-generic64 -DB_ENDIAN -DNO_ASM"
166     %endif
167    
168     # ia64, x86_64, ppc, ppc64 are OK by default
169     # Configure the build tree. Override OpenSSL defaults with known-good defaults
170     # usable on all platforms. The Configure script already knows to use -fPIC and
171     # RPM_OPT_FLAGS, so we can skip specifiying them here.
172     ./Configure \
173 guillomovitch 256937 --prefix=%{_prefix} \
174 blino 733 --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
175 guillomovitch 256937 --libdir=%{_lib}/ \
176 guillomovitch 337573 %if %with_krb5
177 guillomovitch 256938 --with-krb5-flavor=MIT --with-krb5-dir=%{_prefix} \
178 guillomovitch 337573 %endif
179 guillomovitch 327008 --enginesdir=%{_libdir}/openssl/%{version}/engines \
180 guillomovitch 256937 zlib no-idea no-rc5 enable-camellia shared enable-tlsext ${sslarch}
181 blino 733
182     # Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
183     # marked as not requiring an executable stack.
184     RPM_OPT_FLAGS="%{optflags} -Wa,--noexecstack"
185     make depend
186     make all build-shared
187    
188     # Generate hashes for the included certs.
189     make rehash build-shared
190    
191     %check
192     # Verify that what was compiled actually works.
193     export LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
194    
195     make -C test apps tests
196    
197     gcc -o openssl-thread-test \
198     %{?_with_krb5:`krb5-config --cflags`} \
199     -I./include \
200     %{optflags} \
201     openssl-thread-test.c \
202     -L. -lssl -lcrypto \
203     %{?_with_krb5:`krb5-config --libs`} \
204     -lpthread -lz -ldl
205    
206     ./openssl-thread-test --threads %{thread_test_threads}
207    
208     %install
209     rm -fr %{buildroot}
210    
211     %makeinstall \
212     INSTALL_PREFIX=%{buildroot} \
213     MANDIR=%{_mandir} \
214     build-shared
215    
216 guillomovitch 327008 install -d -m 755 %{buildroot}%{_libdir}/openssl/%{version}
217     mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl/%{version}
218 blino 733
219     # make the rootcerts dir
220     install -d %{buildroot}%{_sysconfdir}/pki/tls/rootcerts
221    
222     # Install a makefile for generating keys and self-signed certs, and a script
223     # for generating them on the fly.
224     install -d %{buildroot}%{_sysconfdir}/pki/tls/certs
225     install -m0644 Makefile.certificate %{buildroot}%{_sysconfdir}/pki/tls/certs/Makefile
226     install -m0755 make-dummy-cert %{buildroot}%{_sysconfdir}/pki/tls/certs/make-dummy-cert
227    
228     # Pick a CA script.
229     mv %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.sh %{buildroot}%{_sysconfdir}/pki/tls/misc/CA
230    
231     install -d %{buildroot}%{_sysconfdir}/pki/CA
232     install -d %{buildroot}%{_sysconfdir}/pki/CA/private
233    
234     # openssl was named ssleay in "ancient" times.
235     ln -snf openssl %{buildroot}%{_bindir}/ssleay
236    
237     # The man pages rand.3 and passwd.1 conflict with other packages
238     # Rename them to ssl-* and also make a symlink from openssl-* to ssl-*
239     mv %{buildroot}%{_mandir}/man1/passwd.1 %{buildroot}%{_mandir}/man1/ssl-passwd.1
240 oden 330865 ln -sf ssl-passwd.1%{_extension} %{buildroot}%{_mandir}/man1/openssl-passwd.1%{_extension}
241 blino 733
242     for i in rand err; do
243     mv %{buildroot}%{_mandir}/man3/$i.3 %{buildroot}%{_mandir}/man3/ssl-$i.3
244 oden 330865 ln -snf ssl-$i.3%{_extension} %{buildroot}%{_mandir}/man3/openssl-$i.3%{_extension}
245 blino 733 done
246    
247     rm -rf {main,devel}-doc-info
248     mkdir -p {main,devel}-doc-info
249 guillomovitch 191621 cat > main-doc-info/README.mga <<EOF
250 blino 733 Warning:
251     The man page of passwd, passwd.1, has been renamed to ssl-passwd.1
252     to avoid a conflict with passwd.1 man page from the package passwd.
253     EOF
254    
255 guillomovitch 191621 cat > devel-doc-info/README.mga <<EOF
256 blino 733 Warning:
257     The man page of rand, rand.3, has been renamed to ssl-rand.3
258     to avoid a conflict with rand.3 from the package man-pages
259     The man page of err, err.3, has been renamed to ssl-err.3
260     to avoid a conflict with err.3 from the package man-pages
261     EOF
262    
263     chmod 755 %{buildroot}%{_libdir}/pkgconfig
264    
265     %multiarch_includes %{buildroot}%{_includedir}/openssl/opensslconf.h
266    
267     # strip cannot touch these unless 755
268 guillomovitch 327008 chmod 755 %{buildroot}%{_libdir}/openssl/%{version}/engines/*.so*
269 blino 733 chmod 755 %{buildroot}%{_libdir}/*.so*
270     chmod 755 %{buildroot}%{_bindir}/*
271    
272     # nuke a mistake
273     rm -f %{buildroot}%{_mandir}/man3/.3
274    
275     # nuke rpath
276     chrpath -d %{buildroot}%{_bindir}/openssl
277    
278     # Fix libdir.
279     pushd %{buildroot}%{_libdir}/pkgconfig
280     for i in *.pc ; do
281     sed 's,^libdir=${exec_prefix}/lib$,libdir=${exec_prefix}/%{_lib},g' \
282     $i >$i.tmp && \
283     cat $i.tmp >$i && \
284     rm -f $i.tmp
285     done
286     popd
287    
288     # adjust ssldir
289     perl -pi -e "s|^CATOP=.*|CATOP=%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA
290     perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_sysconfdir}/pki/tls\";|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.pl
291     perl -pi -e "s|\./demoCA|%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/openssl.cnf
292    
293     %files
294     %doc FAQ INSTALL LICENSE NEWS PROBLEMS main-doc-info/README*
295 guillomovitch 256937 %doc README README.ASN1 README.ENGINE
296 blino 733 %dir %{_sysconfdir}/pki
297     %dir %{_sysconfdir}/pki/CA
298     %dir %{_sysconfdir}/pki/CA/private
299     %dir %{_sysconfdir}/pki/tls
300     %dir %{_sysconfdir}/pki/tls/certs
301     %dir %{_sysconfdir}/pki/tls/misc
302     %dir %{_sysconfdir}/pki/tls/private
303     %dir %{_sysconfdir}/pki/tls/rootcerts
304 guillomovitch 191620 %config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf
305     %{_sysconfdir}/pki/tls/certs/make-dummy-cert
306     %{_sysconfdir}/pki/tls/certs/Makefile
307     %{_sysconfdir}/pki/tls/misc/*
308     %{_bindir}/*
309     %{_mandir}/man[157]/*
310 blino 733
311     %files -n %{libname}
312     %doc FAQ INSTALL LICENSE NEWS PROBLEMS README*
313 fwang 257304 %{_libdir}/lib*.so.%{maj}
314 blino 733
315     %files -n %{engines_name}
316 guillomovitch 311668 %{_libdir}/openssl
317 blino 733
318     %files -n %{develname}
319     %doc CHANGES doc/* devel-doc-info/README*
320 guillomovitch 191620 %dir %{_includedir}/openssl
321 blino 733 %multiarch %{multiarch_includedir}/openssl/opensslconf.h
322 guillomovitch 191620 %{_includedir}/openssl/*
323     %{_libdir}/lib*.so
324     %{_mandir}/man3/*
325     %{_libdir}/pkgconfig/*
326 blino 733
327     %files -n %{staticname}
328 fwang 395433 %{_libdir}/lib*.a

  ViewVC Help
Powered by ViewVC 1.1.30