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: metadata.xml ChangeLog openssl-0.9.8s-r1.ebuild openssl-1.0.0f-r1.ebuild
Date: Wed, 11 Jan 2012 00:12:35
Message-Id: 20120111001223.AEC012004B@flycatcher.gentoo.org
1 vapier 12/01/11 00:12:23
2
3 Modified: metadata.xml ChangeLog
4 Added: openssl-0.9.8s-r1.ebuild openssl-1.0.0f-r1.ebuild
5 Log:
6 Remove IDEA algos from USE=bindist #398439 by Ulrich Müller. Update EAPI and static-libs dep so we can work with older versions of zlib #397695#3.
7
8 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.7 dev-libs/openssl/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/metadata.xml?rev=1.7&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/metadata.xml?rev=1.7&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/metadata.xml?r1=1.6&r2=1.7
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/metadata.xml,v
20 retrieving revision 1.6
21 retrieving revision 1.7
22 diff -u -r1.6 -r1.7
23 --- metadata.xml 1 Dec 2011 05:32:56 -0000 1.6
24 +++ metadata.xml 11 Jan 2012 00:12:23 -0000 1.7
25 @@ -3,7 +3,7 @@
26 <pkgmetadata>
27 <herd>base-system</herd>
28 <use>
29 - <flag name='bindist'>Disable EC/IDEA/RC5 algorithms (as they seem to be patented)</flag>
30 + <flag name='bindist'>Disable EC/RC5 algorithms (as they seem to be patented)</flag>
31 <flag name='rfc3779'>Enable support for RFC 3779 (X.509 Extensions for IP Addresses and AS Identifiers)</flag>
32 </use>
33 </pkgmetadata>
34
35
36
37 1.414 dev-libs/openssl/ChangeLog
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.414&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?rev=1.414&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/ChangeLog?r1=1.413&r2=1.414
42
43 Index: ChangeLog
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v
46 retrieving revision 1.413
47 retrieving revision 1.414
48 diff -u -r1.413 -r1.414
49 --- ChangeLog 4 Jan 2012 21:44:48 -0000 1.413
50 +++ ChangeLog 11 Jan 2012 00:12:23 -0000 1.414
51 @@ -1,6 +1,14 @@
52 # ChangeLog for dev-libs/openssl
53 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
54 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.413 2012/01/04 21:44:48 vapier Exp $
55 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.414 2012/01/11 00:12:23 vapier Exp $
56 +
57 +*openssl-1.0.0f-r1 (11 Jan 2012)
58 +*openssl-0.9.8s-r1 (11 Jan 2012)
59 +
60 + 11 Jan 2012; Mike Frysinger <vapier@g.o> +openssl-0.9.8s-r1.ebuild,
61 + +openssl-1.0.0f-r1.ebuild, metadata.xml:
62 + Remove IDEA algos from USE=bindist #398439 by Ulrich Müller. Update EAPI and
63 + static-libs dep so we can work with older versions of zlib #397695#3.
64
65 *openssl-1.0.0f (04 Jan 2012)
66 *openssl-0.9.8s (04 Jan 2012)
67
68
69
70 1.1 dev-libs/openssl/openssl-0.9.8s-r1.ebuild
71
72 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-0.9.8s-r1.ebuild?rev=1.1&view=markup
73 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-0.9.8s-r1.ebuild?rev=1.1&content-type=text/plain
74
75 Index: openssl-0.9.8s-r1.ebuild
76 ===================================================================
77 # Copyright 1999-2012 Gentoo Foundation
78 # Distributed under the terms of the GNU General Public License v2
79 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8s-r1.ebuild,v 1.1 2012/01/11 00:12:23 vapier Exp $
80
81 # this ebuild is only for the libcrypto.so.0.9.8 and libssl.so.0.9.8 SONAME for ABI compat
82
83 EAPI="2"
84
85 inherit eutils flag-o-matic toolchain-funcs
86
87 DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"
88 HOMEPAGE="http://www.openssl.org/"
89 SRC_URI="mirror://openssl/source/${P}.tar.gz"
90
91 LICENSE="openssl"
92 SLOT="0.9.8"
93 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
94 IUSE="bindist gmp kerberos sse2 test zlib"
95
96 RDEPEND="gmp? ( dev-libs/gmp )
97 zlib? ( sys-libs/zlib )
98 kerberos? ( app-crypt/mit-krb5 )
99 !=dev-libs/openssl-0.9.8*:0"
100 DEPEND="${RDEPEND}
101 sys-apps/diffutils
102 >=dev-lang/perl-5
103 test? ( sys-devel/bc )"
104
105 pkg_setup() {
106 # avoid collisions with openssl-1 (preserve lib)
107 if ! has_version dev-libs/openssl:${SLOT} ; then
108 ewarn "Removing lib{crypto,ssl}.so.0.9.8 to avoid collision with openssl-1"
109 rm -f "${ROOT}"/usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
110 fi
111 }
112
113 src_prepare() {
114 epatch "${FILESDIR}"/${PN}-0.9.8e-bsd-sparc64.patch
115 epatch "${FILESDIR}"/${PN}-0.9.8h-ldflags.patch #181438
116 epatch "${FILESDIR}"/${PN}-0.9.8m-binutils.patch #289130
117
118 # disable fips in the build
119 # make sure the man pages are suffixed #302165
120 # don't bother building man pages if they're disabled
121 sed -i \
122 -e '/DIRS/s: fips : :g' \
123 -e '/^MANSUFFIX/s:=.*:=ssl:' \
124 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
125 -e $(has noman FEATURES \
126 && echo '/^install:/s:install_docs::' \
127 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
128 Makefile{,.org} \
129 || die
130 # show the actual commands in the log
131 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
132 # update the enginedir path
133 sed -i \
134 -e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
135 Configure || die
136
137 # allow openssl to be cross-compiled
138 cp "${FILESDIR}"/gentoo.config-0.9.8 gentoo.config || die "cp cross-compile failed"
139 chmod a+rx gentoo.config
140
141 append-flags -fno-strict-aliasing
142 append-flags -Wa,--noexecstack
143
144 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
145 sed -i '/^"debug-steve/d' Configure # 0.9.8k shipped broken
146 ./config --test-sanity || die "I AM NOT SANE"
147 }
148
149 src_configure() {
150 unset APPS #197996
151 unset SCRIPTS #312551
152
153 tc-export CC AR RANLIB
154
155 # Clean out patent-or-otherwise-encumbered code
156 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
157 # IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
158 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
159 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
160 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
161
162 use_ssl() { use $1 && echo "enable-${2:-$1} ${*:3}" || echo "no-${2:-$1}" ; }
163 echoit() { echo "$@" ; "$@" ; }
164
165 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
166
167 local sslout=$(./gentoo.config)
168 einfo "Use configuration ${sslout:-(openssl knows best)}"
169 local config="Configure"
170 [[ -z ${sslout} ]] && config="config"
171 echoit \
172 ./${config} \
173 ${sslout} \
174 $(use sse2 || echo "no-sse2") \
175 enable-camellia \
176 $(use_ssl !bindist ec) \
177 enable-idea \
178 enable-mdc2 \
179 $(use_ssl !bindist rc5) \
180 enable-tlsext \
181 $(use_ssl gmp gmp -lgmp) \
182 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
183 $(use_ssl zlib) \
184 --prefix=/usr \
185 --openssldir=/etc/ssl \
186 shared threads \
187 || die "Configure failed"
188
189 # Clean out hardcoded flags that openssl uses
190 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
191 -e 's:^CFLAG=::' \
192 -e 's:-fomit-frame-pointer ::g' \
193 -e 's:-O[0-9] ::g' \
194 -e 's:-march=[-a-z0-9]* ::g' \
195 -e 's:-mcpu=[-a-z0-9]* ::g' \
196 -e 's:-m[a-z0-9]* ::g' \
197 )
198 sed -i \
199 -e "/^LIBDIR=/s|=.*|=$(get_libdir)|" \
200 -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
201 -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
202 Makefile || die
203 }
204
205 src_compile() {
206 # depend is needed to use $confopts
207 emake -j1 depend || die "depend failed"
208 emake -j1 build_libs || die "make build_libs failed"
209 }
210
211 src_test() {
212 emake -j1 test || die "make test failed"
213 }
214
215 src_install() {
216 dolib.so lib{crypto,ssl}.so.0.9.8 || die
217 }
218
219
220
221 1.1 dev-libs/openssl/openssl-1.0.0f-r1.ebuild
222
223 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0f-r1.ebuild?rev=1.1&view=markup
224 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/openssl/openssl-1.0.0f-r1.ebuild?rev=1.1&content-type=text/plain
225
226 Index: openssl-1.0.0f-r1.ebuild
227 ===================================================================
228 # Copyright 1999-2012 Gentoo Foundation
229 # Distributed under the terms of the GNU General Public License v2
230 # $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.0f-r1.ebuild,v 1.1 2012/01/11 00:12:23 vapier Exp $
231
232 EAPI="4"
233
234 inherit eutils flag-o-matic toolchain-funcs
235
236 REV="1.7"
237 DESCRIPTION="full-strength general purpose cryptography library (including SSL v2/v3 and TLS v1)"
238 HOMEPAGE="http://www.openssl.org/"
239 SRC_URI="mirror://openssl/source/${P}.tar.gz
240 http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/~checkout~/packages/${PN}/${PN}-c_rehash.sh?rev=${REV} -> ${PN}-c_rehash.sh.${REV}"
241
242 LICENSE="openssl"
243 SLOT="0"
244 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
245 IUSE="bindist gmp kerberos rfc3779 sse2 static-libs test zlib"
246
247 # Have the sub-libs in RDEPEND with [static-libs] since, logically,
248 # our libssl.a depends on libz.a/etc... at runtime.
249 LIB_DEPEND="gmp? ( dev-libs/gmp[static-libs(+)] )
250 zlib? ( sys-libs/zlib[static-libs(+)] )
251 kerberos? ( app-crypt/mit-krb5 )"
252 RDEPEND="static-libs? ( ${LIB_DEPEND} )
253 !static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )"
254 DEPEND="${RDEPEND}
255 sys-apps/diffutils
256 >=dev-lang/perl-5
257 test? ( sys-devel/bc )"
258 PDEPEND="app-misc/ca-certificates"
259
260 src_unpack() {
261 unpack ${P}.tar.gz
262 cp "${DISTDIR}"/${PN}-c_rehash.sh.${REV} "${WORKDIR}"/c_rehash || die
263 }
264
265 src_prepare() {
266 # Make sure we only ever touch Makefile.org and avoid patching a file
267 # that gets blown away anyways by the Configure script in src_configure
268 rm -f Makefile
269
270 epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
271 epatch "${FILESDIR}"/${PN}-1.0.0d-fbsd-amd64.patch #363089
272 epatch "${FILESDIR}"/${PN}-1.0.0d-windres.patch #373743
273 epatch "${FILESDIR}"/${PN}-1.0.0e-pkg-config.patch
274 epatch "${FILESDIR}"/${PN}-1.0.0e-parallel-build.patch
275 epatch "${FILESDIR}"/${PN}-1.0.0e-x32.patch
276 epatch_user #332661
277
278 # disable fips in the build
279 # make sure the man pages are suffixed #302165
280 # don't bother building man pages if they're disabled
281 sed -i \
282 -e '/DIRS/s: fips : :g' \
283 -e '/^MANSUFFIX/s:=.*:=ssl:' \
284 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
285 -e $(has noman FEATURES \
286 && echo '/^install:/s:install_docs::' \
287 || echo '/^MANDIR=/s:=.*:=/usr/share/man:') \
288 Makefile.org \
289 || die
290 # show the actual commands in the log
291 sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
292
293 # allow openssl to be cross-compiled
294 cp "${FILESDIR}"/gentoo.config-1.0.0 gentoo.config || die
295 chmod a+rx gentoo.config
296
297 append-flags -fno-strict-aliasing
298 append-flags $(test-flags-CC -Wa,--noexecstack)
299
300 sed -i '1s,^:$,#!/usr/bin/perl,' Configure #141906
301 ./config --test-sanity || die "I AM NOT SANE"
302 }
303
304 src_configure() {
305 unset APPS #197996
306 unset SCRIPTS #312551
307 unset CROSS_COMPILE #311473
308
309 tc-export CC AR RANLIB RC
310
311 # Clean out patent-or-otherwise-encumbered code
312 # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher)
313 # IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
314 # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
315 # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2
316 # RC5: 5,724,428 03/03/2015 http://en.wikipedia.org/wiki/RC5
317
318 use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
319 echoit() { echo "$@" ; "$@" ; }
320
321 local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal")
322
323 local sslout=$(./gentoo.config)
324 einfo "Use configuration ${sslout:-(openssl knows best)}"
325 local config="Configure"
326 [[ -z ${sslout} ]] && config="config"
327 echoit \
328 ./${config} \
329 ${sslout} \
330 $(use sse2 || echo "no-sse2") \
331 enable-camellia \
332 $(use_ssl !bindist ec) \
333 enable-idea \
334 enable-mdc2 \
335 $(use_ssl !bindist rc5) \
336 enable-tlsext \
337 $(use_ssl gmp gmp -lgmp) \
338 $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
339 $(use_ssl rfc3779) \
340 $(use_ssl zlib) \
341 --prefix=/usr \
342 --openssldir=/etc/ssl \
343 --libdir=$(get_libdir) \
344 shared threads \
345 || die
346
347 # Clean out hardcoded flags that openssl uses
348 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
349 -e 's:^CFLAG=::' \
350 -e 's:-fomit-frame-pointer ::g' \
351 -e 's:-O[0-9] ::g' \
352 -e 's:-march=[-a-z0-9]* ::g' \
353 -e 's:-mcpu=[-a-z0-9]* ::g' \
354 -e 's:-m[a-z0-9]* ::g' \
355 )
356 sed -i \
357 -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
358 -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
359 Makefile || die
360 }
361
362 src_compile() {
363 # depend is needed to use $confopts; it also doesn't matter
364 # that it's -j1 as the code itself serializes subdirs
365 emake -j1 depend || die
366 emake all || die
367 # rehash is needed to prep the certs/ dir; do this
368 # separately to avoid parallel build issues.
369 emake rehash || die
370 }
371
372 src_test() {
373 emake -j1 test || die
374 }
375
376 src_install() {
377 emake INSTALL_PREFIX="${D}" install || die
378 dobin "${WORKDIR}"/c_rehash || die #333117
379 dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
380 dohtml -r doc/*
381 use rfc3779 && dodoc engines/ccgost/README.gost
382
383 # This is crappy in that the static archives are still built even
384 # when USE=static-libs. But this is due to a failing in the openssl
385 # build system: the static archives are built as PIC all the time.
386 # Only way around this would be to manually configure+compile openssl
387 # twice; once with shared lib support enabled and once without.
388 use static-libs || rm -f "${D}"/usr/lib*/lib*.a
389
390 # create the certs directory
391 dodir /etc/ssl/certs
392 cp -RP certs/* "${D}"/etc/ssl/certs/ || die
393 rm -r "${D}"/etc/ssl/certs/{demo,expired}
394
395 # Namespace openssl programs to prevent conflicts with other man pages
396 cd "${D}"/usr/share/man
397 local m d s
398 for m in $(find . -type f | xargs grep -L '#include') ; do
399 d=${m%/*} ; d=${d#./} ; m=${m##*/}
400 [[ ${m} == openssl.1* ]] && continue
401 [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
402 mv ${d}/{,ssl-}${m}
403 # fix up references to renamed man pages
404 sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
405 ln -s ssl-${m} ${d}/openssl-${m}
406 # locate any symlinks that point to this man page ... we assume
407 # that any broken links are due to the above renaming
408 for s in $(find -L ${d} -type l) ; do
409 s=${s##*/}
410 rm -f ${d}/${s}
411 ln -s ssl-${m} ${d}/ssl-${s}
412 ln -s ssl-${s} ${d}/openssl-${s}
413 done
414 done
415 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
416
417 dodir /etc/sandbox.d #254521
418 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${D}"/etc/sandbox.d/10openssl
419
420 diropts -m0700
421 keepdir /etc/ssl/private
422 }
423
424 pkg_preinst() {
425 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
426 preserve_old_lib /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
427 }
428
429 pkg_postinst() {
430 ebegin "Running 'c_rehash ${ROOT}etc/ssl/certs/' to rebuild hashes #333069"
431 c_rehash "${ROOT}etc/ssl/certs" >/dev/null
432 eend $?
433
434 has_version ${CATEGORY}/${PN}:0.9.8 && return 0
435 preserve_old_lib_notify /usr/$(get_libdir)/lib{crypto,ssl}.so.0.9.8
436 }