From ae74f4218bfda8425718ce40c160411d42000585 Mon Sep 17 00:00:00 2001
From: Davide Cavalca <dcavalca@fedoraproject.org>
Date: Dec 22 2022 13:35:44 +0000
Subject: [PATCH 1/2] Add kernel-edge repo to -edge subpackage


---

diff --git a/RPM-GPG-KEY-group_asahi-kernel-edge b/RPM-GPG-KEY-group_asahi-kernel-edge
new file mode 100644
index 0000000..66c1739
--- /dev/null
+++ b/RPM-GPG-KEY-group_asahi-kernel-edge
@@ -0,0 +1,19 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBGOkSEwBCADZ/XzgG+SnOt7sSqO3VxQr4vbipihg/+CstPZggkW9ZIuG9biI
+va/phBWZVn09Zi2qKed/hfm7gIfuTOQ41JjAuyUzDhZrNKN8z8F4keySKmCxSTnu
+p5mFXtaMBPDuVYjSYzG2IuPb8wAB+wL35AcfMmAni2hfuGk3pTb/ivBeyPP9ctcc
+g7Le0jxewrnL0pmf9estsfw7W+CQ0zdxrxJmqqst0bgs2XfMGNlzfG5Y37bfiHfv
+ianYg11KfCvBNYhyle8mteWySEZ1QLEAje2FNDN99qJ3ZxMSBInOi3SOvh/ziB9+
+PrS6I6fr1oVrz9Vw5Jn0/oLS0AxhsOUeEaYtABEBAAG0REBhc2FoaV9rZXJuZWwt
+ZWRnZSAoTm9uZSkgPEBhc2FoaSNrZXJuZWwtZWRnZUBjb3ByLmZlZG9yYWhvc3Rl
+ZC5vcmc+iQFXBBMBCABBFiEE8zvR0B2bNij1ShOM9MZTMCw7YwEFAmOkSEwCGy8F
+CQlmAYAFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQ9MZTMCw7YwHjbwgA
+wRHjnCSa8Su+KaU/lkuf1Z5wjWeAi2kCrG7Bu2QfEVEFBSX48PQdzQC1JU5UxbAT
+JQBXeN0jKPYbblkmxLfha1A/5ncJC8vQ8lDd9lglPTp6bqD+GvhCeA0DWcJCdE8u
+SYJZD0SGCrPVwjaGqOXsVQYeHKb804AFOmGrOyvBxQb57mxBvlh0cnYEny9mruAh
+TbTL5CbYf1jNQAQrjy1Av4Y+h+7wiT5zlFaSBc0oMOuekCY6+PjDpeDf7qf0xBXL
+xW6lkRCBVo9MKaPyV6QRCXGJLxa0i6Uc2ZYQ/BJS6GaDxytmssIVjbbokwhm4M0c
+h8MRFh4OZZdULyRoG9iX6Q==
+=q5FQ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/asahi-repos.spec b/asahi-repos.spec
index 0736d32..7c8c140 100644
--- a/asahi-repos.spec
+++ b/asahi-repos.spec
@@ -1,5 +1,5 @@
 Name:           asahi-repos
-Version:        0
+Version:        1
 Release:        %autorelease
 Summary:        Additional repositories for Apple Silicon hardware enablement
 
@@ -17,6 +17,8 @@ Source:         group_asahi-mesa.repo
 Source:         RPM-GPG-KEY-group_asahi-mesa
 Source:         group_asahi-rawhide-rebuilds.repo
 Source:         RPM-GPG-KEY-group_asahi-rawhide-rebuilds
+Source:         group_asahi-kernel-edge.repo
+Source:         RPM-GPG-KEY-group_asahi-kernel-edge
 
 Requires:       %{name}-common = %{version}-%{release}
 
@@ -59,9 +61,9 @@ cp -p %SOURCE0 %SOURCE1 .
 
 %install
 install -Dpm0644 -t %{buildroot}%{_sysconfdir}/yum.repos.d \
-  %SOURCE2 %SOURCE4 %SOURCE6 %SOURCE8 %SOURCE10
+  %SOURCE2 %SOURCE4 %SOURCE6 %SOURCE8 %SOURCE10 %SOURCE12
 install -Dpm0644 -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg \
-  %SOURCE3 %SOURCE5 %SOURCE7 %SOURCE9 %SOURCE11
+  %SOURCE3 %SOURCE5 %SOURCE7 %SOURCE9 %SOURCE11 %SOURCE13
 
 %files
 %license LICENSE
@@ -79,9 +81,10 @@ install -Dpm0644 -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg \
 %files edge
 %license LICENSE
 %doc README.md
-# TODO add @asahi edge kernel with GPU support here
 %config(noreplace) %{_sysconfdir}/yum.repos.d/group_asahi-mesa.repo
 %config(noreplace) %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-mesa
+%config(noreplace) %{_sysconfdir}/yum.repos.d/group_asahi-kernel-edge.repo
+%config(noreplace) %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-kernel-edge
 
 %files rawhide-rebuilds
 %license LICENSE
@@ -89,5 +92,13 @@ install -Dpm0644 -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg \
 %config(noreplace) %{_sysconfdir}/yum.repos.d/group_asahi-rawhide-rebuilds.repo
 %config(noreplace) %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-rawhide-rebuilds
 
+%post edge
+echo
+echo 'Run the following commands as root switch to the Edge packages:'
+echo '  # dnf update'
+echo '  # dnf upgrade --setopt=allow_vendor_change=True mesa\* kernel\*'
+echo 'and then reboot your system.'
+echo
+
 %changelog
 %autochangelog
diff --git a/group_asahi-kernel-edge.repo b/group_asahi-kernel-edge.repo
new file mode 100644
index 0000000..6f05bda
--- /dev/null
+++ b/group_asahi-kernel-edge.repo
@@ -0,0 +1,11 @@
+[copr:copr.fedorainfracloud.org:group_asahi:kernel-edge]
+name=Copr repo for kernel-edge owned by @asahi
+baseurl=https://download.copr.fedorainfracloud.org/results/@asahi/kernel-edge/fedora-$releasever-$basearch/
+type=rpm-md
+skip_if_unavailable=False
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-kernel-edge
+repo_gpgcheck=0
+enabled=1
+enabled_metadata=1
+priority=1
diff --git a/ngompa-fedora-asahi.repo b/ngompa-fedora-asahi.repo
index d7ae375..05dc224 100644
--- a/ngompa-fedora-asahi.repo
+++ b/ngompa-fedora-asahi.repo
@@ -8,4 +8,4 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ngompa-fedora-asahi
 repo_gpgcheck=0
 enabled=1
 enabled_metadata=1
-priority=1
+priority=5

From 98e819ea8d6f81b5407e5483d469a149a029bc81 Mon Sep 17 00:00:00 2001
From: Davide Cavalca <dcavalca@fedoraproject.org>
Date: Dec 22 2022 20:38:04 +0000
Subject: [PATCH 2/2] Switch to asahi kernel repo in main package


---

diff --git a/RPM-GPG-KEY-group_asahi-kernel b/RPM-GPG-KEY-group_asahi-kernel
new file mode 100644
index 0000000..da2c625
--- /dev/null
+++ b/RPM-GPG-KEY-group_asahi-kernel
@@ -0,0 +1,19 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBGOkthcBCACzf42xzD/VNVXlRxqpZqe1hF640rwJuLhveshiCY173+/l9zFP
+WTGBU7g+ZPCS6faz6B8M+yzU3QPvtFi+srWs/dM+PnYBPSxZs6wxrKCGb13wTUSS
+C+RX6mPppxpkHaG/Rj+rlHS0dGIKP39YTAIsnPv0Pgk2JufM+/s1k3xbQUARoV1N
+n6V4Lh0Q3Q0MgJDnVnn7g8MTq01J8U8PqKs2vZqQKn836Q4E+KC8VtE79w/R5B9/
+BKGYExT/Jqy6xPKXaANkoaAObj6iVtgwsJlwtJtJAhu4KX7rUwSFWoSGClMiIMd6
+cPR8RUl7+HinCB5tygxjoA22S3U122DMVhQbABEBAAG0OkBhc2FoaV9rZXJuZWwg
+KE5vbmUpIDxAYXNhaGkja2VybmVsQGNvcHIuZmVkb3JhaG9zdGVkLm9yZz6JAVcE
+EwEIAEEWIQSeTfkTXTnd/8d7UU6y2HBOAMCOoAUCY6S2FwIbLwUJCWYBgAULCQgH
+AgIiAgYVCgkICwIEFgIDAQIeBwIXgAAKCRCy2HBOAMCOoNttCACTRLCKpMOFdK9i
+YykRmQ9Xmwf+3J6d401S+7CdL4t2YystWa0DjESZnCZRwIAMgUUSrwUoEUf1xLKN
+m6LRhZ64VZewZEs019S0ntpv9iuKd//6WUuexIH6kOuzDI+f5UGeRxC04cvnNkh/
+g33+hgaha6s1+Md3j6ymM2qJsba4oqmCk8BfZPp31Gi4Gd13Uq9a5hinSxoYTaOE
+UcXiTFrOEqwztEjOhJiwXCDA/89VUe+fYjqpGOqvzWW+UUatpt8LcVhTEcvUDSTu
+d2j4lx2XIZ58Tg0oWT6iczWx9kYR02obk49KpbMfWyE/cEjj0MNNTmqX6/bvSBv8
+ohmhxOub
+=X76U
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/RPM-GPG-KEY-ngompa-fedora-asahi b/RPM-GPG-KEY-ngompa-fedora-asahi
deleted file mode 100644
index acd5440..0000000
--- a/RPM-GPG-KEY-ngompa-fedora-asahi
+++ /dev/null
@@ -1,19 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQENBGCfmI8BCAC8PGbr+9SJ8Q7OZinxHCk9MWWG4V6i5QXbT5Y73zvzZUtzNkI7
-z2aCWHRQUwcLNZfJVVmpgAa0fAGm8xbE9fRhQHhwLb/F+2cEE6vYiq0G/Ng6jbBK
-3DPRQcedvrOTfpFIUliVOoB/TcU5Es9darxN3gD1ly6Qnkw0+9GjYeQp4k7FQuo3
-C+o5OUNgiOvzgxCs34Q1dAgxsUxU0ldN/oz71fxh0zsasNECdX/8hH5knc/EAN1o
-SGtD07yRglhPUtKxHgb3Hc7Z1TyHoVOgLX1P1JOD8zcLhvbIH6Mt9aEgBK1NxdxC
-JhW5zBpAJDKRNA74p7VGSOgAZeyUprvFjncdABEBAAG0Rm5nb21wYV9mZWRvcmEt
-YXNhaGkgKE5vbmUpIDxuZ29tcGEjZmVkb3JhLWFzYWhpQGNvcHIuZmVkb3JhaG9z
-dGVkLm9yZz6JAVQEEwEIAD4WIQStduPMXkFoKd2eu2u4+9X/+aI0vAUCYJ+YjwIb
-LwUJCWYBgAULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRC4+9X/+aI0vPSsCACJ
-TbLDpvssGegbsz1ug1uDXbYXuOZ/EurcTKff7JqjK1c08sE8ROaVx3PTgrNyWG9Q
-wlQvaaY7ujpBfGRR6/nSexfB3sI0C2lyq9EzUv+plygPP36aKyHUkUE+FznEBBMf
-taSTGKTvL0x5GkgE4bOf+LQr2cdFZtNQ8MgdgKqFTgnzyggFbJo8qCDerGY5FocO
-pA7U91OAzRRWncd/Wg5log5HOHuDNscIqOoNZOBKKO8FhAEZ2P3gUzks3dWZdBo+
-TUYxKZyvfAqk0tEbayJC0u4uEvY/P7a8EHvsWssDiEA/5CctXw//lBWAy8OsUSdQ
-sryxAKqL1d1hvd3smDWp
-=yGM+
------END PGP PUBLIC KEY BLOCK-----
diff --git a/asahi-repos.spec b/asahi-repos.spec
index 7c8c140..7f2c146 100644
--- a/asahi-repos.spec
+++ b/asahi-repos.spec
@@ -11,8 +11,8 @@ Source:         group_asahi-fedora-remix-branding.repo
 Source:         RPM-GPG-KEY-group_asahi-fedora-remix-branding
 Source:         group_asahi-u-boot.repo
 Source:         RPM-GPG-KEY-group_asahi-u-boot
-Source:         ngompa-fedora-asahi.repo
-Source:         RPM-GPG-KEY-ngompa-fedora-asahi
+Source:         group_asahi-kernel.repo
+Source:         RPM-GPG-KEY-group_asahi-kernel
 Source:         group_asahi-mesa.repo
 Source:         RPM-GPG-KEY-group_asahi-mesa
 Source:         group_asahi-rawhide-rebuilds.repo
@@ -68,9 +68,8 @@ install -Dpm0644 -t %{buildroot}%{_sysconfdir}/pki/rpm-gpg \
 %files
 %license LICENSE
 %doc README.md
-# TODO replace with @asahi stable kernel
-%config(noreplace) %{_sysconfdir}/yum.repos.d/ngompa-fedora-asahi.repo
-%config(noreplace) %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-ngompa-fedora-asahi
+%config(noreplace) %{_sysconfdir}/yum.repos.d/group_asahi-kernel.repo
+%config(noreplace) %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-kernel
 
 %files common
 %config(noreplace) %{_sysconfdir}/yum.repos.d/group_asahi-fedora-remix-branding.repo
diff --git a/group_asahi-kernel.repo b/group_asahi-kernel.repo
new file mode 100644
index 0000000..a84106e
--- /dev/null
+++ b/group_asahi-kernel.repo
@@ -0,0 +1,11 @@
+[copr:copr.fedorainfracloud.org:group_asahi:kernel]
+name=Copr repo for kernel owned by @asahi
+baseurl=https://download.copr.fedorainfracloud.org/results/@asahi/kernel/fedora-$releasever-$basearch/
+type=rpm-md
+skip_if_unavailable=False
+gpgcheck=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-group_asahi-kernel
+repo_gpgcheck=0
+enabled=1
+enabled_metadata=1
+priority=5
diff --git a/ngompa-fedora-asahi.repo b/ngompa-fedora-asahi.repo
deleted file mode 100644
index 05dc224..0000000
--- a/ngompa-fedora-asahi.repo
+++ /dev/null
@@ -1,11 +0,0 @@
-[copr:copr.fedorainfracloud.org:ngompa:fedora-asahi]
-name=Copr repo for fedora-asahi owned by ngompa
-baseurl=https://download.copr.fedorainfracloud.org/results/ngompa/fedora-asahi/fedora-$releasever-$basearch/
-type=rpm-md
-skip_if_unavailable=False
-gpgcheck=1
-gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ngompa-fedora-asahi
-repo_gpgcheck=0
-enabled=1
-enabled_metadata=1
-priority=5

