parent
fe4e8503b8
commit
f805816f20
@ -1,23 +1,23 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
MANIFEST Manifest.files.gz 29262 BLAKE2B 695ea7608181db18b7ea0ee4475c0938f9cd95c82eb5e1969282906693b5b88f412615ac0c0a2f86a6020156a570b7b38c6695ebcffedb437a59b00d8a9dbc13 SHA512 6e654c8d1b5bd2d19f9908cde294ea6f407225c0996b19055aaf18d812830f57ced4bc1c0e1cd31267f2fa9c63ec88457b9b7259fbe5e318b4991ac4b90020e0
|
||||
TIMESTAMP 2021-09-22T04:39:12Z
|
||||
MANIFEST Manifest.files.gz 29251 BLAKE2B 7682b371f0839d329e451f177c7c391433503d7238ca42c0c64ad460b702855556b3fd1355152fbc39677c8471b9c0a5fdd94cdf2ea924bddc85f2c34f0be2f6 SHA512 3615fc6a204c425accf5e6928c5f581855c3249bf0760b70cad01150cd8f34af5ff4b32b345262be803cf12a3647f72ab4d3d97775ebf673fe42a4b1e9544229
|
||||
TIMESTAMP 2021-09-23T08:39:17Z
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAmFKs3BfFIAAAAAALgAo
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAmFMPTVfFIAAAAAALgAo
|
||||
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUx
|
||||
RDZBQkI2M0JGQ0ZCNEJBMDJGREYxQ0VDNTkwRUVBQzkxODkyNTAACgkQ7FkO6skY
|
||||
klB0CRAAkGmNLA6VzRNxL/cr6gaYwS2lgL5adXvvmI5ag39yOMWmiMgac4idCh3P
|
||||
lFJu+4HV8PpdLcimiNNdkzrxKt97Kd6LIPlZ/fuRES/DjgftP1ojC9q3ylQnspE8
|
||||
UBs9ecAxie9EZ4unif384hFJI7ZptReahd2HWgyOvYKdv2eJqTKZw9x5kMpS2Yd2
|
||||
Hr0HV0UJkVbHKYvalo8rMN0fC4tGWabYvKW6O24vM320aj5hdV6pmKHSqKQfBh7f
|
||||
FDH786u2tn++l9+gkk2cpe1ph/ecUqKJsnl2I/3hjvnKGdmEUWR1SaIp6bnoDy5D
|
||||
gojczbMG9/3quHBwRnlneSKNMcbz+Ql+fcy/k5KvWPY2AVV2Gh9oUc6U2VGfAoRn
|
||||
llqH/BQ6sHUy7ep4T4saG/sXLCvSnvVTH6y3BVczE/XZ1+ByUs6fUZatEEcGJmI5
|
||||
lyS03xzAkWmPEzWWz4GCa1p5W5XgkndpXkpYpvKiaWAQ6Oh4AKRp2b7g3p1qGXIX
|
||||
UZMgW3N6ROeo/kuuRlkZc1bm4BfU6WFPN6oTqhFvMfjtwv6hBScX/MU/ooIMmR+h
|
||||
T8OEdaOlTbVQpXZP6Ybxqpg1cVTXP3RJxP70J/oxyaDzi6AKCyoJJZBrO/+AiX1p
|
||||
3241BN8cG/U0dvL63LMEDqVdSr70w0bfeE0ruBRSOH0HwfjKQv0=
|
||||
=81xt
|
||||
klCwlg/+J2EmghtHEhrIgTESPXBPDbo2zy6jXZr89hQkxEq2DkOjhNve+12dJj6F
|
||||
6eHSxwmsB723vrR2p45bVmXJi49bGbx8AD/Z0TGIQc8Un+Y9+Fdo6UuLkZpcMLD+
|
||||
naTBxGkp+b/6p+N83AVcox02RzPrCjIvyZMDkQ4/CXLySiI4bK2ChMOYyShm80p3
|
||||
R3CulIFArgI86R97Y577g91F2HVkA9yRXLn3WHUSQA4pRbSj720l3Ib/Lc+CMxVq
|
||||
Dzgv2rQk2Twdz3XxuYqSz5MqM+jZfEcgnDNvRPRfuWzhNPKK8vDXKWxBHenWpxdL
|
||||
iUJg9PIZvK8ZS/c4DyHqOqKHrkQ0U2s+5kh3EQBRPy3yg9en2KijcxRjG1B5zVp+
|
||||
8prBXRs8MgzOQwluZnyWUJ2xVH8tUI672V02dBjy6Jwwe1+NGAcJZWcQIhgcDWl9
|
||||
FAs34WXYILr+rFnZ/kXyFL5ZpH41Xd3mNqRYB0vtL1nCpxktfWPHaOgfNNhkyNA8
|
||||
NAtmLdKX2Xao63+NXNwWjBFgswfHL/wRfy7+6/3tFLn1I/+OTjqO24i/5VHKj1cy
|
||||
eZNnB1nf8e7wzdAPHWV72dOWbmnm2H54sc+It/L6QJh5GyBSz5CWw8oYyY4V7f9Q
|
||||
JFEUSQc9QGZGxMT11U/seEMhIY3DULsIehODq/1hrkmmvGoyJPY=
|
||||
=NlTV
|
||||
-----END PGP SIGNATURE-----
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,58 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="https://pypi.org/project/awscli/"
|
||||
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/aws-cli-${PV}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
# botocore is x.(y+1).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests --install nose
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/awscli-1.19.47-py39.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
# integration tests require AWS credentials and Internet access
|
||||
nosetests -v tests/{functional,unit} ||
|
||||
die "Tests failed for ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
inherit bash-completion-r1 distutils-r1
|
||||
|
||||
DESCRIPTION="Universal Command Line Environment for AWS"
|
||||
HOMEPAGE="https://pypi.org/project/awscli/"
|
||||
#SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
|
||||
SRC_URI="https://github.com/aws/aws-cli/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/aws-cli-${PV}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
# botocore is x.(y+1).z
|
||||
BOTOCORE_PV="$(ver_cut 1).$(( $(ver_cut 2) + 1)).$(ver_cut 3-)"
|
||||
RDEPEND="
|
||||
>=dev-python/botocore-${BOTOCORE_PV}[${PYTHON_USEDEP}]
|
||||
dev-python/colorama[${PYTHON_USEDEP}]
|
||||
dev-python/docutils[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
>=dev-python/s3transfer-0.4.0[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
distutils_enable_tests --install nose
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/awscli-1.19.47-py39.patch
|
||||
)
|
||||
|
||||
python_test() {
|
||||
distutils_install_for_testing
|
||||
# integration tests require AWS credentials and Internet access
|
||||
nosetests -v tests/{functional,unit} ||
|
||||
die "Tests failed for ${EPYTHON}"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
newbashcomp bin/aws_bash_completer aws
|
||||
|
||||
insinto /usr/share/zsh/site-functions
|
||||
newins bin/aws_zsh_completer.sh _aws
|
||||
|
||||
distutils-r1_python_install_all
|
||||
|
||||
rm "${ED}"/usr/bin/{aws.cmd,aws_bash_completer,aws_zsh_completer.sh} || die
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
DIST exo-1.43.0.tar.gz 5504583 BLAKE2B ffd2d25e6eea77a99390aac9f725728b3f1515e9ed73b4181e794b60b7641b44fe29abc81da3231fa8e4932da81eb6ce30808ce6a56ae5c4a26a1e10372cb64a SHA512 08e5e38609eb21addc56966e672e9b84acb6b36b6bdb0eb977d8fecbf2bca9af19a46a5e6efd50cb92322da248767aa3af3b8f04b9d893fc704d6c08feb8f6d2
|
||||
EBUILD exo-1.43.0.ebuild 704 BLAKE2B 4116e696998dc4fbada1247aa9d0bc1bf0c863bc9325df342ea73010a6f8d573568472f418fd3e47a347b7a5e9a922dd8797beb5085e1dac9404c2d239b09ad9 SHA512 17e48fa4c79ec343769f7c6d7d90a29f7255c3b985bd31680d0fb3c9db82370eff26a9737b7a1911adf1a5e992a394972b3cffbcaf53a58b741e71e302e8de1f
|
||||
DIST exo-1.44.0.tar.gz 5507722 BLAKE2B b42424a1327f0cb28b78f721f465b156eed6a223937e7d08f0f16a3829b497dd1c6a9d450d6d4d4cbf1db033729d91fa1566fa9c7871a07f32556cd2a153bfcd SHA512 8baaea5c727cdcf1b8b4272820d6f2b2740320e688c16b5efc7c9e51ce38c7951fd8252bf41d736ca0c3f7da605d751f56b79544af75f8d0ef0f671e867b6d59
|
||||
EBUILD exo-1.44.0.ebuild 704 BLAKE2B 4116e696998dc4fbada1247aa9d0bc1bf0c863bc9325df342ea73010a6f8d573568472f418fd3e47a347b7a5e9a922dd8797beb5085e1dac9404c2d239b09ad9 SHA512 17e48fa4c79ec343769f7c6d7d90a29f7255c3b985bd31680d0fb3c9db82370eff26a9737b7a1911adf1a5e992a394972b3cffbcaf53a58b741e71e302e8de1f
|
||||
MISC metadata.xml 334 BLAKE2B 230d1a47a3e39f796c16a9e9a622fbc27560c951da0c49adf7aca135970c0c944f42da7eb624c7193d44830c72cf95da9d69d977562853de6a00fd8fb6408977 SHA512 cd1366d99abc260c6f2899000e2a517be9a4c43e921078764fdc996871df34c1827e512087c3eb6f95bf3b685c2f34cbc1f1462eaa303a948640a362b4501b01
|
||||
|
@ -1,4 +1,4 @@
|
||||
AUX pwgen.rc 389 BLAKE2B d8a3af8df9be2a78e18aaddd7d17269ecb0c61a4c77252a77bb2d492edfe5b8c31279de616c4b0bf92ef6ec4763235b18931edc333121c543cae3e839927bedc SHA512 5d2bdf0dfbaf8fc31cd8217495fccccfefb383779c8a03faedcfaa830851b3bbdccb63fdf8d1bf8aa8a96759ea90a31da6b7a4e0cf5368e62ed10b8db8b0382d
|
||||
DIST pwgen-2.08.tar.gz 54884 BLAKE2B 43bb6176d9408558b362bd84839c190c4bcf5d8f71b46fcbbe0b00c390d957683fd9403ff697e96cef2e4de27776c841e12032d3589965629e8e2d29bf202583 SHA512 4a930dc7d4c58a4434209db30c54629d76fce57d0fd5767cd7894168bb1a5b85eaae6734a982b0f4e0640540c366ce27ad84860ff2c406dea3f5902b5bb54255
|
||||
EBUILD pwgen-2.08.ebuild 591 BLAKE2B c4acd75771f8a8db67aa1d97ecc55ea61252d7e1973a5015675c871f7d2796a4fdf892e8bd5eb10540bfa7e3b590ceb9ee68b2abe5de28a7159251076715ed52 SHA512 061569ac2720c90bae5ea677ccefba18c5073a4993307012382bc4763a1235a4abeed58574696c92c4717af52efc1e9e9055c22084814246ab02eb8aafa8bd9d
|
||||
EBUILD pwgen-2.08.ebuild 590 BLAKE2B 064fa81665aa2bb7fc48408981b0ea93e1c56172c5f9234510fde65abb25aeffc0a832844e56851f0c892075cdc99da591aca75a66036571d21631ad7f242afc SHA512 0aa19def0bbe431a9d38047dfc7bcbb1633b4d0131c6b8c2bf1f24d2cfbedd5c7cad21b916dba8ea437bd3641803fe8176036d25b1a0319c2197de4f0fab76f5
|
||||
MISC metadata.xml 801 BLAKE2B dd9ac9712fcbfc2a681587ca84aa40ac7e2c96474dd6b89ba4f16b40be44c7ea441bf44dd4008397aa99ad08ae2ab07a535ce5375940b6f3991dc6e8e9f5f75a SHA512 15ab62126db1bb0211d39963ff8102e31cfb8791a496c660d6a63666c0c440ab1d6f04ad490e0455aa39f9c69bb69035e0c33c02107b9940e45a0a788b2f9ce9
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST lzip-1.22.tar.gz 120769 BLAKE2B d6d4faaff981d64219e27364c7072f9e1309507220e80d4195d866c3429db537a9fa9b7a4ac67ef5c267cad0f6e43ce997a98f1e47a88b228bd1aa437c991140 SHA512 318de74effdbdfa79070d28919459a85bf1efe662b818b8af2a3daa964b6c24e3386c37de360c6d5b8b624d549b5c9ed777c6234561129c477e03d92ac2db206
|
||||
EBUILD lzip-1.22.ebuild 765 BLAKE2B 2a0d43af11d19e275f2e0386d17c4c159246457292984f8540c3d758c4204528072e34ea8033ad7b718a98483f6eae98c94349c67e58adaba38e381cc7a8b0e2 SHA512 fd76d7c1efce7ee7d265fa841077c61ca9cf6dfecacb552c49fd4d276767353f0bcd4f2d82908c63878a0ec77e1a621d1d6fe1e6f93c27e2ce5152576ed6f383
|
||||
EBUILD lzip-1.22.ebuild 764 BLAKE2B 4f27d76030045b7e78f3a85a7ac04d7b261680c9356c236b6c07db1e8b38c92d094259891435967f823729a152be78d34f330444515b4808d1e355ae6b8a817e SHA512 2ac60aae9a0642bfe51ec653749e20d348f44ed28f87ec67dffddd90312f4c685d0738e28c9e4f92b3610b1ea4ada86d18cafa5e4d99cee5c53666a6c322b700
|
||||
MISC metadata.xml 358 BLAKE2B c0e0c2c610a33aa6f8bff1325deb8c583fbde09ceaef09f4ddc1f343feaf3cc81a0e59ff2e4f3cd81bf6e3294e18026fa4ae6870eef8d213ff44c73edbb7df0a SHA512 faa29e9bc8f49b51279e643a7d9f0dc4b5463b434f9874901625af9f13c4460c19888913ee9d4105ee9eda4257526af50383fbe936d5834b2713eb027e75773f
|
||||
|
Binary file not shown.
@ -1,6 +1,9 @@
|
||||
AUX johntheripper-jumbo-1.9.0-fix-bashism.patch 939 BLAKE2B e3e4a45a7cba373203d636cf731896249208c7e92b5da64992ddd98a93922f326e077028812db57b5a505410b227afc07bc7097ad02c620858dea76539ecbe2e SHA512 9b46ed5fcdbd1efd43bb1903faa25c7c4e2c82417a8b963d8cab584d52eefee74408f51f51a059af2e558eebfcfed7bf3484c4bc85b169327548240116d5fb5a
|
||||
AUX johntheripper-jumbo-1.9.0-gcc11.patch 1713 BLAKE2B b1f3aaf0c76f1c0fc6ad0d498dce4722994ed11a6f0547bb4ff7683083b9c9d59ce817133189853380378121515aa12db1cf08699c40b39e2fdec667045da88d SHA512 d341eeb291b5bf5721b781272ac66aa56e7d38db305f0272e65a0b77bad05ffc631cfe5fe8093f94a8545cc09020d639dfebb1b903585248bd57933661571b4f
|
||||
AUX johntheripper-jumbo-1.9.0-opencl-fix.patch 333 BLAKE2B 248ad5ecba48908a982c27c9d8162c22031cfc29f0becb05209f56c837bb850f6032c847a60d8cd05ba88a0f73ad35f27a08fefb734c6bd87f458b22f77db0ab SHA512 81f9dabc6d8ad54944be7eb9b3c7204ce426db842325c31662038e213775c0a86288c860712e6d3c24f7a9d0b7a0fd8962126a25242f45e5f242307691a97d38
|
||||
DIST john-1.9.0-jumbo-1.tar.xz 33638768 BLAKE2B 2fd6813e234308408d42581705ee8b25f9217a3dfb43f05483156f7bb67d0ce0d6de9c3ce8c2e4a17bb99bb377119dae2897bc08c800e7bc80bc6cf245400df6 SHA512 c5cb5dc739ee4c666f8479cdf10511fddc391b590c59f90c060d3ccd8449b794ac7b831a6d1f7553883892499e709a66578cfa4d62caef9b7e0a831eb827e808
|
||||
DIST johntheripper-jumbo-1.9.0_p20210920.tar.gz 47758128 BLAKE2B e85255dc218c43e6358f76eac1e79af01d437a7a1fcddd608a390734fdc4070cbf949b8abc080b82decf4a1f5e32d2baa6d2a09d385a31913d8e988c8732e85e SHA512 5121434ad275921fe6288c51fd9dfd36ed3162387e70e8089bbc266d4a17ea461b72ce26b2004acfb62d95a9ee2d570ef3b3f00c1d031abd8cff2f20c3ab480a
|
||||
EBUILD johntheripper-jumbo-1.9.0-r3.ebuild 3046 BLAKE2B 2573edffdbd3fd90ea3cff11197767acd593d24a99ae8a1c3f60c1b4f14b9e2e6ffb134b03a6f2e86ce850c379d4d8ce5fdeddf872e045126142a3592fd0b9c6 SHA512 5714243ca54db6aeeeb083070a419d0d93c67d24c272ecba833b4e813c605f56b5909fb663ec85f3142462113e716b1817a67e3dc8bfba511e89e30a8d37bfcc
|
||||
EBUILD johntheripper-jumbo-1.9.0_p20210920.ebuild 3143 BLAKE2B 08615f5cadc78b6a833c01dcc4a2235d2e6e735542834f8325486f921faf38d95b7bfafac09481ab8370588f70a259c772d1ace0b5b9c2119474b70e6c14c60e SHA512 533c042e8b7996f2ddba22df15ddf4a44f3c358abe96ad3f0d80334ccda7de7d9dd138d0e7f891da1c564dbd536f6c658e065f9151976bf3412efcceec2de581
|
||||
EBUILD johntheripper-jumbo-9999.ebuild 2842 BLAKE2B f3a248bb7713f41e9d87f0b8d751e2edd3136266c50da26419d9aeb01f0e884f52a3bf78e8c012efa26a3192552e77eee69c4bdc832817b9907c255a52403682 SHA512 b5d8625f3c3c62e0a9a7b859c8b65be7655ec4fbab5b38cb3264f444770dd23b2770dfd8dc478de2693c8b4e9dd168a4fe5edc7adca6ede5c2e4951d52fd643d
|
||||
MISC metadata.xml 473 BLAKE2B ed1c424492ff052e83ce899d8ea4a805ce5d4a5604da336ad16929594d14307c2e264c4eb6e6ee985d3167b8917e8c80c38ed9f97ba5293a0b8f84f472fd9786 SHA512 f124050eecf17e3c2fa01b6140881349e089840c75cb30bf054286a049026bb372cc70e1ce7be3054fffbe5836be7dc1f7fc9e3918f874443644ea99c5b441ab
|
||||
|
@ -0,0 +1,24 @@
|
||||
https://patch-diff.githubusercontent.com/raw/openwall/john/pull/4822.patch
|
||||
|
||||
From dd9501341808fe19b9c5cd4f8f04edfc5f377077 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Wed, 22 Sep 2021 19:34:38 +0100
|
||||
Subject: [PATCH] configure.ac: avoid bashism in pkg-config check
|
||||
|
||||
== is a Bashism and configure scripts need to work
|
||||
with a POSIX shell, so let's change to = (like in
|
||||
the other condition).
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/src/configure.ac
|
||||
+++ b/src/configure.ac
|
||||
@@ -347,7 +347,7 @@ AS_IF([test -z "$STRIP"], [AC_CHECK_TOOL([STRIP], [strip])])
|
||||
dnl Check if we have this at all
|
||||
PKG_PROG_PKG_CONFIG
|
||||
AC_MSG_CHECKING([if pkg-config will be used])
|
||||
-if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" == xno ; then
|
||||
+if test "x$PKG_CONFIG" = x || test "x$enable_pkg_config" = xno ; then
|
||||
JTR_MSG_RESULT_FAILIF_FORCED([xno], [x$enable_pkg_config], [pkg-config is NOT available])
|
||||
PKG_CONFIG=no
|
||||
else
|
||||
|
@ -0,0 +1,143 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools flag-o-matic toolchain-funcs pax-utils
|
||||
|
||||
DESCRIPTION="Fast password cracker"
|
||||
HOMEPAGE="http://www.openwall.com/john/"
|
||||
|
||||
MY_PN="JohnTheRipper"
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/magnumripper/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
else
|
||||
JUMBO="jumbo-1.1"
|
||||
MY_PV="${PV}-${JUMBO}"
|
||||
MY_P="john-${MY_PV}"
|
||||
HASH_COMMIT="43c7f8850736d4ec68bf0a022ae9fb34c274a01d"
|
||||
|
||||
SRC_URI="https://github.com/openwall/john/archive/${HASH_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/john-${HASH_COMMIT}"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
|
||||
fi
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="custom-cflags kerberos mpi opencl openmp pcap"
|
||||
|
||||
DEPEND=">=dev-libs/openssl-1.0.1:=
|
||||
virtual/libcrypt:=
|
||||
mpi? ( virtual/mpi )
|
||||
opencl? ( virtual/opencl )
|
||||
kerberos? ( virtual/krb5 )
|
||||
pcap? ( net-libs/libpcap )
|
||||
dev-libs/gmp:=
|
||||
sys-libs/zlib
|
||||
app-arch/bzip2"
|
||||
RDEPEND="${DEPEND}
|
||||
!app-crypt/johntheripper"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.9.0-fix-bashism.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
if use openmp && [[ ${MERGE_TYPE} != binary ]]; then
|
||||
tc-has-openmp || die "Please switch to an OpenMP compatible compiler"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
cd src || die
|
||||
eautoreconf
|
||||
|
||||
sed -i 's#$prefix/share/john#/etc/john#' configure || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd src || die
|
||||
|
||||
use custom-cflags || strip-flags
|
||||
|
||||
econf \
|
||||
--enable-pkg-config \
|
||||
--disable-native-march \
|
||||
--disable-native-tests \
|
||||
--disable-rexgen \
|
||||
--with-openssl \
|
||||
--with-systemwide \
|
||||
$(use_enable mpi) \
|
||||
$(use_enable opencl) \
|
||||
$(use_enable openmp) \
|
||||
$(use_enable pcap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C src
|
||||
}
|
||||
|
||||
src_test() {
|
||||
pax-mark -mr run/john
|
||||
#if use opencl; then
|
||||
#gpu tests fail in portage, so run cpu only tests
|
||||
# ./run/john --device=cpu --test=0 --verbosity=2 || die
|
||||
#else
|
||||
#weak tests
|
||||
# ./run/john --test=0 --verbosity=2 || die
|
||||
#strong tests
|
||||
#./run/john --test=1 --verbosity=2 || die
|
||||
#fi
|
||||
ewarn "When built systemwide, john can't run tests without reading files in /etc."
|
||||
ewarn "Don't bother opening a bug for this unless you include a patch to fix it"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Executables
|
||||
dosbin run/john
|
||||
newsbin run/mailer john-mailer
|
||||
|
||||
pax-mark -mr "${ED}/usr/sbin/john"
|
||||
|
||||
# grep '$(LN)' Makefile.in | head -n-3 | tail -n+2 | cut -d' ' -f3 | cut -d/ -f3
|
||||
local s
|
||||
for s in \
|
||||
unshadow unafs undrop unique ssh2john putty2john pfx2john keepass2john keyring2john \
|
||||
zip2john gpg2john rar2john racf2john keychain2john kwallet2john pwsafe2john dmg2john \
|
||||
hccap2john base64conv truecrypt_volume2john keystore2john
|
||||
do
|
||||
dosym john /usr/sbin/${s}
|
||||
done
|
||||
|
||||
# Scripts
|
||||
exeinto /usr/share/john
|
||||
doexe run/*.pl
|
||||
doexe run/*.py
|
||||
cd run || die
|
||||
|
||||
local s
|
||||
for s in *.pl *.py; do
|
||||
dosym ../share/john/${s} /usr/bin/${s}
|
||||
done
|
||||
cd .. || die
|
||||
|
||||
if use opencl; then
|
||||
insinto /etc/john
|
||||
doins -r run/opencl
|
||||
fi
|
||||
|
||||
# Config files
|
||||
insinto /etc/john
|
||||
doins run/*.chr run/password.lst
|
||||
doins run/*.conf
|
||||
doins -r run/rules run/ztex
|
||||
|
||||
# dDocumentation
|
||||
rm -f doc/README || die
|
||||
dodoc -r README.md doc/*
|
||||
}
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
AUX vim-completion 1004 BLAKE2B dea4230a8d2a57fd1af18df4037504a44382a97ff672410e987cb287d802c964baa502da4d08f09cb8684307481fec503c1d8cae7f4f6e61500f1cb06033a2c4 SHA512 dccf663a93efdf2ec3be69f49e418a0ef66277e2fae6c12287adde772592e19f5130388a04242121846f1dae39f78b30780c99dc6fe1b847f4f08354bda3cc41
|
||||
DIST vim-8.2.0360-gentoo-patches.tar.xz 2612 BLAKE2B a9273a686b31dd873b25bfc07f7bc254f11038bde275ae4e6f56513a14e0268fdc1032ae847d1d7f8539f8a657217011770ccb4685998f34722383ec7bfb1a15 SHA512 00bc8eb8b20a4a6f3bbd179bb90d42fa6727c8eaae5b625e95e52c33638d456ef36d06b51c542ecaffb237c0b4f7aa72dc3bae7fe00144d55ab0d2fa51950f3b
|
||||
DIST vim-8.2.0814.tar.gz 14953478 BLAKE2B fd4155ec749bd9a705e8114ff7f8cc321182c9286733ff2f665e265ec0af830f9e70c730b8d0215f6db1f73a8e2f878d22932a72c8dbfe921591be7adcdaab00 SHA512 4ddd9e2d30719f931cadd1a4de5700736f641f4b074378d9ea1462a90b81975ce8e8c3ca2e3a1e15ac0288824eef5b0f0a3e31482f7637c450c6d7e52c8f40d2
|
||||
EBUILD vim-8.2.0814-r100.ebuild 9304 BLAKE2B 563190974cab76e63a7633b6722cdebb3f20eaaf6436e960d5560bf9cc32397b32a150b63e9686d3c613cd852815caf3dea578223e4e7f2ff60983c7fd1376a1 SHA512 0c5f94038d92076232fabde3d7aa8247e2edef69e2415e9ca666cae7467db105cbccc4834764e0033cc53d2907b9153582bfb5583a3beadbd14a0b8861da0fa1
|
||||
EBUILD vim-8.2.0814-r100.ebuild 9303 BLAKE2B 90209968ee61a842a569d8fa8dcf58f77acc181b617aa638d92baca8b448897b8e76f377134a062b2501166361e8284cf08a31db1c730716fe8247c76b9b16e1 SHA512 604983d7893ac4fe47cc74c2182a82b60464fe2910775c889ea7c251f846fff77908c00c987c6bedb9acc55a6a26dc812fad7694b264c4c18e0e1f72eeccf815
|
||||
EBUILD vim-9999.ebuild 9230 BLAKE2B 11fcd309559250e68b0ea9ddbe6309e9668afcbde293f5c2e4097a7cd3ed0abc559a1d4a2a1f9ce4bfd8b1bc04a1686cef901a6b2865124bb3ea0e1d7555d9dd SHA512 2ee8e6a42f84503c83be45f3ad2439dfdd6750a380a46bb2dd57737bf4e6e078528b958c964a0ac3362ffa09cc9b349094494b6aad7a1b2931253e4295586caf
|
||||
MISC metadata.xml 868 BLAKE2B e4d87b075de11ce8f87d58f8c01f976b816854f3e1339bbef0e9cad892f07cf9564716d60ce3b1b83f0bb380b9dfb3fc94ac21c21df4704f5ab8b54e8997217d SHA512 fb51df080c0cc8a458def353fb3eccea40c050eeb3fca53f3aa2be0ca11b0e869f93da8f123bda1c328a8a8ba29c02268535336566a1a77f367c6dee041e5a8d
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST emacs-common-1.8.tar.xz 61352 BLAKE2B 084cf06c03db231c92d0074a2e633d209257941b2840c2c745462050e694756f97679c7078357d9eab7b2fcfb85b00ab390d65254ddd106d0ef1a1fd723b2c4c SHA512 85c4b826c0691fd24f260750f4c3f9ecc3b59d11b4dafcae608e1a2546c064b240084974962b0727ac8183b8f5b0891cf47add901461f77ee275a129341b2b13
|
||||
EBUILD emacs-common-1.8.ebuild 2888 BLAKE2B 6a83d6c275728024b569a7379631ee144702e55b6e47c59753693baf661dbc876df42b855ebceb4efc28158b3ef9e81a982ab1ab4e4a41ab008a84e4507adcd6 SHA512 af219f7a3523c9e09a6fa1908ab4c849304cbda3a7b24a94dd40615eae299798f0c82742351b648cc86f982b75e8d6d9985d5999088a172c5ac26c0944ab9195
|
||||
EBUILD emacs-common-1.8.ebuild 2887 BLAKE2B 6a38fecd88e881ddaf13e6a654598c4e924ccb363decf63703c29520c118fba3b254c8ef821893963d0708ed4224b1c8da0b41563e93e7ef2332aad4f3b6594f SHA512 f2f6e67ce5114cde7548fbd77fee30b6f8ea40244868c9b25360917034c37b0a85c146947045a8c0dc628dd6d6677b8b5092d51841a67b75f5500aaf17c2bd82
|
||||
MISC metadata.xml 361 BLAKE2B d6ce072291bc875d0af89563bd19f9b64b5d7bdf02a369b9885bec238c3b08d4a2b1c7c8b65f5140c80c9e9f0178100bd2932b75b707094c80409157af126026 SHA512 f76df6b1e6606e8bed92b5a86ff26eb9876b2d385f1ca7feeed0df22cd82314735cf90cbffda0c462ae14930de3dd70460e6209281da1993141fe97dfcc88605
|
||||
|
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
Forward-ported from original patch for 5.2.0.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index da2501489f..4660ee3ee5 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -516,6 +516,7 @@ ld="${LD-${cross_prefix}ld}"
|
||||
ranlib="${RANLIB-${cross_prefix}ranlib}"
|
||||
nm="${NM-${cross_prefix}nm}"
|
||||
strip="${STRIP-${cross_prefix}strip}"
|
||||
+strings="${STRINGS-${cross_prefix}strings}"
|
||||
windres="${WINDRES-${cross_prefix}windres}"
|
||||
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
|
||||
query_pkg_config() {
|
||||
@@ -2380,9 +2381,9 @@ int main(int argc, char *argv[])
|
||||
EOF
|
||||
|
||||
if compile_prog ; then
|
||||
- if strings -a $TMPE | grep -q BiGeNdIaN ; then
|
||||
+ if $strings -a $TMPE | grep -q BiGeNdIaN ; then
|
||||
bigendian="yes"
|
||||
- elif strings -a $TMPE | grep -q LiTtLeEnDiAn ; then
|
||||
+ elif $strings -a $TMPE | grep -q LiTtLeEnDiAn ; then
|
||||
bigendian="no"
|
||||
else
|
||||
echo big/little test failed
|
@ -0,0 +1,909 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9,10} )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
FIRMWARE_ABI_VERSION="6.1.0"
|
||||
|
||||
inherit linux-info toolchain-funcs python-r1 udev fcaps readme.gentoo-r1 \
|
||||
pax-utils xdg-utils
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="https://git.qemu.org/git/qemu.git"
|
||||
EGIT_SUBMODULES=(
|
||||
meson
|
||||
tests/fp/berkeley-softfloat-3
|
||||
tests/fp/berkeley-testfloat-3
|
||||
ui/keycodemapdb
|
||||
)
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="https://download.qemu.org/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
|
||||
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2 BSD-2"
|
||||
SLOT="0"
|
||||
|
||||
IUSE="accessibility +aio alsa bzip2 capstone +caps +curl debug +doc
|
||||
+fdt fuse glusterfs gnutls gtk infiniband iscsi io-uring
|
||||
jack jemalloc +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo multipath
|
||||
ncurses nfs nls numa opengl +oss +pin-upstream-blobs
|
||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||
+slirp
|
||||
smartcard snappy spice ssh static static-user systemtap test udev usb
|
||||
usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
|
||||
xfs zstd"
|
||||
|
||||
COMMON_TARGETS="
|
||||
aarch64
|
||||
alpha
|
||||
arm
|
||||
cris
|
||||
hppa
|
||||
i386
|
||||
m68k
|
||||
microblaze
|
||||
microblazeel
|
||||
mips
|
||||
mips64
|
||||
mips64el
|
||||
mipsel
|
||||
nios2
|
||||
or1k
|
||||
ppc
|
||||
ppc64
|
||||
riscv32
|
||||
riscv64
|
||||
s390x
|
||||
sh4
|
||||
sh4eb
|
||||
sparc
|
||||
sparc64
|
||||
x86_64
|
||||
xtensa
|
||||
xtensaeb
|
||||
"
|
||||
IUSE_SOFTMMU_TARGETS="
|
||||
${COMMON_TARGETS}
|
||||
avr
|
||||
rx
|
||||
tricore
|
||||
"
|
||||
IUSE_USER_TARGETS="
|
||||
${COMMON_TARGETS}
|
||||
aarch64_be
|
||||
armeb
|
||||
hexagon
|
||||
mipsn32
|
||||
mipsn32el
|
||||
ppc64abi32
|
||||
ppc64le
|
||||
sparc32plus
|
||||
"
|
||||
|
||||
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
|
||||
use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
|
||||
IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
# Allow no targets to be built so that people can get a tools-only build.
|
||||
# Block USE flag configurations known to not work.
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
qemu_softmmu_targets_arm? ( fdt )
|
||||
qemu_softmmu_targets_microblaze? ( fdt )
|
||||
qemu_softmmu_targets_mips64el? ( fdt )
|
||||
qemu_softmmu_targets_ppc64? ( fdt )
|
||||
qemu_softmmu_targets_ppc? ( fdt )
|
||||
qemu_softmmu_targets_riscv32? ( fdt )
|
||||
qemu_softmmu_targets_riscv64? ( fdt )
|
||||
sdl-image? ( sdl )
|
||||
static? ( static-user !alsa !gtk !jack !opengl !pulseaudio !plugins !rbd !snappy !udev )
|
||||
static-user? ( !plugins )
|
||||
vhost-user-fs? ( caps seccomp )
|
||||
virgl? ( opengl )
|
||||
virtfs? ( caps xattr )
|
||||
vte? ( gtk )
|
||||
multipath? ( udev )
|
||||
plugins? ( !static !static-user )
|
||||
"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# and user/softmmu targets (qemu-*, qemu-system-*).
|
||||
#
|
||||
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
|
||||
#
|
||||
# The attr lib isn't always linked in (although the USE flag is always
|
||||
# respected). This is because qemu supports using the C library's API
|
||||
# when available rather than always using the external library.
|
||||
ALL_DEPEND="
|
||||
>=dev-libs/glib-2.0[static-libs(+)]
|
||||
sys-libs/zlib[static-libs(+)]
|
||||
python? ( ${PYTHON_DEPS} )
|
||||
systemtap? ( dev-util/systemtap )
|
||||
xattr? ( sys-apps/attr[static-libs(+)] )"
|
||||
|
||||
# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
|
||||
# softmmu targets (qemu-system-*).
|
||||
SOFTMMU_TOOLS_DEPEND="
|
||||
dev-libs/libxml2[static-libs(+)]
|
||||
>=x11-libs/pixman-0.28.0[static-libs(+)]
|
||||
accessibility? (
|
||||
app-accessibility/brltty[api]
|
||||
app-accessibility/brltty[static-libs(+)]
|
||||
)
|
||||
aio? ( dev-libs/libaio[static-libs(+)] )
|
||||
alsa? ( >=media-libs/alsa-lib-1.0.13 )
|
||||
bzip2? ( app-arch/bzip2[static-libs(+)] )
|
||||
capstone? ( dev-libs/capstone:= )
|
||||
caps? ( sys-libs/libcap-ng[static-libs(+)] )
|
||||
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
|
||||
fdt? ( >=sys-apps/dtc-1.5.0[static-libs(+)] )
|
||||
fuse? ( >=sys-fs/fuse-3.1:3[static-libs(+)] )
|
||||
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
|
||||
gnutls? (
|
||||
dev-libs/nettle:=[static-libs(+)]
|
||||
>=net-libs/gnutls-3.0:=[static-libs(+)]
|
||||
)
|
||||
gtk? (
|
||||
x11-libs/gtk+:3
|
||||
vte? ( x11-libs/vte:2.91 )
|
||||
)
|
||||
infiniband? (
|
||||
sys-fabric/libibumad:=[static-libs(+)]
|
||||
sys-fabric/libibverbs:=[static-libs(+)]
|
||||
sys-fabric/librdmacm:=[static-libs(+)]
|
||||
)
|
||||
iscsi? ( net-libs/libiscsi )
|
||||
io-uring? ( sys-libs/liburing:=[static-libs(+)] )
|
||||
jack? ( virtual/jack )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
multipath? ( sys-fs/multipath-tools )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:=[unicode(+)]
|
||||
sys-libs/ncurses:=[static-libs(+)]
|
||||
)
|
||||
nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
|
||||
numa? ( sys-process/numactl[static-libs(+)] )
|
||||
opengl? (
|
||||
virtual/opengl
|
||||
media-libs/libepoxy[static-libs(+)]
|
||||
media-libs/mesa[static-libs(+)]
|
||||
media-libs/mesa[egl,gbm]
|
||||
)
|
||||
png? ( media-libs/libpng:0=[static-libs(+)] )
|
||||
pulseaudio? ( media-sound/pulseaudio )
|
||||
rbd? ( sys-cluster/ceph )
|
||||
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
|
||||
sdl? (
|
||||
media-libs/libsdl2[video]
|
||||
media-libs/libsdl2[static-libs(+)]
|
||||
)
|
||||
sdl-image? ( media-libs/sdl2-image[static-libs(+)] )
|
||||
seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
|
||||
slirp? ( net-libs/libslirp[static-libs(+)] )
|
||||
smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
|
||||
snappy? ( app-arch/snappy:= )
|
||||
spice? (
|
||||
>=app-emulation/spice-protocol-0.12.3
|
||||
>=app-emulation/spice-0.12.0[static-libs(+)]
|
||||
)
|
||||
ssh? ( >=net-libs/libssh-0.8.6[static-libs(+)] )
|
||||
udev? ( virtual/libudev:= )
|
||||
usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
|
||||
usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
|
||||
vde? ( net-misc/vde[static-libs(+)] )
|
||||
virgl? ( media-libs/virglrenderer[static-libs(+)] )
|
||||
virtfs? ( sys-libs/libcap )
|
||||
xen? ( app-emulation/xen-tools:= )
|
||||
xfs? ( sys-fs/xfsprogs[static-libs(+)] )
|
||||
zstd? ( >=app-arch/zstd-1.4.0[static-libs(+)] )
|
||||
"
|
||||
|
||||
EDK2_OVMF_VERSION="202105"
|
||||
SEABIOS_VERSION="1.14.0"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}[binary]
|
||||
~sys-firmware/ipxe-1.21.1[binary,qemu]
|
||||
~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre10[binary]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/edk2-ovmf-${EDK2_OVMF_VERSION}
|
||||
sys-firmware/ipxe[qemu]
|
||||
>=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-${SEABIOS_VERSION}[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-${SEABIOS_VERSION}[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
$(python_gen_impl_dep)
|
||||
dev-lang/perl
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
doc? (
|
||||
dev-python/sphinx
|
||||
dev-python/sphinx_rtd_theme
|
||||
)
|
||||
gtk? ( nls? ( sys-devel/gettext ) )
|
||||
test? (
|
||||
dev-libs/glib[utils]
|
||||
sys-devel/bc
|
||||
)
|
||||
"
|
||||
CDEPEND="
|
||||
!static? (
|
||||
${ALL_DEPEND//\[static-libs(+)]}
|
||||
${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
|
||||
)
|
||||
qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc? ( ${PPC_FIRMWARE_DEPEND} )
|
||||
qemu_softmmu_targets_ppc64? ( ${PPC_FIRMWARE_DEPEND} )
|
||||
"
|
||||
DEPEND="${CDEPEND}
|
||||
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
|
||||
static? (
|
||||
${ALL_DEPEND}
|
||||
${SOFTMMU_TOOLS_DEPEND}
|
||||
)
|
||||
static-user? ( ${ALL_DEPEND} )"
|
||||
RDEPEND="${CDEPEND}
|
||||
acct-group/kvm
|
||||
selinux? ( sec-policy/selinux-qemu )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
|
||||
"${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch
|
||||
"${FILESDIR}"/${PN}-6.0.0-make.patch
|
||||
"${FILESDIR}"/${PN}-6.1.0-strings.patch
|
||||
)
|
||||
|
||||
QA_PREBUILT="
|
||||
usr/share/qemu/hppa-firmware.img
|
||||
usr/share/qemu/openbios-ppc
|
||||
usr/share/qemu/openbios-sparc64
|
||||
usr/share/qemu/openbios-sparc32
|
||||
usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.elf
|
||||
usr/share/qemu/opensbi-riscv32-generic-fw_dynamic.elf
|
||||
usr/share/qemu/palcode-clipper
|
||||
usr/share/qemu/s390-ccw.img
|
||||
usr/share/qemu/s390-netboot.img
|
||||
usr/share/qemu/u-boot.e500
|
||||
"
|
||||
|
||||
QA_WX_LOAD="usr/bin/qemu-i386
|
||||
usr/bin/qemu-x86_64
|
||||
usr/bin/qemu-alpha
|
||||
usr/bin/qemu-arm
|
||||
usr/bin/qemu-cris
|
||||
usr/bin/qemu-m68k
|
||||
usr/bin/qemu-microblaze
|
||||
usr/bin/qemu-microblazeel
|
||||
usr/bin/qemu-mips
|
||||
usr/bin/qemu-mipsel
|
||||
usr/bin/qemu-or1k
|
||||
usr/bin/qemu-ppc
|
||||
usr/bin/qemu-ppc64
|
||||
usr/bin/qemu-ppc64abi32
|
||||
usr/bin/qemu-sh4
|
||||
usr/bin/qemu-sh4eb
|
||||
usr/bin/qemu-sparc
|
||||
usr/bin/qemu-sparc64
|
||||
usr/bin/qemu-armeb
|
||||
usr/bin/qemu-sparc32plus
|
||||
usr/bin/qemu-s390x
|
||||
usr/bin/qemu-unicore32
|
||||
"
|
||||
|
||||
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
|
||||
kernel module loaded before running kvm. The easiest way to ensure that the
|
||||
kernel module is loaded is to load it on boot.
|
||||
For AMD CPUs the module is called 'kvm-amd'.
|
||||
For Intel CPUs the module is called 'kvm-intel'.
|
||||
Please review /etc/conf.d/modules for how to load these.
|
||||
|
||||
Make sure your user is in the 'kvm' group. Just run
|
||||
$ gpasswd -a <USER> kvm
|
||||
then have <USER> re-login.
|
||||
|
||||
For brand new installs, the default permissions on /dev/kvm might not let
|
||||
you access it. You can tell udev to reset ownership/perms:
|
||||
$ udevadm trigger -c add /dev/kvm
|
||||
|
||||
If you want to register binfmt handlers for qemu user targets:
|
||||
For openrc:
|
||||
# rc-update add qemu-binfmt
|
||||
For systemd:
|
||||
# ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
|
||||
|
||||
pkg_pretend() {
|
||||
if use kernel_linux && kernel_is lt 2 6 25; then
|
||||
eerror "This version of KVM requires a host kernel of 2.6.25 or higher."
|
||||
elif use kernel_linux; then
|
||||
if ! linux_config_exists; then
|
||||
eerror "Unable to check your kernel for KVM support"
|
||||
else
|
||||
CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
|
||||
ERROR_KVM="You must enable KVM in your kernel to continue"
|
||||
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
|
||||
ERROR_KVM_AMD+=" your kernel configuration."
|
||||
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
|
||||
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
|
||||
ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
|
||||
ERROR_TUN+=" into your kernel or loaded as a module to use the"
|
||||
ERROR_TUN+=" virtual network device if using -net tap."
|
||||
ERROR_BRIDGE="You will also need support for 802.1d"
|
||||
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
|
||||
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
|
||||
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
|
||||
ERROR_VHOST_NET+=" support"
|
||||
|
||||
if use amd64 || use x86 || use amd64-linux || use x86-linux; then
|
||||
if grep -q AuthenticAMD /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_AMD"
|
||||
elif grep -q GenuineIntel /proc/cpuinfo; then
|
||||
CONFIG_CHECK+=" ~KVM_INTEL"
|
||||
fi
|
||||
fi
|
||||
|
||||
use python && CONFIG_CHECK+=" ~DEBUG_FS"
|
||||
ERROR_DEBUG_FS="debugFS support required for kvm_stat"
|
||||
|
||||
# Now do the actual checks setup above
|
||||
check_extra_config
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
|
||||
eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
|
||||
eerror "instances are still pointing to it. Please update your"
|
||||
eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
|
||||
eerror "and the right system binary (e.g. qemu-system-x86_64)."
|
||||
die "update your virt configs to not use qemu-kvm"
|
||||
fi
|
||||
}
|
||||
|
||||
# Sanity check to make sure target lists are kept up-to-date.
|
||||
check_targets() {
|
||||
local var=$1 mak=$2
|
||||
local detected sorted
|
||||
|
||||
pushd "${S}"/configs/targets/ >/dev/null || die
|
||||
|
||||
# Force C locale until glibc is updated. #564936
|
||||
detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "${var}: ${sorted}"
|
||||
eerror "$(printf '%-*s' ${#var} configure): ${detected}"
|
||||
die "sync ${var} to the list of targets"
|
||||
fi
|
||||
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
check_targets IUSE_SOFTMMU_TARGETS softmmu
|
||||
check_targets IUSE_USER_TARGETS linux-user
|
||||
|
||||
default
|
||||
|
||||
# Use correct toolchain to fix cross-compiling
|
||||
tc-export AR AS LD NM OBJCOPY PKG_CONFIG RANLIB STRINGS
|
||||
export WINDRES=${CHOST}-windres
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Remove bundled copy of libfdt
|
||||
rm -r dtc || die
|
||||
}
|
||||
|
||||
##
|
||||
# configures qemu based on the build directory and the build type
|
||||
# we are using.
|
||||
#
|
||||
qemu_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
local buildtype=$1
|
||||
local builddir="${S}/${buildtype}-build"
|
||||
|
||||
mkdir "${builddir}"
|
||||
|
||||
local conf_opts=(
|
||||
--prefix=/usr
|
||||
--sysconfdir=/etc
|
||||
--bindir=/usr/bin
|
||||
--libdir=/usr/$(get_libdir)
|
||||
--datadir=/usr/share
|
||||
--docdir=/usr/share/doc/${PF}/html
|
||||
--mandir=/usr/share/man
|
||||
--localstatedir=/var
|
||||
--disable-bsd-user
|
||||
--disable-containers # bug #732972
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
|
||||
# bug #746752: TCG interpreter has a few limitations:
|
||||
# - it does not support FPU
|
||||
# - it's generally slower on non-self-modifying code
|
||||
# It's advantage is support for host architectures
|
||||
# where native codegeneration is not implemented.
|
||||
# Gentoo has qemu keyworded only on targets with
|
||||
# native code generation available. Avoid the interpreter.
|
||||
--disable-tcg-interpreter
|
||||
|
||||
--disable-werror
|
||||
# We support gnutls/nettle for crypto operations. It is possible
|
||||
# to use gcrypt when gnutls/nettle are disabled (but not when they
|
||||
# are enabled), but it's not really worth the hassle. Disable it
|
||||
# all the time to avoid automatically detecting it. #568856
|
||||
--disable-gcrypt
|
||||
--python="${PYTHON}"
|
||||
--cc="$(tc-getCC)"
|
||||
--cxx="$(tc-getCXX)"
|
||||
--host-cc="$(tc-getBUILD_CC)"
|
||||
$(use_enable debug debug-info)
|
||||
$(use_enable debug debug-tcg)
|
||||
$(use_enable doc docs)
|
||||
$(use_enable nls gettext)
|
||||
$(use_enable plugins)
|
||||
$(use_enable xattr attr)
|
||||
)
|
||||
|
||||
# Disable options not used by user targets. This simplifies building
|
||||
# static user targets (USE=static-user) considerably.
|
||||
conf_notuser() {
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
echo "--disable-${2:-$1}"
|
||||
else
|
||||
use_enable "$@"
|
||||
fi
|
||||
}
|
||||
# Enable option only for softmmu build, but not 'user' or 'tools'
|
||||
conf_softmmu() {
|
||||
if [[ ${buildtype} == "softmmu" ]] ; then
|
||||
use_enable "$@"
|
||||
else
|
||||
echo "--disable-${2:-$1}"
|
||||
fi
|
||||
}
|
||||
# Enable option only for tools build, but not 'user' or 'softmmu'
|
||||
conf_tools() {
|
||||
if [[ ${buildtype} == "tools" ]] ; then
|
||||
use_enable "$@"
|
||||
else
|
||||
echo "--disable-${2:-$1}"
|
||||
fi
|
||||
}
|
||||
conf_opts+=(
|
||||
$(conf_notuser accessibility brlapi)
|
||||
$(conf_notuser aio linux-aio)
|
||||
$(conf_notuser bzip2)
|
||||
$(conf_notuser capstone)
|
||||
$(conf_notuser caps cap-ng)
|
||||
$(conf_notuser curl)
|
||||
$(conf_notuser fdt)
|
||||
$(conf_notuser fuse)
|
||||
$(conf_notuser glusterfs)
|
||||
$(conf_notuser gnutls)
|
||||
$(conf_notuser gnutls nettle)
|
||||
$(conf_notuser gtk)
|
||||
$(conf_notuser infiniband rdma)
|
||||
$(conf_notuser iscsi libiscsi)
|
||||
$(conf_notuser io-uring linux-io-uring)
|
||||
$(conf_notuser jemalloc jemalloc)
|
||||
$(conf_notuser jpeg vnc-jpeg)
|
||||
$(conf_notuser kernel_linux kvm)
|
||||
$(conf_notuser lzo)
|
||||
$(conf_notuser multipath mpath)
|
||||
$(conf_notuser ncurses curses)
|
||||
$(conf_notuser nfs libnfs)
|
||||
$(conf_notuser numa)
|
||||
$(conf_notuser opengl)
|
||||
$(conf_notuser png vnc-png)
|
||||
$(conf_notuser rbd)
|
||||
$(conf_notuser sasl vnc-sasl)
|
||||
$(conf_notuser sdl)
|
||||
$(conf_softmmu sdl-image)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser slirp slirp system)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh)
|
||||
$(conf_notuser udev libudev)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser vhost-user-fs)
|
||||
$(conf_tools vhost-user-fs virtiofsd)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_softmmu virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
# use prebuilt keymaps, bug #759604
|
||||
--disable-xkbcommon
|
||||
$(conf_notuser zstd)
|
||||
)
|
||||
|
||||
if [[ ${buildtype} == "user" ]] ; then
|
||||
conf_opts+=( --disable-libxml2 )
|
||||
else
|
||||
conf_opts+=( --enable-libxml2 )
|
||||
fi
|
||||
|
||||
if [[ ! ${buildtype} == "user" ]] ; then
|
||||
# audio options
|
||||
local audio_opts=(
|
||||
# Note: backend order matters here: #716202
|
||||
# We iterate from higher-level to lower level.
|
||||
$(usex pulseaudio pa "")
|
||||
$(usev jack)
|
||||
$(usev sdl)
|
||||
$(usev alsa)
|
||||
$(usev oss)
|
||||
)
|
||||
conf_opts+=(
|
||||
--audio-drv-list=$(printf "%s," "${audio_opts[@]}")
|
||||
)
|
||||
fi
|
||||
|
||||
case ${buildtype} in
|
||||
user)
|
||||
conf_opts+=(
|
||||
--enable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static-user"
|
||||
;;
|
||||
softmmu)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--enable-system
|
||||
--disable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
tools)
|
||||
conf_opts+=(
|
||||
--disable-linux-user
|
||||
--disable-system
|
||||
--disable-blobs
|
||||
--enable-tools
|
||||
)
|
||||
local static_flag="static"
|
||||
;;
|
||||
esac
|
||||
|
||||
local targets="${buildtype}_targets"
|
||||
[[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
|
||||
|
||||
# Add support for SystemTAP
|
||||
use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
|
||||
|
||||
# We always want to attempt to build with PIE support as it results
|
||||
# in a more secure binary. But it doesn't work with static or if
|
||||
# the current GCC doesn't have PIE support.
|
||||
if use ${static_flag}; then
|
||||
conf_opts+=( --static --disable-pie )
|
||||
else
|
||||
tc-enables-pie && conf_opts+=( --enable-pie )
|
||||
fi
|
||||
|
||||
# Meson will not use a cross-file unless cross_prefix is set.
|
||||
tc-is-cross-compiler && conf_opts+=( --cross-prefix="${CHOST}-" )
|
||||
|
||||
# Plumb through equivalent of EXTRA_ECONF to allow experiments
|
||||
# like bug #747928.
|
||||
conf_opts+=( ${EXTRA_CONF_QEMU} )
|
||||
|
||||
echo "../configure ${conf_opts[*]}"
|
||||
cd "${builddir}"
|
||||
../configure "${conf_opts[@]}" || die "configure failed"
|
||||
|
||||
# FreeBSD's kernel does not support QEMU assigning/grabbing
|
||||
# host USB devices yet
|
||||
use kernel_FreeBSD && \
|
||||
sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local target
|
||||
|
||||
python_setup
|
||||
|
||||
softmmu_targets= softmmu_bins=()
|
||||
user_targets= user_bins=()
|
||||
|
||||
for target in ${IUSE_SOFTMMU_TARGETS} ; do
|
||||
if use "qemu_softmmu_targets_${target}"; then
|
||||
softmmu_targets+=",${target}-softmmu"
|
||||
softmmu_bins+=( "qemu-system-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
for target in ${IUSE_USER_TARGETS} ; do
|
||||
if use "qemu_user_targets_${target}"; then
|
||||
user_targets+=",${target}-linux-user"
|
||||
user_bins+=( "qemu-${target}" )
|
||||
fi
|
||||
done
|
||||
|
||||
softmmu_targets=${softmmu_targets#,}
|
||||
user_targets=${user_targets#,}
|
||||
|
||||
[[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
|
||||
[[ -n ${user_targets} ]] && qemu_src_configure "user"
|
||||
qemu_src_configure "tools"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
default
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
default
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
default
|
||||
}
|
||||
|
||||
src_test() {
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
pax-mark m */qemu-system-* #515550
|
||||
emake check
|
||||
fi
|
||||
}
|
||||
|
||||
qemu_python_install() {
|
||||
python_domodule "${S}/python/qemu"
|
||||
|
||||
python_doscript "${S}/scripts/kvm/vmxcap"
|
||||
python_doscript "${S}/scripts/qmp/qmp-shell"
|
||||
python_doscript "${S}/scripts/qmp/qemu-ga-client"
|
||||
}
|
||||
|
||||
# Generate binfmt support files.
|
||||
# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
|
||||
# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
|
||||
generate_initd() {
|
||||
local out="${T}/qemu-binfmt"
|
||||
local out_systemd="${T}/qemu.conf"
|
||||
local d="${T}/binfmt.d"
|
||||
|
||||
einfo "Generating qemu binfmt scripts and configuration files"
|
||||
|
||||
# Generate the debian fragments first.
|
||||
mkdir -p "${d}"
|
||||
"${S}"/scripts/qemu-binfmt-conf.sh \
|
||||
--debian \
|
||||
--exportdir "${d}" \
|
||||
--qemu-path "${EPREFIX}/usr/bin" \
|
||||
|| die
|
||||
# Then turn the fragments into a shell script we can source.
|
||||
sed -E -i \
|
||||
-e 's:^([^ ]+) (.*)$:\1="\2":' \
|
||||
"${d}"/* || die
|
||||
|
||||
# Generate the init.d script by assembling the fragments from above.
|
||||
local f qcpu package interpreter magic mask
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
|
||||
for f in "${d}"/qemu-* ; do
|
||||
source "${f}"
|
||||
|
||||
# Normalize the cpu logic like we do in the init.d for the native cpu.
|
||||
qcpu=${package#qemu-}
|
||||
case ${qcpu} in
|
||||
arm*) qcpu="arm";;
|
||||
mips*) qcpu="mips";;
|
||||
ppc*) qcpu="ppc";;
|
||||
s390*) qcpu="s390";;
|
||||
sh*) qcpu="sh";;
|
||||
sparc*) qcpu="sparc";;
|
||||
esac
|
||||
|
||||
# we use 'printf' here to be portable across 'sh'
|
||||
# implementations: #679168
|
||||
cat <<EOF >>"${out}"
|
||||
if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
|
||||
printf '%s\n' ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
|
||||
|
||||
done
|
||||
cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if [[ -n ${user_targets} ]]; then
|
||||
cd "${S}/user-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Install binfmt handler init script for user targets.
|
||||
generate_initd
|
||||
doinitd "${T}/qemu-binfmt"
|
||||
|
||||
# Install binfmt/qemu.conf.
|
||||
insinto "/usr/share/qemu/binfmt.d"
|
||||
doins "${T}/qemu.conf"
|
||||
fi
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
cd "${S}/softmmu-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# This might not exist if the test failed. #512010
|
||||
[[ -e check-report.html ]] && dodoc check-report.html
|
||||
|
||||
if use kernel_linux; then
|
||||
udev_newrules "${FILESDIR}"/65-kvm.rules-r2 65-kvm.rules
|
||||
fi
|
||||
|
||||
if use python; then
|
||||
python_foreach_impl qemu_python_install
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${S}/tools-build"
|
||||
emake DESTDIR="${ED}" install
|
||||
|
||||
# Disable mprotect on the qemu binaries as they use JITs to be fast #459348
|
||||
pushd "${ED}"/usr/bin >/dev/null
|
||||
pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
|
||||
popd >/dev/null
|
||||
|
||||
# Install config file example for qemu-bridge-helper
|
||||
insinto "/etc/qemu"
|
||||
doins "${FILESDIR}/bridge.conf"
|
||||
|
||||
cd "${S}"
|
||||
dodoc MAINTAINERS docs/specs/pci-ids.txt
|
||||
newdoc pc-bios/README README.pc-bios
|
||||
|
||||
# Disallow stripping of prebuilt firmware files.
|
||||
dostrip -x ${QA_PREBUILT}
|
||||
|
||||
if [[ -n ${softmmu_targets} ]]; then
|
||||
# Remove SeaBIOS since we're using the SeaBIOS packaged one
|
||||
rm "${ED}/usr/share/qemu/bios.bin"
|
||||
rm "${ED}/usr/share/qemu/bios-256k.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
|
||||
dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
|
||||
fi
|
||||
|
||||
# Remove vgabios since we're using the seavgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/vgabios.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
|
||||
rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
|
||||
# PPC/PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64; then
|
||||
dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
|
||||
dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
|
||||
dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
|
||||
dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
|
||||
dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
|
||||
dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
|
||||
fi
|
||||
|
||||
# Remove sgabios since we're using the sgabios packaged one
|
||||
rm "${ED}/usr/share/qemu/sgabios.bin"
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
|
||||
fi
|
||||
|
||||
# Remove iPXE since we're using the iPXE packaged one
|
||||
rm "${ED}"/usr/share/qemu/pxe-*.rom
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
|
||||
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
|
||||
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
|
||||
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
|
||||
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
|
||||
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
|
||||
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
|
||||
fi
|
||||
fi
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
firmware_abi_change() {
|
||||
local pv
|
||||
for pv in ${REPLACING_VERSIONS}; do
|
||||
if ver_test ${pv} -lt ${FIRMWARE_ABI_VERSION}; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
|
||||
udev_reload
|
||||
fi
|
||||
|
||||
xdg_icon_cache_update
|
||||
|
||||
[[ -z ${EPREFIX} ]] && [[ -f ${EROOT}/usr/libexec/qemu-bridge-helper ]] && \
|
||||
fcaps cap_net_admin ${EROOT}/usr/libexec/qemu-bridge-helper
|
||||
|
||||
DISABLE_AUTOFORMATTING=true
|
||||
readme.gentoo_print_elog
|
||||
|
||||
if use pin-upstream-blobs && firmware_abi_change; then
|
||||
ewarn "This version of qemu pins new versions of firmware blobs:"
|
||||
ewarn " $(best_version sys-firmware/edk2-ovmf)"
|
||||
ewarn " $(best_version sys-firmware/ipxe)"
|
||||
ewarn " $(best_version sys-firmware/seabios)"
|
||||
ewarn " $(best_version sys-firmware/sgabios)"
|
||||
ewarn "This might break resume of hibernated guests (started with a different"
|
||||
ewarn "firmware version) and live migration to/from qemu versions with different"
|
||||
ewarn "firmware. Please (cold) restart all running guests. For functional"
|
||||
ewarn "guest migration ensure that all"
|
||||
ewarn "hosts run at least"
|
||||
ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_info() {
|
||||
echo "Using:"
|
||||
echo " $(best_version app-emulation/spice-protocol)"
|
||||
echo " $(best_version sys-firmware/edk2-ovmf)"
|
||||
if has_version 'sys-firmware/edk2-ovmf[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/ipxe)"
|
||||
echo " $(best_version sys-firmware/seabios)"
|
||||
if has_version 'sys-firmware/seabios[binary]'; then
|
||||
echo " USE=binary"
|
||||
else
|
||||
echo " USE=''"
|
||||
fi
|
||||
echo " $(best_version sys-firmware/sgabios)"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_icon_cache_update
|
||||
}
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST eselect-vi-1.2.tar.gz 2078 BLAKE2B 0f78afe201d9db72de005e035fd044435faf76b0027ce570cad09f3b4f0f497631f57107222de5e649c8badc0cbc3172edd1f1600e5b7bee8ba6f78b2ae9277a SHA512 77ec5281a25156d4a6c4b35fb154aa5837e4d2335637ecdb66a75984419439526f2215abe39a4d08e68d8dd3e337f47947f5a8fbf89ae7ecca8631e7dbf50dc5
|
||||
EBUILD eselect-vi-1.2.ebuild 605 BLAKE2B ef3575470e5419138cbfcb8bc4d3820071bdc96490f46a4510b96a366d86b339234d5bf870c8d4abaaf18b235e61a1fe06390b652c1048f34062af11457d88a8 SHA512 e25bf7d3662fbfbd2c636100d344a5e63628a4277f1f057d94e365a04b33b8a8cd2d93cdeb30f08449a395a46e1a382abd8a59c566542072cfda2285bd02cdb0
|
||||
EBUILD eselect-vi-1.2.ebuild 604 BLAKE2B ba27b2be617a18010b9772af77ee7097b6584e77e0973b830411deb56903fbeb6355950721e06514d1426ed1b890a7985b6198dc6e4f9ea9e0b638c198fe8312 SHA512 b95c609156f4654d4717641fa97e89b9602f348804d7348f1a49daecc38118bdec8a1088287f1bae4d555e0a1a765ce8e2bac5392e1fed0eb04ad552aa2ca409
|
||||
MISC metadata.xml 274 BLAKE2B bfa9b39d4cd1b8163066648034a81b6c9fc23284334d76cbf3b71711a9548646a095d1fefa5e68455645867b5b0c1a7de96e106949b58e1e2ef7cf788ca28bf4 SHA512 aca1820afddcb39050481e3b3ea0310dc197f723ddb1130abaad0ade665062ac12c3f4bc4dda016e1fc9767f15c2fa484dca08a8bca2860107ae82345dcdd63b
|
||||
|
Binary file not shown.
@ -1,3 +1,4 @@
|
||||
DIST beep-1.4.9.tar.gz 83154 BLAKE2B 073169ccb4919c17c0291951834fea682c87021f18562629013293432292750f6d6b3235e8882fa9cf26c9e055e1283cfa629c2e88e0f87a301b238c38380498 SHA512 46e6066cb4d9ad4a0c55a03bf5a2163426648ce3831fe1f7bafa2f02d0e407b50c52e58cc2b123c346df96e92b73d2458b473c3fb001d9a0d1470b7cf38cc35b
|
||||
EBUILD beep-1.4.9-r1.ebuild 1042 BLAKE2B 0568a8102ed375df69e33da066403981368c208b7533a7b64eb009707b6931212fc05a101e66cc76b185574b31817e8a70323e28c98d6ac9c1c6cea2fadbc3a9 SHA512 a833e950d1db7abf875676d95f139fe891a60a0b2ecb60b7197b399a579b999883428be7947143df7a13dc92b5bf3aba9af74ed7b0a16820f6db8f3c9033b4fe
|
||||
EBUILD beep-1.4.9.ebuild 1044 BLAKE2B 2de3a51eb677557cc0012aad4573594c5bf0f86d489e95e1f32cfc73f2a33d18606e35158aa3af342833a768547d86a71f7c33a62ea3d98624b03ee57b7c2d57 SHA512 1a66a24c42965a2b2c80e4ba9698aa710d2beefc7bc40c3cae0933198a2a2f51a5b319c6f5fde1249dc47edc044332c2ae65409071640b1bdd84641c8c56f675
|
||||
MISC metadata.xml 272 BLAKE2B a253052dbe7dfd2dea2cdc3692698a5a94d0e2414979a348d56448cee6329b7fe29a1f252146f9ff04c1ea3b270996631395ecea454ac901eb726dc0b4dd9f29 SHA512 247c1006dd352c3cc7ee07dee2f283394767bdc0f72f0438a6cc845ac53549c05b3741c64ffedb992f003759e67f24aaa7121561db97d1b095c11269115746dc
|
||||
|
@ -0,0 +1,57 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit fcaps toolchain-funcs
|
||||
|
||||
DESCRIPTION="Advanced PC speaker beeper"
|
||||
HOMEPAGE="https://github.com/spkr-beep"
|
||||
SRC_URI="https://github.com/spkr-beep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
|
||||
|
||||
# Tests require a speaker
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i -e "s#-D_FORTIFY_SOURCE=2##g;" GNUmakefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake \
|
||||
COMPILERS=gcc \
|
||||
COMPILER_gcc="$(tc-getCC)" \
|
||||
LINKER_gcc="$(tc-getCC)" \
|
||||
CFLAGS_gcc="${CFLAGS}" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
CPPFLAGS_gcc="" \
|
||||
all
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake \
|
||||
COMPILERS=gcc \
|
||||
COMPILER_gcc="$(tc-getCC)" \
|
||||
LINKER_gcc="$(tc-getCC)" \
|
||||
CFLAGS_gcc="${CFLAGS}" \
|
||||
LDFLAGS="${LDFLAGS}" \
|
||||
check
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dobin beep
|
||||
doman "${PN}.1"
|
||||
|
||||
fperms 0711 /usr/bin/beep
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
fcaps cap_dac_override,cap_sys_tty_config "${EROOT}/usr/bin/beep"
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
DIST livecd-tools-2.10.tar.bz2 9999 BLAKE2B 866bb49d70b8008df30357beb0be7692cee44053bcf25f9544f67ad3ef1f53ddd38604d70ea7db791e6a81cba8de4bc62cd31753bacd01d45d5e6cc558da3d7c SHA512 dbd66a9a6e94b90d06231af2e4d677d97394b765502a72e81a7dcc7ad591d458ad28c69f1de96dc8c9fb10e7ac7031f6595aa89ab8d343f6bfcde875889fdfcb
|
||||
DIST livecd-tools-2.9.tar.bz2 9987 BLAKE2B b24ee78aa0111950322b4424d630f640aa2d525c5c87b5ff3397628ed3e1c55eb2dbb71c32cbd5e57fa3a4310af1f541c1acd370b4f829dce49d2beb6f1be442 SHA512 89e892dfa8581e0f1f8208fecb7a686f19da100751e3430b014e90455c391efd2a3d25f3fff046576f8f739090715a2c14bc8c0b1fc9fe7db03455d84426a889
|
||||
EBUILD livecd-tools-2.10.ebuild 1029 BLAKE2B 510eff7574f7d1ec4111c90975ac078bf7a029504e5cb34cde033a0110c58627d6607c14c17c3ba7362d9cbdbc6dc0a4eef38d3a0bfcf629c5ed9cb54a2d8947 SHA512 bef1e2ae561ea47a057ab62cf3fc02b9196f8e86482a3cd2a93d00dcd659125e47482c3102cbc8b7a5851062d0a75f9fce79550c63e4c43115cfbb22ee3b38c0
|
||||
EBUILD livecd-tools-2.10.ebuild 1028 BLAKE2B f68538ff0356391e0a27fa63385ac3d3e143d4ff99c24163d03a542bfe166a97023f68e1bad6a80669c48df5d0add6346fe1d033487091752be77d7a6ddcd833 SHA512 6e8b09d6f3549963fa0e9d09a7717e81208afc0f99ddbb49624b7312e674a2ea43d6a113b61869c7eca82d04a8b2bafb439168ec54523c49a6e681734a61497d
|
||||
EBUILD livecd-tools-2.9.ebuild 1024 BLAKE2B ead007f9eb78af83357aed50233e83833e5e378bb251345b3315e1b3b4c2640d0dfd6d8ad386336881e67a5cbfc7dd641cebfa6c60b4b3b7e2782022df28e3ca SHA512 bf53ddb65432d50bfaf104f66cc5ab2962532a3784b2784c7d84c7ec762d58fc90a4b63249dff50b9f422d1686c3aae9de78e211e512f170484abe3ebe3ad3e7
|
||||
EBUILD livecd-tools-9999.ebuild 1030 BLAKE2B d899e32ca5e11a0eb3fbd0ee6ef4efcc9159ff15f94e3d7b43ab6d5911d7bf859b278985525159b3491f9e4d733707f526b8b3c4e5eb4aef61dbfcdff353546c SHA512 431cdf1dd314eec95e2afba09dda9309b14aa24f5e958630f47f6633a885892d7a1dfc90f277aad63558ae071aaa29b9172e34f10325a9b9a5c5532b6d5f0342
|
||||
MISC metadata.xml 257 BLAKE2B b9901b8caec50c3348db0f5bf23d8b69576570ab12219f1360d78f98ca20b858a0324ff0cff52f85859ce8ee383d6837a670f3957f8d475cfb80eb4a47427c13 SHA512 c89180536fb53175fe55ca76a3fe9d0fece5ae0cab281e0ad0fbfb4135bab69a0dde45f97998372d3d2ddc16c948f074f45661fb1b946265fc6b94aaaf880489
|
||||
|
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
AUX kuroo-1.2.1-cmake.patch 3239 BLAKE2B c74f9b3bb863a2989d1c994f77ac9161d759adcf1acd2651eaa44d59c6899617e2becdaad4e3eb34723c7b5a68ae450db89371b514677af24b898ba762825e7c SHA512 1b60e48aa1daa611bb06ab0d1b806e15802d80318804037e0730198cd5de95156bc968f6169bbe8fad3bf3458884361a07cbc26fb856bf6fb6938c1a30d4a4bb
|
||||
DIST kuroo-1.2.1.tar.xz 247540 BLAKE2B 69c8a85cd58347b835039f4bc6929abb71baf517ee1de8b10779d4ba08b997bd46a8e0a5b1c55ea2847d80ab58ed336e524cf53cf707416a6182a0dcbd84abc9 SHA512 3815fcdb27c234669accd3abf0f6f252194d680bc1c18f13e66c428cfcef50685019b19ca8fe20fec1b633e6ed224620cf67eea8a29f593b33760d19657d2d24
|
||||
EBUILD kuroo-1.2.1.ebuild 1241 BLAKE2B 69d6e719375fc6a02cb1b21f428e5c08d0f1c0f6b1625493433a132fdc9763c7b3bbaba2c61b88ae580143282fa301a3c3a9ba756b41015469c95cfdf937623f SHA512 9082c45a13951ddafe77a092509f01a11209f32be0d8c25c62a6c2e10dc1bfe48a3e29acf64bee4eef78b7992555adb4625e0adec5f13bf04ae6ff09bf99a96b
|
||||
EBUILD kuroo-1.2.1.ebuild 1298 BLAKE2B e314b7e97665cadfd56a0df6076a8beb32d0dbd7d4fdac483fd800aa5722a44ca35e32880dbe12f70bbac990f299e78954f2d50212ac931cb1810318a60fc130 SHA512 9b28b95b91b2eae68e7c50f3627f5c0c262692e86dd5654f5952e4dc90e7020b576e623cc95dbd483a5bb6f0ebbfcd7bbf2397cf48ac00ce4c0e199b4896fe68
|
||||
EBUILD kuroo-9999.ebuild 1258 BLAKE2B 72c28ae448d8fdb1663951a8928cc3e0f9588b7d2248f9a0b70df5c0be56e08f5af0f36a07a51dd197665de8c75f3bce7a9705e2fd4c4f95936be881e8a6aaa5 SHA512 76c1ef2215f4399abf9eed626c1c8fef5288b41097029402c182f2028c783497a3222bd6ae0f080a362df71ffc894dc611e5540e2fdc411feb5f7fdda46d8a9e
|
||||
MISC metadata.xml 788 BLAKE2B 948ef576b4bac70a83da4c753b3ae7b4d8d32fdf45c50fdc0a49245f02b3107a8db0dec47c58367d643dd55c8af489159faf714b3800af6b6f47efb912ac7a25 SHA512 9e459ffddff6c2bb515272933af705e23312731ce0466b88e9469ed1d7927301c08dfdb4117f2dc29edf2c8d9b79fe5ce8ed73441a90ecb3adda0546d9dd7c46
|
||||
|
@ -0,0 +1,108 @@
|
||||
Drop bogus dependencies, add implicit.
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -11,25 +11,32 @@
|
||||
include(ECMInstallIcons)
|
||||
include(ECMAddTests)
|
||||
|
||||
-find_package(Qt5Widgets REQUIRED)
|
||||
+# Works without this explicit declaration but it ought to be here for correctness
|
||||
+find_package( SQLite3 REQUIRED )
|
||||
|
||||
-find_package( KF5 ${KF5_MIN_VERSION} REQUIRED
|
||||
- Auth
|
||||
- Config
|
||||
- ConfigWidgets
|
||||
- CoreAddons
|
||||
- I18n
|
||||
- IconThemes
|
||||
- ItemModels
|
||||
- ItemViews
|
||||
+# These are actually all deps of other things
|
||||
+find_package( Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||
+ Core
|
||||
+ Gui
|
||||
+ Widgets
|
||||
+)
|
||||
+
|
||||
+find_package( KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
|
||||
+ # These are all required directly and not provided by any dependencies. It "compiles and works" on the development system with just these
|
||||
KIO
|
||||
Notifications
|
||||
ThreadWeaver
|
||||
TextWidgets
|
||||
- Su
|
||||
- WidgetsAddons
|
||||
- WindowSystem
|
||||
- XmlGui
|
||||
+ # Required in link step
|
||||
+ XmlGui # MainWindow is XmlGuiWindow
|
||||
+ ItemViews # TreeWidgetSearchLine
|
||||
+ # These seem to be provided by deps, but should be direct deps too
|
||||
+ ConfigWidgets
|
||||
+ I18n # i18n(QStr)
|
||||
+ Config # Config dialogs
|
||||
+ Auth # KAuthExecuteJob &c.
|
||||
+ CoreAddons # AboutData? Job Process User?
|
||||
+ WidgetsAddons # Font(Chooser|Requester)? PageWidget? MessageBox ...
|
||||
)
|
||||
|
||||
#
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -102,25 +102,37 @@
|
||||
kde_enable_exceptions()
|
||||
|
||||
target_link_libraries( kuroo
|
||||
+ # These are all used directly and not provided by any other dependency. It "compiles and works" on the development system with just these
|
||||
+ KF5::KIOCore
|
||||
+ KF5::Notifications
|
||||
+ KF5::ThreadWeaver
|
||||
+ KF5::TextWidgets
|
||||
+ KF5::XmlGui
|
||||
+ sqlite3 # TODO: use some sort of ORM maybe find_package?
|
||||
+ KF5::ItemViews
|
||||
+ # Builds without these specified, but they should be necessary
|
||||
Qt5::Core
|
||||
+ Qt5::Gui
|
||||
+ Qt5::Widgets
|
||||
KF5::Auth
|
||||
+ KF5::AuthCore
|
||||
KF5::ConfigCore
|
||||
KF5::ConfigGui
|
||||
+ KF5::ConfigWidgets
|
||||
KF5::CoreAddons
|
||||
KF5::I18n
|
||||
- KF5::ItemViews
|
||||
- KF5::KIOCore
|
||||
- KF5::Notifications
|
||||
- KF5::ThreadWeaver
|
||||
- KF5::TextWidgets
|
||||
KF5::WidgetsAddons
|
||||
- KF5::WindowSystem
|
||||
- KF5::XmlGui
|
||||
- sqlite3
|
||||
)
|
||||
|
||||
add_executable( kuroo_helper auth/kuroohelper.cpp )
|
||||
-target_link_libraries( kuroo_helper Qt5::Core KF5::KIOCore KF5::Auth KF5::CoreAddons )
|
||||
+target_link_libraries( kuroo_helper
|
||||
+ # These are all used directly and not provided by any other dependency. It "compiles and works" on the development system with just these
|
||||
+ KF5::KIOCore
|
||||
+ KF5::Auth
|
||||
+ # Builds without explicit declaration, but these make sense
|
||||
+ Qt5::Core
|
||||
+ KF5::CoreAddons # KProcess
|
||||
+)
|
||||
install( TARGETS kuroo_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR} )
|
||||
kauth_install_helper_files( kuroo_helper org.gentoo.portage.kuroo root )
|
||||
kauth_install_actions( org.gentoo.portage.kuroo auth/org.gentoo.portage.kuroo.actions )
|
||||
@@ -139,6 +151,6 @@
|
||||
########### install ###############
|
||||
install( TARGETS kuroo ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
||||
#install( FILES DESTINATION ${DATA_INSTALL_DIR}/autostart )
|
||||
-install( FILES config/kurooconfig.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
|
||||
+install( FILES config/kurooconfig.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
|
||||
install( FILES kurooui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kuroo )
|
||||
install( FILES kuroo.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}/System )
|
@ -1,5 +1,5 @@
|
||||
DIST mirrorselect-2.2.6.tar.gz 16727 BLAKE2B 8875bf61e26ac474338d81a602297fa4fdf3fab3dbd478b02129dbe71f2d09445efa9b82792e3e654725c5e87a4ca00d37a3d924f8bd6f2decdf74148d1069c8 SHA512 ff2b88bf568f79182275e2c85cafbeee7cbeb0226225a7c3289f0a1d7a8b5eae9d41c69b099bb7e0cc9b0300b23afea43c3ac1baa13f37c696159bb1b3ac05f8
|
||||
DIST mirrorselect-test 102403 BLAKE2B 8f23cebf111912ea6fcdea5f4a50a84751a4dd0c62956555a5c0b4fbe15d2329424a65b18c3608440bc0fedd4b2d25fc74cfe91e6e434eb90b7090b36e17b65f SHA512 f43d92e9bf7e77c8f04449a786cb659bdfc07257892caca842ab4a63eb9c5351fa48130c2e163857f3233a595cea7b83f5ea9fa879b782e15b73beb62f0e5e27
|
||||
EBUILD mirrorselect-2.2.6-r2.ebuild 1501 BLAKE2B 782c5bcf945756e50cfea4549390d6e1ebfadc67de120cd35df2219a2eb203fa99c62bba1e13b154bc957f9dea967e839388563b44e1d150662328b0948caf55 SHA512 a8ef57c175e486a474d7a6f67d70e5bc4c43838689296e8efb81b3aee23b511628ca5f6281bfdd22cfa1f32785c82aa0bc94b9a783765a807681d7b2e8349689
|
||||
EBUILD mirrorselect-2.2.6-r2.ebuild 1500 BLAKE2B 4a3dadc4384ee05c147dc9515b0356584365c2a22ca51e0b6d9f15814a6c77105e6bc51f594df1ea7cf5bcf7f20a3e9c559502054081588b98cfc1afa39867a0 SHA512 61810d6a011b19ba4c0bc445e30cb8dc7401a513fd32bd7ea9975018e3a6b8c91abc6001f2e1a32aba114d02a2d4c899a774a3f1037537245860a99fe33255ad
|
||||
EBUILD mirrorselect-9999.ebuild 1143 BLAKE2B 181f8357bb8b7679e1f26f969c0138f742266a6cec1a70e7c938d9c6f0dd1779ffc677cd75f816314b22cd8be39fc03910628cdf10a16ad24c5751c5d87a9f79 SHA512 717c8d0c302117424fe4193bfec1441e8e36220d97aff8377d45bfad6d147ca4fac755cc73e4dcfb000c9361a5f0c6d59e83948802fd7e8200892d3b780a782d
|
||||
MISC metadata.xml 495 BLAKE2B ebc7faf279e0a14f107411622bb0855c36c2229ed8357d7abea7cc7ea6e49a7ae7d136d476c33c02da46bb93614adadf87d6b6e19d1698d14c78942f9eace139 SHA512 5e8f9c4e185318f2de112e02c2c15662553ccae75f35a14023eac9e55ade710a45f0f6b78d98c899fa7604043e28f0ec2109889459aca46b3708c97c444d858d
|
||||
|
Binary file not shown.
@ -1,6 +1,4 @@
|
||||
DIST libmwaw-0.3.19.tar.xz 1401720 BLAKE2B 93e63993dd73d52d1b071c44a5efa4ba2495a370a767cd80fbeb437a56224d333781cfdf32c3ca1c0a3794544da6cdf8c967badf98b6858796fbc8f2ea7878c1 SHA512 a5b74f417366f7e8a8303948e678d54caf9c45e0b51694d39593926b2f2fbbaa5dfea5dee8a6b4a656e5ca5bd880f41a76e7b869f55230690740b7ab75a28f1f
|
||||
DIST libmwaw-0.3.20.tar.xz 1425812 BLAKE2B a708ce4a28a0d5a5a5ee9d178c67119189add0180e61d67af6821c509d95b9f8bfb60eeb1afcdf8e2da5bed26053108b12db57db98912d97dc7e0ef0f7121f18 SHA512 d6cd28629b6482dd61e070036e94568ecc44d9064dddd9c699c7362caa8ef36652ce84cf0f199813854636f2e39ab19d47f4e148990822791b88cd3f17f68b3b
|
||||
EBUILD libmwaw-0.3.19.ebuild 1004 BLAKE2B e6db19e89201be0df73cb6dd3deb81eaf2e08d442c6d958826e95120d14ce2740248158b3a1f5084ae4b9f588d22d62c4794f090f0c58aebcde48204ea256560 SHA512 2ba0bc30818fc9b4032698081bcdea307185e24dd08885168d05ca6ab43bbb6dd2747cfa2268a5416e31c4050fcada5bfcb32bf605d4eadba26cf766b407a2f4
|
||||
EBUILD libmwaw-0.3.20.ebuild 990 BLAKE2B 458e4695a6b2747587b73a2f952d0771ccd31d7410c869f5021955e87101f3aa0f3e5fce16e7770a24474f7790f0eb5615dcbe0f03286d42afe2a6f91f6b4021 SHA512 a492deef4a74ffaaba4adb3705d772c513c0551ab25f66898f7335fdaf15a90a09d9207f5314ebacbd7cc765560361253984e1a200961af77ccb055a1e08754d
|
||||
EBUILD libmwaw-9999.ebuild 993 BLAKE2B 67267f5263a9c98540db6033727d6276f9c033265d1afe2dcde1a9918ff3181ca2b8ae34ec96ffdd9ef0027cb8523ed54f9550dcdf86eaffa5af6c036793ec12 SHA512 dcdcefdb014c8a08ba5415fe53674371f0255fc49c8a070ffd2047b164b7083c280dd039287ba48c3b3be5e68f7cda543ea33e7ec53d1784041c7346c76519ba
|
||||
MISC metadata.xml 404 BLAKE2B 95ac1c73023ff52b4a0d1754f9d37b6c2ffd82f49f16122058f853e40ce15dd9b2fbe6ecc24bdf86e82addc27b4a6f9cd7478560fde845b696f62a1645abdca7 SHA512 858235729f5091f06699f4b32ff14890c139c5e0adff30172da79e3fec4b4452e8529c401a0273b1799706e0ade449451f10b84555ade12022bf62e37098ac07
|
||||
|
@ -1,52 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
if [[ ${PV} = 9999 ]]; then
|
||||
EGIT_REPO_URI="https://git.code.sf.net/p/libmwaw/libmwaw"
|
||||
inherit autotools git-r3
|
||||
else
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
|
||||
KEYWORDS="amd64 ~arm arm64 ~ppc64 x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Library parsing many pre-OSX MAC text formats"
|
||||
HOMEPAGE="https://sourceforge.net/p/libmwaw/wiki/Home/"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
IUSE="doc tools"
|
||||
|
||||
BDEPEND="
|
||||
sys-devel/libtool
|
||||
virtual/pkgconfig
|
||||
doc? ( app-doc/doxygen )
|
||||
"
|
||||
DEPEND="
|
||||
dev-libs/librevenge
|
||||
sys-libs/zlib
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
[[ ${PV} == 9999 ]] && eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# zip is hard enabled as the zlib is dep on the rdeps anyway
|
||||
local myeconfargs=(
|
||||
--enable-zip
|
||||
--disable-static
|
||||
--disable-werror
|
||||
$(use_with doc docs)
|
||||
$(use_enable tools)
|
||||
)
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name '*.la' -type f -delete || die
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,995 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20190822-1908Z"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit cmake-utils eutils flag-o-matic linux-info \
|
||||
prefix toolchain-funcs multilib-minimal
|
||||
|
||||
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
|
||||
https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
|
||||
http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.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"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://www.mysql.com/"
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="5.7/18"
|
||||
IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
|
||||
selinux +server static static-libs systemtap tcmalloc test yassl"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
|
||||
|
||||
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
|
||||
"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
|
||||
"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.26-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-add-missing-gcc-8-fix.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-mips-ASM.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
# MULTILIB_USEDEP only set for libraries used by the client library
|
||||
COMMON_DEPEND="net-misc/curl:=
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
sys-libs/ncurses:0=
|
||||
client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
|
||||
!client-libs? (
|
||||
dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
)
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
kernel_linux? (
|
||||
dev-libs/libaio:0=
|
||||
sys-process/procps:0=
|
||||
)
|
||||
server? (
|
||||
>=app-arch/lz4-0_p131:=
|
||||
cjk? ( app-text/mecab:= )
|
||||
experimental? (
|
||||
dev-libs/libevent:=
|
||||
dev-libs/protobuf:=
|
||||
net-libs/libtirpc:=
|
||||
)
|
||||
numa? ( sys-process/numactl )
|
||||
)
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
!yassl? (
|
||||
client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
|
||||
)
|
||||
!client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=
|
||||
)
|
||||
)
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
dev-libs/protobuf
|
||||
virtual/yacc
|
||||
server? (
|
||||
dev-libs/libevent
|
||||
experimental? ( net-libs/rpcsvc-proto )
|
||||
)
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
test? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-perl/JSON
|
||||
)
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
!dev-db/mysql:0
|
||||
!dev-db/mysql:8.0
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
|
||||
selinux? ( sec-policy/selinux-mysql )
|
||||
server? (
|
||||
!prefix? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-db/mysql-init-scripts
|
||||
)
|
||||
)
|
||||
"
|
||||
# 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 )"
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
|
||||
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_pretend() {
|
||||
if use numa ; then
|
||||
local CONFIG_CHECK="~NUMA"
|
||||
|
||||
local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
|
||||
WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
|
||||
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
# 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
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 use client-libs && [[ -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 [[ -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
|
||||
fi
|
||||
|
||||
# Note about configuration change
|
||||
einfo
|
||||
elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
|
||||
elog "to several files in /etc/mysql/mysql.d."
|
||||
elog "Please backup any changes you made to /etc/mysql/my.cnf"
|
||||
elog "and add them as a new file under /etc/mysql/mysql.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}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cmake-utils_src_prepare
|
||||
|
||||
if use jemalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use tcmalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
|
||||
if [[ -d "${S}/support-files/SELinux" ]] ; then
|
||||
echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove bundled libs so we cannot accidentally use them
|
||||
# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
|
||||
rm -rv \
|
||||
"${S}"/extra/protobuf \
|
||||
"${S}"/extra/libevent \
|
||||
"${S}"/zlib \
|
||||
|| die
|
||||
|
||||
# Don't clash with dev-db/mysql-connector-c
|
||||
rm \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1 \
|
||||
|| die
|
||||
|
||||
sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# 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
|
||||
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_configure
|
||||
else
|
||||
multilib_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if ! multilib_is_native_abi && ! use client-libs ; then
|
||||
return
|
||||
fi
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-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/mysql
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mysql/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
### TODO: make this system but issues with UTF-8 prevent it
|
||||
-DWITH_EDITLINE=bundled
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_LIBWRAP=0
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
# 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)
|
||||
-DWITH_CURL=system
|
||||
-DWITH_BOOST="${S}/boost"
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use yassl ; then
|
||||
mycmakeargs+=( -DWITH_SSL=system )
|
||||
else
|
||||
mycmakeargs+=( -DWITH_SSL=bundled )
|
||||
fi
|
||||
|
||||
if ! use client-libs ; then
|
||||
mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
|
||||
fi
|
||||
|
||||
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
|
||||
# systemtap only works on native ABI, bug 530132
|
||||
if multilib_is_native_abi ; then
|
||||
mycmakeargs+=(
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_TOOLS=1
|
||||
-DWITH_READLINE=1
|
||||
-DENABLE_DTRACE=0
|
||||
)
|
||||
fi
|
||||
|
||||
if multilib_is_native_abi && use server ; then
|
||||
mycmakeargs+=(
|
||||
-DWITH_LIBEVENT=system
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_PROTOBUF=system
|
||||
-DWITH_MECAB=$(usex cjk system OFF)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-DWITH_RAPID=$(usex experimental ON OFF)
|
||||
)
|
||||
|
||||
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
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
)
|
||||
|
||||
if use profiling ; then
|
||||
# Setting to OFF doesn't work: Once set, profiling options will be added
|
||||
# to `mysqld --help` output via sql/sys_vars.cc causing
|
||||
# "main.mysqld--help-notwin" test to fail
|
||||
mycmakeargs+=( -DENABLED_PROFILING=ON )
|
||||
fi
|
||||
|
||||
if use static ; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_EXAMPLE_STORAGE_ENGINE=0
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_INNODB_MEMCACHED=0
|
||||
-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
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_compile
|
||||
else
|
||||
multilib_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# ulimit -n 16500 && \
|
||||
# USE='latin1 perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mysql-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 MySQL 5.7 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
local t
|
||||
|
||||
for t in auth_sec.keyring_udf ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
# Unstable tests
|
||||
# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
|
||||
# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
|
||||
# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
|
||||
for t in \
|
||||
main.xa_prepared_binlog_off \
|
||||
rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
|
||||
rpl.rpl_non_direct_stm_mixing_engines \
|
||||
; do
|
||||
_disable_test "$t" "Unstable test"
|
||||
done
|
||||
|
||||
for t in \
|
||||
gis.geometry_class_attri_prop \
|
||||
gis.geometry_property_function_issimple \
|
||||
gis.gis_bugs_crashes \
|
||||
gis.spatial_op_testingfunc_mix \
|
||||
gis.spatial_analysis_functions_buffer \
|
||||
gis.spatial_analysis_functions_distance \
|
||||
gis.spatial_utility_function_distance_sphere \
|
||||
gis.spatial_utility_function_simplify \
|
||||
gis.spatial_analysis_functions_centroid \
|
||||
; do
|
||||
_disable_test "$t" "Known rounding error with latest AMD processors"
|
||||
done
|
||||
|
||||
if use numa && use kernel_linux ; then
|
||||
# bug 584880
|
||||
if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
|
||||
for t in sys_vars.innodb_numa_interleave_basic ; do
|
||||
_disable_test "$t" "Test $t requires system with NUMA support"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use latin1 ; then
|
||||
# The following tests will fail if DEFAULT_CHARSET
|
||||
# isn't set to latin1:
|
||||
for t in \
|
||||
binlog.binlog_mysqlbinlog_filter \
|
||||
binlog.binlog_xa_prepared_disconnect \
|
||||
funcs_1.is_columns_mysql \
|
||||
funcs_1.is_tables_mysql \
|
||||
funcs_1.is_triggers \
|
||||
innodb.innodb_pagesize_max_recordsize \
|
||||
innodb.innodb-system-table-view \
|
||||
innodb.mysqldump_max_recordsize \
|
||||
main.mysql_client_test \
|
||||
main.mysqld--help-notwin \
|
||||
main.type_string \
|
||||
main.information_schema \
|
||||
perfschema.binlog_edge_mix \
|
||||
perfschema.binlog_edge_stmt \
|
||||
rpl.rpl_xa_survive_disconnect \
|
||||
rpl.rpl_xa_survive_disconnect_lsu_off \
|
||||
rpl.rpl_xa_survive_disconnect_table \
|
||||
; do
|
||||
_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
|
||||
done
|
||||
fi
|
||||
|
||||
if has_version '>=dev-libs/openssl-1.1.1' ; then
|
||||
# Tests are expecting <openssl-1.1.1 default cipher
|
||||
for t in \
|
||||
auth_sec.cert_verify \
|
||||
auth_sec.mysql_ssl_connection \
|
||||
auth_sec.openssl_cert_generation \
|
||||
auth_sec.ssl_auto_detect \
|
||||
auth_sec.ssl_mode \
|
||||
auth_sec.tls \
|
||||
binlog.binlog_grant_alter_user \
|
||||
encryption.innodb_onlinealter_encryption \
|
||||
main.grant_alter_user_qa \
|
||||
main.grant_user_lock_qa \
|
||||
main.mysql_ssl_default \
|
||||
main.openssl_1 \
|
||||
main.plugin_auth_sha256_tls \
|
||||
main.ssl \
|
||||
main.ssl_8k_key \
|
||||
main.ssl_bug75311 \
|
||||
main.ssl_ca \
|
||||
main.ssl_cipher \
|
||||
main.ssl_compress \
|
||||
main.ssl_crl \
|
||||
main.ssl_ecdh \
|
||||
main.ssl_verify_identity \
|
||||
x.connection_tls_version \
|
||||
x.connection_openssl \
|
||||
; do
|
||||
_disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
|
||||
done
|
||||
fi
|
||||
|
||||
# Try to increase file limits to increase test coverage
|
||||
if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
|
||||
# Upper limit comes from parts.partition_* tests
|
||||
ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
|
||||
# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
|
||||
ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
|
||||
ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
|
||||
fi
|
||||
|
||||
# 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"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local MULTILIB_WRAPPED_HEADERS
|
||||
local MULTILIB_CHOST_TOOLS
|
||||
if use client-libs ; then
|
||||
# headers with ABI specific data
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/mysql/server/my_config.h
|
||||
/usr/include/mysql/server/mysql_version.h )
|
||||
|
||||
# wrap the config scripts
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
multilib-minimal_src_install
|
||||
else
|
||||
multilib_src_install
|
||||
multilib_src_install_all
|
||||
fi
|
||||
}
|
||||
|
||||
# Intentionally override eclass function
|
||||
multilib_src_install() {
|
||||
|
||||
cmake-utils_src_install
|
||||
|
||||
# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
|
||||
find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# 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-5.7" "${TMPDIR}/my.cnf" || die
|
||||
eprefixify "${TMPDIR}/my.cnf"
|
||||
doins "${TMPDIR}/my.cnf"
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT%/}"/usr/bin/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)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$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 http://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 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
|
||||
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
echo "USE mysql;" >"${sqltmp}"
|
||||
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
|
||||
chown mysql "${sqltmp}" || die
|
||||
|
||||
# --initialize-insecure will not set root password
|
||||
# --initialize would set a random one in the log which we don't need as we set it ourselves
|
||||
local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
|
||||
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} \
|
||||
$(use prefix || echo --user=mysql) \
|
||||
--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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--no-defaults \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
@ -1,986 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20200125-1945Z"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit cmake-utils eutils flag-o-matic linux-info \
|
||||
prefix toolchain-funcs multilib-minimal
|
||||
|
||||
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
|
||||
https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
|
||||
http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.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"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://www.mysql.com/"
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="5.7/18"
|
||||
IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
|
||||
selinux +server static static-libs systemtap tcmalloc test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc )"
|
||||
|
||||
KEYWORDS="amd64 arm ~arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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}"/20001_all_fix-minimal-build-cmake-mysql-5.7.23.patch
|
||||
"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.7.patch
|
||||
"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.7.10.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.29-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-fix-grant_user_lock-a-root.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.23-round-off-test-values-for-same-output-on-all-architectures.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.7.25-fix-build-without-server.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
# MULTILIB_USEDEP only set for libraries used by the client library
|
||||
COMMON_DEPEND="net-misc/curl:=
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
sys-libs/ncurses:0=
|
||||
client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
|
||||
!client-libs? (
|
||||
dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
)
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
kernel_linux? (
|
||||
dev-libs/libaio:0=
|
||||
sys-process/procps:0=
|
||||
)
|
||||
server? (
|
||||
>=app-arch/lz4-0_p131:=
|
||||
cjk? ( app-text/mecab:= )
|
||||
experimental? (
|
||||
dev-libs/libevent:=
|
||||
dev-libs/protobuf:=
|
||||
net-libs/libtirpc:=
|
||||
)
|
||||
numa? ( sys-process/numactl )
|
||||
)
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
|
||||
)
|
||||
!client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=
|
||||
)
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
dev-libs/protobuf
|
||||
virtual/yacc
|
||||
server? (
|
||||
dev-libs/libevent
|
||||
experimental? ( net-libs/rpcsvc-proto )
|
||||
)
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
test? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-perl/JSON
|
||||
)
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
!dev-db/mysql:0
|
||||
!dev-db/mysql:8.0
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
|
||||
selinux? ( sec-policy/selinux-mysql )
|
||||
server? (
|
||||
!prefix? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-db/mysql-init-scripts
|
||||
)
|
||||
)
|
||||
"
|
||||
# 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 )"
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
|
||||
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_pretend() {
|
||||
if use numa ; then
|
||||
local CONFIG_CHECK="~NUMA"
|
||||
|
||||
local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
|
||||
WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
|
||||
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
# 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
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 use client-libs && [[ -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 [[ -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
|
||||
fi
|
||||
|
||||
# Note about configuration change
|
||||
einfo
|
||||
elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
|
||||
elog "to several files in /etc/mysql/mysql.d."
|
||||
elog "Please backup any changes you made to /etc/mysql/my.cnf"
|
||||
elog "and add them as a new file under /etc/mysql/mysql.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}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cmake-utils_src_prepare
|
||||
|
||||
if use jemalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use tcmalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
|
||||
if [[ -d "${S}/support-files/SELinux" ]] ; then
|
||||
echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove bundled libs so we cannot accidentally use them
|
||||
# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
|
||||
rm -rv \
|
||||
"${S}"/extra/protobuf \
|
||||
"${S}"/extra/libevent \
|
||||
"${S}"/zlib \
|
||||
|| die
|
||||
|
||||
# Don't clash with dev-db/mysql-connector-c
|
||||
rm \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1 \
|
||||
|| die
|
||||
|
||||
sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# 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
|
||||
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_configure
|
||||
else
|
||||
multilib_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if ! multilib_is_native_abi && ! use client-libs ; then
|
||||
return
|
||||
fi
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-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/mysql
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mysql/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
### TODO: make this system but issues with UTF-8 prevent it
|
||||
-DWITH_EDITLINE=bundled
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_SSL=system
|
||||
-DWITH_LIBWRAP=0
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
# 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)
|
||||
-DWITH_CURL=system
|
||||
-DWITH_BOOST="${S}/boost"
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use client-libs ; then
|
||||
mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
|
||||
fi
|
||||
|
||||
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
|
||||
# systemtap only works on native ABI, bug 530132
|
||||
if multilib_is_native_abi ; then
|
||||
mycmakeargs+=(
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_TOOLS=1
|
||||
-DWITH_READLINE=1
|
||||
-DENABLE_DTRACE=0
|
||||
)
|
||||
fi
|
||||
|
||||
if multilib_is_native_abi && use server ; then
|
||||
mycmakeargs+=(
|
||||
-DWITH_LIBEVENT=system
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_PROTOBUF=system
|
||||
-DWITH_MECAB=$(usex cjk system OFF)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-DWITH_RAPID=$(usex experimental ON OFF)
|
||||
)
|
||||
|
||||
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
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
)
|
||||
|
||||
if use profiling ; then
|
||||
# Setting to OFF doesn't work: Once set, profiling options will be added
|
||||
# to `mysqld --help` output via sql/sys_vars.cc causing
|
||||
# "main.mysqld--help-notwin" test to fail
|
||||
mycmakeargs+=( -DENABLED_PROFILING=ON )
|
||||
fi
|
||||
|
||||
if use static ; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_EXAMPLE_STORAGE_ENGINE=0
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_INNODB_MEMCACHED=0
|
||||
-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
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_compile
|
||||
else
|
||||
multilib_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# ulimit -n 16500 && \
|
||||
# USE='latin1 perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mysql-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 MySQL 5.7 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
local t
|
||||
|
||||
for t in auth_sec.keyring_udf ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
# Unstable tests
|
||||
# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
|
||||
# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
|
||||
# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
|
||||
for t in \
|
||||
main.xa_prepared_binlog_off \
|
||||
rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
|
||||
rpl.rpl_non_direct_stm_mixing_engines \
|
||||
; do
|
||||
_disable_test "$t" "Unstable test"
|
||||
done
|
||||
|
||||
for t in \
|
||||
gis.geometry_class_attri_prop \
|
||||
gis.geometry_property_function_issimple \
|
||||
gis.gis_bugs_crashes \
|
||||
gis.spatial_op_testingfunc_mix \
|
||||
gis.spatial_analysis_functions_buffer \
|
||||
gis.spatial_analysis_functions_distance \
|
||||
gis.spatial_utility_function_distance_sphere \
|
||||
gis.spatial_utility_function_simplify \
|
||||
gis.spatial_analysis_functions_centroid \
|
||||
; do
|
||||
_disable_test "$t" "Known rounding error with latest AMD processors"
|
||||
done
|
||||
|
||||
if use numa && use kernel_linux ; then
|
||||
# bug 584880
|
||||
if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
|
||||
for t in sys_vars.innodb_numa_interleave_basic ; do
|
||||
_disable_test "$t" "Test $t requires system with NUMA support"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use latin1 ; then
|
||||
# The following tests will fail if DEFAULT_CHARSET
|
||||
# isn't set to latin1:
|
||||
for t in \
|
||||
binlog.binlog_mysqlbinlog_filter \
|
||||
binlog.binlog_xa_prepared_disconnect \
|
||||
funcs_1.is_columns_mysql \
|
||||
funcs_1.is_tables_mysql \
|
||||
funcs_1.is_triggers \
|
||||
innodb.innodb_pagesize_max_recordsize \
|
||||
innodb.innodb-system-table-view \
|
||||
innodb.mysqldump_max_recordsize \
|
||||
main.mysql_client_test \
|
||||
main.mysqld--help-notwin \
|
||||
main.type_string \
|
||||
main.information_schema \
|
||||
perfschema.binlog_edge_mix \
|
||||
perfschema.binlog_edge_stmt \
|
||||
rpl.rpl_xa_survive_disconnect \
|
||||
rpl.rpl_xa_survive_disconnect_lsu_off \
|
||||
rpl.rpl_xa_survive_disconnect_table \
|
||||
; do
|
||||
_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
|
||||
done
|
||||
fi
|
||||
|
||||
if has_version '>=dev-libs/openssl-1.1.1' ; then
|
||||
# Tests are expecting <openssl-1.1.1 default cipher
|
||||
for t in \
|
||||
auth_sec.cert_verify \
|
||||
auth_sec.mysql_ssl_connection \
|
||||
auth_sec.openssl_cert_generation \
|
||||
auth_sec.ssl_auto_detect \
|
||||
auth_sec.ssl_mode \
|
||||
auth_sec.tls \
|
||||
binlog.binlog_grant_alter_user \
|
||||
encryption.innodb_onlinealter_encryption \
|
||||
main.grant_alter_user_qa \
|
||||
main.grant_user_lock_qa \
|
||||
main.mysql_ssl_default \
|
||||
main.openssl_1 \
|
||||
main.plugin_auth_sha256_tls \
|
||||
main.ssl \
|
||||
main.ssl_8k_key \
|
||||
main.ssl_bug75311 \
|
||||
main.ssl_ca \
|
||||
main.ssl_cipher \
|
||||
main.ssl_compress \
|
||||
main.ssl_crl \
|
||||
main.ssl_ecdh \
|
||||
main.ssl_verify_identity \
|
||||
x.connection_tls_version \
|
||||
x.connection_openssl \
|
||||
; do
|
||||
_disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
|
||||
done
|
||||
fi
|
||||
|
||||
# Try to increase file limits to increase test coverage
|
||||
if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
|
||||
# Upper limit comes from parts.partition_* tests
|
||||
ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
|
||||
# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
|
||||
ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
|
||||
ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
|
||||
fi
|
||||
|
||||
# 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"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local MULTILIB_WRAPPED_HEADERS
|
||||
local MULTILIB_CHOST_TOOLS
|
||||
if use client-libs ; then
|
||||
# headers with ABI specific data
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/mysql/server/my_config.h
|
||||
/usr/include/mysql/server/mysql_version.h )
|
||||
|
||||
# wrap the config scripts
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
multilib-minimal_src_install
|
||||
else
|
||||
multilib_src_install
|
||||
multilib_src_install_all
|
||||
fi
|
||||
}
|
||||
|
||||
# Intentionally override eclass function
|
||||
multilib_src_install() {
|
||||
|
||||
cmake-utils_src_install
|
||||
|
||||
# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
|
||||
find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# 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-5.7" "${TMPDIR}/my.cnf" || die
|
||||
eprefixify "${TMPDIR}/my.cnf"
|
||||
doins "${TMPDIR}/my.cnf"
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local mypd="${EROOT%/}"/usr/bin/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)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$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 http://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 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
|
||||
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
echo "USE mysql;" >"${sqltmp}"
|
||||
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
|
||||
chown mysql "${sqltmp}" || die
|
||||
|
||||
# --initialize-insecure will not set root password
|
||||
# --initialize would set a random one in the log which we don't need as we set it ourselves
|
||||
local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
|
||||
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} \
|
||||
$(use prefix || echo --user=mysql) \
|
||||
--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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--no-defaults \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
@ -1,977 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit cmake-utils eutils flag-o-matic linux-info \
|
||||
prefix toolchain-funcs multilib-minimal
|
||||
|
||||
# Patch version
|
||||
PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-5.7.30-patches-01.tar.xz"
|
||||
|
||||
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-5.7/${PN}-boost-${PV}.tar.gz
|
||||
https://cdn.mysql.com/archives/mysql-5.7/mysql-boost-${PV}.tar.gz
|
||||
http://downloads.mysql.com/archives/MySQL-5.7/${PN}-boost-${PV}.tar.gz
|
||||
${PATCH_SET}"
|
||||
|
||||
HOMEPAGE="https://www.mysql.com/"
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="5.7/18"
|
||||
IUSE="cjk client-libs cracklib debug experimental jemalloc latin1 numa +perl profiling
|
||||
selinux +server static static-libs systemtap tcmalloc test"
|
||||
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc )"
|
||||
|
||||
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-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"
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
# MULTILIB_USEDEP only set for libraries used by the client library
|
||||
COMMON_DEPEND="net-misc/curl:=
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
sys-libs/ncurses:0=
|
||||
client-libs? ( >=sys-libs/zlib-1.2.3:0=[${MULTILIB_USEDEP},static-libs?] )
|
||||
!client-libs? (
|
||||
dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?]
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
)
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
kernel_linux? (
|
||||
dev-libs/libaio:0=
|
||||
sys-process/procps:0=
|
||||
)
|
||||
server? (
|
||||
>=app-arch/lz4-0_p131:=
|
||||
cjk? ( app-text/mecab:= )
|
||||
experimental? (
|
||||
dev-libs/libevent:=
|
||||
dev-libs/protobuf:=
|
||||
net-libs/libtirpc:=
|
||||
)
|
||||
numa? ( sys-process/numactl )
|
||||
)
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=[${MULTILIB_USEDEP},static-libs?]
|
||||
)
|
||||
!client-libs? (
|
||||
>=dev-libs/openssl-1.0.0:0=
|
||||
)
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
dev-libs/protobuf
|
||||
virtual/yacc
|
||||
server? (
|
||||
dev-libs/libevent
|
||||
experimental? ( net-libs/rpcsvc-proto )
|
||||
)
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
test? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-perl/JSON
|
||||
)
|
||||
"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
!dev-db/mysql:0
|
||||
!dev-db/mysql:8.0
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c dev-libs/protobuf:= )
|
||||
selinux? ( sec-policy/selinux-mysql )
|
||||
server? (
|
||||
!prefix? (
|
||||
acct-group/mysql acct-user/mysql
|
||||
dev-db/mysql-init-scripts
|
||||
)
|
||||
)
|
||||
"
|
||||
# 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 )"
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
|
||||
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_pretend() {
|
||||
if use numa ; then
|
||||
local CONFIG_CHECK="~NUMA"
|
||||
|
||||
local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
|
||||
WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
|
||||
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
if [[ ${MERGE_TYPE} != binary ]] ; then
|
||||
local GCC_MAJOR_SET=$(gcc-major-version)
|
||||
local GCC_MINOR_SET=$(gcc-minor-version)
|
||||
# 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
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 use client-libs && [[ -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 [[ -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
|
||||
fi
|
||||
|
||||
# Note about configuration change
|
||||
einfo
|
||||
elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
|
||||
elog "to several files in /etc/mysql/mysql.d."
|
||||
elog "Please backup any changes you made to /etc/mysql/my.cnf"
|
||||
elog "and add them as a new file under /etc/mysql/mysql.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}
|
||||
|
||||
mv -f "${WORKDIR}/${P}" "${S}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply "${WORKDIR}"/mysql-patches
|
||||
|
||||
cmake-utils_src_prepare
|
||||
|
||||
if use jemalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
if use tcmalloc ; then
|
||||
echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
|
||||
if [[ -d "${S}/support-files/SELinux" ]] ; then
|
||||
echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
|
||||
fi
|
||||
|
||||
# Remove bundled libs so we cannot accidentally use them
|
||||
# We keep extra/lz4 directory because we use extra/lz4/xxhash.c via sql/CMakeLists.txt:394
|
||||
rm -rv \
|
||||
"${S}"/extra/protobuf \
|
||||
"${S}"/extra/libevent \
|
||||
"${S}"/zlib \
|
||||
|| die
|
||||
|
||||
# Don't clash with dev-db/mysql-connector-c
|
||||
rm \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1 \
|
||||
|| die
|
||||
|
||||
sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# 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
|
||||
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_configure
|
||||
else
|
||||
multilib_src_configure
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if ! multilib_is_native_abi && ! use client-libs ; then
|
||||
return
|
||||
fi
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-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/mysql
|
||||
-DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=share/mysql/scripts
|
||||
-DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
|
||||
-DINSTALL_SBINDIR=sbin
|
||||
-DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
|
||||
-DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
|
||||
-DWITH_UNIT_TESTS=$(usex test ON OFF)
|
||||
### TODO: make this system but issues with UTF-8 prevent it
|
||||
-DWITH_EDITLINE=bundled
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_SSL=system
|
||||
-DWITH_LIBWRAP=0
|
||||
-DENABLED_LOCAL_INFILE=1
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=0
|
||||
-DWITH_DEFAULT_FEATURE_SET=0
|
||||
# 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)
|
||||
-DWITH_CURL=system
|
||||
-DWITH_BOOST="${S}/boost"
|
||||
)
|
||||
if use test ; then
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
|
||||
else
|
||||
mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
|
||||
fi
|
||||
|
||||
if ! use client-libs ; then
|
||||
mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
|
||||
fi
|
||||
|
||||
# bfd.h is only used starting with 10.1 and can be controlled by NOT_FOR_DISTRIBUTION
|
||||
# systemtap only works on native ABI, bug 530132
|
||||
if multilib_is_native_abi ; then
|
||||
mycmakeargs+=(
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
)
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_TOOLS=1
|
||||
-DWITH_READLINE=1
|
||||
-DENABLE_DTRACE=0
|
||||
)
|
||||
fi
|
||||
|
||||
if multilib_is_native_abi && use server ; then
|
||||
mycmakeargs+=(
|
||||
-DWITH_LIBEVENT=system
|
||||
-DWITH_LZ4=system
|
||||
-DWITH_PROTOBUF=system
|
||||
-DWITH_MECAB=$(usex cjk system OFF)
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-DWITH_RAPID=$(usex experimental ON OFF)
|
||||
)
|
||||
|
||||
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
|
||||
-DDISABLE_SHARED=$(usex static YES NO)
|
||||
-DWITH_DEBUG=$(usex debug)
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
)
|
||||
|
||||
if use profiling ; then
|
||||
# Setting to OFF doesn't work: Once set, profiling options will be added
|
||||
# to `mysqld --help` output via sql/sys_vars.cc causing
|
||||
# "main.mysqld--help-notwin" test to fail
|
||||
mycmakeargs+=( -DENABLED_PROFILING=ON )
|
||||
fi
|
||||
|
||||
if use static ; then
|
||||
mycmakeargs+=( -DWITH_PIC=1 )
|
||||
fi
|
||||
|
||||
# Storage engines
|
||||
mycmakeargs+=(
|
||||
-DWITH_EXAMPLE_STORAGE_ENGINE=0
|
||||
-DWITH_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_INNODB_MEMCACHED=0
|
||||
-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
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if use client-libs ; then
|
||||
multilib-minimal_src_compile
|
||||
else
|
||||
multilib_src_compile
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# ulimit -n 16500 && \
|
||||
# USE='latin1 perl server' \
|
||||
# FEATURES='test userpriv -usersandbox' \
|
||||
# ebuild mysql-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 MySQL 5.7 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
local t
|
||||
|
||||
for t in auth_sec.keyring_udf ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
# Unstable tests
|
||||
# - main.xa_prepared_binlog_off: https://bugs.mysql.com/bug.php?id=83340
|
||||
# - rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch: https://bugs.mysql.com/bug.php?id=89223
|
||||
# - rpl.rpl_non_direct_stm_mixing_engines: MDEV-14489
|
||||
for t in \
|
||||
main.xa_prepared_binlog_off \
|
||||
rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch \
|
||||
rpl.rpl_non_direct_stm_mixing_engines \
|
||||
; do
|
||||
_disable_test "$t" "Unstable test"
|
||||
done
|
||||
|
||||
for t in \
|
||||
gis.geometry_class_attri_prop \
|
||||
gis.geometry_property_function_issimple \
|
||||
gis.gis_bugs_crashes \
|
||||
gis.spatial_op_testingfunc_mix \
|
||||
gis.spatial_analysis_functions_buffer \
|
||||
gis.spatial_analysis_functions_distance \
|
||||
gis.spatial_utility_function_distance_sphere \
|
||||
gis.spatial_utility_function_simplify \
|
||||
gis.spatial_analysis_functions_centroid \
|
||||
main.with_recursive \
|
||||
; do
|
||||
_disable_test "$t" "Known rounding error with latest AMD processors"
|
||||
done
|
||||
|
||||
if ! hash zip 1>/dev/null 2>&1 ; then
|
||||
# no need to force dep app-arch/zip for one test
|
||||
_disable_test "innodb.partition_upgrade_create" "Requires app-arch/zip"
|
||||
fi
|
||||
|
||||
if use numa && use kernel_linux ; then
|
||||
# bug 584880
|
||||
if ! linux_config_exists || ! linux_chkconfig_present NUMA ; then
|
||||
for t in sys_vars.innodb_numa_interleave_basic ; do
|
||||
_disable_test "$t" "Test $t requires system with NUMA support"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! use latin1 ; then
|
||||
# The following tests will fail if DEFAULT_CHARSET
|
||||
# isn't set to latin1:
|
||||
for t in \
|
||||
binlog.binlog_mysqlbinlog_filter \
|
||||
binlog.binlog_xa_prepared_disconnect \
|
||||
funcs_1.is_columns_mysql \
|
||||
funcs_1.is_tables_mysql \
|
||||
funcs_1.is_triggers \
|
||||
innodb.innodb_pagesize_max_recordsize \
|
||||
innodb.innodb-system-table-view \
|
||||
innodb.mysqldump_max_recordsize \
|
||||
main.mysql_client_test \
|
||||
main.mysqld--help-notwin \
|
||||
main.type_string \
|
||||
main.information_schema \
|
||||
perfschema.binlog_edge_mix \
|
||||
perfschema.binlog_edge_stmt \
|
||||
rpl.rpl_xa_survive_disconnect \
|
||||
rpl.rpl_xa_survive_disconnect_lsu_off \
|
||||
rpl.rpl_xa_survive_disconnect_table \
|
||||
; do
|
||||
_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
|
||||
done
|
||||
fi
|
||||
|
||||
if has_version '>=dev-libs/openssl-1.1.1' ; then
|
||||
# Tests are expecting <openssl-1.1.1 default cipher
|
||||
for t in \
|
||||
auth_sec.cert_verify \
|
||||
auth_sec.mysql_ssl_connection \
|
||||
auth_sec.openssl_cert_generation \
|
||||
auth_sec.ssl_auto_detect \
|
||||
auth_sec.ssl_mode \
|
||||
auth_sec.tls \
|
||||
binlog.binlog_grant_alter_user \
|
||||
encryption.innodb_onlinealter_encryption \
|
||||
main.grant_alter_user_qa \
|
||||
main.grant_user_lock_qa \
|
||||
main.mysql_ssl_default \
|
||||
main.openssl_1 \
|
||||
main.plugin_auth_sha256_tls \
|
||||
main.ssl \
|
||||
main.ssl_8k_key \
|
||||
main.ssl_bug75311 \
|
||||
main.ssl_ca \
|
||||
main.ssl_cipher \
|
||||
main.ssl_compress \
|
||||
main.ssl_crl \
|
||||
main.ssl_ecdh \
|
||||
main.ssl_verify_identity \
|
||||
x.connection_tls_version \
|
||||
x.connection_openssl \
|
||||
; do
|
||||
_disable_test "$t" "Requires <dev-libs/openssl-1.1.1"
|
||||
done
|
||||
fi
|
||||
|
||||
# Try to increase file limits to increase test coverage
|
||||
if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
|
||||
# Upper limit comes from parts.partition_* tests
|
||||
ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
|
||||
# Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
|
||||
ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
|
||||
|
||||
if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
|
||||
ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
|
||||
fi
|
||||
else
|
||||
einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
|
||||
fi
|
||||
|
||||
# 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"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local MULTILIB_WRAPPED_HEADERS
|
||||
local MULTILIB_CHOST_TOOLS
|
||||
if use client-libs ; then
|
||||
# headers with ABI specific data
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
/usr/include/mysql/server/my_config.h
|
||||
/usr/include/mysql/server/mysql_version.h )
|
||||
|
||||
# wrap the config scripts
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
multilib-minimal_src_install
|
||||
else
|
||||
multilib_src_install
|
||||
multilib_src_install_all
|
||||
fi
|
||||
}
|
||||
|
||||
# Intentionally override eclass function
|
||||
multilib_src_install() {
|
||||
|
||||
cmake-utils_src_install
|
||||
|
||||
# Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
|
||||
find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# 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-5.7" "${TMPDIR}/my.cnf" || die
|
||||
eprefixify "${TMPDIR}/my.cnf"
|
||||
doins "${TMPDIR}/my.cnf"
|
||||
insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.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
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
_getoptval() {
|
||||
local section="$1"
|
||||
local flag="--${2}="
|
||||
local extra_options="${3}"
|
||||
local cmd=(
|
||||
"${EROOT%/}/usr/bin/my_print_defaults"
|
||||
"${extra_options}"
|
||||
"${section}"
|
||||
)
|
||||
local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
|
||||
|
||||
if [[ ${#results[@]} -gt 0 ]] ; then
|
||||
# When option is set multiple times only return last value
|
||||
echo "${results[-1]}"
|
||||
fi
|
||||
}
|
||||
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)"
|
||||
# These are dir+prefix
|
||||
MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log)"
|
||||
MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
|
||||
MYSQL_LOG_BIN="$(_getoptval mysqld log-bin)"
|
||||
MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$MYSQL_TMPDIR" ]] ; then
|
||||
einfo "Creating MySQL tmpdir $MYSQL_TMPDIR"
|
||||
install -d -m 770 -o mysql -g mysql "${EROOT%/}/$MYSQL_TMPDIR"
|
||||
fi
|
||||
|
||||
if [[ ! -d "${EROOT%/}/$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 "${EROOT%/}/tmp")"
|
||||
|
||||
# Fix bug 446200. Don't reference host my.cnf, needs to come first,
|
||||
# see http://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 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
|
||||
# http://dev.mysql.com/doc/mysql/en/time-zone-support.html
|
||||
echo "USE mysql;" >"${sqltmp}"
|
||||
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
|
||||
chown mysql "${sqltmp}" || die
|
||||
|
||||
# --initialize-insecure will not set root password
|
||||
# --initialize would set a random one in the log which we don't need as we set it ourselves
|
||||
local cmd=( "${EROOT%/}/usr/sbin/mysqld" "--initialize-insecure" "--init-file='${sqltmp}'" )
|
||||
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} \
|
||||
$(use prefix || echo --user=mysql) \
|
||||
--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="ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '${MYSQL_ROOT_PASSWORD}'"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--no-defaults \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,5 +1,3 @@
|
||||
DIST asm-ASM_9_1.tar.gz 1614561 BLAKE2B f19efad14a7bce5dd7311682a2e6c8625816d1b97ed390652681f14d6d341f559fee152b70474566752a80ff2fcc7cb83fea91f7382f898a0725beba5c9c6ada SHA512 84eb7bc0c7119d3ab0ddd9f3bad640662d96235d365da5bd85031abbdfed371c9742a01817ddd022fd4fb447441f423e4f5126d12dcadf12fa9669cd86b34f18
|
||||
DIST asm-ASM_9_2.tar.gz 1614845 BLAKE2B 3fc0fb45d0583b06371452d2df166ce53f81a114a386eda96fe3b0c748beffdd42791d59ddfb4c9ad368f73728f3382855a7336324b013e937c20a4f31cea44b SHA512 a0077e3c1ebbd8a841d3556be4363383951244ba87670af45a8565e14ad3ac94ab89a23b934b3609190e1b16dd9663798c01d1c859eddb2e825c41908c2e2afd
|
||||
EBUILD asm-analysis-9.1.ebuild 740 BLAKE2B 7572ed77471724a907ddd36d146ab5e911f743ea2837cda38a4ba93852d21e408108791aeb6c76d19b38a351dcde62e7ebbd9c75a9f33bde94f4621dddeaf1fd SHA512 f741334e33572f21bcbf46cc7573ebf80504e4d13c385dcac203a38427bce384782b6bdc2a205d459bd8bf9d3073fb53e41db7e3c47176102a884f50cee7b088
|
||||
EBUILD asm-analysis-9.2.ebuild 740 BLAKE2B fb8b01b8621c37cdc4209bcddcf41d6285094d4ef522b615b3af58d4f4517eae21432636598c72cfd3b019c37ece381feed4cfa98463c77320850aba93754154 SHA512 488d6a32b6246de57a209f72d7b2a987275f23739b3deddbd578fb4ce69e1ef1422125f745ba02ca1630b8d6fc56eff0ddcada6e9343325325f6eec0a4a5ab03
|
||||
MISC metadata.xml 1096 BLAKE2B ea769c32d2fd2fbf33153b44888e443d40e199df3f3f6dd2d2635b2a74bf5626570d43ae7ae17e4bb8e729fcd937993eb37e05604388ad17f39d9e13b2bacec6 SHA512 b8a710522edc585a03ec50483c9c645e64caf997e5334ae1e8fc2f7017c4609f63b25a9d8ed39dd58e2c2be71553468a44ad2e215defc8c1ea2c2312cfe3b3a6
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
MAVEN_ID="org.ow2.asm:asm-analysis:9.1"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java (Static code analysis API)"
|
||||
HOMEPAGE="http://asm.ow2.org"
|
||||
MY_P="ASM_${PV//./_}"
|
||||
SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT=`ver_cut 1`
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND="dev-java/asm-tree:${SLOT}"
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="asm-${SLOT} asm-tree-${SLOT}"
|
||||
JAVA_SRC_DIR="asm-${MY_P}/${PN}/src/main/java"
|
@ -1,5 +1,3 @@
|
||||
DIST asm-ASM_9_1.tar.gz 1614561 BLAKE2B f19efad14a7bce5dd7311682a2e6c8625816d1b97ed390652681f14d6d341f559fee152b70474566752a80ff2fcc7cb83fea91f7382f898a0725beba5c9c6ada SHA512 84eb7bc0c7119d3ab0ddd9f3bad640662d96235d365da5bd85031abbdfed371c9742a01817ddd022fd4fb447441f423e4f5126d12dcadf12fa9669cd86b34f18
|
||||
DIST asm-ASM_9_2.tar.gz 1614845 BLAKE2B 3fc0fb45d0583b06371452d2df166ce53f81a114a386eda96fe3b0c748beffdd42791d59ddfb4c9ad368f73728f3382855a7336324b013e937c20a4f31cea44b SHA512 a0077e3c1ebbd8a841d3556be4363383951244ba87670af45a8565e14ad3ac94ab89a23b934b3609190e1b16dd9663798c01d1c859eddb2e825c41908c2e2afd
|
||||
EBUILD asm-commons-9.1.ebuild 808 BLAKE2B 35ccd30ac59d1a044520502bd206608c67e55b0fc6cb9d8add8377f6c60137c23f30d0bd3f9764bd5388daff9122fca67fd4743eecd7f9c3f75e5dc0ffc8d612 SHA512 f5b82ce78db28ae2dcceee8e07cb2fa816a9a24878ff58d1de7c6232bf19a86f5ccd0b1fb837b59bfa0494fd4efba87176d54bc8a3b79e4435b8cddefbae906e
|
||||
EBUILD asm-commons-9.2.ebuild 808 BLAKE2B de21c6759706a70e80b3aaa86b5a5ccc8231e4b3bb0b0b56ca8e2f06027476c7796069d784042c1b5bb5c80b6e4e487010b90aeef020e1157b3644b9977d3f7f SHA512 1585c4237cb1f0644fcb702deb8bf10cecc3845d62ccd4941252100f6b60c1d877125e10f4d72f6ce37abf6962bbb606db6d3d405e5ab909de45b8ab29eecd2a
|
||||
MISC metadata.xml 1096 BLAKE2B ea769c32d2fd2fbf33153b44888e443d40e199df3f3f6dd2d2635b2a74bf5626570d43ae7ae17e4bb8e729fcd937993eb37e05604388ad17f39d9e13b2bacec6 SHA512 b8a710522edc585a03ec50483c9c645e64caf997e5334ae1e8fc2f7017c4609f63b25a9d8ed39dd58e2c2be71553468a44ad2e215defc8c1ea2c2312cfe3b3a6
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
MAVEN_ID="org.ow2.asm:asm-commons:9.1"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java (Common class adaptors)"
|
||||
HOMEPAGE="http://asm.ow2.org"
|
||||
MY_P="ASM_${PV//./_}"
|
||||
SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT=`ver_cut 1`
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND="dev-java/asm-analysis:${SLOT} dev-java/asm-tree:${SLOT} dev-java/asm:${SLOT}"
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="asm-${SLOT} asm-tree-${SLOT} asm-analysis-${SLOT}"
|
||||
JAVA_SRC_DIR="asm-${MY_P}/${PN}/src/main/java"
|
@ -1,5 +1,3 @@
|
||||
DIST asm-ASM_9_1.tar.gz 1614561 BLAKE2B f19efad14a7bce5dd7311682a2e6c8625816d1b97ed390652681f14d6d341f559fee152b70474566752a80ff2fcc7cb83fea91f7382f898a0725beba5c9c6ada SHA512 84eb7bc0c7119d3ab0ddd9f3bad640662d96235d365da5bd85031abbdfed371c9742a01817ddd022fd4fb447441f423e4f5126d12dcadf12fa9669cd86b34f18
|
||||
DIST asm-ASM_9_2.tar.gz 1614845 BLAKE2B 3fc0fb45d0583b06371452d2df166ce53f81a114a386eda96fe3b0c748beffdd42791d59ddfb4c9ad368f73728f3382855a7336324b013e937c20a4f31cea44b SHA512 a0077e3c1ebbd8a841d3556be4363383951244ba87670af45a8565e14ad3ac94ab89a23b934b3609190e1b16dd9663798c01d1c859eddb2e825c41908c2e2afd
|
||||
EBUILD asm-tree-9.1.ebuild 698 BLAKE2B fbf8fcd6062226e8081c205c4180199bd3ed7bba439dfe9c6d38ee38c91858d34858b075416d257c50ea57f5d0641179ecbfc6f2b5551a1a1e0acd8335d14c2d SHA512 300f307d92b369bb9306e251e2e09edb8dd660726b78cb398f50620701c5fd726a20ccccbc329760949a3b2ac4ebe0797d36f9eb8aac1f3e4fde30b9fc3d0513
|
||||
EBUILD asm-tree-9.2.ebuild 698 BLAKE2B ba92688359cef09110ed19f11776c44cb2ef1304467cbd00de6eea50697cfb2c202565eb8e52f6218f3f88f186cec8ac79b79aa4546b0beee8151e68ff037bac SHA512 2bb46957cad24d8f64bda1eda728dba2a1293160efc8d8607aca46356ab273f8369c13f9a9429b4150c9c04bdcd1a66d013837267c343aa542f236e082625a43
|
||||
MISC metadata.xml 1096 BLAKE2B ea769c32d2fd2fbf33153b44888e443d40e199df3f3f6dd2d2635b2a74bf5626570d43ae7ae17e4bb8e729fcd937993eb37e05604388ad17f39d9e13b2bacec6 SHA512 b8a710522edc585a03ec50483c9c645e64caf997e5334ae1e8fc2f7017c4609f63b25a9d8ed39dd58e2c2be71553468a44ad2e215defc8c1ea2c2312cfe3b3a6
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
MAVEN_ID="org.ow2.asm:asm-tree:9.1"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java (Tree API)"
|
||||
HOMEPAGE="http://asm.ow2.org"
|
||||
MY_P="ASM_${PV//./_}"
|
||||
SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT=`ver_cut 1`
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND="dev-java/asm:${SLOT}"
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="asm-${SLOT}"
|
||||
JAVA_SRC_DIR="asm-${MY_P}/${PN}/src/main/java"
|
@ -1,5 +1,3 @@
|
||||
DIST asm-ASM_9_1.tar.gz 1614561 BLAKE2B f19efad14a7bce5dd7311682a2e6c8625816d1b97ed390652681f14d6d341f559fee152b70474566752a80ff2fcc7cb83fea91f7382f898a0725beba5c9c6ada SHA512 84eb7bc0c7119d3ab0ddd9f3bad640662d96235d365da5bd85031abbdfed371c9742a01817ddd022fd4fb447441f423e4f5126d12dcadf12fa9669cd86b34f18
|
||||
DIST asm-ASM_9_2.tar.gz 1614845 BLAKE2B 3fc0fb45d0583b06371452d2df166ce53f81a114a386eda96fe3b0c748beffdd42791d59ddfb4c9ad368f73728f3382855a7336324b013e937c20a4f31cea44b SHA512 a0077e3c1ebbd8a841d3556be4363383951244ba87670af45a8565e14ad3ac94ab89a23b934b3609190e1b16dd9663798c01d1c859eddb2e825c41908c2e2afd
|
||||
EBUILD asm-util-9.1.ebuild 793 BLAKE2B 95991d7c4a603bb8831bcc798625ca86a39ec7ba7c431b79795069016498201a11e72ea386ef5ec19ba229bfe965f43192a70aa93ba7fc60807ba632148a50cd SHA512 b1eed72c60ce1f075f83745b0903b41b1041924eea78a626f9f956534fea87c14110d6a894141a1fe629267801b4534fdd86c8718d1475e48a82462c96aac329
|
||||
EBUILD asm-util-9.2.ebuild 793 BLAKE2B 374aa04c32c36e0daada627b85d1ddbedc07912434aff3c167d5e8ad4d056e449cf89064745d8f39e2523fb5b1c8ba87e64289045b8e8d63cc576acb10d1c9e8 SHA512 21a720d27c91c8c2e49c7a6d7318b41ab6a92d5192933e01df1f497b508964597bbbf5db59fa8e36084648eb55620faed1a06aae88d33924805c237477f08ba4
|
||||
MISC metadata.xml 1096 BLAKE2B ea769c32d2fd2fbf33153b44888e443d40e199df3f3f6dd2d2635b2a74bf5626570d43ae7ae17e4bb8e729fcd937993eb37e05604388ad17f39d9e13b2bacec6 SHA512 b8a710522edc585a03ec50483c9c645e64caf997e5334ae1e8fc2f7017c4609f63b25a9d8ed39dd58e2c2be71553468a44ad2e215defc8c1ea2c2312cfe3b3a6
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
MAVEN_ID="org.ow2.asm:asm-util:9.1"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java (Utilities)"
|
||||
HOMEPAGE="http://asm.ow2.org"
|
||||
MY_P="ASM_${PV//./_}"
|
||||
SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT=`ver_cut 1`
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~x64-macos"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND="dev-java/asm-analysis:${SLOT} dev-java/asm-tree:${SLOT} dev-java/asm:${SLOT}"
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
RDEPEND=">=virtual/jre-1.8
|
||||
${CDEPEND}
|
||||
"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="asm-${SLOT} asm-tree-${SLOT} asm-analysis-${SLOT}"
|
||||
JAVA_SRC_DIR="asm-${MY_P}/${PN}/src/main/java"
|
@ -1,8 +1,6 @@
|
||||
DIST asm-ASM_4_0.tar.gz 14789505 BLAKE2B 62b49d904f1ef2d32379f4f5d644cdc274b30f292ee4f64ad02be7d2226a90965f7b12421700e79dcd1e67a46e6a8543d5e353486a1577313616688ddc57f3b3 SHA512 e654623a882d9fe414e71861183f64840f7b6629231864872497d4bf9274e8ac05e05496593fa54a90d8c6a2e6d701b9a6f3876df611637f7d2079c5519def1e
|
||||
DIST asm-ASM_5_1.tar.gz 16258842 BLAKE2B bd7d717cdfa6ff652c96b88d7b7d33fae614acba390c256ea72ecfbb3edc48382621a076dedf9b8728fdb1d0961cda943f165f99de840824b766c9af45a49339 SHA512 4bb32ce6eba267928261238f8f13cd2365ab374780039ad1df31698cd791645a370aca58c44270ec05f8377d6aa0a0d00f9f3890961cbd32a10cbd2e79e2d518
|
||||
DIST asm-ASM_9_1.tar.gz 1614561 BLAKE2B f19efad14a7bce5dd7311682a2e6c8625816d1b97ed390652681f14d6d341f559fee152b70474566752a80ff2fcc7cb83fea91f7382f898a0725beba5c9c6ada SHA512 84eb7bc0c7119d3ab0ddd9f3bad640662d96235d365da5bd85031abbdfed371c9742a01817ddd022fd4fb447441f423e4f5126d12dcadf12fa9669cd86b34f18
|
||||
DIST asm-ASM_9_2.tar.gz 1614845 BLAKE2B 3fc0fb45d0583b06371452d2df166ce53f81a114a386eda96fe3b0c748beffdd42791d59ddfb4c9ad368f73728f3382855a7336324b013e937c20a4f31cea44b SHA512 a0077e3c1ebbd8a841d3556be4363383951244ba87670af45a8565e14ad3ac94ab89a23b934b3609190e1b16dd9663798c01d1c859eddb2e825c41908c2e2afd
|
||||
EBUILD asm-5.1-r1.ebuild 1281 BLAKE2B 4b96ddb02de5c1fddf23646db0133774464554bf2957161e1d83c3bab9c3c9bc8fdbeeec67c04b2e2d83438fee807f44d8fb535baf750e6e4e413410a5045582 SHA512 fccc9bd86fe9e41469e2002c2c5ff9cb3bd53b6ba3d935195d92bb8ab771091290b3db0bfa3ce5a685480511a364d3c17a0f74ee08f6be16a1779b6e25f081df
|
||||
EBUILD asm-9.1.ebuild 595 BLAKE2B 784a00c90d2ac3acb2fdd667bcf9f1f4979e25dc98966d63b7330211ed8aa9b3a1ad018654163cdf6ba96617198987b663f34b122346145b5e91eca117a09189 SHA512 562c2c83bc2604c2f064256aa5fbb25c6a86a4db784cc32a1582d2bdce01271fecff910eaadf70c21a212d5ce6bbf4b4b214eb36b8d05d2587a856a9a5a7bee3
|
||||
EBUILD asm-9.2.ebuild 599 BLAKE2B cdcaf6910008f7b48257e11cfe495261a5b72650829c55c6944cb71e202128678c393fda65deb2c553c5ea2f012de7d0e94264d733ddae33555b11bda9baa05e SHA512 34811b7acbdf352e8e2776bca3524a9b97bddcb496bd9502bfbe073cc85b1c306599c209f92121e8fd63971fc35bf25873af2d5166f3a43fa440178e0f27610e
|
||||
MISC metadata.xml 1231 BLAKE2B c61d8566d1a337e99616013267474cf4fc92afdfed38f1c2183d41980528fd1b8994bd6ce5a06b4fa85f54819d560379bb1b505c62f26f7421bd1965cbcf7244 SHA512 c0b4d632146cab80755c18a6e15e9e9673c7adc60addac523bbf98e8fb0f771b526fbaa65906914984d27658a7ee390e90d164e855f5bc5601bfef7b89d902a2
|
||||
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="doc source"
|
||||
MAVEN_ID="org.ow2.asm:asm:9.1"
|
||||
|
||||
inherit java-pkg-2 java-pkg-simple
|
||||
|
||||
DESCRIPTION="Bytecode manipulation framework for Java"
|
||||
HOMEPAGE="https://asm.ow2.io"
|
||||
MY_P="ASM_${PV//./_}"
|
||||
SRC_URI="https://gitlab.ow2.org/asm/asm/-/archive/${MY_P}/asm-${MY_P}.tar.gz"
|
||||
LICENSE="BSD"
|
||||
SLOT="9"
|
||||
KEYWORDS="amd64 ~arm arm64 ppc64 x86 ~x64-macos"
|
||||
RESTRICT="test"
|
||||
|
||||
CDEPEND=""
|
||||
DEPEND=">=virtual/jdk-1.8"
|
||||
RDEPEND=">=virtual/jre-1.8"
|
||||
|
||||
JAVA_SRC_DIR="asm-${MY_P}/${PN}/src/main/java"
|
@ -1,5 +1,5 @@
|
||||
DIST apache-maven-3.8.1-bin.tar.gz 9536838 BLAKE2B a6b464d44d577e126ea042ea37aa07a6ea18c56252627b3a266c6c25cc3520421c01d372930948bd2d784ace330f888fb6a8a5a1012946015c8d16d465bb5953 SHA512 0ec48eb515d93f8515d4abe465570dfded6fa13a3ceb9aab8031428442d9912ec20f066b2afbf56964ffe1ceb56f80321b50db73cf77a0e2445ad0211fb8e38d
|
||||
DIST apache-maven-3.8.2-bin.tar.gz 9338426 BLAKE2B b39c9c87b6d05d633172152598496b6cb9b82c64c0572426c6a612ecfcc6d087085d58fdcaef0b61f5554c2b58e90b47bb0e6844dacc88c95bfb72ffc618e355 SHA512 b0bf39460348b2d8eae1c861ced6c3e8a077b6e761fb3d4669be5de09490521a74db294cf031b0775b2dfcd57bd82246e42ce10904063ef8e3806222e686f222
|
||||
EBUILD maven-bin-3.8.1.ebuild 1526 BLAKE2B 6d256f07b449def93a2769a2f8856e17e14aeab6ff47a60fc221ef54e5842f54030fc4aae7d90bd03f993b33a5a776703c6d6c41f13181c4ee19526e5128707b SHA512 f42b3ee7d7b1c89b6080bb2f9c9f54e78d674fb53ab518fec5b53c1f438259c8e9a996fcdb78ca4245c922bee04888f8488f7640c5ff085687a9c518575af7ef
|
||||
EBUILD maven-bin-3.8.2.ebuild 1374 BLAKE2B a6f0026867f2142587b626b74bde23dd7b3d8079538b48644452ba633d26fc6e925d7fb5d9be4608728250619d6865125580236877dcd4ea2bef4d4175061dcc SHA512 160579460a6c14784bab62d786b45c55998ef836a8172c0366f95d25548fbe918563082483a5cd383d165aa7a189765378060ed2bc6a385969fd05ae140c1239
|
||||
EBUILD maven-bin-3.8.2.ebuild 1373 BLAKE2B 0f6e9a3600203faba13e2cafe49f0366fe3eb58d226d17d7a3020ebc2e7e3450b5205f7bd06de495261d915156a18b545ef076f5835cd5cb992df8ea9f6de5b9 SHA512 3ce5925333512eefc39814edcdf0f7f8b80aa2ef57444dc8a0a6fb17e40a18469db0c6f86adf9d170f5c4f4b658d9ba8ef9aff5f5f522e868330fce481f9ade2
|
||||
MISC metadata.xml 611 BLAKE2B 5ef6682d362deee6aff000f37dccd97c48e90e3071133a44d9f0ec2a5c6876fdd1a5f44b064eb6992a06cfda27c0c0e599e0bd0474997611aedce017febda203 SHA512 5ba3e55ea839b5e616f37321960021c58846089cb0b51982617f45946ba25747ac10eef70409f9848fbb8267fb2cc0c90c319fb66aeb52ffa5e0e1cd6d5840ff
|
||||
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue