parent
c3fa14b83c
commit
7c7caedc64
@ -1,23 +1,23 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA512
|
||||
|
||||
MANIFEST Manifest.files.gz 29470 BLAKE2B 34601635e386c5059c4d8c5c59dc1e853fcb29be7521d96e29c2210f3fc74276ab2d039a48f4f64e9485386454743d49eeeb6d624c74a8c48d6684de9f9e40f0 SHA512 db1040569fc495239302bdc0e48e4de47ee14684bf8ac85e0b183b2addfa288302ba14bd5e24d945bca75b3bffae68d4a34fad3b09dae5ce12bd91153ea6cbdd
|
||||
TIMESTAMP 2020-04-30T06:14:41Z
|
||||
MANIFEST Manifest.files.gz 29439 BLAKE2B 3ae7c2533418fa856cea880c2704c0be364eb8b976a8c8712cd7595b41d5a12a66512d684871e1d4d529d2c172c887f55afb748429a0ea6da4e019d4ba14f8a4 SHA512 263bf54843c51c77d0c74f3d64cde12f745c27b52058eda4e1f47f71f83cf9613532fc2627ab87b1393b9de9e2f70358b91f6df98b95c1567a06ae5f642a9c1f
|
||||
TIMESTAMP 2020-05-01T18:09:03Z
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAl6qbNFfFIAAAAAALgAo
|
||||
iQKTBAEBCgB9FiEE4dartjv8+0ugL98c7FkO6skYklAFAl6sZb9fFIAAAAAALgAo
|
||||
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUx
|
||||
RDZBQkI2M0JGQ0ZCNEJBMDJGREYxQ0VDNTkwRUVBQzkxODkyNTAACgkQ7FkO6skY
|
||||
klCQaRAArM339B/Xip+NkdodHJzyN5JTFwkng4wFURdkzTz5cJ3+dwZ2+yq46zJF
|
||||
eGKZ5JTHkp20BdNYVKy7LiPUgNhwx2LCYbWClQ6Ru3hLYJJoxd7IYI7FeNCo+m9t
|
||||
eOz+AgjzOxogBRKuuYM7hmdVrACEbAatNNJy5wv/Ankh4ffxsvBXqL/1bMJ1TQRX
|
||||
we/j4TQinZ6Mp8IMN0NYESRlutxl3yp8XvwUAZYOUKoMjb8y+pD6cRX0V1aK11Tg
|
||||
TyT77ftLSxR1+Y6JCbMgDuxEaj6dkmHUIm8Rnd75uEyguemEDGLDklmdz0847pPu
|
||||
p9FuPlwT+MLLG8yUtEEM5iY6VM6WOkoVn+jj58aPu/FWIhhd0fXyDRBJFvVFIhkj
|
||||
s02RV2gmH8e0XBfWd4hi2+9ngCbFIOvknCddiHfO1haa88CWYSpIO0ODPshRMQR3
|
||||
5GKVHbtMn66AWXFinb5P6+l2ZGrmoES9rTm9raZvvXHO4UUBDffLEP5kKKXRIbyg
|
||||
qzjd9ESs1P8VSAx10Ym7OuUretMHl3ebUZX21u5v+arshhy1FBR+il8fJUy/wXT8
|
||||
K0v3wU61E4uX/irO3gzcx8J7TyfQN3VMaE2UjUxOMsCzBrT4kvjjhryJkmOuWjgI
|
||||
NmuPnR9i418nOk0JojEJ6LoGQ7adE8KU0IyPT7GqiPbg6sYKnjQ=
|
||||
=6fV7
|
||||
klDR2hAAohTP9EQ5vys15vhjn907bj0csfm8Mp3EsPAfhld8lRu+dFNufMkncbIp
|
||||
Uq4T2JEomFLsqb/w7h+pVM/4GnvgXtFHzBqD0ghY8FptUysYc0uy9YEQfXAolkWS
|
||||
YBxzvQJ9yhY6W8kThMM1UyesTkSxRiiEIq9ZGifeVWZnw06+6R/XRJEoHKpSFMuM
|
||||
ZRzcQMpWVCfU3Ax2o2n/mFwm57T9Q+IAr0LYUPZOcGSEHP+4K+prB6vK1MrQCG/0
|
||||
LW8dHg4iEJWlHnMvpkwdEgHCb+Uc3Bp8alTjuISvdWRbnL/mAeX6Yxvbe26Iu72r
|
||||
Id1rKSt1WLPOtYAZjoNjxGd4hxM3PRdzldpnGTZJX6TGyYCc2xhI9ILA/K41tUVy
|
||||
558k6++HnPFUwh2YAbtcima401K0ir63fdZNuM2X1EYCrpDYHTDbjNNjU/mp5SmI
|
||||
K993kQOvzDijREu5/RxJyRx6CHCPurknxOIjCci68d/+p6664LXGfkNkJH+KQ0bf
|
||||
MmiPRVvzJPVgTORw5XLLmy2R/QntnsstNVrK+YMOp2N/YyCCf2Ev8D2j7xdyC0Um
|
||||
z0hxI3OVPRlxKydQjTwKrsayhpONTD+KbuK6d3Q44wdLQ5XnO0v5p4mOf/Uk1EDS
|
||||
wOQVIrg9U/xOAlt4qRqjTh1DuRalq+hVCUVEJxrllKNgauCwpBQ=
|
||||
=KIni
|
||||
-----END PGP SIGNATURE-----
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
DIST cdist-5.1.3.tar.gz 915245 BLAKE2B 5fce58f6fcbd48852e1c0c5568b72c360e74fd49b5321e2aedfdc8e48fd090cbdd7bab87a94e76d087f04f5a706bf2c7b1bebdc5a80867e26d8cc6e28afdeab3 SHA512 8330a5af80dfc07da722675ae1d402ebae4ba0aada451a02d782365d68d1d43a643609f3326f5ed793d2902838ee29071c0255c9d8a9d38c1e8a7c92a24cef46
|
||||
DIST cdist-6.0.0.tar.gz 934813 BLAKE2B 3cb18ebb3059fc9a37beb1567c691e1d34a9cde5d49081e8798b5ba86ea8da3b6c964d2c8bea7bf2f04f986b0b4a8766c8ea53ce48fb4bc024264e72efec1fcb SHA512 e846060f3020d6281d41e97b9cc33250cd1d4ae0d110a2792fc2447af110fef91199fc0382d5a1e501f487fda42f703957ff5a39cf28061338609a600290d792
|
||||
DIST cdist-6.5.4.tar.gz 898002 BLAKE2B b4565cd8112ce1bff6ac74625a5920886a708fec827f70c3a3a2df156408761badebff4e161900cd09685bfbbb4954927c9771f6516c54a510b582ebec075e76 SHA512 3f1405e1b28d7568ef3ae543d59e760b2dc1fc8004be031550ba52d3aa2d8911cef4325865fb9ed5df053ec1609a076bb31a520b100bad5811f0de9cd73f416e
|
||||
EBUILD cdist-5.1.3.ebuild 590 BLAKE2B c587b9ffe196b672e600f80c521138e46c838ab3c2c93165299fe58037957c93e4a9fed227705583ae877444d76b81d466827e283af24845127de848594b6308 SHA512 64de373a0834108dcdbed4ad81b6747aa14ef5c568b341ca8056c4d7eb369cabb543d02d252b5cd3c89832fc9a5b1192640072e47594ef2d9c5312e1e6d6d60d
|
||||
EBUILD cdist-6.0.0.ebuild 596 BLAKE2B fac03ebac640f9a3c0675bf239849276005d9374c144cfd342bff70bec164883dc3b7aa5c820d28abff14f0a48c7d49380cb2940758cac0b49afa0f0853db3b1 SHA512 265a2362ccd5bbbce39d85b975a0a938b15e790394ae3cbabbbe6244a9e7c65db6248205484927627bc13c6e7bbb3e54efe35c9a7c801d00c4469ead0b4547ca
|
||||
EBUILD cdist-6.5.4.ebuild 646 BLAKE2B b590d8fd0f7794c433908ded86c9b1e53007c8bdab64610d94b2d086554ccfd066e83b9b282ef7d29d6c754c8296e6d07666c7e03378aee9edc7f6c3a560e3a8 SHA512 653898d859c35fa4551d95f5d4f84431784d4e48430f4c0ff00e40e92934efa08532ffae6bb74157af19bfdbe78948de1eac4a4fb44af49c312db5fd4f62be56
|
||||
MISC metadata.xml 240 BLAKE2B 1dc43622dbc22a70ccbdccd82d2fa3c54b7bb985e0ab124812aac7a453546a46ffa6bf205b4b8e72e014cad9ee017dfec3c4430881277b3463367418bf4f76db SHA512 bedaadadb9b7d70f72dde98c058a74300749effe632f00af0f693a9bf826076d02773cc39bb5b3b813fd2ed24cedfaf3cecfb8cac81ea561d288286840cf1f1c
|
||||
|
@ -0,0 +1,25 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python{3_6,3_7,3_8} )
|
||||
DISTUTILS_USE_SETUPTOOLS=no
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A usable configuration management system"
|
||||
HOMEPAGE="https://www.cdi.st/ https://code.ungleich.ch/ungleich-public/cdist"
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
python_install_all() {
|
||||
use doc && local HTML_DOCS=( docs/dist/html/*.html docs/dist/html/man{1,7}/*.html )
|
||||
distutils-r1_python_install_all
|
||||
|
||||
doman docs/dist/man/man1/*.1 docs/dist/man/man7/*.7
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
DIST hcloud-1.16.1.tar.xz 649100 BLAKE2B a019f21d8c87dd47fc3c2eb069576fd367c1dd6dac7a5909f76a9c31fe9922e93ba4e1fdde3bd86dcbdb25bb2cf84b1eaddd9c7e6b62bb08647ba9d7a804e06a SHA512 e8a4e3d9c883b009eea98443716264115d55b93b212b0a0df64316f63310210a3812b3948d16f822b6f8f32d029029da5b51be7b7561d9396f28a406061a507c
|
||||
DIST hcloud-1.16.2.tar.xz 678408 BLAKE2B 01d10032b93295ac5e255103b38023b323b545cb30f78cbd9e6a0dc392579c94142b9c7575e383c5dbd5e88fb17ca1b51419df014782d517f4392683e987c9a5 SHA512 74902f212ebd432d4bec8c566a13daddf38349989e3329b62d75f332941930b55839392efcb7d9e8081700352505def9912220b228f45b92a4a3e853b8091722
|
||||
EBUILD hcloud-1.16.1.ebuild 553 BLAKE2B 14c900043e079c7b46306cc2560a23bce66c2677f96a2121e73ea013fc5a1aa18a2606261162b21ce71e1c3ff8dc104a977787c21c3329402e8ae90139863579 SHA512 d4d1b9e1c3217bd3c54e654a337b94528a616ab6e57b154adefcc63dbe8b1ba24cbe3a755eab0c557a4b99471603fd41054301bf95731de7ce5cf972dcf4c992
|
||||
EBUILD hcloud-1.16.2.ebuild 554 BLAKE2B d47c96e84796e3ae3380c07351af1f96137e1e5088d954f64271400afbb5bfb13c659d626a7f5810563182982e13e43fc6f18f2564ceb1d3b9c47c4a07943f3d SHA512 b67c7b9baeae237e4b0d68d3e31551387f4ae984bd31891d36528aa5700c75f673809eadd8cb0f97ddc1529032d8553a46290d3c89c73e2c3b55a89856369de0
|
||||
EBUILD hcloud-1.16.2.ebuild 691 BLAKE2B 4ec7a4f12bb6b0c5598a65c052785dd41b81244722a48e162aafee0be4518085500ae5d693caf588e301ae5b857786ccbd682bcef7e3c82e93d0dd21b065c168 SHA512 883a4e88da4220295b1704996d26e678436a482fef6a893b0ca668423a7847a32a3ead937feda84139b12234e4f251ff82a728eaf3bd177246a4b91f1fd68962
|
||||
MISC metadata.xml 246 BLAKE2B 5439993f129fd56fc43062bce991abdd20627118aa0e723a343c721cbc910de4f8b7b34b6f1587acfe0a60d488d4b1d093c69eb7d78f6accade89bced7d69b93 SHA512 482630597bd2d56c1eaed7099225b4475aec8768e20bad70ea9d6b96791fa38359ba572ab9ad0fc7ea72f1ab736ed1e92fc3c156c3427b008c7220285edce11c
|
||||
|
@ -0,0 +1,140 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
USE_RUBY="ruby24 ruby25 ruby26 ruby27"
|
||||
|
||||
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
|
||||
|
||||
RUBY_FAKEGEM_TASK_DOC="doc:all"
|
||||
|
||||
RUBY_FAKEGEM_EXTRAINSTALL="locales"
|
||||
|
||||
inherit ruby-fakegem eapi7-ver
|
||||
|
||||
DESCRIPTION="A system automation and configuration management software."
|
||||
HOMEPAGE="https://puppet.com/"
|
||||
SRC_URI="https://downloads.puppetlabs.com/puppet/${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0 GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
|
||||
IUSE="augeas diff doc emacs ldap rrdtool selinux shadow sqlite vim-syntax"
|
||||
RESTRICT="test"
|
||||
|
||||
ruby_add_rdepend "
|
||||
>=dev-ruby/hiera-3.2.1:0
|
||||
>=dev-ruby/facter-3.0.0
|
||||
>=dev-ruby/fast_gettext-1.1.2:0
|
||||
>=dev-ruby/locale-2.1:0
|
||||
>=dev-ruby/multi_json-1.10:0
|
||||
augeas? ( dev-ruby/ruby-augeas )
|
||||
diff? ( dev-ruby/diff-lcs )
|
||||
doc? ( dev-ruby/rdoc )
|
||||
ldap? ( dev-ruby/ruby-ldap )
|
||||
shadow? ( dev-ruby/ruby-shadow )
|
||||
sqlite? ( dev-ruby/sqlite3 )
|
||||
virtual/ruby-ssl
|
||||
dev-ruby/hocon"
|
||||
|
||||
ruby_add_bdepend "
|
||||
doc? ( dev-ruby/yard )
|
||||
test? (
|
||||
dev-ruby/mocha
|
||||
dev-ruby/rack
|
||||
dev-ruby/rspec-its
|
||||
)"
|
||||
# this should go in the above lists, but isn't because of test deps not being keyworded
|
||||
# dev-ruby/rspec-collection_matchers
|
||||
|
||||
RDEPEND+=" ${RDEPEND}
|
||||
rrdtool? ( >=net-analyzer/rrdtool-1.2.23[ruby] )
|
||||
selinux? (
|
||||
sys-libs/libselinux[ruby]
|
||||
sec-policy/selinux-puppet
|
||||
)
|
||||
vim-syntax? ( >=app-vim/puppet-syntax-3.0.1 )
|
||||
>=app-portage/eix-0.18.0
|
||||
acct-user/puppet
|
||||
acct-group/puppet"
|
||||
PDEPEND="emacs? ( >=app-emacs/puppet-mode-0.3-r1 )"
|
||||
|
||||
all_ruby_prepare() {
|
||||
# Avoid spec that require unpackaged json-schema.
|
||||
rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
|
||||
|
||||
# fix systemd path
|
||||
eapply -p0 "${FILESDIR}/puppet-systemd.patch"
|
||||
|
||||
# Avoid specs that can only run in the puppet.git repository. This
|
||||
# should be narrowed down to the specific specs.
|
||||
rm spec/integration/parser/compiler_spec.rb || die
|
||||
|
||||
# Avoid failing spec that need further investigation.
|
||||
rm spec/unit/module_tool/metadata_spec.rb || die
|
||||
}
|
||||
|
||||
each_ruby_install() {
|
||||
each_fakegem_install
|
||||
# dosym "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${P}" "/usr/$(get_libdir)/ruby/gems/$(ruby_get_version)/gems/${PN}"
|
||||
}
|
||||
|
||||
all_ruby_install() {
|
||||
all_fakegem_install
|
||||
|
||||
# systemd stuffs
|
||||
insinto /usr/lib/systemd/system
|
||||
doins "${WORKDIR}/all/${P}/ext/systemd/puppet.service"
|
||||
|
||||
# tmpfiles stuff
|
||||
insinto /usr/lib/tmpfiles.d
|
||||
newins "${FILESDIR}/tmpfiles.d" "puppet.conf"
|
||||
|
||||
# openrc init stuff
|
||||
newinitd "${FILESDIR}"/puppet.init-4.x puppet
|
||||
newinitd "${FILESDIR}"/puppetmaster.init-4.x puppetmaster
|
||||
newconfd "${FILESDIR}"/puppetmaster.confd puppetmaster
|
||||
|
||||
keepdir /etc/puppetlabs/puppet/ssl
|
||||
|
||||
keepdir /var/lib/puppet/facts
|
||||
keepdir /var/lib/puppet/files
|
||||
fowners -R puppet:puppet /var/lib/puppet
|
||||
|
||||
fperms 0750 /var/lib/puppet
|
||||
|
||||
fperms 0750 /etc/puppetlabs
|
||||
fperms 0750 /etc/puppetlabs/puppet
|
||||
fperms 0750 /etc/puppetlabs/puppet/ssl
|
||||
fowners -R :puppet /etc/puppetlabs
|
||||
fowners -R :puppet /var/lib/puppet
|
||||
|
||||
if use ldap ; then
|
||||
insinto /etc/openldap/schema; doins ext/ldap/puppet.schema
|
||||
fi
|
||||
|
||||
# ext and examples files
|
||||
for f in $(find ext examples -type f) ; do
|
||||
docinto "$(dirname ${f})"; dodoc "${f}"
|
||||
done
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog
|
||||
elog "Please, *don't* include the --ask option in EMERGE_EXTRA_OPTS as this could"
|
||||
elog "cause puppet to hang while installing packages."
|
||||
elog
|
||||
elog "Portage Puppet module with Gentoo-specific resources:"
|
||||
elog "http://forge.puppetlabs.com/gentoo/portage"
|
||||
elog
|
||||
|
||||
for v in ${REPLACING_VERSIONS}; do
|
||||
if [ "$(ver_cut 1 "$v")" -eq "4" ]; then
|
||||
elog
|
||||
elog "Please see the following url for the release notes for puppet-5"
|
||||
elog "https://docs.puppet.com/puppet/5.0/release_notes.html#if-youre-upgrading-from-puppet-4x"
|
||||
elog
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
diff --git a/tests/unit/transport/test_zeromq.py b/tests/unit/transport/test_zeromq.py
|
||||
index ccb337462e..97d2962e5e 100644
|
||||
--- a/tests/unit/transport/test_zeromq.py
|
||||
+++ b/tests/unit/transport/test_zeromq.py
|
||||
@@ -45,6 +45,10 @@ ON_SUSE = False
|
||||
if 'SuSE' in linux_distribution(full_distribution_name=False):
|
||||
ON_SUSE = True
|
||||
|
||||
+ON_GENTOO = False
|
||||
+if 'Gentoo' in linux_distribution(full_distribution_name=False):
|
||||
+ ON_GENTOO = True
|
||||
+
|
||||
|
||||
class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
||||
'''
|
||||
@@ -122,63 +126,6 @@ class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
||||
return payload, {'fun': 'send_clear'}
|
||||
|
||||
|
||||
-class ClearReqTestCases(BaseZMQReqCase, ReqChannelMixin):
|
||||
- '''
|
||||
- Test all of the clear msg stuff
|
||||
- '''
|
||||
- def setUp(self):
|
||||
- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config, crypt='clear')
|
||||
-
|
||||
- def tearDown(self):
|
||||
- del self.channel
|
||||
-
|
||||
- @classmethod
|
||||
- @tornado.gen.coroutine
|
||||
- def _handle_payload(cls, payload):
|
||||
- '''
|
||||
- TODO: something besides echo
|
||||
- '''
|
||||
- raise tornado.gen.Return((payload, {'fun': 'send_clear'}))
|
||||
-
|
||||
-
|
||||
-@flaky
|
||||
-@skipIf(ON_SUSE, 'Skipping until https://github.com/saltstack/salt/issues/32902 gets fixed')
|
||||
-class AESReqTestCases(BaseZMQReqCase, ReqChannelMixin):
|
||||
- def setUp(self):
|
||||
- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config)
|
||||
-
|
||||
- def tearDown(self):
|
||||
- del self.channel
|
||||
-
|
||||
- @classmethod
|
||||
- @tornado.gen.coroutine
|
||||
- def _handle_payload(cls, payload):
|
||||
- '''
|
||||
- TODO: something besides echo
|
||||
- '''
|
||||
- raise tornado.gen.Return((payload, {'fun': 'send'}))
|
||||
-
|
||||
- # TODO: make failed returns have a specific framing so we can raise the same exception
|
||||
- # on encrypted channels
|
||||
- #
|
||||
- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
- #
|
||||
- # WARNING: This test will fail randomly on any system with > 1 CPU core!!!
|
||||
- #
|
||||
- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
- def test_badload(self):
|
||||
- '''
|
||||
- Test a variety of bad requests, make sure that we get some sort of error
|
||||
- '''
|
||||
- # TODO: This test should be re-enabled when Jenkins moves to C7.
|
||||
- # Once the version of salt-testing is increased to something newer than the September
|
||||
- # release of salt-testing, the @flaky decorator should be applied to this test.
|
||||
- msgs = ['', [], tuple()]
|
||||
- for msg in msgs:
|
||||
- with self.assertRaises(salt.exceptions.AuthenticationError):
|
||||
- ret = self.channel.send(msg, timeout=5)
|
||||
-
|
||||
-
|
||||
class BaseZMQPubCase(AsyncTestCase, AdaptedConfigurationTestCaseMixin):
|
||||
'''
|
||||
Test the req server/client pair
|
@ -1,76 +0,0 @@
|
||||
diff --git a/tests/unit/grains/test_core.py b/tests/unit/grains/test_core.py
|
||||
index 3874b0001c..40304075eb 100644
|
||||
--- a/tests/unit/grains/test_core.py
|
||||
+++ b/tests/unit/grains/test_core.py
|
||||
@@ -685,22 +685,6 @@ class CoreGrainsTestCase(TestCase, LoaderModuleMockMixin):
|
||||
'Docker'
|
||||
)
|
||||
|
||||
- @skipIf(salt.utils.platform.is_windows(), 'System is Windows')
|
||||
- def test_xen_virtual(self):
|
||||
- '''
|
||||
- Test if OS grains are parsed correctly in Ubuntu Xenial Xerus
|
||||
- '''
|
||||
- with patch.object(os.path, 'isfile', MagicMock(return_value=False)):
|
||||
- with patch.dict(core.__salt__, {'cmd.run': MagicMock(return_value='')}), \
|
||||
- patch.object(os.path,
|
||||
- 'isfile',
|
||||
- MagicMock(side_effect=lambda x: True if x == '/sys/bus/xen/drivers/xenconsole' else False)):
|
||||
- log.debug('Testing Xen')
|
||||
- self.assertEqual(
|
||||
- core._virtual({'kernel': 'Linux'}).get('virtual_subtype'),
|
||||
- 'Xen PV DomU'
|
||||
- )
|
||||
-
|
||||
def _check_ipaddress(self, value, ip_v):
|
||||
'''
|
||||
check if ip address in a list is valid
|
||||
diff --git a/tests/unit/utils/test_asynchronous.py b/tests/unit/utils/test_asynchronous.py
|
||||
index 694a7aebfe..9e22c278e9 100644
|
||||
--- a/tests/unit/utils/test_asynchronous.py
|
||||
+++ b/tests/unit/utils/test_asynchronous.py
|
||||
@@ -35,19 +35,6 @@ class HelperB(object):
|
||||
|
||||
|
||||
class TestSyncWrapper(AsyncTestCase):
|
||||
- @tornado.testing.gen_test
|
||||
- def test_helpers(self):
|
||||
- '''
|
||||
- Test that the helper classes do what we expect within a regular asynchronous env
|
||||
- '''
|
||||
- ha = HelperA()
|
||||
- ret = yield ha.sleep()
|
||||
- self.assertTrue(ret)
|
||||
-
|
||||
- hb = HelperB()
|
||||
- ret = yield hb.sleep()
|
||||
- self.assertFalse(ret)
|
||||
-
|
||||
def test_basic_wrap(self):
|
||||
'''
|
||||
Test that we can wrap an asynchronous caller.
|
||||
@@ -55,24 +42,3 @@ class TestSyncWrapper(AsyncTestCase):
|
||||
sync = asynchronous.SyncWrapper(HelperA)
|
||||
ret = sync.sleep()
|
||||
self.assertTrue(ret)
|
||||
-
|
||||
- def test_double(self):
|
||||
- '''
|
||||
- Test when the asynchronous wrapper object itself creates a wrap of another thing
|
||||
-
|
||||
- This works fine since the second wrap is based on the first's IOLoop so we
|
||||
- don't have to worry about complex start/stop mechanics
|
||||
- '''
|
||||
- sync = asynchronous.SyncWrapper(HelperB)
|
||||
- ret = sync.sleep()
|
||||
- self.assertFalse(ret)
|
||||
-
|
||||
- def test_double_sameloop(self):
|
||||
- '''
|
||||
- Test asynchronous wrappers initiated from the same IOLoop, to ensure that
|
||||
- we don't wire up both to the same IOLoop (since it causes MANY problems).
|
||||
- '''
|
||||
- a = asynchronous.SyncWrapper(HelperA)
|
||||
- sync = asynchronous.SyncWrapper(HelperB, (a,))
|
||||
- ret = sync.sleep()
|
||||
- self.assertFalse(ret)
|
@ -0,0 +1,116 @@
|
||||
diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py
|
||||
index 68f752cb2d..fa2b96499d 100644
|
||||
--- a/salt/cloud/clouds/ec2.py
|
||||
+++ b/salt/cloud/clouds/ec2.py
|
||||
@@ -4901,7 +4901,7 @@ def get_password_data(
|
||||
|
||||
if not HAS_M2 and not HAS_PYCRYPTO:
|
||||
if 'key' in kwargs or 'key_file' in kwargs:
|
||||
- log.warn("No crypto library is installed, can not decrypt password")
|
||||
+ log.warning("No crypto library is installed, can not decrypt password")
|
||||
return ret
|
||||
|
||||
if 'key' not in kwargs:
|
||||
diff --git a/salt/modules/gpg.py b/salt/modules/gpg.py
|
||||
index 9dd1007c1b..47c82a7141 100644
|
||||
--- a/salt/modules/gpg.py
|
||||
+++ b/salt/modules/gpg.py
|
||||
@@ -1083,7 +1083,7 @@ def verify(text=None,
|
||||
|
||||
if trustmodel and trustmodel not in trustmodels:
|
||||
msg = 'Invalid trustmodel defined: {}. Use one of: {}'.format(trustmodel, ', '.join(trustmodels))
|
||||
- log.warn(msg)
|
||||
+ log.warning(msg)
|
||||
return {'res': False, 'message': msg}
|
||||
|
||||
extra_args = []
|
||||
diff --git a/salt/modules/network.py b/salt/modules/network.py
|
||||
index 38e2bc326e..f3a8a714cd 100644
|
||||
--- a/salt/modules/network.py
|
||||
+++ b/salt/modules/network.py
|
||||
@@ -958,7 +958,7 @@ def traceroute(host):
|
||||
|
||||
ret.append(result)
|
||||
if not result:
|
||||
- log.warn('Cannot parse traceroute output line: %s', line)
|
||||
+ log.warning('Cannot parse traceroute output line: %s', line)
|
||||
return ret
|
||||
|
||||
|
||||
diff --git a/salt/modules/saltutil.py b/salt/modules/saltutil.py
|
||||
index 138a0fcf51..5f026b0f36 100644
|
||||
--- a/salt/modules/saltutil.py
|
||||
+++ b/salt/modules/saltutil.py
|
||||
@@ -1096,7 +1096,7 @@ def refresh_pillar(wait=False, timeout=30):
|
||||
tag='/salt/minion/minion_pillar_refresh_complete',
|
||||
wait=timeout)
|
||||
if not event_ret or event_ret['complete'] is False:
|
||||
- log.warn("Pillar refresh did not complete within timeout %s", timeout)
|
||||
+ log.warning("Pillar refresh did not complete within timeout %s", timeout)
|
||||
return ret
|
||||
|
||||
|
||||
diff --git a/salt/transport/tcp.py b/salt/transport/tcp.py
|
||||
index 12ef24e86f..e83d1c927f 100644
|
||||
--- a/salt/transport/tcp.py
|
||||
+++ b/salt/transport/tcp.py
|
||||
@@ -1073,7 +1073,7 @@ class SaltMessageClient(object):
|
||||
self._connecting_future.set_result(True)
|
||||
break
|
||||
except Exception as exc: # pylint: disable=broad-except
|
||||
- log.warn('TCP Message Client encountered an exception %r', exc)
|
||||
+ log.warning('TCP Message Client encountered an exception %r', exc)
|
||||
yield salt.ext.tornado.gen.sleep(1) # TODO: backoff
|
||||
#self._connecting_future.set_exception(e)
|
||||
|
||||
diff --git a/salt/utils/process.py b/salt/utils/process.py
|
||||
index 9626ac0cb2..18697ccf7c 100644
|
||||
--- a/salt/utils/process.py
|
||||
+++ b/salt/utils/process.py
|
||||
@@ -124,7 +124,7 @@ def dup2(file1, file2):
|
||||
try:
|
||||
fno1 = file1.fileno()
|
||||
except io.UnsupportedOperation:
|
||||
- log.warn('Unsupported operation on file: %r', file1)
|
||||
+ log.warning('Unsupported operation on file: %r', file1)
|
||||
return
|
||||
if isinstance(file2, int):
|
||||
fno2 = file2
|
||||
@@ -132,7 +132,7 @@ def dup2(file1, file2):
|
||||
try:
|
||||
fno2 = file2.fileno()
|
||||
except io.UnsupportedOperation:
|
||||
- log.warn('Unsupported operation on file: %r', file2)
|
||||
+ log.warning('Unsupported operation on file: %r', file2)
|
||||
return
|
||||
os.dup2(fno1, fno2)
|
||||
|
||||
@@ -829,13 +829,13 @@ class SignalHandlingProcess(Process):
|
||||
if child.is_running():
|
||||
child.terminate()
|
||||
except psutil.NoSuchProcess:
|
||||
- log.warn(
|
||||
+ log.warning(
|
||||
'Unable to kill child of process %d, it does '
|
||||
'not exist. My pid is %d',
|
||||
self.pid, os.getpid()
|
||||
)
|
||||
except psutil.NoSuchProcess:
|
||||
- log.warn(
|
||||
+ log.warning(
|
||||
'Unable to kill children of process %d, it does not exist.'
|
||||
'My pid is %d',
|
||||
self.pid, os.getpid()
|
||||
diff --git a/tests/integration/modules/test_state.py b/tests/integration/modules/test_state.py
|
||||
index 81b3b677b9..2f3bcaa613 100644
|
||||
--- a/tests/integration/modules/test_state.py
|
||||
+++ b/tests/integration/modules/test_state.py
|
||||
@@ -2282,7 +2282,7 @@ class StateModuleTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
try:
|
||||
os.remove(path)
|
||||
except OSError:
|
||||
- log.warn("Path not found: %s", path)
|
||||
+ log.warning("Path not found: %s", path)
|
||||
|
||||
with salt.utils.files.fopen(module_path, 'w') as fp:
|
||||
fp.write('raise ImportError("No module named pip")')
|
@ -1,460 +0,0 @@
|
||||
diff --git a/salt/config/__init__.py b/salt/config/__init__.py
|
||||
index 70b34ec949..4304d99bf7 100644
|
||||
--- a/salt/config/__init__.py
|
||||
+++ b/salt/config/__init__.py
|
||||
@@ -8,6 +8,7 @@ from __future__ import absolute_import, print_function, unicode_literals, genera
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
+import copy
|
||||
import glob
|
||||
import time
|
||||
import codecs
|
||||
@@ -3191,7 +3192,7 @@ def apply_cloud_providers_config(overrides, defaults=None):
|
||||
# Merge provided extends
|
||||
keep_looping = False
|
||||
for alias, entries in six.iteritems(providers.copy()):
|
||||
- for driver, details in six.iteritems(entries):
|
||||
+ for driver, details in copy.copy(entries).items():
|
||||
|
||||
if 'extends' not in details:
|
||||
# Extends resolved or non existing, continue!
|
||||
diff --git a/salt/grains/core.py b/salt/grains/core.py
|
||||
index 9b244def9c..ede3a94de9 100644
|
||||
--- a/salt/grains/core.py
|
||||
+++ b/salt/grains/core.py
|
||||
@@ -1939,7 +1939,7 @@ def os_data():
|
||||
)
|
||||
(osname, osrelease, oscodename) = \
|
||||
[x.strip('"').strip("'") for x in
|
||||
- linux_distribution(supported_dists=_supported_dists)]
|
||||
+ linux_distribution()]
|
||||
# Try to assign these three names based on the lsb info, they tend to
|
||||
# be more accurate than what python gets from /etc/DISTRO-release.
|
||||
# It's worth noting that Ubuntu has patched their Python distribution
|
||||
diff --git a/salt/modules/boto_route53.py b/salt/modules/boto_route53.py
|
||||
index a663ec7207..8d3d8c2105 100644
|
||||
--- a/salt/modules/boto_route53.py
|
||||
+++ b/salt/modules/boto_route53.py
|
||||
@@ -158,7 +158,7 @@ def describe_hosted_zones(zone_id=None, domain_name=None, region=None,
|
||||
else:
|
||||
marker = None
|
||||
ret = None
|
||||
- while marker is not '':
|
||||
+ while marker != '':
|
||||
r = conn.get_all_hosted_zones(start_marker=marker,
|
||||
zone_list=ret)
|
||||
ret = r['ListHostedZonesResponse']['HostedZones']
|
||||
diff --git a/salt/modules/file.py b/salt/modules/file.py
|
||||
index b5b70e2d4c..41a9229eb4 100644
|
||||
--- a/salt/modules/file.py
|
||||
+++ b/salt/modules/file.py
|
||||
@@ -2744,7 +2744,7 @@ def blockreplace(path,
|
||||
|
||||
if block_found:
|
||||
diff = __utils__['stringutils.get_diff'](orig_file, new_file)
|
||||
- has_changes = diff is not ''
|
||||
+ has_changes = diff != ''
|
||||
if has_changes and not dry_run:
|
||||
# changes detected
|
||||
# backup file attrs
|
||||
diff --git a/salt/modules/iptables.py b/salt/modules/iptables.py
|
||||
index e232c6931f..9708f45256 100644
|
||||
--- a/salt/modules/iptables.py
|
||||
+++ b/salt/modules/iptables.py
|
||||
@@ -905,7 +905,7 @@ def insert(table='filter', chain=None, position=None, rule=None, family='ipv4'):
|
||||
rules = get_rules(family=family)
|
||||
size = len(rules[table][chain]['rules'])
|
||||
position = (size + position) + 1
|
||||
- if position is 0:
|
||||
+ if position == 0:
|
||||
position = 1
|
||||
|
||||
wait = '--wait' if _has_option('--wait', family) else ''
|
||||
@@ -1040,7 +1040,7 @@ def _parse_conf(conf_file=None, in_mem=False, family='ipv4'):
|
||||
ret_args = {}
|
||||
chain = parsed_args['append']
|
||||
for arg in parsed_args:
|
||||
- if parsed_args[arg] and arg is not 'append':
|
||||
+ if parsed_args[arg] and arg != 'append':
|
||||
ret_args[arg] = parsed_args[arg]
|
||||
if parsed_args['comment'] is not None:
|
||||
comment = parsed_args['comment'][0].strip('"')
|
||||
diff --git a/salt/modules/lxd.py b/salt/modules/lxd.py
|
||||
index d6c2d8d4b9..d617cbb3df 100644
|
||||
--- a/salt/modules/lxd.py
|
||||
+++ b/salt/modules/lxd.py
|
||||
@@ -1824,11 +1824,11 @@ def container_file_get(name, src, dst, overwrite=False,
|
||||
|
||||
if mode:
|
||||
os.chmod(dst, mode)
|
||||
- if uid or uid is '0':
|
||||
+ if uid or uid == '0':
|
||||
uid = int(uid)
|
||||
else:
|
||||
uid = -1
|
||||
- if gid or gid is '0':
|
||||
+ if gid or gid == '0':
|
||||
gid = int(gid)
|
||||
else:
|
||||
gid = -1
|
||||
diff --git a/salt/modules/mongodb.py b/salt/modules/mongodb.py
|
||||
index 8cdb819102..ed3228150e 100644
|
||||
--- a/salt/modules/mongodb.py
|
||||
+++ b/salt/modules/mongodb.py
|
||||
@@ -484,7 +484,7 @@ def update_one(objects, collection, user=None, password=None, host=None, port=No
|
||||
objects = six.text_type(objects)
|
||||
objs = re.split(r'}\s+{', objects)
|
||||
|
||||
- if len(objs) is not 2:
|
||||
+ if len(objs) != 2:
|
||||
return "Your request does not contain a valid " + \
|
||||
"'{_\"id\": \"my_id\"} {\"my_doc\": \"my_val\"}'"
|
||||
|
||||
diff --git a/salt/modules/virt.py b/salt/modules/virt.py
|
||||
index a2412bb745..91e105fe04 100644
|
||||
--- a/salt/modules/virt.py
|
||||
+++ b/salt/modules/virt.py
|
||||
@@ -4732,7 +4732,7 @@ def _parse_pools_caps(doc):
|
||||
if options:
|
||||
if 'options' not in pool_caps:
|
||||
pool_caps['options'] = {}
|
||||
- kind = option_kind if option_kind is not 'vol' else 'volume'
|
||||
+ kind = option_kind if option_kind != 'vol' else 'volume'
|
||||
pool_caps['options'][kind] = options
|
||||
return pool_caps
|
||||
|
||||
diff --git a/salt/modules/win_ip.py b/salt/modules/win_ip.py
|
||||
index e69f44211e..99b9d392f6 100644
|
||||
--- a/salt/modules/win_ip.py
|
||||
+++ b/salt/modules/win_ip.py
|
||||
@@ -342,7 +342,7 @@ def set_static_dns(iface, *addrs):
|
||||
salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.1'
|
||||
salt -G 'os_family:Windows' ip.set_static_dns 'Local Area Connection' '192.168.1.252' '192.168.1.253'
|
||||
'''
|
||||
- if addrs is () or str(addrs[0]).lower() == 'none':
|
||||
+ if addrs == () or str(addrs[0]).lower() == 'none':
|
||||
return {'Interface': iface, 'DNS Server': 'No Changes'}
|
||||
# Clear the list of DNS servers if [] is passed
|
||||
if str(addrs[0]).lower() == '[]':
|
||||
diff --git a/salt/modules/win_lgpo.py b/salt/modules/win_lgpo.py
|
||||
index efa154889f..50f0c9940f 100644
|
||||
--- a/salt/modules/win_lgpo.py
|
||||
+++ b/salt/modules/win_lgpo.py
|
||||
@@ -4692,7 +4692,7 @@ class _policy_info(object):
|
||||
return 'true'
|
||||
elif val.upper() == 'Run Windows PowerShell scripts last'.upper():
|
||||
return 'false'
|
||||
- elif val is 'Not Configured':
|
||||
+ elif val == 'Not Configured':
|
||||
return None
|
||||
else:
|
||||
return 'Invalid Value'
|
||||
diff --git a/salt/modules/win_system.py b/salt/modules/win_system.py
|
||||
index 74fa61bc51..42f0c2ca6e 100644
|
||||
--- a/salt/modules/win_system.py
|
||||
+++ b/salt/modules/win_system.py
|
||||
@@ -1149,7 +1149,7 @@ def set_system_date_time(years=None,
|
||||
system_time.wSecond = int(seconds)
|
||||
system_time_ptr = ctypes.pointer(system_time)
|
||||
succeeded = ctypes.windll.kernel32.SetLocalTime(system_time_ptr)
|
||||
- if succeeded is not 0:
|
||||
+ if succeeded != 0:
|
||||
return True
|
||||
else:
|
||||
log.error('Failed to set local time')
|
||||
diff --git a/salt/modules/x509.py b/salt/modules/x509.py
|
||||
index 1cdd912bfb..4069076c32 100644
|
||||
--- a/salt/modules/x509.py
|
||||
+++ b/salt/modules/x509.py
|
||||
@@ -131,7 +131,7 @@ def _new_extension(name, value, critical=0, issuer=None, _pyfree=1):
|
||||
to create the authoritykeyidentifier extension.
|
||||
'''
|
||||
if name == 'subjectKeyIdentifier' and \
|
||||
- value.strip('0123456789abcdefABCDEF:') is not '':
|
||||
+ value.strip('0123456789abcdefABCDEF:') != '':
|
||||
raise salt.exceptions.SaltInvocationError(
|
||||
'value must be precomputed hash')
|
||||
|
||||
diff --git a/salt/output/highstate.py b/salt/output/highstate.py
|
||||
index 1f2f9452fa..87be7656fe 100644
|
||||
--- a/salt/output/highstate.py
|
||||
+++ b/salt/output/highstate.py
|
||||
@@ -209,7 +209,7 @@ def _format_host(host, data, indent_level=1):
|
||||
# Verify that the needed data is present
|
||||
data_tmp = {}
|
||||
for tname, info in six.iteritems(data):
|
||||
- if isinstance(info, dict) and tname is not 'changes' and info and '__run_num__' not in info:
|
||||
+ if isinstance(info, dict) and tname != 'changes' and info and '__run_num__' not in info:
|
||||
err = ('The State execution failed to record the order '
|
||||
'in which all states were executed. The state '
|
||||
'return missing data is:')
|
||||
diff --git a/salt/renderers/stateconf.py b/salt/renderers/stateconf.py
|
||||
index cfce9e6926..1b116ddfb1 100644
|
||||
--- a/salt/renderers/stateconf.py
|
||||
+++ b/salt/renderers/stateconf.py
|
||||
@@ -224,7 +224,7 @@ def render(input, saltenv='base', sls='', argline='', **kws):
|
||||
tmplctx = STATE_CONF.copy()
|
||||
if tmplctx:
|
||||
prefix = sls + '::'
|
||||
- for k in six.iterkeys(tmplctx): # iterate over a copy of keys
|
||||
+ for k in copy.copy(tmplctx).keys(): # iterate over a copy of keys
|
||||
if k.startswith(prefix):
|
||||
tmplctx[k[len(prefix):]] = tmplctx[k]
|
||||
del tmplctx[k]
|
||||
diff --git a/salt/returners/slack_webhook_return.py b/salt/returners/slack_webhook_return.py
|
||||
index aad1cdf656..0db705df01 100644
|
||||
--- a/salt/returners/slack_webhook_return.py
|
||||
+++ b/salt/returners/slack_webhook_return.py
|
||||
@@ -322,7 +322,7 @@ def returner(ret):
|
||||
show_tasks = _options.get('show_tasks')
|
||||
author_icon = _options.get('author_icon')
|
||||
|
||||
- if not webhook or webhook is '':
|
||||
+ if not webhook or webhook == '':
|
||||
log.error('%s.webhook not defined in salt config', __virtualname__)
|
||||
return
|
||||
|
||||
diff --git a/salt/states/debconfmod.py b/salt/states/debconfmod.py
|
||||
index a0ef20b185..a7478c7ac0 100644
|
||||
--- a/salt/states/debconfmod.py
|
||||
+++ b/salt/states/debconfmod.py
|
||||
@@ -210,7 +210,7 @@ def set(name, data, **kwargs):
|
||||
args['value'] = 'true' if args['value'] else 'false'
|
||||
|
||||
if current is not None and [key, args['type'], six.text_type(args['value'])] in current:
|
||||
- if ret['comment'] is '':
|
||||
+ if ret['comment'] == '':
|
||||
ret['comment'] = 'Unchanged answers: '
|
||||
ret['comment'] += ('{0} ').format(key)
|
||||
else:
|
||||
diff --git a/salt/states/git.py b/salt/states/git.py
|
||||
index ce6455ee71..f2bf4da629 100644
|
||||
--- a/salt/states/git.py
|
||||
+++ b/salt/states/git.py
|
||||
@@ -2464,7 +2464,7 @@ def detached(name,
|
||||
password,
|
||||
output_encoding=output_encoding)[0]
|
||||
|
||||
- if remote_rev_type is 'hash':
|
||||
+ if remote_rev_type == 'hash':
|
||||
try:
|
||||
__salt__['git.describe'](target,
|
||||
rev,
|
||||
@@ -2643,7 +2643,7 @@ def detached(name,
|
||||
|
||||
# get refs and checkout
|
||||
checkout_commit_id = ''
|
||||
- if remote_rev_type is 'hash':
|
||||
+ if remote_rev_type == 'hash':
|
||||
if __salt__['git.describe'](
|
||||
target,
|
||||
rev,
|
||||
diff --git a/salt/states/mysql_grants.py b/salt/states/mysql_grants.py
|
||||
index d6023bbf86..638e988e13 100644
|
||||
--- a/salt/states/mysql_grants.py
|
||||
+++ b/salt/states/mysql_grants.py
|
||||
@@ -167,7 +167,7 @@ def present(name,
|
||||
db_part = database.rpartition('.')
|
||||
my_db = db_part[0]
|
||||
my_table = db_part[2]
|
||||
- my_db = __salt__['mysql.quote_identifier'](my_db, (my_table is '*'))
|
||||
+ my_db = __salt__['mysql.quote_identifier'](my_db, (my_table == '*'))
|
||||
my_table = __salt__['mysql.quote_identifier'](my_table)
|
||||
# Removing per table grants in case of database level grant !!!
|
||||
if token_grants['database'] == my_db:
|
||||
diff --git a/salt/utils/args.py b/salt/utils/args.py
|
||||
index 8cc0f35196..8caaae4d1f 100644
|
||||
--- a/salt/utils/args.py
|
||||
+++ b/salt/utils/args.py
|
||||
@@ -253,6 +253,9 @@ def get_function_argspec(func, is_class_method=None):
|
||||
if not callable(func):
|
||||
raise TypeError('{0} is not a callable'.format(func))
|
||||
|
||||
+ if hasattr(func, "__wrapped__"):
|
||||
+ func = func.__wrapped__
|
||||
+
|
||||
if six.PY2:
|
||||
if is_class_method is True:
|
||||
aspec = inspect.getargspec(func)
|
||||
diff --git a/salt/utils/decorators/path.py b/salt/utils/decorators/path.py
|
||||
index 4adacf0e4e..37c692355f 100644
|
||||
--- a/salt/utils/decorators/path.py
|
||||
+++ b/salt/utils/decorators/path.py
|
||||
@@ -4,10 +4,11 @@ Decorators for salt.utils.path
|
||||
'''
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
+import functools
|
||||
+
|
||||
# Import Salt libs
|
||||
import salt.utils.path
|
||||
from salt.exceptions import CommandNotFoundError
|
||||
-from salt.utils.decorators.signature import identical_signature_wrapper
|
||||
|
||||
|
||||
def which(exe):
|
||||
@@ -15,13 +16,14 @@ def which(exe):
|
||||
Decorator wrapper for salt.utils.path.which
|
||||
'''
|
||||
def wrapper(function):
|
||||
+ @functools.wraps(function)
|
||||
def wrapped(*args, **kwargs):
|
||||
if salt.utils.path.which(exe) is None:
|
||||
raise CommandNotFoundError(
|
||||
'The \'{0}\' binary was not found in $PATH.'.format(exe)
|
||||
)
|
||||
return function(*args, **kwargs)
|
||||
- return identical_signature_wrapper(function, wrapped)
|
||||
+ return wrapped
|
||||
return wrapper
|
||||
|
||||
|
||||
@@ -30,6 +32,7 @@ def which_bin(exes):
|
||||
Decorator wrapper for salt.utils.path.which_bin
|
||||
'''
|
||||
def wrapper(function):
|
||||
+ @functools.wraps(function)
|
||||
def wrapped(*args, **kwargs):
|
||||
if salt.utils.path.which_bin(exes) is None:
|
||||
raise CommandNotFoundError(
|
||||
@@ -39,5 +42,5 @@ def which_bin(exes):
|
||||
)
|
||||
)
|
||||
return function(*args, **kwargs)
|
||||
- return identical_signature_wrapper(function, wrapped)
|
||||
+ return wrapped
|
||||
return wrapper
|
||||
diff --git a/salt/utils/schedule.py b/salt/utils/schedule.py
|
||||
index 474af442a1..69204a53d4 100644
|
||||
--- a/salt/utils/schedule.py
|
||||
+++ b/salt/utils/schedule.py
|
||||
@@ -721,7 +721,7 @@ class Schedule(object):
|
||||
if argspec.keywords:
|
||||
# this function accepts **kwargs, pack in the publish data
|
||||
for key, val in six.iteritems(ret):
|
||||
- if key is not 'kwargs':
|
||||
+ if key != 'kwargs':
|
||||
kwargs['__pub_{0}'.format(key)] = copy.deepcopy(val)
|
||||
|
||||
# Only include these when running runner modules
|
||||
diff --git a/salt/utils/win_pdh.py b/salt/utils/win_pdh.py
|
||||
index 9921ee72da..7e9e368caf 100644
|
||||
--- a/salt/utils/win_pdh.py
|
||||
+++ b/salt/utils/win_pdh.py
|
||||
@@ -164,7 +164,7 @@ class Counter(object):
|
||||
'''
|
||||
path = win32pdh.MakeCounterPath(
|
||||
(None, obj, instance, None, instance_index, counter), 0)
|
||||
- if win32pdh.ValidatePath(path) is 0:
|
||||
+ if win32pdh.ValidatePath(path) == 0:
|
||||
return Counter(path, obj, instance, instance_index, counter)
|
||||
raise CommandExecutionError('Invalid counter specified: {0}'.format(path))
|
||||
|
||||
diff --git a/tests/integration/cloud/helpers/virtualbox.py b/tests/integration/cloud/helpers/virtualbox.py
|
||||
index 668f15d82f..a6bc9dd2c3 100644
|
||||
--- a/tests/integration/cloud/helpers/virtualbox.py
|
||||
+++ b/tests/integration/cloud/helpers/virtualbox.py
|
||||
@@ -74,7 +74,7 @@ class VirtualboxCloudTestCase(ShellCase):
|
||||
output.pop(0)
|
||||
else:
|
||||
break
|
||||
- if len(output) is 0:
|
||||
+ if len(output) == 0:
|
||||
return dict()
|
||||
else:
|
||||
return salt.utils.json.loads(''.join(output))
|
||||
diff --git a/tests/integration/modules/test_mysql.py b/tests/integration/modules/test_mysql.py
|
||||
index 7edb77cb94..197c4e65ae 100644
|
||||
--- a/tests/integration/modules/test_mysql.py
|
||||
+++ b/tests/integration/modules/test_mysql.py
|
||||
@@ -519,7 +519,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
)
|
||||
expected = []
|
||||
for tablename, engine in sorted(six.iteritems(tablenames)):
|
||||
- if engine is 'MEMORY':
|
||||
+ if engine == 'MEMORY':
|
||||
expected.append([{
|
||||
'Table': dbname+'.'+tablename,
|
||||
'Msg_text': ("The storage engine for the table doesn't"
|
||||
@@ -544,7 +544,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
)
|
||||
expected = []
|
||||
for tablename, engine in sorted(six.iteritems(tablenames)):
|
||||
- if engine is 'MYISAM':
|
||||
+ if engine == 'MYISAM':
|
||||
expected.append([{
|
||||
'Table': dbname+'.'+tablename,
|
||||
'Msg_text': 'OK',
|
||||
@@ -570,14 +570,14 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
expected = []
|
||||
for tablename, engine in sorted(six.iteritems(tablenames)):
|
||||
- if engine is 'MYISAM':
|
||||
+ if engine == 'MYISAM':
|
||||
expected.append([{
|
||||
'Table': dbname+'.'+tablename,
|
||||
'Msg_text': 'OK',
|
||||
'Msg_type': 'status',
|
||||
'Op': 'optimize'
|
||||
}])
|
||||
- elif engine is 'InnoDB':
|
||||
+ elif engine == 'InnoDB':
|
||||
expected.append([{
|
||||
'Table': dbname+'.'+tablename,
|
||||
'Msg_text': ("Table does not support optimize, "
|
||||
@@ -591,7 +591,7 @@ class MysqlModuleDbTest(ModuleCase, SaltReturnAssertsMixin):
|
||||
'Msg_type': 'status',
|
||||
'Op': 'optimize'
|
||||
}])
|
||||
- elif engine is 'MEMORY':
|
||||
+ elif engine == 'MEMORY':
|
||||
expected.append([{
|
||||
'Table': dbname+'.'+tablename,
|
||||
'Msg_text': ("The storage engine for the table doesn't"
|
||||
diff --git a/tests/unit/modules/test_virt.py b/tests/unit/modules/test_virt.py
|
||||
index 32f4302e5f..c49bd0bccc 100644
|
||||
--- a/tests/unit/modules/test_virt.py
|
||||
+++ b/tests/unit/modules/test_virt.py
|
||||
@@ -9,6 +9,7 @@ virt execution module unit tests
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
import os
|
||||
import re
|
||||
+import sys
|
||||
import datetime
|
||||
import shutil
|
||||
|
||||
@@ -1393,19 +1394,20 @@ class VirtTestCase(TestCase, LoaderModuleMockMixin):
|
||||
self.assertEqual('vnc', setxml.find('devices/graphics').get('type'))
|
||||
|
||||
# Update with no diff case
|
||||
- self.assertEqual({
|
||||
- 'definition': False,
|
||||
- 'disk': {'attached': [], 'detached': []},
|
||||
- 'interface': {'attached': [], 'detached': []}
|
||||
- }, virt.update('my vm', cpu=1, mem=1024,
|
||||
- disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
|
||||
- nic_profile='myprofile',
|
||||
- interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
|
||||
- 'mac': '52:54:00:39:02:b1'},
|
||||
- {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
|
||||
- 'mac': '52:54:00:39:02:b2'}],
|
||||
- graphics={'type': 'spice',
|
||||
- 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
|
||||
+ if sys.hexversion < 0x03080000:
|
||||
+ self.assertEqual({
|
||||
+ 'definition': False,
|
||||
+ 'disk': {'attached': [], 'detached': []},
|
||||
+ 'interface': {'attached': [], 'detached': []}
|
||||
+ }, virt.update('my vm', cpu=1, mem=1024,
|
||||
+ disk_profile='default', disks=[{'name': 'data', 'size': 2048}],
|
||||
+ nic_profile='myprofile',
|
||||
+ interfaces=[{'name': 'eth0', 'type': 'network', 'source': 'default',
|
||||
+ 'mac': '52:54:00:39:02:b1'},
|
||||
+ {'name': 'eth1', 'type': 'network', 'source': 'oldnet',
|
||||
+ 'mac': '52:54:00:39:02:b2'}],
|
||||
+ graphics={'type': 'spice',
|
||||
+ 'listen': {'type': 'address', 'address': '127.0.0.1'}}))
|
||||
|
||||
# Failed XML description update case
|
||||
self.mock_conn.defineXML.side_effect = self.mock_libvirt.libvirtError("Test error")
|
@ -1,147 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python3_6 )
|
||||
|
||||
inherit eutils systemd distutils-r1
|
||||
|
||||
DESCRIPTION="Salt is a remote execution and configuration manager"
|
||||
HOMEPAGE="https://www.saltstack.com/resources/community/
|
||||
https://github.com/saltstack"
|
||||
|
||||
if [[ ${PV} == 9999* ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git"
|
||||
EGIT_BRANCH="develop"
|
||||
SRC_URI=""
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb neutron nova"
|
||||
IUSE+=" openssl portage profile redis selinux test raet +zeromq vim-syntax"
|
||||
|
||||
RDEPEND="sys-apps/pciutils
|
||||
dev-python/jinja[${PYTHON_USEDEP}]
|
||||
dev-python/libnacl[${PYTHON_USEDEP}]
|
||||
>=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
|
||||
dev-python/pyyaml[${PYTHON_USEDEP}]
|
||||
dev-python/markupsafe[${PYTHON_USEDEP}]
|
||||
>=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
|
||||
dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
>=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
|
||||
<www-servers/tornado-5.0[${PYTHON_USEDEP}]
|
||||
libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
|
||||
mako? ( dev-python/mako[${PYTHON_USEDEP}] )
|
||||
ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
|
||||
libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] )
|
||||
openssl? (
|
||||
dev-libs/openssl:0=[-bindist]
|
||||
dev-python/pyopenssl[${PYTHON_USEDEP}]
|
||||
)
|
||||
raet? (
|
||||
>=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
|
||||
>=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
|
||||
)
|
||||
zeromq? (
|
||||
>=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
|
||||
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||
)
|
||||
cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
|
||||
mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
|
||||
portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
|
||||
keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
|
||||
redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
|
||||
selinux? ( sec-policy/selinux-salt )
|
||||
nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] )
|
||||
neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] )
|
||||
gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
|
||||
profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
|
||||
vim-syntax? ( app-vim/salt-vim )"
|
||||
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
|
||||
test? (
|
||||
dev-python/pytest-salt[${PYTHON_USEDEP}]
|
||||
dev-python/psutil[${PYTHON_USEDEP}]
|
||||
dev-python/pytest[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-catchlog[${PYTHON_USEDEP}]
|
||||
dev-python/pip[${PYTHON_USEDEP}]
|
||||
dev-python/virtualenv[${PYTHON_USEDEP}]
|
||||
>=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
|
||||
!x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
|
||||
>=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
|
||||
>=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
|
||||
>=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
|
||||
${RDEPEND}
|
||||
)"
|
||||
|
||||
DOCS=( README.rst AUTHORS )
|
||||
|
||||
REQUIRED_USE="|| ( raet zeromq )"
|
||||
RESTRICT="!test? ( test ) x86? ( test )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-2017.7.0-dont-realpath-tmpdir.patch"
|
||||
"${FILESDIR}/${PN}-2018.3.4-tests.patch"
|
||||
"${FILESDIR}/${PN}-2018.3.2-skip-zeromq-test-that-hangs.patch"
|
||||
)
|
||||
|
||||
python_prepare() {
|
||||
# remove tests with external dependencies that may not be available
|
||||
rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die
|
||||
rm tests/unit/modules/test_{file,boto_{vpc,secgroup,elb}}.py || die
|
||||
rm tests/unit/states/test_boto_vpc.py || die
|
||||
rm tests/unit/modules/test_{kubernetes,vsphere}.py || die
|
||||
|
||||
# allow the use of the renamed msgpack
|
||||
sed -i '/^msgpack/d' requirements/base.txt || die
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
local svc
|
||||
USE_SETUPTOOLS=1 distutils-r1_python_install_all
|
||||
|
||||
for svc in minion master syndic api; do
|
||||
newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc}
|
||||
newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
|
||||
systemd_dounit "${FILESDIR}"/salt-${svc}.service
|
||||
done
|
||||
|
||||
insinto /etc/${PN}
|
||||
doins -r conf/*
|
||||
}
|
||||
|
||||
python_test() {
|
||||
local tempdir
|
||||
# testsuite likes lots of files
|
||||
ulimit -n 3072 || die
|
||||
|
||||
# ${T} is too long a path for the tests to work
|
||||
tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
|
||||
mkdir "${T}/$(basename "${tempdir}")"
|
||||
mkdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
|
||||
|
||||
(
|
||||
cleanup() {
|
||||
rm -f "${tempdir}"
|
||||
rmdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
addwrite "${tempdir}"
|
||||
ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}"
|
||||
|
||||
USE_SETUPTOOLS=1 SHELL="/bin/bash" \
|
||||
TMPDIR="${tempdir}" \
|
||||
${EPYTHON} tests/runtests.py \
|
||||
--unit-tests --no-report --verbose
|
||||
|
||||
) || die "testing failed"
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,6 @@
|
||||
AUX bootchart2-0.14.7-sysmacros.patch 898 BLAKE2B 8529bdfc1a4e554a87673113b91e4a15e2b2f7efe8090eaa0de1b13cfe296cfe74c29f0bd90f05bb4853dd5ef12aff4dc576252004c7977d30e6b2e41592cd52 SHA512 60f703d29e133817439dcbaf7b59d51ae63e98c8fc03ff860f588c6ef3e3aa422c3c5132faf456dde3198f5c02afea9fbdeae43701e4af15de29155fb677dc0a
|
||||
AUX bootchart2-0.14.8-no-compressed-man.patch 802 BLAKE2B 0d09c6a2de65079c0c928e0b2617e5b493d0decbea9644f844752470942db09b199cea18be052a8160b3a59a8491f849e5bb2dc16b80c8e6f77a69b4bda1d30c SHA512 4e5c48a6a29bef5544f3ae491718531407d8ac47ae0439ccaa7dd0f7009e148437810f5d984a98b6623d9ea7bffbc514a31bd1c19ee57b8a17e02a2f5d2a7394
|
||||
AUX bootchart2.init 693 BLAKE2B f91997826a6128f3f496f581d662b3a8c7749f978f442700c9e7f910d0a5d4e62f5f91fac63958f85fcc08f17fcc0710e5553abb36fc0d90f6c70c0191f63b61 SHA512 181ecf9b64c8303ade8544530698a6a217c367927673feaca4d837bb72d13922d47eff9374a482cd225c3189ea80d36ba72ff658aba596f96639f0d1be7a432b
|
||||
DIST bootchart2-0.14.8.tar.gz 1175527 BLAKE2B 623ca2269420eda79b09d955ab9d4a37af004e9e97ad0e0c6014e53b4b0c63239661cb5359345306504980b060ccd11488970cb0aa3d832bfb55392724e715dd SHA512 58303db91d22ccc44c0dc765e7a6672fb277840555fd87ce64b8987cba85250cfe3db17f3ec7e0e1e726ad59166a5d3d01a7a262c07b5690c595877b46c66bd0
|
||||
EBUILD bootchart2-0.14.8.ebuild 1935 BLAKE2B 90ba86befeecec23552cc7d61155d07029ad9305e84541b1bb2fdd4d387892458aba2be976c2ada8930b5baa96124ea0241a0471ad066a180f9830381941c2bf SHA512 b27e62f18f3ebec481acd0d8b43abe1b1d47dcac1f4403ae3f4742188fa2e531a4d583ec9556f087d72b9175e4b258f45c733e236af4e992377bc7381d165462
|
||||
EBUILD bootchart2-0.14.8-r1.ebuild 1504 BLAKE2B 7e94059446d518143da9777071856eb4a6aa57be301c746ef6ff679bf7db27fead2aa7f6ff4fe4ab132f89628b6329d35221c6df19356fe33a2c85f8e09a9563 SHA512 aa90f3d8658f05e5be84b853e1aba550a713add56ee0cdc0e5af3367a435f2f46942dfa60c028febe75a760869f258900910dea7a49035c883a94e80077735ad
|
||||
MISC metadata.xml 304 BLAKE2B 171fff1d72aaecb2e11f9d712aae9b40aba252d315f63184036d3757a92843f3e898b7e723b617014bca29b95f928a720ec7115a564766704514e8bc5b826e4a SHA512 a32bf175ccbaf61207413ae249aa66e72c7704abc0e1c41e9a6eb5fbbc21ea143f45588490ef53bbc8a5ffa0145880de87308ed33df9354a1433016f6540f46e
|
||||
|
@ -0,0 +1,15 @@
|
||||
--- a/Makefile 2015-12-17 09:12:57.000000000 +0100
|
||||
+++ b/Makefile 2020-04-30 13:14:08.772369141 +0200
|
||||
@@ -107,9 +107,9 @@
|
||||
install -m 644 -D README $(DESTDIR)$(DOCDIR)/README
|
||||
install -m 644 -D README.pybootchart $(DESTDIR)$(DOCDIR)/README.pybootchart
|
||||
mkdir -p $(DESTDIR)$(MANDIR)
|
||||
- gzip -c bootchart2.1 > $(DESTDIR)$(MANDIR)/bootchart2.1.gz
|
||||
- gzip -c bootchartd.1 > $(DESTDIR)$(MANDIR)/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).1.gz
|
||||
- gzip -c pybootchartgui.1 > $(DESTDIR)$(MANDIR)/pybootchartgui.1.gz
|
||||
+ install -m 644 bootchart2.1 $(DESTDIR)$(MANDIR)/bootchart2.1
|
||||
+ install -m 644 bootchartd.1 $(DESTDIR)$(MANDIR)/$(PROGRAM_PREFIX)bootchartd$(PROGRAM_SUFFIX).1
|
||||
+ install -m 644 pybootchartgui.1 $(DESTDIR)$(MANDIR)/pybootchartgui.1
|
||||
|
||||
install-service:
|
||||
mkdir -p $(DESTDIR)$(SYSTEMD_UNIT_DIR)
|
Binary file not shown.
@ -1,4 +1,4 @@
|
||||
AUX md4sum-fix-out-of-bounds-write.diff 271 BLAKE2B 44573278991d38979ca6f7d18b51be2d9f4150b1491c0650b0ae99d203be475a9c15bfcbdba1dab557a5467aff3c78a16b098d417905b24270164a9969d81ff3 SHA512 bcf06b6da80b67965547d359774c4462516dd69d36ed84723d9baaa93472405ed4d790ce687affa148be39157137ef46399e355540c18271f9164318f7731d65
|
||||
DIST md4sum-0.02.03.tar.gz 26819 BLAKE2B 6e7fb76a21d13276a7444e1c1d1d0a05e90399dc7a99b3e2e6d24d1dc46f45b086b99d00e4c9e1821c4a82a9fe985e4823a235e254abba475bd639f98536aea6 SHA512 5a05760aa6a770d9f55a41e42bdf6801dcd67bc804ead5bd84aecc48e5ee5a7c8b01d4a1e1767a4cc1f8695d66ed16c6a1f09b58d236c27db317f227e02e3762
|
||||
EBUILD md4sum-0.02.03-r2.ebuild 625 BLAKE2B 64d034954e34b51bea2dc9dc85372ece1ee5c5424d155c8dede791cdc28d273b58c9310e469277d4e165077bec785e0b8220f5be2855d9bbf34aaa3f9337b3f1 SHA512 98269dade29e683dbf9e0c044abe08c96b56e21b2754e0bad5a62f26b1d3a2c1e273fb14228da74c91fd1b9659093c3b09bdddb185e9e2c08c30db8865e18374
|
||||
EBUILD md4sum-0.02.03-r2.ebuild 625 BLAKE2B 793dbf8af23336b033dd3cc12f06ff5f26f1e09a151ec37cfe202b8fb4af2258bc616488aaa1b1c746943820b189a3478f08849fca2e81ffbb4a579668568ca5 SHA512 9ba36b9f962fc4dc5029b1a7d474ed7862e9b4c69d0d76a41e640646f63cbaa56a682a5a8b82b5af127a8b5a3858c9b80ad1226749c68444926589b45127c7de
|
||||
MISC metadata.xml 210 BLAKE2B a547b5e8dbb5d674ce2df4bcc6ee71c3aae3b0c7863c38a66c1fac3cf0f0c16c7bb302264082f345d2da87d0e544d321e6fd8385a16d01620a733a8ab29082a3 SHA512 27fbc849a311e57c8dbad0cae9975d564c03ae8a7b495b2e7a5cd160c6a09c0101e695ba4d2edf07c0d4c4d7329ff9a4bd91656aa685623342883b83bcb9ac0f
|
||||
|
Binary file not shown.
@ -0,0 +1,50 @@
|
||||
https://lists.nongnu.org/archive/html/qemu-devel/2020-04/msg02643.html
|
||||
|
||||
From 6bce23d8daf96a7faa9288e7414948cda31ddaa2 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Thu, 16 Apr 2020 18:55:49 +0100
|
||||
Subject: [PATCH] linux-user/strace.list: fix epoll_create{,1} -strace output
|
||||
|
||||
Fix syscall name and parameters priinter.
|
||||
|
||||
Before the change:
|
||||
|
||||
```
|
||||
$ alpha-linux-user/qemu-alpha -strace -L /usr/alpha-unknown-linux-gnu/ /tmp/a
|
||||
...
|
||||
1274697 %s(%d)(2097152,274903156744,274903156760,274905840712,274877908880,274903235616) = 3
|
||||
1274697 exit_group(0)
|
||||
```
|
||||
|
||||
After the change:
|
||||
|
||||
```
|
||||
$ alpha-linux-user/qemu-alpha -strace -L /usr/alpha-unknown-linux-gnu/ /tmp/a
|
||||
...
|
||||
1273719 epoll_create1(2097152) = 3
|
||||
1273719 exit_group(0)
|
||||
```
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
---
|
||||
linux-user/strace.list | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/linux-user/strace.list
|
||||
+++ b/linux-user/strace.list
|
||||
@@ -125,10 +125,10 @@
|
||||
{ TARGET_NR_dup3, "dup3" , "%s(%d,%d,%d)", NULL, NULL },
|
||||
#endif
|
||||
#ifdef TARGET_NR_epoll_create
|
||||
-{ TARGET_NR_epoll_create, "%s(%d)", NULL, NULL, NULL },
|
||||
+{ TARGET_NR_epoll_create, "epoll_create", "%s(%d)", NULL, NULL },
|
||||
#endif
|
||||
#ifdef TARGET_NR_epoll_create1
|
||||
-{ TARGET_NR_epoll_create1, "%s(%d)", NULL, NULL, NULL },
|
||||
+{ TARGET_NR_epoll_create1, "epoll_create1", "%s(%d)", NULL, NULL },
|
||||
#endif
|
||||
#ifdef TARGET_NR_epoll_ctl
|
||||
{ TARGET_NR_epoll_ctl, "epoll_ctl" , NULL, NULL, NULL },
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,837 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
PYTHON_COMPAT=( python{3_6,3_7,3_8} )
|
||||
PYTHON_REQ_USE="ncurses,readline"
|
||||
|
||||
PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
|
||||
|
||||
FIRMWARE_ABI_VERSION="4.0.0-r50"
|
||||
|
||||
inherit eutils linux-info toolchain-funcs multilib python-r1 \
|
||||
udev fcaps readme.gentoo-r1 pax-utils l10n xdg-utils
|
||||
|
||||
if [[ ${PV} = *9999* ]]; then
|
||||
EGIT_REPO_URI="https://git.qemu.org/git/qemu.git"
|
||||
EGIT_SUBMODULES=(
|
||||
slirp
|
||||
tests/fp/berkeley-{test,soft}float-3
|
||||
ui/keycodemapdb
|
||||
)
|
||||
inherit git-r3
|
||||
SRC_URI=""
|
||||
else
|
||||
SRC_URI="https://download.qemu.org/${P}.tar.xz"
|
||||
KEYWORDS="~amd64 ~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 glusterfs gnutls gtk infiniband iscsi io-uring
|
||||
jemalloc +jpeg kernel_linux
|
||||
kernel_FreeBSD lzo ncurses nfs nls numa opengl +oss +pin-upstream-blobs
|
||||
plugins +png pulseaudio python rbd sasl +seccomp sdl sdl-image selinux
|
||||
smartcard snappy spice ssh static static-user systemtap tci test usb
|
||||
usbredir vde +vhost-net vhost-user-fs virgl virtfs +vnc vte xattr xen
|
||||
xfs +xkb 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}
|
||||
lm32 moxie rx tricore unicore32"
|
||||
IUSE_USER_TARGETS="${COMMON_TARGETS}
|
||||
aarch64_be armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus
|
||||
tilegx"
|
||||
|
||||
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 )
|
||||
static? ( static-user !alsa !gtk !opengl !pulseaudio !plugins !rbd !snappy )
|
||||
static-user? ( !plugins )
|
||||
virtfs? ( xattr )
|
||||
vte? ( gtk )
|
||||
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(+)]
|
||||
xkb? ( x11-libs/libxkbcommon[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(+)] )
|
||||
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(+)] )
|
||||
jemalloc? ( dev-libs/jemalloc )
|
||||
jpeg? ( virtual/jpeg:0=[static-libs(+)] )
|
||||
lzo? ( dev-libs/lzo:2[static-libs(+)] )
|
||||
ncurses? (
|
||||
sys-libs/ncurses:0=[unicode]
|
||||
sys-libs/ncurses:0=[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(+)] )
|
||||
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(+)] )
|
||||
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(+)] )
|
||||
"
|
||||
|
||||
X86_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/edk2-ovmf-201905[binary]
|
||||
~sys-firmware/ipxe-1.0.0_p20190728[binary]
|
||||
~sys-firmware/seabios-1.12.0[binary,seavgabios]
|
||||
~sys-firmware/sgabios-0.1_pre8[binary]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
sys-firmware/edk2-ovmf
|
||||
sys-firmware/ipxe
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
sys-firmware/sgabios
|
||||
)"
|
||||
PPC64_FIRMWARE_DEPEND="
|
||||
pin-upstream-blobs? (
|
||||
~sys-firmware/seabios-1.12.0[binary,seavgabios]
|
||||
)
|
||||
!pin-upstream-blobs? (
|
||||
>=sys-firmware/seabios-1.10.2[seavgabios]
|
||||
)
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
$(python_gen_impl_dep)
|
||||
dev-lang/perl
|
||||
sys-apps/texinfo
|
||||
virtual/pkgconfig
|
||||
doc? ( dev-python/sphinx )
|
||||
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_ppc64? ( ${PPC64_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}-4.0.0-mkdir_systemtap.patch #684902
|
||||
"${FILESDIR}"/${PN}-4.2.0-cflags.patch
|
||||
"${FILESDIR}"/${PN}-5.0.0-epoll-strace.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/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 requres 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}"/default-configs >/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
|
||||
}
|
||||
|
||||
handle_locales() {
|
||||
# Make sure locale list is kept up-to-date.
|
||||
local detected sorted
|
||||
detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
|
||||
sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
|
||||
if [[ ${sorted} != "${detected}" ]] ; then
|
||||
eerror "The ebuild needs to be kept in sync."
|
||||
eerror "PLOCALES: ${sorted}"
|
||||
eerror " po/*.po: ${detected}"
|
||||
die "sync PLOCALES"
|
||||
fi
|
||||
|
||||
# Deal with selective install of locales.
|
||||
if use nls ; then
|
||||
# Delete locales the user does not want. #577814
|
||||
rm_loc() { rm po/$1.po || die; }
|
||||
l10n_for_each_disabled_locale_do rm_loc
|
||||
else
|
||||
# Cheap hack to disable gettext .mo generation.
|
||||
rm -f po/*.po
|
||||
fi
|
||||
}
|
||||
|
||||
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 LD NM OBJCOPY PKG_CONFIG RANLIB
|
||||
export WINDRES=${CHOST}-windres
|
||||
|
||||
# Verbose builds
|
||||
MAKEOPTS+=" V=1"
|
||||
|
||||
# Run after we've applied all patches.
|
||||
handle_locales
|
||||
|
||||
# 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
|
||||
--with-confsuffix=/qemu
|
||||
--localstatedir=/var
|
||||
--disable-bsd-user
|
||||
--disable-guest-agent
|
||||
--disable-strip
|
||||
--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 plugins)
|
||||
$(use_enable tci tcg-interpreter)
|
||||
$(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
|
||||
}
|
||||
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 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 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_notuser sdl-image)
|
||||
$(conf_notuser seccomp)
|
||||
$(conf_notuser smartcard)
|
||||
$(conf_notuser snappy)
|
||||
$(conf_notuser spice)
|
||||
$(conf_notuser ssh libssh)
|
||||
$(conf_notuser usb libusb)
|
||||
$(conf_notuser usbredir usb-redir)
|
||||
$(conf_notuser vde)
|
||||
$(conf_notuser vhost-net)
|
||||
$(conf_notuser vhost-user-fs)
|
||||
$(conf_notuser virgl virglrenderer)
|
||||
$(conf_notuser virtfs)
|
||||
$(conf_notuser vnc)
|
||||
$(conf_notuser vte)
|
||||
$(conf_notuser xen)
|
||||
$(conf_notuser xen xen-pci-passthrough)
|
||||
$(conf_notuser xfs xfsctl)
|
||||
$(conf_notuser xkb 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 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
|
||||
|
||||
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-r1 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 Changelog 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"
|
||||
# PPC64 loads vgabios-stdvga
|
||||
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || 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
|
||||
}
|
@ -1,10 +1,8 @@
|
||||
AUX xen-4.11-efi.patch 1971 BLAKE2B b24f9315cff7f2de2a945088363429b9f4dd7a4101d3f1c0d4bf9733189808f5e1c47f1d90d1784f17fa52ca1626972c81d20c5e1ee3d42d082cdefcf67eb8dc SHA512 17208dc107f4ae4c5ec226c2ac05126817134fb6084cd8923204dc1b014e645e12c34cd11296319127e595ccbf17747931e9df78218bf49814f66e3cc6a789fd
|
||||
DIST xen-4.12.2-upstream-patches-1.tar.xz 17016 BLAKE2B 5bd27f6187c13b1c4792aa81c0ca8cde0d687566e0fde322e7cb249e1c8665fca0def5a137493a04598b617c46f052cf69701257ea1b97823fd1534d94cabd8f SHA512 dab5e7a3ac1a82faff3069f07945dc0b9651f90e8e87b3c342bb98a06ac244d212dc0baf8c7f1997f285b06baca9dc57d4823bfb220ca34274bd3d6d31421b02
|
||||
DIST xen-4.12.2-upstream-patches-2.tar.xz 34484 BLAKE2B 79799a2fa9e638adf80ff1b5a1609b28747dad254da2e8ebd94afd75d5b7c061d25d507e7d388af17905347e180537dec8d0e27bd18cf6c53f51f7272d4adafe SHA512 abf9d82fe20fc9411384283876cf020a31e6c22ab2e54a7fae0d95ade02f434e4afb08d47c3ed5e4bc7ea5f518df7dc57baef2b8e76e3439bd937e2ee3c2b658
|
||||
DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
|
||||
DIST xen-4.13.0-upstream-patches-2.tar.xz 55980 BLAKE2B b85512456cac253d7f4dd0dca120d694cde0b0f4d0270023bca337f9bc693eb768c1a43d74d412c38dc665ee50a70d2985e5bfc6edde3eacc4376d2f6d7877c8 SHA512 fb852be98209e135a11241dd15e9bd174a5a3724bfaea1fc3b12ba964b8fc275946b1c443c70a78212dff0bc9b25015a00d9f902183c135053e27957b55b6bb6
|
||||
DIST xen-4.13.0.tar.gz 39005191 BLAKE2B cd85bfe549e20447afb8ec6b2ab33ea1893f45392c08737730d7898706748ebb96b2e842b2ff3e4af8c5d8a705e6d25a2bfb8acf0d7cc771805d0cc97757a949 SHA512 5b2ded9a2fe3f7ddf40eed1fa9858baead06233a01eb6099cc45b3c78b6c3823acfe7b731910733e87125dfa49d08c53f74c215fb1b320a92b44b87a0a105225
|
||||
EBUILD xen-4.12.2-r1.ebuild 4438 BLAKE2B 5ce21712847014902bd61b988be35433d66d0d24f037a0898b4bb4ac8415edf1f045e4186fdd2fc728f2897ec6b7ecfd5912b37d1310c43c7a5bfcef7fe29538 SHA512 a66e3803812a90325a29b45cc0faca670bcbcd0882975f9dac5353320d8a5c327268d688af6cb1a7bad2960c02a003eef69bb2c27e580b0b5b0f671ba76e9e65
|
||||
EBUILD xen-4.12.2-r2.ebuild 4438 BLAKE2B f7c59b7e260b7a2fab93501ac0213769c9835bf8e5068a7376b7c473c87a03f927b40948cc74d55a913b45283f1b03dc4373e4c5e884c1168e7767f51fa289fc SHA512 7fdd14a30c867e9a312d9d7e65f7ae85780a4f56d26ca3daae5919f90358d22057940385920daaba4b2f94955e915fff40fbc410213d542263df8369b8e504dc
|
||||
EBUILD xen-4.13.0-r3.ebuild 4439 BLAKE2B c6c5d13844b559e630643e8b4ee18d450e4d57c8c919eae5354070d74d52aa62596584eed5ecd67f6d5ccd8994a810f150b14bd155e3c0de9121d0cb49d8ec97 SHA512 f360730e1a31b6dd51a43d1cb0d7623397bb96e9c8dec3eb298d6c3aba8798d0793f99c1ef175720b8cdddda6d41dad4d5c08f258c52525995f7599ab4463f45
|
||||
EBUILD xen-4.13.0-r3.ebuild 4445 BLAKE2B 79a5fc63f6b98420dc7be0fa370685bb700e735ba5427e4f064be80b0396dc7543e86445ceec3673a4d125fc3a9b4b3d31e43adfdff0f092364f24ac3a3ccc17 SHA512 9e7754a710578a7976097dac1c0f1978b96b44d70640607e2e94fdefa9c226e0d4df7635ad412a55dd7b7b6c5f6c9161b9977a803197a27ddf2b73f1c4b67375
|
||||
MISC metadata.xml 645 BLAKE2B ad902c521cc93a54b16faaea212f23c7bdf83a9efe19606eca7bf00b49104386dbc095ff30c4287bb79d5fcd073b77e7c1bbf929ee7b025039a50f8238572f17 SHA512 313d501abeb906c360d7965e35a18d9851e38af73a72a95351517c60a1a39553555a0a250f0bee5bfc8f6496312d6e9c70874be267c14edab45cb4841e34c248
|
||||
|
@ -1,165 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
|
||||
|
||||
MY_PV=${PV/_/-}
|
||||
MY_P=${PN}-${MY_PV}
|
||||
|
||||
if [[ $PV == *9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
|
||||
SRC_URI=""
|
||||
else
|
||||
KEYWORDS="amd64 ~arm -x86"
|
||||
UPSTREAM_VER=1
|
||||
SECURITY_VER=
|
||||
GENTOO_VER=
|
||||
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
|
||||
https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
[[ -n ${SECURITY_VER} ]] && \
|
||||
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
|
||||
[[ -n ${GENTOO_VER} ]] && \
|
||||
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
|
||||
SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
|
||||
${UPSTREAM_PATCHSET_URI}
|
||||
${SECURITY_PATCHSET_URI}
|
||||
${GENTOO_PATCHSET_URI}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="The Xen virtual machine monitor"
|
||||
HOMEPAGE="https://www.xenproject.org"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="debug efi flask"
|
||||
|
||||
DEPEND="${PYTHON_DEPS}
|
||||
efi? ( >=sys-devel/binutils-2.22[multitarget] )
|
||||
!efi? ( >=sys-devel/binutils-2.22 )"
|
||||
RDEPEND=""
|
||||
PDEPEND="~app-emulation/xen-tools-${PV}"
|
||||
|
||||
# no tests are available for the hypervisor
|
||||
# prevent the silliness of /usr/lib/debug/usr/lib/debug files
|
||||
# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
|
||||
RESTRICT="test splitdebug strip"
|
||||
|
||||
# Approved by QA team in bug #144032
|
||||
QA_WX_LOAD="boot/xen-syms-${PV}"
|
||||
|
||||
REQUIRED_USE="arm? ( debug )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
if [[ -z ${XEN_TARGET_ARCH} ]]; then
|
||||
if use amd64; then
|
||||
export XEN_TARGET_ARCH="x86_64"
|
||||
elif use arm; then
|
||||
export XEN_TARGET_ARCH="arm32"
|
||||
elif use arm64; then
|
||||
export XEN_TARGET_ARCH="arm64"
|
||||
else
|
||||
die "Unsupported architecture!"
|
||||
fi
|
||||
fi
|
||||
|
||||
if use flask ; then
|
||||
export "XSM_ENABLE=y"
|
||||
export "FLASK_ENABLE=y"
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
[[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
|
||||
|
||||
# Security patchset
|
||||
if [[ -n ${SECURITY_VER} ]]; then
|
||||
einfo "Try to apply Xen Security patch set"
|
||||
# apply main xen patches
|
||||
# Two parallel systems, both work side by side
|
||||
# Over time they may concdense into one. This will suffice for now
|
||||
source "${WORKDIR}"/patches-security/${PV}.conf
|
||||
|
||||
local i
|
||||
for i in ${XEN_SECURITY_MAIN}; do
|
||||
eapply "${WORKDIR}"/patches-security/xen/$i
|
||||
done
|
||||
fi
|
||||
|
||||
# Gentoo's patchset
|
||||
[[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
|
||||
|
||||
eapply "${FILESDIR}"/${PN}-4.11-efi.patch
|
||||
|
||||
# Drop .config
|
||||
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
|
||||
|
||||
if use efi; then
|
||||
export EFI_VENDOR="gentoo"
|
||||
export EFI_MOUNTPOINT="/boot"
|
||||
fi
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
|
||||
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
# remove flags
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
unset ASFLAGS
|
||||
|
||||
tc-ld-disable-gold # Bug 700374
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Send raw LDFLAGS so that --as-needed works
|
||||
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
|
||||
# The 'make install' doesn't 'mkdir -p' the subdirs
|
||||
if use efi; then
|
||||
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
fi
|
||||
|
||||
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
|
||||
|
||||
# make install likes to throw in some extra EFI bits if it built
|
||||
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide:"
|
||||
elog " https://wiki.gentoo.org/wiki/Xen"
|
||||
|
||||
use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
|
||||
|
||||
elog "You can optionally block the installation of /boot/xen-syms by an entry"
|
||||
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
|
||||
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
|
||||
|
||||
ewarn
|
||||
ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
|
||||
ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
|
||||
ewarn "to work fine."
|
||||
ewarn
|
||||
ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
|
||||
ewarn
|
||||
ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
|
||||
}
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST tomoe-gtk-0.6.0.tar.gz 448058 BLAKE2B 06db81c971bf06ae1b625afb90950e7a76ad2acfb6abf038ce0c6114c4f7bc42a76a7f07dc848cfa5e6aef3039e6bab32b0d7496fea1fb67bf936b5f9631a130 SHA512 caa9b79edde7885e00d939cb3de30b32da0c1c8a7d803e26c756ee0695f7e15bee241036b1125f838e72e016f4bee9736a398108fff0eed20f1fdb86d221dc43
|
||||
EBUILD tomoe-gtk-0.6.0-r5.ebuild 991 BLAKE2B 62f4ae57bf4142032e454826210511592c6ac838730190668b5a12436108d10515d576dc5b29115b89696f7bf446c4c7f53626fa6d96ae386248b6c29f5dc89e SHA512 6e0b1763d13cbcf01fda05dc0feb4a75b181ba1a63043fc66e6222982fe235b9c321afa360a0036e303e434881d87aa6a77431159693a6a716b3072efec5be47
|
||||
EBUILD tomoe-gtk-0.6.0-r6.ebuild 598 BLAKE2B 9c42e9bc2f8ecaa3dfade024ef12090f37905fa2d796aa7168620996b1e20b6bc1ab10da0e2b4b5793d8b0c247624ed08faa4c0e304777e1c70a9c72a31403fa SHA512 0e47634b15a80ed9b5ce49fc8f62e434f805aeda61e04c679a6d6a458aa58aa87b83543f537460ca8ea28d4cba9fdffe2a6b86ba0f5f15a31b4199ec5fd29932
|
||||
MISC metadata.xml 374 BLAKE2B 39965153f406f0dab239af88b4da0823befba31b026a262e1dd42373514fdd91b21cf582c3a00184459f62253f5fed7828bae911d82c3ba31331bb7f6d6abc6e SHA512 8b35eb486271612ca74076681fc7c84a27ec5bf49b8523996d14f7cb26d22952569497656378d07ca03ec7f9e05a30e851b9220f905fcc2265d4a4568badf15e
|
||||
|
@ -1,47 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit ltprune python-single-r1
|
||||
|
||||
DESCRIPTION="Tomoe GTK+ interface widget library"
|
||||
HOMEPAGE="http://tomoe.osdn.jp/"
|
||||
SRC_URI="mirror://sourceforge/tomoe/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="python static-libs"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="app-i18n/tomoe[python(+)?,${PYTHON_SINGLE_USEDEP}]
|
||||
x11-libs/gtk+:2
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pygobject:2[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/pygtk:2[${PYTHON_MULTI_USEDEP}]
|
||||
')
|
||||
)"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/gtk-doc-am
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable static-libs static) \
|
||||
$(use_with python python "") \
|
||||
--without-gucharmap
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
prune_libtool_files --modules
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="Tomoe GTK+ interface widget library"
|
||||
HOMEPAGE="http://tomoe.osdn.jp/"
|
||||
SRC_URI="mirror://sourceforge/tomoe/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="app-i18n/tomoe
|
||||
x11-libs/gtk+:2"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/gtk-doc-am
|
||||
sys-devel/gettext
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--disable-static \
|
||||
--without-python \
|
||||
--without-gucharmap
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name '*.la' -type f -delete || die
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
DIST transifex-client-0.12.4.tar.gz 179349 BLAKE2B 4287bf32a31a5319f54ae5f141f53fa00554c542d7f0f1000e985547f01029b05dc18f38ef992d37c08c6c0ab54d934a4ab37c37f0bfee299d824224316acbad SHA512 516531a0c5a7242da27e8b34a0513b24b806d3b3a271cfe29b31ef7969472f82a37e6fbb1d6198feb1c5bd99d7503bacf3f162808504415ea46670af3fe2369e
|
||||
DIST transifex-client-0.13.9.tar.gz 197283 BLAKE2B 9fd6f63a54d09f190f7dd6701e4994e4fd67e23cf630dcb49641a3c7356e55f1146be7c2a590fb09a52cccfa99e709c48fffd7df416d1d4c10231c4f42919380 SHA512 3dc4a1e713a797ce1ea626c9e85dd353fec3034ba21ab04bc89e5b927e0298b4f6560a793eec50d1a99c7ab340462c33d18c1e159697c476001be868cb7f87fa
|
||||
EBUILD transifex-client-0.12.4.ebuild 638 BLAKE2B 0b53b4af9264e9b5bfe96cbfe08da48a16ecce00fc06779c2cf54c622efddb4096fbe414fc9d45c74c51f058f9795ea765c29b371768041ddb2435d592786b46 SHA512 1273f8da1fb49837fe52447fca6010b9054239b0d9599ae5ba0d9ffde40f9bf9d993a6c31e849450a46d6d1f1641589c1350cb0117bc40a96faa3a7325ae7f20
|
||||
EBUILD transifex-client-0.13.9.ebuild 752 BLAKE2B dc7f82627952cc2c41d72a41f845797027967defe130907fbbbde85048d50efe08c5a56e8c7a9837f628a9a1560d2fb77d54880b36d21186ca6a361b3919431e SHA512 4601968457c93840f7c99f5ff4bc7c897a08c32b743cb9e5b4b8fffd5f4bfde98c1642f487dd8ba400deb6380b1df6c1ec3d7b6371b51f912143d036e9ac332b
|
||||
EBUILD transifex-client-0.13.9.ebuild 754 BLAKE2B 1f652fa20e4405c2c9753b632f0851122c784c90750ee29dba30fd5c44a7ec1c4d3a1969a29fa078fd5bcdec190cfa7ef3799f992a7ac0d6ba20cdd53f2adea3 SHA512 1714c5f8fcab799edbaa66c237bd0d6c5bb26d23aa5cea61d2c62c82e48a4dd3dd5fbf2f36962f931d97354f9e4209c70926816d3fe8ac5a68b1936f550a3ff8
|
||||
MISC metadata.xml 511 BLAKE2B cb47fd7af2c99fe027060cd09a0ed4943faf219f1a9117be347e317c651d68f4a8d6967a51d899f6e125110138cfd47242b8818ef0bdf51f8b08d3989680ed79 SHA512 e1ff78568bc8bc8c80a48ffe569deb6fe36f431443ef10903a3fe03ea3f2b1452e0c145388c7225d0dfcac126b692276b27e8973a8875788234924a1d2cd8c31
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
DIST chkcrontab-1.7.tar.gz 25088 BLAKE2B 5e3cffcbcd064cfe8e9898dc74c215b14bdd69a4c110a91b73777cb024dd6dfe8d10ce862e82752baad65a8daf88dc45bee06f8e736393e0f973ee2f79f7bd96 SHA512 5236b1996a8d4f5d3861bf3d8a1bafafa271237965721ea4ff61e6712ee4546b9d0484483a0dac25f9d920904f899f2930b46df16d656083b422d95a1d6de0c0
|
||||
EBUILD chkcrontab-1.7.ebuild 549 BLAKE2B 3fa11230a4d6740edfaffe232d8edf9fee9dd8d0283f8242b339cca4d30693343de783c1f0691b81d0a2d69f806e914a54b9885a52389d27637e6d90f34f55a1 SHA512 114588aa593d60fb89a9440b714af7175c17872445ba0faf79f3c3f91b703c65eb8e9ec8c5f267d99247251db50323d1d37a78b7bb73d62183ca4212e63163f7
|
||||
EBUILD chkcrontab-1.7.ebuild 555 BLAKE2B fc96c290f6866ddd18ed02eae4c80b2e6e013c17b108b56e2aa1e0540b53c801df48a7425e6c4f46751e8334d71ceb0b469c551abb997e829f2226b18ba02d0c SHA512 de95af7a7820a7b0af60b04820f6ccbde2dafbfa6c1fe2a089d3c8f657992d4179caf4c49f6e79be1ce930d829f64a5959910fa7da4b50a29347edbcf781ef0c
|
||||
MISC metadata.xml 463 BLAKE2B 82e0b38cdc6aeb0cb304f3448f326c129e5b936ff559e07e5ced9b1b72e840cc4f1573571eae46cc56639f6920e717e7d3f67eef6cf8aac5e9a11f5948ac70ca SHA512 d181e1a0b06519224d4e6b13b7157bd9741000c676e7f47c72dd27eb475d991a32480393bd62a599fb0a833908bae96b810fbdb17723723067edc6af3b3ab0ca
|
||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
AUX dia-0.97.0-gnome-doc.patch 1961 BLAKE2B 6b6835a487e4b1ada0a1e67cb3ce123b0b4b3e67c86e9478ac0f401ae70f8f1381ef068a2ca6e116313db42d09bdb7abb523bf9a34856a1a39f7e4b0c9c3a84f SHA512 5200051f19d4a199f8c4e17e5f23c16ad4c13a9531b843be0a4d491aa8884efd4d90e6850c1cd1488e80b344ff18e5dc2b2ad7e57cb7417b6c574ad1e8d6f186
|
||||
AUX dia-0.97.2-underlinking.patch 1024 BLAKE2B 32fa473b806e740fb7c2b0e04c170c746bf523088e85dce281d0c87ef10c1542f1d77414dd49e6ce48b1e54c2e3e48d09c1820a8739bce6bb64539ba87b2485e SHA512 d45eb49c39227e9f11ce999083de0a83c60bfac2a5db2403e4bf083c275efdef6bd1adca678712253ec53f7b3d22a5c23f6f886839c32e6cb07a93c001f45e2e
|
||||
AUX dia-0.97.2-underlinking.patch 969 BLAKE2B 00c56ce70b89e2e78c565ac106633e00601f917c9964f36812f3eddb3031df26c3446591e043b90da6890a0623c99bdf5d0bbd34b468d54bcdfeee8b6ae13bf2 SHA512 556bfd779c6487b20fdca5cd4b6de3d4855db87d68db17549a802719024130cad55a249f9db5329960622a0857b1b3ec009f7a8fd173c27bb5ed1953af9a4ee0
|
||||
AUX dia-0.97.3-freetype_pkgconfig.patch 2574 BLAKE2B 870617b939e4ab7ecdfbf5bba4e78cee9f34ee10b1de2bb85380cc96d31c319132861b8ddd0e89a5a03cae2578588c9483ba62f0bf4006096c4074beef77cc4f SHA512 0e937bb17cb69d3f266f68658b11b209a913300d2366adfa4bb608212cd82f00d85272be784f0442d0dcba8659d020e5e848d2e02ee7310ec8cfd6c7170aa8b7
|
||||
DIST dia-0.97.3.tar.xz 5548500 BLAKE2B ab476ce48e57c1def01095a8d6d92208c11817580cfca1cfcf38af12943153116b31149ca187c65e5121ef9fb281bacc4c3e7f1726ed23b46ba14902faaaa34f SHA512 34298980be930b87cb4a636344e4cb2a7e43eedc00b0969a5e446cee9b74b616fdc8c798efcb9a5832b98741f2e20632a44037b2bcb436f59591d531ef441efa
|
||||
EBUILD dia-0.97.3.ebuild 2885 BLAKE2B ce2c5294ea1582a4fc3303338e90c05218227495c8e3ccea88b43a820a2acf4fc76fdaf43da0091ae00e53d367684a4f3328cea67fc7ffabf8032a1613a4b6a3 SHA512 ed840356e405e6d55fcb756e94deb5b50336adfd7e6475cabe9509b13af6374c90f1555552a4c272e887623443d3ed3b4ad0190052cea9e8f9ae0159ba82ec80
|
||||
EBUILD dia-0.97.3-r1.ebuild 2576 BLAKE2B fc8caf30e5e07e4f5fe68ba5b108d212daeec6bece8ea2ec9a0ca1b1f9d20b47e944b68dc3556e67703f9e1f960476130f4a085e40a721603038f3db82157188 SHA512 aa0ffadf4a0d0e60c71d340cdf9c7846ed968dc851a9ac7db008bae1967763be80daac42566c96cb44fc9ecd820fc2fac8467b37b9b5dba55ca308874b8ca1ec
|
||||
MISC metadata.xml 668 BLAKE2B 8efd2b23ae5c96f9c65cae27602a4e8a969d279b2400c0e5940541d2d9066ce0f5dcbb39e9a5dabf6ce8391f57d1b527a89bb7a015153922b378d40c121342c6 SHA512 2296acdf1f56496eb699d6acfc85ec64e1c514dc01184df367c77b505f8765d45b51d7753e1d6bcb5cb80cb239f6a05b0fcda9ddc412f7d72ed4a4a4733ea6ed
|
||||
|
Binary file not shown.
@ -1,4 +1,6 @@
|
||||
DIST nattka-0.2.2.tar.gz 85213 BLAKE2B f940287f3d781d60c1d32cd4ac913e3a290e4438ab45b786cd715a4f61e48eb066a3380c5343f1cde12cc003d16bd25ae94dfb9129f0fd414add90c8ec016c5f SHA512 c83c8138843a52487f45a5d1c78839bfb40d918c9cff0feced9a6e43cb5760a21ac0faef342ee3d9ba0c58f22ac1be51fd764770d3ab7a148da92c565b964c89
|
||||
DIST nattka-0.2.3.tar.gz 87275 BLAKE2B 6ad8ddd6d629326a9f71427fe1a0efae2418bc5b1df2c1e24d79acb19ce7a909b8536747f4214444fea3721e5169e476471a1cc76844f4a0620ff10582f66ccb SHA512 d9122eb002136754d3307867069032f5b3ffbde9ab1e1bafac5678e6e4527ae285a5fd2c88b8f8d0c3af7282e324710dd2627e1c893fed2bd6d086fecd6d1c05
|
||||
EBUILD nattka-0.2.2.ebuild 962 BLAKE2B e203fe87ed20d5caf9990733046bc329962708fb1efc06a37d7fbd2ccda74e3deee910715befafc831d04c730821b8e28abcfa0eff9d486fd7aa808e3deaa200 SHA512 a207ebbea79b849d97c653c547b360d9eeac431596f8eed60d3b6b1b11ff7b1f2c2775433e3ccdb126fb3b96a8d139c7932b094c1d4eddfe8604db0526b42e9b
|
||||
EBUILD nattka-0.2.3.ebuild 962 BLAKE2B e203fe87ed20d5caf9990733046bc329962708fb1efc06a37d7fbd2ccda74e3deee910715befafc831d04c730821b8e28abcfa0eff9d486fd7aa808e3deaa200 SHA512 a207ebbea79b849d97c653c547b360d9eeac431596f8eed60d3b6b1b11ff7b1f2c2775433e3ccdb126fb3b96a8d139c7932b094c1d4eddfe8604db0526b42e9b
|
||||
EBUILD nattka-9999.ebuild 901 BLAKE2B ab2eeec84d3d42bf4ff13b9331fd281057e901b618e97003d54e8d6d615c08cd11af73ef3b68da7e59b84e391bf99dadc4edfafbe2610fe159983cb1faf01c28 SHA512 c472b49493336aee8a9efee0b8857bac0c66b1a4fe56e337b456575979d9158024d770f97eaa2c0fa6f392d3b6e6fd782f5529cbb0841ad40f5567c75293f072
|
||||
MISC metadata.xml 247 BLAKE2B 1750cec57189e711ca5eba89a78e1d317f0839fa53564fbd39b4e955c28d98f4ae04caf9069afc20a18536cdc92b30fe7b15eb086767c742bad07d9980cfd24b SHA512 d6e2ea8a9d74791bcbf3d6311a66bafc20b8f4db3a576d9a8d54b86d7afb231122b8d87f71f3f46360980adf8d815c633b6d5041f9a30fc8656e8fb66057a282
|
||||
|
@ -0,0 +1,38 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
DISTUTILS_USE_SETUPTOOLS=rdepend
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A New Arch Tester Toolkit -- open-source stable-bot replacement"
|
||||
HOMEPAGE="https://github.com/mgorny/nattka/"
|
||||
SRC_URI="https://github.com/mgorny/nattka/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/lxml[${PYTHON_USEDEP}]
|
||||
dev-python/requests[${PYTHON_USEDEP}]
|
||||
dev-util/pkgcheck[${PYTHON_USEDEP}]
|
||||
dev-vcs/git
|
||||
sys-apps/pkgcore[${PYTHON_USEDEP}]"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/freezegun[${PYTHON_USEDEP}]
|
||||
dev-python/vcrpy[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
distutils_enable_sphinx doc --no-autodoc
|
||||
distutils_enable_tests pytest
|
||||
|
||||
pkg_postinst() {
|
||||
elog "NATTkA can optionally use:"
|
||||
elog " dev-python/networkx"
|
||||
elog "to sort 'apply' output in dependency order."
|
||||
}
|
Binary file not shown.
@ -1,6 +1,8 @@
|
||||
DIST bashdb-4.4-1.0.0-missing-test-files.tar.xz 996 BLAKE2B 7ea67884cceda11559cf49355645cad2cfd485537643ad2fa05398518f498163596b6f591756bedd0e7b7e013fed3c6a031e245d15cd0cf316d42ef4f5c8b3e6 SHA512 e19d41569c2001ce026e4c5f80cc21c81651ff9980be059236c45e215162769ceda266eb46aa4199000e377c0bb53dec98fa1b7c5290459c412f21329b3589a5
|
||||
DIST bashdb-4.4-1.0.1.tar.bz2 701807 BLAKE2B 8d41a39831ce9466f5fcd205cf84e337ca7d876fddaea8b8c013fe4ac93a143c9f5b5e46bcc8edbb50fe4c77e87bd282ff9a244e41df007897d3b37f732bb0a3 SHA512 306fc5a49490fe04828cd6c64b23302e0f48ba8558780c93d45d9c615206e91dac5d8ff3d0660e50bc3204873131d1296492bccc23119d2f58c990bd3603221c
|
||||
DIST bashdb-5.0-1.1.0.tar.bz2 693459 BLAKE2B f8697c0f4a10b57215b0923cfb49c76536cc75de5273e6ed1709aaa56fcced8c5b3f281f15f01b8bd72363ad7c47acbd6d06a3bb3ba58b9a2daae017c101ae46 SHA512 0da69ea426c57d2f2b3f208356ee893b3fa8b96c68bf321446b5747b6bfb2eac502be6a01e3922fa873684a3953c6a3ded4a30f5682e4030680d698ee5062143
|
||||
DIST bashdb-5.0-1.1.2.tar.bz2 574210 BLAKE2B 6de1cac2cb66022f60ab7f0385361762fedee56c26729f22acb070e24a7bcf317700fb5db314c1592b8f9ccf9f7d07bfc80afd5fc88a753d0ad2954325a7f078 SHA512 32ff6d315e8cf9d59485802d5284fde53fa2d9f40ec238428a479f8a1ed1359e9bea2946b192b78534e7ac835491d5d64d73f536c8dfa93583b4c6d55d4d4545
|
||||
EBUILD bashdb-4.4.1.0.1.ebuild 1062 BLAKE2B 51762bb709b2c6234197db4c0ad466219a7896dea92c9de7b614f1eb3a53bfc4bcb2991312b9df902d41fc3f67abccb0064846913797260a3f4b863db46bd461 SHA512 ac35a5096a77039d581d037c4857847c7e6e8aa65d447f23fc2492a9d7bba06407cbe325d30afb3889ec8f4dc456e0d0bf9a8bcb365d46df28d9303873f3102e
|
||||
EBUILD bashdb-5.0.1.1.0.ebuild 1064 BLAKE2B ea70dfbce1cdc413e11d981152d64f77e15dfd720b1f1e27bbc8cfd81b3a1b2f40b715bc39f5f97d6b2611f4d680918bbfbb12a8e4787f60e645c62074ff6d4b SHA512 a0d9696201f4e6e0672faa1a6f0f65119220dcd43be49743e54dc43435ae6faa38fc72a68ffd4c422c2aded0af3627cd4f306e794974c5bf0994285bdeffd24f
|
||||
EBUILD bashdb-5.0.1.1.2.ebuild 1064 BLAKE2B 336ec27f1c579f106baa0d312f5d8456c53a893beafa8ddc5f42f16935bba7e874cb53853d453ed798e24d8d1128c26c102101abed5ff925c287c3213a093f64 SHA512 0cca1c72631b09c10063fc93eb84554dbc19c64cac35c8b7b49a65316cb6927c10cd8af8f094d2d440c802a3946b615b17e4eb193967dc298c3ca39cf28890bf
|
||||
MISC metadata.xml 333 BLAKE2B 3d15d5b1c4dc17fb6eb805020e6cacb0b835ec4113cccec2756d5b3ccd6be5ce427383598b136f9e13280452e1d9252a609671d3016fffd14ccd898fa7553ad8 SHA512 eb1b078a7e431900181f558710bba93fb5c4633733364664e85e07b4bd05c8ba7492948d4a3ac8cb4866f128b116d82b5b6f1c8b2966318fb9ed61a9c78dda82
|
||||
|
@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
MY_P="${PN}-${PV:0:3}-${PV:4}"
|
||||
DESCRIPTION="bash source code debugging"
|
||||
HOMEPAGE="http://bashdb.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/bashdb/${MY_P}.tar.bz2
|
||||
test? ( https://dev.gentoo.org/~whissi/dist/bashdb/bashdb-4.4-1.0.0-missing-test-files.tar.xz )"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="!>=app-shells/bash-${PV:0:1}.$((${PV:2:1}+1))"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_prepare() {
|
||||
if use test ; then
|
||||
einfo "Copying missing files ..."
|
||||
# https://sourceforge.net/p/bashdb/bugs/52/
|
||||
cp -vafn "${WORKDIR}"/missing-files/* "${S}"/test || die
|
||||
fi
|
||||
|
||||
default
|
||||
|
||||
# We don't install this, so don't bother building it. #468044
|
||||
sed -i 's:texi2html:true:' doc/Makefile.in || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# This path matches the bash sources. If we ever change bash,
|
||||
# we'll probably have to change this to match. #591994
|
||||
econf --with-dbg-main='$(PKGDATADIR)/bashdb-main.inc'
|
||||
}
|
Binary file not shown.
@ -1,6 +1,5 @@
|
||||
AUX gnome-doc-utils-0.20.10-fix-out-of-tree-build.patch 2101 BLAKE2B f1970ffe2cf1d369ffc3f3a5a6abea2f04fb32cfdc54dde9052ef468c2a274db2318495c80ec1ef0048fb65df8209bacb86392d9ff594fdc60ea92ebb85584ab SHA512 25cff56b05bf4ec0ca55a6fcab1700bd6bec9f60a923e14607fd894bd9b63cd669a4e3e9b7bacc0480e040e393370be05f237ea21074cb439a3cf176be0dd78c
|
||||
AUX gnome-doc-utils-0.20.10-python3.patch 21576 BLAKE2B 487b2f7d3758d1df475178154ed92ee548c63fd492d59fb0c6cc3a75e6378ebe75e74e3bdc60b46a74ea0670ca77f9bbad279b625bb64d4cb8a432a869eb426b SHA512 500e952f12c1baae08a0f520ea7e08c09d20ee58c3ed5fdc5f6dd1b7a192d90f66de26956306ab685ef62298df9770af184c0f33b7d4e015023ef2129da351bf
|
||||
DIST gnome-doc-utils-0.20.10.tar.xz 526700 BLAKE2B 6019aa9b1d2c8153ddc1e6af589f79628ceafb6c14b0de5dc8f9ef518b5e626bbafdc2a4d93bfb70c6823ba0605a5abe899989e9f893c976d7a5fcd9c99a90dc SHA512 1cb5e3b9ca9e45e6c551801e9c9c4aac725c2ce85238c230a4c70b36c90419886b921d8dd464df0643fc3bbb877df075abaa83a36d1609c5664960c31e11d151
|
||||
EBUILD gnome-doc-utils-0.20.10-r1.ebuild 1740 BLAKE2B 067357992e77226b3269f860641d691688e28901f45fb91b47df2d11fb73a8d45b007c06c988dc7405ce770bdad7079a33a8e38b8b59ad8763b97c7484b811b7 SHA512 a725be5f1511526be3274e653f6cd36ee3c430aaab0b0f787b0dda5157433a1a078749f39a570b9b7e89db2562bc1aca59e24f99c1f0768305afae57ddb59f5b
|
||||
EBUILD gnome-doc-utils-0.20.10-r2.ebuild 1842 BLAKE2B f8e9abceab1c2c83ef521ce3541c8081effd76d8d5427f9075c89d5724ace3d3109e0c10b05d5cd46c87ed649b4f8501e26bce72e66380faa13ee4f5965429d5 SHA512 28945672b9973a45d6a65a81fc8eb3122dee31b6760969ddf8ca593bf34ed10c77ca108f955ff0d38771b38479003fc09d01b5c27241e7db9be1c776644d2e2f
|
||||
EBUILD gnome-doc-utils-0.20.10-r2.ebuild 1841 BLAKE2B 76ca83ac619e2cfba39039f58e9a07b50a1aa2719677b702425f068974fa1ed65e9c02f15a83521a99a72c1bb16659f858e097baf10001ec80dac806a17ae956 SHA512 ce749e14a34553f7b42f17e0e4ff164c53c65db8cb2cdcec932e0a8f8e242cffa24ece15d72e357912ffdd3837b99567a725c02c63a116a36d4c4a32570f9142
|
||||
MISC metadata.xml 259 BLAKE2B 32f8c5208a55a1dda504b7df969127393a2c70e672aba383fcdc870de8fe778366d3dde3c3313bd043068d2e7831d1e18bad6fb428e82266fc2a630104e0a193 SHA512 fbef629394690b3a5608abc6344816f6acf1e8e2663f29949fd14a662c628f16fee77a1ec1641066806d143fb94c1571bc5b46b829dc53620af6956377fe15cc
|
||||
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
|
||||
inherit gnome2 multibuild python-r1
|
||||
|
||||
DESCRIPTION="A collection of documentation utilities for the Gnome project"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/GnomeDocUtils"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
|
||||
IUSE=""
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
>=dev-libs/libxml2-2.6.12:2[python,${PYTHON_USEDEP}]
|
||||
>=dev-libs/libxslt-1.1.8
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/docbook-xml-dtd:4.4
|
||||
app-text/scrollkeeper-dtd
|
||||
>=dev-util/intltool-0.35
|
||||
sys-devel/gettext
|
||||
virtual/awk
|
||||
virtual/pkgconfig
|
||||
"
|
||||
# dev-libs/glib needed for eautofoo, bug #255114.
|
||||
|
||||
# If there is a need to reintroduce eautomake or eautoreconf, make sure
|
||||
# to AT_M4DIR="tools m4", bug #224609 (m4 removes glib build time dep)
|
||||
|
||||
src_prepare() {
|
||||
# Stop build from relying on installed package
|
||||
eapply "${FILESDIR}"/${P}-fix-out-of-tree-build.patch
|
||||
|
||||
gnome2_src_prepare
|
||||
|
||||
# Leave shebang alone
|
||||
sed -e '/s+^#!.*python.*+#/d' \
|
||||
-i xml2po/xml2po/Makefile.{am,in} || die
|
||||
|
||||
python_prepare() {
|
||||
mkdir -p "${BUILD_DIR}"
|
||||
}
|
||||
python_foreach_impl python_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
ECONF_SOURCE="${S}" python_foreach_impl run_in_build_dir gnome2_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
MAKEOPTS="${MAKEOPTS} -j1" python_foreach_impl run_in_build_dir gnome2_src_compile #574282
|
||||
}
|
||||
|
||||
src_test() {
|
||||
python_foreach_impl run_in_build_dir default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
python_foreach_impl run_in_build_dir gnome2_src_install
|
||||
python_replicate_script "${ED}"/usr/bin/xml2po
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
DIST xiphos-4.0.6a-20170820.tar.gz 30584893 BLAKE2B a3b76543c8d1c0d03fcc2f567751df49230ef1d35019bec98ef726edb6a519424d0c773d4ff6f7eb3ad714f56af6dac19fc1ac2dc29560b03e3ec3ea9a46ccfd SHA512 a0577521c6b9033b74b3b0a0fd7a88222de00dc2e9db100d66e1bb60bc117173badd26c47d2e896ffa167c52a263c9bf9046d650a9b4ae497bec6164bfb0a29b
|
||||
DIST xiphos-4.1.0.tar.gz 30623199 BLAKE2B 3f4e804b346b5f3225458bf3653d033c95fb4cb8148b5e1c7d7ba875637877df1489d43b22e6d47ed1d477545d564da57d864f54e4a4e30c61e4b4c94b3f2066 SHA512 f2da65a0cf10cda5ca471a09d351be8e2e5601857b4cb363ba45865e4595bebbc9b8cfa47660a1106b1521b4059d341c7e8c04c0c712387b913bdf994d1c6400
|
||||
EBUILD xiphos-4.0.6a-r2.ebuild 2131 BLAKE2B bcdc3613b78e9a3470304850a2f08b0009023d5eb9a908d0da5ab67d7e5becadd1d36ae0a464156b5df90b03db8416819c03c6680c8c5b6a612d618c6ba65e38 SHA512 de1c4be35149ff30ed202b7eef9297ad3354a0ef25022956ceb1a15f42fc5ab82408496780fb85e590aea5d9ede765067a8860b875f5bfa066ac07c86d6c03aa
|
||||
EBUILD xiphos-4.1.0-r2.ebuild 2084 BLAKE2B 47aab3f5421ef3d4c9b4e62aabadb7bc62d35427f16f2e1b2f2744947672c2ec890c27f998628c57f911e41a5e62d932e581a16b9576a2d3e138fab50310acd3 SHA512 cd2655a7d8c0fc95813ca737d7dfbf26730327a23f4d04f24c719fe5b8b220b3d397f3dc201ec60c2b2dfd07ae2777626139644df455938a7a460df096207a86
|
||||
EBUILD xiphos-4.0.6a-r2.ebuild 2052 BLAKE2B f3f70ce614ebcf02b6111d1c04d6a9a644132e53cdd1c685db721ebb21fef1d9c2ff58c549e74d46ed6000446965a2c64eef991fbc7d33d1b040bd9f72a4dd19 SHA512 cff5d3d6b097e1ec7ee6b48db0bc06dcefc35e2b202384624d8b0c2426237839b676fc0eb84b927441dfe96727c576c78a4d7f26e121d8a198e35571d22181ff
|
||||
EBUILD xiphos-4.1.0-r2.ebuild 2005 BLAKE2B 5510d77d42d30c111a5b94b7126ceb36810d33cfe054df99c8be7e41b8354ff6f5cb06b3d91419ff6fe62ee847e2805ab4e852c81f4b851fa14399cef4f69812 SHA512 9b61fe086183c8710bdebe616ad6f6ea6b6b231e9c70eb8a9877efc66d8dab5110e5162925d0a5e7b13f9eb0b0e789aafdfa93ed23d568097ee9914074c90384
|
||||
MISC metadata.xml 300 BLAKE2B 84a7c7a8de67cb50a6c042a07d91b56067bec4e449c2a888d77f9c17ae23f5cf82f59d32237dd649af9b34bcd13df34f0fe19997ac57f7b468db4f50b281829c SHA512 0e8ea5d19ca48a68c4266c8cefb5c29d43d56c2ba61f271460ac35d5d8be18486c84ade898e2a8b647648afa24a19ee04ee60f2fca5a0fe358920deec2418340
|
||||
|
@ -1,141 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-utils desktop xdg
|
||||
|
||||
DESCRIPTION="The PDF viewer and tools"
|
||||
HOMEPAGE="https://www.xpdfreader.com"
|
||||
SRC_URI="https://xpdfreader-dl.s3.amazonaws.com/${P}.tar.gz
|
||||
i18n? (
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-arabic.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-chinese-simplified.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-chinese-traditional.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-cyrillic.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-greek.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-hebrew.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-japanese.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-korean.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-latin2.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-thai.tar.gz
|
||||
https://xpdfreader-dl.s3.amazonaws.com/xpdf-turkish.tar.gz
|
||||
)"
|
||||
|
||||
LICENSE="GPL-2 GPL-3 i18n? ( BSD )"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="cmyk cups i18n icons +libpaper metric opi png +textselect utils"
|
||||
|
||||
BDEPEND="
|
||||
icons? ( media-gfx/inkscape )
|
||||
"
|
||||
DEPEND="
|
||||
cups? (
|
||||
dev-qt/qtprintsupport:5
|
||||
net-print/cups
|
||||
)
|
||||
libpaper? ( app-text/libpaper )
|
||||
utils? ( png? ( media-libs/libpng:0 ) )
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtwidgets:5
|
||||
media-libs/freetype
|
||||
sys-libs/zlib
|
||||
"
|
||||
RDEPEND="${DEPEND}
|
||||
media-fonts/urw-fonts
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-automagic.patch
|
||||
"${FILESDIR}"/${PN}-visibility.patch
|
||||
"${FILESDIR}"/${PN}-shared-libs.patch
|
||||
"${FILESDIR}"/${PN}-CVE-2019-17064.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
"s|/usr/local/etc|${EPREFIX}/etc|;
|
||||
s|/usr/local|${EPREFIX}/usr|" \
|
||||
doc/sample-xpdfrc || die
|
||||
|
||||
if use i18n; then
|
||||
sed -i "s|/usr/local|${EPREFIX}/usr|" "${WORKDIR}"/*/add-to-xpdfrc || die
|
||||
fi
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DA4_PAPER=$(usex metric)
|
||||
-DNO_TEXT_SELECT=$(usex textselect off on)
|
||||
-DOPI_SUPPORT=$(usex opi)
|
||||
-DSPLASH_CMYK=$(usex cmyk)
|
||||
-DWITH_LIBPAPER=$(usex libpaper)
|
||||
-DWITH_LIBPNG=$(usex png)
|
||||
-DXPDFWIDGET_PRINTING=$(usex cups)
|
||||
-DSYSTEM_XPDFRC="${EPREFIX}/etc/xpdfrc"
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
|
||||
if use icons; then
|
||||
sizes="16 22 24 32 36 48 64 72 96 128 192 256 512"
|
||||
cd xpdf-qt
|
||||
mkdir $sizes
|
||||
local i
|
||||
for i in $sizes; do
|
||||
inkscape xpdf-icon.svg -w $i -h $i -e $i/xpdf.png
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake-utils_src_install
|
||||
|
||||
domenu "${FILESDIR}/xpdf.desktop"
|
||||
newicon -s scalable xpdf-qt/xpdf-icon.svg xpdf.svg
|
||||
if use icons; then
|
||||
local i
|
||||
for i in $sizes; do
|
||||
doicon -s $i xpdf-qt/$i/xpdf.png
|
||||
done
|
||||
unset sizes
|
||||
fi
|
||||
|
||||
insinto /etc
|
||||
newins doc/sample-xpdfrc xpdfrc
|
||||
|
||||
local d i
|
||||
if use utils; then
|
||||
for d in "bin" "share/man/man1"; do
|
||||
pushd "${ED}/usr/${d}" || die
|
||||
for i in pdf*; do
|
||||
mv "${i}" "x${i}" || die
|
||||
done
|
||||
popd || die
|
||||
done
|
||||
|
||||
einfo "PDF utilities were renamed from pdf* to xpdf* to avoid file collisions"
|
||||
einfo "with other packages"
|
||||
else
|
||||
rm -rf "${ED}"/usr/bin/pdf* \
|
||||
"${ED}"/usr/share/man/man1/pdf* \
|
||||
"${ED}"/usr/$(get_libdir) || die
|
||||
fi
|
||||
|
||||
if use i18n; then
|
||||
for i in arabic chinese-simplified chinese-traditional cyrillic greek \
|
||||
hebrew japanese korean latin2 thai turkish; do
|
||||
insinto "/usr/share/xpdf/${i}"
|
||||
doins -r $(find -O3 "${WORKDIR}/xpdf-${i}" -maxdepth 1 -mindepth 1 \
|
||||
! -name README ! -name add-to-xpdfrc || die)
|
||||
|
||||
cat "${WORKDIR}/xpdf-${i}/add-to-xpdfrc" >> "${ED}/etc/xpdfrc" || die
|
||||
done
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,11 +1,7 @@
|
||||
AUX gps-2018-gentoo.patch 2976 BLAKE2B dd72c2c4c8dc8f971b819eb76b4433dd78c587d79bd903e17be0fd879027638821edaa625a64f355b2355a37fa7472b9c1b1072e06fd24c9c5547369916f2bde SHA512 fbfb23f29de218ca1371e39aed70aa4ef22080a11aa8bcbd13ef3ea6b68f69db9a4c6f6f5c7c0cefa85ef6495685fb9811de2521b3085f2f25d9acce0ad14047
|
||||
AUX gps-2019-gentoo.patch 2976 BLAKE2B b79ead5d30030cb8e1bc1e67034cb6394a3898716b190b3c9850e2931a0cae22a6d39e23f3e996abee3c3a8b278631c299bf7e2d70e828a50e28af99024e3adb SHA512 bd7e30a3f11be4d6dabb01ebcfa199a400cd0ff7d590bc563a7cfd168710c20fefe08fc1617cfbf8abd4a5603f0a1b7cc42300ac270e040b159145e08ad04054
|
||||
DIST ada_language_server-2019-src.tar.gz 169018 BLAKE2B 3ed7412773887f6ebe58a8b08a6befa8be780d10c1abb3a38f524918fb60d7213699e2c7a2cd845d5dd154f9eccf8672ce8833e408dcdaa3621d173a0a8e5818 SHA512 dd25878719c5237c2f1e01097076758f25a350705a58c2988ff3e92179ceaf659981cdd0887df9916e4c1e2226419ebd526f14716da4d3fda0fcf454b9122d37
|
||||
DIST gps-gpl-2018-src.tar.gz 40541905 BLAKE2B abe38dd23d9afede27b4ec8294e3245c12d52d60491b6e7c1b2d120a6f1e5d808fdcfb648e72da31376e2de176f7a039c5493341ad295db33b6a1ce44bb64096 SHA512 da0eaa85eb753f215354c9765272d85378f36ebe207314bab9211642f9d9b505a3d05cdec9de6964ae9139c4f8942a29e06c72db32b2aeb053a694e9c982e470
|
||||
DIST gps-gpl-2019-src.tar.gz 13758956 BLAKE2B 71158537d9d970b97db06c1a5ed40cfec2f7c8523dbced763227463450b4fd469817abcd61339cde96a13bb2b721141339b15444e55bdc64cee7ed2458fd42ed SHA512 4420311303122fd365794830fb7a7868832b8211804d6e11773f598c307229b139993b3c81d91646f7b5aa9a7fba118895234c4ac89193d960dd3170a04e52a7
|
||||
DIST gtk+-3.14.15-src.tar.gz 32009863 BLAKE2B 93c6897c431fa8e1c19ea758378bc7e365d486d1decccefbba64876d8c51a488e6bcf932481daa11e7e43a960a328c3db746e41a845e574c6b6070ab71e23188 SHA512 add4607a1758319a938d2be0bbd0dd140c4099accffa9301e3049bc460bf94f395c5a092368214e8b28d53bc25335d1b8329b50c7eb80a1e9a65b2e154135b84
|
||||
DIST libadalang-tools-2019-20190517-195C4-src.tar.gz 625775 BLAKE2B 2ec69e307576c505d20a43d229b13404966f4442778e5390da327ae71cc065873de4fff03a720949fa6bfb5ce66f405e7d45f7f0c21032a639efcff208323aed SHA512 b7368606847244cbb08ff2111fabfbfc8a9aa7f58e953febc70838006d94711dba1fd75bfb69ed2081a37a2dfaaad46097127870696c882d7cc54de5d7b051a1
|
||||
DIST libadalang-tools-gpl-2018-src.tar.gz 19938182 BLAKE2B 34104f3bc43c165a9b74ba8c0c03ee2f34686bcd06b5ced730f70f654d8b808e129a85566e081830b4f20304c793eefe0af81b56984cf06190302ad2f6a419be SHA512 a1176575944cd88b9da5f4e9f03caa1a4d09358df71e6a91300d0b35c2a843d0ea1a77fbd93e7b7f16cef1b978022ee20991f5c2ff74f7d05878c3de1220f2b5
|
||||
EBUILD gps-2018-r3.ebuild 2840 BLAKE2B 7fc1ac79ada9aa38b00dd3a35522b2831633162b8af47cb8496038b7197aafc816eee2cd376cea1b3e3591a2ab2bdb353b5fd0127744c9605400a87ad4be8e6a SHA512 3ead8a7005ac456771da699fdb13c55ca135f44e9ba0202aef551de0784b918ed1904bf66c8fd6544d5ab4845f9bbedf4e511a2e8c93bf1a1400474d21007890
|
||||
EBUILD gps-2019-r1.ebuild 3189 BLAKE2B ea0b25f94474e0b97c9f91942c834052fa105e80d0d33fed9678e1b397112bcbfde7ae6f4ab98d2eeeadde8c5166c5f8269eb468656fbf06d533895eaede23d5 SHA512 4e68e5815300b096072a9b52f09c5557a553d5320e037feff14d6f57a0024d531e487dc48cbe4dbd00a5f2f655fd50020513f9ca5d7c0a88eeccbaa46e8a9a63
|
||||
MISC metadata.xml 406 BLAKE2B 663412f7328e2ed9ca4df57304073e48b2c18d43c84c6a5a4b8331f57f731bd63c38d7eb23b9edb4939e0644238a7883581e3ae50afb708cd263a9c39f936671 SHA512 7e13f81414da0346f385d66d88eca699dab64aeaf7d22a38ff05bec1ddc3fab5f98f7d2049902a75f63bfe10f918c599f15a1497cdb09799fec8330152251b46
|
||||
|
@ -1,77 +0,0 @@
|
||||
--- a/gps/Makefile 2018-07-09 20:27:34.950424490 +0200
|
||||
+++ b/gps/Makefile 2018-07-09 20:37:39.510558817 +0200
|
||||
@@ -47,7 +47,8 @@
|
||||
for f in ../kernel/generated/*; do cat $$f | tr -d '\015' > $$f-aux; mv -f $$f-aux $$f; done
|
||||
endif
|
||||
$(GPRBUILD) $(GPRBUILD_FLAGS) -m -p -ws \
|
||||
- $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 --libs`
|
||||
+ $(GPRBUILD_BUILD_TYPE_FLAGS) -Pgps -largs `pkg-config gmodule-2.0 --libs` -lpython2.7 \
|
||||
+ -cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS}
|
||||
|
||||
resources:
|
||||
ifeq ($(OS),Windows_NT)
|
||||
--- a/Makefile.in 2018-07-09 21:51:08.422550386 +0200
|
||||
+++ b/Makefile.in 2018-07-09 21:51:32.187225891 +0200
|
||||
@@ -10,7 +10,7 @@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
GNATCOLL_INSTALL = @GNATCOLL_INSTALL@
|
||||
-prefix = @prefix@
|
||||
+prefix = $(DESTDIR)@prefix@
|
||||
bindir = $(prefix)/bin
|
||||
sharedir = $(prefix)/share
|
||||
examplesdir = $(prefix)/share/examples/gps
|
||||
--- a/docs/Makefile.in 2018-07-09 21:53:33.074572729 +0200
|
||||
+++ b/docs/Makefile.in 2018-07-09 21:53:52.149311484 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-prefix = @prefix@
|
||||
+prefix = $(DESTDIR)@prefix@
|
||||
docdir = $(prefix)/share/doc/gps
|
||||
sharedir = $(prefix)/share/gps
|
||||
|
||||
--- a/share/support/core/toolchains.py 2018-07-11 12:15:18.758674244 +0200
|
||||
+++ b/share/support/core/toolchains.py 2018-07-11 12:20:20.389220849 +0200
|
||||
@@ -16,11 +16,11 @@
|
||||
nullified by using an empty value in the corresponding tag
|
||||
-->
|
||||
<toolchain_default>
|
||||
- <gnat_driver>gnat</gnat_driver>
|
||||
- <gnat_list>gnatls</gnat_list>
|
||||
+ <gnat_driver>@GNAT@</gnat_driver>
|
||||
+ <gnat_list>@GNATLS@</gnat_list>
|
||||
<debugger>gdb</debugger>
|
||||
<cpp_filt>c++filt</cpp_filt>
|
||||
- <compiler lang="ada">gnatmake</compiler>
|
||||
+ <compiler lang="ada">@GNATMAKE@</compiler>
|
||||
<compiler lang="c">gcc</compiler>
|
||||
<compiler lang="c++">g++</compiler>
|
||||
<compiler lang="asm">gcc</compiler>
|
||||
--- a/share/support/core/projects.py 2018-07-11 13:49:29.631289680 +0200
|
||||
+++ b/share/support/core/projects.py 2018-07-11 13:51:46.568252607 +0200
|
||||
@@ -146,7 +146,7 @@
|
||||
<string />
|
||||
</index>
|
||||
<specialized_index value="Ada">
|
||||
- <choice default="true" >gnatmake</choice>
|
||||
+ <choice default="true" >@GNATMAKE@</choice>
|
||||
</specialized_index>
|
||||
</project_attribute>
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
description="The gnatls command used to find where the Ada run time files are installed (including optional arguments, e.g. gnatls --RTS=sjlj)."
|
||||
hide_in="all"
|
||||
label="Gnatls">
|
||||
- <choice default="true" >gnatls</choice>
|
||||
+ <choice default="true" >@GNATLS@</choice>
|
||||
<string />
|
||||
</project_attribute>
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
description="The gnat driver used to run the various commands associated with the GNAT toolchain."
|
||||
hide_in="all"
|
||||
label="Gnat">
|
||||
- <choice default="true" >gnat</choice>
|
||||
+ <choice default="true" >@GNAT@</choice>
|
||||
<string />
|
||||
</project_attribute>
|
||||
|
@ -1,107 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
ADA_COMPAT=( gnat_2018 )
|
||||
inherit ada python-single-r1 autotools desktop llvm multilib
|
||||
|
||||
MYP=${PN}-gpl-${PV}-src
|
||||
|
||||
DESCRIPTION="The GNAT Programming Studio"
|
||||
HOMEPAGE="http://libre.adacore.com/tools/gps/"
|
||||
SRC_URI="http://mirrors.cdn.adacore.com/art/5b0cf627c7a4475261f97ceb
|
||||
-> ${MYP}.tar.gz
|
||||
http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a59 ->
|
||||
libadalang-tools-gpl-2018-src.tar.gz
|
||||
http://mirrors.cdn.adacore.com/art/5b0819dfc7a447df26c27a61 ->
|
||||
gtk+-3.14.15-src.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="${PYTHON_DEPS}
|
||||
dev-ada/gnatcoll-db[${ADA_USEDEP},db2ada,gnatinspect,xref]
|
||||
dev-ada/gnatcoll-bindings[${ADA_USEDEP},python]
|
||||
~dev-ada/gtkada-2018[${ADA_USEDEP}]
|
||||
~dev-ada/libadalang-2018[${ADA_USEDEP}]
|
||||
dev-libs/gobject-introspection
|
||||
dev-libs/libffi
|
||||
sys-devel/llvm:7
|
||||
sys-devel/clang:=
|
||||
x11-themes/adwaita-icon-theme
|
||||
x11-themes/hicolor-icon-theme
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/pep8[${PYTHON_MULTI_USEDEP}]
|
||||
dev-python/jedi[${PYTHON_MULTI_USEDEP}]
|
||||
')"
|
||||
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}
|
||||
${ADA_REQUIRED_USE}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}"/${MYP}
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
|
||||
|
||||
pkg_setup() {
|
||||
LLVM_MAX_SLOT=7
|
||||
llvm_pkg_setup
|
||||
python-single-r1_pkg_setup
|
||||
ada_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i \
|
||||
-e "s:@GNATMAKE@:${GNATMAKE}:g" \
|
||||
-e "s:@GNAT@:${GNAT}:g" \
|
||||
-e "s:@GNATLS@:${GNATLS}:g" \
|
||||
share/support/core/toolchains.py \
|
||||
share/support/core/projects.py \
|
||||
|| die
|
||||
mv "${WORKDIR}"/libadalang-tools-src laltools
|
||||
echo "#!/bin/bash" > gps.sh
|
||||
echo "export LD_LIBRARY_PATH=/usr/$(get_libdir)/gps" >> gps.sh
|
||||
echo 'exec /usr/bin/gps_exe "$@"' >> gps.sh
|
||||
cd ../gtk+-3.14.15-src
|
||||
sed -i \
|
||||
-e "/^libadd/s:=.*$:= \\\:" \
|
||||
-e "/^deps/s:=.*$:= \\\:" \
|
||||
../gtk+-3.14.15-src/gtk/Makefile.in
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--with-clang=$(llvm-config --libdir)
|
||||
cd ../gtk+-3.14.15-src
|
||||
econf --disable-cups
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -C gps GPRBUILD_FLAGS="-v ${MAKEOPTS} \
|
||||
-XGPR_BUILD=relocatable" \
|
||||
Build=Production
|
||||
gprbuild -v -p -Pcli/cli.gpr ${MAKEOPTS} -XLIBRARY_TYPE=relocatable \
|
||||
-XGPR_BUILD=relocatable -cargs:Ada ${ADAFLAGS} || die
|
||||
cd ../gtk+-3.14.15-src
|
||||
emake -C gtk/inspector
|
||||
emake -C gtk gtk.gresource.xml gtkdbusgenerated.c gtkdbusgenerated.h
|
||||
emake -C gtk libgtk-3.la
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
make_desktop_entry "${PN}" "GPS" "${EPREFIX}/usr/share/gps/icons/hicolor/32x32/apps/gps_32.png" "Development;IDE;"
|
||||
mv "${D}"/usr/bin/gps{,_exe}
|
||||
newbin gps.sh gps
|
||||
cd ../gtk+-3.14.15-src
|
||||
emake -C gtk DESTDIR="${D}" install-libLTLIBRARIES
|
||||
rm "${D}"/usr/$(get_libdir)/libgtk-3.{la,so,so.0} || die
|
||||
dosym ../libgtk-3.so.0.1400.15 /usr/$(get_libdir)/gps/libgtk-3.so.0
|
||||
}
|
Binary file not shown.
@ -0,0 +1,88 @@
|
||||
--- a/cdk/cmake/DepFindSSL.cmake
|
||||
+++ b/cdk/cmake/DepFindSSL.cmake
|
||||
@@ -88,7 +88,7 @@ function(main)
|
||||
|
||||
set(OPENSSL_LIB_DIR "${OPENSSL_LIB_DIR}" CACHE INTERNAL "")
|
||||
|
||||
- if(NOT OPENSSL_VERSION_MAJOR EQUAL 1)
|
||||
+ if(NOT OPENSSL_VERSION_MAJOR VERSION_GREATER_EQUAL 1)
|
||||
message(SEND_ERROR "OpenSSL version 1.x is required but version ${OPENSSL_VERSION} was found")
|
||||
else()
|
||||
message(STATUS "Using OpenSSL version: ${OPENSSL_VERSION}")
|
||||
@@ -184,41 +184,35 @@ function(find_openssl)
|
||||
|
||||
|
||||
# Verify version number. Version information looks like:
|
||||
- # #define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1a 20 Nov 2018"
|
||||
+ # #define OPENSSL_VERSION_NUMBER 0x1000103fL
|
||||
+ # Encoded as MNNFFPPS: major minor fix patch status
|
||||
|
||||
FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
|
||||
OPENSSL_VERSION_NUMBER
|
||||
- REGEX "#[ ]*define[\t ]+OPENSSL_VERSION_TEXT"
|
||||
+ REGEX "^#[ ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*"
|
||||
)
|
||||
|
||||
- #message("== OPENSSL_VERSION_NUMBER: ${OPENSSL_VERSION_NUMBER}")
|
||||
- # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1d-freebsd 10 Sep 2019"
|
||||
STRING(REGEX REPLACE
|
||||
- "^.*OPENSSL_VERSION_TEXT[\t ]+\"OpenSSL[\t ]([0-9]+)\\.([0-9]+)\\.([0-9]+)([a-z]|)[\t \\-].*$"
|
||||
- "\\1;\\2;\\3;\\4"
|
||||
- version_list "${OPENSSL_VERSION_NUMBER}"
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1"
|
||||
+ OPENSSL_VERSION_MAJOR "${OPENSSL_VERSION_NUMBER}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9]([0-9][0-9]).*$" "\\1"
|
||||
+ OPENSSL_VERSION_MINOR "${OPENSSL_VERSION_NUMBER}"
|
||||
+ )
|
||||
+ STRING(REGEX REPLACE
|
||||
+ "^.*OPENSSL_VERSION_NUMBER[\t ]+0x[0-9][0-9][0-9]([0-9][0-9]).*$" "\\1"
|
||||
+ OPENSSL_VERSION_FIX "${OPENSSL_VERSION_NUMBER}"
|
||||
)
|
||||
- #message("-- OPENSSL_VERSION: ${version_list}")
|
||||
-
|
||||
- list(GET version_list 0 OPENSSL_VERSION_MAJOR)
|
||||
- math(EXPR OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR})
|
||||
-
|
||||
- list(GET version_list 1 OPENSSL_VERSION_MINOR)
|
||||
- math(EXPR OPENSSL_VERSION_MINOR ${OPENSSL_VERSION_MINOR})
|
||||
-
|
||||
- list(GET version_list 2 OPENSSL_VERSION_FIX)
|
||||
- math(EXPR OPENSSL_VERSION_FIX ${OPENSSL_VERSION_FIX})
|
||||
-
|
||||
- list(GET version_list 3 OPENSSL_VERSION_PATCH)
|
||||
-
|
||||
|
||||
|
||||
set(OPENSSL_VERSION
|
||||
- "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH}"
|
||||
+ "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
set(OPENSSL_VERSION_MAJOR ${OPENSSL_VERSION_MAJOR} PARENT_SCOPE)
|
||||
|
||||
+ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
|
||||
|
||||
find_library(OPENSSL_LIBRARY
|
||||
NAMES ssl ssleay32 ssleay32MD libssl
|
||||
--- a/cdk/foundation/connection_openssl.cc
|
||||
+++ b/cdk/foundation/connection_openssl.cc
|
||||
@@ -211,7 +211,7 @@ static void throw_ssl_error(SSL* tls, int err)
|
||||
case SSL_ERROR_WANT_CONNECT:
|
||||
case SSL_ERROR_WANT_ACCEPT:
|
||||
case SSL_ERROR_WANT_X509_LOOKUP:
|
||||
-# if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+# if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
case SSL_ERROR_WANT_ASYNC:
|
||||
case SSL_ERROR_WANT_ASYNC_JOB:
|
||||
# endif
|
||||
@@ -387,7 +387,7 @@ void TLS_helper::setup(SSL_CTX *ctx)
|
||||
|
||||
SSL_CTX_set_cipher_list(ctx, m_cipher_list.c_str());
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER>=0x1010100fL
|
||||
+#if HAVE_TLS1_3_VERSION
|
||||
|
||||
/*
|
||||
Note: If TLSv1.3 is not enabled, there is no need to restrict
|
@ -0,0 +1,44 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
|
||||
URI_DIR="Connector-C++"
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
|
||||
|
||||
LICENSE="Artistic GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="+legacy libressl"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/protobuf:=
|
||||
legacy? (
|
||||
dev-libs/boost:=
|
||||
>=dev-db/mysql-connector-c-6.1.8:=
|
||||
)
|
||||
!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )"
|
||||
DEPEND="${RDEPEND}"
|
||||
S="${WORKDIR}/${P}-src"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.19-fix-build.patch
|
||||
"${FILESDIR}"/${PN}-8.0.20-fix-libressl-support.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DWITH_SSL=system
|
||||
-DWITH_JDBC=$(usex legacy ON OFF)
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
|
||||
$(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -0,0 +1,332 @@
|
||||
From 2108922a8292d74874ede834158c208d81c3cf76 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Deutschmann <whissi@gentoo.org>
|
||||
Date: Thu, 30 Apr 2020 20:01:48 +0200
|
||||
Subject: [PATCH 5/5] Add LibreSSL support
|
||||
|
||||
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
||||
---
|
||||
cmake/ssl.cmake | 5 +++--
|
||||
mysys/my_md5.cc | 2 ++
|
||||
.../bindings/xcom/xcom/xcom_ssl_transport.c | 6 +++++-
|
||||
plugin/x/client/xconnection_impl.cc | 4 ++++
|
||||
router/src/http/src/tls_client_context.cc | 2 +-
|
||||
router/src/http/src/tls_context.cc | 9 ++++++--
|
||||
router/src/http/src/tls_server_context.cc | 3 ++-
|
||||
sql-common/client.cc | 2 ++
|
||||
sql/mysqld.cc | 4 +++-
|
||||
sql/sys_vars.cc | 21 +++++++++++++++++--
|
||||
vio/viossl.cc | 8 +++----
|
||||
vio/viosslfactories.cc | 2 ++
|
||||
12 files changed, 54 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/cmake/ssl.cmake
|
||||
+++ b/cmake/ssl.cmake
|
||||
@@ -222,13 +222,14 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
OPENSSL_FIX_VERSION "${OPENSSL_VERSION_NUMBER}"
|
||||
)
|
||||
ENDIF()
|
||||
- IF("${OPENSSL_MAJOR_VERSION}.${OPENSSL_MINOR_VERSION}.${OPENSSL_FIX_VERSION}" VERSION_GREATER "1.1.0")
|
||||
+ CHECK_SYMBOL_EXISTS(TLS1_3_VERSION "openssl/tls1.h" HAVE_TLS1_3_VERSION)
|
||||
+ IF(HAVE_TLS1_3_VERSION)
|
||||
ADD_DEFINITIONS(-DHAVE_TLSv13)
|
||||
ENDIF()
|
||||
IF(OPENSSL_INCLUDE_DIR AND
|
||||
OPENSSL_LIBRARY AND
|
||||
CRYPTO_LIBRARY AND
|
||||
- OPENSSL_MAJOR_VERSION STREQUAL "1"
|
||||
+ OPENSSL_MAJOR_VERSION VERSION_GREATER_EQUAL "1"
|
||||
)
|
||||
SET(OPENSSL_FOUND TRUE)
|
||||
FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
|
||||
--- a/mysys/my_md5.cc
|
||||
+++ b/mysys/my_md5.cc
|
||||
@@ -56,7 +56,9 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf,
|
||||
int compute_md5_hash(char *digest, const char *buf, int len) {
|
||||
int retval = 0;
|
||||
int fips_mode = 0;
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
fips_mode = FIPS_mode();
|
||||
+#endif
|
||||
/* If fips mode is ON/STRICT restricted method calls will result into abort,
|
||||
* skipping call. */
|
||||
if (fips_mode == 0) {
|
||||
--- a/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
|
||||
+++ b/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_ssl_transport.c
|
||||
@@ -329,6 +329,7 @@ error:
|
||||
return 1;
|
||||
}
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
#define OPENSSL_ERROR_LENGTH 512
|
||||
static int configure_ssl_fips_mode(const uint fips_mode) {
|
||||
int rc = -1;
|
||||
@@ -352,6 +353,7 @@ static int configure_ssl_fips_mode(const uint fips_mode) {
|
||||
EXIT:
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int configure_ssl_ca(SSL_CTX *ssl_ctx, const char *ca_file,
|
||||
const char *ca_path) {
|
||||
@@ -555,10 +557,12 @@ int xcom_init_ssl(const char *server_key_file, const char *server_cert_file,
|
||||
int verify_server = SSL_VERIFY_NONE;
|
||||
int verify_client = SSL_VERIFY_NONE;
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
if (configure_ssl_fips_mode(ssl_fips_mode) != 1) {
|
||||
G_ERROR("Error setting the ssl fips mode");
|
||||
goto error;
|
||||
}
|
||||
+#endif
|
||||
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
@@ -622,7 +626,7 @@ error:
|
||||
void xcom_cleanup_ssl() {
|
||||
if (!xcom_use_ssl()) return;
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
ERR_remove_thread_state(0);
|
||||
#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||
}
|
||||
--- a/plugin/x/client/xconnection_impl.cc
|
||||
+++ b/plugin/x/client/xconnection_impl.cc
|
||||
@@ -511,6 +511,7 @@ XError Connection_impl::get_ssl_error(const int error_id) {
|
||||
return XError(CR_SSL_CONNECTION_ERROR, buffer);
|
||||
}
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
/**
|
||||
Set fips mode in openssl library,
|
||||
When we set fips mode ON/STRICT, it will perform following operations:
|
||||
@@ -550,6 +551,7 @@ int set_fips_mode(const uint32_t fips_mode,
|
||||
EXIT:
|
||||
return rc;
|
||||
}
|
||||
+#endif
|
||||
|
||||
XError Connection_impl::activate_tls() {
|
||||
if (nullptr == m_vio) return get_socket_error(SOCKET_ECONNRESET);
|
||||
@@ -560,12 +562,14 @@ XError Connection_impl::activate_tls() {
|
||||
if (!m_context->m_ssl_config.is_configured())
|
||||
return XError{CR_SSL_CONNECTION_ERROR, ER_TEXT_TLS_NOT_CONFIGURATED, true};
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
char err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
if (set_fips_mode(
|
||||
static_cast<uint32_t>(m_context->m_ssl_config.m_ssl_fips_mode),
|
||||
err_string) != 1) {
|
||||
return XError{CR_SSL_CONNECTION_ERROR, err_string, true};
|
||||
}
|
||||
+#endif
|
||||
auto ssl_ctx_flags = process_tls_version(
|
||||
details::null_when_empty(m_context->m_ssl_config.m_tls_version));
|
||||
|
||||
--- a/router/src/http/src/tls_client_context.cc
|
||||
+++ b/router/src/http/src/tls_client_context.cc
|
||||
@@ -54,7 +54,7 @@ void TlsClientContext::verify(TlsVerify verify) {
|
||||
|
||||
void TlsClientContext::cipher_suites(const std::string &ciphers) {
|
||||
// TLSv1.3 ciphers are controlled via SSL_CTX_set_ciphersuites()
|
||||
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
|
||||
+#ifdef TLS1_3_VERSION
|
||||
if (1 != SSL_CTX_set_ciphersuites(ssl_ctx_.get(), ciphers.c_str())) {
|
||||
throw TlsError("set-cipher-suites");
|
||||
}
|
||||
--- a/router/src/http/src/tls_context.cc
|
||||
+++ b/router/src/http/src/tls_context.cc
|
||||
@@ -91,7 +91,7 @@ static int o11x_version(TlsVersion version) {
|
||||
return TLS1_1_VERSION;
|
||||
case TlsVersion::TLS_1_2:
|
||||
return TLS1_2_VERSION;
|
||||
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 1)
|
||||
+#ifdef TLS1_3_VERSION
|
||||
case TlsVersion::TLS_1_3:
|
||||
return TLS1_3_VERSION;
|
||||
#endif
|
||||
@@ -120,9 +120,11 @@ void TlsContext::version_range(TlsVersion min_version, TlsVersion max_version) {
|
||||
switch (min_version) {
|
||||
default:
|
||||
// unknown, leave all disabled
|
||||
+#ifdef TLS1_3_VERSION
|
||||
// fallthrough
|
||||
case TlsVersion::TLS_1_3:
|
||||
opts |= SSL_OP_NO_TLSv1_2;
|
||||
+#endif
|
||||
// fallthrough
|
||||
case TlsVersion::TLS_1_2:
|
||||
opts |= SSL_OP_NO_TLSv1_1;
|
||||
@@ -170,8 +172,10 @@ TlsVersion TlsContext::min_version() const {
|
||||
return TlsVersion::TLS_1_1;
|
||||
case TLS1_2_VERSION:
|
||||
return TlsVersion::TLS_1_2;
|
||||
+#ifdef TLS1_3_VERSION
|
||||
case TLS1_3_VERSION:
|
||||
return TlsVersion::TLS_1_3;
|
||||
+#endif
|
||||
case 0:
|
||||
return TlsVersion::AUTO;
|
||||
default:
|
||||
@@ -230,7 +234,8 @@ TlsContext::InfoCallback TlsContext::info_callback() const {
|
||||
}
|
||||
|
||||
int TlsContext::security_level() const {
|
||||
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
|
||||
+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
|
||||
+ !defined(LIBRESSL_VERSION_NUMBER)
|
||||
return SSL_CTX_get_security_level(ssl_ctx_.get());
|
||||
#else
|
||||
return 0;
|
||||
--- a/router/src/http/src/tls_server_context.cc
|
||||
+++ b/router/src/http/src/tls_server_context.cc
|
||||
@@ -167,7 +167,8 @@ void TlsServerContext::init_tmp_dh(const std::string &dh_params) {
|
||||
}
|
||||
|
||||
} else {
|
||||
-#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0)
|
||||
+#if OPENSSL_VERSION_NUMBER >= ROUTER_OPENSSL_VERSION(1, 1, 0) && \
|
||||
+ !defined(LIBRESSL_VERSION_NUMBER)
|
||||
dh2048.reset(DH_get_2048_256());
|
||||
#else
|
||||
/*
|
||||
--- a/sql-common/client.cc
|
||||
+++ b/sql-common/client.cc
|
||||
@@ -7752,6 +7752,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
|
||||
return 1;
|
||||
break;
|
||||
case MYSQL_OPT_SSL_FIPS_MODE: {
|
||||
+#if !defined(LIBRESSL_VERSION_NUMBER)
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
ENSURE_EXTENSIONS_PRESENT(&mysql->options);
|
||||
mysql->options.extension->ssl_fips_mode = *static_cast<const uint *>(arg);
|
||||
@@ -7763,6 +7764,7 @@ int STDCALL mysql_options(MYSQL *mysql, enum mysql_option option,
|
||||
"Set Fips mode ON/STRICT failed, detail: '%s'.", ssl_err_string);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
} break;
|
||||
case MYSQL_OPT_SSL_MODE:
|
||||
ENSURE_EXTENSIONS_PRESENT(&mysql->options);
|
||||
--- a/sql/mysqld.cc
|
||||
+++ b/sql/mysqld.cc
|
||||
@@ -4857,7 +4857,7 @@ static int init_thread_environment() {
|
||||
|
||||
static PSI_memory_key key_memory_openssl = PSI_NOT_INSTRUMENTED;
|
||||
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define FILE_LINE_ARGS
|
||||
#else
|
||||
#define FILE_LINE_ARGS , const char *, int
|
||||
@@ -4891,12 +4891,14 @@ static void init_ssl() {
|
||||
}
|
||||
|
||||
static int init_ssl_communication() {
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
int ret_fips_mode = set_fips_mode(opt_ssl_fips_mode, ssl_err_string);
|
||||
if (ret_fips_mode != 1) {
|
||||
LogErr(ERROR_LEVEL, ER_SSL_FIPS_MODE_ERROR, ssl_err_string);
|
||||
return 1;
|
||||
}
|
||||
+#endif
|
||||
if (SslAcceptorContext::singleton_init(opt_use_ssl)) return 1;
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
--- a/sql/sys_vars.cc
|
||||
+++ b/sql/sys_vars.cc
|
||||
@@ -4459,6 +4459,7 @@ static Sys_var_ulong Sys_max_execution_time(
|
||||
HINT_UPDATEABLE SESSION_VAR(max_execution_time), CMD_LINE(REQUIRED_ARG),
|
||||
VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1));
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
|
||||
char ssl_err_string[OPENSSL_ERROR_LENGTH] = {'\0'};
|
||||
if (set_fips_mode(opt_ssl_fips_mode, ssl_err_string) != 1) {
|
||||
@@ -4469,15 +4470,31 @@ static bool update_fips_mode(sys_var *, THD *, enum_var_type) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
+
|
||||
+#if defined(LIBRESSL_VERSION_NUMBER)
|
||||
+static const char *ssl_fips_mode_names[] = {"OFF", 0};
|
||||
+#else
|
||||
+static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", 0};
|
||||
+#endif
|
||||
|
||||
-static const char *ssl_fips_mode_names[] = {"OFF", "ON", "STRICT", nullptr};
|
||||
static Sys_var_enum Sys_ssl_fips_mode(
|
||||
"ssl_fips_mode",
|
||||
"SSL FIPS mode (applies only for OpenSSL); "
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
"permitted values are: OFF, ON, STRICT",
|
||||
+#else
|
||||
+ "permitted values are: OFF",
|
||||
+#endif
|
||||
GLOBAL_VAR(opt_ssl_fips_mode), CMD_LINE(REQUIRED_ARG, OPT_SSL_FIPS_MODE),
|
||||
ssl_fips_mode_names, DEFAULT(0), NO_MUTEX_GUARD, NOT_IN_BINLOG,
|
||||
- ON_CHECK(nullptr), ON_UPDATE(update_fips_mode), nullptr);
|
||||
+ ON_CHECK(NULL),
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
+ ON_UPDATE(update_fips_mode),
|
||||
+#else
|
||||
+ ON_UPDATE(NULL),
|
||||
+#endif
|
||||
+ NULL);
|
||||
|
||||
static Sys_var_bool Sys_auto_generate_certs(
|
||||
"auto_generate_certs",
|
||||
--- a/vio/viossl.cc
|
||||
+++ b/vio/viossl.cc
|
||||
@@ -45,7 +45,7 @@
|
||||
BIO_set_callback_ex was added in openSSL 1.1.1
|
||||
For older openSSL, use the deprecated BIO_set_callback.
|
||||
*/
|
||||
-#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||
#define HAVE_BIO_SET_CALLBACK_EX
|
||||
#endif
|
||||
|
||||
@@ -634,8 +634,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
|
||||
|
||||
#if !defined(DBUG_OFF)
|
||||
{
|
||||
- STACK_OF(SSL_COMP) *ssl_comp_methods = nullptr;
|
||||
- ssl_comp_methods = SSL_COMP_get_compression_methods();
|
||||
+ STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
|
||||
+ ssl_comp_methods = (STACK_OF(SSL_COMP) *)SSL_COMP_get_compression_methods();
|
||||
n = sk_SSL_COMP_num(ssl_comp_methods);
|
||||
DBUG_PRINT("info", ("Available compression methods:\n"));
|
||||
if (n == 0)
|
||||
@@ -643,7 +643,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout,
|
||||
else
|
||||
for (j = 0; j < n; j++) {
|
||||
SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j);
|
||||
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
DBUG_PRINT("info", (" %d: %s\n", c->id, c->name));
|
||||
#else /* OPENSSL_VERSION_NUMBER < 0x10100000L */
|
||||
DBUG_PRINT("info",
|
||||
--- a/vio/viosslfactories.cc
|
||||
+++ b/vio/viosslfactories.cc
|
||||
@@ -472,6 +472,7 @@ void ssl_start() {
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef LIBRESSL_VERSION_NUMBER
|
||||
/**
|
||||
Set fips mode in openssl library,
|
||||
When we set fips mode ON/STRICT, it will perform following operations:
|
||||
@@ -525,6 +526,7 @@ EXIT:
|
||||
@returns openssl current fips mode
|
||||
*/
|
||||
uint get_fips_mode() { return FIPS_mode(); }
|
||||
+#endif
|
||||
|
||||
long process_tls_version(const char *tls_version) {
|
||||
const char *separator = ",";
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,111 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit cmake-multilib
|
||||
|
||||
# wrap the config script
|
||||
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
|
||||
|
||||
DESCRIPTION="C client library for MariaDB/MySQL"
|
||||
HOMEPAGE="https://dev.mysql.com/downloads/"
|
||||
LICENSE="GPL-2"
|
||||
|
||||
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-${PV}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
|
||||
|
||||
SLOT="0/21"
|
||||
IUSE="ldap libressl static-libs"
|
||||
|
||||
RDEPEND="
|
||||
>=app-arch/lz4-0_p131:=
|
||||
sys-libs/zlib:=[${MULTILIB_USEDEP}]
|
||||
ldap? ( dev-libs/cyrus-sasl:=[${MULTILIB_USEDEP}] )
|
||||
libressl? ( dev-libs/libressl:0=[${MULTILIB_USEDEP}] )
|
||||
!libressl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
# Avoid file collisions, #692580
|
||||
RDEPEND+=" !<dev-db/mysql-5.6.45-r1"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.23*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.24*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.25*"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.26-r0"
|
||||
RDEPEND+=" !=dev-db/mysql-5.7.27-r0"
|
||||
RDEPEND+=" !<dev-db/percona-server-5.7.26.29-r1"
|
||||
|
||||
DOCS=( README )
|
||||
|
||||
S="${WORKDIR}/mysql-${PV}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-8.0.18-always-build-decompress-utilities.patch
|
||||
"${FILESDIR}"/${PN}-8.0.17-use-relative-include-path-for-udf_registration_types-h.patch
|
||||
"${FILESDIR}"/${PN}-8.0.19-do-not-install-comp_err.patch
|
||||
"${FILESDIR}"/${PN}-8.0.20-libressl.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e 's/CLIENT_LIBS/CONFIG_CLIENT_LIBS/' "${S}/scripts/CMakeLists.txt" || die
|
||||
|
||||
# All these are for the server only.
|
||||
# Disable rpm call which would trigger sandbox, #692368
|
||||
sed -i \
|
||||
-e '/MYSQL_CHECK_LIBEVENT/d' \
|
||||
-e '/MYSQL_CHECK_RAPIDJSON/d' \
|
||||
-e '/MYSQL_CHECK_ICU/d' \
|
||||
-e '/MYSQL_CHECK_EDITLINE/d' \
|
||||
-e '/MYSQL_CHECK_CURL/d' \
|
||||
-e '/ADD_SUBDIRECTORY(man)/d' \
|
||||
-e '/ADD_SUBDIRECTORY(share)/d' \
|
||||
-e '/INCLUDE(cmake\/boost/d' \
|
||||
-e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Skip building clients
|
||||
echo > client/CMakeLists.txt || die
|
||||
|
||||
# Forcefully disable auth plugin
|
||||
if ! use ldap ; then
|
||||
sed -i -e '/MYSQL_CHECK_SASL/d' CMakeLists.txt || die
|
||||
echo > libmysql/authentication_ldap/CMakeLists.txt || die
|
||||
fi
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DINSTALL_LAYOUT=RPM
|
||||
-DINSTALL_LIBDIR=$(get_libdir)
|
||||
-DWITH_DEFAULT_COMPILER_OPTIONS=OFF
|
||||
-DWITH_DEFAULT_FEATURE_SET=OFF
|
||||
-DENABLED_LOCAL_INFILE=ON
|
||||
-DMYSQL_UNIX_ADDR="${EPREFIX}/run/mysqld/mysqld.sock"
|
||||
-DWITH_ZLIB=system
|
||||
-DWITH_SSL=system
|
||||
-DWITH_NUMA=OFF
|
||||
-DLIBMYSQL_OS_OUTPUT_NAME=mysqlclient
|
||||
-DSHARED_LIB_PATCH_VERSION="0"
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DWITHOUT_SERVER=ON
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
cmake-utils_src_install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
doman \
|
||||
man/my_print_defaults.1 \
|
||||
man/perror.1 \
|
||||
man/zlib_decompress.1
|
||||
|
||||
if ! use static-libs ; then
|
||||
find "${ED}" -name "*.a" -delete || die
|
||||
fi
|
||||
}
|
@ -1,837 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
MY_EXTRAS_VER="20190817-0024Z"
|
||||
|
||||
CMAKE_MAKEFILE_GENERATOR=emake
|
||||
|
||||
# Keeping eutils in EAPI=6 for emktemp in pkg_config
|
||||
|
||||
inherit eutils flag-o-matic prefix toolchain-funcs \
|
||||
user cmake-utils multilib-build
|
||||
|
||||
SRC_URI="http://cdn.mysql.com/Downloads/MySQL-5.6/${P}.tar.gz
|
||||
https://cdn.mysql.com/archives/mysql-5.6/${P}.tar.gz
|
||||
http://downloads.mysql.com/archives/MySQL-5.6/${P}.tar.gz"
|
||||
|
||||
# Gentoo patches to MySQL
|
||||
if [[ "${MY_EXTRAS_VER}" != "live" && "${MY_EXTRAS_VER}" != "none" ]]; then
|
||||
SRC_URI="${SRC_URI}
|
||||
mirror://gentoo/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://gitweb.gentoo.org/proj/mysql-extras.git/snapshot/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~grknight/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~robbat2/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2
|
||||
https://dev.gentoo.org/~jmbsvicetto/distfiles/mysql-extras-${MY_EXTRAS_VER}.tar.bz2"
|
||||
fi
|
||||
|
||||
HOMEPAGE="https://www.mysql.com/"
|
||||
DESCRIPTION="A fast, multi-threaded, multi-user SQL database server"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0/18"
|
||||
IUSE="client-libs cracklib debug jemalloc latin1 libressl numa +perl profiling selinux
|
||||
+server static static-libs systemtap tcmalloc test yassl"
|
||||
|
||||
# Tests always fail when libressl is enabled due to hard-coded ciphers in the tests
|
||||
RESTRICT="!test? ( test ) libressl? ( test )"
|
||||
|
||||
REQUIRED_USE="?? ( tcmalloc jemalloc ) static? ( yassl )"
|
||||
|
||||
KEYWORDS="amd64 arm ~hppa ~ia64 ~mips ppc ppc64 ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
|
||||
|
||||
# Shorten the path because the socket path length must be shorter than 107 chars
|
||||
# and we will run a mysql server during test phase
|
||||
S="${WORKDIR}/mysql"
|
||||
|
||||
if [[ "${MY_EXTRAS_VER}" == "live" ]] ; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/mysql-extras.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}/mysql-extras"
|
||||
EGIT_CLONE_TYPE=shallow
|
||||
MY_PATCH_DIR="${WORKDIR}/mysql-extras"
|
||||
else
|
||||
MY_PATCH_DIR="${WORKDIR}/mysql-extras-${MY_EXTRAS_VER}"
|
||||
fi
|
||||
|
||||
PATCHES=(
|
||||
"${MY_PATCH_DIR}"/01050_all_mysql_config_cleanup-5.6.patch
|
||||
"${MY_PATCH_DIR}"/02040_all_embedded-library-shared-5.5.10.patch
|
||||
"${MY_PATCH_DIR}"/20006_all_cmake_elib-mysql-5.6.35.patch
|
||||
"${MY_PATCH_DIR}"/20007_all_cmake-debug-werror-5.6.22.patch
|
||||
"${MY_PATCH_DIR}"/20008_all_mysql-tzinfo-symlink-5.6.37.patch
|
||||
"${MY_PATCH_DIR}"/20009_all_mysql_myodbc_symbol_fix-5.6.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.6.25-without-clientlibs-tools.patch
|
||||
"${MY_PATCH_DIR}"/20027_all_mysql-5.5-perl5.26-includes.patch
|
||||
"${MY_PATCH_DIR}"/20028_all_mysql-5.6-gcc7.patch
|
||||
"${MY_PATCH_DIR}"/20031_all_mysql-5.6-fix-monitor.test.patch
|
||||
"${MY_PATCH_DIR}"/20036_all_mysql-5.6-fix-rpl_semi_sync_shutdown_hang.test.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-fix-libressl-support.patch
|
||||
"${MY_PATCH_DIR}"/20018_all_mysql-5.6.44-add-openssl-1.1-support.patch
|
||||
)
|
||||
|
||||
# Be warned, *DEPEND are version-dependant
|
||||
# These are used for both runtime and compiletime
|
||||
COMMON_DEPEND="
|
||||
kernel_linux? (
|
||||
sys-process/procps:0=
|
||||
dev-libs/libaio:0=
|
||||
)
|
||||
net-misc/curl
|
||||
>=sys-apps/sed-4
|
||||
>=sys-apps/texinfo-4.7-r1
|
||||
jemalloc? ( dev-libs/jemalloc:0= )
|
||||
tcmalloc? ( dev-util/google-perftools:0= )
|
||||
systemtap? ( >=dev-util/systemtap-1.3:0= )
|
||||
!yassl? (
|
||||
!libressl? ( >=dev-libs/openssl-1.0.0:0= )
|
||||
libressl? ( =dev-libs/libressl-2.6.5*:0= )
|
||||
)
|
||||
>=sys-libs/zlib-1.2.3:0=
|
||||
sys-libs/ncurses:0=
|
||||
server? (
|
||||
numa? ( sys-process/numactl )
|
||||
)
|
||||
!client-libs? ( dev-db/mysql-connector-c[${MULTILIB_USEDEP},static-libs?] )
|
||||
"
|
||||
DEPEND="virtual/yacc
|
||||
static? ( sys-libs/ncurses[static-libs] )
|
||||
test? ( dev-perl/JSON )
|
||||
|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
|
||||
${COMMON_DEPEND}"
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mysql )
|
||||
client-libs? ( !dev-db/mariadb-connector-c[mysqlcompat] !dev-db/mysql-connector-c )
|
||||
!dev-db/mariadb !dev-db/mariadb-galera !dev-db/percona-server !dev-db/mysql-cluster
|
||||
server? ( !prefix? ( dev-db/mysql-init-scripts ) )
|
||||
${COMMON_DEPEND}
|
||||
"
|
||||
# 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 )"
|
||||
|
||||
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
|
||||
|
||||
# This should come after all of the die statements
|
||||
enewgroup mysql 60 || die "problem adding 'mysql' group"
|
||||
enewuser mysql 60 -1 /dev/null mysql || die "problem adding 'mysql' user"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# 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
|
||||
}
|
||||
|
||||
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() {
|
||||
_disable_engine() {
|
||||
echo > "${S%/}/storage/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
_disable_plugin() {
|
||||
echo > "${S%/}/plugin/${1}/CMakeLists.txt" || die
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
if use libressl ; then
|
||||
sed -i 's/OPENSSL_MAJOR_VERSION STREQUAL "1"/OPENSSL_MAJOR_VERSION STREQUAL "2"/' \
|
||||
"${S}/cmake/ssl.cmake" || die
|
||||
fi
|
||||
|
||||
sed -i 's~ADD_SUBDIRECTORY(storage/ndb)~~' CMakeLists.txt || die
|
||||
|
||||
local plugin
|
||||
local server_plugins=( semisync )
|
||||
local test_plugins=( audit_null daemon_example fulltext )
|
||||
if ! use server; then # These plugins are for the server
|
||||
for plugin in "${server_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
if ! use test; then # These plugins are only used during testing
|
||||
for plugin in "${test_plugins[@]}" ; do
|
||||
_disable_plugin "${plugin}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Don't build example
|
||||
_disable_engine example
|
||||
_disable_engine ndb
|
||||
_disable_plugin innodb_memcached
|
||||
|
||||
cmake-utils_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# bug 508724 mariadb cannot use ld.gold
|
||||
tc-ld-disable-gold
|
||||
# Bug #114895, bug #110149
|
||||
filter-flags "-O" "-O[01]"
|
||||
|
||||
append-cxxflags -felide-constructors
|
||||
|
||||
# bug #283926, with GCC4.4, this is required to get correct behavior.
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
|
||||
# debug hack wrt #497532
|
||||
mycmakeargs=(
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
|
||||
-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_LIBEVENT=NO
|
||||
-DWITHOUT_CLIENTLIBS=YES
|
||||
-DENABLE_DTRACE=$(usex systemtap)
|
||||
-DWITH_SSL=$(usex yassl bundled system)
|
||||
-DINSTALL_MYSQLTESTDIR=$(usex test 'share/mysql/mysql-test' '')
|
||||
-DWITHOUT_VALIDATE_PASSWORD=1
|
||||
)
|
||||
|
||||
if use server ; then
|
||||
|
||||
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+=(
|
||||
-DWITH_NUMA=$(usex numa ON OFF)
|
||||
-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_ARCHIVE_STORAGE_ENGINE=1
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1
|
||||
-DWITH_CSV_STORAGE_ENGINE=1
|
||||
-DWITH_HEAP_STORAGE_ENGINE=1
|
||||
-DWITH_INNOBASE_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAMMRG_STORAGE_ENGINE=1
|
||||
-DWITH_MYISAM_STORAGE_ENGINE=1
|
||||
-DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
-DWITH_INNODB_MEMCACHED=0
|
||||
)
|
||||
|
||||
else
|
||||
mycmakeargs+=(
|
||||
-DWITHOUT_SERVER=1
|
||||
-DWITH_EMBEDDED_SERVER=OFF
|
||||
-DEXTRA_CHARSETS=none
|
||||
)
|
||||
fi
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-utils_src_compile
|
||||
}
|
||||
|
||||
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
|
||||
# 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
|
||||
|
||||
if [[ -d "${ED%/}/usr/sql-bench" ]] ; then
|
||||
mv "${ED%/}/usr/sql-bench" "${ED%/}/usr/share/mysql/" || 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
|
||||
local mycnf_src="my.cnf-5.6"
|
||||
sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
|
||||
"${FILESDIR%/}/${mycnf_src}" \
|
||||
> "${TMPDIR%/}/my.cnf.ok" || die
|
||||
use prefix && sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' "${TMPDIR%/}/my.cnf.ok"
|
||||
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" my.cnf
|
||||
|
||||
if use server ; then
|
||||
einfo "Including support files and sample configurations"
|
||||
docinto "support-files"
|
||||
local script
|
||||
for script in \
|
||||
"${S}"/support-files/magic
|
||||
do
|
||||
[[ -f "$script" ]] && dodoc "${script}"
|
||||
done
|
||||
|
||||
docinto "scripts"
|
||||
for script in "${S}"/scripts/mysql* ; do
|
||||
[[ ( -f "$script" ) && ( "${script%.sh}" == "${script}" ) ]] && dodoc "${script}"
|
||||
done
|
||||
fi
|
||||
|
||||
#Remove mytop if perl is not selected
|
||||
[[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
|
||||
}
|
||||
|
||||
# Official test instructions:
|
||||
# USE='perl server static-libs' \
|
||||
# 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.6 for now and are believed to be
|
||||
# false positives:
|
||||
#
|
||||
local t
|
||||
|
||||
for t in auth_sec.keyring_udf federated.federated_plugin ; do
|
||||
_disable_test "$t" "False positives in Gentoo"
|
||||
done
|
||||
|
||||
if ! use latin1 ; then
|
||||
for t in \
|
||||
binlog.binlog_mysqlbinlog_filter \
|
||||
binlog.binlog_statement_insert_delayed \
|
||||
funcs_1.is_columns_mysql \
|
||||
funcs_1.is_tables_mysql \
|
||||
funcs_1.is_triggers \
|
||||
main.information_schema \
|
||||
main.mysql_client_test \
|
||||
main.mysqld--help-notwin \
|
||||
perfschema.binlog_edge_mix \
|
||||
perfschema.binlog_edge_stmt \
|
||||
; do
|
||||
_disable_test "$t" "Requires DEFAULT_CHARSET=latin1 but USE=-latin1 is set"
|
||||
done
|
||||
fi
|
||||
|
||||
if has_version '>=dev-libs/openssl-1.1.0' ; then
|
||||
# Tests are expecting <openssl-1.1 default cipher
|
||||
for t in \
|
||||
main.openssl_1 \
|
||||
main.plugin_auth_sha256_tls \
|
||||
main.ssl \
|
||||
main.ssl_8k_key \
|
||||
main.ssl_ca \
|
||||
main.ssl_cipher\
|
||||
main.ssl_compress \
|
||||
main.ssl_crl \
|
||||
main.ssl-sha512 \
|
||||
; do
|
||||
_disable_test "$t" "Requires <dev-libs/openssl-1.1.0"
|
||||
done
|
||||
fi
|
||||
|
||||
_disable_test main.gis-precise "Known rounding error with latest AMD processors"
|
||||
|
||||
# run mysql-test tests
|
||||
perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
|
||||
retstatus_tests=$?
|
||||
|
||||
popd > /dev/null || die
|
||||
|
||||
# Cleanup is important for these testcases.
|
||||
pkill -9 -f "${S}/ndb" 2>/dev/null
|
||||
pkill -9 -f "${S}/sql" 2>/dev/null
|
||||
|
||||
local failures=""
|
||||
[[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
|
||||
[[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
|
||||
|
||||
[[ -z "$failures" ]] || die "Test failures: $failures"
|
||||
einfo "Tests successfully completed"
|
||||
}
|
||||
|
||||
mysql_init_vars() {
|
||||
MY_SHAREDSTATEDIR=${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/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_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'"
|
||||
|
||||
local help_tables="${EROOT%/}${MY_SHAREDSTATEDIR}/fill_help_tables.sql"
|
||||
[[ -r "${help_tables}" ]] \
|
||||
&& cp "${help_tables}" "${TMPDIR}/fill_help_tables.sql" \
|
||||
|| touch "${TMPDIR}/fill_help_tables.sql"
|
||||
help_tables="${TMPDIR}/fill_help_tables.sql"
|
||||
|
||||
# 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
|
||||
"${EROOT%/}/usr/bin/mysql_tzinfo_to_sql" "${EROOT%/}/usr/share/zoneinfo" >> "${sqltmp}" 2>/dev/null
|
||||
chown mysql "${sqltmp}" || die
|
||||
|
||||
local cmd=( "${EROOT%/}/usr/share/mysql/scripts/mysql_install_db" )
|
||||
[[ -f "${cmd}" ]] || cmd=( "${EROOT%/}/usr/bin/mysql_install_db" )
|
||||
if [[ -r "${help_tables}" ]] ; then
|
||||
cat "${help_tables}" >> "${sqltmp}"
|
||||
fi
|
||||
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="SET PASSWORD FOR 'root'@'localhost' = PASSWORD('${MYSQL_ROOT_PASSWORD}');"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--no-defaults \
|
||||
"--socket=${socket}" \
|
||||
-hlocalhost \
|
||||
-e "${sql}"
|
||||
eend $?
|
||||
|
||||
if [[ -n "${sqltmp}" ]] ; then
|
||||
ebegin "Loading \"zoneinfo\", this step may require a few seconds"
|
||||
"${EROOT%/}/usr/bin/mysql" \
|
||||
--socket="${socket}" \
|
||||
-hlocalhost \
|
||||
-uroot \
|
||||
--password="${MYSQL_ROOT_PASSWORD}" \
|
||||
mysql < "${sqltmp}"
|
||||
rc=$?
|
||||
eend $?
|
||||
[[ $rc -ne 0 ]] && ewarn "Failed to load zoneinfo!"
|
||||
fi
|
||||
|
||||
# Stop the server and cleanup
|
||||
einfo "Stopping the server ..."
|
||||
kill $(< "${pidfile}" )
|
||||
rm -f "${sqltmp}"
|
||||
wait %1
|
||||
einfo "Done"
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
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