Re: Could not get rpm to install

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

 



On Fri, Feb 09, 2007 at 04:19:00PM +0500, Tahir Saleh wrote:
> thankyou mathew for ur help.
> But i still could not get rpm to run.
> Ive been trying to generate aRPM through the spec file and havent been 
> successful.
> Instead of putting the files sbull.c,Makefile,GPL,sbull-1.1 in a directory 
> than taring it ive tared thaem directly with the command tar -cf 
> sbull-1.1.tar * rather than doing tar -cf sbull-1.1.tar sbull-1.1.

Why? That part was right before!

> %define pkg sbull
> %define ver 1.1
> %define install_path opt/tahir2/

Again, the above is not necessary.

> Summary: A simple ramdisk.
> Name: Sbull

Still needs to be "Name: sbull", to match the tar file.

> Version: 1.1
> Release: 1
> URL:

If there's no URL, just leave off the whole URL: line.

> Copyright: License

No, what you need is:

License: GPL

instead of the above line.


> Group: System Environment/kernel

Still disrecommended.

> Source: sbull-1.1.tar.gz
> Patch:

If there's no patch, just leave off the whole Patch line.

> BUILDROOT:%{_tmppath}/%{pkg}-%{ver}

Better, but you didn't copy what I said exactly, and there's some good
reasons it was that way.


> Prefix: usr/src/redhat/BUILD/%{pkg}-%{ver}

The above line is totally broken. Remove it.

[...]

> %prep
> %setup -c

Okay, now you need -c with how you made your tarball. But better to put your
tarball back to being correct and removing the -c.

> %build
> 
> #cd /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1
> #make clean
> make
> #insmod sbull.ko
> #rmmod sbull.ko

Remove the commented out lines completely and the above is fine.

> %install
> #rm -rf $RPM_BUILD_ROOT
> #cd /usr/src/redhat/BUILD/Sbull-1.1/sbull-1.1
> #install -D sbull.ko ${RPM_BUILD_ROOT}/usr/bin/sbull
> #install -D sbull.1 ${RPM_BUILD_ROOT}/usr/share/man/man1/sbull.1
> #install -D GPL ${RPM_BUILD_ROOT}/usr/share/docs/sbull-1.1/GPL
> 
> #cd /usr/src/redhat/BUILD/Sbull-1.1
> 
> 
> #cp -a sbull-1.1 /opt/
> 
> #rpm -ivv --prefix /opt/sbull-1.1/sbull.c sbull-1.1-1.i386.rpm


Um, okay, now the above is doing nothing because it's all commented out. The
first two of the install lines look better, but you didn't use the macros,
and you're still installing the GPL file when that's not correct. And
everything else shouldn't be there.

> %files
> %dir /usr/src/redhat/BUILD/%{pkg}-%{ver}/*
> %defattr(-,root,root)

This is still all wrong.

> %clean
> cd /usr/src/redhat/BUILD
> rm -rf %{pkg}-%{ver}

This is still all wrong.

> %post
> mkdir /%{install_path}
> cd /usr/src/redhat/BUILD
> cp -a %{pkg}-%{ver} /%{install_path}
> cd /usr/src/redhat/BUILD
> rm -rf %{pkg}-%{ver}

And the whole above is still very, very wrong.

-- 
Matthew Miller           mattdm@xxxxxxxxxx          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux