Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/openssl: ChangeLog openssl-1.0.0a-r3.ebuild
Date: Fri, 20 Aug 2010 17:57:06
Message-Id: 20100820175702.C454A2004C@flycatcher.gentoo.org
1 vapier 10/08/20 17:57:02
2
3 Modified: ChangeLog
4 Added: openssl-1.0.0a-r3.ebuild
5 Log:
6 Revbump to revert USE=sslv2 screw up, and add epatch_user to accommodate random needs (historical, new divers, etc...) #332661.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.347 dev-libs/openssl/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.347&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.347&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.346&r2=1.347
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
19 retrieving revision 1.346
20 retrieving revision 1.347
21 diff -u -r1.346 -r1.347
22 --- ChangeLog 20 Aug 2010 09:59:13 -0000 1.346
23 +++ ChangeLog 20 Aug 2010 17:57:02 -0000 1.347
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-libs/openssl
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.346 2010/08/20 09:59:13 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.347 2010/08/20 17:57:02 vapier Exp $
29 +
30 +*openssl-1.0.0a-r3 (20 Aug 2010)
31 +
32 + 20 Aug 2010; Mike Frysinger <vapier@g.o> +openssl-1.0.0a-r3.ebuild:
33 + Revbump to revert USE=sslv2 screw up, and add epatch_user to accommodate
34 + random needs (historical, new divers, etc...) #332661.
35
36 20 Aug 2010; Mike Frysinger <vapier@g.o> openssl-1.0.0a-r2.ebuild,
37 metadata.xml:
38
39
40
41 1.1 dev-libs/openssl/openssl-1.0.0a-r3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0a-r3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0a-r3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: openssl-1.0.0a-r3.ebuild
47 ===================================================================
48 # Copyright 1999-2010 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.0a-r3.ebuild,v 1.1 2010/08/20 17:57:02 vapier Exp $
51
52 inherit eutils flag-o-matic toolchain-funcs
53
54 DESCRIPTION="full-strength general purpose cryptography library (including SSL v2/v3 and TLS v1)"
55 HOMEPAGE="http://www.openssl.org/"
56 SRC_URI="mirror://openssl/source/${P}.tar.gz
57 http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/~checkout~/packages/${PN}/${PN}-c_rehash.sh?rev=1.7"
58
59 LICENSE="openssl"
60 SLOT="0"
61 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
62 IUSE="bindist gmp kerberos rfc3779 sse2 test zlib"
63
64 RDEPEND="gmp? ( dev-libs/gmp )
65 zlib? ( sys-libs/zlib )
66 kerberos? ( app-crypt/mit-krb5 )"
67 DEPEND="${RDEPEND}
68 sys-apps/diffutils
69 >=dev-lang/perl-5
70 test? ( sys-devel/bc )"
71 PDEPEND="app-misc/ca-certificates"
72
73 src_unpack() {
74 unpack ${P}.tar.gz
75 cp "${DISTDIR}"/openssl-c_rehash.sh* "${WORKDIR}"/c_rehash || die
76 cd "${S}"
77
78 epatch "${FILESDIR}"/${PN}-0.9.7e-gentoo.patch
79 epatch "${FILESDIR}"/${PN}-0.9.8l-binutils.patch #289130
80 epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
81 epatch "${FILESDIR}"/${P}-fix-double-free.patch #332027
82 cp "${FILESDIR}"/alphacpuid.s "${S}"/crypto/ || die #330915
83 epatch_user #332661
84
85 # disable fips in the build
86 # make sure the man pages are suffixed #302165
87 # don't bother building man pages if they're disabled
88 sed -i \
89 -e '/DIRS/s: fips : :g' \
90 -e '/^MANSUFFIX/s:=.*:=ssl:' \
91 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
92 -e $(has noman FEATURES \
93 && echo '/^install:/s:install_docs::' \
94 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
95 Makefile{,.org} \
96 || die
97 # show the actual commands in the log
98 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
99
100 # allow openssl to be cross-compiled
101 cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
102 chmod a+rx gentoo.config
103
104 append-flags -fno-strict-aliasing
105 append-flags -Wa,--noexecstack
106
107 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
108 ./config --test-sanity || die "I AM NOT SANE"
109 }
110
111 src_compile() {
112 unset APPS #197996
113 unset SCRIPTS #312551
114
115 tc-export CC AR RANLIB
116
117 # Clean out patent-or-otherwise-encumbered code
118 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
119 # IDEA: 5,214,703 07/01/2012 http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
120 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
121 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
122 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
123
124 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
125 echoit() { echo "$@" ; "$@" ; }
126
127 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
128
129 local sslout=$(./gentoo.config)
130 einfo "Use configuration ${sslout:-(openssl knows best)}"
131 local config="Configure"
132 [[ -z ${sslout} ]] && config="config"
133 echoit \
134 ./${config} \
135 ${sslout} \
136 $(use sse2 || echo "no-sse2") \
137 enable-camellia \
138 $(use_ssl !bindist ec) \
139 $(use_ssl !bindist idea) \
140 enable-mdc2 \
141 $(use_ssl !bindist rc5) \
142 enable-tlsext \
143 $(use_ssl gmp gmp -lgmp) \
144 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
145 $(use_ssl rfc3779) \
146 $(use_ssl zlib) \
147 --prefix=/usr \
148 --openssldir=/etc/ssl \
149 --libdir=$(get_libdir) \
150 shared threads \
151 || die "Configure failed"
152
153 # Clean out hardcoded flags that openssl uses
154 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
155 -e 's:^CFLAG=::' \
156 -e 's:-fomit-frame-pointer ::g' \
157 -e 's:-O[0-9] ::g' \
158 -e 's:-march=[-a-z0-9]* ::g' \
159 -e 's:-mcpu=[-a-z0-9]* ::g' \
160 -e 's:-m[a-z0-9]* ::g' \
161 )
162 sed -i \
163 -e "/^CFLAG/s:=.*:=${CFLAG} ${CFLAGS}:" \
164 -e "/^SHARED_LDFLAGS=/s:$: ${LDFLAGS}:" \
165 Makefile || die
166
167 # depend is needed to use $confopts
168 # rehash is needed to prep the certs/ dir
169 emake -j1 depend || die "depend failed"
170 emake -j1 all rehash || die "make all failed"
171 }
172
173 src_test() {
174 emake -j1 test || die "make test failed"
175 }
176
177 src_install() {
178 emake -j1 INSTALL_PREFIX="${D}" install || die
179 dobin "${WORKDIR}"/c_rehash || die #333117
180 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
181 dohtml -r doc/*
182
183 # create the certs directory
184 dodir /etc/ssl/certs
185 cp -RP certs/* "${D}"/etc/ssl/certs/ || die "failed to install certs"
186 rm -r "${D}"/etc/ssl/certs/{demo,expired}
187
188 # Namespace openssl programs to prevent conflicts with other man pages
189 cd "${D}"/usr/share/man
190 local m d s
191 for m in $(find . -type f | xargs grep -L '#include') ; do
192 d=${m%/*} ; d=${d#./} ; m=${m##*/}
193 [[ ${m} == openssl.1* ]] && continue
194 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
195 mv ${d}/{,ssl-}${m}
196 # fix up references to renamed man pages
197 sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
198 ln -s ssl-${m} ${d}/openssl-${m}
199 # locate any symlinks that point to this man page ... we assume
200 # that any broken links are due to the above renaming
201 for s in $(find -L ${d} -type l) ; do
202 s=${s##*/}
203 rm -f ${d}/${s}
204 ln -s ssl-${m} ${d}/ssl-${s}
205 ln -s ssl-${s} ${d}/openssl-${s}
206 done
207 done
208 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
209
210 dodir /etc/sandbox.d #254521
211 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
212
213 diropts -m0700
214 keepdir /etc/ssl/private
215 }
216
217 pkg_preinst() {
218 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
219 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
220 }
221
222 pkg_postinst() {
223 ebegin "Running 'c_rehash ${ROOT}etc/ssl/certs/' to rebuild hashes #333069"
224 c_rehash "${ROOT}etc/ssl/certs" >/dev/null
225 eend $?
226
227 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
228 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
229 }