parent
fddb2d0064
commit
b689526a51
Binary file not shown.
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST consul-1.4.4.tar.gz 22736827 BLAKE2B a1b973a303f77d84993e4879aa92072d4f2d36353683cf9a2c6cdeaded8587e8464f066168f190f7347f6038df28b3cba1d8b8a3ca0b700ee085019af5014966 SHA512 d3e5dd536726976b705fe4c78c67eaf345b8f47225919c0ca1609d75e74343d9a16d893ef4cd5140998f23b3149cfa60f5b432ed9a7251bb3b232be9b65e7241
|
||||
DIST consul-1.5.0.tar.gz 20830405 BLAKE2B e64fbc22ade0c737db4f2f1b0e3966dbe617456a35d18a7a3cfa1b0f6ce2e335542b3add06c8b8e49995135b5a1576c824840030ac8dd46019bee915689bc5e2 SHA512 8cefb77b56b27995bba38517144bf42585bd1d9ad9a10fc0c9b6bc1a87bfbd042e336ed5e945cfce1fb8eb4b8162dbc8246e2b4109dea5767b8745a7b2159ef8
|
||||
DIST consul-1.5.1.tar.gz 21123963 BLAKE2B 4fe6a45f442d849196a7b9961110cdcc6f92931626ab583859efabe62038f6b2c356b27b37ea41b27755cca138c567be5c81854794a1ba0ccae3f9e0dfd10749 SHA512 7486d24bf1fa9fe94175abf9e008dc4fe4277c509381a524a9ee20e17bc4959f621e39be29e33622cb672ef3a04f9161e575009197bcd35c78b45f1d2637a2ea
|
||||
|
@ -0,0 +1,69 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit golang-vcs-snapshot systemd user
|
||||
GIT_COMMIT="40cec98"
|
||||
KEYWORDS="~amd64"
|
||||
EGO_PN="github.com/hashicorp/consul"
|
||||
DESCRIPTION="A tool for service discovery, monitoring and configuration"
|
||||
HOMEPAGE="https://www.consul.io"
|
||||
SRC_URI="https://github.com/hashicorp/consul/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
SLOT="0"
|
||||
LICENSE="MPL-2.0"
|
||||
IUSE=""
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND="dev-go/gox
|
||||
>=dev-lang/go-1.11:=
|
||||
>=dev-go/go-tools-0_pre20160121"
|
||||
RDEPEND=""
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup consul
|
||||
enewuser consul -1 -1 /var/lib/${PN} consul
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -e 's:go get -u -v $(GOTOOLS)::' \
|
||||
-e 's:vendorfmt dev-build:dev-build:' \
|
||||
-i "src/${EGO_PN}/GNUmakefile" || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# The dev target sets causes build.sh to set appropriate XC_OS
|
||||
# and XC_ARCH, and skips generation of an unused zip file,
|
||||
# avoiding a dependency on app-arch/zip.
|
||||
GOPATH="${S}" \
|
||||
GOBIN="${S}/bin" \
|
||||
GIT_DESCRIBE="v${PV}" \
|
||||
GIT_DIRTY="" \
|
||||
GIT_COMMIT="${GIT_COMMIT}" \
|
||||
emake -C "src/${EGO_PN}" dev-build
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local x
|
||||
|
||||
dobin bin/consul
|
||||
|
||||
keepdir /etc/consul.d
|
||||
insinto /etc/consul.d
|
||||
doins "${FILESDIR}/"*.json.example
|
||||
|
||||
for x in /var/{lib,log}/${PN}; do
|
||||
keepdir "${x}"
|
||||
fowners consul:consul "${x}"
|
||||
done
|
||||
|
||||
newinitd "${FILESDIR}/consul.initd" "${PN}"
|
||||
newconfd "${FILESDIR}/consul.confd" "${PN}"
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
||||
systemd_dounit "${FILESDIR}/consul.service"
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit fcaps golang-base golang-vcs-snapshot systemd user
|
||||
|
||||
EGO_PN="github.com/hashicorp/${PN}"
|
||||
VAULT_WEBUI_ARCHIVE="${P}-webui.tar.xz"
|
||||
DESCRIPTION="A tool for managing secrets"
|
||||
HOMEPAGE="https://vaultproject.io/"
|
||||
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
webui? (
|
||||
mirror://gentoo/${VAULT_WEBUI_ARCHIVE}
|
||||
https://dev.gentoo.org/~zmedico/dist/${VAULT_WEBUI_ARCHIVE}
|
||||
)"
|
||||
SLOT="0"
|
||||
LICENSE="MPL-2.0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="+webui"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DEPEND=">=dev-lang/go-1.11:=
|
||||
dev-go/gox"
|
||||
|
||||
FILECAPS=(
|
||||
-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
golang-vcs-snapshot_src_unpack
|
||||
if use webui; then
|
||||
# The webui assets build has numerous nodejs dependencies,
|
||||
# see https://github.com/hashicorp/vault/blob/master/ui/README.md
|
||||
pushd "${S}/src/${EGO_PN}" >/dev/null || die
|
||||
unpack "${VAULT_WEBUI_ARCHIVE}"
|
||||
popd >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# Avoid the need to have a git checkout
|
||||
sed -e 's:^\(GIT_COMMIT=\).*:\1:' \
|
||||
-e 's:^\(GIT_DIRTY=\).*:\1:' \
|
||||
-e s:\'\${GIT_COMMIT}\${GIT_DIRTY}\':: \
|
||||
-i src/${EGO_PN}/scripts/build.sh || die
|
||||
sed -e "/hooks/d" -i src/${EGO_PN}/Makefile || die
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup ${PN}
|
||||
enewuser ${PN} -1 -1 -1 ${PN}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
mkdir bin || die
|
||||
export -n GOCACHE XDG_CACHE_HOME #678970
|
||||
export GOBIN=${S}/bin GOPATH=${S}
|
||||
cd src/${EGO_PN} || die
|
||||
# The fmt target may need to be executed if it was previously
|
||||
# executed by an older version of go (bug 665438).
|
||||
emake fmt
|
||||
BUILD_TAGS="$(usex webui ui '')" \
|
||||
XC_ARCH=$(go env GOARCH) \
|
||||
XC_OS=$(go env GOOS) \
|
||||
XC_OSARCH=$(go env GOOS)/$(go env GOARCH) \
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodoc src/${EGO_PN}/{CHANGELOG.md,CONTRIBUTING.md,README.md}
|
||||
newinitd "${FILESDIR}/${PN}.initd" "${PN}"
|
||||
newconfd "${FILESDIR}/${PN}.confd" "${PN}"
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/${PN}.logrotated" "${PN}"
|
||||
systemd_dounit "${FILESDIR}/${PN}.service"
|
||||
|
||||
keepdir /etc/${PN}.d
|
||||
insinto /etc/${PN}.d
|
||||
doins "${FILESDIR}/"*.json.example
|
||||
|
||||
keepdir /var/log/${PN}
|
||||
fowners ${PN}:${PN} /var/log/${PN}
|
||||
|
||||
dobin bin/${PN}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST eselect-repository-6.tar.gz 5605 BLAKE2B 4a6dbb3f573cb1c4e212d02d011e79d8522828b8928bf28016b616c8eefd3beb08db8b555728d4e7f83473f2d36395eb1e2f1d8d21ccd5817e38a5d555cf6f09 SHA512 02ca2d66a6cfe4c68dea780440bf7fd431c575e535139a43c2b6201e833e43d174772486c97dc4154fc2d813935079d36c116ee907db115f7cb281db3d72add7
|
||||
DIST eselect-repository-7.tar.gz 6768 BLAKE2B f648b880ab188b5beb21161dd011d8cea0bc9dd124d524d747a1867a37f334667363be9c0ad9f04275aa1534b904a519d7551c25ea547ae2acff625382c35dbd SHA512 87569158dce3acfdd81a469387fe1a7a7c268cae2e15cfdb12d8377984be5feb674c9b385f0171d27dbe8c2066ae98b2c9a74214340e85380cba173ba26d6f0f
|
||||
|
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python{3_5,3_6,3_7} )
|
||||
inherit python-single-r1
|
||||
|
||||
DESCRIPTION="Manage repos.conf via eselect"
|
||||
HOMEPAGE="https://github.com/mgorny/eselect-repository"
|
||||
SRC_URI="https://github.com/mgorny/eselect-repository/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
IUSE=""
|
||||
REQUIRED_USE=${PYTHON_REQUIRED_USE}
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
app-admin/eselect
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
net-misc/wget"
|
||||
|
||||
src_compile() {
|
||||
MAKEARGS=(
|
||||
PREFIX="${EPREFIX}/usr"
|
||||
SYSCONFDIR="${EPREFIX}/etc"
|
||||
SHAREDSTATEDIR="${EPREFIX}/var"
|
||||
ESELECTDIR="${EPREFIX}/usr/share/eselect/modules"
|
||||
)
|
||||
|
||||
emake "${MAKEARGS[@]}"
|
||||
python_fix_shebang eselect-repo-helper
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake "${MAKEARGS[@]}" DESTDIR="${D}" install
|
||||
keepdir /var/db/repos
|
||||
einstalldocs
|
||||
}
|
Binary file not shown.
@ -1,42 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="A reimplementation of the Plan 9 shell"
|
||||
HOMEPAGE="http://static.tobold.org/"
|
||||
SRC_URI="http://static.tobold.org/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="rc"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="libedit readline"
|
||||
|
||||
RDEPEND="readline? ( sys-libs/readline:0 )
|
||||
libedit? ( dev-libs/libedit )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_configure() {
|
||||
local myconf="--with-history"
|
||||
use readline && myconf="--with-edit=readline"
|
||||
use libedit && myconf="--with-edit=edit"
|
||||
|
||||
econf \
|
||||
--disable-dependency-tracking \
|
||||
"${myconf}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
into /
|
||||
newbin rc rcsh
|
||||
newman rc.1 rcsh.1
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! grep -q '^/bin/rcsh$' "${EROOT}"/etc/shells ; then
|
||||
ebegin "Updating /etc/shells"
|
||||
echo "/bin/rcsh" >> "${EROOT}"/etc/shells
|
||||
eend $?
|
||||
fi
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,974 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20190305-2052Z"
|
||||
SUBSLOT="18"
|
||||
|
||||
JAVA_PKG_OPT_USE="jdbc"
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils systemd flag-o-matic prefix toolchain-funcs \
|
||||
java-pkg-opt-2 user cmake-utils
|
||||
|
||||
SRC_URI="https://downloads.mariadb.org/interstitial/${P}/source/${P}.tar.gz "
|
||||
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://mariadb.org/"
|
||||
DESCRIPTION="An enhanced, drop-in replacement for MySQL"
|
||||
LICENSE="GPL-2 LGPL-2.1+"
|
||||
SLOT="0/${SUBSLOT:-0}"
|
||||
IUSE="+backup bindist client-libs cracklib debug extraengine galera innodb-lz4
|
||||
innodb-lzo innodb-snappy jdbc jemalloc kerberos latin1 libressl mroonga
|
||||
numa odbc oqgraph pam +perl profiling rocksdb selinux +server sphinx
|
||||
sst-rsync sst-mariabackup static systemd systemtap tcmalloc
|
||||
test tokudb xml yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="!bindist? ( bindist ) libressl? ( test )"
|
||||
|
||||
REQUIRED_USE="jdbc? ( extraengine server !static )
|
||||
server? ( tokudb? ( jemalloc !tcmalloc ) )
|
||||
?? ( tcmalloc jemalloc )
|
||||
static? ( yassl !pam )"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR%/}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras"
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR%/}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}"/20015_all_mariadb-pkgconfig-location.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mariadb-10.3.12-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20024_all_mariadb-10.2.6-mysql_st-regression.patch
|
||||
"${MY_PATCH_DIR}"/20025_all_mariadb-10.2.6-gssapi-detect.patch
|
||||
"${MY_PATCH_DIR}"/20035_all_mariadb-10.3-atomic-detection.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
kerberos? ( virtual/krb5 )
|
||||
yassl? ( net-libs/gnutls:0= )
|
||||
!yassl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
)
|
||||
sys-libs/ncurses:0=
|
||||
!bindist? (
|
||||
sys-libs/binutils-libs:0=
|
||||
>=sys-libs/readline-4.1:0=
|
||||
)
|
||||
server? (
|
||||
backup? ( app-arch/libarchive:0= )
|
||||
cracklib? ( sys-libs/cracklib:0= )
|
||||
extraengine? (
|
||||
odbc? ( dev-db/unixODBC:0= )
|
||||
xml? ( dev-libs/libxml2:2= )
|
||||
)
|
||||
innodb-lz4? ( app-arch/lz4 )
|
||||
innodb-lzo? ( dev-libs/lzo )
|
||||
innodb-snappy? ( app-arch/snappy )
|
||||
mroonga? ( app-text/groonga-normalizer-mysql >=app-text/groonga-7.0.4 )
|
||||
numa? ( sys-process/numactl )
|
||||
oqgraph? ( >=dev-libs/boost-1.40.0:0= dev-libs/judy:0= )
|
||||
pam? ( virtual/pam:0= )
|
||||
systemd? ( sys-apps/systemd:= )
|
||||
tokudb? ( app-arch/snappy )
|
||||
)
|
||||
>=dev-libs/libpcre-8.41-r1:3=
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
server? ( extraengine? ( jdbc? ( >=virtual/jdk-1.6 ) ) )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
!dev-db/mysql !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
!<virtual/mysql-5.6-r11
|
||||
${COMMON_DEPEND}
|
||||
server? ( galera? (
|
||||
sys-apps/iproute2
|
||||
=sys-cluster/galera-25*
|
||||
sst-rsync? ( sys-process/lsof )
|
||||
sst-mariabackup? ( net-misc/socat[ssl] )
|
||||
) )
|
||||
perl? ( !dev-db/mytop
|
||||
virtual/perl-Getopt-Long
|
||||
dev-perl/TermReadKey
|
||||
virtual/perl-Term-ANSIColor
|
||||
virtual/perl-Time-HiRes )
|
||||
server? ( extraengine? ( jdbc? ( >=virtual/jre-1.6 ) ) )
|
||||
"
|
||||
# For other stuff to bring us in
|
||||
# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
|
||||
PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )
|
||||
server? ( ~virtual/mysql-5.6[static=] )"
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
if use tokudb && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} with tokudb needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
# Bug 565584. InnoDB now requires atomic functions introduced with gcc-4.7 on
|
||||
# non x86{,_64} arches
|
||||
if ! use amd64 && ! use x86 && [[ ${GCC_MAJOR_SET} -lt 4 || \
|
||||
${GCC_MAJOR_SET} -eq 4 && ${GCC_MINOR_SET} -lt 7 ]] ; then
|
||||
eerror "${PN} needs to be built with gcc-4.7 or later."
|
||||
eerror "Please use gcc-config to switch to gcc-4.7 or later version."
|
||||
die
|
||||
fi
|
||||
fi
|
||||
java-pkg-opt-2_pkg_setup
|
||||
if has test ${FEATURES} && \
|
||||
use server && ! has userpriv ${FEATURES} ; then
|
||||
eerror "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
java-pkg-opt-2_pkg_preinst
|
||||
|
||||
# Here we need to see if the implementation switched client libraries
|
||||
# We check if this is a new instance of the package and a client library already exists
|
||||
local SHOW_ABI_MESSAGE libpath
|
||||
if [[ -z ${REPLACING_VERSIONS} && -e "${EROOT}usr/$(get_libdir)/libmysqlclient.so" ]] ; then
|
||||
libpath=$(readlink "${EROOT}usr/$(get_libdir)/libmysqlclient.so")
|
||||
elog "Due to ABI changes when switching between different client libraries,"
|
||||
elog "revdep-rebuild must find and rebuild all packages linking to libmysqlclient."
|
||||
elog "Please run: revdep-rebuild --library ${libpath}"
|
||||
ewarn "Failure to run revdep-rebuild may cause issues with other programs or libraries"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Create log directory securely if it does not exist
|
||||
[[ -d "${ROOT}${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${ROOT}${MY_LOGDIR}"
|
||||
|
||||
if use server ; then
|
||||
if use pam; then
|
||||
einfo
|
||||
elog "This install includes the PAM authentication plugin."
|
||||
elog "To activate and configure the PAM plugin, please read:"
|
||||
elog "https://mariadb.com/kb/en/mariadb/pam-authentication-plugin/"
|
||||
einfo
|
||||
fi
|
||||
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]] ; then
|
||||
einfo
|
||||
elog "You might want to run:"
|
||||
elog "\"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "if this is a new install."
|
||||
elog
|
||||
elog "If you are switching server implentations, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
else
|
||||
einfo
|
||||
elog "If you are upgrading major versions, you should run the"
|
||||
elog "mysql_upgrade tool."
|
||||
einfo
|
||||
fi
|
||||
|
||||
if use galera ; then
|
||||
einfo
|
||||
elog "Be sure to edit the my.cnf file to activate your cluster settings."
|
||||
elog "This should be done after running \"emerge --config =${CATEGORY}/${PF}\""
|
||||
elog "The first time the cluster is activated, you should add"
|
||||
elog "--wsrep-new-cluster to the options in /etc/conf.d/mysql for one node."
|
||||
elog "This option should then be removed for subsequent starts."
|
||||
einfo
|
||||
fi
|
||||
fi
|
||||
|
||||
# Note about configuration change
|
||||
einfo
|
||||
elog "This version of mariadb reorganizes the configuration from a single my.cnf"
|
||||
elog "to several files in /etc/mysql/${PN}.d."
|
||||
elog "Please backup any changes you made to /etc/mysql/my.cnf"
|
||||
elog "and add them as a new file under /etc/mysql/${PN}.d with a .cnf extension."
|
||||
elog "You may have as many files as needed and they are read alphabetically."
|
||||
elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
|
||||
einfo
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
# Grab the patches
|
||||
[[ "${MY_EXTRAS_VER}" == "live" ]] && S="${WORKDIR}/mysql-extras" git-r3_src_unpack
|
||||
|
||||
mv -f "${WORKDIR}/${P/_rc/}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
if use jemalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt"
|
||||
elif use tcmalloc; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt"
|
||||
fi
|
||||
|
||||
# Don't build bundled xz-utils for tokudb
|
||||
echo > "${S}/storage/tokudb/PerconaFT/cmake_modules/TokuThirdParty.cmake" || die
|
||||
sed -i -e 's/ build_lzma//' -e 's/ build_snappy//' "${S}/storage/tokudb/PerconaFT/ft/CMakeLists.txt" || die
|
||||
sed -i -e 's/add_dependencies\(tokuportability_static_conv build_jemalloc\)//' "${S}/storage/tokudb/PerconaFT/portability/CMakeLists.txt" || die
|
||||
|
||||
local plugin
|
||||
local server_plugins=( handler_socket auth_socket feedback metadata_lock_info
|
||||
locale_info qc_info server_audit sql_errlog )
|
||||
local test_plugins=( audit_null auth_examples daemon_example fulltext
|
||||
debug_key_management example_key_management versioning )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
_disable_engine test_sql_discovery
|
||||
fi
|
||||
|
||||
_disable_engine example
|
||||
|
||||
if ! use oqgraph ; then # avoids extra library checks
|
||||
_disable_engine oqgraph
|
||||
fi
|
||||
|
||||
if use mroonga ; then
|
||||
# Remove the bundled groonga
|
||||
# There is no CMake flag, it simply checks for existance
|
||||
rm -r "${S}"/storage/mroonga/vendor/groonga || die "could not remove packaged groonga"
|
||||
else
|
||||
_disable_engine mroonga
|
||||
fi
|
||||
|
||||
cmake-utils_src_prepare
|
||||
java-pkg-opt-2_src_prepare
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
# bug 508724 mariadb cannot use ld.gold
|
||||
tc-ld-disable-gold
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
|
||||
-DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DSYSCONFDIR="${EPREFIX}/etc/mysql"
|
||||
-DINSTALL_BINDIR=bin
|
||||
-DINSTALL_DOCDIR=share/doc/${PF}
|
||||
-DINSTALL_DOCREADMEDIR=share/doc/${PF}
|
||||
-DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_INFODIR=share/info
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mariadb
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mariadb/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mariadb"
|
||||
-DWITH_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
-DWITH_LIBEDIT=0
|
||||
-DWITH_ZLIB=system
|
||||
-DWITHOUT_LIBWRAP=1
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DINSTALL_UNIX_ADDRDIR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
-DINSTALL_SYSTEMD_UNITDIR="$(systemd_get_systemunitdir)"
|
||||
# The build forces this to be defined when cross-compiling. We pass it
|
||||
# all the time for simplicity and to make sure it is actually correct.
|
||||
-DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
|
||||
-DPKG_CONFIG_EXECUTABLE="${EPREFIX}/usr/bin/$(tc-getPKG_CONFIG)"
|
||||
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
|
||||
-DAUTH_GSSAPI_PLUGIN_TYPE=$(usex kerberos DYNAMIC OFF)
|
||||
-DCONC_WITH_EXTERNAL_ZLIB=YES
|
||||
-DWITH_EXTERNAL_ZLIB=YES
|
||||
-DSUFFIX_INSTALL_DIR=""
|
||||
-DWITH_UNITTEST=OFF
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DCLIENT_PLUGIN_DIALOG=OFF
|
||||
-DCLIENT_PLUGIN_AUTH_GSSAPI_CLIENT=OFF
|
||||
-DCLIENT_PLUGIN_MYSQL_CLEAR_PASSWORD=STATIC
|
||||
-DCLIENT_PLUGIN_CACHING_SHA2_PASSWORD=OFF
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mariadb/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use yassl ; then
|
||||
mycmakeargs+=( -DWITH_SSL=system -DCLIENT_PLUGIN_SHA256_PASSWORD=STATIC )
|
||||
else
|
||||
mycmakeargs+=( -DWITH_SSL=bundled )
|
||||
fi
|
||||
|
||||
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
|
||||
mycmakeargs+=(
|
||||
-DWITH_READLINE=$(usex bindist 1 0)
|
||||
-DNOT_FOR_DISTRIBUTION=$(usex bindist 0 1)
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
|
||||
if use server ; then
|
||||
|
||||
# Federated{,X} must be treated special otherwise they will not be built as plugins
|
||||
if ! use extraengine ; then
|
||||
mycmakeargs+=(
|
||||
-DPLUGIN_FEDERATED=NO
|
||||
-DPLUGIN_FEDERATEDX=NO )
|
||||
fi
|
||||
|
||||
mycmakeargs+=(
|
||||
-DWITH_PCRE=system
|
||||
-DPLUGIN_OQGRAPH=$(usex oqgraph DYNAMIC NO)
|
||||
-DPLUGIN_SPHINX=$(usex sphinx YES NO)
|
||||
-DPLUGIN_TOKUDB=$(usex tokudb YES NO)
|
||||
-DPLUGIN_AUTH_PAM=$(usex pam YES NO)
|
||||
-DPLUGIN_CRACKLIB_PASSWORD_CHECK=$(usex cracklib YES NO)
|
||||
-DPLUGIN_CASSANDRA=NO
|
||||
-DPLUGIN_SEQUENCE=$(usex extraengine YES NO)
|
||||
-DPLUGIN_SPIDER=$(usex extraengine YES NO)
|
||||
-DPLUGIN_CONNECT=$(usex extraengine YES NO)
|
||||
-DCONNECT_WITH_MYSQL=1
|
||||
-DCONNECT_WITH_LIBXML2=$(usex xml)
|
||||
-DCONNECT_WITH_ODBC=$(usex odbc)
|
||||
-DCONNECT_WITH_JDBC=$(usex jdbc)
|
||||
# Build failure and autodep wrt bug 639144
|
||||
-DCONNECT_WITH_MONGO=OFF
|
||||
-DWITH_WSREP=$(usex galera)
|
||||
-DWITH_INNODB_LZ4=$(usex innodb-lz4 ON OFF)
|
||||
-DWITH_INNODB_LZO=$(usex innodb-lzo ON OFF)
|
||||
-DWITH_INNODB_SNAPPY=$(usex innodb-snappy ON OFF)
|
||||
-DPLUGIN_MROONGA=$(usex mroonga DYNAMIC NO)
|
||||
-DPLUGIN_AUTH_GSSAPI=$(usex kerberos DYNAMIC NO)
|
||||
-DWITH_MARIABACKUP=$(usex backup ON OFF)
|
||||
-DWITH_LIBARCHIVE=$(usex backup ON OFF)
|
||||
-DINSTALL_SQLBENCHDIR=""
|
||||
-DPLUGIN_ROCKSDB=$(usex rocksdb DYNAMIC NO)
|
||||
# systemd is only linked to for server notification
|
||||
-DWITH_SYSTEMD=$(usex systemd yes no)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
)
|
||||
|
||||
# Workaround for MDEV-14524
|
||||
use tokudb && mycmakeargs+=( -DTOKUDB_OK=1 )
|
||||
|
||||
if use test ; then
|
||||
# This is needed for the new client lib which tests a real, open server
|
||||
mycmakeargs+=( -DSKIP_TESTS=ON )
|
||||
fi
|
||||
|
||||
if [[ ( -n ${MYSQL_DEFAULT_CHARSET} ) && ( -n ${MYSQL_DEFAULT_COLLATION} ) ]]; then
|
||||
ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
|
||||
ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
|
||||
ewarn "You MUST file bugs without these variables set."
|
||||
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
|
||||
-DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
|
||||
)
|
||||
|
||||
elif ! use latin1 ; then
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DDEFAULT_CHARSET=latin1
|
||||
-DDEFAULT_COLLATION=latin1_swedish_ci
|
||||
)
|
||||
fi
|
||||
mycmakeargs+=(
|
||||
-DEXTRA_CHARSETS=all
|
||||
-DMYSQL_USER=mysql
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DWITH_PROFILING=$(usex profiling)
|
||||
)
|
||||
|
||||
if use static; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
if use jemalloc || use tcmalloc ; then
|
||||
mycmakeargs+=( -DWITH_SAFEMALLOC=OFF )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DEXTRA_CHARSETS=none
|
||||
-DINSTALL_SQLBENCHDIR=
|
||||
-DWITH_SYSTEMD=no
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
# Remove an unnecessary, private config header which will never match between ABIs and is not meant to be used
|
||||
if [[ -f "${ED}/usr/include/mysql/server/private/config.h" ]] ; then
|
||||
rm "${ED}/usr/include/mysql/server/private/config.h" || die
|
||||
fi
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
# Convenience links
|
||||
einfo "Making Convenience links for mysqlcheck multi-call binary"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqlrepair"
|
||||
dosym "mysqlcheck" "/usr/bin/mysqloptimize"
|
||||
|
||||
# INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
|
||||
if [[ -d "${ED}/usr/data" ]] ; then
|
||||
rm -Rf "${ED}/usr/data" || die
|
||||
fi
|
||||
|
||||
# Unless they explicitly specific USE=test, then do not install the
|
||||
# testsuite. It DOES have a use to be installed, esp. when you want to do a
|
||||
# validation of your database configuration after tuning it.
|
||||
if ! use test ; then
|
||||
rm -rf "${D}/${MY_SHAREDSTATEDIR}/mysql-test"
|
||||
fi
|
||||
|
||||
# Configuration stuff
|
||||
einfo "Building default configuration ..."
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}"
|
||||
[[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
|
||||
cp "${FILESDIR}/my.cnf-10.2" "${TMPDIR}/my.cnf" || die
|
||||
eprefixify "${TMPDIR}/my.cnf"
|
||||
doins "${TMPDIR}/my.cnf"
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mariadb.d"
|
||||
cp "${FILESDIR}/my.cnf.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
|
||||
eprefixify "${TMPDIR}/50-distro-client.cnf"
|
||||
doins "${TMPDIR}/50-distro-client.cnf"
|
||||
|
||||
if use server ; then
|
||||
mycnf_src="my.cnf.distro-server"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR}/${mycnf_src}" \
|
||||
> "${TMPDIR}/my.cnf.ok" || die
|
||||
if use prefix ; then
|
||||
sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
|
||||
"${TMPDIR}/my.cnf.ok" || die
|
||||
fi
|
||||
if use latin1 ; then
|
||||
sed -i \
|
||||
-e "/character-set/s|utf8|latin1|g" \
|
||||
"${TMPDIR}/my.cnf.ok" || die
|
||||
fi
|
||||
eprefixify "${TMPDIR}/my.cnf.ok"
|
||||
newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
|
||||
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
# Manually install supporting files that conflict with other packages
|
||||
# but are needed for galera and initial installation
|
||||
exeinto /usr/libexec/mariadb
|
||||
doexe "${BUILD_DIR}/extra/my_print_defaults" "${BUILD_DIR}/extra/perror"
|
||||
fi
|
||||
|
||||
# Remove mytop if perl is not selected
|
||||
if [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl ; then
|
||||
rm -f "${ED}/usr/bin/mytop" || die
|
||||
fi
|
||||
|
||||
# Fix a dangling symlink when galera is not built
|
||||
if [[ -L "${ED}/usr/bin/wsrep_sst_rsync_wan" ]] && ! use galera ; then
|
||||
rm "${ED}/usr/bin/wsrep_sst_rsync_wan" || die
|
||||
fi
|
||||
|
||||
# Remove broken SST scripts that are incompatible
|
||||
local scriptremove
|
||||
for scriptremove in wsrep_sst_xtrabackup wsrep_sst_xtrabackup-v2 ; do
|
||||
if [[ -e "${ED}/usr/bin/${scriptremove}" ]] ; then
|
||||
rm "${ED}/usr/bin/${scriptremove}" || die
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='extraengine perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mariadb-X.X.XX.ebuild \
|
||||
# digest clean package
|
||||
src_test() {
|
||||
|
||||
_disable_test() {
|
||||
local rawtestname reason
|
||||
rawtestname="${1}" ; shift
|
||||
reason="${@}"
|
||||
ewarn "test '${rawtestname}' disabled: '${reason}'"
|
||||
echo ${rawtestname} : ${reason} >> "${T}/disabled.def"
|
||||
}
|
||||
|
||||
local TESTDIR="${BUILD_DIR}/mysql-test"
|
||||
local retstatus_unit
|
||||
local retstatus_tests
|
||||
|
||||
if ! use server ; then
|
||||
einfo "Skipping server tests due to minimal build."
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [[ $UID -eq 0 ]]; then
|
||||
die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
|
||||
fi
|
||||
has usersandbox $FEATURES && ewarn "Some tests may fail with FEATURES=usersandbox"
|
||||
|
||||
einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
|
||||
|
||||
# Run CTest (test-units)
|
||||
cmake-utils_src_test
|
||||
retstatus_unit=$?
|
||||
|
||||
# Ensure that parallel runs don't die
|
||||
export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
|
||||
# Enable parallel testing, auto will try to detect number of cores
|
||||
# You may set this by hand.
|
||||
# The default maximum is 8 unless MTR_MAX_PARALLEL is increased
|
||||
export MTR_PARALLEL="${MTR_PARALLEL:-auto}"
|
||||
|
||||
# create directories because mysqladmin might run out of order
|
||||
mkdir -p "${T}"/var-tests{,/log} || die
|
||||
|
||||
# Run mysql tests
|
||||
pushd "${TESTDIR}" > /dev/null || die
|
||||
|
||||
touch "${T}/disabled.def"
|
||||
# These are failing in MariaDB 10.0 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
# main.mysql_client_test, main.mysql_client_test_nonblock
|
||||
# main.mysql_client_test_comp:
|
||||
# segfaults at random under Portage only, suspect resource limits.
|
||||
|
||||
local t
|
||||
for t in plugins.cracklib_password_check plugins.two_password_validations ; do
|
||||
_disable_test "$t" "False positive due to varying policies"
|
||||
done
|
||||
|
||||
for t in main.mysql_client_test main.mysql_client_test_nonblock \
|
||||
main.mysql main.gis_notembedded \
|
||||
main.mysql_client_test_comp rpl.rpl_extra_col_master_myisam ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
_disable_test main.plugin_auth "Needs client libraries built"
|
||||
|
||||
_disable_test main.func_time "Dependent on time test was written"
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mariadb"}
|
||||
MY_SYSCONFDIR=${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
|
||||
MY_LOCALSTATEDIR=${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
|
||||
MY_LOGDIR=${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
|
||||
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=""
|
||||
if [[ -f "${MY_SYSCONFDIR}/my.cnf" ]] ; then
|
||||
MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR=`grep ^datadir "${MY_SYSCONFDIR}/my.cnf" \
|
||||
| sed -e 's/.*=\s*//' \
|
||||
| tail -n1`
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${MY_DATADIR}" ]] ; then
|
||||
MY_DATADIR="${MY_LOCALSTATEDIR}"
|
||||
einfo "Using default MY_DATADIR"
|
||||
fi
|
||||
elog "MySQL MY_DATADIR is ${MY_DATADIR}"
|
||||
|
||||
if [[ -z "${PREVIOUS_DATADIR}" ]] ; then
|
||||
if [[ -e "${MY_DATADIR}" ]] ; then
|
||||
# If you get this and you're wondering about it, see bug #207636
|
||||
elog "MySQL datadir found in ${MY_DATADIR}"
|
||||
elog "A new one will not be created."
|
||||
PREVIOUS_DATADIR="yes"
|
||||
else
|
||||
PREVIOUS_DATADIR="no"
|
||||
fi
|
||||
export PREVIOUS_DATADIR
|
||||
fi
|
||||
else
|
||||
if [[ ${EBUILD_PHASE} == "config" ]]; then
|
||||
local new_MY_DATADIR
|
||||
new_MY_DATADIR=`"my_print_defaults" mysqld 2>/dev/null \
|
||||
| sed -ne '/datadir/s|^--datadir=||p' \
|
||||
| tail -n1`
|
||||
|
||||
if [[ ( -n "${new_MY_DATADIR}" ) && ( "${new_MY_DATADIR}" != "${MY_DATADIR}" ) ]]; then
|
||||
ewarn "MySQL MY_DATADIR has changed"
|
||||
ewarn "from ${MY_DATADIR}"
|
||||
ewarn "to ${new_MY_DATADIR}"
|
||||
MY_DATADIR="${new_MY_DATADIR}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
export MY_SHAREDSTATEDIR MY_SYSCONFDIR
|
||||
export MY_LOCALSTATEDIR MY_LOGDIR
|
||||
export MY_DATADIR
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT}"usr/libexec/mariadb/my_print_defaults
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
"${mypd}" $extra_options $section | sed -n "/^${flag}/s,${flag},,gp"
|
||||
}
|
||||
local old_MY_DATADIR="${MY_DATADIR}"
|
||||
local old_HOME="${HOME}"
|
||||
# my_print_defaults needs to read stuff in $HOME/.my.cnf
|
||||
export HOME=${EPREFIX}/root
|
||||
|
||||
# Make sure the vars are correctly initialized
|
||||
mysql_init_vars
|
||||
|
||||
[[ -z "${MY_DATADIR}" ]] && die "Sorry, unable to find MY_DATADIR"
|
||||
if [[ ! -x "${EROOT}/usr/sbin/mysqld" ]] ; then
|
||||
die "Minimal builds do NOT include the MySQL server"
|
||||
fi
|
||||
|
||||
if [[ ( -n "${MY_DATADIR}" ) && ( "${MY_DATADIR}" != "${old_MY_DATADIR}" ) ]]; then
|
||||
local MY_DATADIR_s="${ROOT}/${MY_DATADIR}"
|
||||
MY_DATADIR_s="${MY_DATADIR_s%%/}"
|
||||
local old_MY_DATADIR_s="${ROOT}/${old_MY_DATADIR}"
|
||||
old_MY_DATADIR_s="${old_MY_DATADIR_s%%/}"
|
||||
|
||||
if [[ ( -d "${old_MY_DATADIR_s}" ) && ( "${old_MY_DATADIR_s}" != / ) ]]; then
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Both ${old_MY_DATADIR_s} and ${MY_DATADIR_s} exist"
|
||||
ewarn "Attempting to use ${MY_DATADIR_s} and preserving ${old_MY_DATADIR_s}"
|
||||
else
|
||||
elog "Moving MY_DATADIR from ${old_MY_DATADIR_s} to ${MY_DATADIR_s}"
|
||||
mv --strip-trailing-slashes -T "${old_MY_DATADIR_s}" "${MY_DATADIR_s}" \
|
||||
|| die "Moving MY_DATADIR failed"
|
||||
fi
|
||||
else
|
||||
ewarn "Previous MY_DATADIR (${old_MY_DATADIR_s}) does not exist"
|
||||
if [[ -d "${MY_DATADIR_s}" ]]; then
|
||||
ewarn "Attempting to use ${MY_DATADIR_s}"
|
||||
else
|
||||
eerror "New MY_DATADIR (${MY_DATADIR_s}) does not exist"
|
||||
die "Configuration Failed! Please reinstall ${CATEGORY}/${PN}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
local pwd1="a"
|
||||
local pwd2="b"
|
||||
local maxtry=15
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
local tmp_mysqld_password_source=
|
||||
|
||||
for tmp_mysqld_password_source in mysql client; do
|
||||
einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
|
||||
if [[ -n "${MYSQL_ROOT_PASSWORD}" ]]; then
|
||||
if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]]; then
|
||||
ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
continue
|
||||
fi
|
||||
|
||||
einfo "Found password in '${tmp_mysqld_password_source}' section!"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Sometimes --show is required to display passwords in some implementations of my_print_defaults
|
||||
if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]]; then
|
||||
MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
|
||||
fi
|
||||
|
||||
unset tmp_mysqld_password_source
|
||||
fi
|
||||
MYSQL_TMPDIR="$(_getoptval mysqld tmpdir | tail -n1)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log | tail -n1)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin | tail -n1)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${ROOT}/$MYSQL_TMPDIR" ]]; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
if [[ ! -d "${ROOT}/$MYSQL_LOG_BIN" ]]; then
|
||||
einfo "Creating MySQL log-bin directory $MYSQL_LOG_BIN"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_LOG_BIN"
|
||||
fi
|
||||
if [[ ! -d "${EROOT}/$MYSQL_RELAY_LOG" ]]; then
|
||||
einfo "Creating MySQL relay-log directory $MYSQL_RELAY_LOG"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT}/$MYSQL_RELAY_LOG"
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT}/${MY_DATADIR}/mysql" ]] ; then
|
||||
ewarn "You have already a MySQL database in place."
|
||||
ewarn "(${ROOT}/${MY_DATADIR}/*)"
|
||||
ewarn "Please rename or delete it if you wish to replace it."
|
||||
die "MySQL database already exists!"
|
||||
fi
|
||||
|
||||
# Bug #213475 - MySQL _will_ object strenously if your machine is named
|
||||
# localhost. Also causes weird failures.
|
||||
[[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
|
||||
|
||||
if [ -z "${MYSQL_ROOT_PASSWORD}" ]; then
|
||||
|
||||
einfo "Please provide a password for the mysql 'root' user now"
|
||||
einfo "or through the ${HOME}/.my.cnf file."
|
||||
ewarn "Avoid [\"'\\_%] characters in the password"
|
||||
read -rsp " >" pwd1 ; echo
|
||||
|
||||
einfo "Retype the password"
|
||||
read -rsp " >" pwd2 ; echo
|
||||
|
||||
if [[ "x$pwd1" != "x$pwd2" ]] ; then
|
||||
die "Passwords are not the same"
|
||||
fi
|
||||
MYSQL_ROOT_PASSWORD="${pwd1}"
|
||||
unset pwd1 pwd2
|
||||
fi
|
||||
|
||||
local options
|
||||
local sqltmp="$(emktemp)"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see https://bugs.mysql.com/bug.php?id=31312
|
||||
use prefix && options="${options} '--defaults-file=${MY_SYSCONFDIR}/my.cnf'"
|
||||
|
||||
# Figure out which options we need to disable to do the setup
|
||||
local helpfile="${TMPDIR}/mysqld-help"
|
||||
"${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
|
||||
for opt in grant-tables host-cache name-resolve networking slave-start \
|
||||
federated ssl log-bin relay-log slow-query-log external-locking \
|
||||
log-slave-updates \
|
||||
; do
|
||||
optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
|
||||
egrep -sq -- "${optexp}" "${helpfile}" && options="${options} ${optfull}"
|
||||
done
|
||||
|
||||
einfo "Creating the mysql database and setting proper permissions on it ..."
|
||||
|
||||
# Now that /var/run is a tmpfs mount point, we need to ensure it exists before using it
|
||||
PID_DIR="${EROOT}/var/run/mysqld"
|
||||
if [[ ! -d "${PID_DIR}" ]]; then
|
||||
install -d -m 755 -o mysql -g mysql "${PID_DIR}" || die "Could not create pid directory"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${MY_DATADIR}" ]]; then
|
||||
install -d -m 750 -o mysql -g mysql "${MY_DATADIR}" || die "Could not create data directory"
|
||||
fi
|
||||
|
||||
pushd "${TMPDIR}" &>/dev/null || die
|
||||
|
||||
# Filling timezones, see
|
||||
# https://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
"${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" > "${sqltmp}" 2>/dev/null
|
||||
|
||||
local cmd=( "${EROOT}usr/share/mariadb/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT}usr/bin/mysql_install_db" )
|
||||
cmd+=( "--basedir=${EPREFIX}/usr" ${options} "--datadir=${ROOT}/${MY_DATADIR}" "--tmpdir=${ROOT}/${MYSQL_TMPDIR}" )
|
||||
einfo "Command: ${cmd[*]}"
|
||||
su -s /bin/sh -c "${cmd[*]}" mysql \
|
||||
>"${TMPDIR}"/mysql_install_db.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
grep -B5 -A999 -i "ERROR" "${TMPDIR}"/mysql_install_db.log 1>&2
|
||||
die "Failed to initialize mysqld. Please review ${EPREFIX}/var/log/mysql/mysqld.err AND ${TMPDIR}/mysql_install_db.log"
|
||||
fi
|
||||
popd &>/dev/null || die
|
||||
[[ -f "${ROOT}/${MY_DATADIR}/mysql/user.frm" ]] \
|
||||
|| die "MySQL databases not installed"
|
||||
|
||||
use prefix || options="${options} --user=mysql"
|
||||
|
||||
local socket="${EROOT}/var/run/mysqld/mysqld${RANDOM}.sock"
|
||||
local pidfile="${EROOT}/var/run/mysqld/mysqld${RANDOM}.pid"
|
||||
local mysqld="${EROOT}/usr/sbin/mysqld \
|
||||
${options} \
|
||||
--log-warnings=0 \
|
||||
--basedir=${EROOT}/usr \
|
||||
--datadir=${ROOT}/${MY_DATADIR} \
|
||||
--max_allowed_packet=8M \
|
||||
--net_buffer_length=16K \
|
||||
--socket=${socket} \
|
||||
--pid-file=${pidfile} \
|
||||
--tmpdir=${ROOT}/${MYSQL_TMPDIR}"
|
||||
#einfo "About to start mysqld: ${mysqld}"
|
||||
ebegin "Starting mysqld"
|
||||
einfo "Command ${mysqld}"
|
||||
${mysqld} &
|
||||
rc=$?
|
||||
while ! [[ -S "${socket}" || "${maxtry}" -lt 1 ]] ; do
|
||||
maxtry=$((${maxtry}-1))
|
||||
echo -n "."
|
||||
sleep 1
|
||||
done
|
||||
eend $rc
|
||||
|
||||
if ! [[ -S "${socket}" ]]; then
|
||||
die "Completely failed to start up mysqld with: ${mysqld}"
|
||||
fi
|
||||
|
||||
ebegin "Setting root password"
|
||||
# Do this from memory, as we don't want clear text passwords in temp files
|
||||
local sql="UPDATE mysql.user SET Password = PASSWORD('${MYSQL_ROOT_PASSWORD}') WHERE USER='root'; FLUSH PRIVILEGES"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT}/usr/bin/mysql" \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,24 @@
|
||||
--- a/patch/15_all_disable-systemtap-switch.patch 2019-05-28 09:25:40.556754095 +0200
|
||||
+++ b/patch/15_all_disable-systemtap-switch.patch 2019-05-28 09:25:00.731426775 +0200
|
||||
@@ -42,8 +42,8 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
--#line 18451 "configure"
|
||||
-+#line 18453 "configure"
|
||||
+-#line 18497 "configure"
|
||||
++#line 18499 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -51,8 +51,8 @@
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
--#line 18557 "configure"
|
||||
-+#line 18559 "configure"
|
||||
+-#line 18603 "configure"
|
||||
++#line 18605 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
@ -0,0 +1,190 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
PATCH_VER="1.1"
|
||||
|
||||
TOOLCHAIN_GCC_PV=8.3.0
|
||||
GCC_CONFIG_VER=8.3.1
|
||||
|
||||
inherit toolchain-funcs toolchain
|
||||
|
||||
REL=8
|
||||
MYP=gcc-${REL}-${PV}-20190517-18C94-src
|
||||
GNATDIR=gnat-${PV}-20190517-18C94-src
|
||||
INTFDIR=gcc-interface-${REL}-${PV}-20190510-18F59-src
|
||||
BTSTRP_X86=gnat-gpl-2014-x86-linux-bin
|
||||
BTSTRP_AMD64=gnat-gpl-2014-x86_64-linux-bin
|
||||
|
||||
DESCRIPTION="GNAT Ada Compiler - GPL version"
|
||||
HOMEPAGE="http://libre.adacore.com/"
|
||||
SRC_URI+="
|
||||
http://mirrors.cdn.adacore.com/art/5cdf865331e87aa2cdf16b49
|
||||
-> ${GNATDIR}.tar.gz
|
||||
http://mirrors.cdn.adacore.com/art/5cdf8a0731e87a8f1d425049
|
||||
-> ${MYP}.tar.gz
|
||||
http://mirrors.cdn.adacore.com/art/5cdf87cc31e87aa2cdf16b50
|
||||
-> ${INTFDIR}.tar.gz
|
||||
bootstrap? (
|
||||
amd64? (
|
||||
http://mirrors.cdn.adacore.com/art/564b3ebec8e196b040fbe66c ->
|
||||
${BTSTRP_AMD64}.tar.gz
|
||||
)
|
||||
x86? (
|
||||
http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248 ->
|
||||
${BTSTRP_X86}.tar.gz
|
||||
)
|
||||
)"
|
||||
|
||||
LICENSE+=" GPL-2 GPL-3"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+bootstrap"
|
||||
|
||||
RDEPEND="!sys-devel/gcc:${GCC_CONFIG_VER}"
|
||||
DEPEND="${RDEPEND}
|
||||
elibc_glibc? ( >=sys-libs/glibc-2.13 )
|
||||
>=sys-devel/binutils-2.20"
|
||||
|
||||
S="${WORKDIR}"/${MYP}
|
||||
PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.13 )"
|
||||
|
||||
pkg_setup() {
|
||||
toolchain_pkg_setup
|
||||
|
||||
if use amd64; then
|
||||
BTSTRP=${BTSTRP_AMD64}
|
||||
else
|
||||
BTSTRP=${BTSTRP_X86}
|
||||
fi
|
||||
|
||||
if use bootstrap; then
|
||||
GCC="${WORKDIR}"/${BTSTRP}/bin/gcc
|
||||
else
|
||||
GCC=${ADA:-$(tc-getCC)}
|
||||
fi
|
||||
|
||||
gnatbase=$(basename ${GCC})
|
||||
gnatpath=$(dirname ${GCC})
|
||||
|
||||
GNATMAKE=${gnatbase/gcc/gnatmake}
|
||||
if [[ ${gnatpath} != "." ]] ; then
|
||||
GNATMAKE="${gnatpath}/${GNATMAKE}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
if ! use bootstrap && [[ -z "$(type ${GNATMAKE} 2>/dev/null)" ]] ; then
|
||||
eerror "You need a gcc compiler that provides the Ada Compiler:"
|
||||
eerror "1) use gcc-config to select the right compiler or"
|
||||
eerror "2) set the bootstrap use flag"
|
||||
die "ada compiler not available"
|
||||
fi
|
||||
|
||||
GCC_A_FAKEIT="
|
||||
${MYP}.tar.gz
|
||||
${GNATDIR}.tar.gz
|
||||
${INTFDIR}.tar.gz"
|
||||
if use bootstrap; then
|
||||
GCC_A_FAKEIT="${GCC_A_FAKEIT} ${BTSTRP}.tar.gz"
|
||||
fi
|
||||
|
||||
toolchain_src_unpack
|
||||
if use bootstrap; then
|
||||
rm ${BTSTRP}/libexec/gcc/${CHOST}/4.7.4/ld || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
CC=${GCC}
|
||||
CXX="${gnatbase/gcc/g++}"
|
||||
GNATBIND="${gnatbase/gcc/gnatbind}"
|
||||
GNATLINK="${gnatbase/gcc/gnatlink}"
|
||||
GNATLS="${gnatbase/gcc/gnatls}"
|
||||
if [[ ${gnatpath} != "." ]] ; then
|
||||
CXX="${gnatpath}/${CXX}"
|
||||
GNATBIND="${gnatpath}/${GNATBIND}"
|
||||
GNATLINK="${gnatpath}/${GNATLINK}"
|
||||
GNATLS="${gnatpath}/${GNATLS}"
|
||||
fi
|
||||
mkdir bin || die
|
||||
ln -s $(which ${GCC}) bin/gcc || die
|
||||
ln -s $(which ${CXX}) bin/g++ || die
|
||||
ln -s $(which ${GNATMAKE}) bin/gnatmake || die
|
||||
ln -s $(which ${GNATBIND}) bin/gnatbind || die
|
||||
ln -s $(which ${GNATLINK}) bin/gnatlink || die
|
||||
ln -s $(which ${GNATLS}) bin/gnatls || die
|
||||
|
||||
cd ..
|
||||
mv ${GNATDIR}/src/ada ${MYP}/gcc/ || die
|
||||
mv ${INTFDIR} ${MYP}/gcc/ada/gcc-interface || die
|
||||
eapply "${FILESDIR}"/${P}-gentoo.patch
|
||||
rm patch/27*.patch || die
|
||||
rm patch/28*.patch || die
|
||||
cd -
|
||||
sed -i \
|
||||
-e 's:$(P) ::g' \
|
||||
gcc/ada/gcc-interface/Makefile.in \
|
||||
|| die "sed failed"
|
||||
toolchain_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export PATH=${PWD}/bin:${PATH}
|
||||
local trueGCC_BRANCH_VER=${GCC_BRANCH_VER}
|
||||
GCC_BRANCH_VER=$(gcc-version)
|
||||
downgrade_arch_flags
|
||||
GCC_BRANCH_VER=${trueGCC_BRANCH_VER}
|
||||
toolchain_src_configure \
|
||||
--enable-languages=ada \
|
||||
--disable-libada
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
unset ADAFLAGS
|
||||
toolchain_src_compile
|
||||
gcc_do_make "-C gcc gnatlib-shared"
|
||||
ln -s gcc ../build/prev-gcc || die
|
||||
ln -s ${CHOST} ../build/prev-${CHOST} || die
|
||||
gcc_do_make "-C gcc gnattools"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
toolchain_src_install
|
||||
cd "${D}"${BINPATH}
|
||||
for x in gnat*; do
|
||||
# For some reason, g77 gets made instead of ${CTARGET}-g77...
|
||||
# this should take care of that
|
||||
if [[ -f ${x} ]] ; then
|
||||
# In case they're hardlinks, clear out the target first
|
||||
# otherwise the mv below will complain.
|
||||
rm -f ${CTARGET}-${x}
|
||||
mv ${x} ${CTARGET}-${x}
|
||||
fi
|
||||
|
||||
if [[ -f ${CTARGET}-${x} ]] ; then
|
||||
if ! is_crosscompile ; then
|
||||
ln -sf ${CTARGET}-${x} ${x}
|
||||
dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
|
||||
/usr/bin/${x}-${GCC_CONFIG_VER}
|
||||
fi
|
||||
# Create versioned symlinks
|
||||
dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
|
||||
/usr/bin/${CTARGET}-${x}-${GCC_CONFIG_VER}
|
||||
fi
|
||||
|
||||
if [[ -f ${CTARGET}-${x}-${GCC_CONFIG_VER} ]] ; then
|
||||
rm -f ${CTARGET}-${x}-${GCC_CONFIG_VER}
|
||||
ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst () {
|
||||
einfo "This provide the GNAT compiler with gcc for ada/c/c++ and more"
|
||||
einfo "The compiler binary is ${CTARGET}-gcc-${GCC_CONFIG_VER}"
|
||||
einfo "Even if the c/c++ compilers are using almost the same patched"
|
||||
einfo "source as the sys-devel/gcc package its use is not extensively"
|
||||
einfo "tested, and not supported for updating your system, except for ada"
|
||||
einfo "related packages"
|
||||
}
|
Binary file not shown.
@ -0,0 +1,100 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MULTILIB_COMPAT=( abi_x86_{32,64} )
|
||||
|
||||
inherit unpacker multilib-minimal
|
||||
|
||||
SUPER_PN='amdgpu-pro'
|
||||
MY_PV=$(ver_rs 2 '-')
|
||||
|
||||
DESCRIPTION="Proprietary OpenCL implementation for AMD GPUs"
|
||||
HOMEPAGE="https://www.amd.com/en/support/kb/release-notes/rn-rad-lin-19-10-unified"
|
||||
SRC_URI="${SUPER_PN}-${MY_PV}-ubuntu-18.04.tar.xz"
|
||||
|
||||
LICENSE="AMD-GPU-PRO-EULA"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RESTRICT="mirror fetch strip"
|
||||
|
||||
BDEPEND="dev-util/patchelf"
|
||||
COMMON="app-eselect/eselect-opencl
|
||||
dev-libs/ocl-icd"
|
||||
DEPEND="${COMMON}"
|
||||
RDEPEND="${COMMON}
|
||||
!media-libs/mesa[opencl]" # Bug #686790
|
||||
|
||||
QA_PREBUILT="/opt/amdgpu/lib*/*"
|
||||
|
||||
S="${WORKDIR}/${SUPER_PN}-${MY_PV}-ubuntu-18.04"
|
||||
|
||||
pkg_nofetch() {
|
||||
local pkgver=$(ver_cut 1-2)
|
||||
einfo "Please download Radeon Software for Linux version ${pkgver} for Ubuntu 18.04 from"
|
||||
einfo " ${HOMEPAGE}"
|
||||
einfo "The archive should then be placed into your distfiles directory."
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
default
|
||||
|
||||
local ids_ver="1.0.0"
|
||||
local patchlevel=$(ver_cut 3)
|
||||
cd "${S}" || die
|
||||
unpack_deb "${S}/libdrm-amdgpu-common_${ids_ver}-${patchlevel}_all.deb"
|
||||
multilib_parallel_foreach_abi multilib_src_unpack
|
||||
}
|
||||
|
||||
multilib_src_unpack() {
|
||||
local libdrm_ver="2.4.97"
|
||||
local patchlevel=$(ver_cut 3)
|
||||
local deb_abi
|
||||
[[ ${ABI} == x86 ]] && deb_abi=i386
|
||||
|
||||
mkdir -p "${BUILD_DIR}" || die
|
||||
pushd "${BUILD_DIR}" >/dev/null || die
|
||||
unpack_deb "${S}/opencl-orca-amdgpu-pro-icd_${MY_PV}_${deb_abi:-${ABI}}.deb"
|
||||
unpack_deb "${S}/libdrm-amdgpu-amdgpu1_${libdrm_ver}-${patchlevel}_${deb_abi:-${ABI}}.deb"
|
||||
popd >/dev/null || die
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local dir_abi short_abi
|
||||
[[ ${ABI} == x86 ]] && dir_abi=i386-linux-gnu && short_abi=32
|
||||
[[ ${ABI} == amd64 ]] && dir_abi=x86_64-linux-gnu && short_abi=64
|
||||
|
||||
into "/opt/amdgpu"
|
||||
patchelf --set-rpath '$ORIGIN' "opt/${SUPER_PN}/lib/${dir_abi}"/libamdocl-orca${short_abi}.so || die "Failed to fix library rpath"
|
||||
dolib.so "opt/${SUPER_PN}/lib/${dir_abi}"/*
|
||||
dolib.so "opt/amdgpu/lib/${dir_abi}"/*
|
||||
|
||||
insinto /etc/OpenCL/vendors
|
||||
echo "/opt/amdgpu/$(get_libdir)/libamdocl-orca${short_abi}.so" \
|
||||
> "${T}/${SUPER_PN}-${ABI}.icd" || die "Failed to generate ICD file for ABI ${ABI}"
|
||||
doins "${T}/${SUPER_PN}-${ABI}.icd"
|
||||
}
|
||||
|
||||
# FIXME: is this right?
|
||||
multilib_src_install_all() {
|
||||
ewarn "FOO $PWD"
|
||||
ewarn `ls`
|
||||
insinto "/opt/amdgpu"
|
||||
doins -r opt/amdgpu/share
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||
ewarn "Please note that using proprietary OpenCL libraries together with the"
|
||||
ewarn "Open Source amdgpu stack is not officially supported by AMD. Do not ask them"
|
||||
ewarn "for support in case of problems with this package."
|
||||
ewarn ""
|
||||
ewarn "Furthermore, if you have the whole AMDGPU-Pro stack installed this package"
|
||||
ewarn "will almost certainly conflict with it. This might change once AMDGPU-Pro"
|
||||
ewarn "has become officially supported by Gentoo."
|
||||
fi
|
||||
|
||||
"${ROOT}"/usr/bin/eselect opencl set --use-old ocl-icd
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit base
|
||||
|
||||
DESCRIPTION="C library implementing client support for CalDAV"
|
||||
HOMEPAGE="http://libcaldav.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/libcaldav/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib
|
||||
net-misc/curl[ssl,gnutls(+),curl_ssl_gnutls(+)]
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
doc? (
|
||||
app-doc/doxygen
|
||||
virtual/latex-base
|
||||
dev-texlive/texlive-latexextra
|
||||
)
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
econf $(use_enable doc)
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Implementation of the IDMEF XML draft"
|
||||
HOMEPAGE="https://sourceforge.net/projects/libidmef/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="debug static-libs"
|
||||
|
||||
DEPEND=">=dev-libs/libxml2-2.5.10"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
|
||||
DOCS=( AUTHORS ChangeLog FAQ NEWS README TODO )
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable debug) \
|
||||
$(use_enable static-libs static)
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
DIST librdkafka-0.11.5.tar.gz 1984510 BLAKE2B 55a27482275726233b5c9b39dfac1b9f34235c68600b5720c1a9dec782de6a4d7d084ad71e50857c32a93b39beacc891933e02f45162d0de144ecaadb3640c41 SHA512 4a8dc46ad66f23cff4d4ef2fc8daa7207bfa3e77fd3580b3f141a73b449e60ea5381e97263235b4d0d762df027a8a2cad08637d88162d9605c82d74a1e64b67c
|
||||
DIST librdkafka-0.11.6.tar.gz 1994337 BLAKE2B 7b61e6ba02c5ed58c20e604d6765f6a57ff63ab0c61f2a4c64eff55bfb6c854ef089ac9eea9acc6d44b6abdb6d1425ff23e9d4e6037c733bc5719d6b69c74ae0 SHA512 9657dc53220bbff3eb44941cff2f50ab7f71a82f7486d64ea14f67eabd4abe8c67f225a752cc1f0339439a1cc512e99ade6536d087857979cd198c0102015718
|
||||
DIST librdkafka-1.0.0.tar.gz 2465603 BLAKE2B 7006dc421ae5c2c991853f4ede9d99e7dd308b49372a7c2c859ecc0e6ee7aa3b6cda9af7a71a5813610630b564bd65c6cf18ecaefd1a1880545838d7758aea88 SHA512 15ac1e4c9042debf8d4df602ccdc5eccae3a37b305be24d724fcaffc3d1d0aafa708fc8e29d6af51f51ed6c7daf74b3041b8b9b0444e6702cd73479c8078859a
|
||||
DIST librdkafka-1.0.1.tar.gz 2466259 BLAKE2B a391d57b21711853ce7df338070512f715f3a49ead2b4f7eb1fe5500699c1891821e6bbd4b87d3debea6852eb85094aba161cb3ca95aee3c592a38be4933ecff SHA512 094599e974236814c03e688eaa5e39d817cca110ff691501826268c45653fcd6b21b60e741140a1f7ffccd49902247f08fcec82475be2e9f85feaa4340b32d4c
|
||||
|
@ -0,0 +1,75 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="Apache Kafka C/C++ client library"
|
||||
HOMEPAGE="https://github.com/edenhill/librdkafka"
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/edenhill/${PN}.git"
|
||||
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://github.com/edenhill/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="BSD-2"
|
||||
|
||||
# subslot = soname version
|
||||
SLOT="0/1"
|
||||
|
||||
IUSE="lz4 sasl ssl static-libs zstd"
|
||||
|
||||
RDEPEND="
|
||||
lz4? ( app-arch/lz4:=[static-libs(-)?] )
|
||||
sasl? ( dev-libs/cyrus-sasl:= )
|
||||
ssl? ( dev-libs/openssl:0= )
|
||||
zstd? ( app-arch/zstd:= )
|
||||
sys-libs/zlib
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${PN}-1.0.0-remove-automagic-on-zstd.patch )
|
||||
|
||||
src_configure() {
|
||||
tc-export CC CXX LD NM OBJDUMP PKG_CONFIG STRIP
|
||||
|
||||
local myeconf=(
|
||||
--no-cache
|
||||
--no-download
|
||||
--disable-debug-symbols
|
||||
$(use_enable lz4)
|
||||
$(use_enable sasl)
|
||||
$(usex static-libs '--enable-static' '')
|
||||
$(use_enable ssl)
|
||||
$(use_enable zstd)
|
||||
)
|
||||
|
||||
econf ${myeconf[@]}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -C tests run_local
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local DOCS=(
|
||||
README.md
|
||||
CONFIGURATION.md
|
||||
INTRODUCTION.md
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
if ! use static-libs; then
|
||||
find "${ED}"/usr/lib* -name '*.la' -o -name '*.a' -delete || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,248 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
# openssl-1.0.2-patches-1.6 contain additional CVE patches
|
||||
# which got fixed with this release.
|
||||
# Please use 1.7 version number when rolling a new tarball!
|
||||
PATCH_SET="openssl-1.0.2-patches-1.5"
|
||||
MY_P=${P/_/-}
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="https://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
||||
!vanilla? (
|
||||
mirror://gentoo/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~chutzpah/dist/${PN}/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~polynomial-c/dist/${PATCH_SET}.tar.xz
|
||||
)"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="1.0.0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~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 )"
|
||||
|
||||
RDEPEND=">=app-misc/c_rehash-1.7-r1
|
||||
gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )
|
||||
!=dev-libs/openssl-1.0.2*:0"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-lang/perl-5
|
||||
sctp? ( >=net-misc/lksctp-tools-1.0.12 )
|
||||
test? (
|
||||
sys-apps/diffutils
|
||||
sys-devel/bc
|
||||
)"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
# Do not install any docs
|
||||
DOCS=()
|
||||
|
||||
# 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
|
||||
# These are ported instead
|
||||
#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='f25'
|
||||
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
|
||||
)
|
||||
|
||||
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}"/crypto/ec/ || die # Moves to test/ in OpenSSL-1.1
|
||||
for i in "${FEDORA_PATCH[@]}" ; do
|
||||
eapply "${DISTDIR}"/"${i}"
|
||||
done
|
||||
eapply "${FILESDIR}"/openssl-1.0.2p-hobble-ecc.patch
|
||||
# Also see the configure parts below:
|
||||
# enable-ec \
|
||||
# $(use_ssl !bindist ec2m) \
|
||||
# $(use_ssl !bindist srp) \
|
||||
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
|
||||
eapply "${WORKDIR}"/patch/*.patch
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:='${EPREFIX%/}'/usr/share/man:') \
|
||||
Makefile.org \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
# this breaks build with 1.0.2p, not sure if it is needed anymore
|
||||
#sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
|
||||
|
||||
# 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 || die
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
||||
|
||||
sed -i '1s,^:$,#!'${EPREFIX%/}'/usr/bin/perl,' Configure #141906
|
||||
# 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 https://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: Expired https://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
|
||||
|
||||
# https://github.com/openssl/openssl/issues/2286
|
||||
if use ia64 ; then
|
||||
replace-flags -g3 -g2
|
||||
replace-flags -ggdb3 -ggdb2
|
||||
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', 'no-srp'
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
enable-ec \
|
||||
$(use_ssl !bindist ec2m) \
|
||||
$(use_ssl !bindist srp) \
|
||||
${ec_nistp_64_gcc_128} \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
enable-rc5 \
|
||||
enable-tlsext \
|
||||
$(use_ssl asm) \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl rfc3779) \
|
||||
$(use_ssl sctp) \
|
||||
$(use_ssl sslv2 ssl2) \
|
||||
$(use_ssl sslv3 ssl3) \
|
||||
$(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
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-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' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${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 V=1 depend
|
||||
emake build_libs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
dolib.so lib{crypto,ssl}.so.${SLOT}
|
||||
}
|
@ -0,0 +1,309 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
# openssl-1.0.2-patches-1.6 contain additional CVE patches
|
||||
# which got fixed with this release.
|
||||
# Please use 1.7 version number when rolling a new tarball!
|
||||
PATCH_SET="openssl-1.0.2-patches-1.5"
|
||||
MY_P=${P/_/-}
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="https://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
|
||||
!vanilla? (
|
||||
mirror://gentoo/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~chutzpah/dist/${PN}/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}.tar.xz
|
||||
https://dev.gentoo.org/~polynomial-c/dist/${PATCH_SET}.tar.xz
|
||||
)"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~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 )"
|
||||
|
||||
RDEPEND=">=app-misc/c_rehash-1.7-r1
|
||||
gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
|
||||
kerberos? ( >=app-crypt/mit-krb5-1.11.4[${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
|
||||
# These are ported instead
|
||||
#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='f25'
|
||||
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
|
||||
)
|
||||
|
||||
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}"/crypto/ec/ || die # Moves to test/ in OpenSSL-1.1
|
||||
for i in "${FEDORA_PATCH[@]}" ; do
|
||||
eapply "${DISTDIR}"/"${i}"
|
||||
done
|
||||
eapply "${FILESDIR}"/openssl-1.0.2p-hobble-ecc.patch
|
||||
# Also see the configure parts below:
|
||||
# enable-ec \
|
||||
# $(use_ssl !bindist ec2m) \
|
||||
# $(use_ssl !bindist srp) \
|
||||
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
|
||||
eapply "${WORKDIR}"/patch/*.patch
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
|
||||
# disable fips in the build
|
||||
# make sure the man pages are suffixed #302165
|
||||
# don't bother building man pages if they're disabled
|
||||
sed -i \
|
||||
-e '/DIRS/s: fips : :g' \
|
||||
-e '/^MANSUFFIX/s:=.*:=ssl:' \
|
||||
-e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
|
||||
-e $(has noman FEATURES \
|
||||
&& echo '/^install:/s:install_docs::' \
|
||||
|| echo '/^MANDIR=/s:=.*:='${EPREFIX%/}'/usr/share/man:') \
|
||||
Makefile.org \
|
||||
|| die
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
# this breaks build with 1.0.2p, not sure if it is needed anymore
|
||||
#sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
|
||||
|
||||
# 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 || die
|
||||
|
||||
append-flags -fno-strict-aliasing
|
||||
append-flags $(test-flags-CC -Wa,--noexecstack)
|
||||
append-cppflags -DOPENSSL_NO_BUF_FREELISTS
|
||||
|
||||
sed -i '1s,^:$,#!'${EPREFIX%/}'/usr/bin/perl,' Configure #141906
|
||||
# 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 https://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: Expired https://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
|
||||
|
||||
# https://github.com/openssl/openssl/issues/2286
|
||||
if use ia64 ; then
|
||||
replace-flags -g3 -g2
|
||||
replace-flags -ggdb3 -ggdb2
|
||||
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', 'no-srp'
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
enable-ec \
|
||||
$(use_ssl !bindist ec2m) \
|
||||
$(use_ssl !bindist srp) \
|
||||
${ec_nistp_64_gcc_128} \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
enable-rc5 \
|
||||
enable-tlsext \
|
||||
$(use_ssl asm) \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
$(use_ssl rfc3779) \
|
||||
$(use_ssl sctp) \
|
||||
$(use_ssl sslv2 ssl2) \
|
||||
$(use_ssl sslv3 ssl3) \
|
||||
$(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
|
||||
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
|
||||
-e 's:^CFLAG=::' \
|
||||
-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' \
|
||||
)
|
||||
sed -i \
|
||||
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
|
||||
-e "/^SHARED_LDFLAGS=/s|$| ${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 V=1 depend
|
||||
emake all
|
||||
# rehash is needed to prep the certs/ dir; do this
|
||||
# separately to avoid parallel build issues.
|
||||
emake rehash
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
emake -j1 test
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
# We need to create $ED/usr on our own to avoid a race condition #665130
|
||||
if [[ ! -d "${ED%/}/usr" ]]; then
|
||||
# We can only create this directory once
|
||||
mkdir "${ED%/}"/usr || die
|
||||
fi
|
||||
|
||||
emake INSTALL_PREFIX="${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
|
||||
|
||||
local -a DOCS=( CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el )
|
||||
einstalldocs
|
||||
|
||||
use rfc3779 && dodoc engines/ccgost/README.gost
|
||||
|
||||
# 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
|
||||
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
|
||||
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 $?
|
||||
}
|
@ -0,0 +1,298 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
MY_P=${P/_/-}
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="https://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 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
|
||||
IUSE="+asm bindist elibc_musl 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='f28'
|
||||
FEDORA_GIT_COMMIT="d2ede125556ac99aa0faa7744c703af3f559094e"
|
||||
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}&id=${FEDORA_GIT_COMMIT} -> ${P}_${FEDORA_GIT_COMMIT}_${i}" )
|
||||
done
|
||||
for i in "${FEDORA_PATCH[@]}" ; do # Already have a version prefix
|
||||
FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH}&id=${FEDORA_GIT_COMMIT} -> ${i%.patch}_${FEDORA_GIT_COMMIT}.patch" )
|
||||
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
|
||||
"${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
if use bindist; then
|
||||
# we need to patch the patch but we cannot patch in DISTDIR...
|
||||
mkdir "${WORKDIR}"/fedora_patches || die
|
||||
for i in "${FEDORA_PATCH[@]}" ; do
|
||||
cp "${DISTDIR}"/"${i%.patch}_${FEDORA_GIT_COMMIT}.patch" "${WORKDIR}"/fedora_patches || die
|
||||
done
|
||||
|
||||
# now patch the path, due to OpenSSL change cb193560e0da17a41b40ce574a2349f1d4d59ed1
|
||||
sed -i -e 's#test/evptests.txt#test/recipes/30-test_evp_data/evppkey.txt#g' \
|
||||
"${WORKDIR}"/fedora_patches/openssl-1.1.0-build_d2ede125556ac99aa0faa7744c703af3f559094e.patch || \
|
||||
die
|
||||
|
||||
# This just removes the prefix, and puts it into WORKDIR like the RPM.
|
||||
for i in "${FEDORA_SOURCE[@]}" ; do
|
||||
cp -f "${DISTDIR}"/"${P}_${FEDORA_GIT_COMMIT}_${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
|
||||
#eapply "${DISTDIR}"/"${i%.patch}_${FEDORA_GIT_COMMIT}.patch"
|
||||
eapply "${WORKDIR}/fedora_patches/${i%.patch}_${FEDORA_GIT_COMMIT}.patch"
|
||||
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
|
||||
eapply "${PATCHES[@]}"
|
||||
fi
|
||||
|
||||
eapply_user #332661
|
||||
|
||||
# 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)@&-${PVR}@" \
|
||||
Configurations/unix-Makefile.tmpl \
|
||||
|| die
|
||||
|
||||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s@=.*@=set -x@' Makefile.shared || die
|
||||
|
||||
# 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 || die
|
||||
|
||||
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 https://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: Expired https://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.
|
||||
# "disable-deprecated" option breaks too many consumers.
|
||||
# Don't set it without thorough revdeps testing.
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
enable-ec \
|
||||
$(use_ssl !bindist ec2m) \
|
||||
enable-srp \
|
||||
$(use elibc_musl && echo "no-async") \
|
||||
${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
|
||||
|
||||
# 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 || die
|
||||
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}
|
||||
# We don't want to "|| die" here
|
||||
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 $?
|
||||
}
|
@ -0,0 +1,298 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit flag-o-matic toolchain-funcs multilib multilib-minimal
|
||||
|
||||
MY_P=${P/_/-}
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="https://www.openssl.org/"
|
||||
SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0/1.1" # .so version of libssl/libcrypto
|
||||
[[ "${PV}" = *_pre* ]] || \
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
|
||||
IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 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"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602
|
||||
)
|
||||
|
||||
# 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
|
||||
PATCH37=openssl-1.1.1-ec-curves.patch
|
||||
FEDORA_GIT_BASE='https://src.fedoraproject.org/cgit/rpms/openssl.git/plain/'
|
||||
FEDORA_GIT_BRANCH='f29'
|
||||
FEDORA_SRC_URI=()
|
||||
FEDORA_SOURCE=( ${SOURCE1} ${SOURCE12} ${SOURCE13} )
|
||||
FEDORA_PATCH=( ${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
|
||||
)
|
||||
|
||||
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
|
||||
if [[ "${i}" == "${PATCH37}" ]] ; then
|
||||
# apply our own for OpenSSL 1.1.1b adjusted version of this patch
|
||||
eapply "${FILESDIR}"/openssl-1.1.1b-ec-curves-patch.patch
|
||||
else
|
||||
eapply "${DISTDIR}"/"${i}"
|
||||
fi
|
||||
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
|
||||
if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then
|
||||
[[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
eapply_user #332661
|
||||
|
||||
# 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)@&-${PVR}@" \
|
||||
Configurations/unix-Makefile.tmpl \
|
||||
|| die
|
||||
|
||||
# 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 || die
|
||||
|
||||
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 https://en.wikipedia.org/wiki/Camellia_(cipher)
|
||||
# IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
|
||||
# EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
|
||||
# MDC2: Expired https://en.wikipedia.org/wiki/MDC-2
|
||||
# RC5: Expired https://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.
|
||||
# "disable-deprecated" option breaks too many consumers.
|
||||
# Don't set it without thorough revdeps testing.
|
||||
echoit \
|
||||
./${config} \
|
||||
${sslout} \
|
||||
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
|
||||
enable-camellia \
|
||||
enable-ec \
|
||||
$(use_ssl !bindist ec2m) \
|
||||
enable-srp \
|
||||
$(use elibc_musl && echo "no-async") \
|
||||
${ec_nistp_64_gcc_128} \
|
||||
enable-idea \
|
||||
enable-mdc2 \
|
||||
enable-rc5 \
|
||||
$(use_ssl sslv3 ssl3) \
|
||||
$(use_ssl sslv3 ssl3-method) \
|
||||
$(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() {
|
||||
# We need to create $ED/usr on our own to avoid a race condition #665130
|
||||
if [[ ! -d "${ED}/usr" ]]; then
|
||||
# We can only create this directory once
|
||||
mkdir "${ED}"/usr || die
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
# 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 || die
|
||||
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}
|
||||
# We don't want to "|| die" here
|
||||
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 $?
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST croniter-0.3.17.tar.gz 17362 BLAKE2B 59887df1cb1464046612fd87bf82575355361b9baa934817d92ea17ded6a440100015168d7622952a218d96d6f8d3a568ebdcde85f2a7ddbe8a31a44b201b3b6 SHA512 4215fc7461843cc2c62fca05424d5eb7d0c80c21cc1e637f5ce3c4891da458cd609d6ed501fab7fe244bbb234e9834ec8a12b76289eec10808ed6c30c1b4d45a
|
||||
DIST croniter-0.3.29.tar.gz 20276 BLAKE2B 951b9f2e998be496420dbf08e06a60a0eb3eb8538d9e63bf11182bc449bc49eaec36c1d1025269974fd0ff24430e16c3cf410d2b50873498d077ac22e0b52fb8 SHA512 0333e8d801aa7453ea6bc2b49abcabb24390535eecb5af2050512cf69410d21179405ceea14b8037c8f107321ee53a10c6060796c86c9b24ae48af65068e9b87
|
||||
DIST croniter-0.3.30.tar.gz 18122 BLAKE2B d15e19167eabf935ca12ad2b277b9b97459248c3a47982346070b4500b45f8296beeabf76c5ceb9bbff579ab2d713392c82446b234a6f4b4f6e8317adc67613d SHA512 1e7f5da56991281a16919abbb386a20a8437604bbe0e57d12726d5f19c1c038e9b320a900471b1d4dad9f5dfd0eeb85ced17232a4907e50025592a293a5a8ad1
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Python module to provide iteration for datetime object"
|
||||
HOMEPAGE="https://github.com/kiorky/croniter https://pypi.org/project/croniter/"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytz[${PYTHON_USEDEP}]
|
||||
)"
|
||||
RDEPEND="dev-python/python-dateutil[${PYTHON_USEDEP}]"
|
||||
python_test() {
|
||||
py.test -v src/croniter/tests || die "tests failed"
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST docutils_glep-1.1.tar.gz 6753 BLAKE2B 93e7fa03e6e5b4f7d7d338b04d906eac630d2a8e179af14c0c3f0d5f9926cc3705dcec84d2b9b2b7b3854bf9de178256ad2c4ef4bc567c6ba0d95d2abc32b8ac SHA512 7b06cbc7bf7a7f9002e1d61fbbafdb7ee6fa804145e7ce7edc547384f22cac8f9a9072bc137e201ab08a49eedb5e4f2ea8a1f02bd806d7d01525bdedece4afb8
|
||||
DIST docutils_glep-1.2.tar.gz 6771 BLAKE2B ecb17f69dd2edb12d81ea1bf90789564e86b921125c20913134500dd53ae04b0962141183cbcb9bd17af904196ead2228e4c80a6e256576b715ae6323afadc30 SHA512 696412447120893c198dcd9f13e042d20b35465e83ef8b488ee2f1c184b5fd3928ddbf10ed4e78886c4c72dfe1f9fa46c1f75c7997990afcc04353b5d59ebf9f
|
||||
DIST glep-0.4-r1.tbz2 4667 BLAKE2B 34041a972c1edae500d973a2002719a3208c84e042bad231746f83cde99e9b72db835dbdaef536c50bc73c6bbb27e4dc61fe7563bc520b006a04defa6a952c83 SHA512 098d9f5043a60af9dfac63f6472b576e66ffeda924902ca825ed63f573aeb8bad7c9f9a6853fd99e648683488ee6db2ee55c139df3dde06983b72cfb5dd8cdd3
|
||||
|
@ -0,0 +1,26 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN=${PN/-/_}
|
||||
MY_P=${MY_PN}-${PV}
|
||||
DESCRIPTION="Gentoo GLEP support for docutils"
|
||||
HOMEPAGE="https://github.com/gentoo/docutils-glep/"
|
||||
SRC_URI="mirror://pypi/${MY_PN::1}/${MY_PN}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="public-domain"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
COMMON_DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RDEPEND=">=dev-python/docutils-0.10[${PYTHON_USEDEP}]
|
||||
${COMMON_DEPEND}"
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
@ -1,21 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A Python framework for creating text-based applications"
|
||||
HOMEPAGE="http://fedorahosted.org/newt-syrup/"
|
||||
SRC_URI="http://mcpierce.fedorapeople.org/rpms/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
|
||||
RDEPEND=">=dev-libs/newt-0.52.11"
|
||||
|
||||
DOCS="COLORS"
|
@ -1,3 +1,2 @@
|
||||
DIST python-ethtool-0.11.tar.bz2 34487 BLAKE2B bdb5eced32c508a593bbbc80fc287ece547c34504bbdf36877f4b62dea1239a33c5ea23dcecdd8b0f8104eea3ec7d5418a3ee5a1697930ea24a51da42f3ddc24 SHA512 b260e608e1024c48eedb72327b704b01fb42396219ca3d942fe42f22d3e8018fc74bfeffd96e37abd4efd2ce49a73915e0e2af5841a537a02e247d4ba5548f20
|
||||
DIST python-ethtool-0.11.tar.gz 37326 BLAKE2B b2345f5aece60c3b418d9fcd61220ab77fb49b9995a23b0ed6d97135dee61e4ffa177059869a8702430703b9f6518ffdcb8d690c868d0f8338ab16fdc36c58ea SHA512 227a9248dfdd36a9018a441d3ef4680691c23dac52972fe1ecc67ff30991f3de4cd71af0e48669ca382d6f177d1b3ebc97596e5a5ae4b4c80371456effe637b5
|
||||
DIST python-ethtool-0.14.tar.gz 41945 BLAKE2B d83e40e79481ee5f91f7e097dc4f6f0eb541f88ba83e13c13b3129ece2196ee999f9110310339ebbc2343b814a3b2c80405a3b4ce6931110509a54281b370cd8 SHA512 57a3f2d60dd8309192fc858614645d4e7533c90c03113ffc1eeeb810b86eb71b0a80b4eb209d3452c7624c5318a853de50d9d716d41334bf079e6e3e2490fd4b
|
||||
|
@ -1,27 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
# TODO: install scripts and their man pages
|
||||
|
||||
inherit eutils distutils-r1
|
||||
|
||||
DESCRIPTION="Ethernet settings python bindings"
|
||||
HOMEPAGE="https://fedorahosted.org/python-ethtool/"
|
||||
SRC_URI="https://fedorahosted.org/releases/p/y/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="dev-libs/libnl:3"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}/${P}_include-net-if.h-for-IFF_-macros.patch"
|
||||
distutils-r1_src_prepare
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST ruamel-yaml-0.15.35.tar.gz 344241 BLAKE2B 3e77f5da4e2a7f64099da1d79a108adfb093c5e47baaf11611462637ec6e29091924088e0ce261b21283a0ab07123da45a1ea7b0c522692d1e96cdcc27502541 SHA512 9e335d627db20b85ec0384f16d7ea03c310c01e84517e7b9bced1af9289fe542b87eb31da8ad960b17d26f35f2cc33a87a5a5b976e0e5ca587339b21b4b53fca
|
||||
DIST ruamel-yaml-0.15.96.tar.gz 399206 BLAKE2B e17f25d9501dad9fd17688b003d33fb0015b700f3c51d405710ccc0635263ced7a86140a3ed7a4aecaaf9e2e73f2eff17b99e96fbd9d9c1be3e9110c28758a62 SHA512 be76a03c46ce8826eda365791e212783243b64781318a998cc48c201bafb9af6b318e7544241fa10ce211e25bd6b26d3e57ef6a1fcb0c1be6dc4552c341e5492
|
||||
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{5,6} )
|
||||
|
||||
inherit distutils-r1 vcs-snapshot
|
||||
|
||||
DESCRIPTION="YAML parser/emitter that supports roundtrip comment preservation"
|
||||
HOMEPAGE="https://pypi.org/project/ruamel.yaml/ https://bitbucket.org/ruamel/yaml"
|
||||
MY_PN="${PN//-/.}"
|
||||
SRC_URI="https://bitbucket.org/${MY_PN/.//}/get/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
IUSE="test"
|
||||
|
||||
RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/flake8[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/ruamel-std-pathlib[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install --single-version-externally-managed
|
||||
find "${ED}" -name '*.pth' -delete || die
|
||||
}
|
||||
|
||||
python_test() {
|
||||
# This file produced by setup.py breaks finding system-wide installed
|
||||
# ruamel.std.pathlib due to shared namespace
|
||||
rm "${BUILD_DIR}/lib/ruamel/__init__.py" || die
|
||||
|
||||
py.test -v _test/test_*.py || die
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
MY_PN="WSGIProxy2"
|
||||
|
||||
DESCRIPTION="HTTP proxying tools for WSGI apps"
|
||||
HOMEPAGE="https://pypi.org/project/WSGIProxy2/"
|
||||
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86"
|
||||
IUSE="doc test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="dev-python/urllib3[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-python/webob[${PYTHON_USEDEP}]
|
||||
dev-python/six[${PYTHON_USEDEP}]"
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? ( ${RDEPEND}
|
||||
>=dev-python/webtest-2.0.17[${PYTHON_USEDEP}]
|
||||
dev-python/socketpool[${PYTHON_USEDEP}]
|
||||
dev-python/restkit[$(python_gen_usedep python2_7)] )"
|
||||
# Tests needing restkit are skipped under py3
|
||||
# Testing also revealed the suite needs latest webtest
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
|
||||
python_compile_all() {
|
||||
if use doc; then
|
||||
cd docs || die
|
||||
sphinx-build -b html -d _build/doctrees . _build/html
|
||||
fi
|
||||
}
|
||||
|
||||
python_test() {
|
||||
nosetests || die "Tests fail with ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/_build/html/. )
|
||||
distutils-r1_python_install_all
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST asciidoctor-diagram-1.5.14.tar.gz 11264778 BLAKE2B 298d3c8dc569877d4500bbbc41167de66748d67e9813c6d505aa9296fe49d973e3455a9f53a127ebc9127db64b5228c24e1ddb2ccacfe5bafdfbd5a8511ffb49 SHA512 66f8b7f48dcab4feb14eadadeb571c7cedb0b18c7a0acb004ebc6144affddc1d4a3d05a27996c666ac7966b62d05a5953b7a84895268e071445209b928fe9e89
|
||||
DIST asciidoctor-diagram-1.5.16.tar.gz 11264819 BLAKE2B 31320b609aaa8458bf24d05f5ea5a561801cdf5e0243e333bbf209060fb75ebed47f94302e381420f8d294a5c0349783d8b3e2bdc81721d50d990eb978a220a5 SHA512 94822a604c43894e2be11370aa4595948e35f4f670338d84abe798beb312a8212c944e78478b785d68384177787539ed4a20a360b55325bd94ced502ca957843
|
||||
DIST asciidoctor-diagram-1.5.17.tar.gz 11705185 BLAKE2B 0a5611c9f8bfe18d74585635a168e8cfbc80e4ad40eb530c7bab2ff4595d73139776fdaddbd190a753fb9c938aa46449461f20e1f9033ff3ff3a0d5c48b1f07a SHA512 656f62db4ec7e7ffead58f37bfbdb2d1c21cc70a86e734e67dfc9bd569ffee643679938a7ac2c172f08cadaf5307843eb7fa3406530c3eb67e4ee2cb8abeae80
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue