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).
This commit is contained in:
David Michael 2017-11-27 14:20:22 -05:00
parent def8d42540
commit 464694e5d0

View File

@ -3,7 +3,7 @@
EAPI="5" EAPI="5"
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal systemd
MY_P=${P/_/-} MY_P=${P/_/-}
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)" DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
@ -12,9 +12,8 @@ SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
LICENSE="openssl" LICENSE="openssl"
SLOT="0" 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" 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" IUSE="+asm gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib"
RESTRICT="!bindist? ( bindist )"
RDEPEND=">=app-misc/c_rehash-1.7-r1 RDEPEND=">=app-misc/c_rehash-1.7-r1
gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] ) gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
@ -143,7 +142,6 @@ multilib_src_configure() {
${sslout} \ ${sslout} \
$(use cpu_flags_x86_sse2 || echo "no-sse2") \ $(use cpu_flags_x86_sse2 || echo "no-sse2") \
enable-camellia \ enable-camellia \
$(use_ssl !bindist ec) \
${ec_nistp_64_gcc_128} \ ${ec_nistp_64_gcc_128} \
enable-idea \ enable-idea \
enable-mdc2 \ enable-mdc2 \
@ -213,11 +211,6 @@ multilib_src_install_all() {
# twice; once with shared lib support enabled and once without. # twice; once with shared lib support enabled and once without.
use static-libs || rm -f "${ED}"/usr/lib*/lib*.a 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 # Namespace openssl programs to prevent conflicts with other man pages
cd "${ED}"/usr/share/man cd "${ED}"/usr/share/man
local m d s local m d s
@ -243,12 +236,15 @@ multilib_src_install_all() {
dodir /etc/sandbox.d #254521 dodir /etc/sandbox.d #254521
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
diropts -m0700 # Don't keep the sample CA files and their ilk in /etc.
keepdir ${SSL_CNF_DIR}/private rm -r "${ED}"${SSL_CNF_DIR}
}
pkg_postinst() { # Save the default openssl.cnf in /usr and link it into place.
ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" dodir /usr/share/ssl
c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null insinto /usr/share/ssl
eend $? 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
} }