4692 changed files with 17822 additions and 17980 deletions
-
BINManifest.files.gz
-
BINapp-admin/Manifest.gz
-
1app-admin/cdist/Manifest
-
25app-admin/cdist/cdist-6.5.4.ebuild
-
9app-admin/hcloud/hcloud-1.16.2.ebuild
-
1app-admin/puppet/Manifest
-
140app-admin/puppet/puppet-5.5.20.ebuild
-
2app-admin/salt/Manifest
-
79app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch
-
76app-admin/salt/files/salt-2018.3.4-tests.patch
-
116app-admin/salt/files/salt-3000.2-py38-logwarn.patch
-
460app-admin/salt/files/salt-3000.2-py38-misc.patch
-
147app-admin/salt/salt-2018.3.4.ebuild
-
17app-admin/salt/salt-3000.2-r4.ebuild
-
BINapp-arch/Manifest.gz
-
2app-arch/cabextract/cabextract-1.9.1.ebuild
-
BINapp-benchmarks/Manifest.gz
-
41app-benchmarks/bootchart2/bootchart2-0.14.8-r1.ebuild
-
15app-benchmarks/bootchart2/files/bootchart2-0.14.8-no-compressed-man.patch
-
BINapp-crypt/Manifest.gz
-
4app-crypt/md4sum/md4sum-0.02.03-r2.ebuild
-
BINapp-emulation/Manifest.gz
-
1app-emulation/qemu/Manifest
-
50app-emulation/qemu/files/qemu-5.0.0-epoll-strace.patch
-
1app-emulation/qemu/metadata.xml
-
837app-emulation/qemu/qemu-5.0.0.ebuild
-
15app-emulation/qemu/qemu-9999.ebuild
-
4app-emulation/xen-pvgrub/xen-pvgrub-4.13.0.ebuild
-
4app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
-
1app-emulation/xen/Manifest
-
165app-emulation/xen/xen-4.12.2-r1.ebuild
-
2app-emulation/xen/xen-4.13.0-r3.ebuild
-
BINapp-i18n/Manifest.gz
-
7app-i18n/skk-jisyo/skk-jisyo-999999.ebuild
-
47app-i18n/tomoe-gtk/tomoe-gtk-0.6.0-r5.ebuild
-
32app-i18n/tomoe-gtk/tomoe-gtk-0.6.0-r6.ebuild
-
26app-i18n/tomoe/tomoe-0.6.0-r6.ebuild
-
2app-i18n/transifex-client/transifex-client-0.13.9.ebuild
-
BINapp-metrics/Manifest.gz
-
92app-metrics/collectd/collectd-5.11.0-r1.ebuild
-
BINapp-misc/Manifest.gz
-
2app-misc/chkcrontab/chkcrontab-1.7.ebuild
-
BINapp-office/Manifest.gz
-
36app-office/dia/dia-0.97.3-r1.ebuild
-
8app-office/dia/files/dia-0.97.2-underlinking.patch
-
BINapp-portage/Manifest.gz
-
1app-portage/nattka/Manifest
-
38app-portage/nattka/nattka-0.2.3.ebuild
-
BINapp-shells/Manifest.gz
-
1app-shells/bashdb/Manifest
-
39app-shells/bashdb/bashdb-5.0.1.1.2.ebuild
-
BINapp-text/Manifest.gz
-
67app-text/gnome-doc-utils/gnome-doc-utils-0.20.10-r1.ebuild
-
2app-text/gnome-doc-utils/gnome-doc-utils-0.20.10-r2.ebuild
-
2app-text/tessdata_fast/tessdata_fast-4.0.0.ebuild
-
2app-text/tesseract/tesseract-4.1.1.ebuild
-
6app-text/xiphos/xiphos-4.0.6a-r2.ebuild
-
6app-text/xiphos/xiphos-4.1.0-r2.ebuild
-
141app-text/xpdf/xpdf-4.02-r2.ebuild
-
4app-text/xpdf/xpdf-4.02-r4.ebuild
-
BINdev-ada/Manifest.gz
-
2dev-ada/gps/Manifest
-
77dev-ada/gps/files/gps-2018-gentoo.patch
-
107dev-ada/gps/gps-2018-r3.ebuild
-
BINdev-db/Manifest.gz
-
1dev-db/mysql-connector-c++/Manifest
-
88dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.20-fix-libressl-support.patch
-
44dev-db/mysql-connector-c++/mysql-connector-c++-8.0.20.ebuild
-
1dev-db/mysql-connector-c/Manifest
-
332dev-db/mysql-connector-c/files/mysql-connector-c-8.0.20-libressl.patch
-
111dev-db/mysql-connector-c/mysql-connector-c-8.0.20.ebuild
-
7dev-db/mysql/Manifest
-
837dev-db/mysql/mysql-5.6.44-r1.ebuild
-
68dev-db/mysql/mysql-5.7.30.ebuild
-
1108dev-db/mysql/mysql-8.0.20.ebuild
-
2dev-db/percona-server/Manifest
-
1148dev-db/percona-server/percona-server-8.0.19.10.ebuild
-
2dev-db/postgresql/postgresql-9.4.26.ebuild
-
2dev-db/postgresql/postgresql-9.5.21.ebuild
-
BINdev-java/Manifest.gz
-
1dev-java/gradle-bin/Manifest
-
49dev-java/gradle-bin/gradle-bin-6.3.ebuild
-
1dev-java/tomcat-native/Manifest
-
62dev-java/tomcat-native/tomcat-native-1.2.24.ebuild
-
2dev-java/tomcat-servlet-api/Manifest
-
38dev-java/tomcat-servlet-api/tomcat-servlet-api-7.0.100.ebuild
-
39dev-java/tomcat-servlet-api/tomcat-servlet-api-8.5.51.ebuild
-
BINdev-lang/Manifest.gz
-
1dev-lang/go/Manifest
-
197dev-lang/go/go-1.13.9.ebuild
-
2dev-lang/python/Manifest
-
2dev-lang/python/python-2.7.18.ebuild
-
2dev-lang/python/python-3.6.10-r2.ebuild
-
2dev-lang/python/python-3.7.7-r2.ebuild
-
2dev-lang/python/python-3.8.2-r2.ebuild
-
327dev-lang/python/python-3.9.0_alpha6.ebuild
-
2dev-lang/vala/Manifest
-
2dev-lang/vala/vala-0.44.11.ebuild
-
52dev-lang/vala/vala-0.44.9.ebuild
-
49dev-lang/vala/vala-0.48.3.ebuild
@ -1,2 +1,3 @@ |
|||
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 |
@ -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,2 +1,3 @@ |
|||
DIST puppet-5.5.19.tar.gz 2993740 BLAKE2B aa6bde89489279769ee9a1ed5508fb223f7f0153b1b1991970018908eee70ff0816688c702b8dc779d01e1978ea7f9290c80523648730d5408a17674c11345fd SHA512 996fa155ca04c8c3c96c29cf65cd24eaf9e19e89fcf85345509dbd3673b28c263df5b62d6f016b8ac1c1da8ed86f0acf3100eae2656252bb10c542972db81de3 |
|||
DIST puppet-5.5.20.tar.gz 2995117 BLAKE2B f147be28967da748bf8d5f7250eae9045caafaa3925f850cc0a77acc19a6a47ed92d4ec81278334608839f6f8c83cab19324f2753bc05d3a042a3bfaccb72a46 SHA512 83b8f234697e13d6fd8ac16634fff4e4adfece70858c32c1001925c71cc4d9a482da1880c27c08e796facb46d5d17889f9521121a69cb49e160e3c031ad564c4 |
|||
DIST puppet-6.14.0.tar.gz 2842351 BLAKE2B db9a467d8e0f4f25d45c2f735ee9d11ac6ed4e47c16b95ded3ff9f1c5055ea866735bcda27c19c2988035d9592035e433ef0d79a19781c99f4e97388edf46b93 SHA512 066ad8de6393cb58b1f92fae450dc72dabcbe912cdbb3417848a66955fe17696a68abf67d86b107a2b1c54e7037d38da7264a9234a8833b56065c8e407ff57a4 |
@ -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,3 +1,3 @@ |
|||
DIST salt-2018.3.4.tar.gz 14404085 BLAKE2B 932b30b1ba60aefd3a6874a8ebe4cb6c469d82e31f6acdbe8a5641d09e3316796b5403ef803a355cec6255c1aede8bac3b66af179bd1bbaa5418c7076229cef9 SHA512 f17e06fdbf4741f231d9e769be57de4f6079e9283881b4bafa0d23928d7626a1f9c02b9f49c654b29c3e6ee8ed3d3ddf42c21baecef158ad63a97dc87895b21b |
|||
DIST salt-2019.2.4.tar.gz 14572556 BLAKE2B a1057baa5ab6c0a07f34ce658a1d5bc644f968600663d28d084eb712b55faaee93b8410d81c4b5324944e6e1f2067ffb102200088832e1b0076fed78c8542ae6 SHA512 9e621cbd78ead1060a2b0c07e7ef02e8c4590360a95c51ac29fa8c1add34f617e4407dd28b67cae3b0fd68b333782185edcf1159edd2db08e8b4e79b6b07a63f |
|||
DIST salt-3000.2-py38-misc.patch.gz 6250 BLAKE2B 68fff80a042e6bf208ea2d9692da7a7b1e29572f1ec3c850c14743bbf2821d231f933ec4e6d6eaad12acee0b7666888a37a72872b2b082c92d8db9de988fbbec SHA512 6d4a66323a423e630f7cc73b566ed96c452c8fc3d72c25a2dd86033c4774c1c8e8b8701e1d4ee92994d4148c398d704f419023e26d8b40c8fdd63f9d79d9d52f |
|||
DIST salt-3000.2.tar.gz 15231513 BLAKE2B 2090d0f52f953a42f1685ad190750e9c76ad6e862a3272444fef063a7605f69a6c542f04165a41fb9cdaa126a878cc133d4857faa70edc5eac4bf49bdde937ab SHA512 88e8876ed8cd18e942c2194686cda68f40fa49e69e317ca488bf58e095bcf6cdf8771d93eba7960038941cc5863e13a4eea4dad5256c12da7cd8288a2c61f59d |
@ -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" |
|||
} |
@ -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) |
@ -1,2 +1,3 @@ |
|||
DIST qemu-4.2.0-patches-r2.tar.xz 17868 BLAKE2B 3783d0f923ded66cce1195248981c83bbaf8b7ad2a270207e92e60b4d05d4787cd9324649c113a4616c2a9ddcef99841264f19915615b7a0a24dac9febed48ba SHA512 556f1c595a35ee4279b2d0890d90e48cd43d9d641ccca495e2494f62ab48dfc000dbe23718276271ced3d4b7680c814f8f8846195089ff56186f618063a83b48 |
|||
DIST qemu-4.2.0.tar.xz 62222068 BLAKE2B 27c9fbcd5093af425764674817ab9299224bd03f37b5983786f6f437fff1fab3b7da247c55c4ca8b8c42726b9867005944a2f7f04f2d0d94d753961615f901ef SHA512 2a79973c2b07c53e8c57a808ea8add7b6b2cbca96488ed5d4b669ead8c9318907dec2b6109f180fc8ca8f04c0f73a56e82b3a527b5626b799d7e849f2474ec56 |
|||
DIST qemu-5.0.0.tar.xz 62426192 BLAKE2B 785d02ef79c95b5c4f0556186054885f9893d4e8a9f4b4f2d6199a4e1ae9c31d7c79dd900305469217f85d61bbe74134b601d5c6c1b0eee2b74792d010f1fd63 SHA512 21ef0cbe107c468a40f0fa2635db2a40048c8790b629dfffca5cd62bb1b502ea8eb133bfc40df5ecf1489e2bffe87f6829aee041cb8a380ff04a8afa23b39fcf |
@ -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 |
|||