summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kohler <bkohler@gentoo.org>2021-12-15 13:09:55 -0600
committerBen Kohler <bkohler@gentoo.org>2021-12-15 13:09:55 -0600
commit5e2aa924b7bd44ff18f27b0b660ccfafec0049de (patch)
treed06236a6695a5028c13ffec4812d21ccfb16a6bc /app-admin
parentsys-apps/memtest86+: add fix from suse (diff)
downloadgentoo-5e2aa924b7bd44ff18f27b0b660ccfafec0049de.tar.gz
gentoo-5e2aa924b7bd44ff18f27b0b660ccfafec0049de.tar.bz2
gentoo-5e2aa924b7bd44ff18f27b0b660ccfafec0049de.zip
app-admin/mcelog: fix python usage
Closes: https://bugs.gentoo.org/828940 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/mcelog/mcelog-180-r1.ebuild50
1 files changed, 50 insertions, 0 deletions
diff --git a/app-admin/mcelog/mcelog-180-r1.ebuild b/app-admin/mcelog/mcelog-180-r1.ebuild
new file mode 100644
index 000000000000..36d6a1697fe6
--- /dev/null
+++ b/app-admin/mcelog/mcelog-180-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=(python3_9 python3_10)
+
+inherit linux-info python-any-r1 systemd toolchain-funcs
+
+DESCRIPTION="A tool to log and decode Machine Check Exceptions"
+HOMEPAGE="http://mcelog.org/"
+SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="selinux"
+
+RDEPEND="selinux? ( sec-policy/selinux-mcelog )"
+
+# TODO: add mce-inject to the tree to support test phase
+RESTRICT="test"
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != buildonly ]]; then
+ local CONFIG_CHECK="~X86_MCE"
+ kernel_is -ge 4 12 && CONFIG_CHECK+=" ~X86_MCELOG_LEGACY"
+ check_extra_config
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
+ "${FILESDIR}"/${PN}-129-debugflags.patch
+ eapply_user
+ tc-export CC
+ python_fix_shebang genconfig.py
+}
+
+src_install() {
+ default
+
+ insinto /etc/logrotate.d/
+ newins ${PN}.logrotate ${PN}
+
+ newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
+ systemd_dounit ${PN}.service
+
+ dodoc *.pdf
+}