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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1132889 by akien, Sun Jul 30 18:03:56 2017 UTC revision 1133938 by guillomovitch, Wed Aug 2 13:45:32 2017 UTC
# Line 1  Line 1 
1  %define maj 1.0.0  %define maj 1.1
 %define engines_name %mklibname openssl-engines %{maj}  
2  %define libname %mklibname openssl %{maj}  %define libname %mklibname openssl %{maj}
3  %define develname %mklibname openssl -d  %define develname %mklibname openssl -d
4  %define staticname %mklibname openssl -s -d  %define staticname %mklibname openssl -s -d
# Line 7  Line 6 
6  %define conflict1 %mklibname openssl 0.9.7  %define conflict1 %mklibname openssl 0.9.7
7  %define conflict2 %mklibname openssl 0.9.8  %define conflict2 %mklibname openssl 0.9.8
8    
 # Number of threads to spawn when testing some threading fixes.  
 #define thread_test_threads %{?threads:%{threads}}%{!?threads:1}  
   
9  %define with_krb5 0  %define with_krb5 0
10    
11  Summary:        Secure Sockets Layer communications libs & utils  Summary:        Secure Sockets Layer communications libs & utils
12  Name:           openssl  Name:           openssl
13  Version:        1.0.2l  Version:        1.1.0f
14  Release:        %mkrel 2  Release:        %mkrel 1
15  License:        BSD-like  License:        BSD-like
16  Group:          System/Libraries  Group:          System/Libraries
17  URL:            http://www.openssl.org/  URL:            http://www.openssl.org/
18  Source0:        http://www.openssl.org/source/%{name}-%{version}.tar.gz  Source0:        http://www.openssl.org/source/%{name}-%{version}.tar.gz
19  Source1:        http://www.openssl.org/source/%{name}-%{version}.tar.gz.asc  Source1:        http://www.openssl.org/source/%{name}-%{version}.tar.gz.asc
20  Source2:        Makefile.certificate  Source2:        Makefile.certificate
 Source3:        make-dummy-cert  
21  Source4:        openssl-thread-test.c  Source4:        openssl-thread-test.c
22  # (gb) 0.9.7b-4mdk: Handle RPM_OPT_FLAGS in Configure  Source6:    make-dummy-cert
23  Patch2:         openssl-1.0.2e-optflags.patch  Source7:    renew-dummy-cert
24    Source12:   ec_curve.c
25    Source13:   ectest.c
26  # (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)  # (oe) support Brazilian Government OTHERNAME X509v3 field (#14158)
27  # http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF  # http://www.iti.gov.br/resolucoes/RESOLU__O_13_DE_26_04_2002.PDF
28  Patch6:         openssl-1.0.2l-icpbrasil.diff  Patch6:         openssl-1.0.2l-icpbrasil.diff
 # http://qa.mandriva.com/show_bug.cgi?id=32621  
 # patch15 removed: https://bugs.mageia.org/show_bug.cgi?id=15027  
 #Patch15:       openssl-0.9.8e-crt.patch  
29    
30  # fedora patches  # fedora patches
31  Patch7:         openssl-1.0.2-defaults.patch  Patch1: openssl-1.1.0-build.patch
32  Patch12:        openssl-1.0.2-x509.patch  Patch3: openssl-1.1.0-no-html.patch
33  Patch13:        openssl-1.0.2-version-add-engines.patch  Patch21: openssl-1.1.0-issuer-hash.patch
34  Patch16:        openssl-1.0.2-enginesdir.patch  Patch22: openssl-1.1.0-algo-doc.patch
35  Patch17:        openssl-1.0.2-pkgconfig-krb5.patch  Patch23: openssl-1.1.0-manfix.patch
36  Patch18:        openssl-1.0.2g-manfix.patch  Patch31: openssl-1.1.0-ca-dir.patch
37  Patch19:        openssl-1.0.2g-disable-sslv2v3.patch  Patch32: openssl-1.1.0-version-add-engines.patch
38    Patch33: openssl-1.1.0-apps-dgst.patch
39    Patch34: openssl-1.1.0-starttls-xmpp.patch
40    Patch35: openssl-1.1.0-chil-fixes.patch
41    Patch36: openssl-1.1.0-secure-getenv.patch
42    Patch37: openssl-1.1.0-ec-curves.patch
43    Patch38: openssl-1.1.0-no-weak-verify.patch
44    Patch39: openssl-1.1.0-cc-reqs.patch
45    Patch40: openssl-1.1.0-disable-ssl3.patch
46    Patch41: openssl-1.1.0-system-cipherlist.patch
47    Patch43: openssl-1.1.0-afalg-eventfd2.patch
48    Patch44: openssl-1.1.0-bio-fd-preserve-nl.patch
49    Patch45: openssl-1.1.0-weak-ciphers.patch
50    Patch70: openssl-1.1.0-thread-local.patch
51    Patch71: openssl-1.1.0-dtls-failure.patch
52    
53  # MIPS and ARM support  # MIPS and ARM support
54  Patch300:       openssl-1.0.2a-mips.patch  Patch300:       openssl-1.0.2a-mips.patch
# Line 53  BuildRequires: krb5-devel Line 61  BuildRequires: krb5-devel
61  BuildRequires:  multiarch-utils >= 1.0.3  BuildRequires:  multiarch-utils >= 1.0.3
62  BuildRequires:  chrpath  BuildRequires:  chrpath
63  BuildRequires:  zlib-devel  BuildRequires:  zlib-devel
64    BuildRequires:  sctp-devel
65  # (tv) for test suite:  # (tv) for test suite:
66  BuildRequires:  bc  BuildRequires:  bc
67    
# Line 61  The openssl certificate management tool Line 70  The openssl certificate management tool
70  various encryption and decription algorithms and protocols, including DES, RC4,  various encryption and decription algorithms and protocols, including DES, RC4,
71  RSA and SSL.  RSA and SSL.
72    
 %package -n     %{engines_name}  
 Summary:        Engines for openssl  
 Group:          System/Libraries  
 Obsoletes:      openssl-engines < 1.0.0a-5  
 Provides:       openssl-engines = %{version}-%{release}  
   
 %description -n %{engines_name}  
 This package provides engines for openssl.  
   
73  %package -n     %{libname}  %package -n     %{libname}
74  Summary:        Secure Sockets Layer communications libs  Summary:        Secure Sockets Layer communications libs
75  Group:          System/Libraries  Group:          System/Libraries
76  Requires:       %{engines_name} >= %{version}-%{release}  Requires:   crypto-policies
77  Provides:       %{libname} = %{version}-%{release}  Provides:       %{libname} = %{version}-%{release}
78    
79  %description -n %{libname}  %description -n %{libname}
# Line 128  from other formats to the formats used b Line 128  from other formats to the formats used b
128    
129  %prep  %prep
130  %setup -q  %setup -q
131  %patch2 -p1 -b .optflags  
132    cp %{SOURCE12} crypto/ec/
133    cp %{SOURCE13} test/
134    
135    %patch1 -p1 -b .build
136    %patch3 -p1 -b .no-html
137  %patch6 -p1 -b .icpbrasil  %patch6 -p1 -b .icpbrasil
138  %patch7 -p1 -b .defaults  
139  %patch12 -p1 -b .x509  %patch21 -p1 -b .issuer-hash
140  %patch13 -p1 -b .version-add-engines  %patch22 -p1 -b .algo-doc
141  #patch15 -p1 -b .crt  %patch23 -p1 -b .manfix
142  %patch16 -p1 -b .engines  %patch31 -p1 -b .ca-dir
143  %patch17 -p1 -b .krb5  %patch32 -p1 -b .version-add-engines
144  %patch18 -p1 -b .manfix  %patch33 -p1 -b .dgst
145  %patch19 -p1 -b .v2v3  %patch34 -p1 -b .xmpp
146    %patch35 -p1 -b .chil
147  %patch300 -p1 -b .mips  %patch36 -p1 -b .secure-getenv
148  %patch301 -p1 -b .arm  %patch37 -p1 -b .curves
149    %patch38 -p1 -b .no-md5-verify
150  perl -pi -e "s,^(OPENSSL_LIBNAME=).+$,\1%{_lib}," Makefile.org engines/Makefile  %patch39 -p1 -b .cc-reqs
151    %patch40 -p1 -b .disable-ssl3
152  cp %{SOURCE2} Makefile.certificate  %patch41 -p1 -b .system-cipherlist
153  cp %{SOURCE3} make-dummy-cert  %patch43 -p1 -b .eventfd2
154  cp %{SOURCE4} openssl-thread-test.c  %patch44 -p1 -b .preserve-nl
155    %patch45 -p1 -b .weak-ciphers
156    %patch70 -p1 -b .thread-local
157    %patch71 -p1 -b .dtls-failure
158    
159    #patch300 -p1 -b .mips
160    #patch301 -p1 -b .arm
161    
162    #perl -pi -e "s,^(OPENSSL_LIBNAME=).+$,\1%{_lib}," Makefile.org engines/Makefile
163    
164  %build  %build
165  %serverbuild  %serverbuild
166    
167  # Figure out which flags we want to use.  # Figure out which flags we want to use.
168  # default  # default
169  sslarch=%{_os}-%{_arch}  sslarch=%{_os}-%{_target_cpu}
170  %ifarch %ix86  %ifarch %ix86
171  sslarch=linux-elf  sslarch=linux-elf
172  if ! echo %{_target} | grep -q i[56]86 ; then  if ! echo %{_target} | grep -q i[56]86 ; then
173      sslflags="no-asm"      sslflags="no-asm 386"
174  fi  fi
175  %endif  %endif
176  %ifarch sparcv9  %ifarch x86_64
177  sslarch=linux-sparcv9  sslflags=enable-ec_nistp_64_gcc_128
 %endif  
 %ifarch alpha  
 sslarch=linux-alpha-gcc  
 %endif  
 %ifarch s390  
 sslarch="linux-generic32 -DB_ENDIAN -DNO_ASM"  
178  %endif  %endif
179  %ifarch s390x  %ifarch %{arm}
180  sslarch="linux-generic64 -DB_ENDIAN -DNO_ASM"  sslarch=linux-armv4
181  %endif  %endif
182    
183    # Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
184    # marked as not requiring an executable stack.
185    # Also add -DPURIFY to make using valgrind with openssl easier as we do not
186    # want to depend on the uninitialized memory as a source of entropy anyway.
187    RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY"
188    
189  # ia64, x86_64, ppc, ppc64 are OK by default  # ia64, x86_64, ppc, ppc64 are OK by default
190  # Configure the build tree.  Override OpenSSL defaults with known-good defaults  # Configure the build tree.  Override OpenSSL defaults with known-good defaults
191  # usable on all platforms.  The Configure script already knows to use -fPIC and  # usable on all platforms.  The Configure script already knows to use -fPIC and
# Line 180  sslarch="linux-generic64 -DB_ENDIAN -DNO Line 193  sslarch="linux-generic64 -DB_ENDIAN -DNO
193  ./Configure \  ./Configure \
194      --prefix=%{_prefix} \      --prefix=%{_prefix} \
195      --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \      --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
196      --libdir=%{_lib}/ \      --system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config \
197  %if %with_krb5  %if %with_krb5
198      --with-krb5-flavor=MIT --with-krb5-dir=%{_prefix} \      --with-krb5-flavor=MIT --with-krb5-dir=%{_prefix} \
199  %endif  %endif
200      --enginesdir=%{_libdir}/openssl/%{version}/engines \       zlib enable-camellia enable-seed enable-rfc3779 enable-sctp \
201       zlib no-idea no-rc5 enable-camellia enable-md2 shared enable-tlsext ${sslarch} \       enable-cms enable-md2 enable-rc5 enable-ssl3 enable-ssl3-method \
202  %ifarch x86_64       enable-weak-ssl-ciphers no-mdc2 no-ec2m shared ${sslarch} \
203       enable-ec_nistp_64_gcc_128      $RPM_OPT_FLAGS
 %endif  
204    
205  # Add -Wa,--noexecstack here so that libcrypto's assembler modules will be  util/mkdef.pl crypto update
 # marked as not requiring an executable stack.  
 RPM_OPT_FLAGS="%{optflags} -Wa,--noexecstack"  
 make depend  
 make all build-shared  
206    
207  # Generate hashes for the included certs.  make all
 make rehash build-shared  
208    
209  %check  %check
210  # Verify that what was compiled actually works.  # Verify that what was compiled actually works.
 export LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}  
211    
212  make -C test apps tests  # We must revert patch31 before tests otherwise they will fail
213    patch -p1 -R < %{PATCH31}
214    
215  gcc -o openssl-thread-test \  export LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
216      %{?_with_krb5:`krb5-config --cflags`} \  export OPENSSL_ENABLE_MD5_VERIFY=
     -I./include \  
     %{optflags} \  
     openssl-thread-test.c \  
     -L. -lssl -lcrypto \  
     %{?_with_krb5:`krb5-config --libs`} \  
     -lpthread -lz -ldl  
217    
218  ./openssl-thread-test --threads %{thread_test_threads}  make test
219    
220  %install  patch -p1 < %{PATCH31}
 %makeinstall \  
     INSTALL_PREFIX=%{buildroot} \  
     MANDIR=%{_mandir} \  
     build-shared  
221    
222  install -d -m 755 %{buildroot}%{_libdir}/openssl/%{version}  %install
223  mv %{buildroot}%{_libdir}/engines %{buildroot}%{_libdir}/openssl/%{version}  %make_install
224    
225  # make the rootcerts dir  # make the rootcerts dir
226  install -d %{buildroot}%{_sysconfdir}/pki/tls/rootcerts  install -d %{buildroot}%{_sysconfdir}/pki/tls/rootcerts
227    
228  # Install a makefile for generating keys and self-signed certs, and a script  # Install a makefile for generating keys and self-signed certs, and a script
229  # for generating them on the fly.  # for generating them on the fly.
230  install -d %{buildroot}%{_sysconfdir}/pki/tls/certs  mkdir -p %{buildroot}%{_sysconfdir}/pki/tls/certs
231  install -m0644 Makefile.certificate %{buildroot}%{_sysconfdir}/pki/tls/certs/Makefile  install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pki/tls/certs/Makefile
232  install -m0755 make-dummy-cert %{buildroot}%{_sysconfdir}/pki/tls/certs/make-dummy-cert  install -m 755 %{SOURCE6} %{buildroot}%{_bindir}/make-dummy-cert
233    install -m 755 %{SOURCE7} %{buildroot}%{_bindir}/renew-dummy-cert
234  # Pick a CA script.  
235  mv %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.sh %{buildroot}%{_sysconfdir}/pki/tls/misc/CA  # Move runable perl scripts to bindir
236    mv %{buildroot}%{_sysconfdir}/pki/tls/misc/*.pl %{buildroot}%{_bindir}
237    mv %{buildroot}%{_sysconfdir}/pki/tls/misc/tsget %{buildroot}%{_bindir}
238    
239  install -d %{buildroot}%{_sysconfdir}/pki/CA  install -d %{buildroot}%{_sysconfdir}/pki/CA
240  install -d %{buildroot}%{_sysconfdir}/pki/CA/private  install -d %{buildroot}%{_sysconfdir}/pki/CA/private
241    install -d %{buildroot}%{_sysconfdir}/pki/CA/certs
242  # openssl was named ssleay in "ancient" times.  install -d %{buildroot}%{_sysconfdir}/pki/CA/crl
243  ln -snf openssl %{buildroot}%{_bindir}/ssleay  install -d %{buildroot}%{_sysconfdir}/pki/CA/newcerts
244    
245  # The man pages rand.3 and passwd.1 conflict with other packages  rm -f $RPM_BUILD_ROOT%{_sysconfdir}/pki/tls/openssl.cnf.dist
246  # Rename them to ssl-* and also make a symlink from openssl-* to ssl-*  
247  mv %{buildroot}%{_mandir}/man1/passwd.1 %{buildroot}%{_mandir}/man1/ssl-passwd.1  # fix man pages conflicts with other packages
248  ln -sf ssl-passwd.1%{_extension} %{buildroot}%{_mandir}/man1/openssl-passwd.1%{_extension}  for i in passwd rand ; do
249        mv %{buildroot}%{_mandir}/man1/$i.1 %{buildroot}%{_mandir}/man1/ssl-$i.1
 for i in rand err; do  
     mv %{buildroot}%{_mandir}/man3/$i.3 %{buildroot}%{_mandir}/man3/ssl-$i.3  
     ln -snf ssl-$i.3%{_extension} %{buildroot}%{_mandir}/man3/openssl-$i.3%{_extension}  
250  done  done
251    
 rm -rf {main,devel}-doc-info  
 mkdir -p {main,devel}-doc-info  
 cat > main-doc-info/README.mga <<EOF  
 Warning:  
 The man page of passwd, passwd.1, has been renamed to ssl-passwd.1  
 to avoid a conflict with passwd.1 man page from the package passwd.  
 EOF  
   
 cat > devel-doc-info/README.mga <<EOF  
 Warning:  
 The man page of rand, rand.3, has been renamed to ssl-rand.3  
 to avoid a conflict with rand.3 from the package man-pages  
 The man page of err, err.3, has been renamed to ssl-err.3  
 to avoid a conflict with err.3 from the package man-pages  
 EOF  
   
 chmod 755 %{buildroot}%{_libdir}/pkgconfig  
   
252  %multiarch_includes %{buildroot}%{_includedir}/openssl/opensslconf.h  %multiarch_includes %{buildroot}%{_includedir}/openssl/opensslconf.h
253    
 # strip cannot touch these unless 755  
 chmod 755 %{buildroot}%{_libdir}/openssl/%{version}/engines/*.so*  
 chmod 755 %{buildroot}%{_libdir}/*.so*  
 chmod 755 %{buildroot}%{_bindir}/*  
   
 # nuke a mistake  
 rm -f %{buildroot}%{_mandir}/man3/.3  
   
254  # nuke rpath  # nuke rpath
255  chrpath -d %{buildroot}%{_bindir}/openssl  chrpath -d %{buildroot}%{_bindir}/openssl
256    
257  # Fix libdir.  # Fix libdir.
258  pushd %{buildroot}%{_libdir}/pkgconfig  for i in %{buildroot}%{_libdir}/pkgconfig/*.pc; do
259      for i in *.pc ; do          sed -i 's,^libdir=${exec_prefix}/lib$,libdir=${exec_prefix}/%{_lib},g' $i
260          sed 's,^libdir=${exec_prefix}/lib$,libdir=${exec_prefix}/%{_lib},g' \  done
             $i >$i.tmp && \  
             cat $i.tmp >$i && \  
             rm -f $i.tmp  
     done  
 popd  
261    
262  # adjust ssldir  # adjust ssldir
263  perl -pi -e "s|^CATOP=.*|CATOP=%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA  perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_sysconfdir}/pki/tls\";|g" %{buildroot}%{_bindir}/CA.pl
 perl -pi -e "s|^\\\$CATOP\=\".*|\\\$CATOP\=\"%{_sysconfdir}/pki/tls\";|g" %{buildroot}%{_sysconfdir}/pki/tls/misc/CA.pl  
264  perl -pi -e "s|\./demoCA|%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/openssl.cnf  perl -pi -e "s|\./demoCA|%{_sysconfdir}/pki/tls|g" %{buildroot}%{_sysconfdir}/pki/tls/openssl.cnf
265    
266  %files  %files
267  %doc FAQ INSTALL LICENSE NEWS PROBLEMS main-doc-info/README*  %doc FAQ INSTALL LICENSE NEWS README*
 %doc README README.ASN1 README.ENGINE  
268  %dir %{_sysconfdir}/pki  %dir %{_sysconfdir}/pki
 %dir %{_sysconfdir}/pki/CA  
 %dir %{_sysconfdir}/pki/CA/private  
269  %dir %{_sysconfdir}/pki/tls  %dir %{_sysconfdir}/pki/tls
270  %dir %{_sysconfdir}/pki/tls/certs  %dir %{_sysconfdir}/pki/tls/certs
271  %dir %{_sysconfdir}/pki/tls/misc  %dir %{_sysconfdir}/pki/tls/misc
272  %dir %{_sysconfdir}/pki/tls/private  %dir %{_sysconfdir}/pki/tls/private
273  %dir %{_sysconfdir}/pki/tls/rootcerts  %dir %{_sysconfdir}/pki/tls/rootcerts
 %{_sysconfdir}/pki/tls/misc/CA  
 %{_sysconfdir}/pki/tls/misc/c_*  
274  %config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf  %config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf
 %{_sysconfdir}/pki/tls/certs/make-dummy-cert  
275  %{_sysconfdir}/pki/tls/certs/Makefile  %{_sysconfdir}/pki/tls/certs/Makefile
276  %{_bindir}/*  %{_bindir}/make-dummy-cert
277  %exclude %{_bindir}/c_rehash  %{_bindir}/renew-dummy-cert
278    %{_bindir}/openssl
279  %{_mandir}/man[157]/*  %{_mandir}/man[157]/*
280    %exclude %{_mandir}/man1*/c_rehash*
281    %exclude %{_mandir}/man1*/*.pl*
282    %exclude %{_mandir}/man1*/tsget*
283    
284  %files -n %{libname}  %files -n %{libname}
285  %doc FAQ INSTALL LICENSE NEWS PROBLEMS README*  %doc FAQ LICENSE NEWS README*
286  %{_libdir}/lib*.so.%{maj}  %{_libdir}/lib*.so.%{maj}
287    %{_libdir}/engines-%{maj}
 %files -n %{engines_name}  
 %{_libdir}/openssl  
288    
289  %files -n %{develname}  %files -n %{develname}
290  %doc CHANGES doc/* devel-doc-info/README*  %doc CHANGES doc/*
291  %dir %{_includedir}/openssl  %dir %{_includedir}/openssl
292  %multiarch %{multiarch_includedir}/openssl/opensslconf.h  %multiarch %{multiarch_includedir}/openssl/opensslconf.h
293  %{_includedir}/openssl/*  %{_includedir}/openssl
294  %{_libdir}/lib*.so  %{_libdir}/lib*.so
295  %{_mandir}/man3/*  %{_mandir}/man3/*
296  %{_libdir}/pkgconfig/*  %{_libdir}/pkgconfig/*.pc
297    
298  %files -n %{staticname}  %files -n %{staticname}
299  %{_libdir}/lib*.a  %{_libdir}/lib*.a
300    
301  %files perl  %files perl
302  %defattr(-,root,root)  %{_bindir}/c_rehash
303  %attr(0755,root,root) %{_bindir}/c_rehash  %{_bindir}/*.pl
304  %attr(0644,root,root) %{_mandir}/man1*/*.pl*  %{_bindir}/tsget
305  %{_sysconfdir}/pki/tls/misc/*.pl  %{_mandir}/man1*/c_rehash*
306  %{_sysconfdir}/pki/tls/misc/tsget  %{_mandir}/man1*/*.pl*
307    %{_mandir}/man1*/tsget*
308    %dir %{_sysconfdir}/pki/CA
309    %dir %{_sysconfdir}/pki/CA/private
310    %dir %{_sysconfdir}/pki/CA/certs
311    %dir %{_sysconfdir}/pki/CA/crl
312    %dir %{_sysconfdir}/pki/CA/newcerts

Legend:
Removed from v.1132889  
changed lines
  Added in v.1133938

  ViewVC Help
Powered by ViewVC 1.1.30