diff options
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r-- | dev-libs/openssl/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/openssl/openssl-1.1.0g-r1.ebuild | 282 |
2 files changed, 286 insertions, 0 deletions
diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest index 38ca061519d3..cc6b609aa313 100644 --- a/dev-libs/openssl/Manifest +++ b/dev-libs/openssl/Manifest @@ -25,6 +25,9 @@ DIST openssl-1.1.0f_ec_curve.c 18393 SHA256 9dd0e1f422116da45eb16936fbbbe4e4e05e DIST openssl-1.1.0f_ectest.c 29907 SHA256 37682adb07ba260339fad3fead87b186fc8c26321a0aad45deefed4c25ad87cb SHA512 90cec9d46326cb7216236811c8e963032b6fa7500117cea36f28534eb50a5ab1260c7f9a5c8c490d845236b0769576a8d97bc7471f970e9c5e70cb3408c20dae WHIRLPOOL f39da1830f5a6492add40f460af9d85b2fbfac0d5d8ff4eb4ba3cb16e6ff50a030aee38c518d7a06d1167f59030ded5496000793ad4cf2de7ff36f22eeefe7c7 DIST openssl-1.1.0f_hobble-openssl 1117 SHA256 ab168bd8bf578f7361524f9a12eecbbaf41fd7e2c852a0158aafd3bce9cac569 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826 WHIRLPOOL 94537166ad8f5cacba2d30d0b6e4676d896cab157be5891fbeecdb2efa10a322d77e2b35a44ff1d474e860dcece63a8688f9df5edf8fe859bf67b410148ea64a DIST openssl-1.1.0g.tar.gz 5404748 SHA256 de4d501267da39310905cb6dc8c6121f7a2cad45a7707f76df828fe1b85073af SHA512 6c76f698fc2a4540f3977d97c889e139acf7d3f9eb85f349974175e8a7707b19743ef91c5ce32839310b6ea06ca88a03d9709ee011687b4634c5c50b5814f42a WHIRLPOOL 86363a038df1621b9fbf634efec6648e0c35b882f7b582e6522a3869f8f5c67e32ed1a4637cb0009bf6fab4528072964cba5878540407306ea2e4210026c7a78 +DIST openssl-1.1.0g_ec_curve.c 18393 SHA256 9dd0e1f422116da45eb16936fbbbe4e4e05e7a8fc0f359594af76e935c37716e SHA512 ee3e576825bccdf02cede4205ab92c42ae9dd3a8e75ce58617a3a5980a61d144eb3c5197d9dcd378a5d49bf34c4b2f591aa6a619fee92b7a22825d72681ab879 WHIRLPOOL 6f43f3b8037f5edf323ea865d1150eaa63ee60f60b512b52e37b752b328855e57eae70c812071caba0f91eeeb379c4dd9574806ba50d5bee38ad3b0e3fe03f55 +DIST openssl-1.1.0g_ectest.c 29907 SHA256 37682adb07ba260339fad3fead87b186fc8c26321a0aad45deefed4c25ad87cb SHA512 90cec9d46326cb7216236811c8e963032b6fa7500117cea36f28534eb50a5ab1260c7f9a5c8c490d845236b0769576a8d97bc7471f970e9c5e70cb3408c20dae WHIRLPOOL f39da1830f5a6492add40f460af9d85b2fbfac0d5d8ff4eb4ba3cb16e6ff50a030aee38c518d7a06d1167f59030ded5496000793ad4cf2de7ff36f22eeefe7c7 +DIST openssl-1.1.0g_hobble-openssl 1117 SHA256 ab168bd8bf578f7361524f9a12eecbbaf41fd7e2c852a0158aafd3bce9cac569 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826 WHIRLPOOL 94537166ad8f5cacba2d30d0b6e4676d896cab157be5891fbeecdb2efa10a322d77e2b35a44ff1d474e860dcece63a8688f9df5edf8fe859bf67b410148ea64a EBUILD openssl-0.9.8z_p8.ebuild 4997 SHA256 68825bbb48e4862340690badf5f4fdffb671e29030ec2a142c707486fb3dae6d SHA512 15767d6ed531a7b27a37e9276f3ae02b1d3a57103db2bc256dad4ac9af8d1797f078731ac6a7325a36ca7b9cec34840dac2e3723343dca69050a524c300e7059 WHIRLPOOL 39d5304c4bfe18f974c7aba3d6180bfb9cd3a76e1684cd83b36d985d49c81fe80a552ad41244e280b2fceff718c4378fbda9bf59dbf6b40e06378c3f6ccbdc95 EBUILD openssl-1.0.2k.ebuild 8334 SHA256 81be072ce297e7426353f5fc5e1021b464aab6c08317ab0798b3f2f3511e25b9 SHA512 69041d575f7542984cdbc9ef32aa04af49610e1e5752ce77e2566b63d0c60d0cfde6aab808d9c32390ca986911de3b67de057d09c1e036204bf119136e386efb WHIRLPOOL 8b5445b07d05613e3003348c5518d1fdd5fdce4415739b0cfbd3589f5a2801747dcbd5bad2c034cc28b6f8bb73916aeeec4d3d3c591462d024147f494180f2b5 EBUILD openssl-1.0.2l-r1.ebuild 9930 SHA256 78d0509140e5187d636f21320a6bf125d4a1a03d797bf545c7741d31d7ea7864 SHA512 86ffa8e9d2ad2e69fdfdf7888cdc3f885ee3b5fb7bae6af3a9dbcf977d4fe00d1f4fce1642b7c1bc5eab0f7d8a3c2247beb2d80a731d0b14e6aa0b545e323c23 WHIRLPOOL 5765b2ac767c04ccfd1ceb7e5998513aab7e18a80e77124eec63f729f054fc479318612a567b6a8141afabc9e4bdc65101b0811bc25f266960580465e0de0513 @@ -32,6 +35,7 @@ EBUILD openssl-1.0.2l.ebuild 8338 SHA256 072d91bb6cdf1e356a450d995e1a43026f6a868 EBUILD openssl-1.0.2m.ebuild 8341 SHA256 e7d89322ae108c4224c68691a4183d7777c363a1dc7a5441ff3f12fae76fc525 SHA512 917896dcf3971ff2e36491d5c5a72461f7fc586e1c538561169ce38b4eaa8b3465447f315f2b8c5bf6b7c6f5ddd8a682a056fd61c42fea6659158a0196f67ff6 WHIRLPOOL 54720e81c59c711f0759846aeabb8790149a194888ec1d551ab929c2b01bc89f812a7496805135b8090ce981c6039ebe5fde9ce7575b405ce3cfebe343cad32d EBUILD openssl-1.1.0f-r1.ebuild 8960 SHA256 59b50a19926a7cef6c0d366e40c4e2ee36cf9f8349c3a5be511f974ad1d7036c SHA512 5d7c628faa89d56a58f5d732f30d495743e6cfa94962e036042f396902aeb71d6e997a2ee2db904f7e04e21a6c2d75e879fdb172f74f28d51b0e2569d532d33e WHIRLPOOL ca550601ac03f73ac41e1c10b882b93c3b351a65fddfc6febcee3e5a3a3b545e04cb38bfb3fca8a8b3d32cc36149933772cba764b731141f1a8f4c5a832aa934 EBUILD openssl-1.1.0f.ebuild 7419 SHA256 553325ec8be13740869ef1416fb62654c7ec6ea1755a55f2eec81db6797d0950 SHA512 30d243d3d3e13571c8b55f9b13abc8b39ad0e719bd482b54d22ee7cb01217e8288cf2594dca1511bd5bd3945acf4e2963a16d3a172c59c11af93008a7a8874b2 WHIRLPOOL 1248a75677f564b74c2f0e575994fe00a8421c12b6a420a5782c3c3646eeb249dc391cc5b3838ee5d5040a9b0d0a4ec281a3af79a1392aefb9455607a21656c5 +EBUILD openssl-1.1.0g-r1.ebuild 8960 SHA256 59b50a19926a7cef6c0d366e40c4e2ee36cf9f8349c3a5be511f974ad1d7036c SHA512 5d7c628faa89d56a58f5d732f30d495743e6cfa94962e036042f396902aeb71d6e997a2ee2db904f7e04e21a6c2d75e879fdb172f74f28d51b0e2569d532d33e WHIRLPOOL ca550601ac03f73ac41e1c10b882b93c3b351a65fddfc6febcee3e5a3a3b545e04cb38bfb3fca8a8b3d32cc36149933772cba764b731141f1a8f4c5a832aa934 EBUILD openssl-1.1.0g.ebuild 7419 SHA256 553325ec8be13740869ef1416fb62654c7ec6ea1755a55f2eec81db6797d0950 SHA512 30d243d3d3e13571c8b55f9b13abc8b39ad0e719bd482b54d22ee7cb01217e8288cf2594dca1511bd5bd3945acf4e2963a16d3a172c59c11af93008a7a8874b2 WHIRLPOOL 1248a75677f564b74c2f0e575994fe00a8421c12b6a420a5782c3c3646eeb249dc391cc5b3838ee5d5040a9b0d0a4ec281a3af79a1392aefb9455607a21656c5 MISC ChangeLog 27134 SHA256 73f6780806505aea9831be5f3b6f45b68a0520bff223e7306988b89bdd5b0762 SHA512 4529bfdc72026bdff344610f7e64c56deeb14711f7dc3d522340e37c264498db57c8e0e10615b5437dc80613b54c4f39c5027797e6893f5283c3fb4eae54939c WHIRLPOOL 32420b6acefa4db82b392a0505c032c3ca8adfb0731f3767b9a10ad6bc0288f07d999d832e053d93ed6265ed971143f8f0b995841b0e0b0168defb65cbae68ae MISC ChangeLog-2015 105012 SHA256 78da8e54f925dd55fa0e87800ab2e3ad9833cb33f6c334a4364339195d44a8a8 SHA512 fa8deec570b40406f273a5ea929f10113d81d828815c67f225968bbbaa6737f6c4832502a100b06fe6c8cf124529fedaa04cbaf7a70f037680a420ce244be1e5 WHIRLPOOL a2acbfb3283a9521492b4b96d9d2283aefc3445df87e47e584c66f87547cfa954914beaddd040c7097fded7029897f9481cded1d1f2d1ad7fa7b2e5425b285ba diff --git a/dev-libs/openssl/openssl-1.1.0g-r1.ebuild b/dev-libs/openssl/openssl-1.1.0g-r1.ebuild new file mode 100644 index 000000000000..151632bbbcb2 --- /dev/null +++ b/dev-libs/openssl/openssl-1.1.0g-r1.ebuild @@ -0,0 +1,282 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal + +MY_P=${P/_/-} +DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)" +HOMEPAGE="http://www.openssl.org/" +SRC_URI="mirror://openssl/source/${MY_P}.tar.gz" + +LICENSE="openssl" +SLOT="0/1.1" # .so version of libssl/libcrypto +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux" +IUSE="+asm bindist rfc3779 sctp cpu_flags_x86_sse2 static-libs test tls-heartbeat vanilla zlib" +RESTRICT="!bindist? ( bindist )" + +RDEPEND=">=app-misc/c_rehash-1.7-r1 + zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + >=dev-lang/perl-5 + sctp? ( >=net-misc/lksctp-tools-1.0.12 ) + test? ( + sys-apps/diffutils + sys-devel/bc + )" +PDEPEND="app-misc/ca-certificates" + +# This does not copy the entire Fedora patchset, but JUST the parts that +# are needed to make it safe to use EC with RESTRICT=bindist. +# See openssl.spec for the matching numbering of SourceNNN, PatchNNN +SOURCE1=hobble-openssl +SOURCE12=ec_curve.c +SOURCE13=ectest.c +PATCH1=openssl-1.1.0-build.patch # Fixes EVP testcase for EC +PATCH37=openssl-1.1.0-ec-curves.patch +FEDORA_GIT_BASE='https://src.fedoraproject.org/cgit/rpms/openssl.git/plain/' +FEDORA_GIT_BRANCH='f27' +FEDORA_SRC_URI=() +FEDORA_SOURCE=( $SOURCE1 $SOURCE12 $SOURCE13 ) +FEDORA_PATCH=( $PATCH1 $PATCH37 ) +for i in "${FEDORA_SOURCE[@]}" ; do + FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH} -> ${P}_${i}" ) +done +for i in "${FEDORA_PATCH[@]}" ; do # Already have a version prefix + FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH} -> ${i}" ) +done +SRC_URI+=" bindist? ( ${FEDORA_SRC_URI[@]} )" + +S="${WORKDIR}/${MY_P}" + +MULTILIB_WRAPPED_HEADERS=( + usr/include/openssl/opensslconf.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618 +) + +src_prepare() { + if use bindist; then + # This just removes the prefix, and puts it into WORKDIR like the RPM. + for i in "${FEDORA_SOURCE[@]}" ; do + cp -f "${DISTDIR}"/"${P}_${i}" "${WORKDIR}"/"${i}" || die + done + # .spec %prep + bash "${WORKDIR}"/"${SOURCE1}" || die + cp -f "${WORKDIR}"/"${SOURCE12}" "${S}"/crypto/ec/ || die + cp -f "${WORKDIR}"/"${SOURCE13}" "${S}"/test/ || die + for i in "${FEDORA_PATCH[@]}" ; do + epatch "${DISTDIR}"/"${i}" + done + # Also see the configure parts below: + # enable-ec \ + # $(use_ssl !bindist ec2m) \ + + fi + # keep this in sync with app-misc/c_rehash + SSL_CNF_DIR="/etc/ssl" + + # Make sure we only ever touch Makefile.org and avoid patching a file + # that gets blown away anyways by the Configure script in src_configure + rm -f Makefile + + if ! use vanilla ; then + epatch "${PATCHES[@]}" + epatch_user #332661 + fi + + # make sure the man pages are suffixed #302165 + # don't bother building man pages if they're disabled + # Make DOCDIR Gentoo compliant + sed -i \ + -e '/^MANSUFFIX/s:=.*:=ssl:' \ + -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ + -e $(has noman FEATURES \ + && echo '/^install:/s:install_docs::' \ + || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ + -e "/^DOCDIR/s@\$(BASENAME)@&-${PF}@" \ + Configurations/unix-Makefile.tmpl \ + || die + + # show the actual commands in the log + sed -i '/^SET_X/s@=.*@=set -x@' Makefile.shared + + # quiet out unknown driver argument warnings since openssl + # doesn't have well-split CFLAGS and we're making it even worse + # and 'make depend' uses -Werror for added fun (#417795 again) + [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments + + # allow openssl to be cross-compiled + cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die + chmod a+rx gentoo.config + + append-flags -fno-strict-aliasing + append-flags $(test-flags-CC -Wa,--noexecstack) + append-cppflags -DOPENSSL_NO_BUF_FREELISTS + + # Prefixify Configure shebang (#141906) + sed \ + -e "1s,/usr/bin/env,${EPREFIX}&," \ + -i Configure || die + # Remove test target when FEATURES=test isn't set + if ! use test ; then + sed \ + -e '/^$config{dirs}/s@ "test",@@' \ + -i Configure || die + fi + # The config script does stupid stuff to prompt the user. Kill it. + sed -i '/stty -icanon min 0 time 50; read waste/d' config || die + ./config --test-sanity || die "I AM NOT SANE" + + multilib_copy_sources +} + +multilib_src_configure() { + unset APPS #197996 + unset SCRIPTS #312551 + unset CROSS_COMPILE #311473 + + tc-export CC AR RANLIB RC + + # Clean out patent-or-otherwise-encumbered code + # Camellia: Royalty Free http://en.wikipedia.org/wiki/Camellia_(cipher) + # IDEA: Expired http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm + # EC: ????????? ??/??/2015 http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography + # MDC2: Expired http://en.wikipedia.org/wiki/MDC-2 + # RC5: Expired http://en.wikipedia.org/wiki/RC5 + + use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } + echoit() { echo "$@" ; "$@" ; } + + local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") + + # See if our toolchain supports __uint128_t. If so, it's 64bit + # friendly and can use the nicely optimized code paths. #460790 + local ec_nistp_64_gcc_128 + # Disable it for now though #469976 + #if ! use bindist ; then + # echo "__uint128_t i;" > "${T}"/128.c + # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then + # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" + # fi + #fi + + local sslout=$(./gentoo.config) + einfo "Use configuration ${sslout:-(openssl knows best)}" + local config="Configure" + [[ -z ${sslout} ]] && config="config" + + # Fedora hobbled-EC needs 'no-ec2m' + # 'srp' was restricted until early 2017 as well. + echoit \ + ./${config} \ + ${sslout} \ + --api=1.0.0 \ + $(use cpu_flags_x86_sse2 || echo "no-sse2") \ + enable-camellia \ + disable-deprecated \ + enable-ec \ + $(use_ssl !bindist ec2m) \ + enable-srp \ + ${ec_nistp_64_gcc_128} \ + enable-idea \ + enable-mdc2 \ + enable-rc5 \ + $(use_ssl asm) \ + $(use_ssl rfc3779) \ + $(use_ssl sctp) \ + $(use_ssl tls-heartbeat heartbeats) \ + $(use_ssl zlib) \ + --prefix="${EPREFIX}"/usr \ + --openssldir="${EPREFIX}"${SSL_CNF_DIR} \ + --libdir=$(get_libdir) \ + shared threads \ + || die + + # Clean out hardcoded flags that openssl uses + # Fix quoting for sed + local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ + -e 's:^CFLAGS=::' \ + -e 's:-fomit-frame-pointer ::g' \ + -e 's:-O[0-9] ::g' \ + -e 's:-march=[-a-z0-9]* ::g' \ + -e 's:-mcpu=[-a-z0-9]* ::g' \ + -e 's:-m[a-z0-9]* ::g' \ + -e 's:\\:\\\\:g' \ + ) + sed -i \ + -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ + -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ + Makefile || die +} + +multilib_src_compile() { + # depend is needed to use $confopts; it also doesn't matter + # that it's -j1 as the code itself serializes subdirs + emake -j1 depend + emake all +} + +multilib_src_test() { + emake -j1 test +} + +multilib_src_install() { + emake DESTDIR="${D}" install +} + +multilib_src_install_all() { + # openssl installs perl version of c_rehash by default, but + # we provide a shell version via app-misc/c_rehash + rm "${ED}"/usr/bin/c_rehash || die + + dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el + dohtml -r doc/* + + # This is crappy in that the static archives are still built even + # when USE=static-libs. But this is due to a failing in the openssl + # build system: the static archives are built as PIC all the time. + # Only way around this would be to manually configure+compile openssl + # twice; once with shared lib support enabled and once without. + use static-libs || rm -f "${ED}"/usr/lib*/lib*.a + + # create the certs directory + keepdir ${SSL_CNF_DIR}/certs + + # Namespace openssl programs to prevent conflicts with other man pages + cd "${ED}"/usr/share/man + local m d s + for m in $(find . -type f | xargs grep -L '#include') ; do + d=${m%/*} ; d=${d#./} ; m=${m##*/} + [[ ${m} == openssl.1* ]] && continue + [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" + mv ${d}/{,ssl-}${m} + # fix up references to renamed man pages + sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} + ln -s ssl-${m} ${d}/openssl-${m} + # locate any symlinks that point to this man page ... we assume + # that any broken links are due to the above renaming + for s in $(find -L ${d} -type l) ; do + s=${s##*/} + rm -f ${d}/${s} + ln -s ssl-${m} ${d}/ssl-${s} + ln -s ssl-${s} ${d}/openssl-${s} + done + done + [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" + + dodir /etc/sandbox.d #254521 + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl + + diropts -m0700 + keepdir ${SSL_CNF_DIR}/private +} + +pkg_postinst() { + ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" + c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null + eend $? +} |