Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37593136
en ru br
ALT Linux repos
5.0: 0.9.7g-alt6
4.1: 0.9.7g-alt6
4.0: 0.9.7g-alt6

Group :: System/Base
RPM: openssl097

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: openssl097
Version: 0.9.7g
Release: alt6

Summary: OpenSSL - Secure Sockets Layer and cryptography shared libraries and tools
License: distributable
Group: System/Base
Url: http://www.openssl.org
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source: ftp://ftp.openssl.org/source/openssl-%version.tar
Source1: openssl-config
Source2: Makefile.certificate
Source3: make-dummy-cert
Source4: ts-20050508-0_9_7g-ChangeLog

Patch0: http://www.opentsa.org/ts/ts-20050508-0_9_7g-patch
Patch1: openssl-0.9.7g-owl-alt-issetugid.patch
Patch2: openssl-0.9.7g-mdk-alt-makefile.patch
Patch3: openssl-0.9.7g-alt-config.patch

Patch11: openssl-0.9.7g-rh-alt-soversion.patch
Patch12: openssl-0.9.7g-rh-mdk-ia64-asm.patch
Patch13: openssl-0.9.7g-rh-version-engines.patch
Patch14: openssl-0.9.7g-up-rh-fixes.patch
Patch15: openssl-0.9.7g-rh-consttime.patch
Patch16: openssl-0.9.7g-owl-warnings.patch

Patch21: openssl-0.9.7g-up-SSL_OP_MSIE_SSLV2_RSA_PADDING.patch
Patch22: openssl-0.9.7g-cvs-20060904-CVE-2006-4339.patch
Patch23: openssl-0.9.7g-up-CVE-2006-2937.patch
Patch24: openssl-0.9.7g-up-suse-CVE-2006-2940.patch
Patch25: openssl-0.9.7g-google-CVE-2006-3738.patch
Patch26: openssl-0.9.7g-google-CVE-2006-4343.patch

%define openssldir %_localstatedir/ssl
%define old_openssldir %_libdir/ssl
%def_enable compat
# Do not build with TSA patch by default
%def_without tsa

BuildRequires: bc

%package -n libssl4
Summary: OpenSSL shared libraries
Group: System/Libraries
Provides: libssl = %version-%release
Obsoletes: libssl < 0:%version-%release
Conflicts: openssl < 0:0.9.6c-alt2

%{?_with_tsa:Provides: openssl-tsa = %version-%release}

%package -n libssl-devel
Summary: OpenSSL include files and development libraries
Group: Development/C
Provides: %_bindir/openssl-config
Provides: openssl-devel = %version-%release
Obsoletes: openssl-devel
Requires: libssl4 = %version-%release
# manpage clash: crypto(3).
Conflicts: erlang <= 0:R9C.0-alt2

%{?_with_tsa:Provides: openssl-tsa-devel = %version-%release}

%package -n libssl-devel-static
Summary: OpenSSL static libraries
Group: Development/C
Provides: openssl-devel-static = %version-%release
Obsoletes: openssl-devel-static
Requires: libssl-devel = %version-%release

%{?_with_tsa:Provides: openssl-tsa-devel-static = %version-%release}

%package -n openssl
Summary: OpenSSL tools
Group: System/Base
Provides: %_bindir/openssl-config
Provides: %openssldir
Provides: SSL
Conflicts: SSLeay
Requires: libssl4 = %version-%release
%if_with tsa
Requires: perl-WWW-Curl
Provides: tsa-server = %version-%release
Provides: tsa-client = %version-%release
Requires: libssl-tsa = %version-%release
%endif

%package -n openssl-doc
Summary: OpenSSL documentation and demos
Group: Development/C
Requires: openssl = %version-%release

%description
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

%description -n libssl4
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the OpenSSL shared libraries.

%description -n libssl-devel
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the the OpenSSL cryptography and SSL/TLS
include files and development libraries required when building
OpenSSL-based applications.

%description -n libssl-devel-static
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the the OpenSSL cryptography and SSL/TLS
static libraries required when developing OpenSSL-based statically
linked applications.

%description -n openssl
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the base OpenSSL cryptography and SSL/TLS tools.

%description -n openssl-doc
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols with full-strength cryptography world-wide.  The project is
managed by a worldwide community of volunteers that use the Internet to
communicate, plan, and develop the OpenSSL tookit and its related
documentation.

OpenSSL is based on the excellent SSLeay library developed from Eric A.
Young and Tim J. Hudson.  The OpenSSL toolkit is licensed under an
Apache-style licence, which basically means that you are free to get and
use it for commercial and non-commercial purposes.

This package contains the the OpenSSL cryptography and SSL/TLS extra
documentation and demos required when developing applications.

%prep
%setup -q -n openssl-%version

%if_with tsa
%patch0 -p1
%endif #with tsa

%patch1 -p1
%patch2 -p1
%patch3 -p1

%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1

%patch21 -p0
%patch22 -p0
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1

find -type f -name \*.orig -delete -print

# Avoid conflict with pow10(3).

%__subst s/pow10/pow10i/ crypto/bio/b_print.c

# Correct shared library name.

%__subst 's/\\\$(SHLIB_MAJOR)\.\\\$(SHLIB_MINOR)/\\$(VERSION)/g' Configure
%__subst 's/\${SHLIB_MAJOR}\.\${SHLIB_MINOR}/\${VERSION}/g' Makefile.org

# Correct compilation options.

%add_optflags -fno-strict-aliasing -Wa,--noexecstack
%__subst 's/-O\([0-9s]\>\)\?\( -fomit-frame-pointer\)\?\( -m.86\)\?/%optflags/' \
Configure

# Save timestamp during copy.

find -type f -name Makefile\* -print0 |
xargs -r0 grep -FZl 'cp $$' -- |
xargs -r0 %__subst -p 's/cp \$\$/cp -pv $$/g' --

%build
ADD_ARGS=
%ifarch %ix86
ADD_ARGS=linux-elf
%ifarch i386
ADD_ARGS="$ADD_ARGS 386"
%endif
%endif
%ifarch x86_64
ADD_ARGS='no-asm linux-x86_64'
%endif
%ifarch ppc
ADD_ARGS=linux-ppc
%endif
%ifarch alpha alphaev5
ADD_ARGS=linux-alpha-gcc
%endif
%ifarch alphaev56 alphapca56 alphaev6 alphaev67
ADD_ARGS=linux-alpha+bwx-gcc
%endif
%ifarch sparc
ADD_ARGS=linux-sparcv8
%endif
%ifarch sparcv9
ADD_ARGS=linux-sparcv9
%endif

./Configure shared -DSSL_ALLOW_ADH --prefix=%prefix --openssldir=%openssldir $ADD_ARGS

# SMP-incompatible build.

%__make SLIB=%_lib
touch -r libcrypto.so.%version libcrypto-stamp
touch -r libssl.so.%version libssl-stamp
LD_LIBRARY_PATH=`pwd` %__make rehash
LD_LIBRARY_PATH=`pwd` %__make test

%install
# The make_install macro doesn't work here.
%__make install \
SLIB=%_lib \
INSTALL_PREFIX=%buildroot \
MANDIR=%_mandir

# Fail if one of shared libraries was rebuit.

if [ libcrypto.so.%version -nt libcrypto-stamp -o \
    libssl.so.%version -nt libssl-stamp ]; then
echo 'Shared library was rebuilt by "make install".'
exit 1
fi

# Fail if the openssl binary is statically linked against OpenSSL at this

# stage (which could happen if "make install" caused anything to rebuild).
LD_LIBRARY_PATH=`pwd` ldd %buildroot%_bindir/openssl |tee openssl.libs
grep -qw libssl openssl.libs
grep -qw libcrypto openssl.libs

# Remove fips fingerprint script.

rm %buildroot%_bindir/openssl_fips_fingerprint

# Install openssl-config script.

install -pDm755 %_sourcedir/openssl-config %buildroot%_bindir/openssl-config
%__subst -p 's,%%version,%version,g;s,%%openssldir,%openssldir,g' \
%buildroot%_bindir/openssl-config

# Relocate shared libraries from %_libdir/ to /lib/.

mkdir -p %buildroot/%_lib
for f in %buildroot%_libdir/*.so; do
t=`objdump -p "$f" |awk '/SONAME/ {print $2}'`
[ -n "$t" ]
ln -snf ../../%_lib/"$t" "$f"
done
mv %buildroot%_libdir/*.so.* %buildroot/%_lib/

# Relocate openssl.cnf from %%openssldir/ to %_sysconfdir/openssl/.

mkdir -p %buildroot%_sysconfdir/openssl
mv %buildroot%openssldir/openssl.cnf %buildroot%_sysconfdir/openssl/
ln -s `relative %_sysconfdir/openssl/openssl.cnf %openssldir/openssl.cnf` %buildroot%openssldir/

# Rename some man pages, fix references.

for f in passwd.1 err.3 rand.3 threads.3 config.5; do
name="${f%%.*}"
sect="${f##*.}"
NAME=`printf %%s "$name" |tr '[:lower:]' '[:upper:]'`
%__subst "s/\\<$NAME $sect\\>/SSL&/" %buildroot%_mandir/man"$sect/$f"
mv -v %buildroot%_mandir/man"$sect"/{,ssl}"$f"
find %buildroot%_mandir -type f -print0 |
xargs -r0 grep -FZl "\\fI$name\\fR\\|($sect)" -- |
xargs -r0 %__subst -p "s/\\\\fI$name\\\\fR\\\\|($sect)/\\\\fIssl$name\\\\fR\\\\|($sect)/" --
find %buildroot%_mandir -type l |while read link; do
[ "$(readlink -n "$link")" = "$f" ] || continue
ln -sfv "ssl$f" "$link"
done
done
ln -s sslconfig.5 %buildroot%_mandir/man5/openssl.cnf.5

# Make backwards-compatibility symlink to ssleay.

ln -snf openssl %buildroot%_bindir/ssleay

# Install a makefile for generating keys and self-signed certs,

# and a script for generating them on the fly.
install -pDm644 %_sourcedir/Makefile.certificate %buildroot%openssldir/certs/Makefile
install -pDm644 %_sourcedir/make-dummy-cert %buildroot%openssldir/certs/make-dummy-cert

# Install standard root certificates.

cp -pr certs/* %buildroot%openssldir/certs

mv %buildroot%openssldir/misc/CA{.sh,}

%define docdir %_docdir/openssl-%version
mkdir -p %buildroot%docdir
%if_with tsa
install -pm644 %_sourcedir/ts-20050508-0_9_7g-ChangeLog %buildroot%docdir/TSA-Changelog
%endif #with tsa
install -pm644 CHANGES* LICENSE NEWS README* %buildroot%docdir/
bzip2 -9 %buildroot%docdir/CHANGES*
cp -a demos doc %buildroot%docdir/
rm -rf %buildroot%docdir/doc/{apps,crypto,ssl}

%post -n libssl4 -p %post_ldconfig_sys
%postun -n libssl4 -p %postun_ldconfig

%if_enabled compat
%pre -n openssl
[ $1 -gt 1 ] || exit 0
if [ ! -e %_sysconfdir/openssl -a ! -L %_sysconfdir/openssl -a -e %old_openssldir/openssl.cnf ]; then
%__mkdir_p %_sysconfdir/openssl &&
%__cp -a %old_openssldir/openssl.cnf %_sysconfdir/openssl/
fi
if [ ! -e %openssldir -a ! -L %openssldir -a -d %old_openssldir ]; then
%__cp -a %old_openssldir %openssldir
fi
%endif #compat

%files -n libssl4
/%_lib/*
%dir %docdir
%docdir/[A-Z]*

%files -n libssl-devel
%_bindir/openssl-config
%_libdir/*.so
%_libdir/pkgconfig/*
%_includedir/*

%files -n libssl-devel-static
%_libdir/*.a

%files -n openssl
%_bindir/*
%dir %_sysconfdir/openssl
%config(noreplace) %_sysconfdir/openssl/*.cnf
%dir %openssldir
%openssldir/*.cnf
%openssldir/misc
%openssldir/certs
%dir %attr(700,root,root) %openssldir/private
%_mandir/man[157]/*

%files -n openssl-doc
%dir %docdir
%docdir/[a-z]*
%_man3dir/*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin