Hey,
Now that kernel-xen is back in sync with the stock kernel RPM,
I thought it''d be good to start getting the spec files closer in sync.
To that end, here are a few patches to start with ...
More details on our plans for kernel-xen here:
http://www.redhat.com/archives/fedora-xen/2008-March/msg00013.htmlN^@N^GCheers,N^EMark
Thanks,
Mark.
Mark McLoughlin
2008-Mar-06 18:57 UTC
[PATCH 1/5] Don''t create debuginfo.list for main package
The main package uses debugfiles.list rather than debuginfo.list,
so we should not be creating debuginfo.list.
Currently, this only works because debuginfo.list is empty.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
kernel.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index 7e4435a..279326e 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -720,7 +720,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}}(-%%{_target_cpu})?/.*|/.*%%{KVERREL}%{?1}(\.debug)?''
-o debuginfo%{?1}.list}\
+%{?1:%{expand:%%global debuginfo_args %{?debuginfo_args} -p
''/.*/%%{KVERREL}%{?1:-?%{1}}(-%%{_target_cpu})?/.*|/.*%%{KVERREL}%{?1}(\.debug)?''
-o debuginfo%{?1}.list}}\
%{nil}
#
--
1.5.4.1
Mark McLoughlin
2008-Mar-06 18:57 UTC
[PATCH 2/5] Fix use of %{version} instead of %{kversion}
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
kernel.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index 279326e..1fff49a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1220,7 +1220,7 @@ cp %{SOURCE2} .
if [ -d xen ]; then
rm -rf xen
fi
-%setup -D -T -q -n kernel-%{version} -a1
+%setup -D -T -q -n kernel-%{kversion} -a1
cd xen
# Any necessary hypervisor patches go here
--
1.5.4.1
Mark McLoughlin
2008-Mar-06 18:57 UTC
[PATCH 3/5] Use correct %kernel_variant_post macro arguments for the Xen variant
From: Eduardo Habkost <ehabkost@raisama.net>
Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
kernel.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index 1fff49a..a82200d 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1655,7 +1655,7 @@ fi}\
%kernel_variant_preun PAEdebug
%kernel_variant_preun xen
-%kernel_variant_post xen -v xen -s kernel-xen[0U] -r kernel-xen -- `[ -d
/proc/xen -a ! -e /proc/xen/xsd_kva ] || echo
--multiboot=/%{image_install_path}/xen.gz-%{KVERREL}`
+%kernel_variant_post -v xen -s kernel-xen[0U] -r kernel-xen -- `[ -d /proc/xen
-a ! -e /proc/xen/xsd_kva ] || echo
--multiboot=/%{image_install_path}/xen.gz-%{KVERREL}`
if [ -x /sbin/ldconfig ]
then
/sbin/ldconfig -X || exit $?
--
1.5.4.1
Mark McLoughlin
2008-Mar-06 18:57 UTC
[PATCH 4/5] %kernel_variant_post: Pass all remaining args to /sbin/new-kernel-pkg
From: Eduardo Habkost <ehabkost@raisama.net>
Instead of passing just %{1}, use %{*} to get all the arguments that
were passed to %kernel_variant_post.
Signed-off-by: Eduardo Habkost <ehabkost@raisama.net>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
kernel.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index a82200d..617a27f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -1619,7 +1619,7 @@ if [ `uname -i` == "x86_64" -o `uname -i` ==
"i386" ] &&\
[ -f /etc/sysconfig/kernel ]; then\
/bin/sed -i -e
''s/^DEFAULTKERNEL=%{-s*}$/DEFAULTKERNEL=%{-r*}/''
/etc/sysconfig/kernel || exit $?\
fi}\
-/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod
--install %{?1} %{KVERREL}%{?-v*} || exit $?\
+/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod
--install %{*} %{KVERREL}%{?-v*} || exit $?\
#if [ -x /sbin/weak-modules ]\
#then\
# /sbin/weak-modules --add-kernel %{KVERREL}%{?-v*} || exit $?\
--
1.5.4.1
Mark McLoughlin
2008-Mar-06 18:57 UTC
[PATCH 5/5] Support Provides on kernel_reqprovconf macro
From: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
kernel.spec | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel.spec b/kernel.spec
index 617a27f..1881836 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -430,6 +430,7 @@ Conflicts: %{kernel_dot_org_conflicts}\
Conflicts: %{package_conflicts}\
%{?1:%{expand:%%{?kernel_%{1}_conflicts:Conflicts:
%%{kernel_%{1}_conflicts}}}}\
%{?1:%{expand:%%{?kernel_%{1}_obsoletes:Obsoletes:
%%{kernel_%{1}_obsoletes}}}}\
+%{?1:%{expand:%%{?kernel_%{1}_provides:Provides: %%{kernel_%{1}_provides}}}}\
# We can''t let RPM do the dependencies automatic because
it''ll then pick up\
# a correct but undesirable perl dependency from the module headers which\
# isn''t required for the kernel proper to function\
--
1.5.4.1
Roland McGrath
2008-Mar-06 19:27 UTC
Re: [PATCH 1/5] Don''t create debuginfo.list for main package
Huh? debugfiles.list populates kernel-debuginfo-common. debuginfo.list populates kernel-debuginfo. Thanks, Roland
Mark McLoughlin
2008-Mar-07 07:55 UTC
Re: [PATCH 1/5] Don''t create debuginfo.list for main package
On Thu, 2008-03-06 at 11:27 -0800, Roland McGrath wrote:> Huh? debugfiles.list populates kernel-debuginfo-common. > debuginfo.list populates kernel-debuginfo.Gah, my bad. We don''t build the UP variant in kernel-xen, so it doesn''t get used there and I didn''t spot it amongst all the macros. Yes, I''ll run a test build before committing anything :-) Thanks, Mark.