Ignore:
Timestamp:
Jun 30, 2016, 3:43:42 PM (9 years ago)
Author:
Silvan Scherrer
Message:

spec: openssl update to version 1.0.2h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/openssl.spec

    r565 r818  
    1 # Note: this .spec is borrowed from openssl-1.0.0k-2.1.src.rpm
     1#define svn_url     e:/trees/openssl/trunk
     2%define svn_url     http://svn.netlabs.org/repos/ports/openssl/trunk
     3%define svn_rev     1637
     4
     5
     6# Note: this .spec is borrowed from:
     7# http://pkgs.fedoraproject.org/cgit/rpms/openssl.git/tree/openssl.spec
    28
    39# For the curious:
     
    1925# Arches on which we need to prevent arch conflicts on opensslconf.h, must
    2026# also be handled in opensslconf-new.h.
    21 %define multilib_arches %{ix86} ia64 ppc ppc64 s390 s390x sparcv9 sparc64 x86_64
     27%define multilib_arches %{ix86} ia64 %{mips} ppc %{power64} s390 s390x sparcv9 sparc64 x86_64
     28
     29%global _performance_build 1
    2230
    2331Summary: A general purpose cryptography library with TLS implementation
    2432Name: openssl
    25 Version: 1.0.0r
     33Version: 1.0.2h
    2634Release: 1%{?dist}
    27 
    28 #Source: openssl-%{version}.tar.gz
    2935
    3036License: OpenSSL
    3137Group: System Environment/Libraries
    3238URL: http://www.openssl.org/
     39
    3340BuildRoot: %{_tmppath}/%{name}-%{version}-root
    3441BuildRequires: coreutils, perl, sed, zlib-devel, diffutils
    35 # krb5-devel
    36 Requires: coreutils, ca-certificates
    37 
    38 %define svn_url     http://svn.netlabs.org/repos/ports/openssl/branches/1.0.0
    39 %define svn_rev     1133
     42BuildRequires: gcc, make, subversion, zip
     43#BuildRequires: krb5-devel, perl-generators,
     44#BuildRequires: lksctp-tools-devel
     45#BuildRequires: /usr/bin/pod2man
     46
     47Requires: coreutils
     48Requires: %{name}-libs = %{version}-%{release}
    4049
    4150Source: %{name}-%{version}-r%{svn_rev}.zip
    42 
    43 BuildRequires: gcc make subversion zip
    4451
    4552%description
     
    4956protocols.
    5057
     58%package libs
     59Summary: A general purpose cryptography library with TLS implementation
     60Group: System Environment/Libraries
     61Requires: ca-certificates >= 2008-5
     62#Requires: crypto-policies
     63# Needed obsoletes due to the base/lib subpackage split
     64Obsoletes: openssl < 1.0.1-0.3.beta3
     65Obsoletes: openssl-fips < 1.0.1e-28
     66Provides: openssl-fips = %{version}-%{release}
     67
     68%description libs
     69OpenSSL is a toolkit for supporting cryptography. The openssl-libs
     70package contains the libraries that are used by various applications which
     71support cryptographic algorithms and protocols.
     72
    5173%package devel
    5274Summary: Files for development of applications which will use OpenSSL
    5375Group: Development/Libraries
    54 Requires: %{name} = %{version}-%{release}, zlib-devel
     76Requires: %{name}-libs = %{version}-%{release}
     77Requires: zlib-devel
     78#Requires: krb5-devel
    5579Requires: pkgconfig
    5680
     
    82106from other formats to the formats used by the OpenSSL toolkit.
    83107
     108
    84109%prep
    85 %if %(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')
     110%if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
    86111%setup -q
    87112%else
    88113%setup -n "%{name}-%{version}" -Tc
    89 # we can't use svn export since it fails on symlinks (OS/2 bug in at least SVN 1.6.16), emulate with checkout
    90 #svn export -r %{svn_rev} %{svn_url} . --force
    91 svn checkout -r %{svn_rev} %{svn_url} .
    92 find . -type d -path "*/.svn" -exec rm -rf "{}" +
    93 rm -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip"
    94 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" "%{name}-%{version}")
     114svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
     115rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
     116(cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
    95117%endif
     118
     119sed -i 's/SHLIB_VERSION_NUMBER "1.0.0"/SHLIB_VERSION_NUMBER "%{version}"/' crypto/opensslv.h
    96120
    97121# Modify the various perl scripts to reference perl in the right location.
     
    99123
    100124# Generate a table with the compile settings for my perusal.
    101 touch Makefile
    102 make TABLE PERL=%{__perl}
     125# This part is not really necessary, as it gains nothing
     126#touch Makefile
     127#make TABLE PERL=%{__perl}
    103128
    104129%build
     
    115140
    116141./Configure \
    117         --prefix=%{_usr} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
     142        --prefix=%{_prefix} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
    118143        zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
    119         enable-cms enable-md2 experimental-jpake \
    120         shared ${sslarch}
    121 
    122 # Original Fedora's openssl-1.0.0k-2.1 flags:
    123 #       zlib enable-camellia enable-seed enable-tlsext enable-rfc3779 \
    124 #       enable-cms enable-md2 no-idea experimental-jpake \
     144        enable-cms enable-md2 enable-rc5 experimental-jpake \
     145        no-mdc2 no-ec2m no-gost no-srp \
     146        shared  ${sslarch}
     147
     148# Original Fedora's openssl-1.0.2h flags:
     149#       --prefix=%{_prefix} --openssldir=%{_sysconfdir}/pki/tls ${sslflags} \
     150#       --system-ciphers-file=%{_sysconfdir}/crypto-policies/back-ends/openssl.config \
     151#       zlib sctp enable-camellia enable-seed enable-tlsext enable-rfc3779 \
     152#       enable-cms enable-md2 enable-rc5 \
     153#       no-mdc2 no-ec2m no-gost no-srp \
    125154#       --with-krb5-flavor=MIT --enginesdir=%{_libdir}/openssl/engines \
    126155#       --with-krb5-dir=/usr shared  ${sslarch} %{?!nofips:fips}
     
    128157# Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
    129158# marked as not requiring an executable stack.
    130 #RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack"
     159# Also add -DPURIFY to make using valgrind with openssl easier as we do not
     160# want to depend on the uninitialized memory as a source of entropy anyway.
     161#RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wa,--noexecstack -DPURIFY"
    131162make depend
    132 # YD smp build not supported
    133163make all
    134164
     
    136166make rehash
    137167
    138 # Overwrite FIPS README
    139 #cp -f %{SOURCE11} .
     168# Clean up the .pc files
     169for i in libcrypto.pc libssl.pc openssl.pc ; do
     170  sed -i '/^Libs.private:/{s/-L[^ ]* //;s/-Wl[^ ]* //}' $i
     171done
    140172
    141173%check
    142174# Verify that what was compiled actually works.
    143175
    144 # We must revert patch33 before tests otherwise they will fail
    145 #patch -p1 -R < %{PATCH33}
    146 
    147 #LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
    148 #export LD_LIBRARY_PATH
     176#OPENSSL_ENABLE_MD5_VERIFY=
     177#export OPENSSL_ENABLE_MD5_VERIFY
     178# this need to be set, as else it might use a already loaded one
     179#export LIBPATHSTRICT=T
     180#export BEGINLIBPATH=%{_builddir}/%{buildsubdir}
     181# tests are still disabled, as one is still falling
    149182#make -C test apps tests
    150183#%{__cc} -o openssl-thread-test \
     
    170203#%{nil}
    171204
     205%define __provides_exclude_from %{_libdir}/openssl
     206
    172207%install
    173208[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
     
    196231#rename so.%{soversion} so.%{version} $RPM_BUILD_ROOT%{_libdir}/*.so.%{soversion}
    197232#mkdir $RPM_BUILD_ROOT/%{_lib}
    198 #mv $RPM_BUILD_ROOT%{_libdir}/libcrypto.so.%{version} $RPM_BUILD_ROOT/%{_lib}
    199233#for lib in $RPM_BUILD_ROOT%{_libdir}/*.so.%{version} ; do
    200234#       chmod 755 ${lib}
    201235#       ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}`
    202236#       ln -s -f `basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}`.%{soversion}
    203 #done
    204 #for lib in $RPM_BUILD_ROOT/%{_lib}/*.so.%{version} ; do
    205 #       chmod 755 ${lib}
    206 #       ln -s -f ../../%{_lib}/`basename ${lib}` $RPM_BUILD_ROOT%{_libdir}/`basename ${lib} .%{version}`
    207 #       ln -s -f `basename ${lib}` $RPM_BUILD_ROOT/%{_lib}/`basename ${lib} .%{version}`.%{soversion}
    208237#done
    209238
     
    223252# Rename man pages so that they don't conflict with other system man pages.
    224253#pushd $RPM_BUILD_ROOT%{_mandir}
    225 for manpage in $RPM_BUILD_ROOT%{_mandir}/man*/* ; do
     254pwd_save=`pwd`
     255cd $RPM_BUILD_ROOT%{_mandir}
     256ln -s -f config.5 man5/openssl.cnf.5
     257for manpage in man*/* ; do
    226258        if [ -L ${manpage} ]; then
    227259                TARGET=`ls -l ${manpage} | awk '{ print $NF }'`
     
    236268#done
    237269#popd
     270cd $pwd_save
    238271
    239272# Pick a CA script.
     
    276309%files
    277310%defattr(-,root,root)
    278 %doc FAQ LICENSE CHANGES NEWS INSTALL README
    279 %doc doc/c-indentation.el doc/openssl.txt
    280 %doc doc/openssl_button.html doc/openssl_button.gif
    281 %doc doc/ssleay.txt
     311%doc LICENSE
     312%doc FAQ NEWS README
    282313#%doc README.FIPS
    283 %dir %{_sysconfdir}/pki/tls
    284 %dir %{_sysconfdir}/pki/tls/certs
    285314#%{_sysconfdir}/pki/tls/certs/make-dummy-cert
     315#%{_sysconfdir}/pki/tls/certs/renew-dummy-cert
    286316#%{_sysconfdir}/pki/tls/certs/Makefile
    287 %dir %{_sysconfdir}/pki/tls/misc
    288317%{_sysconfdir}/pki/tls/misc/CA
    289318%dir %{_sysconfdir}/pki/CA
     
    293322%dir %{_sysconfdir}/pki/CA/newcerts
    294323%{_sysconfdir}/pki/tls/misc/c_*
    295 %{_sysconfdir}/pki/tls/private
    296 
    297 %config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf
    298 
    299324%attr(0755,root,root) %{_bindir}/openssl.exe
    300 %attr(0755,root,root) %{_libdir}/crypto%{soversion}.dll
    301 %attr(0755,root,root) %{_libdir}/ssl%{soversion}.dll
    302 #%attr(0644,root,root) /%{_lib}/.libcrypto.so.*.hmac
    303 #%attr(0644,root,root) %{_libdir}/.libssl.so.*.hmac
    304 %attr(0755,root,root) %{_libdir}/openssl
    305325%attr(0644,root,root) %{_mandir}/man1*/[ABD-Zabcd-z]*
    306326%attr(0644,root,root) %{_mandir}/man5*/*
    307327%attr(0644,root,root) %{_mandir}/man7*/*
    308328
     329
     330%files libs
     331%defattr(-,root,root)
     332%doc LICENSE
     333%dir %{_sysconfdir}/pki/tls
     334%dir %{_sysconfdir}/pki/tls/certs
     335%dir %{_sysconfdir}/pki/tls/misc
     336%dir %{_sysconfdir}/pki/tls/private
     337%config(noreplace) %{_sysconfdir}/pki/tls/openssl.cnf
     338%attr(0755,root,root) %{_libdir}/crypto%{soversion}.dll
     339%attr(0755,root,root) %{_libdir}/ssl%{soversion}.dll
     340#%attr(0644,root,root) %{_libdir}/.libcrypto.so.*.hmac
     341#%attr(0644,root,root) %{_libdir}/.libssl.so.*.hmac
     342%attr(0755,root,root) %{_libdir}/openssl
     343
     344
    309345%files devel
    310346%defattr(-,root,root)
     347%doc doc/c-indentation.el doc/openssl.txt CHANGES
    311348%{_prefix}/include/openssl
    312349%attr(0755,root,root) %{_libdir}/lib*.a
     
    314351%attr(0644,root,root) %{_libdir}/pkgconfig/*.pc
    315352
     353
    316354%files static
    317355%defattr(-,root,root)
     
    326364
    327365%changelog
     366* Wed Jun 29 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.0.2h-1
     367- Update to version 1.0.2h.
     368
    328369* Fri Apr 3 2015 Dmitriy Kuminov <coding@dmik.org> 1.0.0r-1
    329370- Update to version 1.0.0r.
Note: See TracChangeset for help on using the changeset viewer.