parent
842b6fd989
commit
46e72696eb
Binary file not shown.
Binary file not shown.
@ -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"
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -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.
Binary file not shown.
@ -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
|
||||
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,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,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
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST nattka-0.2.2.tar.gz 85213 BLAKE2B f940287f3d781d60c1d32cd4ac913e3a290e4438ab45b786cd715a4f61e48eb066a3380c5343f1cde12cc003d16bd25ae94dfb9129f0fd414add90c8ec016c5f SHA512 c83c8138843a52487f45a5d1c78839bfb40d918c9cff0feced9a6e43cb5760a21ac0faef342ee3d9ba0c58f22ac1be51fd764770d3ab7a148da92c565b964c89
|
||||
DIST nattka-0.2.3.tar.gz 87275 BLAKE2B 6ad8ddd6d629326a9f71427fe1a0efae2418bc5b1df2c1e24d79acb19ce7a909b8536747f4214444fea3721e5169e476471a1cc76844f4a0620ff10582f66ccb SHA512 d9122eb002136754d3307867069032f5b3ffbde9ab1e1bafac5678e6e4527ae285a5fd2c88b8f8d0c3af7282e324710dd2627e1c893fed2bd6d086fecd6d1c05
|
||||
|
@ -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,3 +1,4 @@
|
||||
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
|
||||
|
@ -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,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,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,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.
@ -1,2 +1,3 @@
|
||||
DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
|
||||
DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
|
||||
DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b
|
||||
|
@ -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
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
|
||||
DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
|
||||
DIST mysql-connector-c-6.1.11-src.tar.gz 3489345 BLAKE2B 813512520ef660521221565a4466e81d902629d0ee731f746b68eed2b9129ea8361fcabe184537ec8ba91aed5a4b02dfb3450b36524c2e98f81fba148eee0cf1 SHA512 271395c888a93b833e0bbe1840b9987ecdb37d0f1cf89904207cc9aa99ed32e538aee8c9529ff39b6533947159776a8f5aa079da86ed51b1d26b086f4ffdd7c6
|
||||
|
@ -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,10 +1,11 @@
|
||||
DIST mysql-5.6.44.tar.gz 32531507 BLAKE2B 28fbf49f699eb9f43223ffa186671b119d16016274cc7192db232b85c58123a61154e37193b9b7145c6a650b80b5f6cf838529bc2bc5ea9c78c0dbc39de834d3 SHA512 65ace1c803773ca6c8759d171c09bc93c7d61b8e3208ac9905f82e99087622c9dcca602d2da217741dc62fc6eabe9108ebc7f31facd26705072eae65fcc37077
|
||||
DIST mysql-5.6.45.tar.gz 32525559 BLAKE2B 3c629aed1de808acdea6654c7413e6851507c9c5be939ca4b4f5e2796da317e9b518a749bfc03d2b0ef05bd604b39f72e24b751076b9f206b462d21fa5db4f50 SHA512 f9d8bb72e96cc83f1064fe7df2e5fe8317ca9d44c4e776cf7827a61292fbcfccec716806c80d565958383d78fef93a19d61c726687b57680d5f93299291ff168
|
||||
DIST mysql-boost-5.7.26.tar.gz 51098338 BLAKE2B 1263cd75814a7293b26b0f44fd2b7d20d983f3c6a62725df9515ecac2ef252f6644810cb4bf0d6f36b98e55317f1c67ea7541228cb38d896dfedc476a5755f26 SHA512 a5f9871dc5a8e5fffc1467c3dd542533a63fe553c029120475f8fd5530d884c76ab0c33ad260daf317faf318ccef01464f6ac2dc3468efceb6bf2b6c06c54cfd
|
||||
DIST mysql-5.7.30-patches-01.tar.xz 6684 BLAKE2B 9350280094619fda0d91eacae573396198954fceb5dc039669d236b1dad98eef306702550b517ef30ee3d0e6721667b6f5549df91e3c15cef68888079c00d9ba SHA512 74e8e8794fe54b73776b38296aa42c65547311b80bfe65c88b2f961bd44083e9628eb47da4ebcf4c20e2d7c694f514223bcbf29cce27853cca500710ae97778d
|
||||
DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705caf8ec3869af930c9729359c3710059fc78aae176523fdf17d10173b404431f31f9bb23ee5c82fba7cbbb4cb39881c005 SHA512 bf8211cf3873f8672b9d3d1dc42b68a1c635690ffdc2d3393eafa83f060ada9f2eaa63f859bf8eecc24976a733d8c7c3b9632ac70f28b5facf48eae921c7ceeb
|
||||
DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
|
||||
DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
|
||||
DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
|
||||
DIST mysql-boost-8.0.19.tar.gz 264147972 BLAKE2B 61a5ccbef1a7a675c85e4e6bda8e5285bdb931e6ee14d4710bf13dfd9157d1095200db2886dc93ea7251d3d59245f35c0bef5ba88ba6aac209b1e080f3b07dc4 SHA512 5ffc03f005ab2585694902e926b6cb2b10059b2b030549eccd3949f9c3b2f02626d02529f940dec003f2d69683856fd1c720ff12f89dfbdc48befaf24a9c4d01
|
||||
DIST mysql-extras-20190817-0024Z.tar.bz2 337793 BLAKE2B dfd51a708654aff5bdbbaf2acad7ef966869a8e3adcba544ee15f217d2ba942827445841e73981bccc6c1f145b6225bfa7245114219f0cf52f0dfb85494a6830 SHA512 c2ff81be1c55636f0a2700033af030149f312f0383217054a4b8c65aef174626299fcb4539eaae967ea7d096a5bb09f5b5122dce344b44b0a135d886ba0fdf28
|
||||
DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c59ffa39156491d9ed2c07e19bb2efb88a14d5a9d4b537c137d71854e39fa3a7fc2b93618118d4fd062e92ba2d83783c6f SHA512 7a962e9ddec7069008c5ab6ac2801515e2661ca2875afc6141541c03e2f941f4255b3c0d806a4df2fd2f2f1d12323aeb1e456c1d364777a18ccebefad7b22a99
|
||||
DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
|
||||
DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
|
||||
DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
|
||||
|
@ -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.
@ -1,3 +1,4 @@
|
||||
DIST gradle-3.3-all.zip 91388147 BLAKE2B 15539ec06cadcdaee9d54928381d5626bf06bae3251eb304fee095e6d0362f23759e99e3841dac2b9a1eed50b6057ecce78230dafb45711bfe764bf107b1f704 SHA512 4b852eaf4030c780516fe9214c289e49fc93fc62672da70b7fd6bbbcd128e6912dd196195ce32570984503ea53b48593a41fbf4ec69b0f18b5e32c2fe9e556b3
|
||||
DIST gradle-3.4.1-all.zip 91604607 BLAKE2B 1c4aaae4899f3faa94fc3ead84c4fd4bdb6212c0f579a255c7494896fd2a498890c58e853315892c3c9d78635b58da5423b1b2211b991639474d19eca1f2992f SHA512 bdaabf747e60ae1cf2c9fedb0730a2e3deb914609db05ffc7e4cbd5402bc44e84d2c98154f14fdd7f944c2f49eb5dead0f44c119ac5a16bd7491c3369d784f5c
|
||||
DIST gradle-bin-5.2.1.zip 132549774 BLAKE2B c6d6fa9975bc28030672a99f22f0e9c4c2cb3d667ae3658c1062428d0ab2fd8c3b4df0479f4fde7b2d75b8fcb64c7f5b208e53c5b30a9b3c7afb5ad7e1a4139d SHA512 e2a17072c10d27acbe4a0282dfdfed907ab5c57109668595feaec681ab1d4be017ac0f6090c2c2b64a057d71c1e244bb50f4047509d36c5930e894837a96171b
|
||||
DIST gradle-bin-6.3.zip 145161013 BLAKE2B f840bda2c1e2a6dd5306b9f7ad6fc8ae8c3d7342de57bd813b8dff64f733fc058af8dc7c9c5a138eac4eef3d5d12074976db81fe7eeb51b52d726502af04d036 SHA512 9796c14f8d4559128b4cb7e676883d83ef99b67242ae8156abebdb38bb7a561e8b3df3f93b24aa53274b7d78a7b04ea51e73268c2465799daa9da53ef73de24d
|
||||
|
@ -0,0 +1,49 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
IUSE="doc"
|
||||
JAVA_PKG_IUSE="source"
|
||||
|
||||
inherit java-pkg-2
|
||||
|
||||
MY_PN=${PN%%-bin}
|
||||
MY_P="${MY_PN}-${PV/_rc/-rc-}"
|
||||
|
||||
DESCRIPTION="A project automation and build tool with a Groovy based DSL"
|
||||
SRC_URI="https://services.gradle.org/distributions/${MY_P}-all.zip -> ${P}.zip"
|
||||
HOMEPAGE="https://www.gradle.org/"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
BDEPEND="app-arch/unzip"
|
||||
DEPEND=">=virtual/jre-1.8"
|
||||
RDEPEND=">=virtual/jdk-1.8"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_install() {
|
||||
local gradle_dir="${EPREFIX}/usr/share/${PN}-${SLOT}"
|
||||
|
||||
insinto "${gradle_dir}"
|
||||
doins -r lib/
|
||||
|
||||
exeinto "${gradle_dir}"/bin
|
||||
doexe bin/${MY_PN}
|
||||
dosym "../${gradle_dir##*/usr/}/bin/gradle" "/usr/bin/${MY_PN}-${SLOT}"
|
||||
|
||||
docinto html
|
||||
dodoc -r docs/release-notes.html
|
||||
|
||||
if use doc ; then
|
||||
dodoc -r docs/{dsl,userguide}
|
||||
java-pkg_dojavadoc docs/javadoc
|
||||
fi
|
||||
|
||||
if use source ; then
|
||||
java-pkg_dosrc src/*
|
||||
fi
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST tomcat-native-1.2.23-src.tar.gz 419428 BLAKE2B b8e0584d3e42c33158c4edf0432b029ee924a509b00625af6a34af3d580fec510fa0222367ea8679a20b51cb5a7c55198f5a2d4ec60d0fa9dbec3a0a22a11b52 SHA512 89a0363961d322a87f4e752f4727f54f28ac6e4ad10fa21b6b7390c62b041d4068672d95495d9233c1cad7d6c1dc3c85fbd0186894085b3b94e476876af160ee
|
||||
DIST tomcat-native-1.2.24-src.tar.gz 419572 BLAKE2B 572f6d64b8f4c22ed1ab68efcec5cd1c57fe01e7b0830dea979039cb702a2930458e7bb31abdeddcacc6d673513c896ca46d28ece681c6c42938498351962b36 SHA512 5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
|
||||
|
@ -0,0 +1,62 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit java-pkg-2 java-ant-2
|
||||
|
||||
DESCRIPTION="Allows Tomcat to use certain native resources for better performance"
|
||||
HOMEPAGE="https://tomcat.apache.org/"
|
||||
SRC_URI="mirror://apache/tomcat/tomcat-connectors/native/${PV}/source/${P}-src.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="static-libs test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="dev-libs/apr:1=
|
||||
dev-libs/openssl:0=
|
||||
>=virtual/jre-1.8"
|
||||
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
test? ( dev-java/ant-junit:0 )"
|
||||
|
||||
S=${WORKDIR}/${P}-src
|
||||
|
||||
JAVA_ANT_REWRITE_CLASSPATH="yes"
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-apr="${EPREFIX}"/usr/bin/apr-1-config
|
||||
--with-ssl="${EPREFIX}"/usr
|
||||
)
|
||||
|
||||
cd native || die
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
eant jar
|
||||
|
||||
cd native || die
|
||||
default
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg_newjar "dist/${P}.jar" "${PN}.jar"
|
||||
|
||||
cd native || die
|
||||
default
|
||||
|
||||
! use static-libs && find "${D}" -name '*.la' -delete || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
java-pkg-2_src_test
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "For more information, please visit"
|
||||
elog "https://tomcat.apache.org/tomcat-9.0-doc/apr.html"
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="source"
|
||||
|
||||
inherit eutils java-pkg-2 java-ant-2
|
||||
|
||||
MY_A="apache-${P}-src"
|
||||
MY_P="${MY_A/-servlet-api/}"
|
||||
DESCRIPTION="Tomcat's Servlet API 3.0/JSP API 2.2 implementation"
|
||||
HOMEPAGE="https://tomcat.apache.org/"
|
||||
SRC_URI="mirror://apache/tomcat/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3.0"
|
||||
KEYWORDS="amd64 ~arm64 ~ppc64 x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=virtual/jdk-1.6"
|
||||
RDEPEND=">=virtual/jre-1.6"
|
||||
|
||||
S="${WORKDIR}/${MY_P}/"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
cp "${FILESDIR}/${SLOT}-build.xml" build.xml || die "Could not replace build.xml"
|
||||
rm -fR */*/build.xml ||die
|
||||
java-pkg_clean
|
||||
|
||||
java-pkg-2_src_prepare
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg_dojar "${S}"/output/build/lib/*.jar
|
||||
use source && java-pkg_dosrc java/javax/servlet/
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
JAVA_PKG_IUSE="source"
|
||||
|
||||
inherit eutils java-pkg-2 java-ant-2
|
||||
|
||||
MY_A="apache-${P}-src"
|
||||
MY_P="${MY_A/-servlet-api/}"
|
||||
DESCRIPTION="Tomcat's Servlet API 3.1/JSP API 2.3/EL API 3.0 implementation"
|
||||
HOMEPAGE="https://tomcat.apache.org/"
|
||||
SRC_URI="mirror://apache/tomcat/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="3.1"
|
||||
KEYWORDS="amd64 ~arm64 ppc64 x86 ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=virtual/jdk-1.8"
|
||||
RDEPEND=">=virtual/jre-1.8"
|
||||
|
||||
S="${WORKDIR}/${MY_P}/"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
cp "${FILESDIR}/${SLOT}-build.xml" build.xml || die "Could not replace build.xml"
|
||||
rm -fR */*/build.xml
|
||||
einfo "Removing bundled jars and classes"
|
||||
find "${S}" '(' -name '*.class' -o -name '*.jar' ')' -exec rm -frv {} +
|
||||
|
||||
java-pkg-2_src_prepare
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg_dojar "${S}"/output/build/lib/*.jar
|
||||
use source && java-pkg_dosrc java/javax/servlet/
|
||||
}
|
Binary file not shown.
@ -1,197 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
export CBUILD=${CBUILD:-${CHOST}}
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
|
||||
MY_PV=${PV/_/}
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
case ${PV} in
|
||||
*9999*)
|
||||
EGIT_REPO_URI="https://github.com/golang/go.git"
|
||||
inherit git-r3
|
||||
;;
|
||||
*)
|
||||
SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz "
|
||||
S="${WORKDIR}"/go
|
||||
case ${PV} in
|
||||
*_beta*|*_rc*) ;;
|
||||
*)
|
||||
KEYWORDS="-* amd64 arm arm64 ppc64 ~s390 x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
|
||||
# The upstream tests fail under portage but pass if the build is
|
||||
# run according to their documentation [1].
|
||||
# I am restricting the tests on released versions until this is
|
||||
# solved.
|
||||
# [1] https://golang.org/issues/18442
|
||||
RESTRICT="test"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
|
||||
HOMEPAGE="https://golang.org"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
|
||||
BDEPEND="|| (
|
||||
dev-lang/go
|
||||
dev-lang/go-bootstrap )"
|
||||
RDEPEND="!<dev-go/go-tools-0_pre20150902"
|
||||
|
||||
# These test data objects have writable/executable stacks.
|
||||
QA_EXECSTACK="
|
||||
usr/lib/go/src/debug/elf/testdata/*.obj
|
||||
usr/lib/go/src/*.gox
|
||||
"
|
||||
|
||||
# Do not complain about CFLAGS, etc, since Go doesn't use them.
|
||||
QA_FLAGS_IGNORED='.*'
|
||||
|
||||
REQUIRES_EXCLUDE="/usr/lib/go/src/debug/elf/testdata/*"
|
||||
|
||||
# The tools in /usr/lib/go should not cause the multilib-strict check to fail.
|
||||
QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*"
|
||||
|
||||
# Do not strip this package. Stripping is unsupported upstream and may
|
||||
# fail.
|
||||
RESTRICT+=" strip"
|
||||
|
||||
DOCS=(
|
||||
AUTHORS
|
||||
CONTRIBUTING.md
|
||||
CONTRIBUTORS
|
||||
PATENTS
|
||||
README.md
|
||||
)
|
||||
|
||||
go_arch()
|
||||
{
|
||||
# By chance most portage arch names match Go
|
||||
local portage_arch=$(tc-arch $@)
|
||||
case "${portage_arch}" in
|
||||
x86) echo 386;;
|
||||
x64-*) echo amd64;;
|
||||
ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;;
|
||||
s390) echo s390x ;;
|
||||
*) echo "${portage_arch}";;
|
||||
esac
|
||||
}
|
||||
|
||||
go_arm()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
armv5*) echo 5;;
|
||||
armv6*) echo 6;;
|
||||
armv7*) echo 7;;
|
||||
*)
|
||||
die "unknown GOARM for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_os()
|
||||
{
|
||||
case "${1:-${CHOST}}" in
|
||||
*-linux*) echo linux;;
|
||||
*-darwin*) echo darwin;;
|
||||
*-freebsd*) echo freebsd;;
|
||||
*-netbsd*) echo netbsd;;
|
||||
*-openbsd*) echo openbsd;;
|
||||
*-solaris*) echo solaris;;
|
||||
*-cygwin*|*-interix*|*-winnt*)
|
||||
echo windows
|
||||
;;
|
||||
*)
|
||||
die "unknown GOOS for ${1:-${CHOST}}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
go_tuple()
|
||||
{
|
||||
echo "$(go_os $@)_$(go_arch $@)"
|
||||
}
|
||||
|
||||
go_cross_compile()
|
||||
{
|
||||
[[ $(go_tuple ${CBUILD}) != $(go_tuple) ]]
|
||||
}
|
||||
|
||||
src_compile()
|
||||
{
|
||||
if has_version -b dev-lang/go; then
|
||||
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
|
||||
elif has_version -b dev-lang/go-bootstrap; then
|
||||
export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
|
||||
else
|
||||
eerror "Go cannot be built without go or go-bootstrap installed"
|
||||
die "Should not be here, please report a bug"
|
||||
fi
|
||||
|
||||
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
|
||||
export GOROOT="$(pwd)"
|
||||
export GOBIN="${GOROOT}/bin"
|
||||
|
||||
# Go's build script does not use BUILD/HOST/TARGET consistently. :(
|
||||
export GOHOSTARCH=$(go_arch ${CBUILD})
|
||||
export GOHOSTOS=$(go_os ${CBUILD})
|
||||
export CC=$(tc-getBUILD_CC)
|
||||
|
||||
export GOARCH=$(go_arch)
|
||||
export GOOS=$(go_os)
|
||||
export CC_FOR_TARGET=$(tc-getCC)
|
||||
export CXX_FOR_TARGET=$(tc-getCXX)
|
||||
if [[ ${ARCH} == arm ]]; then
|
||||
export GOARM=$(go_arm)
|
||||
fi
|
||||
|
||||
cd src
|
||||
./make.bash || die "build failed"
|
||||
}
|
||||
|
||||
src_test()
|
||||
{
|
||||
go_cross_compile && return 0
|
||||
|
||||
cd src
|
||||
PATH="${GOBIN}:${PATH}" \
|
||||
./run.bash -no-rebuild || die "tests failed"
|
||||
}
|
||||
|
||||
src_install()
|
||||
{
|
||||
local bin_path f x
|
||||
|
||||
dodir /usr/lib/go
|
||||
|
||||
# There is a known issue which requires the source tree to be installed [1].
|
||||
# Once this is fixed, we can consider using the doc use flag to control
|
||||
# installing the doc and src directories.
|
||||
# [1] https://golang.org/issue/2775
|
||||
#
|
||||
# deliberately use cp to retain permissions
|
||||
cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go
|
||||
if go_cross_compile; then
|
||||
bin_path="bin/$(go_tuple)"
|
||||
else
|
||||
bin_path=bin
|
||||
fi
|
||||
for x in ${bin_path}/*; do
|
||||
f=${x##*/}
|
||||
dosym ../lib/go/${bin_path}/${f} /usr/bin/${f}
|
||||
done
|
||||
einstalldocs
|
||||
|
||||
if [[ ${CHOST} == *-darwin* ]] ; then
|
||||
# fix install_name for test object (binutils_test) on Darwin, it
|
||||
# is never used in real circumstances
|
||||
local libmac64="${EPREFIX}"/usr/lib/go/src/cmd/vendor/github.com/
|
||||
libmac64+=google/pprof/internal/binutils/testdata/lib_mac_64
|
||||
install_name_tool -id "${libmac64}" "${D}${libmac64}"
|
||||
fi
|
||||
}
|
@ -0,0 +1,327 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="7"
|
||||
WANT_LIBTOOL="none"
|
||||
|
||||
inherit autotools check-reqs flag-o-matic pax-utils python-utils-r1 \
|
||||
toolchain-funcs
|
||||
|
||||
MY_P="Python-${PV/_alpha/a}"
|
||||
PYVER=$(ver_cut 1-2)
|
||||
PATCHSET="python-gentoo-patches-3.9.0_alpha6"
|
||||
|
||||
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
|
||||
HOMEPAGE="https://www.python.org/"
|
||||
SRC_URI="https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
|
||||
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
LICENSE="PSF-2"
|
||||
SLOT="${PYVER}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
# Do not add a dependency on dev-lang/python to this ebuild.
|
||||
# If you need to apply a patch which requires python for bootstrapping, please
|
||||
# run the bootstrap code on your dev box and include the results in the
|
||||
# patchset. See bug 447752.
|
||||
|
||||
RDEPEND="app-arch/bzip2:=
|
||||
app-arch/xz-utils:=
|
||||
dev-libs/libffi:=
|
||||
sys-apps/util-linux:=
|
||||
>=sys-libs/zlib-1.1.3:=
|
||||
virtual/libcrypt:=
|
||||
virtual/libintl
|
||||
gdbm? ( sys-libs/gdbm:=[berkdb] )
|
||||
ncurses? ( >=sys-libs/ncurses-5.2:= )
|
||||
readline? ( >=sys-libs/readline-4.1:= )
|
||||
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
|
||||
ssl? (
|
||||
!libressl? ( dev-libs/openssl:= )
|
||||
libressl? ( dev-libs/libressl:= )
|
||||
)
|
||||
tk? (
|
||||
>=dev-lang/tcl-8.0:=
|
||||
>=dev-lang/tk-8.0:=
|
||||
dev-tcltk/blt:=
|
||||
dev-tcltk/tix
|
||||
)
|
||||
xml? ( >=dev-libs/expat-2.1:= )"
|
||||
# bluetooth requires headers from bluez
|
||||
DEPEND="${RDEPEND}
|
||||
bluetooth? ( net-wireless/bluez )
|
||||
test? ( app-arch/xz-utils[extra-filters(+)] )
|
||||
virtual/pkgconfig
|
||||
!sys-devel/gcc[libffi(-)]"
|
||||
RDEPEND+=" !build? ( app-misc/mime-types )"
|
||||
PDEPEND=">=app-eselect/eselect-python-20140125-r1"
|
||||
|
||||
# large file tests involve a 2.5G file being copied (duplicated)
|
||||
CHECKREQS_DISK_BUILD=5500M
|
||||
|
||||
pkg_pretend() {
|
||||
use test && check-reqs_pkg_pretend
|
||||
|
||||
ewarn "This is an early developer preview of Python 3.9. New features"
|
||||
ewarn "can still be added up to 2020-05-18. It's not suitable for production"
|
||||
ewarn "use, and it is not supported for Gentoo packages."
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use test && check-reqs_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Ensure that internal copies of expat, libffi and zlib are not used.
|
||||
rm -fr Modules/expat || die
|
||||
rm -fr Modules/_ctypes/libffi* || die
|
||||
rm -fr Modules/zlib || die
|
||||
|
||||
local PATCHES=(
|
||||
"${WORKDIR}/${PATCHSET}"
|
||||
)
|
||||
|
||||
default
|
||||
|
||||
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
|
||||
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local disable
|
||||
# disable automagic bluetooth headers detection
|
||||
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
|
||||
use gdbm || disable+=" gdbm"
|
||||
use ncurses || disable+=" _curses _curses_panel"
|
||||
use readline || disable+=" readline"
|
||||
use sqlite || disable+=" _sqlite3"
|
||||
use ssl || export PYTHON_DISABLE_SSL="1"
|
||||
use tk || disable+=" _tkinter"
|
||||
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
|
||||
export PYTHON_DISABLE_MODULES="${disable}"
|
||||
|
||||
if ! use xml; then
|
||||
ewarn "You have configured Python without XML support."
|
||||
ewarn "This is NOT a recommended configuration as you"
|
||||
ewarn "may face problems parsing any XML documents."
|
||||
fi
|
||||
|
||||
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
|
||||
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
|
||||
fi
|
||||
|
||||
if [[ "$(gcc-major-version)" -ge 4 ]]; then
|
||||
append-flags -fwrapv
|
||||
fi
|
||||
|
||||
filter-flags -malign-double
|
||||
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=50309
|
||||
if is-flagq -O3; then
|
||||
is-flagq -fstack-protector-all && replace-flags -O3 -O2
|
||||
use hardened && replace-flags -O3 -O2
|
||||
fi
|
||||
|
||||
# https://bugs.gentoo.org/700012
|
||||
if is-flagq -flto || is-flagq '-flto=*'; then
|
||||
append-cflags $(test-flags-CC -ffat-lto-objects)
|
||||
fi
|
||||
|
||||
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
|
||||
tc-export CXX
|
||||
|
||||
# Set LDFLAGS so we link modules with -lpython3.2 correctly.
|
||||
# Needed on FreeBSD unless Python 3.2 is already installed.
|
||||
# Please query BSD team before removing this!
|
||||
append-ldflags "-L."
|
||||
|
||||
# Fix implicit declarations on cross and prefix builds. Bug #674070.
|
||||
use ncurses && append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
|
||||
|
||||
local dbmliborder
|
||||
if use gdbm; then
|
||||
dbmliborder+="${dbmliborder:+:}gdbm"
|
||||
fi
|
||||
|
||||
local myeconfargs=(
|
||||
# glibc-2.30 removes it; since we can't cleanly force-rebuild
|
||||
# Python on glibc upgrade, remove it proactively to give
|
||||
# a chance for users rebuilding python before glibc
|
||||
ac_cv_header_stropts_h=no
|
||||
|
||||
--enable-shared
|
||||
$(use_enable ipv6)
|
||||
--infodir='${prefix}/share/info'
|
||||
--mandir='${prefix}/share/man'
|
||||
--with-computed-gotos
|
||||
--with-dbmliborder="${dbmliborder}"
|
||||
--with-libc=
|
||||
--enable-loadable-sqlite-extensions
|
||||
--without-ensurepip
|
||||
--with-system-expat
|
||||
--with-system-ffi
|
||||
)
|
||||
|
||||
OPT="" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Ensure sed works as expected
|
||||
# https://bugs.gentoo.org/594768
|
||||
local -x LC_ALL=C
|
||||
|
||||
emake CPPFLAGS= CFLAGS= LDFLAGS=
|
||||
|
||||
# Work around bug 329499. See also bug 413751 and 457194.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E python
|
||||
else
|
||||
pax-mark m python
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Tests will not work when cross compiling.
|
||||
if tc-is-cross-compiler; then
|
||||
elog "Disabling tests due to crosscompiling."
|
||||
return
|
||||
fi
|
||||
|
||||
# Skip failing tests.
|
||||
local skipped_tests="gdb"
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${S}"/Lib/test/test_${test}.py "${T}"
|
||||
done
|
||||
|
||||
# bug 660358
|
||||
local -x COLUMNS=80
|
||||
|
||||
local -x PYTHONDONTWRITEBYTECODE=
|
||||
|
||||
emake test EXTRATESTOPTS="-u-network" CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
|
||||
local result=$?
|
||||
|
||||
for test in ${skipped_tests}; do
|
||||
mv "${T}/test_${test}.py" "${S}"/Lib/test
|
||||
done
|
||||
|
||||
elog "The following tests have been skipped:"
|
||||
for test in ${skipped_tests}; do
|
||||
elog "test_${test}.py"
|
||||
done
|
||||
|
||||
elog "If you would like to run them, you may:"
|
||||
elog "cd '${EPREFIX}/usr/lib/python${PYVER}/test'"
|
||||
elog "and run the tests separately."
|
||||
|
||||
if [[ ${result} -ne 0 ]]; then
|
||||
die "emake test failed"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local libdir=${ED}/usr/lib/python${PYVER}
|
||||
|
||||
emake DESTDIR="${D}" altinstall
|
||||
|
||||
# Remove static library
|
||||
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
|
||||
|
||||
sed \
|
||||
-e "s/\(CONFIGURE_LDFLAGS=\).*/\1/" \
|
||||
-e "s/\(PY_LDFLAGS=\).*/\1/" \
|
||||
-i "${libdir}/config-${PYVER}"*/Makefile || die "sed failed"
|
||||
|
||||
# Fix collisions between different slots of Python.
|
||||
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
|
||||
|
||||
# Cheap hack to get version with ABIFLAGS
|
||||
local abiver=$(cd "${ED}/usr/include"; echo python*)
|
||||
if [[ ${abiver} != python${PYVER} ]]; then
|
||||
# Replace python3.X with a symlink to python3.Xm
|
||||
rm "${ED}/usr/bin/python${PYVER}" || die
|
||||
dosym "${abiver}" "/usr/bin/python${PYVER}"
|
||||
# Create python3.X-config symlink
|
||||
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
|
||||
# Create python-3.5m.pc symlink
|
||||
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
|
||||
fi
|
||||
|
||||
# python seems to get rebuilt in src_install (bug 569908)
|
||||
# Work around it for now.
|
||||
if has_version dev-libs/libffi[pax_kernel]; then
|
||||
pax-mark E "${ED}/usr/bin/${abiver}"
|
||||
else
|
||||
pax-mark m "${ED}/usr/bin/${abiver}"
|
||||
fi
|
||||
|
||||
use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
|
||||
use tk || rm -r "${ED}/usr/bin/idle${PYVER}" "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
|
||||
|
||||
dodoc Misc/{ACKS,HISTORY,NEWS}
|
||||
|
||||
if use examples; then
|
||||
docinto examples
|
||||
find Tools -name __pycache__ -exec rm -fr {} + || die
|
||||
dodoc -r Tools
|
||||
fi
|
||||
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
|
||||
local libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \
|
||||
emake --no-print-directory -s -f - 2>/dev/null)
|
||||
newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py
|
||||
|
||||
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
|
||||
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
|
||||
sed \
|
||||
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
|
||||
-e "s:@PYDOC@:pydoc${PYVER}:" \
|
||||
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
|
||||
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
|
||||
|
||||
local -x EPYTHON=python${PYVER}
|
||||
# if not using a cross-compiler, use the fresh binary
|
||||
if ! tc-is-cross-compiler; then
|
||||
local -x PYTHON=./python
|
||||
local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}${PWD}
|
||||
else
|
||||
local -x PYTHON=${EPREFIX}/usr/bin/${EPYTHON}
|
||||
fi
|
||||
|
||||
echo "EPYTHON='${EPYTHON}'" > epython.py || die
|
||||
python_domodule epython.py
|
||||
|
||||
# python-exec wrapping support
|
||||
local pymajor=${PYVER%.*}
|
||||
local scriptdir=${D}$(python_get_scriptdir)
|
||||
mkdir -p "${scriptdir}" || die
|
||||
# python and pythonX
|
||||
ln -s "../../../bin/${abiver}" \
|
||||
"${scriptdir}/python${pymajor}" || die
|
||||
ln -s "python${pymajor}" "${scriptdir}/python" || die
|
||||
# python-config and pythonX-config
|
||||
# note: we need to create a wrapper rather than symlinking it due
|
||||
# to some random dirname(argv[0]) magic performed by python-config
|
||||
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
|
||||
#!/bin/sh
|
||||
exec "${abiver}-config" "\${@}"
|
||||
EOF
|
||||
chmod +x "${scriptdir}/python${pymajor}-config" || die
|
||||
ln -s "python${pymajor}-config" \
|
||||
"${scriptdir}/python-config" || die
|
||||
# 2to3, pydoc
|
||||
ln -s "../../../bin/2to3-${PYVER}" \
|
||||
"${scriptdir}/2to3" || die
|
||||
ln -s "../../../bin/pydoc${PYVER}" \
|
||||
"${scriptdir}/pydoc" || die
|
||||
# idle
|
||||
if use tk; then
|
||||
ln -s "../../../bin/idle${PYVER}" \
|
||||
"${scriptdir}/idle" || die
|
||||
fi
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
GNOME2_EAUTORECONF="yes"
|
||||
|
||||
inherit gnome2
|
||||
|
||||
DESCRIPTION="Compiler for the GObject type system"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0.44"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~x86-linux"
|
||||
IUSE="test valadoc"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.40.0:2
|
||||
>=dev-libs/vala-common-${PV}
|
||||
valadoc? ( >=media-gfx/graphviz-2.16 )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
!${CATEGORY}/${PN}:0
|
||||
dev-libs/libxslt
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
virtual/yacc
|
||||
test? (
|
||||
dev-libs/dbus-glib
|
||||
>=dev-libs/glib-2.26:2
|
||||
dev-libs/gobject-introspection )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# Add missing bits to make valadoc parallel installable
|
||||
"${FILESDIR}"/0.44-valadoc-doclets-data-parallel-installable.patch
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
# weasyprint enables generation of PDF from HTML
|
||||
gnome2_src_configure \
|
||||
--disable-unversioned \
|
||||
$(use_enable valadoc) \
|
||||
VALAC=: \
|
||||
WEASYPRINT=:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name "*.la" -delete || die
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit gnome2
|
||||
|
||||
DESCRIPTION="Compiler for the GObject type system"
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
|
||||
|
||||
LICENSE="LGPL-2.1+"
|
||||
SLOT="0.48"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-linux"
|
||||
IUSE="test valadoc"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/glib-2.48.0:2
|
||||
>=dev-libs/vala-common-${PV}
|
||||
valadoc? ( >=media-gfx/graphviz-2.16 )
|
||||
!<net-libs/libsoup-2.66.2[vala]
|
||||
" # Older libsoup generates a libsoup-2.4.vapi that isn't fine for vala:0.46 anymore
|
||||
# We block here, so libsoup[vala] consumers wouldn't have to >= it, which would be bad
|
||||
# as the newer is not required with older vala when those are picked instead of 0.46.
|
||||
# vala-0.45.91 ships a broken libsoup-2.4.vapi copy too, but that'll be fixed by 0.45.92
|
||||
DEPEND="${RDEPEND}
|
||||
dev-libs/libxslt
|
||||
sys-devel/flex
|
||||
virtual/pkgconfig
|
||||
virtual/yacc
|
||||
test? (
|
||||
dev-libs/dbus-glib
|
||||
>=dev-libs/glib-2.26:2
|
||||
dev-libs/gobject-introspection )
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
# weasyprint enables generation of PDF from HTML
|
||||
gnome2_src_configure \
|
||||
--disable-unversioned \
|
||||
$(use_enable valadoc) \
|
||||
VALAC=: \
|
||||
WEASYPRINT=:
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
find "${D}" -name "*.la" -delete || die
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue