| # 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=" |
| " |
| |
| S="${WORKDIR}/sos-${PV}" |
| |
| PATCHES=( |
| # TODO(b/172074394): Open upstream PR(s) to apply these changes. |
| "${FILESDIR}/0005-add-remote-exec-arg-to-COS-policy.patch" |
| "${FILESDIR}/0006-add-journalctl-o-export-to-COS-logs.patch" |
| "${FILESDIR}/0007-add-Linux-release-support-for-COS-on-sos-4-0.patch" |
| "${FILESDIR}/0008-add-kdump-support-on-COS.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 |
| } |