From c5cd5769eded07c2df394be35aad5948c59d0f972be5ddac1ca9487e9791ff9b Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 25 May 2010 08:32:24 +0000 Subject: [PATCH] Accepting request 40076 from Base:System Copy from Base:System/openssl based on submit request 40076 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/40076 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openssl?expand=0&rev=35 --- openssl-1.0.0-c_rehash-compat.diff | 46 ++++++++++++++++++++++++++++++ openssl.changes | 23 +++++++++++++++ openssl.spec | 41 ++++++++++++++++++-------- 3 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 openssl-1.0.0-c_rehash-compat.diff diff --git a/openssl-1.0.0-c_rehash-compat.diff b/openssl-1.0.0-c_rehash-compat.diff new file mode 100644 index 0000000..e423312 --- /dev/null +++ b/openssl-1.0.0-c_rehash-compat.diff @@ -0,0 +1,46 @@ +From 83f318d68bbdab1ca898c94576a838cc97df4700 Mon Sep 17 00:00:00 2001 +From: Ludwig Nussel +Date: Wed, 21 Apr 2010 15:52:10 +0200 +Subject: [PATCH] also create old hash for compatibility + +--- + tools/c_rehash.in | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/tools/c_rehash.in b/tools/c_rehash.in +index bfc4a69..f8d0ce1 100644 +--- a/tools/c_rehash.in ++++ b/tools/c_rehash.in +@@ -83,6 +83,7 @@ sub hash_dir { + next; + } + link_hash_cert($fname) if($cert); ++ link_hash_cert_old($fname) if($cert); + link_hash_crl($fname) if($crl); + } + } +@@ -116,8 +117,9 @@ sub check_file { + + sub link_hash_cert { + my $fname = $_[0]; ++ my $hashopt = $_[1] || '-subject_hash'; + $fname =~ s/'/'\\''/g; +- my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in "$fname"`; ++ my ($hash, $fprint) = `"$openssl" x509 $hashopt -fingerprint -noout -in "$fname"`; + chomp $hash; + chomp $fprint; + $fprint =~ s/^.*=//; +@@ -147,6 +149,10 @@ sub link_hash_cert { + $hashlist{$hash} = $fprint; + } + ++sub link_hash_cert_old { ++ link_hash_cert($_[0], '-subject_hash_old'); ++} ++ + # Same as above except for a CRL. CRL links are of the form .r + + sub link_hash_crl { +-- +1.6.4.2 + diff --git a/openssl.changes b/openssl.changes index 41c55de..700906f 100644 --- a/openssl.changes +++ b/openssl.changes @@ -1,8 +1,31 @@ +------------------------------------------------------------------- +Mon May 10 16:11:54 UTC 2010 - aj@suse.de + +- Do not compile in build time but use mtime of changes file instead. + This allows build-compare to identify that no changes have happened. + +------------------------------------------------------------------- +Tue May 4 02:55:52 UTC 2010 - gjhe@novell.com + +- build libopenssl to /%{_lib} dir,and keep only one + libopenssl-devel for new developping programs. + +------------------------------------------------------------------- +Tue Apr 27 05:44:32 UTC 2010 - gjhe@novell.com + +- build libopenssl and libopenssl-devel to a version directory + ------------------------------------------------------------------- Sat Apr 24 09:46:37 UTC 2010 - coolo@novell.com - buildrequire pkg-config to fix provides +------------------------------------------------------------------- +Wed Apr 21 13:54:15 UTC 2010 - lnussel@suse.de + +- also create old certificate hash in /etc/ssl/certs for + compatibility with applications that still link against 0.9.8 + ------------------------------------------------------------------- Mon Apr 12 16:12:08 CEST 2010 - meissner@suse.de diff --git a/openssl.spec b/openssl.spec index b84b1cd..c952a2c 100644 --- a/openssl.spec +++ b/openssl.spec @@ -21,7 +21,7 @@ Name: openssl BuildRequires: bc ed pkg-config zlib-devel %define ssletcdir %{_sysconfdir}/ssl -%define num_version %(echo "%{version}" | sed -e "s+[a-zA-Z]++g; s+_.*++g") +#%define num_version %(echo "%{version}" | sed -e "s+[a-zA-Z]++g; s+_.*++g") License: BSD3c(or similar) Group: Productivity/Networking/Security Provides: ssl @@ -32,13 +32,16 @@ Obsoletes: openssl-64bit %endif # Version: 1.0.0 -Release: 2 +Release: 3 Summary: Secure Sockets and Transport Layer Security Url: http://www.openssl.org/ Source: http://www.%{name}.org/source/%{name}-%{version}.tar.bz2 +# to get mtime of file: +Source1: openssl.changes Source2: baselibs.conf Source10: README.SuSE Patch0: merge_from_0.9.8k.patch +Patch1: openssl-1.0.0-c_rehash-compat.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -166,6 +169,7 @@ Authors: %prep %setup -q %patch0 -p1 +%patch1 -p1 cp -p %{S:10} . echo "adding/overwriting some entries in the 'table' hash in Configure" # $dso_scheme:$shared_target:$shared_cflag:$shared_ldflag:$shared_extension:$ranlib:$arflags @@ -197,6 +201,9 @@ wq EOF_ED # fix ENGINESDIR path sed -i 's,/lib/engines,/%_lib/engines,' Configure +# Record mtime of changes file instead of build time +CHANGES=`stat --format="%y" %SOURCE1` +sed -i -e "s|#define DATE \(.*\).LC_ALL.*date.|#define DATE \1$CHANGES|" crypto/Makefile %build ./config --test-sanity @@ -257,7 +264,7 @@ grep -B1 -A22 "^\*\*\* $PLATFORM$" TABLE rm -rf $RPM_BUILD_ROOT make MANDIR=%{_mandir} INSTALL_PREFIX=$RPM_BUILD_ROOT install # install standard root certificates -cp -pr certs/* $RPM_BUILD_ROOT/%{ssletcdir}/certs +cp -pr certs/* $RPM_BUILD_ROOT%{ssletcdir}/certs ln -sf ./%{name} $RPM_BUILD_ROOT/%{_includedir}/ssl mkdir $RPM_BUILD_ROOT/%{_datadir}/ssl mv $RPM_BUILD_ROOT/%{ssletcdir}/misc $RPM_BUILD_ROOT/%{_datadir}/ssl/ @@ -265,6 +272,7 @@ mv $RPM_BUILD_ROOT/%{ssletcdir}/misc $RPM_BUILD_ROOT/%{_datadir}/ssl/ # ln -s %{ssletcdir}/private $RPM_BUILD_ROOT/%{_datadir}/ssl/private # ln -s %{ssletcdir}/openssl.cnf $RPM_BUILD_ROOT/%{_datadir}/ssl/openssl.cnf # + # avoid file conflicts with man pages from other packages # pushd $RPM_BUILD_ROOT/%{_mandir} @@ -293,11 +301,11 @@ popd # # check wether some shared library has been installed # -ls -l $RPM_BUILD_ROOT/%{_libdir} -test -f $RPM_BUILD_ROOT/%{_libdir}/libssl.so.%{num_version} -test -f $RPM_BUILD_ROOT/%{_libdir}/libcrypto.so.%{num_version} -test -L $RPM_BUILD_ROOT/%{_libdir}/libssl.so -test -L $RPM_BUILD_ROOT/%{_libdir}/libcrypto.so +ls -l $RPM_BUILD_ROOT%{_libdir} +test -f $RPM_BUILD_ROOT%{_libdir}/libssl.so.%{version} +test -f $RPM_BUILD_ROOT%{_libdir}/libcrypto.so.%{version} +test -L $RPM_BUILD_ROOT%{_libdir}/libssl.so +test -L $RPM_BUILD_ROOT%{_libdir}/libcrypto.so # # see what we've got # @@ -333,6 +341,15 @@ cat AVAILABLE_CIPHERS # Do not install demo scripts executable under /usr/share/doc find demos -type f -perm /111 -exec chmod 644 {} \; +#process openssllib +mkdir $RPM_BUILD_ROOT/%{_lib} +mv $RPM_BUILD_ROOT%{_libdir}/libssl.so.%{version} $RPM_BUILD_ROOT/%{_lib}/ +mv $RPM_BUILD_ROOT%{_libdir}/libcrypto.so.%{version} $RPM_BUILD_ROOT/%{_lib}/ +mv $RPM_BUILD_ROOT%{_libdir}/engines $RPM_BUILD_ROOT/%{_lib}/ +cd $RPM_BUILD_ROOT%{_libdir}/ +ln -sf /%{_lib}/libssl.so.%{version} ./libssl.so +ln -sf /%{_lib}/libcrypto.so.%{version} ./libcrypto.so + %clean if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi @@ -344,9 +361,9 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi %files -n libopenssl1_0_0 %defattr(-, root, root) -%{_libdir}/libssl.so.%{num_version} -%{_libdir}/libcrypto.so.%{num_version} -%{_libdir}/engines +/%{_lib}/libssl.so.%{version} +/%{_lib}/libcrypto.so.%{version} +/%{_lib}/engines %files -n libopenssl-devel %defattr(-, root, root) @@ -354,8 +371,8 @@ if ! test -f /.buildenv; then rm -rf $RPM_BUILD_ROOT; fi %{_includedir}/ssl %{_libdir}/libcrypto.a %{_libdir}/libssl.a -%{_libdir}/libcrypto.so %{_libdir}/libssl.so +%{_libdir}/libcrypto.so %_libdir/pkgconfig/libcrypto.pc %_libdir/pkgconfig/libssl.pc %_libdir/pkgconfig/openssl.pc