Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [Patch] fix rpmbuild for xen-ia64: msg#00172

Subject: Re: [Patch] fix rpmbuild for xen-ia64
Akio Takebe wrote:  [Thu May 25 2006, 07:53:11PM EDT]
> I fixed my patch to install xenU to /boot.
> How about this?
> 
> Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

Thanks, comments below.

> diff -r f8ab3683a4fb SPECS/kernel-2.6.spec
> --- a/SPECS/kernel-2.6.spec   Wed May 24 22:19:50 2006 -0400
> +++ b/SPECS/kernel-2.6.spec   Sun May 28 23:31:13 2006 +0900
> @@ -3,7 +3,7 @@ Summary: The Linux kernel (the core of t
>  # What parts do we want to build?  We must build at least one kernel.
>  # These are the kernels that are built IF the architecture allows it.
>  
> -%define buildup 1
> +%define buildup 0
>  %define buildsmp 0
>  %define buildpae 0
>  # Whether to apply the Xen patches, leave this enabled.
> @@ -12,7 +12,7 @@ Summary: The Linux kernel (the core of t
>  %define buildxen 1
>  %define buildxenPAE 0
>  %define builddoc 0
> -%define buildkdump 1
> +%define buildkdump 0
>  %define buildheaders 0

These defines shouldn't be changed.  They're overridden by the
architecture-specific parts lower down.  I left this out.

>  # Versions of various parts
> @@ -1146,12 +1146,16 @@ BuildKernel() {
>      mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
>      install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
>      install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-
> $KernelVer
> -    cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-
> $KernelVer
> +    if [ x"$Flavour" == x"xenU" ]; then
> +        cp $KernelImage $RPM_BUILD_ROOT/boot/vmlinuz-$KernelVer
> +    else
> +        cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-
> $KernelVer
> +    fi

This is a good idea, but doesn't cover the PAE kernels for the other
architectures.  Thanks for showing it can be easier than my initial
attempt.  Here is what I committed:

+    if [[ $Flavour == *xenU* ]]; then
+      # xenU kernels should always install to /boot
+      # because they're never needed for system boot
+      cp $KernelImage $RPM_BUILD_ROOT/root/vmlinuz-$KernelVer
+    else
+      cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
+    fi

> -    if [ "$Flavour" == "kdump" ]; then
> +    if [ x"$Flavour" == x"kdump" ]; then

This shell technique was popularized as a way to guarantee a string
isn't empty, to prevent poor interpreters from exploding.  It was
never necessary if quoting was done right, and is certainly not needed
with bash :-)

Regards,
Aron

Attachment: pgpehCYTmz698.pgp
Description: PGP signature


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe