LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-10-2012, 06:20 PM   #1
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 95

Rep: Reputation: 15
RPM RPM_BUILD_ROOT not seeming to work


For some reason when I run as myself, ie. not root:
rpmbuild -vv -bb SPECS/build_windrvr.spec

I am dying at:
./setup_inst_dir
touch: cannot touch `/etc/.windriver.rc': Permission denied
./setup_inst_dir: line 17: /etc/.windriver.rc: Permission denied
make: *** [install] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.41869 (%install)

It appears that rpmbuild is trying to build in the root directory despite direct attempts to make that not happen. Any ideas why the folling spec files is causing this?:
%define _topdir /usr/src/redhat/rpmbuild
%define name WinDrvr
%define release 1
%define version 8.11
%define buildroot %{_topdir}/%{name}-%{version}-root

BuildRoot: /usr/src/redhat/rpmbuild/tmp
Summary: Project WinDriver
Name: %{name}
Version: %{version}
Release: %{release}
License: GPL
Prefix: /
Group: System Environment/Kernel
Source: %{name}-%{version}.tar.bz2
BuildRequires: %kernel_module_package_buildreqs

%description
WinDriver for Project.

%prep
%setup -n WD/WinDriver-v8.11/redist

%build
./configure --prefix=$RPM_BUILD_ROOT
make -j4

%install
make ROOT="$RPM_BUILD_ROOT" install

%files
%defattr(-,root,root)
/usr/lib/libwdapi811_32.so
/lib/modules/2.6.18-128.el5/kernel/drivers/misc/windrvr6.ko
/usr/local/bin/pcidemo.gcc.linux64.POWER5
/etc/init.d/load_windriver.sh
/etc/.windriver.rc


The spec file is ugly, but it is as it is because I can't seem to whack it into shape. Thank you for any time that you can give this.
 
Old 01-10-2012, 06:50 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,369
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Since you defined your %{buildroot} in the .spec file (though it's the wrong one: should reside under %_topdir which is some form of ~/[anydirname]/) and have run configure with the right --prefix it could be 'make install' isn't the right syntax (try 'make DESTDIR=$RPM_BUILD_ROOT install'?) else "setup_inst_dir" contents should have the prefix changed. If your %{buildroot} setting it isn't propagated through ./configure you could massage the script directly using 'sed'?..
 
1 members found this post helpful.
Old 01-11-2012, 04:02 PM   #3
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 95

Original Poster
Rep: Reputation: 15
Thank you, it turns out --prefix has no affect on installation. Ran configure, and make with --prefix outside the RPM context. I guess a tarball may be a better way to go.

Was just hoping that I could build a SRPM in the case where the driver was used with another kernel version and non-Linux type could easily install.
 
Old 01-11-2012, 05:54 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,369
Blog Entries: 54

Rep: Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870Reputation: 2870
Quote:
Originally Posted by clcbluemont View Post
it turns out --prefix has no affect on installation.
That is not a problem with RPM but with the configure and generated Makefile. Installing components manually using 'install' in the %install section should be easy as I see you don't need to distribute much.


Quote:
Originally Posted by clcbluemont View Post
I guess a tarball may be a better way to go. Was just hoping that I could build a SRPM in the case where the driver was used with another kernel version and non-Linux type could easily install.
Apparently you're thinking of distributing a LKM. Maybe look into using DKMS? (BTW I hope you've got any %license issues sorted out as Jungo's libwdapi811 isn't distributed under a typical F/OSS license AFAIK.)
 
  


Reply

Tags
rpmbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm -i --prefix=/home/user package.src.rpm doesn't work? registering Linux - Software 2 07-18-2007 11:28 AM
How does RPM work? martian Linux - Software 9 03-09-2006 12:40 PM
rpm doesnt work Xris718 Linux - General 3 02-10-2005 02:26 PM
rpm does not work lapn99 Linux - General 3 07-20-2004 09:39 AM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM


All times are GMT -5. The time now is 11:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration