From: Harald Hoyer <harald@xxxxxxxxxx> 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. --- kernel.spec | 74 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/kernel.spec b/kernel.spec index f85ba9a..9e17710 100644 --- a/kernel.spec +++ b/kernel.spec @@ -464,17 +464,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\ @@ -930,7 +930,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} # @@ -942,9 +942,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\ @@ -962,11 +962,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.\ @@ -1544,7 +1544,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 @@ -1871,13 +1871,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.PAEdebug signing_key.x509.sign.PAEdebug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}.PAEdebug/ \ + %{modsign_cmd} signing_key.priv.sign-PAEdebug signing_key.x509.sign-PAEdebug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}-PAEdebug/ \ fi \ if [ "%{with_up}" -ne "0" ]; then \ %{modsign_cmd} signing_key.priv.sign signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ @@ -2044,7 +2044,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)\ @@ -2057,7 +2057,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. @@ -2066,7 +2066,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} # @@ -2092,7 +2092,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 @@ -2217,30 +2217,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}\ -- 1.8.2.1 _______________________________________________ kernel mailing list kernel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/kernel