RPM Build Mystery I finished writing PHP scrips that adds a web based interface to my Linux systemto perform bare metal backup. However, since then (two days), I have been struggling to build an RPM out of these scripts so that it is easy to distribute it. I read a lot of documentation online already and finally managed to create the RPM without any errors. But when I try to install the RPM, it is not doing its job. All, I want to do with the RPM is to copy three files to the respective locations in /etc/ and /var/log
I would *really* appreciate if some one can help me please.
This is how my spec look like:
Name: cc-test
Version: 1.1
Release: 12
Group: System Environment/Base
Packager: Home
Summary: Bare metal backup restore
Vendor: Home
License: GPL
Source: %{name}-%{version}.tar.gz
Buildroot: /tmp/%{name}-%{version}
%description
Bare metal backup restore
%prep
%setup -q
%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 iBook $RPM_BUILD_ROOT/usr/bin/iBook
install -m 644 IBM $RPM_BUILD_ROOT/usr/bin/IBM
install -m 644 IBM /var/webconfig/IBM
%files
%attr(-,mkhan,mkhan)
/usr/bin/iBook
/usr/bin/IBM
I use "rpmbuild --define "_topdir /home/mkhan/rpms" -ba cc-test.spec" to create the RPM, and both the rpm and src.rpm files get created Okay. Below is the output:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.94845
+ umask 022
+ cd /home/mkhan/rpms/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/mkhan/rpms/BUILD
+ rm -rf cc-test-1.1
+ tar -xf /home/mkhan/rpms/SOURCES/cc-test-1.1.tar.gz
+ cd cc-test-1.1
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.94845
+ umask 022
+ cd /home/mkhan/rpms/BUILD
+ cd cc-test-1.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir -p /tmp/cc-test-1.1/usr/bin
+ install -m 755 iBook /tmp/cc-test-1.1/usr/bin/iBook
+ install -m 644 IBM /tmp/cc-test-1.1/usr/bin/IBM
+ install -m 644 IBM /var/webconfig/IBM
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: cc-test-1.1-12
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/cc-test-1.1
Wrote: /home/mkhan/rpms/SRPMS/cc-test-1.1-12.src.rpm
Wrote: /home/mkhan/rpms/RPMS/i386/cc-test-1.1-12.i386.rpm
I use "sudo rpm --force -ivh cc-test-1.1-12.i386.rpm" to install the RPM on a CentOS file server. And this is the output that I get:
Preparing... ########################################### [100%]
1:cc-test ########################################### [100%]
But when I go to /var/webconfig/ directory, the 'IBM' file is not copied.
I'm really frustrated with building and RPM, and would really appreciate some help.
thank you,
mkhan |