Re: make rpm fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, not right away it won't.

I looked in /usr/src/linux-2.4, where the source code is, and there is a
"kernel.spec" file there.  I copied this to match the custom name:

cp kernel.spec kernel-2.4.209custom.spec

Then I ran the command:
[root@xxxxxxx linux-2.4]# rpmbuild -ba kernel-2.4.209custom.spec
error: File /usr/src/redhat/SOURCES/kernel-2.4.209custom.tar.gz: No such
file or directory
[root@xxxxxxx linux-2.4]#

Looking in the .spec file, I find no mention of SOURCES.  "info
rpmbuild" doesn't address this in any way that makes sense to me, so I
have to ask, what should I do about this?  How does the tgz kernel file
get into SOURCES, or what else is supposed to happen?

I attached the .spec file in case there's anything in there that's
relevant.

Thanks,
Bret


On Fri, 2003-05-02 at 15:13, Kevin Worthington wrote:
>  If you are trying to build an RPM, and it looks like you're trying to build a kernel RPM, you should try creating a spec file, and running:
> 
> rpmbuild -ba kernel-2.4.209custom
> 
> and that will build a src.rpm and a binary (i386.rpm)
> 
> > I ran "make rpm".
> > 
> > After much time, the build fails with this:
> > ...
> > make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.4.209custom'
> > + cp arch/i386/boot/bzImage
> > /var/tmp/kernel-2.4.209custom-root/boot/vmlinuz-2.4.20-9custom
> > + cp System.map
> > /var/tmp/kernel-2.4.209custom-root/boot/System.map-2.4.20-9custom
> > + cp .config
> > /var/tmp/kernel-2.4.209custom-root/boot/config-2.4.20-9custom
> > + /usr/lib/rpm/brp-compress
> > Processing files: kernel-2.4.209custom-2
> > Provides: kernel-2.4.20-9custom kernel-drm
> > Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1
> > rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> > Processing files: kernel-debuginfo-2.4.209custom-2
> > error: Could not open %files file
> > /usr/src/redhat/BUILD/kernel-2.4.209custom/debugfiles.list: No such file
> > or directory
> >  
> >  
> > RPM build errors:
> >     Could not open %files file
> > /usr/src/redhat/BUILD/kernel-2.4.209custom/debugfiles.list: No such file
> > or directory
> > make: *** [rpm] Error 1
> > [root@xxxxxxx linux-2.4]# ls /usr/src
> HTH,
> Kev
> 
> ----------------------------------------------------------- 
> Kevin Worthington - <kworthington (at) linuxmail {dot} org>
> Faithful Red Hat Linux user since April 1998
> Registered Linux User #218689 - http://counter.li.org
> -- 
> ______________________________________________
> http://www.linuxmail.org/
> Now with e-mail forwarding for only US$5.95/yr
> 
> Powered by Outblaze
-- 
Bret Comstock Waldow <bwaldow@xxxxxxxxxxxx>
Name: kernel
Summary: The Linux Kernel
Version: 2.4.209custom
Release: 2
License: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
URL: http://www.kernel.org
Source: kernel-2.4.209custom.tar.gz
BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root
Provides: kernel-drm kernel-2.4.20-9custom
%define __spec_install_post /usr/lib/rpm/brp-compress || :

%description
The Linux Kernel, the operating system core itself

%prep
%setup -q

%build
make oldconfig dep clean bzImage modules

%install
mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules
INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install
cp arch/i386/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinuz-2.4.20-9custom
cp System.map $RPM_BUILD_ROOT/boot/System.map-2.4.20-9custom
cp .config $RPM_BUILD_ROOT/boot/config-2.4.20-9custom

%clean
#echo -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, root)
%dir /lib/modules
/lib/modules/2.4.20-9custom
/boot/*


[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux