From: Harald Hoyer harald@redhat.com
This patch changes the version of kernel flavor/variants to end in "+$flavor" instead of ".$flavor". This makes it easier to detect a flavor and a parser can separate it from the architecture.
With that change we can correct kernel-install (of systemd) to call new-kernel-package with --package kernel-$flavor, because the $flavor can easily be extracted from the version string. ---
Rebased for current git.
commit 69c0bf478219b2fbb38fb3c707b220b75bfa4129 Date: Wed Jun 26 07:50:55 2013 -0400
kernel.spec | 74 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/kernel.spec b/kernel.spec index 27fd3f2..ecce9f2 100644 --- a/kernel.spec +++ b/kernel.spec @@ -473,17 +473,17 @@ Summary: The Linux kernel # %define kernel_reqprovconf \ Provides: kernel = %{rpmversion}-%{pkg_release}\ -Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\ +Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:+%{1}}\ Provides: kernel-drm = 4.3.0\ Provides: kernel-drm-nouveau = 16\ Provides: kernel-modeset = 1\ -Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ Provides: kernel-highbank\ -Provides: kernel-highbank-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-highbank-uname-r = %{KVERREL}%{?1:+%{1}}\ Provides: kernel-omap\ -Provides: kernel-omap-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-omap-uname-r = %{KVERREL}%{?1:+%{1}}\ Provides: kernel-tegra\ -Provides: kernel-tegra-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-tegra-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires(pre): %{kernel_prereq}\ Requires(pre): %{initrd_prereq}\ Requires(pre): linux-firmware >= 20120206-0.1.git06c8f81\ @@ -953,7 +953,7 @@ AutoReqProv: no\ %description -n %{name}%{?1:-%{1}}-debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:.%{1}}/.*|/.*%%{KVERREL}%{?1:.%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:+%{1}}/.*|/.*%%{KVERREL}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -965,9 +965,9 @@ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\ Group: System Environment/Kernel\ Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\ -Provides: kernel-devel = %{version}-%{release}%{?1:.%{1}}\ -Provides: kernel-devel-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel-devel = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel-devel-uname-r = %{KVERREL}%{?1:+%{1}}\ AutoReqProv: no\ Requires(pre): /usr/bin/find\ Requires: perl\ @@ -985,11 +985,11 @@ against the %{?2:%{2} }kernel package.\ Summary: Extra kernel modules to match the %{?2:%{2} }kernel\ Group: System Environment/Kernel\ Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:.%{1}}\ -Provides: kernel-modules-extra = %{version}-%{release}%{?1:.%{1}}\ +Provides: kernel-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel-modules-extra = %{version}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ -Provides: kernel-modules-extra-uname-r = %{KVERREL}%{?1:.%{1}}\ -Requires: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\ +Provides: kernel-modules-extra-uname-r = %{KVERREL}%{?1:+%{1}}\ +Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ AutoReqProv: no\ %description -n kernel%{?variant}%{?1:-%{1}}-modules-extra\ This package provides less commonly used kernel modules for the %{?2:%{2} }kernel package.\ @@ -1578,7 +1578,7 @@ BuildKernel() { MakeTarget=$1 KernelImage=$2 Flavour=$3 - Flav=${Flavour:+.${Flavour}} + Flav=${Flavour:++${Flavour}} InstallName=${4:-vmlinuz}
# Pick the right config file for the kernel we're building @@ -1898,13 +1898,13 @@ find Documentation -type d | xargs chmod u+w %define __modsign_install_post \ if [ "%{signmodules}" -eq "1" ]; then \ if [ "%{with_pae}" -ne "0" ]; then \ - %{modsign_cmd} signing_key.priv.sign.%{pae} signing_key.x509.sign.%{pae} $RPM_BUILD_ROOT/lib/modules/%{KVERREL}.%{pae}/ \ + %{modsign_cmd} signing_key.priv.sign+%{pae} signing_key.x509.sign+%{pae} $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+%{pae}/ \ fi \ if [ "%{with_debug}" -ne "0" ]; then \ - %{modsign_cmd} signing_key.priv.sign.debug signing_key.x509.sign.debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}.debug/ \ + %{modsign_cmd} signing_key.priv.sign+debug signing_key.x509.sign+debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+debug/ \ fi \ if [ "%{with_pae_debug}" -ne "0" ]; then \ - %{modsign_cmd} signing_key.priv.sign.%{pae}debug signing_key.x509.sign.%{pae}debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}.%{pae}debug/ \ + %{modsign_cmd} signing_key.priv.sign+%{pae}debug signing_key.x509.sign+%{pae}debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+%{pae}debug/ \ fi \ if [ "%{with_up}" -ne "0" ]; then \ %{modsign_cmd} signing_key.priv.sign signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ @@ -2071,7 +2071,7 @@ then\ fi\ if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ]\ then\ - (cd /usr/src/kernels/%{KVERREL}%{?1:.%{1}} &&\ + (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\ /usr/bin/find . -type f | while read f; do\ hardlink -c /usr/src/kernels/*.fc*.*/$f $f\ done)\ @@ -2084,7 +2084,7 @@ fi\ # %define kernel_modules_extra_post() \ %{expand:%%post %{?1:%{1}-}modules-extra}\ -/sbin/depmod -a %{KVERREL}%{?1:.%{1}}\ +/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ %{nil}
# This macro defines a %%posttrans script for a kernel package. @@ -2093,7 +2093,7 @@ fi\ # %define kernel_variant_posttrans() \ %{expand:%%posttrans %{?1}}\ -/bin/kernel-install add %{KVERREL}%{?1:.%{1}} /%{image_install_path}/vmlinuz-%{KVERREL}%{?1:.%{1}} || exit $?\ +/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /%{image_install_path}/vmlinuz-%{KVERREL}%{?1:+%{1}} || exit $?\ %{nil}
# @@ -2119,7 +2119,7 @@ fi}\ # %define kernel_variant_preun() \ %{expand:%%preun %{?1}}\ -/bin/kernel-install remove %{KVERREL}%{?1:.%{1}} /%{image_install_path}/vmlinuz-%{KVERREL}%{?1:.%{1}} || exit $?\ +/bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /%{image_install_path}/vmlinuz-%{KVERREL}%{?1:+%{1}} || exit $?\ %{nil}
%kernel_variant_preun @@ -2241,30 +2241,30 @@ fi %if %{1}\ %{expand:%%files %{?2}}\ %defattr(-,root,root)\ -/%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:.%{2}}\ -/%{image_install_path}/.vmlinuz-%{KVERREL}%{?2:.%{2}}.hmac \ +/%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:+%{2}}\ +/%{image_install_path}/.vmlinuz-%{KVERREL}%{?2:+%{2}}.hmac \ %ifarch %{arm}\ -/%{image_install_path}/dtb-%{KVERREL}%{?2:.%{2}} \ +/%{image_install_path}/dtb-%{KVERREL}%{?2:+%{2}} \ %endif\ -%attr(600,root,root) /boot/System.map-%{KVERREL}%{?2:.%{2}}\ -/boot/config-%{KVERREL}%{?2:.%{2}}\ -%dir /lib/modules/%{KVERREL}%{?2:.%{2}}\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/kernel\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/build\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/source\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/updates\ +%attr(600,root,root) /boot/System.map-%{KVERREL}%{?2:+%{2}}\ +/boot/config-%{KVERREL}%{?2:+%{2}}\ +%dir /lib/modules/%{KVERREL}%{?2:+%{2}}\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/kernel\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/build\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/source\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/updates\ %ifarch %{vdso_arches}\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\ -/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/vdso\ +/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:+%{2}}.conf\ %endif\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/modules.*\ -%ghost /boot/initramfs-%{KVERREL}%{?2:.%{2}}.img\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/modules.*\ +%ghost /boot/initramfs-%{KVERREL}%{?2:+%{2}}.img\ %{expand:%%files %{?2:%{2}-}devel}\ %defattr(-,root,root)\ -/usr/src/kernels/%{KVERREL}%{?2:.%{2}}\ +/usr/src/kernels/%{KVERREL}%{?2:+%{2}}\ %{expand:%%files %{?2:%{2}-}modules-extra}\ %defattr(-,root,root)\ -/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\ +/lib/modules/%{KVERREL}%{?2:+%{2}}/extra\ %if %{with_debuginfo}\ %ifnarch noarch\ %{expand:%%files -f debuginfo%{?2}.list %{?2:%{2}-}debuginfo}\
On 06/27/2013 08:35 AM, harald@redhat.com wrote:
From: Harald Hoyer harald@redhat.com
This patch changes the version of kernel flavor/variants to end in "+$flavor" instead of ".$flavor". This makes it easier to detect a flavor and a parser can separate it from the architecture.
With that change we can correct kernel-install (of systemd) to call new-kernel-package with --package kernel-$flavor, because the $flavor can easily be extracted from the version string.
Rebased for current git.
commit 69c0bf478219b2fbb38fb3c707b220b75bfa4129 Date: Wed Jun 26 07:50:55 2013 -0400
kernel.spec | 74 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 37 deletions(-)
ping?
On Fri, Jul 19, 2013 at 11:01:27AM +0200, Harald Hoyer wrote:
kernel.spec | 74 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 37 deletions(-)
ping?
Since nobody else replies, I guess I'll do it.
I think this change is unnecessary.
--Kyle
On 07/19/2013 03:32 PM, Kyle McMartin wrote:
On Fri, Jul 19, 2013 at 11:01:27AM +0200, Harald Hoyer wrote:
kernel.spec | 74 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 37 deletions(-)
ping?
Since nobody else replies, I guess I'll do it.
I think this change is unnecessary.
--Kyle
Well, then how should kernel-install detect the kernel flavor and pass this information to new-kernel-package?
Currently this is broken in rawhide and the kernel default entry might be the wrong one, if you configured /etc/sysconfig/kernel and have more than one variant installed.
On Mon, Jul 22, 2013 at 10:01:47 +0200, Harald Hoyer harald@redhat.com wrote:
Currently this is broken in rawhide and the kernel default entry might be the wrong one, if you configured /etc/sysconfig/kernel and have more than one variant installed.
You don't need two varients installed. It is broken if your default kernel is a PAE kernel even if you don't have any non-PAE kernels installed.
On 07/22/2013 01:29 PM, Bruno Wolff III wrote:
On Mon, Jul 22, 2013 at 10:01:47 +0200, Harald Hoyer harald@redhat.com wrote:
Currently this is broken in rawhide and the kernel default entry might be the wrong one, if you configured /etc/sysconfig/kernel and have more than one variant installed.
You don't need two varients installed. It is broken if your default kernel is a PAE kernel even if you don't have any non-PAE kernels installed.
And this patch would enable us to fix this issue easily.
On Mon, Jul 22, 2013 at 01:33:34PM +0200, Harald Hoyer wrote:
On 07/22/2013 01:29 PM, Bruno Wolff III wrote:
On Mon, Jul 22, 2013 at 10:01:47 +0200, Harald Hoyer harald@redhat.com wrote:
Currently this is broken in rawhide and the kernel default entry might be the wrong one, if you configured /etc/sysconfig/kernel and have more than one variant installed.
You don't need two varients installed. It is broken if your default kernel is a PAE kernel even if you don't have any non-PAE kernels installed.
And this patch would enable us to fix this issue easily.
sure, I guess that's alright then. I'd rather hear from Justin/Josh/Dave on it and not commit it under them though.
--Kyle
On Mon, 2013-07-22 at 11:09 -0400, Kyle McMartin wrote:
On Mon, Jul 22, 2013 at 01:33:34PM +0200, Harald Hoyer wrote:
On 07/22/2013 01:29 PM, Bruno Wolff III wrote:
On Mon, Jul 22, 2013 at 10:01:47 +0200, Harald Hoyer harald@redhat.com wrote:
Currently this is broken in rawhide and the kernel default entry might be the wrong one, if you configured /etc/sysconfig/kernel and have more than one variant installed.
You don't need two varients installed. It is broken if your default kernel is a PAE kernel even if you don't have any non-PAE kernels installed.
And this patch would enable us to fix this issue easily.
sure, I guess that's alright then. I'd rather hear from Justin/Josh/Dave on it and not commit it under them though.
Sorry, we had merge window madness and then I went on vacation. I will get it in this afternoon.
Justin
kernel@lists.fedoraproject.org