Hello Folks,
I have been trying to create an RPM for two days now and I think I have gone retarded or something because I can not get rpmbuild to actually generate an rpm.
The RPM I want to create is really just a bunch of files that need to get placed into a directory and then have an install script ran against them.
Here is a snipit out of a script I wrote that extracts and installs the software:
Code:
/bin/mount -t iso9660 /tmp/SecWorld-linux64-user-12.10.00.iso /mnt -o loop
for f in `find /mnt/linux/libc6_11/amd64/nfast/ -name '*.tar' `; do tar xvf $f; done
fi
# Move everything into the right places
/bin/mv /opt/nfast /ngs/app/nfast
# Link Everything up
/bin/ln -s /ngs/app/nfast/ /opt/nfast
# Actually install the software
/ngs/app/nfast/sbin/install
so basicly find some tars - extract them - move them to the correct location - run the installer. I would like to do this in an RPM and it seems like that should be a trivial task....not for me apparently.
Here is the latest in my endevours:
I created my env:
Code:
ls rpmbuild/
BUILD BUILDROOT nfast-1.0 nfast-1.0.tar.gz RPMS SOURCES SPECS SRPMS tmp
Then:
Code:
~/rpmbuild]$ ll nfast-1.0/ngs/app/nfast/
total 68
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 bin
drwxr-xr-x 3 myuser dev-group 4096 Feb 29 2016 driver
drwxr-xr-x 3 myuser dev-group 4096 Feb 29 2016 etc
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 femcerts
drwxr-xr-x 5 myuser dev-group 4096 Feb 29 2016 java
drwxr-xr-x 5 myuser dev-group 4096 Feb 29 2016 lib
drwxr-xr-x 4 myuser dev-group 4096 Feb 29 2016 nethsm-firmware
drwxr-xr-x 3 myuser dev-group 4096 Feb 29 2016 openssl
drwxr-xr-x 9 myuser dev-group 4096 Feb 29 2016 python
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 sbin
drwxr-xr-x 8 myuser dev-group 4096 Feb 29 2016 scripts
drwxr-xr-x 5 myuser dev-group 4096 Feb 29 2016 share
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 sslclient
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 sslproxy
drwxr-xr-x 5 myuser dev-group 4096 Feb 29 2016 tcl
drwxr-xr-x 2 myuser dev-group 4096 Feb 29 2016 testdata
drwxr-xr-x 6 myuser dev-group 4096 Feb 29 2016 toolkits
Here is my spec.file
Code:
more SPECS/nfast.spec
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{_dbpath}/brp-compress
Summary: Sinple nFast rpm
Name: nfast
Version: 1.0
Release: 1
License: GPL+
Group: App/Tools
SOURCE0 : %{name}-%{version}.tar.gz
URL: http://no.company.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description
%{summary}
%prep
%setup -q
%build
# Empty section.
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
# in builddir
cp -ar * %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_datadir}/ngs/app/nfast
%changelog
* Thu May 26 2017 What Eva <whateva@blah.org> 1.0-1
- First Build
Then I give myself one of these:
Code:
rpmbuild -bb rpmbuild/SPECS/nfast.spec
And.....fail.
Code:
[myuser@team-server1 ~]$ rpmbuild -bb rpmbuild/SPECS/nfast.spec
Executing(%prep): /bin/sh -e /ngs/app/home/myuser/rpmbuild/tmp/rpm-tmp.WqYjas
+ umask 022
+ cd /ngs/app/home/myuser/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /ngs/app/home/myuser/rpmbuild/BUILD
+ rm -rf nfast-1.0
+ /bin/tar -xf -
+ /usr/bin/gzip -dc /ngs/app/home/myuser/rpmbuild/SOURCES/nfast-1.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nfast-1.0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /ngs/app/home/myuser/rpmbuild/tmp/rpm-tmp.i0P5sd
+ umask 022
+ cd /ngs/app/home/myuser/rpmbuild/BUILD
+ cd nfast-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /ngs/app/home/myuser/rpmbuild/tmp/rpm-tmp.WKUaNY
+ umask 022
+ cd /ngs/app/home/myuser/rpmbuild/BUILD
+ '[' /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64 '!=' / ']'
+ rm -rf /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
++ dirname /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
+ mkdir -p /ngs/app/home/myuser/rpmbuild/BUILDROOT
+ mkdir /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
+ cd nfast-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
+ mkdir -p /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
+ cp -ar ngs /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64
Processing files: nfast-1.0-1.x86_64
error: File not found: /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64/usr/share/ngs/app/nfast
RPM build errors:
File not found: /ngs/app/home/myuser/rpmbuild/BUILDROOT/nfast-1.0-1.x86_64/usr/share/ngs/app/nfast
[myuser@team-server1 ~]$ rpmbuild -bb rpmbuild/SPECS/nfast.spec
Any help and or ideas would be super great. I have tried various different spec's and I am just missing something.
Thanks in advance!