From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1408443-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 91C6B158091
	for <garchives@archives.gentoo.org>; Wed, 15 Jun 2022 14:14:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BE682E0893;
	Wed, 15 Jun 2022 14:14:13 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(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 A4935E0895
	for <gentoo-commits@lists.gentoo.org>; Wed, 15 Jun 2022 14:14:13 +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 B21AA341CC6
	for <gentoo-commits@lists.gentoo.org>; Wed, 15 Jun 2022 14:14:12 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id F2CBA50D
	for <gentoo-commits@lists.gentoo.org>; Wed, 15 Jun 2022 14:14:09 +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: <1655302441.4f4dc98bebae15c14593e29bc4295d4ecaba0922.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/vanilla-kernel/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sys-kernel/vanilla-kernel/Manifest sys-kernel/vanilla-kernel/vanilla-kernel-5.17.15.ebuild
X-VCS-Directories: sys-kernel/vanilla-kernel/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 4f4dc98bebae15c14593e29bc4295d4ecaba0922
X-VCS-Branch: master
Date: Wed, 15 Jun 2022 14:14:09 +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: ba5931b4-f447-46de-827a-7c3ef633e969
X-Archives-Hash: 8020ca30444820ce7fda2f84511b175b

commit:     4f4dc98bebae15c14593e29bc4295d4ecaba0922
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 05:17:27 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 14:14:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f4dc98b

sys-kernel/vanilla-kernel: Bump to 5.17.15

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

 sys-kernel/vanilla-kernel/Manifest                 |   2 +
 .../vanilla-kernel/vanilla-kernel-5.17.15.ebuild   | 134 +++++++++++++++++++++
 2 files changed, 136 insertions(+)

diff --git a/sys-kernel/vanilla-kernel/Manifest b/sys-kernel/vanilla-kernel/Manifest
index e9842a2784bc..9cd89ee5aac0 100644
--- a/sys-kernel/vanilla-kernel/Manifest
+++ b/sys-kernel/vanilla-kernel/Manifest
@@ -51,6 +51,8 @@ DIST linux-5.17.13.tar.sign 991 BLAKE2B 2cb8e78546563c946735b25d5a3e5b586c9fb2d1
 DIST linux-5.17.13.tar.xz 128422820 BLAKE2B 3efcb9b576a3ed7e5a8863a06f91b0436d57f0098db5aa72a2751f001f3605d8c6b1f58a92dad5394106d0b29ab5379bfb3937f3bd8ef95931e2d480846f0bc1 SHA512 ea54a3cbf874bc9fa0974327082ceb4c54f9f044d90a2c4c75f57691328815d19c082a776da4ea40f66e3f18e83c2f7f3d6e479dca1b4eb195b88f59e0426858
 DIST linux-5.17.14.tar.sign 991 BLAKE2B 519f379f4944e109412757d949edf396ffde580d41cf2b2ca77014aef2f91dd156d2cdba01d0fa9ea7311d33ff0013e32fce72c37bc5db20b1649c9a2a23c223 SHA512 a85aee30a1ee42bd8c98c71165231346123fc8e8a83e14fc33962dc234a9e3ed4a62a456c8a95307146c14b674a9cb0049aa9f2a286080441a672aaf0b073c80
 DIST linux-5.17.14.tar.xz 128463904 BLAKE2B cc605b498b6ee01f678115da2d7d0e28164c339c155f0cd9e1081306e37954ae8eba0b0c18169e2da6b1437cb74ad42afb3329da2cb45ebee7500d0510fad49f SHA512 c4108a6a14801a969e55f2ff9048d60bf804645634c7e8b3fe61017d5bdc589198e271b6bca9b894e149a3f502e6654dcdc650a04c2db17ffadfd2831d8ce4be
+DIST linux-5.17.15.tar.sign 991 BLAKE2B e7dd4791920ef75fb124f5e5860f15106bdd8ae6993337f73350f79e167b71a96af59cfb449f4c88332633384d02a92e2a562acc0de8dd70d4ca7ca02fa0cc9a SHA512 002cb1f9491ebf67db2f1284462c4eaeb3eda00542e263e8c5b07865b73789e1f0558c5ab2a9b334a312b8dc43275464f4ecf4cae80b11d55e396c12539f612e
+DIST linux-5.17.15.tar.xz 128442092 BLAKE2B 14e42132958581b1d4ec01c9095d61ca5539ed894bf6c6eccf4a984cee496affe3a0f12383abbb1df46f55c1fcb667154ebf1f4f460f96b9d5166991bcb68a63 SHA512 0239fc941bd3dee4969f87d5a3bd90b6a6b5ebaed950a17a33e64ac6a110d3b9f7e287a134098403718c764b8dc78b72ed7979f820a20eeb3136f22d743c3aa1
 DIST linux-5.17.9.tar.sign 989 BLAKE2B a078037dddf7634cf5e854b79a873cb743a3809a4be3d6fc4c8d9ea2340ed61d118dcb58edecadcdc653ded2e4c552d44b56d5d962d833b6b37234726ac35b5c SHA512 07c2d483e0b02ed17b27d774513cca9be47b7d163964e7f2b14f0be273e8d67747a164274ee1fcdf67abf39f7141297322eb5f39cf9cf4df89bd03f48fc95143
 DIST linux-5.17.9.tar.xz 128449736 BLAKE2B 83dc3cf66933f42a3cdce0015716017ed7fd7810a380a9374bac495b9f0a96b1b95b05bd012332c4156189f6a02d8a9b8b33c9391458adb9909a75bf661d8547 SHA512 8866b6f0ab8cbc122bbed0083ee9b351193780143259b818a15cdde1581222ee728a60344ea9267d7f3e6b1563b24a23100f46e6bd185fdc1e169b804e48cc2e
 DIST linux-5.4.195.tar.sign 991 BLAKE2B c80a3a547d82b7d394155f396e3beb66df61272dd5f57be00fcf3b8b6bcc419914fde3488b950f29f6c235210e8f777e28199a4126530963749ed3107c49a249 SHA512 a770e02e59031a8bc74c832c1f9947d0f2edd397de23eef234f18b7070128c8adb1836ca4297dce1afa9f5ddbdb97fa4404e2c90faa81d5502d8856dca4112fb

diff --git a/sys-kernel/vanilla-kernel/vanilla-kernel-5.17.15.ebuild b/sys-kernel/vanilla-kernel/vanilla-kernel-5.17.15.ebuild
new file mode 100644
index 000000000000..bb3171ba9be9
--- /dev/null
+++ b/sys-kernel/vanilla-kernel/vanilla-kernel-5.17.15.ebuild
@@ -0,0 +1,134 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit kernel-build toolchain-funcs verify-sig
+
+MY_P=linux-${PV}
+# https://koji.fedoraproject.org/koji/packageinfo?packageID=8
+# forked to https://github.com/mgorny/fedora-kernel-config-for-gentoo
+CONFIG_VER=5.17.11-gentoo
+GENTOO_CONFIG_VER=g1
+
+DESCRIPTION="Linux kernel built from vanilla upstream sources"
+HOMEPAGE="https://www.kernel.org/"
+SRC_URI+="
+	https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.xz
+	https://github.com/mgorny/gentoo-kernel-config/archive/${GENTOO_CONFIG_VER}.tar.gz
+		-> gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz
+	verify-sig? (
+		https://cdn.kernel.org/pub/linux/kernel/v$(ver_cut 1).x/${MY_P}.tar.sign
+	)
+	amd64? (
+		https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-x86_64-fedora.config
+			-> kernel-x86_64-fedora.config.${CONFIG_VER}
+	)
+	arm64? (
+		https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-aarch64-fedora.config
+			-> kernel-aarch64-fedora.config.${CONFIG_VER}
+	)
+	ppc64? (
+		https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/kernel-ppc64le-fedora.config
+			-> kernel-ppc64le-fedora.config.${CONFIG_VER}
+	)
+	x86? (
+		https://raw.githubusercontent.com/mgorny/fedora-kernel-config-for-gentoo/${CONFIG_VER}/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 )"
+
+BDEPEND="
+	debug? ( dev-util/pahole )
+	verify-sig? ( sec-keys/openpgp-keys-kernel )
+"
+PDEPEND="
+	>=virtual/dist-kernel-${PV}
+"
+
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/kernel.org.asc
+
+src_unpack() {
+	if use verify-sig; then
+		einfo "Unpacking linux-${PV}.tar.xz ..."
+		verify-sig_verify_detached - "${DISTDIR}"/linux-${PV}.tar.sign \
+			< <(xz -cd "${DISTDIR}"/linux-${PV}.tar.xz | tee >(tar -x))
+		assert "Unpack failed"
+		unpack "gentoo-kernel-config-${GENTOO_CONFIG_VER}.tar.gz"
+	else
+		default
+	fi
+}
+
+src_prepare() {
+	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="-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[@]}"
+}