LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Create RPM from tarball. (https://www.linuxquestions.org/questions/linux-software-2/create-rpm-from-tarball-919576/)

dezavu 12-19-2011 05:50 PM

Create RPM from tarball.
 
Hi,

I have a tarball of powerbroker software but don't have SPEC file & need to create RPM form it.
It will be very helpful if someone help me for this.


Thanks & Regards.
Vijay

jailbait 12-19-2011 08:48 PM

Is your tarball source code or executable code? If it is source code you can unpack the tarball and then compile it into a RPM package using checkinstall. You can get an explanation of how checkinstall works here:

http://asic-linux.com.mx/~izto/checkinstall/

-------------------
Steve Stites

dezavu 12-23-2011 04:11 AM

Hi,
In our case the provided "tarball" doesn't have the source code. We have created the following SPEC file.
Quote:

[root@bourne ~]# cat /usr/src/redhat/SPECS/pb.spec
# Author Vijay Rane
Name: COF_Powerbroker
Version: 6.2.0
Release: 09%{?dist}
Summary: Powerbroker
Source: /usr/src/redhat/SOURCES/us_lin64_prod_client.tar.gz
License: Commercial
Group: System Environment/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}

%description
This package is of Powerbroker-6.2.0 as per Company standard.

%prep
echo Building %{name}-%{version}-%{release}
%setup -q

%build

%install
sh install.sh

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_mandir}/%{name}
%{_htmldir}/%{name}


%clean
rm -rf $RPM_BUILD_ROOT

%changelog
*Wed Dec 21 2011 Vijay Rane <Vijay.Rane@xyz.com> 6.2
-Initial SPEC File
But using this SPEC file we are getting the following error:

Quote:

+ /usr/lib/rpm/brp-compress
/usr/lib/rpm/brp-compress: line 8: cd: /var/tmp/COF_Powerbroker-6.2.0-09: No such file or directory
+ /usr/lib/rpm/brp-strip
find: /var/tmp/COF_Powerbroker-6.2.0-09: No such file or directory
+ /usr/lib/rpm/brp-strip-static-archive
find: /var/tmp/COF_Powerbroker-6.2.0-09: No such file or directory
+ /usr/lib/rpm/brp-strip-comment-note
find: /var/tmp/COF_Powerbroker-6.2.0-09: No such file or directory
Processing files: COF_Powerbroker-6.2.0-09
error: File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/bin/COF_Powerbroker
error: File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/lib64/COF_Powerbroker
error: File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/share/man/COF_Powerbroker
error: File must begin with "/": %{_htmldir}/COF_Powerbroker
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/COF_Powerbroker-6.2.0-09


RPM build errors:
File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/bin/COF_Powerbroker
File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/lib64/COF_Powerbroker
File not found: /var/tmp/COF_Powerbroker-6.2.0-09/usr/share/man/COF_Powerbroker
File must begin with "/": %{_htmldir}/COF_Powerbroker
The provided "tarball" has the following content;

dr-xr-xr-x 2 root root 4096 Sep 27 2010 bin
dr-xr-xr-x 3 root root 4096 Sep 27 2010 examples
dr-xr-xr-x 2 root root 4096 Sep 27 2010 html
dr-xr-xr-x 2 root root 4096 Sep 27 2010 install
-rwx------ 1 root root 93 Dec 22 09:41 install.sh
dr-xr-xr-x 2 root root 4096 Sep 27 2010 lib
dr-xr-xr-x 4 root root 4096 Sep 27 2010 man
-r--r--r-- 1 root root 11061 Sep 27 2010 MANIFEST
-rw-r----- 1 root root 1026 Dec 14 13:06 pb.key
-rw-r----- 1 root root 3657 Dec 14 13:10 pb.settings
dr-xr-xr-x 3 root root 4096 Sep 27 2010 thirdparty


Could you please help me, where I am getting wrong?

Thanks & Regards,
Vijay


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