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. |
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'?..
|
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. |
Quote:
Quote:
|
All times are GMT -5. The time now is 01:00 PM. |