From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1480106-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0FE1815800F
	for <garchives@archives.gentoo.org>; Tue, 24 Jan 2023 15:31:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 96BC5E0882;
	Tue, 24 Jan 2023 15:31:05 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 5CF5FE0882
	for <gentoo-commits@lists.gentoo.org>; Tue, 24 Jan 2023 15:31:05 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 46159340DE2
	for <gentoo-commits@lists.gentoo.org>; Tue, 24 Jan 2023 15:31:04 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4DDE288E
	for <gentoo-commits@lists.gentoo.org>; Tue, 24 Jan 2023 15:31:01 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1674574247.87cf54d9860da87de50e060ad331f398dc34c7a9.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/gentoo-kernel/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-kernel/gentoo-kernel/Manifest sys-kernel/gentoo-kernel/gentoo-kernel-5.10.165.ebuild
X-VCS-Directories: sys-kernel/gentoo-kernel/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 87cf54d9860da87de50e060ad331f398dc34c7a9
X-VCS-Branch: master
Date: Tue, 24 Jan 2023 15:31:01 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: dbc299c9-f93e-4d50-9070-9068c886e86f
X-Archives-Hash: 2c5581d2145623c7935fd296957b9fc1

commit:     87cf54d9860da87de50e060ad331f398dc34c7a9
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 08:57:41 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 15:30:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87cf54d9

sys-kernel/gentoo-kernel: Bump to 5.10.165

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 sys-kernel/gentoo-kernel/Manifest                  |   2 +
 .../gentoo-kernel/gentoo-kernel-5.10.165.ebuild    | 131 +++++++++++++++++++++
 2 files changed, 133 insertions(+)

diff --git a/sys-kernel/gentoo-kernel/Manifest b/sys-kernel/gentoo-kernel/Manifest
index 0f712ca8b112..126cbcdedd98 100644
--- a/sys-kernel/gentoo-kernel/Manifest
+++ b/sys-kernel/gentoo-kernel/Manifest
@@ -2,6 +2,8 @@ DIST genpatches-5.10-172.base.tar.xz 4831748 BLAKE2B 46acfe58044df90c98057fc2590
 DIST genpatches-5.10-172.extras.tar.xz 3868 BLAKE2B 32ee2c036c224c800ce53fa94d8f6676c70023bb733cef143355ed5907a4815cb252bc43d1660bedd841dffc814c15a9016d8c0d43b80ece58c9f4bf77c472eb SHA512 10372d1ab1d8bd73dc1c7412498cfb5ce91dc74d5e40c6497aeac24fb71d9c007d03cdbe58b2b7d6304af11816a4981cfc4bdefcd39da19009cb2f0bef9ba5ea
 DIST genpatches-5.10-173.base.tar.xz 4855856 BLAKE2B 12e85119807c228eecd2101a94430915ba9c1a3bd2163cffc821b899709a474643096eebb1f9b0d8b926d11d022e45164f8df4d1f45c5cc43cb2cab5801082c7 SHA512 8f1e1d8bb5c33f19737cfac49710707c10347ffe567c5c7939eebd384f7e37cf8bddcd0bab331fdd6f25ef6be02787acdda86193339d689aad32fe80f4aac519
 DIST genpatches-5.10-173.extras.tar.xz 3868 BLAKE2B e407ab499bdb66025b6a970de3866c2dc6f7c275757a0a11c48c598780d195f85a65c9557b3a4e44533d8731bd34450e6701cf5590b975816d435223097dc4df SHA512 f8465734661ef15423b6f1de05e47df8ba9cf8a00eb1dd805b30e87b98fd51cd067db15a54b681827d94982f02a2fef641998b8529a9b59435d8bf49e6af44b9
+DIST genpatches-5.10-174.base.tar.xz 4872732 BLAKE2B 7198a28cd63f3a68899f39cdb8aabcd03dd7a5b6eec14d03135a18c04dc1412064544b6f20b62c19f6c86a247fba0ed64630c4718cd725015243272412c71ed4 SHA512 bbf400aaad4b3e817d530a5d732d9e601d92e4058359f48c6f522fa266026e20554610673c513b5d9d895f158146ea2b046517e26ac872d39c6975e7c1e57bb5
+DIST genpatches-5.10-174.extras.tar.xz 3868 BLAKE2B 8a54440259b9dc9fbf8e7bf61c2193829e1c916e029b3a9fca7678698e17b4a71aca2fd3615e5f8f6466530f41cb0e6f09aea9d062b5c8d027aaf2deb6d7d51e SHA512 db3d0513ac2b249d44eb0b69710643ae7c2edaf0f6161347d827f90e7f4f7946bd7307c1857aa813359c17902da72d586666231deb210becf040df644029d3ff
 DIST genpatches-5.15-92.base.tar.xz 3843196 BLAKE2B 1a70c672f4ceda221611ba1bad20fc4e791a51e27f412995308cb7f39962c6e237efc1bb7912c67b8e3dabaffce3bb6ceb55d62f4f12b79671910b70c1e7a8dd SHA512 33390b3e24783405971f2eacb24e715faf841a66e477a03d4055d61694fa72694d7563d799b95d47037ad0d7e7c234e56c894ddd7cd1dba59077efb901bbba26
 DIST genpatches-5.15-92.extras.tar.xz 3932 BLAKE2B 12936d0ac139d69f2e5947436ffd34add80625aa383aa23e51b4419a5e2ad3c38ace4d69c9e7066bfeae32ab727013e602c3a1c3424e128562597c517c7e5903 SHA512 6595eca7525db97672a15275228dbb9b14e7e234514b549e0fc17daeda4b48d298f6dbcde46e5862fe02bac9f50ffd7b05d82a174541469456289bdc6eb7f4b1
 DIST genpatches-5.15-93.base.tar.xz 3874100 BLAKE2B 3f9bd1a90de22824db823bead22ae777ebea551ebd183184ecd039f33def8db603694acbe3757352cff228eb2a28a8c31d362f2185b32f88edd19c4de6eedad1 SHA512 1d5c83f5f44ccee701755dc7732f80baa00e5b3f4137c9da8d81cd7fad0055df6b09dddb1cdd6287db6a43cd1b673aef3a543086138af72cad5218d2fef31860

diff --git a/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.165.ebuild b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.165.ebuild
new file mode 100644
index 000000000000..2575312f0643
--- /dev/null
+++ b/sys-kernel/gentoo-kernel/gentoo-kernel-5.10.165.ebuild
@@ -0,0 +1,131 @@
+# Copyright 2020-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit kernel-build toolchain-funcs
+
+MY_P=linux-${PV%.*}
+GENPATCHES_P=genpatches-${PV%.*}-$(( ${PV##*.} + 9 ))
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+CONFIG_VER=5.10.12
+CONFIG_HASH=836165dd2dff34e4f2c47ca8f9c803002c1e6530
+GENTOO_CONFIG_VER=g6
+
+DESCRIPTION="Linux kernel built with Gentoo patches"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+="
+	https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+	https://dev.gentoo.org/~alicef/dist/genpatches/${GENPATCHES_P}.base.tar.xz
+	https://dev.gentoo.org/~alicef/dist/genpatches/${GENPATCHES_P}.extras.tar.xz
+	https://github.com/projg2/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
+		-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+	amd64? (
+		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-x86_64-fedora.config
+			-> kernel-x86_64-fedora.config.${CONFIG_VER}
+	)
+	arm64? (
+		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-aarch64-fedora.config
+			-> kernel-aarch64-fedora.config.${CONFIG_VER}
+	)
+	ppc64? (
+		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-ppc64le-fedora.config
+			-> kernel-ppc64le-fedora.config.${CONFIG_VER}
+	)
+	x86? (
+		https://src.fedoraproject.org/rpms/kernel/raw/${CONFIG_HASH}/f/kernel-i686-fedora.config
+			-> kernel-i686-fedora.config.${CONFIG_VER}
+	)
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE="debug hardened"
+REQUIRED_USE="arm? ( savedconfig )"
+
+RDEPEND="
+	!sys-kernel/gentoo-kernel-bin:${SLOT}
+"
+BDEPEND="
+	debug? ( dev-util/pahole )
+"
+PDEPEND="
+	>=virtual/dist-kernel-${PV}
+"
+
+QA_FLAGS_IGNORED="
+	usr/src/linux-.*/scripts/gcc-plugins/.*.so
+	usr/src/linux-.*/vmlinux
+"
+
+src_prepare() {
+	local PATCHES=(
+		# meh, genpatches have no directory
+		"${WORKDIR}"/*.patch
+	)
+	default
+
+	local biendian=false
+
+	# prepare the default config
+	case ${ARCH} in
+		amd64)
+			cp "${DISTDIR}/kernel-x86_64-fedora.config.${CONFIG_VER}" .config || die
+			;;
+		arm)
+			return
+			;;
+		arm64)
+			cp "${DISTDIR}/kernel-aarch64-fedora.config.${CONFIG_VER}" .config || die
+			biendian=true
+			;;
+		hppa)
+			return
+			;;
+		ppc)
+			# assume powermac/powerbook defconfig
+			# we still package.use.force savedconfig
+			cp "${WORKDIR}/${MY_P}/arch/powerpc/configs/pmac32_defconfig" .config || die
+			;;
+		ppc64)
+			cp "${DISTDIR}/kernel-ppc64le-fedora.config.${CONFIG_VER}" .config || die
+			biendian=true
+			;;
+		x86)
+			cp "${DISTDIR}/kernel-i686-fedora.config.${CONFIG_VER}" .config || die
+			;;
+		*)
+			die "Unsupported arch ${ARCH}"
+			;;
+	esac
+
+	local myversion="-gentoo-dist"
+	use hardened && myversion+="-hardened"
+	echo "CONFIG_LOCALVERSION=\"${myversion}\"" > "${T}"/version.config || die
+	local dist_conf_path="${WORKDIR}/gentoo-kernel-config-${GENTOO_CONFIG_VER}"
+
+	local merge_configs=(
+		"${T}"/version.config
+		"${dist_conf_path}"/base.config
+	)
+	use debug || merge_configs+=(
+		"${dist_conf_path}"/no-debug.config
+	)
+	if use hardened; then
+		merge_configs+=( "${dist_conf_path}"/hardened-base.config )
+
+		tc-is-gcc && merge_configs+=( "${dist_conf_path}"/hardened-gcc-plugins.config )
+
+		if [[ -f "${dist_conf_path}/hardened-${ARCH}.config" ]]; then
+			merge_configs+=( "${dist_conf_path}/hardened-${ARCH}.config" )
+		fi
+	fi
+
+	# this covers ppc64 and aarch64_be only for now
+	if [[ ${biendian} == true && $(tc-endian) == big ]]; then
+		merge_configs+=( "${dist_conf_path}/big-endian.config" )
+	fi
+
+	kernel-build_merge_configs "${merge_configs[@]}"
+}