From 98c7d3e2493cf84766a1bb8f2958e1b99ef451dc Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 15 Dec 2017 10:41:10 -0500 Subject: [PATCH] dev-libs/openssl: Apply CoreOS changes - Stabilize the arm64 version. - Drop pkg_postinst. - Remove the bindist USE flag. - Create /etc/ssl with tmpfiles (and package it for the SDK). --- .../dev-libs/openssl/openssl-1.0.2n.ebuild | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-1.0.2n.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-1.0.2n.ebuild index a88355e47e..e7025f9545 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-1.0.2n.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/dev-libs/openssl/openssl-1.0.2n.ebuild @@ -3,7 +3,7 @@ EAPI="6" -inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal +inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal systemd PATCH_SET="openssl-1.0.2-patches-1.0" MY_P=${P/_/-} @@ -15,9 +15,8 @@ SRC_URI="mirror://openssl/source/${MY_P}.tar.gz LICENSE="openssl" SLOT="0" -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 gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib" -RESTRICT="!bindist? ( bindist )" +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 gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib" RDEPEND=">=app-misc/c_rehash-1.7-r1 gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) @@ -139,7 +138,6 @@ multilib_src_configure() { ${sslout} \ $(use cpu_flags_x86_sse2 || echo "no-sse2") \ enable-camellia \ - $(use_ssl !bindist ec) \ ${ec_nistp_64_gcc_128} \ enable-idea \ enable-mdc2 \ @@ -210,11 +208,6 @@ multilib_src_install_all() { # twice; once with shared lib support enabled and once without. use static-libs || rm -f "${ED}"/usr/lib*/lib*.a - # create the certs directory - dodir ${SSL_CNF_DIR}/certs - cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die - rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired} - # Namespace openssl programs to prevent conflicts with other man pages cd "${ED}"/usr/share/man local m d s @@ -240,12 +233,15 @@ multilib_src_install_all() { dodir /etc/sandbox.d #254521 echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl - diropts -m0700 - keepdir ${SSL_CNF_DIR}/private -} + # Don't keep the sample CA files and their ilk in /etc. + rm -r "${ED}"${SSL_CNF_DIR} -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 $? + # Save the default openssl.cnf in /usr and link it into place. + dodir /usr/share/ssl + insinto /usr/share/ssl + doins "${S}"/apps/openssl.cnf + systemd_dotmpfilesd "${FILESDIR}"/openssl.conf + + # Package the tmpfiles.d setup for SDK bootstrapping. + systemd-tmpfiles --create --root="${ED}" "${FILESDIR}"/openssl.conf }