Sync with portage [Fri May 12 10:16:23 MSK 2017].

mhiretskiy 873
root 7 years ago
parent b449bdcf46
commit 91e51d4b55

@ -1,2 +1,2 @@
DIST cli53-0.8.4.tar.gz 4368956 SHA256 ab57119af8e0f2af67616ef0d860ef055a97c077447fe5740c7123b2890cf6bd SHA512 281965532ff05b62bbf5bb0d5e6407df0587f86feb5de21b6b510a85106cadf79ada444f0e0f6293542e74635ca5d3bed753030634291d69b1ded4959acf05f6 WHIRLPOOL a334966b982dfaa6dd02275a38834926e8702b700d97037ee36405f9a72f00a02b36fc3a19e58d0073dc8d6783f644f86bfa342cd1283bbc87e1c99e7531340c
DIST cli53-0.8.7.tar.gz 4369907 SHA256 c05918a1c1e5e660bda4b6ca080234a5ccc7c02d8c5b5f9f761faa57f53fb95c SHA512 ee2efa13a01597312241f7a5ce7a9f0f299d24cab0e44099376c5592118c9ab62331d10f8ff29c3fe15467aa806aa1db14e1f05ae4c841f906695b67dc983991 WHIRLPOOL a716309b0713fca9b1f708dee4ee4b42ca11b86364708d7eab20b24ce16f906ca3ee2d2cd894ab97ba3b185b567f6eb4c3677027e86ee4337ceca989419718aa
DIST cli53-0.8.8.tar.gz 4371616 SHA256 31c4dcd25c0fa514d6d02f5668bd55295ec2d5c07ee3e2e5219034b9bbc3d37f SHA512 ee9e73094de3b0aff6679b12a08ca176104935bd40bff31ce9721bc8a2d23f2ef3338ea5711cec24336e091bae6c89454ba9990b7a4804f0d08c589ec44e0221 WHIRLPOOL d3106e1a050507f67d3e158c6ead422f05af02fa19a3e654f474d0770758266041cc4c7829e74b61d686d01a0a124e155f28f277c6d19fe441e63d2cb362c4ff

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6

@ -1 +1,2 @@
DIST clustershell-1.6.tar.gz 950548 SHA256 ea119555ba9a4a8aa17d355345772263c20e2cc362140f55933ce217d7633e07 SHA512 d94979bf5b5ead406f49e4ba691cf8541c03398913eb2fb9da724f50ba8b47059b76ddb6058dc5aaea86bbc8588b4d9c75cc34a8a7a94dcfa184ca73250c3b02 WHIRLPOOL 889c250e6ef364dcab20960fb0fd84e6d8e00d8c185d40704b9a5845e4f45ea3fe074bdba5713aadb5cad04e11933b1d8a98fb7b80ec559682c699850c517975
DIST clustershell-1.7.3.tar.gz 345447 SHA256 05724cf189aae4585576faa5183eb9be97bf2993b1d0049b9e0e2689f76661fc SHA512 acb8e8a5b4a576ee93fbe23a8d903bab813f4182b50d9cd752b3684c743e611d3ee3fcfde31818c0a92495a3ee7640094d4568a03fdbf543e398a1b741a978d4 WHIRLPOOL 6279f2afc57e3e7af9f76b952c4a56baf26ad1055e84e0b369591c9466aaa55636e8d4a6ffaccff8f2c478a29471b6b27fd8b63e4c53d5410f755769ceabe0ff

@ -0,0 +1,57 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# TODO: test phase
EAPI=6
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE="xml"
inherit distutils-r1
DESCRIPTION="Python framework for efficient cluster administration"
HOMEPAGE="https://cea-hpc.github.com/clustershell/"
SRC_URI="https://github.com/cea-hpc/clustershell/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc libressl test"
CDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="${CDEPEND}
test? ( dev-python/nose[${PYTHON_USEDEP}] )"
RDEPEND="${CDEPEND}
dev-python/pyyaml[${PYTHON_USEDEP}]
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )"
RESTRICT="test" # currently fail
src_install() {
distutils-r1_src_install
if use doc ; then
local i
for i in $(ls -I man "${S}"/doc) ; do
dodoc -r doc/${i}
done
fi
doman doc/man/man*/*
insinto /etc/${PN}
doins -r conf/*
}
python_test() {
cd tests || die
nosetests -sv --all-modules || die
}
pkg_postinst() {
einfo
einfo "Some default system-wide config files have been installed into"
einfo "/etc/${PN}"
einfo
}

@ -0,0 +1 @@
DIST gixy-0.1.3.tar.gz 31484 SHA256 bffb35c111807379eda3a4ea4da32587ad7368bc8fe7d5436dddb65037e39198 SHA512 d366b0a5198424127e37656bdf09edd3c6005c6e302f01a7787c649f9c8cf84084c02441beea11246592ee2dbbf6c87ab241ab627d0571f3511ffb2cc8855b7c WHIRLPOOL a624da9d0ba7ca040ad3f5b764174261bb4481e258fff2c75acdbf84150158a4032386c9209757860f03f27383561e72541323ddc46068cfdea89d491ea2f43d

@ -0,0 +1,31 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_5,3_6} )
inherit distutils-r1
DESCRIPTION="Nginx configuration static analyzer"
HOMEPAGE="https://github.com/yandex/gixy"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND=">=dev-python/pyparsing-1.5.5[${PYTHON_USEDEP}]
>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
>=dev-python/configargparse-0.11.0[${PYTHON_USEDEP}]
>=dev-python/jinja-2.8[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/six-1.1.0[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"
python_prepare() {
sed -i -e "/argparse/d" setup.py || die
distutils-r1_python_prepare_all
}

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>mrueg@gentoo.org</email>
<name>Manuel Rüger</name>
</maintainer>
<upstream>
<remote-id type="github">yandex/gixy</remote-id>
</upstream>
</pkgmetadata>

@ -1,10 +1,6 @@
DIST puppet-agent_1.10.0-1xenial_amd64.deb 16335972 SHA256 06549935539c28cba369e8aeabd415b88c7fb7f484f1491a79fb5ebf14485dfc SHA512 79d02adca4d053f7d60b1cf76c88695504f522e7f2c223bac9e6deefa9d4c081a4835477e6b30d27890f4bc1dab86edbad5410f4c3eb5c1407e7fdc98b3a41c2 WHIRLPOOL 060c579702ea1cc6a82c85e699358e233506899774c7d845fd2d88e4351765794590e945dbc6f61edf090260ad63f055bf5f1757721e329074404956d7685f0c
DIST puppet-agent_1.10.0-1xenial_i386.deb 16086120 SHA256 6f491fb46c40be4a57d95e284116f1056779cad8a20ee31be5f27f02e720f2b0 SHA512 80f3ae5d0f43d4a9f73c578e6b07ce503d995133c45a63fc37395e9f3a3b60cd9628a071d0c00a11642afa531f732e42ec24d9823224257aeebbe2c6a0dd2177 WHIRLPOOL 2a41098ae48ceec4ba8d38c67fddccbea6860c4a1275236be4de002344c5f5fd765e9c51c59cf112e03ec631559680703d2d3228e0e57d306ec9078637a45946
DIST puppet-agent_1.8.2-1xenial_amd64.deb 15179348 SHA256 5195af288ca014bcf65705c3fb83a1da8caf02eb1f431396380951480fb7e2dc SHA512 6093012994faaa3e7248c3e705e2dcb9269c85cfd4405c7ac66ab0adf3a547bc37ad3f5d44530514ed30a4edb01c01522eae1bced8d7ebade9ceb737ee600449 WHIRLPOOL 9905c00b16b12b75b331faf60c5ba3ad948a04db1ad4ef9b11aa413442fd464b836cc295cb4e0d85c34ebb3f97f470141cf207491fbeedb7964409ab75420f44
DIST puppet-agent_1.8.2-1xenial_i386.deb 16609778 SHA256 48d4588ae8c87a3a3e41c5c4e6159cba7bf6484578ce0761b4abd76854f7bdad SHA512 b96e239906e75773a22c37a28c3c794b7293cab1a970ba5067064b120e12e0a6f0b620f06dfb3cc5b83e9140467fa552aa05ea46a33f3fb8b489ac7790cb7734 WHIRLPOOL 6daf05a7ae5e50ecb922ffa260101cc62e64267fd40ca6dd8d684ab1b3760eb45a4f797f9644b7fb351f70a86e88d5c88cd1cc5dd4d68341912846466ba72257
DIST puppet-agent_1.8.3-1xenial_amd64.deb 15531434 SHA256 2a468846e4b31f07dce9bbbf96c3fe06a528512cbc37bedc7ab44715a6833e94 SHA512 11958f51b75e012484f332b49d66bba225fdc19634f3972dfe5117ce7971d187bd7bca36dff079cd898e48c3545d560f34ee57a3acb710427154875d9d99100a WHIRLPOOL 895050da0f52a1e977d58802dcc5e5db11c331d5ad30732b1ac80e799d8b3312034efa800e3489b789cc40e9c156a5fe66050264d01a33c4a85e489a647b6324
DIST puppet-agent_1.8.3-1xenial_i386.deb 16564720 SHA256 c2d5a1fd91941031b375b59f85f323a38977cc526b33e73f93eae50ee036fd65 SHA512 bb617c351ba26d431a6f0d6aa150c8888ee822feb63ebb56557586547e8afc9d387c5af6a6c59e6a885bc6ab195c89b3ea9317de74440abe6df76870c3dca345 WHIRLPOOL cdfd414d9113add49f9b60d5efcd5f16ce0f71a1bb094a4e98c31486b8ff86b1f9dbe1b5da0724358aa78d8f75c3aed9c8247a62595cdde92eab74519b9d06ef
DIST puppet-agent_1.9.1-1xenial_amd64.deb 15458462 SHA256 ed7a124842b48a3ec16875dfbdf8942437d1d137768003918ef681838f2bcfc6 SHA512 1eaba0dabc7000b873dc776f74f7f0ea2084cdb0ffb39f4d344798458e20b36f233256d4648676954ecaad7dd1f0762823febe4e948c622dd8e1a599cb23cb7c WHIRLPOOL d1ba1ebc8519eb7329203d9fffd8447c7d3a141cfad798c09dc7011442f7a38da41b9b275778e6c5d5929fae94bd89ee9033f847bb1116d3afe7be90bd4525e0
DIST puppet-agent_1.9.1-1xenial_i386.deb 16870810 SHA256 6739a03ab3ffa69680c84aed79f50e3e0383a50055b1e5f5545a24aec68c3791 SHA512 421b32d2eba33af0bbbbbd41f3615222c1907107023f6cb80bb23a9378f5ba9cc26bac24749c611cc41fc52bca25df92377ba76cfd2d09d1328067138d2a8db3 WHIRLPOOL e9abd1b50856577e7892511b94f9ca64b023f41ff39c6fd106874305380522cf7fd98e0d659eb896d400fd8865510dec7144a7915fa4f3bb069069d74302612f
DIST puppet-agent_1.10.1-1xenial_amd64.deb 16276180 SHA256 e0dc22258c2f23302ed2f1f5dd024d9e780a7d3dc49646c24afd2560eb45a9e7 SHA512 308504915621c4ae28780e32877e672067a13f9bd6b5e2dac35bdb4ab62596099eaddd8da371cc97edb0ff15419d7f2fceda7aebd6e524198cc7d3ddfe3f15db WHIRLPOOL a40dc8a531af746c504c9fc0eabded6c8f06550d9b767a4c40e799aa75ddffc9464dca768b8544def89344ec4a9331e1f315e3d318668747b0c46b6415477a89
DIST puppet-agent_1.10.1-1xenial_i386.deb 16205078 SHA256 22cdd5e41c82e63ae038f4c96ed8f19218f3eda600f1f6149eca9b1e7b60a560 SHA512 be310ae8db1bf1670b480a382866feb2fc247e69f0a4c26aac2b8f67f1b43984b581809ccfc1e0182fe71895aca8dadf20f6ff7b99506e84b787a62555e547c3 WHIRLPOOL 50563a4a85200e675d408e8a5618763821e7bf408f65172dadcf1b33ba3f4b9930bfaece3a21d744a8df513f9b91cce1f9ed45d770b1e9601e0d84642755e3b7
DIST puppet-agent_1.9.3-1xenial_amd64.deb 16045528 SHA256 db73567754514595b729c299bea34289fbf108282dcc3ca2b2bda8946b1a9b01 SHA512 1142bb008569ebd26e70c89705539eee89ef1d886fee9c18ee19b563ba280c96295a77b30af2c3b149e2e8fb5cd953f55300d3c3bea1d63cb4e6a4c4103a1cfb WHIRLPOOL 193d8ece0997c66f0e0a0c70df6e41243fabbda7bdc944f1c9940476e7cfa01bbff80e739cd5e3b95d4027b8d13b3186823b2035251c57c69a7a2e188c4a5801
DIST puppet-agent_1.9.3-1xenial_i386.deb 16072786 SHA256 eb9476d55cc769608a3b5a3a971a4c005ae1042c0f3f3f5748b14aa40b6251ea SHA512 b9bb7579fc3106b0b701ef2cdac9dc72a5e663b360e7e10816698fed85337c9aa0b77b392353d70682f2cea057d52ebf1c356474e9ec6ccd8e85302d938666af WHIRLPOOL 2acdd44be0fa1665be34f10d3967185acf49388460af6291ac9cb53c7296af78630d82e6c3fce456bdfd7fbd06d1956d9c592ad17dc0f1cf2ee0aa9c008965ef

@ -0,0 +1,329 @@
diff --git a/lib/puppet/provider/package/portage.rb b/lib/puppet/provider/package/portage.rb
index 374667c..12160c6 100644
--- a/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/portage.rb
+++ b/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/portage.rb
@@ -2,14 +2,19 @@
require 'fileutils'
Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Package do
- desc "Provides packaging support for Gentoo's portage system."
+ desc "Provides packaging support for Gentoo's portage system.
- has_features :versionable, :reinstallable
+ This provider supports the `install_options` and `uninstall_options` attributes, which allows command-line
+ flags to be passed to emerge. These options should be specified as a string (e.g. '--flag'), a hash
+ (e.g. {'--flag' => 'value'}), or an array where each element is either a string or a hash."
+
+ has_features :install_options, :purgeable, :reinstallable, :uninstall_options, :versionable, :virtual_packages
{
- :emerge => "/usr/bin/emerge",
- :eix => "/usr/bin/eix",
- :update_eix => "/usr/bin/eix-update",
+ :emerge => '/usr/bin/emerge',
+ :eix => '/usr/bin/eix',
+ :qatom_bin => '/usr/bin/qatom',
+ :update_eix => '/usr/bin/eix-update',
}.each_pair do |name, path|
has_command(name, path) do
environment :HOME => '/'
@@ -24,15 +29,18 @@ def self.instances
result_format = self.eix_result_format
result_fields = self.eix_result_fields
+ limit = self.eix_limit
version_format = self.eix_version_format
slot_versions_format = self.eix_slot_versions_format
+ installed_versions_format = self.eix_installed_versions_format
+ installable_versions_format = self.eix_install_versions_format
begin
- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
search_output = nil
- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
- search_output = eix *(self.eix_search_arguments + ["--installed"])
+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
+ search_output = eix *(self.eix_search_arguments + ['--installed'])
end
packages = []
@@ -57,65 +65,123 @@ def self.instances
def install
should = @resource.should(:ensure)
- name = package_name
- unless should == :present or should == :latest
- # We must install a specific version
- name = package_atom_with_version(should)
+ cmd = %w{}
+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+ name = qatom[:pfx] + name if qatom[:pfx]
+ name = name + '-' + qatom[:pv] if qatom[:pv]
+ name = name + '-' + qatom[:pr] if qatom[:pr]
+ name = name + qatom[:slot] if qatom[:slot]
+ cmd << '--update' if [:latest].include?(should)
+ cmd += install_options if @resource[:install_options]
+ cmd << name
+ emerge *cmd
+ end
+
+ def uninstall
+ should = @resource.should(:ensure)
+ cmd = %w{--rage-clean}
+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+ name = qatom[:pfx] + name if qatom[:pfx]
+ name = name + '-' + qatom[:pv] if qatom[:pv]
+ name = name + '-' + qatom[:pr] if qatom[:pr]
+ name = name + qatom[:slot] if qatom[:slot]
+ cmd += uninstall_options if @resource[:uninstall_options]
+ cmd << name
+ if [:purged].include?(should)
+ Puppet::Util.withenv :CONFIG_PROTECT => "-*" do
+ emerge *cmd
+ end
+ else
+ emerge *cmd
end
- emerge name
end
- # The common package name format.
- def package_name
- @resource[:category] ? "#{@resource[:category]}/#{@resource[:name]}" : @resource[:name]
+ def reinstall
+ self.install
end
- def package_name_without_slot
- package_name.sub(self.class.slot_pattern, '')
+ def update
+ self.install
end
- def package_slot
- if match = package_name.match(self.class.slot_pattern)
- match[1]
+ def qatom
+ output_format = self.qatom_output_format
+ result_format = self.qatom_result_format
+ result_fields = self.qatom_result_fields
+ @atom ||= begin
+ search_output = nil
+ package_info = {}
+ # do the search
+ search_output = qatom_bin *([@resource[:name], '--format', output_format])
+ # verify if the search found anything
+ match = result_format.match(search_output)
+ if match
+ result_fields.zip(match.captures) do |field, value|
+ # some fields can be empty or (null) (if we are not passed a category in the package name for instance)
+ if value == '(null)'
+ package_info[field] = nil
+ elsif !value or value.empty?
+ package_info[field] = nil
+ else
+ package_info[field] = value
+ end
+ end
+ end
+ @atom = package_info
+ rescue Puppet::ExecutionFailure => detail
+ raise Puppet::Error.new(detail)
end
end
- def package_atom_with_version(version)
- if slot = package_slot
- "=#{package_name_without_slot}-#{version}:#{package_slot}"
- else
- "=#{package_name}-#{version}"
- end
+ def qatom_output_format
+ '"[%{CATEGORY}] [%{PN}] [%{PV}] [%[PR]] [%[SLOT]] [%[pfx]] [%[sfx]]"'
end
- def uninstall
- emerge "--unmerge", package_name
+ def qatom_result_format
+ /^\"\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\](.*)\"$/
end
- def reinstall
- self.install
+ def qatom_result_fields
+ [:category, :pn, :pv, :pr, :slot, :pfx, :sfx]
end
- def update
- self.install
+ def self.get_sets
+ @sets ||= begin
+ @sets = emerge *(['--list-sets'])
+ end
end
def query
+ limit = self.class.eix_limit
result_format = self.class.eix_result_format
result_fields = self.class.eix_result_fields
version_format = self.class.eix_version_format
slot_versions_format = self.class.eix_slot_versions_format
- search_field = package_name_without_slot.count('/') > 0 ? "--category-name" : "--name"
- search_value = package_name_without_slot
+ installed_versions_format = self.class.eix_installed_versions_format
+ installable_versions_format = self.class.eix_install_versions_format
+ search_field = qatom[:category] ? '--category-name' : '--name'
+ search_value = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+
+ @eix_result ||= begin
+ # package sets
+ package_sets = []
+ self.class.get_sets.each_line do |package_set|
+ package_sets << package_set.to_s.strip
+ end
- begin
- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
+ if @resource[:name].match(/^@/)
+ if package_sets.include?(@resource[:name][1..-1].to_s)
+ return({:name => "#{@resource[:name]}", :ensure => '9999', :version_available => nil, :installed_versions => nil, :installable_versions => "9999,"})
+ end
+ end
+
+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
search_output = nil
- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
- search_output = eix *(self.class.eix_search_arguments + ["--exact",search_field,search_value])
+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
+ search_output = eix *(self.class.eix_search_arguments + ['--exact',search_field,search_value])
end
packages = []
@@ -127,10 +193,19 @@ def query
result_fields.zip(match.captures) do |field, value|
package[field] = value unless !value or value.empty?
end
- if package_slot
- package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], package_slot)
- package[:ensure] = eix_get_version_for_slot(package[:installed_slots], package_slot)
+ # dev-lang python [3.4.5] [3.5.2] [2.7.12:2.7,3.4.5:3.4] [2.7.12:2.7,3.4.5:3.4,3.5.2:3.5] https://www.python.org/ An interpreted, interactive, object-oriented programming language
+ # version_available is what we CAN install / update to
+ # ensure is what is currently installed
+ # This DOES NOT choose to install/upgrade or not, just provides current info
+ # prefer checking versions to slots as versions are finer grained
+ if qatom[:pv]
+ package[:version_available] = eix_get_version_for_versions(package[:installable_versions], qatom[:pv])
+ package[:ensure] = eix_get_version_for_versions(package[:installed_versions], qatom[:pv])
+ elsif qatom[:slot]
+ package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], qatom[:slot])
+ package[:ensure] = eix_get_version_for_slot(package[:installed_slots], qatom[:slot])
end
+
package[:ensure] = package[:ensure] ? package[:ensure] : :absent
packages << package
end
@@ -138,10 +213,9 @@ def query
case packages.size
when 0
- not_found_value = "#{@resource[:category] ? @resource[:category] : "<unspecified category>"}/#{@resource[:name]}"
- raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]")
+ raise Puppet::Error.new("No package found with the specified name [#{@resource[:name]}]")
when 1
- return packages[0]
+ @eix_result = packages[0]
else
raise Puppet::Error.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate")
end
@@ -155,39 +229,73 @@ def latest
end
private
+ def eix_get_version_for_versions(versions, target)
+ # [2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] 3.5.2
+ return nil if versions.nil?
+ versions = versions.split(',')
+ # [2.7.10-r1 2.7.12 3.4.3-r1 3.4.5 3.5.2]
+ versions.find { |version| version == target }
+ # 3.5.2
+ end
+
+ private
def eix_get_version_for_slot(versions_and_slots, slot)
+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5] 3.5
return nil if versions_and_slots.nil?
- versions_and_slots = versions_and_slots.split(",")
- versions_and_slots.map! { |version_and_slot| version_and_slot.split(":") }
- version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot }
+ versions_and_slots = versions_and_slots.split(',')
+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5]
+ versions_and_slots.map! { |version_and_slot| version_and_slot.split(':') }
+ # [2.7.12: 2.7
+ # 3.4.5: 3.4
+ # 3.5.2: 3.5]
+ version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot[1..-1] }
+ # [3.5.2: 3.5]
version_for_slot.first if version_for_slot
- end
-
- def self.slot_pattern
- /:([\w+.\/*=-]+)$/
+ # 3.5.2
end
def self.eix_search_format
- "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
+ "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<installedversions:INSTALLEDVERSIONS>] [<availableversions:STABLEVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
end
def self.eix_result_format
- /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
+ /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
end
def self.eix_result_fields
- [:category, :name, :ensure, :version_available, :installed_slots, :slot_versions_available, :vendor, :description]
+ # ensure:[3.4.5], version_available:[3.5.2], installed_slots:[2.7.12:2.7,3.4.5:3.4], installable_versions:[2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] slot_versions_available:[2.7.12:2.7,3.4.5:3.4,3.5.2:3.5]
+ [:category, :name, :ensure, :version_available, :installed_slots, :installed_versions, :installable_versions, :slot_versions_available, :vendor, :description]
end
def self.eix_version_format
- "{last}<version>{}"
+ '{last}<version>{}'
end
def self.eix_slot_versions_format
- "{!first},{}<version>:<slot>"
+ '{!first},{}<version>:<slot>'
+ end
+
+ def self.eix_installed_versions_format
+ '{!first},{}<version>'
+ end
+
+ def self.eix_install_versions_format
+ '{!first}{!last},{}{}{isstable}<version>{}'
+ end
+
+ def self.eix_limit
+ '0'
end
def self.eix_search_arguments
- ["--nocolor", "--pure-packages", "--format",self.eix_search_format]
+ ['--nocolor', '--pure-packages', '--format', self.eix_search_format]
+ end
+
+ def install_options
+ join_options(@resource[:install_options])
+ end
+
+ def uninstall_options
+ join_options(@resource[:uninstall_options])
end
end

@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="puppetdb">Adds puppetdb support</flag>
<flag name="experimental">Add patches for things in testing</flag>
</use>
<longdescription lang="en">
Collection of puppet utils, clients and batteries included.

@ -14,7 +14,7 @@ SRC_URI="
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
KEYWORDS="~amd64 ~x86"
IUSE="puppetdb selinux"
RESTRICT="strip"

@ -15,7 +15,7 @@ SRC_URI="
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="puppetdb selinux"
IUSE="experimental puppetdb selinux"
RESTRICT="strip"
CDEPEND="!app-admin/augeas
@ -63,6 +63,12 @@ pkg_setup() {
enewuser puppet -1 -1 /var/run/puppet puppet
}
src_prepare() {
if use experimental; then
epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
fi
}
src_install() {
# conf.d
doconfd etc/default/puppet

@ -1,102 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils systemd unpacker user
DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
HOMEPAGE="https://puppetlabs.com/"
SRC_BASE="http://apt.puppetlabs.com/pool/xenial/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
SRC_URI="
amd64? ( ${SRC_BASE}_amd64.deb )
x86? ( ${SRC_BASE}_i386.deb )
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="puppetdb selinux"
RESTRICT="strip"
CDEPEND="!app-admin/augeas
!app-admin/mcollective
!app-admin/puppet
!dev-ruby/hiera
!dev-ruby/facter
!app-emulation/virt-what"
DEPEND="
${CDEPEND}"
RDEPEND="${CDEPEND}
app-portage/eix
sys-apps/dmidecode
selinux? (
sys-libs/libselinux[ruby]
sec-policy/selinux-puppet
)
puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
S=${WORKDIR}
QA_PREBUILT="
/opt/puppetlabs/puppet
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
/opt/puppetlabs/puppet/lib/engines/*
/opt/puppetlabs/puppet/lib/virt-what/*
/opt/puppetlabs/puppet/lib/*
/opt/puppetlabs/puppet/bin/*"
pkg_setup() {
enewgroup puppet
enewuser puppet -1 -1 /var/run/puppet puppet
}
src_install() {
# conf.d
doconfd etc/default/puppet
doconfd etc/default/mcollective
doconfd etc/default/pxp-agent
# logrotate.d
insinto /etc/logrotate.d
doins etc/logrotate.d/mcollective
doins etc/logrotate.d/pxp-agent
# puppet itself
insinto /etc/puppetlabs
doins -r etc/puppetlabs/*
# logdir for systemd
dodir var/log/puppetlabs/puppet/
fperms 0750 var/log/puppetlabs/puppet/
# the rest
insinto /opt
dodir opt/puppetlabs/puppet/cache
doins -r opt/*
fperms 0750 /opt/puppetlabs/puppet/cache
# init
newinitd "${FILESDIR}/puppet.initd" puppet
newinitd "${FILESDIR}/mcollective.initd" mcollective
systemd_dounit lib/systemd/system/puppet.service
systemd_dounit lib/systemd/system/mcollective.service
systemd_dounit lib/systemd/system/pxp-agent.service
systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
# symlinks
chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
dosym /opt/puppetlabs/bin/facter /usr/bin/facter
dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
dosym /opt/puppetlabs/bin/mco /usr/bin/mco
dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
}

@ -1,105 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils systemd unpacker user
DESCRIPTION="general puppet client utils along with mcollective hiera and facter"
HOMEPAGE="https://puppetlabs.com/"
SRC_BASE="http://apt.puppetlabs.com/pool/xenial/PC1/${PN:0:1}/${PN}/${PN}_${PV}-1xenial"
SRC_URI="
amd64? ( ${SRC_BASE}_amd64.deb )
x86? ( ${SRC_BASE}_i386.deb )
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="puppetdb selinux"
RESTRICT="strip"
CDEPEND="!app-admin/augeas
!app-admin/mcollective
!app-admin/puppet
!dev-ruby/hiera
!dev-ruby/facter
!app-emulation/virt-what"
DEPEND="
${CDEPEND}"
RDEPEND="${CDEPEND}
app-portage/eix
sys-apps/dmidecode
sys-libs/glibc
>=sys-libs/readline-6.0
<sys-libs/readline-7.0
selinux? (
sys-libs/libselinux[ruby]
sec-policy/selinux-puppet
)
puppetdb? ( >=dev-ruby/puppetdb-termini-3.1.0 )"
S=${WORKDIR}
QA_PREBUILT="
/opt/puppetlabs/puppet
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/mathn/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/io/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/dl/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/racc/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/enc/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/json/ext/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/rbconfig/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/digest/*
/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux/*
/opt/puppetlabs/puppet/lib/engines/*
/opt/puppetlabs/puppet/lib/virt-what/*
/opt/puppetlabs/puppet/lib/*
/opt/puppetlabs/puppet/bin/*"
pkg_setup() {
enewgroup puppet
enewuser puppet -1 -1 /var/run/puppet puppet
}
src_install() {
# conf.d
doconfd etc/default/puppet
doconfd etc/default/mcollective
doconfd etc/default/pxp-agent
# logrotate.d
insinto /etc/logrotate.d
doins etc/logrotate.d/mcollective
doins etc/logrotate.d/pxp-agent
# puppet itself
insinto /etc/puppetlabs
doins -r etc/puppetlabs/*
# logdir for systemd
dodir var/log/puppetlabs/puppet/
fperms 0750 var/log/puppetlabs/puppet/
# the rest
insinto /opt
dodir opt/puppetlabs/puppet/cache
doins -r opt/*
fperms 0750 /opt/puppetlabs/puppet/cache
# init
newinitd "${FILESDIR}/puppet.initd" puppet
newinitd "${FILESDIR}/mcollective.initd" mcollective
systemd_dounit lib/systemd/system/puppet.service
systemd_dounit lib/systemd/system/mcollective.service
systemd_dounit lib/systemd/system/pxp-agent.service
systemd_newtmpfilesd "${FILESDIR}/puppet-agent.conf.tmpfilesd" puppet-agent.conf
# symlinks
chmod 0755 -R "${D}/opt/puppetlabs/puppet/bin/"
chmod 0755 "${D}//opt/puppetlabs/puppet/lib/virt-what/virt-what-cpuid-helper"
dosym /opt/puppetlabs/bin/facter /usr/bin/facter
dosym /opt/puppetlabs/bin/hiera /usr/bin/hiera
dosym /opt/puppetlabs/bin/mco /usr/bin/mco
dosym /opt/puppetlabs/bin/puppet /usr/bin/puppet
dosym /opt/puppetlabs/puppet/bin/mcollectived /usr/sbin/mcollectived
dosym /opt/puppetlabs/puppet/bin/virt-what /usr/bin/virt-what
dosym /opt/puppetlabs/puppet/bin/augparse /usr/bin/augparse
dosym /opt/puppetlabs/puppet/bin/augtool /usr/bin/augtool
dosym /opt/puppetlabs/puppet/bin/extlookup2hiera /usr/bin/extlookup2hiera
}

@ -0,0 +1,329 @@
diff --git a/lib/puppet/provider/package/portage.rb b/lib/puppet/provider/package/portage.rb
index 374667c..12160c6 100644
--- a/lib/puppet/provider/package/portage.rb
+++ b/lib/puppet/provider/package/portage.rb
@@ -2,14 +2,19 @@
require 'fileutils'
Puppet::Type.type(:package).provide :portage, :parent => Puppet::Provider::Package do
- desc "Provides packaging support for Gentoo's portage system."
+ desc "Provides packaging support for Gentoo's portage system.
- has_features :versionable, :reinstallable
+ This provider supports the `install_options` and `uninstall_options` attributes, which allows command-line
+ flags to be passed to emerge. These options should be specified as a string (e.g. '--flag'), a hash
+ (e.g. {'--flag' => 'value'}), or an array where each element is either a string or a hash."
+
+ has_features :install_options, :purgeable, :reinstallable, :uninstall_options, :versionable, :virtual_packages
{
- :emerge => "/usr/bin/emerge",
- :eix => "/usr/bin/eix",
- :update_eix => "/usr/bin/eix-update",
+ :emerge => '/usr/bin/emerge',
+ :eix => '/usr/bin/eix',
+ :qatom_bin => '/usr/bin/qatom',
+ :update_eix => '/usr/bin/eix-update',
}.each_pair do |name, path|
has_command(name, path) do
environment :HOME => '/'
@@ -24,15 +29,18 @@ def self.instances
result_format = self.eix_result_format
result_fields = self.eix_result_fields
+ limit = self.eix_limit
version_format = self.eix_version_format
slot_versions_format = self.eix_slot_versions_format
+ installed_versions_format = self.eix_installed_versions_format
+ installable_versions_format = self.eix_install_versions_format
begin
- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
search_output = nil
- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
- search_output = eix *(self.eix_search_arguments + ["--installed"])
+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
+ search_output = eix *(self.eix_search_arguments + ['--installed'])
end
packages = []
@@ -57,65 +65,123 @@ def self.instances
def install
should = @resource.should(:ensure)
- name = package_name
- unless should == :present or should == :latest
- # We must install a specific version
- name = package_atom_with_version(should)
+ cmd = %w{}
+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+ name = qatom[:pfx] + name if qatom[:pfx]
+ name = name + '-' + qatom[:pv] if qatom[:pv]
+ name = name + '-' + qatom[:pr] if qatom[:pr]
+ name = name + qatom[:slot] if qatom[:slot]
+ cmd << '--update' if [:latest].include?(should)
+ cmd += install_options if @resource[:install_options]
+ cmd << name
+ emerge *cmd
+ end
+
+ def uninstall
+ should = @resource.should(:ensure)
+ cmd = %w{--rage-clean}
+ name = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+ name = qatom[:pfx] + name if qatom[:pfx]
+ name = name + '-' + qatom[:pv] if qatom[:pv]
+ name = name + '-' + qatom[:pr] if qatom[:pr]
+ name = name + qatom[:slot] if qatom[:slot]
+ cmd += uninstall_options if @resource[:uninstall_options]
+ cmd << name
+ if [:purged].include?(should)
+ Puppet::Util.withenv :CONFIG_PROTECT => "-*" do
+ emerge *cmd
+ end
+ else
+ emerge *cmd
end
- emerge name
end
- # The common package name format.
- def package_name
- @resource[:category] ? "#{@resource[:category]}/#{@resource[:name]}" : @resource[:name]
+ def reinstall
+ self.install
end
- def package_name_without_slot
- package_name.sub(self.class.slot_pattern, '')
+ def update
+ self.install
end
- def package_slot
- if match = package_name.match(self.class.slot_pattern)
- match[1]
+ def qatom
+ output_format = self.qatom_output_format
+ result_format = self.qatom_result_format
+ result_fields = self.qatom_result_fields
+ @atom ||= begin
+ search_output = nil
+ package_info = {}
+ # do the search
+ search_output = qatom_bin *([@resource[:name], '--format', output_format])
+ # verify if the search found anything
+ match = result_format.match(search_output)
+ if match
+ result_fields.zip(match.captures) do |field, value|
+ # some fields can be empty or (null) (if we are not passed a category in the package name for instance)
+ if value == '(null)'
+ package_info[field] = nil
+ elsif !value or value.empty?
+ package_info[field] = nil
+ else
+ package_info[field] = value
+ end
+ end
+ end
+ @atom = package_info
+ rescue Puppet::ExecutionFailure => detail
+ raise Puppet::Error.new(detail)
end
end
- def package_atom_with_version(version)
- if slot = package_slot
- "=#{package_name_without_slot}-#{version}:#{package_slot}"
- else
- "=#{package_name}-#{version}"
- end
+ def qatom_output_format
+ '"[%{CATEGORY}] [%{PN}] [%{PV}] [%[PR]] [%[SLOT]] [%[pfx]] [%[sfx]]"'
end
- def uninstall
- emerge "--unmerge", package_name
+ def qatom_result_format
+ /^\"\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\](.*)\"$/
end
- def reinstall
- self.install
+ def qatom_result_fields
+ [:category, :pn, :pv, :pr, :slot, :pfx, :sfx]
end
- def update
- self.install
+ def self.get_sets
+ @sets ||= begin
+ @sets = emerge *(['--list-sets'])
+ end
end
def query
+ limit = self.class.eix_limit
result_format = self.class.eix_result_format
result_fields = self.class.eix_result_fields
version_format = self.class.eix_version_format
slot_versions_format = self.class.eix_slot_versions_format
- search_field = package_name_without_slot.count('/') > 0 ? "--category-name" : "--name"
- search_value = package_name_without_slot
+ installed_versions_format = self.class.eix_installed_versions_format
+ installable_versions_format = self.class.eix_install_versions_format
+ search_field = qatom[:category] ? '--category-name' : '--name'
+ search_value = qatom[:category] ? "#{qatom[:category]}/#{qatom[:pn]}" : qatom[:pn]
+
+ @eix_result ||= begin
+ # package sets
+ package_sets = []
+ self.class.get_sets.each_line do |package_set|
+ package_sets << package_set.to_s.strip
+ end
- begin
- eix_file = File.directory?("/var/cache/eix") ? "/var/cache/eix/portage.eix" : "/var/cache/eix"
+ if @resource[:name].match(/^@/)
+ if package_sets.include?(@resource[:name][1..-1].to_s)
+ return({:name => "#{@resource[:name]}", :ensure => '9999', :version_available => nil, :installed_versions => nil, :installable_versions => "9999,"})
+ end
+ end
+
+ eix_file = File.directory?('/var/cache/eix') ? '/var/cache/eix/portage.eix' : '/var/cache/eix'
update_eix if !FileUtils.uptodate?(eix_file, %w{/usr/bin/eix /usr/portage/metadata/timestamp})
search_output = nil
- Puppet::Util.withenv :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format do
- search_output = eix *(self.class.eix_search_arguments + ["--exact",search_field,search_value])
+ Puppet::Util.withenv :EIX_LIMIT => limit, :LASTVERSION => version_format, :LASTSLOTVERSIONS => slot_versions_format, :INSTALLEDVERSIONS => installed_versions_format, :STABLEVERSIONS => installable_versions_format do
+ search_output = eix *(self.class.eix_search_arguments + ['--exact',search_field,search_value])
end
packages = []
@@ -127,10 +193,19 @@ def query
result_fields.zip(match.captures) do |field, value|
package[field] = value unless !value or value.empty?
end
- if package_slot
- package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], package_slot)
- package[:ensure] = eix_get_version_for_slot(package[:installed_slots], package_slot)
+ # dev-lang python [3.4.5] [3.5.2] [2.7.12:2.7,3.4.5:3.4] [2.7.12:2.7,3.4.5:3.4,3.5.2:3.5] https://www.python.org/ An interpreted, interactive, object-oriented programming language
+ # version_available is what we CAN install / update to
+ # ensure is what is currently installed
+ # This DOES NOT choose to install/upgrade or not, just provides current info
+ # prefer checking versions to slots as versions are finer grained
+ if qatom[:pv]
+ package[:version_available] = eix_get_version_for_versions(package[:installable_versions], qatom[:pv])
+ package[:ensure] = eix_get_version_for_versions(package[:installed_versions], qatom[:pv])
+ elsif qatom[:slot]
+ package[:version_available] = eix_get_version_for_slot(package[:slot_versions_available], qatom[:slot])
+ package[:ensure] = eix_get_version_for_slot(package[:installed_slots], qatom[:slot])
end
+
package[:ensure] = package[:ensure] ? package[:ensure] : :absent
packages << package
end
@@ -138,10 +213,9 @@ def query
case packages.size
when 0
- not_found_value = "#{@resource[:category] ? @resource[:category] : "<unspecified category>"}/#{@resource[:name]}"
- raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]")
+ raise Puppet::Error.new("No package found with the specified name [#{@resource[:name]}]")
when 1
- return packages[0]
+ @eix_result = packages[0]
else
raise Puppet::Error.new("More than one package with the specified name [#{search_value}], please use the category parameter to disambiguate")
end
@@ -155,39 +229,73 @@ def latest
end
private
+ def eix_get_version_for_versions(versions, target)
+ # [2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] 3.5.2
+ return nil if versions.nil?
+ versions = versions.split(',')
+ # [2.7.10-r1 2.7.12 3.4.3-r1 3.4.5 3.5.2]
+ versions.find { |version| version == target }
+ # 3.5.2
+ end
+
+ private
def eix_get_version_for_slot(versions_and_slots, slot)
+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5] 3.5
return nil if versions_and_slots.nil?
- versions_and_slots = versions_and_slots.split(",")
- versions_and_slots.map! { |version_and_slot| version_and_slot.split(":") }
- version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot }
+ versions_and_slots = versions_and_slots.split(',')
+ # [2.7.12:2.7 3.4.5:3.4 3.5.2:3.5]
+ versions_and_slots.map! { |version_and_slot| version_and_slot.split(':') }
+ # [2.7.12: 2.7
+ # 3.4.5: 3.4
+ # 3.5.2: 3.5]
+ version_for_slot = versions_and_slots.find { |version_and_slot| version_and_slot.last == slot[1..-1] }
+ # [3.5.2: 3.5]
version_for_slot.first if version_for_slot
- end
-
- def self.slot_pattern
- /:([\w+.\/*=-]+)$/
+ # 3.5.2
end
def self.eix_search_format
- "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
+ "'<category> <name> [<installedversions:LASTVERSION>] [<bestversion:LASTVERSION>] [<installedversions:LASTSLOTVERSIONS>] [<installedversions:INSTALLEDVERSIONS>] [<availableversions:STABLEVERSIONS>] [<bestslotversions:LASTSLOTVERSIONS>] <homepage> <description>\n'"
end
def self.eix_result_format
- /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
+ /^(\S+)\s+(\S+)\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+\[(\S*)\]\s+(\S+)\s+(.*)$/
end
def self.eix_result_fields
- [:category, :name, :ensure, :version_available, :installed_slots, :slot_versions_available, :vendor, :description]
+ # ensure:[3.4.5], version_available:[3.5.2], installed_slots:[2.7.12:2.7,3.4.5:3.4], installable_versions:[2.7.10-r1,2.7.12,3.4.3-r1,3.4.5,3.5.2] slot_versions_available:[2.7.12:2.7,3.4.5:3.4,3.5.2:3.5]
+ [:category, :name, :ensure, :version_available, :installed_slots, :installed_versions, :installable_versions, :slot_versions_available, :vendor, :description]
end
def self.eix_version_format
- "{last}<version>{}"
+ '{last}<version>{}'
end
def self.eix_slot_versions_format
- "{!first},{}<version>:<slot>"
+ '{!first},{}<version>:<slot>'
+ end
+
+ def self.eix_installed_versions_format
+ '{!first},{}<version>'
+ end
+
+ def self.eix_install_versions_format
+ '{!first}{!last},{}{}{isstable}<version>{}'
+ end
+
+ def self.eix_limit
+ '0'
end
def self.eix_search_arguments
- ["--nocolor", "--pure-packages", "--format",self.eix_search_format]
+ ['--nocolor', '--pure-packages', '--format', self.eix_search_format]
+ end
+
+ def install_options
+ join_options(@resource[:install_options])
+ end
+
+ def uninstall_options
+ join_options(@resource[:uninstall_options])
end
end

@ -31,5 +31,6 @@
<flag name="diff">Enable diff support</flag>
<flag name="rrdtool">Enable rrdtool support</flag>
<flag name="shadow">Enable shadow support</flag>
<flag name="experimental">Add patches for things in testing</flag>
</use>
</pkgmetadata>

@ -0,0 +1,181 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
USE_RUBY="ruby21 ruby22"
RUBY_FAKEGEM_RECIPE_TEST="rspec3"
inherit elisp-common xemacs-elisp-common eutils user ruby-fakegem versionator
DESCRIPTION="A system automation and configuration management software."
HOMEPAGE="http://puppetlabs.com/"
SRC_URI="http://downloads.puppetlabs.com/puppet/${P}.tar.gz"
LICENSE="Apache-2.0 GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
IUSE="augeas diff doc emacs experimental ldap rrdtool selinux shadow sqlite vim-syntax xemacs"
RESTRICT="test"
ruby_add_rdepend "
dev-ruby/hiera
>=dev-ruby/rgen-0.6.5
dev-ruby/json:=
>=dev-ruby/facter-3.0.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"
ruby_add_bdepend "
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
DEPEND+=" ${DEPEND}
emacs? ( virtual/emacs )
xemacs? ( app-editors/xemacs )"
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"
SITEFILE="50${PN}-mode-gentoo.el"
pkg_setup() {
enewgroup puppet
enewuser puppet -1 -1 /var/lib/puppet puppet
}
all_ruby_prepare() {
# Avoid spec that require unpackaged json-schema.
rm spec/lib/matchers/json.rb $( grep -Rl matchers/json spec) || die
# can't be run within portage.
epatch "${FILESDIR}/puppet-fix-tests-4.7.0.patch"
# fix systemd path
epatch "${FILESDIR}/puppet-systemd.patch"
if use experimental; then
epatch "${FILESDIR}/43e2c935252b995134ce353e5e6312cf77aea480.patch"
fi
# 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
}
all_ruby_compile() {
if use emacs ; then
elisp-compile ext/emacs/puppet-mode.el
fi
if use xemacs ; then
# Create a separate version for xemacs to be able to install
# emacs and xemacs in parallel.
mkdir ext/xemacs
cp ext/emacs/* ext/xemacs/
xemacs-elisp-compile ext/xemacs/puppet-mode.el
fi
}
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 emacs ; then
elisp-install ${PN} ext/emacs/puppet-mode.el*
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
if use xemacs ; then
xemacs-elisp-install ${PN} ext/xemacs/puppet-mode.el*
xemacs-elisp-site-file-install "${FILESDIR}/${SITEFILE}"
fi
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
if [ "$(get_major_version $REPLACING_VERSIONS)" = "3" ]; then
elog
elog "If you're upgrading from 3.x then please move everything in /etc/puppet to"
elog "/etc/puppetlabs/puppet"
elog "Also, puppet now uses config directories for modules and manifests."
elog "See https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_agent.html"
elog "and https://docs.puppetlabs.com/puppet/4.0/reference/upgrade_server.html"
elog "for more information."
elog
fi
use emacs && elisp-site-regen
use xemacs && xemacs-elisp-site-regen
}
pkg_postrm() {
use emacs && elisp-site-regen
use xemacs && xemacs-elisp-site-regen
}

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>monsieurp@gentoo.org</email>
<name>Patrice Clement</name>
</maintainer>
</pkgmetadata>

@ -3,6 +3,7 @@
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit python-r1
DESCRIPTION="Enhanced df with colors"
@ -12,21 +13,22 @@ SRC_URI="http://kassiopeia.juls.savba.sk/~garabik/software/pydf/${PN}_${PV}.tar.
LICENSE="public-domain"
SLOT="0"
KEYWORDS="amd64 arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="${PYTHON_DEPS}"
RDEPEND="${DEPEND}"
DOCS=( README )
src_prepare() {
default
sed -i -e "s:/etc/pydfrc:${EPREFIX}/etc/pydfrc:" pydf || die
sed -i -e "s:/etc/pydfrc:${EPREFIX}/etc/pydfrc:" "${PN}" || die
}
src_install() {
python_foreach_impl python_doscript pydf
python_foreach_impl python_doscript "${PN}"
insinto /etc
doins pydfrc
doman pydf.1
dodoc README
doins "${PN}rc"
doman "${PN}.1"
einstalldocs
}

@ -1,4 +1,5 @@
DIST salt-2015.5.10.tar.gz 5693422 SHA256 863a96e70f8521af35fe11b10d25b3205a0bfbba9a8aee02e2842aa7106496fd SHA512 78a4cbe5c771208e957360689a25ae4e44566987e07e7fda54e6db9028485eacc6ad016c65c981090f9b5d95331e46048a094aecc27703b3956c06ab6ebad95d WHIRLPOOL 805b48df07707d85d8338251f26c72164a5421731fc11f5c933b72af97348a2f11ee35889f72ec032acbea275e98575d35786b56fd84a7917f8fdbc30567ae86
DIST salt-2015.8.13.tar.gz 7036243 SHA256 cca82c9a4f267692660b098c1f76e54ab6a24131391893719bde0eb3a1ed2959 SHA512 ec8626f7360542bfeea90fc3d6fd9d9d015da4c2a6adf9957c22501ed9531b0a44d2cbc4853c41856b4cd46c142d2441884ec99700f3c0a5310cc428f9f1ec2a WHIRLPOOL c21f3bdc5fd674ea664c7e8fd58ef6685328a6ee3679850f3e9a085b1e604e1224a3323b906b47075fb8dd39f373583fb549e7b0f3f725d44928bcf716955a10
DIST salt-2016.11.4.tar.gz 9360198 SHA256 fb4109b28d3fd898291c162e42ef843fbd4c3e57244075670fa8f366e705765f SHA512 ba928b61766d34774ce2e623fa79a46f6d373295c55b336e1b451e6a4afb0d547d78ceb9e466b64d8ba8bdbf2e750cbb77d008bc76308602729ae08241b8d346 WHIRLPOOL cb599c83d1adb3c0281106cf447df42da1439f033f23cfc8370edc537fd2d60af66c4451dcedb12aee0447499184ab413ce1cf200b26b3ef48c8932bccb977be
DIST salt-2016.11.5.tar.gz 9246550 SHA256 b81427a4a3e47a98726f948bdc16a5b6b366f93fdac0b2c817e8f87d9036f8be SHA512 9afb40dbd3a508eacc43500566660763e2b219817d7de25ccf2d61d7f74b857238922ea40cc4c6372fd520bc6f524d84fb0a2d65f9890bedd79d0fc6c177edf9 WHIRLPOOL 684c8f147fbe38928b3f7510e704654270fcc4aacdf81c4f3b90a9f275566a2b8cf2155aff223d3ead2740d79e479d10cf233b4386b8e76ddb7b481f3471ebb6
DIST salt-2016.3.6.tar.gz 8432840 SHA256 4cc45f48255b7e46631807b071674552872c322ab77f398c9beefbf14d6a212f SHA512 949d70504310cd88139c520812a870e4c68e6b0c7ec6decfd157283994d6be659e7823a4453d1b6464c24fc762bc9ba61d4f6a767c4d6f65e496c7f5b6589a8d WHIRLPOOL 3d5abdbe0e297cbfc1b0f7fce0d6959132bbe917abc80ad7bb368a2ec657c0c0019123a22558c3fbdec489cb20430243ff837658d55da6755a07d4ec4d35158c

@ -0,0 +1,146 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit eutils systemd distutils-r1
DESCRIPTION="Salt is a remote execution and configuration manager"
HOMEPAGE="http://saltstack.org/"
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="~x86 ~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova"
IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax"
RDEPEND="sys-apps/pciutils
dev-python/jinja[${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}]
virtual/python-futures[${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:*[-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/pycrypto-2.6.1[${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}] )
mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
selinux? ( sec-policy/selinux-salt )
timelib? ( dev-python/timelib[${PYTHON_USEDEP}] )
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/psutil[${PYTHON_USEDEP}]
dev-python/pip[${PYTHON_USEDEP}]
dev-python/virtualenv[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/timelib[${PYTHON_USEDEP}]
>=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
!x86? ( dev-python/boto3[${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="x86? ( test )"
PATCHES=(
"${FILESDIR}/${PN}-2016.11.0-tmpdir.patch"
"${FILESDIR}/${PN}-2016.3.1-dont-realpath-tmpdir.patch"
"${FILESDIR}/${PN}-2016.3.4-test-nonexist-dirs.patch"
"${FILESDIR}/${PN}-2016.11.0-remove-file-tree-test.patch"
"${FILESDIR}/${PN}-2016.11.0-broken-tests.patch"
)
python_prepare() {
# this test fails because it trys to "pip install distribute"
rm tests/unit/{modules,states}/zcbuildout_test.py \
tests/unit/modules/{rh_ip,win_network,random_org}_test.py || die
# https://github.com/saltstack/salt/issues/39095
rm tests/unit/utils/parsers_test.py
# apparently libcloud does not know about this?
rm tests/unit/cloud/clouds/dimensiondata_test.py || die
# seriously? "ValueError: Missing (or not readable) key file: '/home/dany/PRIVKEY.pem'"
rm tests/unit/cloud/clouds/gce_test.py || 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 -dup /tmp salt-XXX)"
mkdir "${T}/$(basename "${tempdir}")"
(
cleanup() { rm -f "${tempdir}"; }
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"
}

@ -1,3 +1,3 @@
DIST sudo-1.8.18p1.tar.gz 2822109 SHA256 e5a0471c721281a693025bbde33ebd9d3db43245d83ab8516bbfc23980379434 SHA512 8dceeb5024c4f94fcc15e75fa2fd164af5e0597734f95df43207738b3258c4d396e102faf2b6811e399f1cdbdbf617b87e5bfcc1e591ea6722f45d81d1098fe5 WHIRLPOOL 094c1232517706a6da4a0548f7ab5c0c7b9e12f8ce584db97d0c4793a38c4044538637f2834b9f3104326bd5b4b826d08ab79b1dc2c5b950de7d7f558685ef7b
DIST sudo-1.8.19p2.tar.gz 2861855 SHA256 237e18e67c2ad59ecacfa4b7707198b09fcf84914621585a9bc670dcc31a52e0 SHA512 21c83403e7ff219a273b2c4873be0d858997558ca150bc8239379a9dfcc587fdd7c0c49cdf4cdc27dfd6dd45f9f089fa034b58bfcee07dceb4a481542251b3fc WHIRLPOOL 550ed115ea711d6ba9aa698cd988295b74327dd770d79b6852f9f3f00a1c0420bbdcce5cc7c49467e0cf8a57fc79dbcfc73edaf3ad697e06ba9fd48919fece0b
DIST sudo-1.8.20rc3.tar.gz 2930769 SHA256 97720b78c12626356b41d1e87b78b08431245afd30ce1c3a7bb68af4878588f5 SHA512 8fdedcd5b53ebadedf22c7ca7171ea64ee1e03a4e096ecf4d5c45cac452e24f5b117dc2b09febc7c3811d45b9a365ffb3cccef70e417d515cc72d21db2818fb0 WHIRLPOOL 19205ee22c581fdf09b131b5150872838360798d4f792e8e1506212fc422ac9c2d674c5ca3a7310087be4560270e348d6ddee1add88a0f46e42f36e53fa6592d
DIST sudo-1.8.20.tar.gz 2930046 SHA256 9e97b8da859c6cc1b5b8c31db93002b750eae16af1bbda9140f8dd85b970e0e0 SHA512 c8cf640cd75fff88cf7c8b3a54a9a16771a9f24129b5c5787657c24336848c31abb8d8b9bafc7bfceb8f0b1f72112e15f9862b8fc337c1072eea05860f417dee WHIRLPOOL f2e409b18bee01780c21b9d97cdf65a34f763b5f9e380116f77b0d5ab3ddf6f46a80210b1c361e585fb2882ae17433817db7782e9b315b14ea1d7b53bfb0ab2a

@ -0,0 +1,32 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools
DESCRIPTION="suid, sgid file and directory checking"
HOMEPAGE="http://freshmeat.net/projects/sxid"
SRC_URI="http://linukz.org/download/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
RDEPEND="virtual/mailx"
DOCS=( docs/sxid.{conf,cron}.example )
src_prepare() {
default
# this is an admin application and really requires root to run correctly
# we need to move the binary to the sbin directory
sed -i s/bindir/sbindir/g source/Makefile.in || die
eautoreconf
}
pkg_postinst() {
elog
elog "You will need to configure sxid.conf for your system using the manpage and example"
elog
}

@ -11,7 +11,7 @@ SRC_URI="http://dstunrea.sdf-eu.org/files/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
KEYWORDS="~alpha amd64 ~ppc ~x86"
S="${WORKDIR}/${P/folder/d}"

@ -1,8 +1,8 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python3_{4,5} )
PYTHON_COMPAT=( python3_{4,5,6} )
inherit distutils-r1

@ -11,7 +11,7 @@ LICENSE="GPL-3"
MY_P="${P/_/-}"
SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT="0"
IUSE="bzip2 doc +gnutls ldap nls readline selinux +smartcard tofu tools usb wks-server"

@ -14,7 +14,7 @@ SRC_URI="mirror://gnupg/gpgme/${P}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"
SLOT="1/11" # subslot = soname major version
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="common-lisp cxx python qt5 static-libs"
COMMON_DEPEND="app-crypt/gnupg

@ -10,7 +10,7 @@ if [[ ${PV} == "9999" ]] ; then
else
MY_P=${PN}-${PV/_}
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:3}/${MY_P}.tar.gz"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"

@ -2,3 +2,4 @@ DIST containerd-0.2.5.tar.gz 1003500 SHA256 88e099af66b50abe7f2159f13bdab793fa51
DIST containerd-0.2.5_p20170308.tar.gz 1021631 SHA256 d08d3d0758b76f7de0e8f503b74e1562d8c0a1014cb4baf4cd34e246751cec4c SHA512 8b00862a7b54490a8342bcc0eddaa7e8c86d1e05c02f5173b9f4a08321425f8d75d1fb0665e86bc79249294354977693c21d6a4d8405866ff8058da9772e2ecc WHIRLPOOL ed658d10f927fff4d9591930bdf855fc0ed259ca538d4361ce3cffcc5943dcfe39121242f1c9ef950897761016a8450b3a2117c0be0b8b0ebffeab330fe30b5d
DIST containerd-0.2.6.tar.gz 1020572 SHA256 a67c4153ac5ae26b9d11daac133b90cba059ba16de7579e39c3e82bcda856493 SHA512 41018bda556a3ddfb1bd3a16e642548ba06f413b13fd1488e731896e277ba6c84a393ebd5de067ecaeccc695297a2b74edf22e5a3fe8f2e3eadf78d080bdeff6 WHIRLPOOL 98f64c888ea580074e51b91311ab186291cb2d3ecc9f178d828687dbb60b35104237041699b6125cf026edd245459a052fda1801ac3cd7e1efe34606c3d9a4eb
DIST containerd-0.2.7.tar.gz 1034541 SHA256 cc46de64a75fa8babe0a85aac987f926870bf84d78040430f95ce478ed195122 SHA512 d0885fa37aaa1110d9312f81102e619ca4ae8d3c39c83c01852fd8618945121596169a1d41017d19ad32ff47b619a2c1c18a3582d290a56f08640412dcfc451a WHIRLPOOL 35748adf2c097dad4c60e48b2eb3389b57e78fc8d3b228f15b0297b5c1d037a77f29118089a5159c1f25baf7e4d7f93f6fc74d3cd2c85164711378e2df6e251d
DIST containerd-0.2.8.tar.gz 1034518 SHA256 f002d4d93a86cd3a0c9e7d9d71455a94790302daab1e51dd2dd53e7f0ba4d217 SHA512 a8c0b9faa9bf225be315067aa634ee366c8d78a137dddade2ad09160ecd8f89d487fdce896efd73bedcd6d8c97e20f746ba949a13901c38977a40dbb558339d8 WHIRLPOOL 99058822f80d37e8a96968ae26cf00c33c8ed78fffeff9f2d07a2c25c76439ab44c92ce333712f6749787a04b65c54b112511d66c97cfcce35a5d5cf954ac2f4

@ -0,0 +1,40 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EGO_PN="github.com/docker/${PN}"
inherit toolchain-funcs
if [[ ${PV} == *9999 ]]; then
inherit golang-vcs
else
MY_PV="${PV/_/-}"
EGIT_COMMIT="v${MY_PV}"
SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~ppc64"
inherit golang-vcs-snapshot
fi
DESCRIPTION="A daemon to control runC"
HOMEPAGE="https://containerd.tools"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="hardened +seccomp"
DEPEND=""
RDEPEND=">=app-emulation/docker-runc-1.0.0_rc2
seccomp? ( sys-libs/libseccomp )"
S=${WORKDIR}/${P}/src/${EGO_PN}
src_compile() {
local options=( $(usex seccomp "seccomp") )
export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor
LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake GIT_COMMIT="$EGIT_COMMIT" BUILDTAGS="${options[@]}"
}
src_install() {
dobin bin/containerd* bin/ctr
}

@ -1,3 +1 @@
DIST docker-compose-1.11.2.tar.gz 186465 SHA256 e6cb8862f867d2882a93dd5bdcd3bf21dad5740c1ec1f32132c9a3801506ba54 SHA512 0b7668ee16738d9a898117737c8fb3de298fc0db2127b1a66f29469ab30ada609900498bb2906b63edd0cf2c469dd1db1e71756b1e620c44fd1aece37f60796b WHIRLPOOL 64a3629908185fb278e6dd780438edb27ab463e1b66f801e36c2a7fcf0d3913c23fbf41df775a7a843327e8016dd8e506b9243cd07b811c92f419883d5c6b839
DIST docker-compose-1.12.0.tar.gz 198453 SHA256 3da6f465eac5704393d8acd95b1923ce0bda3f0312883527c92dfab7de5b313e SHA512 7d454b9a4210e4ec708d9b1b0e0eff58465f68747bac282c4163ee3abeb32f9907f32ac86fde56fbccb6af9927a61b68dd671263b5ded13a78a37e2ac4db2669 WHIRLPOOL e2dff82aadd5b3be56485a8e7743d50b3e6eac7cf1873f392df05354ad6716476cb4606532630cd309a673c0355b7910c93456af70341e153f5df3bf486f4bf6
DIST docker-compose-1.13.0.tar.gz 201429 SHA256 3c7b62cd0ab5f33d21db197d8a74739d320a6fe32e4ef8282c35d4dee5a7c77c SHA512 a435cd1634a66924e04b89ca8b3481bb0e4288b03a2e9acc50d01b56a40996e0d51a2d856da8ef6a6e784617b4cda85f7966c372e256dc8b7b0ab0f0ebf60a20 WHIRLPOOL 1e6652f97c55705a0e97f6a16f95a2659ef6ef5f53cc85bb6f8a416d711dca21eb3882912d528afbc68f1fb1d6f8d824273352e86b21e2168f9af812790bcbfc

@ -1,68 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit bash-completion-r1 distutils-r1 vcs-snapshot
MY_PV=${PV//_/}
DESCRIPTION="Multi-container orchestration for Docker"
HOMEPAGE="https://www.docker.com/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${PN}-${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
CDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
<dev-python/cached-property-2[${PYTHON_USEDEP}]
>=dev-python/colorama-0.3.7[${PYTHON_USEDEP}]
<dev-python/colorama-0.4[${PYTHON_USEDEP}]
>=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
<dev-python/dockerpty-0.5[${PYTHON_USEDEP}]
>=dev-python/docker-py-2.1.0[${PYTHON_USEDEP}]
<dev-python/docker-py-3.0[${PYTHON_USEDEP}]
>=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
<dev-python/docopt-0.7[${PYTHON_USEDEP}]
>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
<dev-python/jsonschema-3[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
<dev-python/pyyaml-4[${PYTHON_USEDEP}]
!~dev-python/requests-2.11.0[${PYTHON_USEDEP}]
<dev-python/requests-2.12[${PYTHON_USEDEP}]
>=dev-python/requests-2.6.1[${PYTHON_USEDEP}]
>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
<dev-python/six-2[${PYTHON_USEDEP}]
>=dev-python/texttable-0.8.1[${PYTHON_USEDEP}]
<dev-python/texttable-0.9[${PYTHON_USEDEP}]
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
<dev-python/websocket-client-1.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/enum34-1.0.4[${PYTHON_USEDEP}]' 'python2_7' )
$(python_gen_cond_dep '<dev-python/enum34-2[${PYTHON_USEDEP}]' 'python2_7' )
"
DEPEND="
${CDEPEND}
test? (
dev-python/pytest[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]' 'python2_7' )
)
"
RDEPEND="${CDEPEND}"
python_test() {
${PYTHON} -m pytest tests/unit || die "tests failed under ${EPYTHON}"
}
python_install_all() {
newbashcomp contrib/completion/bash/docker-compose ${PN}
insinto /usr/share/zsh/site-functions
doins contrib/completion/zsh/*
distutils-r1_python_install_all
}

@ -1,68 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
inherit bash-completion-r1 distutils-r1 vcs-snapshot
MY_PV=${PV//_/}
DESCRIPTION="Multi-container orchestration for Docker"
HOMEPAGE="https://www.docker.com/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${PN}-${MY_PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
CDEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/cached-property-1.2.0[${PYTHON_USEDEP}]
<dev-python/cached-property-2[${PYTHON_USEDEP}]
>=dev-python/colorama-0.3.7[${PYTHON_USEDEP}]
<dev-python/colorama-0.4[${PYTHON_USEDEP}]
>=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
<dev-python/dockerpty-0.5[${PYTHON_USEDEP}]
>=dev-python/docker-py-2.2.1[${PYTHON_USEDEP}]
<dev-python/docker-py-3.0[${PYTHON_USEDEP}]
>=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
<dev-python/docopt-0.7[${PYTHON_USEDEP}]
>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
<dev-python/jsonschema-3[${PYTHON_USEDEP}]
>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
<dev-python/pyyaml-4[${PYTHON_USEDEP}]
!~dev-python/requests-2.11.0[${PYTHON_USEDEP}]
<dev-python/requests-2.12[${PYTHON_USEDEP}]
>=dev-python/requests-2.6.1[${PYTHON_USEDEP}]
>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
<dev-python/six-2[${PYTHON_USEDEP}]
>=dev-python/texttable-0.8.1[${PYTHON_USEDEP}]
<dev-python/texttable-0.9[${PYTHON_USEDEP}]
>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]
<dev-python/websocket-client-1.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/enum34-1.0.4[${PYTHON_USEDEP}]' 'python2_7' )
$(python_gen_cond_dep '<dev-python/enum34-2[${PYTHON_USEDEP}]' 'python2_7' )
"
DEPEND="
${CDEPEND}
test? (
dev-python/pytest[${PYTHON_USEDEP}]
$(python_gen_cond_dep '>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]' 'python2_7' )
)
"
RDEPEND="${CDEPEND}"
python_test() {
${PYTHON} -m pytest tests/unit || die "tests failed under ${EPYTHON}"
}
python_install_all() {
newbashcomp contrib/completion/bash/docker-compose ${PN}
insinto /usr/share/zsh/site-functions
doins contrib/completion/zsh/*
distutils-r1_python_install_all
}

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5} )
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
inherit bash-completion-r1 distutils-r1 vcs-snapshot

@ -1 +1,2 @@
DIST kompose-0.5.0.tar.gz 4960733 SHA256 542828b5b5a231596bc50536322975fab3b49259052de4ad6115b099c01f2627 SHA512 11f3f6a5624fb67ab8be099d220647e8447290311167875efa7ad5a5058bd1401fd5def667ebde3b78eec8404eec81239764d3722e27c60fb55291c4371d36af WHIRLPOOL 50eb0cf5aee7aa2b3868af67d9e3de617ab8cd9ef6af6b1ec48bd772c9e01518e160f2a5b4994748fe474dddad143aac14c85c44a44f1aaf6638c181a6b54d30
DIST kompose-0.6.0.tar.gz 4972911 SHA256 4e42dd2d247ab88382cc29ca9e180cf29e809f8112f533b5a2520c0adb547cdb SHA512 93c4e9864169cbc5f5aacf20db79063bdf97ae1d9ae5942928c36843f4837ddfe7adc4d9fab77ac2470fedfd8653e159f1f0a9a0721f2c2b1edd45dded8bf000 WHIRLPOOL 7360994fc717fe2613117cde7f9da07562b1895abbd49bafe95075a26891b951b484fea95433d0f295c173f4947a2006d3b22cd70c2b36eddba6306526635ee6

@ -0,0 +1,30 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit golang-build golang-vcs-snapshot
EGO_PN="github.com/kubernetes-incubator/kompose/..."
EGIT_COMMIT="v${PV}"
COMPOSE_COMMIT="ae4ef9e"
ARCHIVE_URI="https://${EGO_PN%/*}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
DESCRIPTION="Tool to move from docker-compose to Kubernetes"
HOMEPAGE="https://github.com/kubernetes-incubator/kompose"
SRC_URI="${ARCHIVE_URI}"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="hardened"
RESTRICT="test"
src_compile() {
export CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')"
GOPATH="${S}" go build -ldflags="-X github.com/kubernetes-incubator/kompose/cmd.GITCOMMIT=${COMPOSE_COMMIT}" -o bin/kompose src/${EGO_PN%/*}/main.go || die
}
src_install() {
dobin bin/*
dodoc -r src/${EGO_PN%/*}/{docs,{README,RELEASE,ROADMAP,CHANGELOG,CONTRIBUTING}.md}
}

@ -1,2 +1 @@
DIST spice-protocol-0.12.11.tar.bz2 72691 SHA256 22bae438bfb6c3245b195755c3f55e72c1f2bfae6f39c905b576fcb6c79b6330 SHA512 748217f8e3e5d13e14429d6a963737ecbe545b1fc700efb875e74a83b9a8f98d9d8a8917a65ba3c49f69b478af7a995e708689033663e6354692c50c39f108f3 WHIRLPOOL e0d6efbb9677e9f53901cca9059e355cf1d63b15917335d5c66a2101ad347447061c17e33ffa638c012d9db3c3eac2d69903527e06ce49ce219ab69deb51c7d4
DIST spice-protocol-0.12.12.tar.bz2 80628 SHA256 17abdc2743b5d44b0f4423b61c44aafe9f2078c27218aeea78c2d02a5c409d03 SHA512 66e7a902b3c4a5a778cb91ffd9d324b12d414184146ac834dfb3bd81b4b6b1bb56258d3e1ce240b6f8747e1960fce8f0f6b0ada3617e9f9819be7118195fce6b WHIRLPOOL 15f7989e4508724dd43b435b0047a6f0bd6f1121ede74093012706007fe1d1755d51992e7085bbef37ee1bb0bb484141b8cdeb035b17280c70be23cb83ef66e7

@ -1,16 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="Headers defining the SPICE protocol"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
IUSE=""
DEPEND=""
RDEPEND=""

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -9,7 +9,7 @@ SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
IUSE=""
DEPEND=""

@ -1,2 +1 @@
DIST spice-vdagent-0.16.0.tar.bz2 128174 SHA256 5b951646e0bd996afda2d063e706fa2aad2655af5bdd1b6525260ab50be30f7d SHA512 033fe60f152daceb05b51963b78daf6f757d0ad26398f47479c957c5c0f1735e26019c05ef30e485317ba75dd1a57ee1bffbab20eb2c46614d88ed7401795a97 WHIRLPOOL b94a60e15eb0ea107e974ad68bd07296eec9e08840afb2e57da64b35f26a613637975791e1a615af260acf9345ec016564ab15d96a00443665b5d1880b267d71
DIST spice-vdagent-0.17.0.tar.bz2 130413 SHA256 f14a8bd8cdee10641aabd9ba32461a5844eab0fddb2a10c1d31386e7a9f7b33d SHA512 b26e44f6463ba70d5815956b301cc2351db22de41ed2ce8b2828d9bfa1cc581c86acd433f8f0d35d552d20f6ca140f88fa39b079ba26e9166dc07ad35bee502e WHIRLPOOL b83d034897c0a9ebc224072214081847ab0276edde82ad0d94d107421971fe64afc03ba3f7464735911fd57cf7a05b0cfcb0ecbb32eb4d55adc8abcf23fe8d09

@ -1,55 +0,0 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit linux-info
DESCRIPTION="SPICE VD Linux Guest Agent"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+consolekit selinux systemd"
CDEPEND="media-libs/alsa-lib
x11-libs/libXfixes
x11-libs/libXrandr
x11-libs/libX11
x11-libs/libXinerama
>=x11-libs/libpciaccess-0.10
>=app-emulation/spice-protocol-0.12.8
consolekit? ( sys-auth/consolekit sys-apps/dbus )
systemd? ( sys-apps/systemd )"
DEPEND="virtual/pkgconfig
${CDEPEND}"
RDEPEND="${CDEPEND}
selinux? ( sec-policy/selinux-vdagent )"
CONFIG_CHECK="~INPUT_UINPUT ~VIRTIO_CONSOLE"
ERROR_INPUT_UINPUT="User level input support is required"
ERROR_VIRTIO_CONSOLE="VirtIO console/serial device support is required"
src_configure() {
local opt="--with-session-info=none --with-init-script=systemd"
use systemd && opt+=" --with-session-info=systemd"
use consolekit && opt+=" --with-session-info=console-kit"
econf \
--localstatedir=/var \
${opt}
}
src_install() {
default
rm -rf "${D}"/etc/{rc,tmpfiles}.d
keepdir /var/log/spice-vdagentd
newinitd "${FILESDIR}/${PN}.initd-2" "${PN}"
newconfd "${FILESDIR}/${PN}.confd-2" "${PN}"
}

@ -1,4 +1,4 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@ -11,7 +11,7 @@ SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE="+consolekit selinux systemd"
CDEPEND="
@ -54,7 +54,7 @@ src_configure() {
src_install() {
default
rm -rf "${ED%/}"/etc/{rc,tmpfiles}.d || die
cd "${ED}" && rmdir -p var/run/spice-vdagentd || die
keepdir /var/log/spice-vdagentd

@ -1,5 +1 @@
DIST spice-0.12.7.tar.bz2 1220405 SHA256 1c8e96cb9e833e23372e2f461508135903b697fd8c6daff565e9e87f6d2f6aba SHA512 a740d500d0ccad3edd1f2f71e51c5a120d6ae98e44125f33870c12f5d1eeb30b809e588d05b2d0cadb4216e889b38e57d2278916817538311b875ff22e3b31ae WHIRLPOOL 61ffa3e280a346a2667ddd38dcfd63ffa6c1e6efd0f05da4fad43b00ca5e1a1587411a907b929b75e4d1e72ebcef29621ccdd76dfb313e8f3a5513a5a367132b
DIST spice-0.12.8.tar.bz2 1223778 SHA256 f901a5c5873d61acac84642f9eea5c4d6386fc3e525c2b68792322794e1c407d SHA512 6485d3522af1cde93d2c0abad7f7ef9f2e4d3e5049314fb93b6dd4b86e33d67d353a3ff42a355c8fd991bad447bbde1e6320c083bbc6f02b576bd9cebe7269ed WHIRLPOOL 9363254a4b072e8c06e7c0ea4d25dd4b068e4700cbb4fdaabc9f8fe9291e2f67afc321b0d56c2b6f46153b3f6bd7d6c96341437053b0410808fb95ddd01354fb
DIST spice-0.13.1.tar.bz2 1245323 SHA256 9ecb130424da02e90c235c1294f6e759d7c676c5e710587a5c98a1f20f991da2 SHA512 a8e65cc02c802686f2e0c21615401e13b337e050c40938bebefa684abc1ce0e2d478136d0fec481a8ee30ed98f2e2fb909dfbf6cd65e9dfd7093d59f825b95d5 WHIRLPOOL 068d7d26f18435995546d84b0d8d81ced4973773303463e597cf05e1c5accd9ac8554f22032eb55827bebbe6c0fc14915455da24c58fc70b135d955fe3442db7
DIST spice-0.13.2.tar.bz2 1284734 SHA256 045a1f145d8207ecf33105c8a8917252c1201c45791fdc544733465a37974954 SHA512 7220c6550446a8077522442bd518cff68439bb0b00ee199920b32a97c3655ccad75a0cdfc822a99be678e6098ad33698b26340caddae0400403490a89137d367 WHIRLPOOL f2bd409e87203c2bbe481e6b6ba9ae3c6cfee0e67b0dd5073c97e9ff14d9c02a7cec0606700717ce9c25e478a38eefc925f9c797697981528f357464f388b65d
DIST spice-0.13.3.tar.bz2 1322505 SHA256 30f710c0e7594e05b6b9cc702be748a69f910a95192ab851d748c256157fb89e SHA512 63496fbd3df0fd453052cef8e1fb00a3a28f0105610676fdc4a58043cbc6da571ae4407701af2b817e410d05ce727d60d5ee0c93c8897231e25229897c51d95a WHIRLPOOL 16bb08301d66c1f21f612f5be87ba1ffef7132f3c18ac3ab7feec21e16de61461648311d04f6990254d4c47ee7a6d39f4c33f122e941e5a3fc0c2ed289dd928b

@ -1,30 +0,0 @@
server/tests/Makefile.am | 2 ++
server/tests/Makefile.in | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/server/tests/Makefile.am b/server/tests/Makefile.am
index e77865c..905de9d 100644
--- a/server/tests/Makefile.am
+++ b/server/tests/Makefile.am
@@ -19,6 +19,8 @@ LDADD = \
$(top_builddir)/server/libspice-server.la \
$(NULL)
+AM_LDFLAGS = -pthread
+
COMMON_BASE = \
basic_event_loop.c \
basic_event_loop.h \
diff --git a/server/tests/Makefile.in b/server/tests/Makefile.in
index 5b177e2..3aacfd3 100644
--- a/server/tests/Makefile.in
+++ b/server/tests/Makefile.in
@@ -144,7 +144,7 @@ am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
+ $(AM_LDFLAGS) $(LDFLAGS) -pthread -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;

@ -1,89 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
Date: Thu, 17 Dec 2015 18:13:47 +0100
Subject: [PATCH] smartcard: add a ref to item before adding to pipe
There is an unref when the message is sent.
==17204== ERROR: AddressSanitizer: heap-use-after-free on address 0x6008000144a8 at pc 0x7fffee0ce245 bp 0x7fffffffc630 sp 0x7fffffffc620
READ of size 4 at 0x6008000144a8 thread T0
#0 0x7fffee0ce244 in smartcard_unref_vsc_msg_item /home/elmarco/src/spice/spice/server/smartcard.c:608
#1 0x7fffee0cb451 in smartcard_unref_msg_to_client /home/elmarco/src/spice/spice/server/smartcard.c:178
#2 0x7fffedfcdf14 in spice_char_device_read_from_device /home/elmarco/src/spice/spice/server/char-device.c:330
#3 0x7fffedfd1763 in spice_char_device_wakeup /home/elmarco/src/spice/spice/server/char-device.c:901
#4 0x7fffee05da98 in spice_server_char_device_wakeup /home/elmarco/src/spice/spice/server/reds.c:2990
#5 0x55555593fa34 in spice_chr_write /home/elmarco/src/qemu/spice-qemu-char.c:189
#6 0x5555559375f1 in qemu_chr_fe_write /home/elmarco/src/qemu/qemu-char.c:220
#7 0x555555b3b682 in ccid_card_vscard_send_msg.isra.2 /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:76
#8 0x555555b3c466 in ccid_card_vscard_send_error /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:91
#9 0x555555b3c466 in ccid_card_vscard_handle_message /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:242
#10 0x555555b3c466 in ccid_card_vscard_read /home/elmarco/src/qemu/hw/usb/ccid-card-passthru.c:289
#11 0x55555593f169 in vmc_write /home/elmarco/src/qemu/spice-qemu-char.c:41
#12 0x7fffedfcee6d in spice_char_device_write_to_device /home/elmarco/src/spice/spice/server/char-device.c:477
#13 0x7fffedfcfd31 in spice_char_device_write_buffer_add /home/elmarco/src/spice/spice/server/char-device.c:629
#14 0x7fffee0ce9df in smartcard_channel_write_to_reader /home/elmarco/src/spice/spice/server/smartcard.c:675
#15 0x7fffee0cc7db in smartcard_char_device_notify_reader_add /home/elmarco/src/spice/spice/server/smartcard.c:341
#16 0x7fffee0ce4f3 in smartcard_add_reader /home/elmarco/src/spice/spice/server/smartcard.c:648
#17 0x7fffee0cf2e2 in smartcard_channel_handle_message /home/elmarco/src/spice/spice/server/smartcard.c:763
#18 0x7fffedffe21f in red_peer_handle_incoming /home/elmarco/src/spice/spice/server/red-channel.c:307
#19 0x7fffedffe4f6 in red_channel_client_receive /home/elmarco/src/spice/spice/server/red-channel.c:325
#20 0x7fffee00726c in red_channel_client_event /home/elmarco/src/spice/spice/server/red-channel.c:1566
#21 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
#22 0x555555c3b800 in main_loop_wait /home/elmarco/src/qemu/main-loop.c:504
#23 0x5555556f160c in main_loop /home/elmarco/src/qemu/vl.c:1818
#24 0x5555556f160c in main /home/elmarco/src/qemu/vl.c:4394
#25 0x7fffed7d0b14 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/libc-start.c:274
#26 0x5555556f9c20 in _start (/home/elmarco/src/qemu/x86_64-softmmu/qemu-system-x86_64+0x1a5c20)
0x6008000144a8 is located 24 bytes inside of 40-byte region [0x600800014490,0x6008000144b8)
freed by thread T0 here:
#0 0x7ffff4e61009 in __interceptor_free /usr/src/debug/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/x86_64-redhat-linux/libsanitizer/asan/../../../../libsanitizer/asan/asan_malloc_linux.cc:61
#1 0x7fffee0ce2a1 in smartcard_unref_vsc_msg_item /home/elmarco/src/spice/spice/server/smartcard.c:610
#2 0x7fffee0cdd58 in smartcard_channel_release_pipe_item /home/elmarco/src/spice/spice/server/smartcard.c:548
#3 0x7fffee000668 in red_channel_client_release_item /home/elmarco/src/spice/spice/server/red-channel.c:602
#4 0x7fffee0006ef in red_channel_client_release_sent_item /home/elmarco/src/spice/spice/server/red-channel.c:609
#5 0x7fffee0007b5 in red_channel_peer_on_out_msg_done /home/elmarco/src/spice/spice/server/red-channel.c:620
#6 0x7fffedffed7e in red_peer_handle_outgoing /home/elmarco/src/spice/spice/server/red-channel.c:385
#7 0x7fffee0057bb in red_channel_client_send /home/elmarco/src/spice/spice/server/red-channel.c:1294
#8 0x7fffee0076e6 in red_channel_client_begin_send_message /home/elmarco/src/spice/spice/server/red-channel.c:1605
#9 0x7fffee0cdccd in smartcard_channel_send_item /home/elmarco/src/spice/spice/server/smartcard.c:541
#10 0x7fffee000570 in red_channel_client_send_item /home/elmarco/src/spice/spice/server/red-channel.c:588
#11 0x7fffee005bfb in red_channel_client_push /home/elmarco/src/spice/spice/server/red-channel.c:1347
#12 0x7fffee007ef7 in red_channel_client_pipe_add_push /home/elmarco/src/spice/spice/server/red-channel.c:1673
#13 0x7fffee0cde4d in smartcard_channel_client_pipe_add_push /home/elmarco/src/spice/spice/server/smartcard.c:571
#14 0x7fffee0cb567 in smartcard_send_msg_to_client /home/elmarco/src/spice/spice/server/smartcard.c:187
#15 0x7fffedfcdba2 in spice_char_device_send_msg_to_clients /home/elmarco/src/spice/spice/server/char-device.c:282
#16 0x7fffedfcdea4 in spice_char_device_read_from_device /home/elmarco/src/spice/spice/server/char-device.c:329
#17 0x7fffedfd1763 in spice_char_device_wakeup /home/elmarco/src/spice/spice/server/char-device.c:901
#18 0x7fffee05da98 in spice_server_char_device_wakeup /home/elmarco/src/spice/spice/server/reds.c:2990
#19 0x55555593fa34 in spice_chr_write /home/elmarco/src/qemu/spice-qemu-char.c:189
Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
---
server/smartcard.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/server/smartcard.c b/server/smartcard.c
index aad22aa..8d529fe 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -172,14 +172,17 @@ static void smartcard_unref_msg_to_client(SpiceCharDeviceMsgToClient *msg,
smartcard_unref_vsc_msg_item((MsgItem *)msg);
}
-static void smartcard_send_msg_to_client(SpiceCharDeviceMsgToClient *msg,
+static void smartcard_send_msg_to_client(SpiceCharDeviceMsgToClient *message,
RedClient *client,
void *opaque)
{
SmartCardDeviceState *dev = opaque;
- spice_assert(dev->scc && dev->scc->base.client == client);
- smartcard_channel_client_pipe_add_push(&dev->scc->base, &((MsgItem *)msg)->base);
+ MsgItem *msg = (MsgItem *)message;
+ PipeItem *item = &msg->base;
+ spice_assert(dev->scc && dev->scc->base.client == client);
+ smartcard_ref_vsc_msg_item(msg);
+ smartcard_channel_client_pipe_add_push(&dev->scc->base, item);
}
static void smartcard_send_tokens_to_client(RedClient *client, uint32_t tokens, void *opaque)

@ -1,61 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
Date: Thu, 17 Dec 2015 18:16:22 +0100
Subject: [PATCH] smartcard: allocate msg with the expected size
==529== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60040009c098 at pc 0x7fffee0eda6d bp 0x7fffffffcd00 sp 0x7fffffffccf0
WRITE of size 4 at 0x60040009c098 thread T0
#0 0x7fffee0eda6c in smartcard_char_device_notify_reader_add /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:334
#1 0x7fffee0ef783 in smartcard_add_reader /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:642
#2 0x7fffee0f0568 in smartcard_channel_handle_message /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:757
#3 0x7fffee032f3f in red_peer_handle_incoming /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:304
#4 0x7fffee033216 in red_channel_client_receive /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:322
#5 0x7fffee03bf1f in red_channel_client_event /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:1561
#6 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
#7 0x555555c3b800 in main_loop_wait /home/elmarco/src/qemu/main-loop.c:504
#8 0x5555556f160c in main_loop /home/elmarco/src/qemu/vl.c:1818
#9 0x5555556f160c in main /home/elmarco/src/qemu/vl.c:4394
#10 0x7fffed80eb14 in __libc_start_main /usr/src/debug/glibc-2.17-c758a686/csu/libc-start.c:274
#11 0x5555556f9c20 in _start (/home/elmarco/src/qemu/x86_64-softmmu/qemu-system-x86_64+0x1a5c20)
0x60040009c098 is located 0 bytes to the right of 8-byte region [0x60040009c090,0x60040009c098)
allocated by thread T0 here:
#0 0x7ffff4e612be in __interceptor_realloc /usr/src/debug/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/x86_64-redhat-linux/libsanitizer/asan/../../../../libsanitizer/asan/asan_malloc_linux.cc:92
#1 0x7fffee121308 in spice_realloc /home/elmarco/pkg/spice/spice-0.12.4/spice-common/common/mem.c:123
#2 0x7fffee004a48 in __spice_char_device_write_buffer_get /home/elmarco/pkg/spice/spice-0.12.4/server/char_device.c:516
#3 0x7fffee004e87 in spice_char_device_write_buffer_get /home/elmarco/pkg/spice/spice-0.12.4/server/char_device.c:557
#4 0x7fffee0ed8b9 in smartcard_char_device_notify_reader_add /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:325
#5 0x7fffee0ef783 in smartcard_add_reader /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:642
#6 0x7fffee0f0568 in smartcard_channel_handle_message /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:757
#7 0x7fffee032f3f in red_peer_handle_incoming /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:304
#8 0x7fffee033216 in red_channel_client_receive /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:322
#9 0x7fffee03bf1f in red_channel_client_event /home/elmarco/pkg/spice/spice-0.12.4/server/red_channel.c:1561
#10 0x555555c3c53d in qemu_iohandler_poll /home/elmarco/src/qemu/iohandler.c:143
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/elmarco/pkg/spice/spice-0.12.4/server/smartcard.c:334 smartcard_char_device_notify_reader_add
Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
---
server/smartcard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/smartcard.c b/server/smartcard.c
index 8d529fe..3043ad1 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -325,7 +325,7 @@ static void smartcard_char_device_notify_reader_add(SmartCardDeviceState *st)
SpiceCharDeviceWriteBuffer *write_buf;
VSCMsgHeader *vheader;
- write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(vheader));
+ write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(*vheader));
if (!write_buf) {
spice_error("failed to allocate write buffer");
return;
@@ -372,7 +372,7 @@ static void smartcard_char_device_notify_reader_remove(SmartCardDeviceState *st)
spice_debug("reader add was never sent to the device");
return;
}
- write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(vheader));
+ write_buf = spice_char_device_write_buffer_get(st->chardev_st, NULL, sizeof(*vheader));
if (!write_buf) {
spice_error("failed to allocate write buffer");
return;

@ -1,121 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio@redhat.com>
Date: Mon, 29 Feb 2016 14:24:03 +0000
Subject: [PATCH] create a function to validate surface parameters
Make possible to reuse it outside red-parse-qxl.c
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
server/red_parse_qxl.c | 50 ++++++++++++++++++++++++++++++++------------------
server/red_parse_qxl.h | 5 +++++
2 files changed, 37 insertions(+), 18 deletions(-)
diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index bd0c408..7dc6a4d 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -19,7 +19,6 @@
#include <config.h>
#endif
-#include <stdbool.h>
#include <inttypes.h>
#include <glib.h>
#include "common/lz_common.h"
@@ -1306,13 +1305,41 @@ static unsigned int surface_format_to_bpp(uint32_t format)
return 0;
}
+bool red_validate_surface(uint32_t width, uint32_t height,
+ int32_t stride, uint32_t format)
+{
+ unsigned int bpp;
+ uint64_t size;
+
+ bpp = surface_format_to_bpp(format);
+
+ /* check if format is valid */
+ if (!bpp) {
+ return false;
+ }
+
+ /* check stride is larger than required bytes */
+ size = ((uint64_t) width * bpp + 7u) / 8u;
+ /* the uint32_t conversion is here to avoid problems with -2^31 value */
+ if (stride == G_MININT32 || size > (uint32_t) abs(stride)) {
+ return false;
+ }
+
+ /* the multiplication can overflow, also abs(-2^31) may return a negative value */
+ size = (uint64_t) height * abs(stride);
+ if (size > MAX_DATA_CHUNK) {
+ return false;
+ }
+
+ return true;
+}
+
int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
RedSurfaceCmd *red, QXLPHYSICAL addr)
{
QXLSurfaceCmd *qxl;
uint64_t size;
int error;
- unsigned int bpp;
qxl = (QXLSurfaceCmd *)get_virt(slots, addr, sizeof(*qxl), group_id,
&error);
@@ -1331,26 +1358,13 @@ int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
red->u.surface_create.width = qxl->u.surface_create.width;
red->u.surface_create.height = qxl->u.surface_create.height;
red->u.surface_create.stride = qxl->u.surface_create.stride;
- bpp = surface_format_to_bpp(red->u.surface_create.format);
- /* check if format is valid */
- if (!bpp) {
+ if (!red_validate_surface(red->u.surface_create.width, red->u.surface_create.height,
+ red->u.surface_create.stride, red->u.surface_create.format)) {
return 1;
}
- /* check stride is larger than required bytes */
- size = ((uint64_t) red->u.surface_create.width * bpp + 7u) / 8u;
- /* the uint32_t conversion is here to avoid problems with -2^31 value */
- if (red->u.surface_create.stride == G_MININT32
- || size > (uint32_t) abs(red->u.surface_create.stride)) {
- return 1;
- }
-
- /* the multiplication can overflow, also abs(-2^31) may return a negative value */
- size = (uint64_t) red->u.surface_create.height * abs(red->u.surface_create.stride);
- if (size > MAX_DATA_CHUNK) {
- return 1;
- }
+ size = red->u.surface_create.height * abs(red->u.surface_create.stride);
red->u.surface_create.data =
(uint8_t*)get_virt(slots, qxl->u.surface_create.data, size, group_id, &error);
if (error) {
diff --git a/server/red_parse_qxl.h b/server/red_parse_qxl.h
index 3adc9fa..e18d8d0 100644
--- a/server/red_parse_qxl.h
+++ b/server/red_parse_qxl.h
@@ -19,6 +19,8 @@
#ifndef RED_ABI_TRANSLATE_H
#define RED_ABI_TRANSLATE_H
+#include <stdbool.h>
+
#include <spice/qxl_dev.h>
#include "red_common.h"
#include "red_memslots.h"
@@ -128,6 +130,9 @@ int red_get_message(RedMemSlotInfo *slots, int group_id,
RedMessage *red, QXLPHYSICAL addr);
void red_put_message(RedMessage *red);
+bool red_validate_surface(uint32_t width, uint32_t height,
+ int32_t stride, uint32_t format);
+
int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
RedSurfaceCmd *red, QXLPHYSICAL addr);
void red_put_surface_cmd(RedSurfaceCmd *red);

@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio@redhat.com>
Date: Mon, 29 Feb 2016 14:34:49 +0000
Subject: [PATCH] improve primary surface parameter checks
Primary surface, as additional surfaces, can be used to access
host memory from the guest using invalid parameters.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
---
server/red_worker.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/server/red_worker.c b/server/red_worker.c
index a7eaab9..f9179a6 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -11380,6 +11380,15 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
spice_warn_if(((uint64_t)abs(surface.stride) * (uint64_t)surface.height) !=
abs(surface.stride) * surface.height);
+ /* surface can arrive from guest unchecked so make sure
+ * guest is not a malicious one and drop invalid requests
+ */
+ if (!red_validate_surface(surface.width, surface.height,
+ surface.stride, surface.format)) {
+ spice_warning("wrong primary surface creation request");
+ return;
+ }
+
line_0 = (uint8_t*)get_virt(&worker->mem_slots, surface.mem,
surface.height * abs(surface.stride),
surface.group_id, &error);

@ -1,36 +0,0 @@
commit 1d597f4b1a6bbeaf3dda998413a1e3cef2e40681
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: Wed Jul 20 17:16:31 2016 +0400
Call migrate_end_complete() after falling back to switch-host
Eventually, during a seamless migration, qemu may finish to migrate
before the spice client even finished to connect all channels to
destination and informed the server. In this case,
main_channel_client_migrate_src_complete() will fall back to
switch-host method, and reds_mig_fill_wait_disconnect() is called to
complete the migration (disconnecting all channels).
reds_mig_cleanup() is called when all channels are disconnected, but
reds->mig_wait_connect is still TRUE, and it will call
migrate_connect_complete() instead of the expected
migrate_end_complete(). Setting reds->mig_wait_connect to FALSE when
reds_mig_fill_wait_disconnect() solves the issue.
Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=1352836
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
diff --git a/server/reds.c b/server/reds.c
index 61bf735..f40b65c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2816,6 +2816,7 @@ static void reds_mig_fill_wait_disconnect(void)
wait_client->client = client;
ring_add(&reds->mig_wait_disconnect_clients, &wait_client->link);
}
+ reds->mig_wait_connect = FALSE;
reds->mig_wait_disconnect = TRUE;
core->timer_start(reds->mig_timer, MIGRATE_TIMEOUT);
}

@ -1,56 +0,0 @@
From fd4a179a15882234f86ded87905a240dc76a9445 Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@43-1.org>
Date: Tue, 14 Jun 2016 00:08:05 -0500
Subject: [PATCH 1/2] Port fix for CVE-2016-0749 to 0.13.1, part I
This is a port of
0065-smartcard-add-a-ref-to-item-before-adding-to-pipe.patch
to version 0.13.1
Original commit message:
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
Date: Thu, 17 Dec 2015 18:13:47 +0100
Subject: [PATCH] smartcard: add a ref to item before adding to pipe
There is an unref when the message is sent.
[...]
Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
---
server/smartcard.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/server/smartcard.c b/server/smartcard.c
index ba6f2f5..96e4295 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -181,14 +181,18 @@ static void smartcard_unref_msg_to_client(RedCharDeviceMsgToClient *msg,
smartcard_unref_vsc_msg_item((MsgItem *)msg);
}
-static void smartcard_send_msg_to_client(RedCharDeviceMsgToClient *msg,
+static void smartcard_send_msg_to_client(RedCharDeviceMsgToClient *message,
RedClient *client,
void *opaque)
{
RedCharDeviceSmartcard *dev = opaque;
- spice_assert(dev->priv->scc && dev->priv->scc->base.client == client);
- smartcard_channel_client_pipe_add_push(&dev->priv->scc->base, &((MsgItem *)msg)->base);
+ MsgItem *msg = (MsgItem *)message;
+ PipeItem *item = &msg->base;
+
+ spice_assert(dev->priv->scc && dev->priv->scc->base.client == client);
+ smartcard_ref_vsc_msg_item(msg);
+ smartcard_channel_client_pipe_add_push(&dev->priv->scc->base, item);
}
static void smartcard_send_tokens_to_client(RedClient *client, uint32_t tokens, void *opaque)
--
2.7.3

@ -1,50 +0,0 @@
From 4cd23b8378e68283c7c9cf0b1e25dae11cf69c3e Mon Sep 17 00:00:00 2001
From: Matthias Maier <tamiko@43-1.org>
Date: Tue, 14 Jun 2016 00:15:48 -0500
Subject: [PATCH 2/2] Port fix for CVE-2016-0749 to 0.13.1, part II
This is a port of
0066-smartcard-allocate-msg-with-the-expected-size.patch
to version 0.13.1
Original commit message:
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marc-Andre Lureau <marcandre.lureau@redhat.com>
Date: Thu, 17 Dec 2015 18:16:22 +0100
Subject: [PATCH] smartcard: allocate msg with the expected size
[...]
Signed-off-by: Marc-Andre Lureau <marcandre.lureau@redhat.com>
---
server/smartcard.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/server/smartcard.c b/server/smartcard.c
index 96e4295..c317512 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -313,7 +313,7 @@ static void smartcard_char_device_notify_reader_add(RedCharDeviceSmartcard *dev)
RedCharDeviceWriteBuffer *write_buf;
VSCMsgHeader *vheader;
- write_buf = red_char_device_write_buffer_get(RED_CHAR_DEVICE(dev), NULL, sizeof(vheader));
+ write_buf = red_char_device_write_buffer_get(RED_CHAR_DEVICE(dev), NULL, sizeof(*vheader));
if (!write_buf) {
spice_error("failed to allocate write buffer");
return;
@@ -360,7 +360,7 @@ static void smartcard_char_device_notify_reader_remove(RedCharDeviceSmartcard *d
spice_debug("reader add was never sent to the device");
return;
}
- write_buf = red_char_device_write_buffer_get(RED_CHAR_DEVICE(dev), NULL, sizeof(vheader));
+ write_buf = red_char_device_write_buffer_get(RED_CHAR_DEVICE(dev), NULL, sizeof(*vheader));
if (!write_buf) {
spice_error("failed to allocate write buffer");
return;
--
2.7.3

@ -1,109 +0,0 @@
From fc06265c3780e05503410a6646d1434e15d25b03 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio@redhat.com>
Date: Mon, 29 Feb 2016 14:24:03 +0000
Subject: [PATCH 1/2] factor out red_validate_surface function to validate
surface parameters
Make possible to reuse it outside red-parse-qxl.c.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
---
server/red-parse-qxl.c | 49 ++++++++++++++++++++++++++++++++-----------------
server/red-parse-qxl.h | 3 +++
2 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/server/red-parse-qxl.c b/server/red-parse-qxl.c
index 18b7ea6..b462311 100644
--- a/server/red-parse-qxl.c
+++ b/server/red-parse-qxl.c
@@ -1327,13 +1327,41 @@ static unsigned int surface_format_to_bpp(uint32_t format)
return 0;
}
+bool red_validate_surface(uint32_t width, uint32_t height,
+ int32_t stride, uint32_t format)
+{
+ unsigned int bpp;
+ uint64_t size;
+
+ bpp = surface_format_to_bpp(format);
+
+ /* check if format is valid */
+ if (!bpp) {
+ return false;
+ }
+
+ /* check stride is larger than required bytes */
+ size = ((uint64_t) width * bpp + 7u) / 8u;
+ /* the uint32_t conversion is here to avoid problems with -2^31 value */
+ if (stride == G_MININT32 || size > (uint32_t) abs(stride)) {
+ return false;
+ }
+
+ /* the multiplication can overflow, also abs(-2^31) may return a negative value */
+ size = (uint64_t) height * abs(stride);
+ if (size > MAX_DATA_CHUNK) {
+ return false;
+ }
+
+ return true;
+}
+
int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
RedSurfaceCmd *red, QXLPHYSICAL addr)
{
QXLSurfaceCmd *qxl;
uint64_t size;
int error;
- unsigned int bpp;
qxl = (QXLSurfaceCmd *)memslot_get_virt(slots, addr, sizeof(*qxl), group_id,
&error);
@@ -1353,26 +1381,13 @@ int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
red->u.surface_create.width = qxl->u.surface_create.width;
red->u.surface_create.height = qxl->u.surface_create.height;
red->u.surface_create.stride = qxl->u.surface_create.stride;
- bpp = surface_format_to_bpp(red->u.surface_create.format);
- /* check if format is valid */
- if (!bpp) {
+ if (!red_validate_surface(red->u.surface_create.width, red->u.surface_create.height,
+ red->u.surface_create.stride, red->u.surface_create.format)) {
return 1;
}
- /* check stride is larger than required bytes */
- size = ((uint64_t) red->u.surface_create.width * bpp + 7u) / 8u;
- /* the uint32_t conversion is here to avoid problems with -2^31 value */
- if (red->u.surface_create.stride == G_MININT32
- || size > (uint32_t) abs(red->u.surface_create.stride)) {
- return 1;
- }
-
- /* the multiplication can overflow, also abs(-2^31) may return a negative value */
- size = (uint64_t) red->u.surface_create.height * abs(red->u.surface_create.stride);
- if (size > MAX_DATA_CHUNK) {
- return 1;
- }
+ size = red->u.surface_create.height * abs(red->u.surface_create.stride);
red->u.surface_create.data =
(uint8_t*)memslot_get_virt(slots, qxl->u.surface_create.data, size, group_id, &error);
if (error) {
diff --git a/server/red-parse-qxl.h b/server/red-parse-qxl.h
index 9c30572..72a57b4 100644
--- a/server/red-parse-qxl.h
+++ b/server/red-parse-qxl.h
@@ -127,6 +127,9 @@ int red_get_message(RedMemSlotInfo *slots, int group_id,
RedMessage *red, QXLPHYSICAL addr);
void red_put_message(RedMessage *red);
+bool red_validate_surface(uint32_t width, uint32_t height,
+ int32_t stride, uint32_t format);
+
int red_get_surface_cmd(RedMemSlotInfo *slots, int group_id,
RedSurfaceCmd *red, QXLPHYSICAL addr);
void red_put_surface_cmd(RedSurfaceCmd *red);
--
2.7.3

@ -1,50 +0,0 @@
From b1c167bb9e8047e93bfd43a43832963c8e830f5b Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio@redhat.com>
Date: Wed, 2 Mar 2016 12:35:41 +0000
Subject: [PATCH 2/2] improve primary surface parameter checks
Primary surface, as additional surfaces, can be used to access
host memory from the guest using invalid parameters.
The removed warning is not enough to prevent all cases. Also a warning
is not enough to stop an escalation to happen.
The red_validate_surface do different checks to make sure surface
request is valid and not cause possible buffer/integer overflows:
- format is valid;
- width is not large to cause overflow compared to stride;
- stride is not -2^31 (a number which negate is still <0);
- stride * height does not overflow.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1312980.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
---
server/red-worker.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/server/red-worker.c b/server/red-worker.c
index 241c300..c7fc8bd 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -681,8 +681,15 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
spice_debug(NULL);
spice_warn_if_fail(surface_id == 0);
spice_warn_if_fail(surface.height != 0);
- spice_warn_if_fail(((uint64_t)abs(surface.stride) * (uint64_t)surface.height) ==
- abs(surface.stride) * surface.height);
+
+ /* surface can arrive from guest unchecked so make sure
+ * guest is not a malicious one and drop invalid requests
+ */
+ if (!red_validate_surface(surface.width, surface.height,
+ surface.stride, surface.format)) {
+ spice_warning("wrong primary surface creation request");
+ return;
+ }
line_0 = (uint8_t*)memslot_get_virt(&worker->mem_slots, surface.mem,
surface.height * abs(surface.stride),
--
2.7.3

@ -0,0 +1,13 @@
diff --git a/spice-common/m4/spice-deps.m4 b/spice-common/m4/spice-deps.m4
index adedec4..6cb8bde 100644
--- a/spice-common/m4/spice-deps.m4
+++ b/spice-common/m4/spice-deps.m4
@@ -185,7 +185,7 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
have_lz4="no"
if test "x$enable_lz4" != "xno"; then
- PKG_CHECK_MODULES([LZ4], [liblz4 >= 129], [have_lz4="yes"], [have_lz4="no"])
+ PKG_CHECK_MODULES([LZ4], [liblz4], [have_lz4="yes"], [have_lz4="no"])
if test "x$have_lz4" = "xyes"; then
AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])

@ -1,89 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 python3_4 )
inherit eutils python-any-r1
DESCRIPTION="SPICE server"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="libressl sasl smartcard static-libs"
# the libspice-server only uses the headers of libcacard
RDEPEND="
>=dev-libs/glib-2.22:2[static-libs(+)?]
>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
media-libs/opus[static-libs(+)?]
sys-libs/zlib[static-libs(+)?]
virtual/jpeg:0=[static-libs(+)?]
>=x11-libs/pixman-0.17.7[static-libs(+)?]
!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
libressl? ( dev-libs/libressl[static-libs(+)?] )
sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )"
DEPEND="
~app-emulation/spice-protocol-0.12.11
virtual/pkgconfig
$(python_gen_any_dep '
>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
')
smartcard? ( app-emulation/qemu[smartcard] )
${RDEPEND}"
python_check_deps() {
has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
has_version "dev-python/six[${PYTHON_USEDEP}]"
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
}
# maintainer notes:
# * opengl support is currently broken
src_prepare() {
epatch \
"${FILESDIR}"/0.11.0-gold.patch \
"${FILESDIR}"/0.12.6-CVE-2016-0749-p1.patch \
"${FILESDIR}"/0.12.6-CVE-2016-0749-p2.patch \
"${FILESDIR}"/0.12.6-CVE-2016-2150-p1.patch \
"${FILESDIR}"/0.12.6-CVE-2016-2150-p2.patch
epatch_user
}
src_configure() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
econf \
$(use_enable static-libs static) \
$(use_with sasl) \
$(use_enable smartcard) \
--disable-gui
}
src_compile() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
default
}
src_install() {
default
use static-libs || prune_libtool_files
}

@ -1,86 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 python3_4 )
inherit eutils python-any-r1
DESCRIPTION="SPICE server"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="libressl sasl smartcard static-libs"
# the libspice-server only uses the headers of libcacard
RDEPEND="
>=dev-libs/glib-2.22:2[static-libs(+)?]
>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
media-libs/opus[static-libs(+)?]
sys-libs/zlib[static-libs(+)?]
virtual/jpeg:0=[static-libs(+)?]
>=x11-libs/pixman-0.17.7[static-libs(+)?]
!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
libressl? ( dev-libs/libressl[static-libs(+)?] )
sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )"
DEPEND="
~app-emulation/spice-protocol-0.12.11
virtual/pkgconfig
$(python_gen_any_dep '
>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
')
smartcard? ( app-emulation/qemu[smartcard] )
${RDEPEND}"
python_check_deps() {
has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
has_version "dev-python/six[${PYTHON_USEDEP}]"
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
}
# maintainer notes:
# * opengl support is currently broken
src_prepare() {
epatch \
"${FILESDIR}"/0.11.0-gold.patch \
"${FILESDIR}"/0.12.8-upstream-fix.patch
epatch_user
}
src_configure() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
econf \
$(use_enable static-libs static) \
$(use_with sasl) \
$(use_enable smartcard) \
--disable-gui
}
src_compile() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
default
}
src_install() {
default
use static-libs || prune_libtool_files
}

@ -1,91 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python{2_7,3_4} )
inherit eutils python-any-r1
DESCRIPTION="SPICE server"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="libressl lz4 sasl smartcard static-libs"
# the libspice-server only uses the headers of libcacard
RDEPEND="
>=dev-libs/glib-2.22:2[static-libs(+)?]
>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
media-libs/opus[static-libs(+)?]
sys-libs/zlib[static-libs(+)?]
virtual/jpeg:0=[static-libs(+)?]
>=x11-libs/pixman-0.17.7[static-libs(+)?]
!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
libressl? ( dev-libs/libressl[static-libs(+)?] )
lz4? ( app-arch/lz4 )
smartcard? ( >=app-emulation/libcacard-0.1.2 )
sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )"
DEPEND="
~app-emulation/spice-protocol-0.12.11
virtual/pkgconfig
$(python_gen_any_dep '
>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
')
smartcard? ( app-emulation/qemu[smartcard] )
${RDEPEND}"
python_check_deps() {
has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
has_version "dev-python/six[${PYTHON_USEDEP}]"
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
}
# maintainer notes:
# * opengl support is currently broken
src_prepare() {
epatch \
"${FILESDIR}"/${PV}-CVE-2016-0749-p1.patch \
"${FILESDIR}"/${PV}-CVE-2016-0749-p2.patch \
"${FILESDIR}"/${PV}-CVE-2016-2150-p1.patch \
"${FILESDIR}"/${PV}-CVE-2016-2150-p2.patch
epatch_user
}
src_configure() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
econf \
$(use_enable static-libs static) \
$(use_enable lz4) \
$(use_with sasl) \
$(use_enable smartcard) \
--disable-gui
}
src_compile() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
default
}
src_install() {
default
use static-libs || prune_libtool_files
}

@ -1,88 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4} )
inherit eutils python-any-r1 readme.gentoo-r1 xdg-utils
DESCRIPTION="SPICE server"
HOMEPAGE="http://spice-space.org/"
SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
# the libspice-server only uses the headers of libcacard
RDEPEND="
>=dev-libs/glib-2.22:2[static-libs(+)?]
>=media-libs/celt-0.5.1.1:0.5.1[static-libs(+)?]
media-libs/opus[static-libs(+)?]
sys-libs/zlib[static-libs(+)?]
virtual/jpeg:0=[static-libs(+)?]
>=x11-libs/pixman-0.17.7[static-libs(+)?]
!libressl? ( dev-libs/openssl:0[static-libs(+)?] )
libressl? ( dev-libs/libressl[static-libs(+)?] )
lz4? ( app-arch/lz4 )
smartcard? ( >=app-emulation/libcacard-0.1.2 )
sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
gstreamer? ( media-libs/gstreamer:1.0 )"
DEPEND="
~app-emulation/spice-protocol-0.12.12
virtual/pkgconfig
$(python_gen_any_dep '
>=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
')
smartcard? ( app-emulation/qemu[smartcard] )
${RDEPEND}"
python_check_deps() {
has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
has_version "dev-python/six[${PYTHON_USEDEP}]"
}
pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
}
# maintainer notes:
# * opengl support is currently broken
src_configure() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
xdg_environment_reset
local myconf="
$(use_enable static-libs static)
$(use_enable lz4)
$(use_with sasl)
$(use_enable smartcard)
$(usex gstreamer "1.0" "no")
--enable-celt051
--disable-gui
"
econf ${myconf}
}
src_compile() {
# Prevent sandbox violations, bug #586560
# https://bugzilla.gnome.org/show_bug.cgi?id=744134
# https://bugzilla.gnome.org/show_bug.cgi?id=744135
addpredict /dev
default
}
src_install() {
default
use static-libs || prune_libtool_files
readme.gentoo_create_doc
}

@ -4,7 +4,7 @@
EAPI=6
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
inherit ltprune python-any-r1 readme.gentoo-r1 xdg-utils
inherit autotools ltprune python-any-r1 readme.gentoo-r1 xdg-utils
DESCRIPTION="SPICE server"
HOMEPAGE="http://spice-space.org/"
@ -12,7 +12,7 @@ SRC_URI="http://spice-space.org/download/releases/${P}.tar.bz2"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE="libressl lz4 sasl smartcard static-libs gstreamer"
# the libspice-server only uses the headers of libcacard
@ -25,7 +25,7 @@ RDEPEND="
>=x11-libs/pixman-0.17.7[static-libs(+)?]
!libressl? ( dev-libs/openssl:0=[static-libs(+)?] )
libressl? ( dev-libs/libressl:0=[static-libs(+)?] )
lz4? ( app-arch/lz4 )
lz4? ( app-arch/lz4:0=[static-libs(+)?] )
smartcard? ( >=app-emulation/libcacard-0.1.2 )
sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] )
gstreamer? ( media-libs/gstreamer:1.0 )
@ -41,6 +41,10 @@ DEPEND="${RDEPEND}
smartcard? ( app-emulation/qemu[smartcard] )
"
PATCHES=(
"${FILESDIR}"/${PN}-0.13.3-skip_faulty_lz4_check.patch
)
python_check_deps() {
has_version ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]"
has_version "dev-python/six[${PYTHON_USEDEP}]"
@ -50,6 +54,12 @@ pkg_setup() {
[[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup
}
src_prepare() {
default
eautoreconf
}
# maintainer notes:
# * opengl support is currently broken
src_configure() {
@ -65,7 +75,7 @@ src_configure() {
$(use_enable lz4)
$(use_with sasl)
$(use_enable smartcard)
$(usex gstreamer "1.0" "no")
--enable-gstreamer=$(usex gstreamer "1.0" "no")
--enable-celt051
--disable-gui
"

@ -1,3 +1,2 @@
DIST virt-viewer-3.1.tar.gz 835147 SHA256 be4e49470b650fc22513c2c01f2e13e30ee2d494d0d7b319b6f414ca781078c7 SHA512 72deb289c32a315fc4e1d73148d0b0a366cf929ff9fb389b62d750d317d02a43e2bf3bc170f43d9f37a184d8c7754b3e282de404fbcfa59ff278a87e4aa0acaf WHIRLPOOL 90f47dfc79f1529272fae8fbaf7553c369a9c2161b63071037fcb5279050a5ff9391800922e2a43f5c37e133b13f6736b59f3574531e22ce7dd27d2de9c714cf
DIST virt-viewer-4.0.tar.gz 897593 SHA256 1c427b0ea104539342519334735e6f667d5784c42a5aafc253b580875d88fa1f SHA512 7d1e470a159c8784dff6c4fb1f9228689f76ddbdae314bd57f86c6dc975d1d50590732640768b7e08d6a3bbc02eefbde090cd8f05c97151cd8abdc7ae97e66ea WHIRLPOOL e07b472e8a562c608d69cc211c34c6558ba08694f92ea6250f23c719a3a32f82d3f8b20d4fa5fd992497a8402bc40b6abdde80345ca1ec4e539826807cdd81ec
DIST virt-viewer-5.0.tar.gz 908726 SHA256 0b2ded8b927a782a20fcf93b5377051285eec5677501b593d650213e79b88b2e SHA512 924fa88fd0ca7cc5b3d0a348c0d1104337fe0a06328e32110b4417c64f5d9efaf6df534adbc1eaa69157d229763b773307fa834a66f16156e3703731525eb690 WHIRLPOOL 43ac427fd1318f7579db35141e15edacdd55b0b979a726f0b4f801954376754e33b93e042c8fc8799b5fa7ef08fa3cf18eb35c607cde60a28b7719e7fd731df5

@ -1,48 +0,0 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit eutils gnome2 fdo-mime
DESCRIPTION="Graphical console client for connecting to virtual machines"
HOMEPAGE="http://virt-manager.org/"
SRC_URI="http://virt-manager.org/download/sources/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="sasl +spice +vnc"
RDEPEND=">=app-emulation/libvirt-0.10.0[sasl?]
>=dev-libs/libxml2-2.6
x11-libs/gtk+:3
spice? ( >=net-misc/spice-gtk-0.30[sasl?,gtk3] )
vnc? ( >=net-libs/gtk-vnc-0.5.0[sasl?,gtk3] )"
DEPEND="${RDEPEND}
dev-lang/perl
>=dev-util/intltool-0.35.0
virtual/pkgconfig
spice? ( >=app-emulation/spice-protocol-0.12.10 )"
REQUIRED_USE="|| ( spice vnc )"
pkg_setup() {
G2CONF="$(use_with vnc gtk-vnc) $(use_with spice spice-gtk)"
G2CONF="${G2CONF} --with-gtk=3.0 --without-ovirt --disable-update-mimedb"
}
src_prepare() {
epatch_user
}
src_test() {
default
}
src_install() {
default
}
pkg_postinst() {
fdo-mime_mime_database_update
}

@ -0,0 +1,167 @@
Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp
===================================================================
--- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115126)
+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/posix/SUPR3HardenedMain-posix.cpp (revision 115307)
@@ -341,6 +341,7 @@
* Patch 64-bit hosts.
*/
uint32_t cRipRelMovs = 0;
+ uint32_t cRelCalls = 0;
/* Just use the disassembler to skip 12 bytes or more, we might need to
rewrite mov instructions using RIP relative addressing. */
@@ -349,7 +350,8 @@
cbInstr = 1;
int rc = DISInstr(pbTarget + offJmpBack, DISCPUMODE_64BIT, &Dis, &cbInstr);
if ( RT_FAILURE(rc)
- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW)
+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW
+ && Dis.pCurInstr->uOpcode != OP_CALL)
|| ( Dis.ModRM.Bits.Mod == 0
&& Dis.ModRM.Bits.Rm == 5 /* wrt RIP */
&& Dis.pCurInstr->uOpcode != OP_MOV))
@@ -357,15 +359,23 @@
if (Dis.ModRM.Bits.Mod == 0 && Dis.ModRM.Bits.Rm == 5 /* wrt RIP */)
cRipRelMovs++;
+ if ( Dis.pCurInstr->uOpcode == OP_CALL
+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW))
+ cRelCalls++;
offJmpBack += cbInstr;
cbPatchMem += cbInstr;
}
+ /*
+ * Each relative call requires extra bytes as it is converted to a pushq imm32
+ * + mov [RSP+4], imm32 + a jmp qword [$+8 wrt RIP] to avoid clobbering registers.
+ */
+ cbPatchMem += cRelCalls * RT_ALIGN_32(13 + 6 + 8, 8);
cbPatchMem += 14; /* jmp qword [$+8 wrt RIP] + 8 byte address to jump to. */
cbPatchMem = RT_ALIGN_32(cbPatchMem, 8);
- /* Allocate suitable exectuable memory available. */
+ /* Allocate suitable executable memory available. */
bool fConvRipRelMovs = false;
uint8_t *pbPatchMem = supR3HardenedMainPosixExecMemAlloc(cbPatchMem, pbTarget, cRipRelMovs > 0);
if (!pbPatchMem)
@@ -396,7 +406,8 @@
cbInstr = 1;
int rc = DISInstr(pbTarget + offInsn, DISCPUMODE_64BIT, &Dis, &cbInstr);
if ( RT_FAILURE(rc)
- || (Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW))
+ || ( Dis.pCurInstr->fOpType & DISOPTYPE_CONTROLFLOW
+ && Dis.pCurInstr->uOpcode != OP_CALL))
return VERR_SUPLIB_UNEXPECTED_INSTRUCTION;
if ( Dis.ModRM.Bits.Mod == 0
@@ -439,6 +450,34 @@
pbPatchMem += sizeof(int32_t);
}
}
+ else if ( Dis.pCurInstr->uOpcode == OP_CALL
+ && (Dis.pCurInstr->fOpType & DISOPTYPE_RELATIVE_CONTROLFLOW))
+ {
+ /* Convert to absolute jump. */
+ uintptr_t uAddr = (uintptr_t)&pbTarget[offInsn + cbInstr] + (intptr_t)Dis.Param1.uValue;
+
+ /* Skip the push instructions till the return address is known. */
+ uint8_t *pbPatchMemPush = pbPatchMem;
+ pbPatchMem += 13;
+
+ *pbPatchMem++ = 0xff; /* jmp qword [$+8 wrt RIP] */
+ *pbPatchMem++ = 0x25;
+ *(uint32_t *)pbPatchMem = (uint32_t)(RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *) - (pbPatchMem + 4));
+ pbPatchMem = RT_ALIGN_PT(pbPatchMem + 4, 8, uint8_t *);
+ *(uint64_t *)pbPatchMem = uAddr;
+ pbPatchMem += sizeof(uint64_t);
+
+ /* Push the return address onto stack. Difficult on amd64 without clobbering registers... */
+ uintptr_t uAddrReturn = (uintptr_t)pbPatchMem;
+ *pbPatchMemPush++ = 0x68; /* push imm32 sign-extended as 64-bit*/
+ *(uint32_t *)pbPatchMemPush = RT_LO_U32(uAddrReturn);
+ pbPatchMemPush += sizeof(uint32_t);
+ *pbPatchMemPush++ = 0xc7;
+ *pbPatchMemPush++ = 0x44;
+ *pbPatchMemPush++ = 0x24;
+ *pbPatchMemPush++ = 0x04; /* movl [RSP+4], imm32 */
+ *(uint32_t *)pbPatchMemPush = RT_HI_U32(uAddrReturn);
+ }
else
{
memcpy(pbPatchMem, pbTarget + offInsn, cbInstr);
Index: VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp
===================================================================
--- VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115126)
+++ VirtualBox-5.1.22/src/VBox/HostDrivers/Support/SUPR3HardenedVerify.cpp (revision 115307)
@@ -86,6 +86,9 @@
/** The max path length acceptable for a trusted path. */
#define SUPR3HARDENED_MAX_PATH 260U
+/** Enable to resolve symlinks using realpath() instead of cooking our own stuff. */
+#define SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH 1
+
#ifdef RT_OS_SOLARIS
# define dirfd(d) ((d)->d_fd)
#endif
@@ -1091,7 +1094,8 @@
#endif
-#if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH
+# if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)
/**
* Copies the error message to the error buffer and returns @a rc.
*
@@ -1104,6 +1108,7 @@
{
return supR3HardenedSetErrorN(rc, pErrInfo, 1, pszMsg);
}
+# endif
#endif
@@ -1893,7 +1898,9 @@
/*
* Verify each component from the root up.
*/
+#ifndef SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH
uint32_t iLoops = 0;
+#endif
SUPR3HARDENEDFSOBJSTATE FsObjState;
uint32_t iComponent = 0;
while (iComponent < Info.cComponents)
@@ -1915,6 +1922,24 @@
if ( RT_SUCCESS(rc)
&& S_ISLNK(FsObjState.Stat.st_mode))
{
+#if SUP_HARDENED_VERIFY_FOLLOW_SYMLINKS_USE_REALPATH /* Another approach using realpath() and verifying the result when encountering a symlink. */
+ char *pszFilenameResolved = realpath(pszFilename, NULL);
+ if (pszFilenameResolved)
+ {
+ rc = supR3HardenedVerifyFile(pszFilenameResolved, hNativeFile, fMaybe3rdParty, pErrInfo);
+ free(pszFilenameResolved);
+ return rc;
+ }
+ else
+ {
+ int iErr = errno;
+ supR3HardenedError(VERR_ACCESS_DENIED, false /*fFatal*/,
+ "supR3HardenedVerifyFileFollowSymlinks: Failed to resolve the real path '%s': %s (%d)\n",
+ pszFilename, strerror(iErr), iErr);
+ return supR3HardenedSetError4(VERR_ACCESS_DENIED, pErrInfo,
+ "realpath failed for '", pszFilename, "': ", strerror(iErr));
+ }
+#else
/* Don't loop forever. */
iLoops++;
if (iLoops < 8)
@@ -1989,6 +2014,7 @@
else
return supR3HardenedSetError3(VERR_TOO_MANY_SYMLINKS, pErrInfo,
"Too many symbolic links: '", pszFilename, "'");
+#endif
}
}
if (RT_FAILURE(rc))

@ -188,6 +188,7 @@ src_prepare() {
fi
eapply "${WORKDIR}/patches"
eapply "${FILESDIR}/${P}-opengl_dlopen_fix.patch" #616238
eapply_user
}

@ -3,8 +3,6 @@ DIST lwip-1.3.0.tar.gz 398933 SHA256 772e4d550e07826665ed0528c071dd5404ef7dbe182
DIST newlib-1.16.0.tar.gz 12024353 SHA256 db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 SHA512 40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3 WHIRLPOOL 47f7afd525f482d79d9e964f0e75ee8a77e59551bd19cd94f9b95ac3af9406afa381c9d8d224f76eb568441ab613b2b194f8e5be50aa222f9ed2d9b9761829db
DIST pciutils-2.2.9.tar.bz2 212265 SHA256 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 SHA512 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 WHIRLPOOL ce801947fcf7ba0b56710029f25e746d3e03a80699af9d3570efcd417b12b546264f286b2e78b1402cca766c08e35bdd0ff0a692ab4ad419295f00bcfe91130e
DIST polarssl-1.1.4-gpl.tgz 611340 SHA256 2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 SHA512 88da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad WHIRLPOOL 39448c00dda142a836a78381b446c7b586272a44d8afc867a7ea702228f105bb2adffe757bd6c23af090cff64ef32e7af0c373dccc5145ff4c11552cf3f28383
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
DIST xen-4.8.1.tar.gz 22516631 SHA256 1d69153b94561429293015f66463ee17c26404d1c014e646ecbcca6078581395 SHA512 9f535b4bb57d285dfb92c974d55513505cf485b2d7218fe8f6ed62768e2cee7f225b08adf6706590b2c0a04feca16e10915297c33b98e1b110f8ea7035f46c15 WHIRLPOOL ea367d4d08eaa464417f6c5e7143a52e085a8d0e515c99cbb49ac3ccd5c189aa79947d233754177698a076c28abf7a32c83ae29019ca70c6300839b09ca67bad
DIST zlib-1.2.3.tar.gz 496597 SHA256 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e SHA512 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e WHIRLPOOL 8fd7010faf6a48a9c7ff4bcfe3ce4fe9061eb541259e0a2d0def214e8c4becf2b22e8d6f96f65ca827abffeaa9d96e95ed2402844f99835f7b079fc9f3e84276

@ -1,164 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='xml,threads'
inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
GRUB_URL=mirror://gnu-alpha/grub
UPSTREAM_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
SRC_URI="
http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
$GRUB_URL/grub-0.97.tar.gz
$XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
$LIBPCI_URL/pciutils-2.2.9.tar.bz2
$XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
$XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
$XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
${UPSTREAM_PATCHSET_URI}"
S="${WORKDIR}/xen-${PV}"
DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="custom-cflags"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="sys-devel/gettext
sys-devel/bin86
sys-apps/texinfo
x11-libs/pixman"
RDEPEND="${PYTHON_DEPS}
>=app-emulation/xen-tools-${PV}"
pkg_setup() {
python-single-r1_pkg_setup
}
retar-externals() {
# Purely to unclutter src_prepare
local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
# epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
-i "${WORKDIR}"/zlib-1.2.3/configure
sed -e 's:^AR=ar rc:AR=ar:' \
-e s':$(AR) $@:$(AR) rc $@:' \
-i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
einfo "zlib Makefile edited"
cd "${WORKDIR}"
tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
tar czp grub-0.97 -f grub-0.97.tar.gz
tar czp lwip -f lwip-1.3.0.tar.gz
tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
mv $set "${S}"/stubdom/
einfo "tarballs moved to source"
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \;
fi
# Patch the unmergeable newlib, fix most of the leftover gcc QA issues
cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
# Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
# fix jobserver in Makefile
epatch "${FILESDIR}"/${PN}-4.2-jserver.patch
# bug 595354
epatch "${FILESDIR}"/${PN}-4.7.0-fix-boot-p2m.patch
#Substitute for internal downloading. pciutils copied only due to the only .bz2
cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
retar-externals || die "re-tar procedure failed"
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen"
econf ${myconf}
}
src_compile() {
use custom-cflags || unset CFLAGS
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
if use x86; then
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
elif use amd64; then
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
if has_multilib_profile; then
multilib_toolchain_setup x86
emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
fi
fi
}
src_install() {
if use x86; then
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
fi
if use amd64; then
emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
if has_multilib_profile; then
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
fi
fi
}
pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "http://wiki.xen.org/wiki/Main_Page"
}

@ -32,7 +32,7 @@ DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE="custom-cflags"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

@ -1,161 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='xml,threads'
inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
GRUB_URL=mirror://gnu-alpha/grub
UPSTREAM_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
SRC_URI="
http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
$GRUB_URL/grub-0.97.tar.gz
$XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
$LIBPCI_URL/pciutils-2.2.9.tar.bz2
$XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
$XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
$XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
${UPSTREAM_PATCHSET_URI}"
S="${WORKDIR}/xen-${PV}"
DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="custom-cflags"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
DEPEND="sys-devel/gettext
sys-devel/bin86
sys-apps/texinfo
x11-libs/pixman"
RDEPEND="${PYTHON_DEPS}
>=app-emulation/xen-tools-${PV}"
pkg_setup() {
python-single-r1_pkg_setup
}
retar-externals() {
# Purely to unclutter src_prepare
local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
# epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
-i "${WORKDIR}"/zlib-1.2.3/configure
sed -e 's:^AR=ar rc:AR=ar:' \
-e s':$(AR) $@:$(AR) rc $@:' \
-i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
einfo "zlib Makefile edited"
cd "${WORKDIR}"
tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
tar czp grub-0.97 -f grub-0.97.tar.gz
tar czp lwip -f lwip-1.3.0.tar.gz
tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
mv $set "${S}"/stubdom/
einfo "tarballs moved to source"
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \;
fi
# Patch the unmergeable newlib, fix most of the leftover gcc QA issues
cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
# Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
# fix jobserver in Makefile
epatch "${FILESDIR}"/${PN}-4.8-jserver.patch
#Substitute for internal downloading. pciutils copied only due to the only .bz2
cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
retar-externals || die "re-tar procedure failed"
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen"
econf ${myconf}
}
src_compile() {
use custom-cflags || unset CFLAGS
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
if use x86; then
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
elif use amd64; then
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
if has_multilib_profile; then
multilib_toolchain_setup x86
emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
fi
fi
}
src_install() {
if use x86; then
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
fi
if use amd64; then
emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
if has_multilib_profile; then
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
fi
fi
}
pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "http://wiki.xen.org/wiki/Main_Page"
}

@ -1,14 +1,9 @@
DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
DIST seabios-1.10.0.tar.gz 588213 SHA256 8976fc4c1ebcda66ac96689762247dfc99115a5f7acb3a7d4e18d18ff5de12a9 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c WHIRLPOOL 77718eac01a59f94c3fa81195925ae09c19e11f80f107b3387e910408d88d3ffc93eaca3b73d6a52b67514538c0e020b0f4078db8277a5ee6361fd0d3ada8598
DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
DIST xen-4.7.2-upstream-patches-0.tar.xz 45944 SHA256 e7783bc9adc939167eaef91e96fda506d2d52815f709b31952229891357e6b67 SHA512 6d4e23fb5a63fd191f893e31194b6397a394956846f356ae0119c656a92e7e22296e728286a98109b64a5736241b2317969f54915e7b487b4d7a64aae534614c WHIRLPOOL e185ce40085559d00a302eae8814b4c013817a5e4c0a2a9c56a6b4983b38e7103e44d0407fa78ea79fdbe8eefde346b994812851d8b4bad0bf08cb5721507c37
DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756
DIST xen-4.8.0-upstream-patches-0.tar.xz 78984 SHA256 278603b1b739e94099184f7266c77806595bf53c7236267f32b9f8fad9ebe76e SHA512 1466e33705f54e3799412298917485bb8acb6847dbacb61cfb394415b6b3bc51aed9317928e948161e00c8134fcc0a4b07361df3dec76b1038aa41e3b1b63b3a WHIRLPOOL 4c3a1524db00be1c475fd84e2148143bc4f3be2987e7d785bee880603c72d6bdb417acf1f1935c2b53b369d8428eed736b92644f6ce62e05ad16479ecca18410
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
DIST xen-4.8.1.tar.gz 22516631 SHA256 1d69153b94561429293015f66463ee17c26404d1c014e646ecbcca6078581395 SHA512 9f535b4bb57d285dfb92c974d55513505cf485b2d7218fe8f6ed62768e2cee7f225b08adf6706590b2c0a04feca16e10915297c33b98e1b110f8ea7035f46c15 WHIRLPOOL ea367d4d08eaa464417f6c5e7143a52e085a8d0e515c99cbb49ac3ccd5c189aa79947d233754177698a076c28abf7a32c83ae29019ca70c6300839b09ca67bad
DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
DIST xen-security-patches-23.tar.xz 8280 SHA256 caab81e99c4ec7128119141cb344ce60137c019ffc546ec76c25a7e505063f08 SHA512 921730acde0c6f9a4e62fc22805e76f9c2fe5459dd126a2bda2e9cbe615f52ccbcc0241021cf128b2e8dd870ba5fba8b193005142db01ecf55612b276ca8866b WHIRLPOOL 0634d8b97897de8878190537a727afbc0fdf7dd197d34f1bf443073fe5af2aacf3d93b36cd407ec21561871fa9eb0efc6615c34fae1368e7d7a1deef96c31e6b
DIST xen-security-patches-25.tar.xz 9208 SHA256 ceaa520d4d98ab7b6ce5b58c380499372cb513dda0c8236106cdf878385d4458 SHA512 18539c1f42bc95a06f7b06855614fafb4ed7c07a145d9ab90e02954ba405d21fc4c379908e3233ddfb85ccaa04515b261ac4bbf3987ce00e4479158f03edd917 WHIRLPOOL 4cff34c29a5c38e6a5bd0d4f4fe89d8daf944740934b05cd61f4b8a345ddb4d8a8b2de6db27a723154169e3f28d5b34a43eddd08c909cfa3d6d5aee26fcae693

@ -97,15 +97,6 @@ _gx040=" 0001-docs-Clarify-the-expected-behaviour-of-zero-length-r.patch
0002-tools-libxc-Tolerate-zero-length-records-in-migratio.patch
0004-tools-python-Adjust-migration-v2-library-to-warn-abo.patch"
# xen-tools-4.7.1 patches set
_gpv_xen_tools_471_2="
${_gx008} ${_gx021}
${_gx022} ${_gx017} ${_gx031}
${_gx027} ${_gx032}
${_gx028} ${_gx029} ${_gx036}
${_gx037} ${_gx040}
"
# xen-tools-4.7.2 patches set
_gpv_xen_tools_472_0="
${_gx008} ${_gx021}
@ -115,21 +106,7 @@ ${_gx028} ${_gx029} ${_gx036}
${_gx037} ${_gx040}
"
# xen-tools-4.8.0 patches set
_gpv_xen_tools_480_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027} ${_gx032}
${_gx028} ${_gx029}
${_gx037}
"
_gpv_xen_tools_480_1="
${_gx008}
${_gx038} ${_gx017} ${_gx039}
${_gx027} ${_gx032}
${_gx028} ${_gx029}
${_gx037} ${_gx040}
"
# xen-tools-4.8.1 patches set
_gpv_xen_tools_481_0="
${_gx008}
${_gx038} ${_gx017} ${_gx039}

@ -1,459 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='ncurses,xml,threads'
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
MY_PV=${PV/_/-}
MAJOR_V="$(get_version_component_range 1-2)"
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS="amd64 x86"
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="amd64 ~arm ~arm64 x86"
UPSTREAM_VER=0
SECURITY_VER=23
# xen-tools's gentoo patches tarball
GENTOO_VER=9
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=2
# xen-tools ovmf's patches
OVMF_VER=2
SEABIOS_VER=1.8.2
# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
OVMF_PV=20151110
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
S="${WORKDIR}/xen-${MY_PV}"
fi
DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="http://xen.org/"
DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0/${MAJOR_V}"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
pygrub? ( python )
ovmf? ( hvm )
^^ ( qemu system-qemu )"
COMMON_DEPEND="
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
${PYTHON_DEPS}
"
DEPEND="${COMMON_DEPEND}
dev-python/lxml[${PYTHON_USEDEP}]
x86? ( sys-devel/dev86
sys-power/iasl )
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
api? ( dev-libs/libxml2
net-misc/curl )
ovmf? (
!arm? ( dev-lang/nasm )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
sys-firmware/ipxe
sys-devel/dev86
sys-power/iasl )
dev-lang/perl
app-misc/pax-utils
doc? (
app-doc/doxygen
dev-python/markdown[${PYTHON_USEDEP}]
dev-tex/latex2html[png,gif]
media-gfx/graphviz
dev-tex/xcolor
media-gfx/transfig
dev-texlive/texlive-latexextra
virtual/latex-base
dev-tex/latexmk
dev-texlive/texlive-latex
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
hvm? ( x11-proto/xproto
!net-libs/libiscsi )
qemu? (
x11-libs/pixman
sdl? ( media-libs/libsdl[X] )
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )"
RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
usr/share/qemu-xen/qemu/s390-ccw.img"
RESTRICT="test"
pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"
#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"
if has_version dev-libs/libgcrypt:0; then
export "CONFIG_GCRYPT=y"
fi
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif 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
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
epatch "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null
# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
epatch "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null
# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo/$i
done
fi
# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
fi
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die
# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default cflags
find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} + || die "failed to re-set custom-cflags"
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS
fi
if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi
if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi
if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi
if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
fi
# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die
# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die
#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi
# use /var instead of /var/lib, consistat with previous ebuild
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
m4/paths.m4 configure tools/configure || die
# use /run instead of /var/run
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
m4/paths.m4 configure tools/configure || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable pam) \
$(use_enable api xenapi) \
$(use_enable ovmf) \
$(use_enable ocaml ocamltools) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
econf ${myconf}
}
src_compile() {
export VARTEXFONTS="${T}/fonts"
local myopt
use debug && myopt="${myopt} debug=y"
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default
# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools
# Fix the remaining Python shebangs.
python_fix_shebang "${D}"
# Remove RedHat-specific stuff
rm -rf "${D}"tmp || die
if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
# for xendomains
keepdir /etc/xen/auto
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "http://wiki.xen.org/wiki/Main_Page"
elog ""
elog "Recommended to utilise the xencommons script to config sytem At boot"
elog "Add by use of rc-update on completion of the install"
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi
if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

@ -18,7 +18,7 @@ if [[ $PV == *9999 ]]; then
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="amd64 ~arm ~arm64 ~x86"
KEYWORDS="amd64 ~arm ~arm64 x86"
UPSTREAM_VER=0
SECURITY_VER=25
# xen-tools's gentoo patches tarball

@ -1,455 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='ncurses,xml,threads'
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
MY_PV=${PV/_/-}
MAJOR_V="$(get_version_component_range 1-2)"
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
UPSTREAM_VER=
SECURITY_VER=23
# xen-tools's gentoo patches tarball
GENTOO_VER=9
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=1
# xen-tools ovmf's patches
OVMF_VER=2
SEABIOS_VER=1.10.0
# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
OVMF_PV=20151110
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
S="${WORKDIR}/xen-${MY_PV}"
fi
DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="http://xen.org/"
DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0/${MAJOR_V}"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
pygrub? ( python )
ovmf? ( hvm )
^^ ( qemu system-qemu )"
COMMON_DEPEND="
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
${PYTHON_DEPS}
"
DEPEND="${COMMON_DEPEND}
dev-python/lxml[${PYTHON_USEDEP}]
x86? ( sys-devel/dev86
sys-power/iasl )
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
api? ( dev-libs/libxml2
net-misc/curl )
ovmf? (
!arm? ( dev-lang/nasm )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
sys-firmware/ipxe
sys-devel/dev86
sys-power/iasl )
dev-lang/perl
app-misc/pax-utils
doc? (
app-doc/doxygen
dev-python/markdown[${PYTHON_USEDEP}]
dev-tex/latex2html[png,gif]
media-gfx/graphviz
dev-tex/xcolor
media-gfx/transfig
dev-texlive/texlive-latexextra
virtual/latex-base
dev-tex/latexmk
dev-texlive/texlive-latex
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
hvm? ( x11-proto/xproto
!net-libs/libiscsi )
qemu? (
x11-libs/pixman
sdl? ( media-libs/libsdl[X] )
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )"
RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
usr/share/qemu-xen/qemu/s390-ccw.img"
RESTRICT="test"
pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"
#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif 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
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
epatch "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null
# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
epatch "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null
# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo/$i
done
fi
# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
fi
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die
# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default cflags
find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} + || die "failed to re-set custom-cflags"
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS
fi
if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi
if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi
if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi
if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
fi
# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die
# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die
#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi
# use /var instead of /var/lib, consistat with previous ebuild
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
m4/paths.m4 configure tools/configure || die
# use /run instead of /var/run
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
m4/paths.m4 configure tools/configure || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable pam) \
$(use_enable api xenapi) \
$(use_enable ovmf) \
$(use_enable ocaml ocamltools) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
econf ${myconf}
}
src_compile() {
export VARTEXFONTS="${T}/fonts"
local myopt
use debug && myopt="${myopt} debug=y"
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default
# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools
# Fix the remaining Python shebangs.
python_fix_shebang "${D}"
# Remove RedHat-specific stuff
rm -rf "${D}"tmp || die
if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
# for xendomains
keepdir /etc/xen/auto
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "http://wiki.xen.org/wiki/Main_Page"
elog ""
elog "Recommended to utilise the xencommons script to config sytem At boot"
elog "Add by use of rc-update on completion of the install"
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi
if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

@ -1,455 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='ncurses,xml,threads'
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
MY_PV=${PV/_/-}
MAJOR_V="$(get_version_component_range 1-2)"
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
UPSTREAM_VER=0
SECURITY_VER=25
# xen-tools's gentoo patches tarball
GENTOO_VER=9
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=1
# xen-tools ovmf's patches
OVMF_VER=2
SEABIOS_VER=1.10.0
# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
OVMF_PV=20151110
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
S="${WORKDIR}/xen-${MY_PV}"
fi
DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="http://xen.org/"
DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0/${MAJOR_V}"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
pygrub? ( python )
ovmf? ( hvm )
^^ ( qemu system-qemu )"
COMMON_DEPEND="
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
${PYTHON_DEPS}
"
DEPEND="${COMMON_DEPEND}
dev-python/lxml[${PYTHON_USEDEP}]
x86? ( sys-devel/dev86
sys-power/iasl )
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
api? ( dev-libs/libxml2
net-misc/curl )
ovmf? (
!arm? ( dev-lang/nasm )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
sys-firmware/ipxe
sys-devel/dev86
sys-power/iasl )
dev-lang/perl
app-misc/pax-utils
doc? (
app-doc/doxygen
dev-python/markdown[${PYTHON_USEDEP}]
dev-tex/latex2html[png,gif]
media-gfx/graphviz
dev-tex/xcolor
media-gfx/transfig
dev-texlive/texlive-latexextra
virtual/latex-base
dev-tex/latexmk
dev-texlive/texlive-latex
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
hvm? ( x11-proto/xproto
!net-libs/libiscsi )
qemu? (
x11-libs/pixman
sdl? ( media-libs/libsdl[X] )
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )"
RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
usr/share/qemu-xen/qemu/s390-ccw.img"
RESTRICT="test"
pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"
#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif 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
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
einfo "Try to apply Xen Upstream patch set"
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
epatch "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null
# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
epatch "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null
# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo/$i
done
fi
# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
fi
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die
# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default cflags
find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} + || die "failed to re-set custom-cflags"
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS
fi
if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi
if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi
if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi
if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
fi
# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die
# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die
#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi
# use /var instead of /var/lib, consistat with previous ebuild
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
m4/paths.m4 configure tools/configure || die
# use /run instead of /var/run
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
m4/paths.m4 configure tools/configure || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable pam) \
$(use_enable api xenapi) \
$(use_enable ovmf) \
$(use_enable ocaml ocamltools) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
econf ${myconf}
}
src_compile() {
export VARTEXFONTS="${T}/fonts"
local myopt
use debug && myopt="${myopt} debug=y"
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default
# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools
# Fix the remaining Python shebangs.
python_fix_shebang "${D}"
# Remove RedHat-specific stuff
rm -rf "${D}"tmp || die
if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
# for xendomains
keepdir /etc/xen/auto
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
pkg_postinst() {
elog "Official Xen Guide and the offical wiki page:"
elog "https://wiki.gentoo.org/wiki/Xen"
elog "http://wiki.xen.org/wiki/Main_Page"
elog ""
elog "Recommended to utilise the xencommons script to config sytem At boot"
elog "Add by use of rc-update on completion of the install"
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi
if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

@ -1,11 +1,4 @@
DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
DIST xen-4.7.2-upstream-patches-0.tar.xz 45944 SHA256 e7783bc9adc939167eaef91e96fda506d2d52815f709b31952229891357e6b67 SHA512 6d4e23fb5a63fd191f893e31194b6397a394956846f356ae0119c656a92e7e22296e728286a98109b64a5736241b2317969f54915e7b487b4d7a64aae534614c WHIRLPOOL e185ce40085559d00a302eae8814b4c013817a5e4c0a2a9c56a6b4983b38e7103e44d0407fa78ea79fdbe8eefde346b994812851d8b4bad0bf08cb5721507c37
DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756
DIST xen-4.8.0-upstream-patches-0.tar.xz 78984 SHA256 278603b1b739e94099184f7266c77806595bf53c7236267f32b9f8fad9ebe76e SHA512 1466e33705f54e3799412298917485bb8acb6847dbacb61cfb394415b6b3bc51aed9317928e948161e00c8134fcc0a4b07361df3dec76b1038aa41e3b1b63b3a WHIRLPOOL 4c3a1524db00be1c475fd84e2148143bc4f3be2987e7d785bee880603c72d6bdb417acf1f1935c2b53b369d8428eed736b92644f6ce62e05ad16479ecca18410
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
DIST xen-4.8.1.tar.gz 22516631 SHA256 1d69153b94561429293015f66463ee17c26404d1c014e646ecbcca6078581395 SHA512 9f535b4bb57d285dfb92c974d55513505cf485b2d7218fe8f6ed62768e2cee7f225b08adf6706590b2c0a04feca16e10915297c33b98e1b110f8ea7035f46c15 WHIRLPOOL ea367d4d08eaa464417f6c5e7143a52e085a8d0e515c99cbb49ac3ccd5c189aa79947d233754177698a076c28abf7a32c83ae29019ca70c6300839b09ca67bad
DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8
DIST xen-security-patches-24.tar.xz 8848 SHA256 1aa2be3a15771473d3b043ccd703f7893618473a77193feb1703bf552aa777fa SHA512 d9ccee8ad3ffe2e035de9e95bf7ef850f31cf368dd228e62acf867ff6a8948e8c2882e64f341ff3458349f8317185241a40178f30f804edfa51b2b7cf6c6cda0 WHIRLPOOL cd632b7bf95e929f5037be6a16a59d3fcde50e47cc034cc0d44c29bc16c42a9a01c720a4401804fa9df8fa908f4fc8e75f2fcbef3d56381b7dca81d45618e773
DIST xen-security-patches-25.tar.xz 9208 SHA256 ceaa520d4d98ab7b6ce5b58c380499372cb513dda0c8236106cdf878385d4458 SHA512 18539c1f42bc95a06f7b06855614fafb4ed7c07a145d9ab90e02954ba405d21fc4c379908e3233ddfb85ccaa04515b261ac4bbf3987ce00e4479158f03edd917 WHIRLPOOL 4cff34c29a5c38e6a5bd0d4f4fe89d8daf944740934b05cd61f4b8a345ddb4d8a8b2de6db27a723154169e3f28d5b34a43eddd08c909cfa3d6d5aee26fcae693
DIST xen-security-patches-26.tar.xz 8276 SHA256 2a21ec429f8952875f7d95f24697600e606326f1a16d5622cee73628cd0401c1 SHA512 f54fc7e720a70258263d29cc482b8269386818ad75792de87b0d0357fdb6af81f2102e5983100db47563435fa28f875a84e8c6d73d44797aadaf0c469d9fb0ec WHIRLPOOL b31667d8415dc1fbcd60160fdbc2fe0ad4de9bd2171fda875f5585b8d7821c4c035b029dbf382abacf4b6be745aeeb708f419fdcabdd86f78ff1c13703802e3f

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS="amd64"
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=21
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -12,11 +12,11 @@ MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS="amd64"
KEYWORDS="amd64 x86"
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="amd64 ~arm -x86"
KEYWORDS="amd64 ~arm x86"
UPSTREAM_VER=0
SECURITY_VER=26
GENTOO_VER=

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS="amd64"
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=25
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
UPSTREAM_VER=
SECURITY_VER=21
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
UPSTREAM_VER=
SECURITY_VER=24
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=25
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -1,192 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
PYTHON_COMPAT=( python2_7 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="~amd64 ~arm -x86"
UPSTREAM_VER=
SECURITY_VER=
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${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="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags 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
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# 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
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-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
# if the user *really* wants to use their own custom-cflags, let them
if use custom-cflags; then
einfo "User wants their own CFLAGS - removing defaults"
# try and remove all the default custom-cflags
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
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 and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/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"
}

@ -1,3 +1,4 @@
DIST elasticsearch-2.4.4.tar.gz 27343272 SHA256 981092e6ca65ba5560b8b97a74e5ed0eb2236e9128efdb85bb652cec340158e2 SHA512 899a4d2fc64548bcd488ece223f5f189dfb191eceb36390c4b9d8d0d90ef9d2cb67ada475223b9b2e0bd0fb521a4ab978bc7f60781195927e36d027925338c14 WHIRLPOOL 1a90bb8c923a9eab6cc4390b3daaa44cd85d5c1a3a1a5ef7d274050eb25b061a11a91b0f57ebe9f3cb27aafee3267af8f63ca87837f79d622ff362fbc5b6ae1a
DIST elasticsearch-5.1.2.tar.gz 33299777 SHA256 74d752f9a8b46898d306ad169b72f328e17215c0909149e156a576089ef11c42 SHA512 1867626e8a87f11ed109e1325fd1d16c9e0af06ebe6a30c78ea679ab533ab377f5da8ea55af6871be33af226f02187a2aadd77e5e23c097dd24055be21e9d691 WHIRLPOOL 2e9df71c915343e2cc8ad82c59b877f41f5e093cbeba21f471c32cb51a195eccc6223bc48da48bb4af2e6bea9f2539f2e93b866963148f4ca2940ba4466e614e
DIST elasticsearch-5.2.2.tar.gz 33799732 SHA256 cf88930695794a8949342d386f028548bd10b26ecc8c4b422a94ea674faf8ac9 SHA512 670f8aa81a34191a13cc8c608a9dc7bec60c63bbed8fdb9bc0619585d644867576a7677eb0f14b4e4d064e59def186d4b431930bf79b54bcbf59a29b0b327e85 WHIRLPOOL 4ec1f3b5ed15b9f22d27512ea784ffe9e32e00808fec89418860955d2f4759d045775e18c0a61693da47f39de9f235de954eada231fbd6de5fbfd17f552e8452
DIST elasticsearch-5.3.2.tar.gz 33704368 SHA256 a94fe46bc90eb271a0d448d20e49cb02526ac032281c683c79a219240280a1e8 SHA512 430021202fd747ea376e36e9035f05eaa27f06c25f2f8616e218a248f0aeaaffd8577d689c790b618e3fdbcbae23b7bd664d4380d0e323483f6e158675a4bc00 WHIRLPOOL 0fee048029880dabe901c0f9842ac331ef78204a70d0c71993cddbb8e76b7614af0e4b8e8181b36b9039b64093c9fd0720f5c8a2e7c515fc6634ac465c5f283a

@ -0,0 +1,68 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit systemd user
DESCRIPTION="Open Source, Distributed, RESTful, Search Engine"
HOMEPAGE="https://www.elastic.co/products/elasticsearch"
SRC_URI="https://artifacts.elastic.co/downloads/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0 BSD-2 LGPL-3 MIT public-domain"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="virtual/jre:1.8"
pkg_setup() {
enewgroup ${PN}
enewuser ${PN} -1 /bin/bash /usr/share/${PN} ${PN}
}
src_prepare() {
rm -rf bin/*.{bat,exe} || die
rm LICENSE.txt || die
default
}
src_install() {
keepdir /etc/${PN}
keepdir /etc/${PN}/scripts
insinto /etc/${PN}
doins config/*
rm -rf config || die
insinto /usr/share/${PN}
doins -r ./*
exeinto /usr/share/${PN}/bin
doexe "${FILESDIR}/elasticsearch-systemd-pre-exec"
chmod +x "${D}"/usr/share/${PN}/bin/* || die
keepdir /var/{lib,log}/${PN}
keepdir /usr/share/${PN}/plugins
systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d" "${PN}.conf"
insinto /etc/sysctl.d
newins "${FILESDIR}/${PN}.sysctl.d" "${PN}.conf"
newinitd "${FILESDIR}/${PN}.init8" "${PN}"
newconfd "${FILESDIR}/${PN}.conf3" "${PN}"
systemd_newunit "${FILESDIR}"/${PN}.service6 "${PN}.service"
}
pkg_postinst() {
elog
elog "You may create multiple instances of ${PN} by"
elog "symlinking the init script:"
elog "ln -sf /etc/init.d/${PN} /etc/init.d/${PN}.instance"
elog
elog "Please make sure you put elasticsearch.yml, log4j2.properties and scripts"
elog "from /etc/elasticsearch into the configuration directory of the instance:"
elog "/etc/${PN}/instance"
elog
}

@ -1 +1,2 @@
DIST hivex-1.3.11.tar.gz 1264487 SHA256 c63adf6c7ef9140acf20775d35bef35ab563c0d2f59d3dfb8e0d15cfa7c77678 SHA512 1ff9fbcfb976fea5bba41c5ff06e4dc68af0e507accc236ca0406644ee2c865619b3b3bf9550124778fcd782ddc257f1d89861b45f48c0c3ceed18dfa1e02ced WHIRLPOOL 6d741ad14660390b2c171bff400645cbcd20a991a55b7fb4e349c864e2dd4e606f57f344d8b851acf87d12bf8a3b608a77c073c565d9aa55cd23094d7e09e8cd
DIST hivex-1.3.14.tar.gz 1332257 SHA256 eb5cb29f5eb41185688cc1be454895b53c1965578f036ebf31ac32992f121b2b SHA512 dd7dd52dceda580179a815fc48a2a2c7e8f7234614beceb937fba7e317df17984e65453338160c4c467b70d7d4f9bd61b48aad3ca51e19bd5e4cfbca8ee3adb6 WHIRLPOOL 51395c0915d88e167e9909a856c975865751de9c37aeee5fde7c64875569b08ad70c9987b35d949dee9fc01b616827abeb276f2464982521a31199c478932366

@ -5,7 +5,7 @@ EAPI=5
AUTOTOOLS_IN_SOURCE_BUILD=1
USE_RUBY="ruby20 ruby21"
USE_RUBY="ruby21"
RUBY_OPTIONAL=yes
PYTHON_COMPAT=(python2_7 python3_{4,5,6})

@ -0,0 +1,102 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
USE_RUBY="ruby21 ruby22 ruby23"
RUBY_OPTIONAL=yes
PYTHON_COMPAT=(python2_7 python3_{4,5,6})
inherit eutils perl-module ruby-ng python-single-r1
DESCRIPTION="Library for reading and writing Windows Registry 'hive' binary files"
HOMEPAGE="http://libguestfs.org"
SRC_URI="http://libguestfs.org/download/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ocaml readline +perl python test static-libs ruby"
RDEPEND="
virtual/libiconv
virtual/libintl
dev-libs/libxml2:2
ocaml? ( dev-lang/ocaml[ocamlopt]
dev-ml/findlib[ocamlopt]
)
readline? ( sys-libs/readline:0 )
perl? ( dev-perl/IO-stringy )
ruby? ( $(ruby_implementations_depend) )
python? ( ${PYTHON_DEPS} )
"
DEPEND="${RDEPEND}
perl? (
test? ( dev-perl/Pod-Coverage
dev-perl/Test-Pod-Coverage )
)
"
ruby_add_bdepend "ruby? ( dev-ruby/rake
virtual/rubygems
dev-ruby/rdoc )"
ruby_add_rdepend "ruby? ( virtual/rubygems )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
ruby? ( || ( $(ruby_get_use_targets) ) )"
DOCS=( README )
S="${WORKDIR}/${P}"
pkg_setup() {
if use python; then
python-single-r1_pkg_setup
fi
}
src_unpack() {
default
cp -prlP "${WORKDIR}/${P}" "${WORKDIR}"/all
}
src_configure() {
ruby-ng_src_configure
if use perl; then
pushd perl
perl-module_src_configure
popd
fi
local myeconfargs=(
$(use_with readline)
$(use_enable ocaml)
$(use_enable perl)
--enable-nls
--disable-ruby
$(use_enable python)
--disable-rpath
)
econf ${myeconfargs[@]}
}
src_compile() {
default
ruby-ng_src_compile
}
src_install() {
strip-linguas -i po
emake install DESTDIR="${ED}" "LINGUAS=""${LINGUAS}"""
ruby-ng_src_install
if use perl; then
perl_delete_localpod
fi
}

@ -1 +1,2 @@
DIST openastro.org-data_1.6.orig.tar.gz 13603001 SHA256 1ea8a80ebb6077f2b5f4abafe532037a2bf6ff060afba5419cf1f5aaa0890370 SHA512 99f3b6db61e27ccf04a7e0ff3ba7da45b889e1177bfbc1192af1929fca7255dc2b18a4ac9eb536af9ceb11e7722e0a3420102c7e45a6c839abe87734e8be6591 WHIRLPOOL 33486b0c9c7b3b243acda872d5a8812a329ec2963305098a5bace73dadfc99b442a6d338ca98e305932a63298b4ea6b1550308fe22eaee243dedc825694ffbbc
DIST openastro.org-data_1.7.orig.tar.gz 15682188 SHA256 574c14e8b7c613910a37e5a0cb13513f8ae8d57015f2b29b5b832b9d55f26fc8 SHA512 a67cc528253d0a9f70fdce550b8065c481e2dae8dc59dfed0428491cf4751648e41f0d6032b58008f2fe095f81fc4a23717156a69a73b03bd3105b50eb325ffe WHIRLPOOL 717572b0209bb162eeacb89c26819a22e9748fb5ee4b20c64a1bb812670647246f1484fc0f1ab03f704df3bc131506fa72c80475d0f1e8179edd9557f023e7fe

@ -0,0 +1,23 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
MY_PN=${PN/-data}
MY_PN=${MY_PN}.org-data
DESCRIPTION="OpenAstro data files, ephemeris, famous people database, geo database"
HOMEPAGE="http://openastro.org"
SRC_URI="http://ppa.launchpad.net/pellesimon/ubuntu/pool/main/o/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3+"
SLOT="0"
DEPEND=""
RDEPEND="${DEPEND}"
S=${WORKDIR}/${MY_PN}-${PV}

@ -1 +1,2 @@
DIST openastro.org_1.1.48.orig.tar.gz 205879 SHA256 504fe7fa224ef66f3be2752593b7bfde84c7b599c5f26733f6093b55bf2a5b2a SHA512 996e503a8dd2504da252ad2b20ac185301e81523629cbcf05fcf37ec4ca3859ef513a194feb2d05bd7c4cbe796bf514afa4eb242b8cd51c65d134b51165f97d3 WHIRLPOOL a73d27f48aea0ed9e7af55bb7e2efc912b17283b515de705ec72193fe187c05a11635bfb5a1ea98d95a2dcbf39bbf3eda4ece636ca5ab945dcafad6e690fa209
DIST openastro.org_1.1.49.orig.tar.gz 213256 SHA256 e56d8ea47d0873c2136e78b00448f7f7b00607ba1387754739c7d7335a71a127 SHA512 1028807d2a84850699f47a03ad74a851873b9b448f87169bee7d142e5ca750aafe33313b6181b9ee0ed6ccb66c3a867e86bd56648ebe67f4a7a9e1b914b77cec WHIRLPOOL eefeb6aa921f44bde36ed388647d893aa9e0a48be2fe60e01f35e357c36ef9ad1168559bb8061a3fea63da059f68116164d95131284b694700cdd8ce6fe7657f

@ -0,0 +1,33 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit distutils-r1
MY_PN=${PN}.org
DESCRIPTION="A fully-featured Open Source Astrology Program"
HOMEPAGE="http://openastro.org"
SRC_URI="http://ppa.launchpad.net/pellesimon/ubuntu/pool/main/o/${MY_PN}/${MY_PN}_${PV}.orig.tar.gz"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3+"
SLOT="0"
IUSE="jpeg png"
DEPEND="
dev-python/pytz[${PYTHON_USEDEP}]
dev-python/pygtk:2[${PYTHON_USEDEP}]
dev-python/pycairo[svg,${PYTHON_USEDEP}]
dev-python/librsvg-python[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
dev-python/pyswisseph[${PYTHON_USEDEP}]
app-misc/openastro-data[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
jpeg? ( media-gfx/imagemagick[jpeg,svg] )
png? ( media-gfx/imagemagick[png,svg] )"
S=${WORKDIR}/${MY_PN}-${PV}

@ -1 +1,2 @@
DIST reptyr-0.6.2-sysmacros.patch 598 SHA256 2130765b7a60f60f2ac13a541eebb81d7b0d193e0b8875182b855f5be391a85f SHA512 2d6c711a1d1268557925d15cf5d8154bc4ce47b5475ad05a5d358fd94a882991f33a8d99608e511d15dea6c08dcac615467f52bedb46330868540b03302e0cc9 WHIRLPOOL e9013e2b3b75283cb3491da439eca04e0a2c321f5c87ef8a8765bb69b1f110e8fc78e9878a496bbc8f7f33eff20c4bea73fe6ccd4a650ba147115124efb744ba
DIST reptyr-0.6.2.tar.gz 28533 SHA256 c73de510eeedc37a0aac63ea4be9a3c841bbbda029232f871b15d53733a0ee1e SHA512 ad0b378d3c30bbfaa30dfcc06c405c375c7e9bcc3bae2e7fb97b8c3f88f482f461c9c846df0064cc842149b07b8a6b616d95f74cdf38f1b2a5011f6b9328c327 WHIRLPOOL 47cd5ffb5f0b02df218a8af67c0458e9b69bce5172d30f36a692418437363a585ab345e556de034703ca5ac9826a8bd086b85aa492050551e9204a99700fd1fb

@ -1,7 +1,7 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
EAPI=6
inherit toolchain-funcs flag-o-matic vcs-snapshot
@ -15,7 +15,15 @@ KEYWORDS="amd64 ~arm x86 ~amd64-linux ~x86-linux"
RESTRICT="test"
# https://github.com/nelhage/reptyr/issues/81
SRC_URI+=" https://github.com/nelhage/reptyr/commit/b45fd9238958fcf2d8f3d6fc23e6d491febea2ac.patch -> ${PN}-0.6.2-sysmacros.patch"
PATCHES=(
"${DISTDIR}/${P}-sysmacros.patch" #581974
)
src_prepare() {
default
# respect CFLAGS
sed -i '/^override/d' Makefile || die
}

@ -1,6 +1,5 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5

@ -1,6 +1,5 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5

@ -18,7 +18,7 @@ fi
LICENSE="GPL-2"
SLOT="4"
KEYWORDS="amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE="debug calendar doc hbci ofx pim quotes weboob"
COMMON_DEPEND="

@ -3,7 +3,7 @@
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
PYTHON_REQ_USE="xml(+),sqlite?"
inherit eutils distutils-r1 linux-info prefix

@ -3,7 +3,7 @@
EAPI="5"
PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy )
PYTHON_REQ_USE="xml(+),sqlite?"
inherit eutils distutils-r1 git-2 linux-info prefix

@ -1,3 +1,2 @@
DIST mpv-bash-completion-3.3.12.tar.gz 19310 SHA256 9291ef730af6f69cc0efc82e88d170d43d79266a1500461b08719130507870ef SHA512 f019e9a66072333b40213437f07097cacb9f01a1f322fded763e695ef5ef4656016ca07fcb402d406fd99785026dba1fc7292a2c04a14ac18a24557bb8ab2cd1 WHIRLPOOL 96db10c112767d8c8e648a989f416cb02123018e8406842ee27bfc603f5f6ca9ee6360f6aa46a19e14a194f44d510eb971219b10bb598785720c3a6f23047f6c
DIST mpv-bash-completion-3.3.13.tar.gz 19726 SHA256 65172975bfca59f9921afd9788c1e1532c734c068a6af21517eeec63b9a1ea34 SHA512 0f9301447c4f1d9443106e01c602a17f8d3ea62eacf63be807157c7b39a08d54c3cacb3a103fc8f77bc88dd71df433fe7bcb6c09bd3b9aeaa685c407c64cc3c7 WHIRLPOOL 3a1696dcf3cce68186e3fbee5f90982daaadf7fd238d022722b3e7d363a17551e066b953e08e40aac762d587d4cb839f3c704ac379572b62ad29ff5acba89779
DIST mpv-bash-completion-3.3.8.tar.gz 19002 SHA256 67bb3565daafb1e3f64b24262b0859f7843ac052960e0159e3fe3a375ffed181 SHA512 4d6cfc3ac2d1fd6a28be1a40e3ca28d61f5d9ed40a850c5c60e45501b958b929d6ef9266027d2be95ed0c2b0dedccfdbb04fe4115bb7bcfd39435cb73f2dc452 WHIRLPOOL 62012925d3fb212c473e889930c1add93ce36533313a677cc9ddbc7acce2d9dfc1a18f9054dad901f7a0cb2b57c56a05f302f1fadc83b4bbeda5baa06fb2c7c8

@ -1,47 +0,0 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit bash-completion-r1
DESCRIPTION="Bash completion for the mpv video player"
HOMEPAGE="https://2ion.github.io/mpv-bash-completion/"
SRC_URI="https://github.com/2ion/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="amd64"
IUSE="luajit"
COMMON_DEPEND=">=media-video/mpv-0.14.0[cli]"
RDEPEND="${COMMON_DEPEND}
>=app-shells/bash-completion-2.3-r1
"
DEPEND="${COMMON_DEPEND}
!luajit? ( dev-lang/lua:* )
luajit? ( dev-lang/luajit:2 )
"
src_prepare() {
default_src_prepare
# Avoid 'mpv' make target that supports lua only.
sed -i -e 's|check: mpv|check:|' Makefile || die
}
src_compile() {
$(usex luajit 'luajit' 'lua') gen.lua > mpv || die
}
src_install() {
dobashcomp mpv
einstalldocs
}
pkg_postinst() {
if ! has_version 'x11-apps/xrandr'; then
elog
elog "If you want completion of window sizes, please install 'x11-apps/xrandr'."
elog
fi
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save