blob: b86d3b23eae0b2903ec7db9f23a1c9111a5a3a60 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=7
PYTHON_COMPAT=( python3_6 python3_7 python3_8 )
inherit distutils-r1
SRC_URI="https://github.com/sosreport/sos/archive/${PV}.tar.gz -> ${P}.tar.gz"
DESCRIPTION="An extensible, portable, support data collection tool."
HOMEPAGE="https://github.com/sosreport/sos"
LICENSE="GPL-2"
KEYWORDS="*"
SLOT="0"
IUSE="nls"
DEPEND="
dev-python/setuptools[${PYTHON_USEDEP}]
"
RDEPEND="
dev-python/pexpect[${PYTHON_USEDEP}]
>=dev-python/python-magic-0.4.20[${PYTHON_USEDEP}]
"
S="${WORKDIR}/sos-${PV}"
PATCHES=(
"${FILESDIR}/0009-prevent-sos.conf-to-be-installed-automatically.patch"
"${FILESDIR}/0010-add-package-manager-for-COS.patch"
"${FILESDIR}/0008-add-kdump-support-on-COS.patch"
"${FILESDIR}/0006-add-journalctl-o-export-to-COS-logs.patch"
"${FILESDIR}/0011-add-crictl-plugin.patch"
"${FILESDIR}/0012-add-nvidia-plugin.patch"
"${FILESDIR}/0013-add-ctr-deprecations.patch"
)
src_prepare() {
distutils-r1_src_prepare
if ! use nls ; then
rm po/*.po
fi
}
python_install() {
distutils-r1_python_install
# Provide default config file.
insinto /etc/sos/
doins "${FILESDIR}"/sos.conf
}