Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37823811
en ru br
Репозитории ALT
3.0: 0.9.7g-alt3
+updates:0.9.7g-alt4.M30.1
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: openssl

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Name: openssl
Version: 0.9.7g
Release: alt4.M30.1

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

Source: ftp://ftp.openssl.org/source/%name-%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

Provides: %_bindir/openssl-config
Provides: %openssldir
Provides: SSL
Conflicts: SSLeay
Requires: libssl = %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

BuildRequires: bc

%package -n libssl
Summary: OpenSSL shared libraries
Group: System/Libraries
Conflicts: openssl < 0.9.6c-alt2

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

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

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

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

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

%package doc
Summary: OpenSSL documentation and demos
Group: Development/C
Requires: %name = %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.

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

%description -n libssl
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 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

%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.

perl -pi -e "s/-O.(?: -fomit-frame-pointer)?(?: -m.86)?/${RPM_OPT_FLAGS} -Wa,--noexecstack/" \
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=
%add_optflags -fno-strict-aliasing
%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 %name.libs
grep -qw libssl %name.libs
grep -qw libcrypto %name.libs

# Remove fips fingerprint script.

rm %buildroot%_bindir/openssl_fips_fingerprint

# Install %name-config script.

install -pDm755 %_sourcedir/%name-config %buildroot%_bindir/%name-config
%__subst -p 's,%%version,%version,g;s,%%openssldir,%openssldir,g' \
%buildroot%_bindir/%name-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 %name.cnf from %%openssldir/ to %_sysconfdir/%name/.

mkdir -p %buildroot%_sysconfdir/%name
mv %buildroot%openssldir/%name.cnf %buildroot%_sysconfdir/%name/
ln -s `relative %_sysconfdir/%name/%name.cnf %openssldir/%name.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 %name %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/%name-%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 libssl -p %post_ldconfig_sys
%postun -n libssl -p %postun_ldconfig

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

%files -n libssl
/%_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
%_bindir/*
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/*.cnf
%dir %openssldir
%openssldir/*.cnf
%openssldir/misc
%openssldir/certs
%dir %attr(700,root,root) %openssldir/private
%_mandir/man[157]/*

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

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin