Monday, January 30, 2012

RPM Bulding Part 1


Alright folks, I am going to attempt to build a RPM package from one of my source packages. The first one I am going to attempt is proxyknife. So first we need to install these packages:

- yum groupinstall "Fedora Packager" 
- yum install rpmlint yum-utils 

Now after that we can create the rpm directories where we can work in by typing this command:

- rpmdev-setuptree 

After that is finished we can now start to work on our RPM, first we need to copy our source tarball to ~/rpmbuild/SOURCES 

- cp proxykinfe-1.7.tar.gz ~/rpmbuild/SOURCES

Now go into the SPECS directory so we can create the spec file to build the RPM:

- cd ~/rpmbuild/SPECS

In the SPECS directory we can now make the skeleton spec file for us to modify:

- rpmdev-newspec proxyknife

So with the skeleton spec file, I did some small configuration to the file to get it up and running then issued the command to build the RPM:

- rpmbuild -ba proxyknife.spec

In the beginning everything was going okay until the end where I got these bunch of errors: 


cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Customize-Request.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Index.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Sort-the-Result.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/index.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Command_002dline-Exclusive-Options.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Output.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Invoking.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Examples-of-startup-file.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Via-Proxy.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Startup-Options.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/General-Usage.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Introduction.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/GNU-Free-Documentation-License.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Copying-Source-Code.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Startup-File.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Contact.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Advanced.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Download-Proxylist.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Proxylist.html': Permission denied
cp: cannot remove `/usr/share/proxyknife/doc/html/proxyknife.html/Copying-This-Manual.html': Permission denied
make[2]: *** [install-data-local] Error 1
make[2]: Leaving directory `/home/chris/rpmbuild/BUILD/proxyknife-1.7/doc'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/chris/rpmbuild/BUILD/proxyknife-1.7/doc'
make: *** [install-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.ef2HEI (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.ef2HEI (%install)


My overall thoughts on why this is happening is maybe because I needed to be root to install this source program last time? This could be the issue why it keeps failing.

After doing some editing to my spec file I still was getting that error. After looking at the errors logs it looks like it keeps erasing the documents during the end of the make part and it is getting permission denied, that is the reason why my RPM is not building. Maybe a little more research on the issue might help so I am going to leave it as it is for now until I get some solid answers to tackle my issue.

No comments:

Post a Comment