Hi!
I'm newbie at building on Linux.
My first project is to build rpms on a build machine with build software ("Development Tools" group, cmake, openssl-devel, etc.) then install them on another machine which acts something like a production machine (no build tools).
The newly built software should be installed on application directories such as /tools/prod/. As a result the production machine would have multiple versions of the same software (ex. OpenSSH) on the machine.
I was able to build and create an rpm for openssh:
Code:
[percyy@build ~]$ ls -l /tools/build/rpmbuild/RPMS/x86_64/
total 1244
-rw-rw-r--. 1 percyy percyy 423072 Sep 23 21:59 openssh-6.7p1-1.x86_64.rpm
-rw-rw-r--. 1 percyy percyy 461764 Sep 23 21:59 openssh-clients-6.7p1-1.x86_64.rpm
-rw-rw-r--. 1 percyy percyy 17072 Sep 23 21:59 openssh-debuginfo-6.7p1-1.x86_64.rpm
-rw-rw-r--. 1 percyy percyy 363848 Sep 23 21:59 openssh-server-6.7p1-1.x86_64.rpm
[percyy@build ~]$
These packages were build with only the "Prefix" value as a modification to the spec file.
Code:
Prefix: /tools/prod
Result:
Code:
[percyy@build ~]$ rpm -qpi /tools/build/rpmbuild/RPMS/x86_64/openssh-*.rpm | grep Reloc
Relocations : /tools/prod
Relocations : /tools/prod
Relocations : /tools/prod
Relocations : /tools/prod
[percyy@build ~]$
But when installing this on the production machine, I get the following error:
Code:
[percyy@cent7 ~]$ sudo rpm -ivh --prefix /tools/prod /home/percyy/openssh-6.7p1-1.x86_64.rpm
Preparing... ################################# [100%]
package openssh-7.4p1-12.el7_4.x86_64 (which is newer than openssh-6.7p1-1.x86_64) is already installed
file /etc/ssh/moduli from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-7.4p1-12.el7_4.x86_64
file /usr/bin/ssh-keygen from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-7.4p1-12.el7_4.x86_64
file /usr/libexec/openssh/ssh-keysign from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-7.4p1-12.el7_4.x86_64
file /usr/share/man/man1/ssh-keygen.1.gz from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-7.4p1-12.el7_4.x86_64
file /usr/share/man/man8/ssh-keysign.8.gz from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-7.4p1-12.el7_4.x86_64
file /usr/bin/scp from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-clients-7.4p1-12.el7_4.x86_64
file /usr/libexec/openssh/ssh-pkcs11-helper from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-clients-7.4p1-12.el7_4.x86_64
file /usr/share/man/man1/scp.1.gz from install of openssh-6.7p1-1.x86_64 conflicts with file from package openssh-clients-7.4p1-12.el7_4.x86_64
[percyy@cent7 ~]$
I thought that I can install all the files on a single location (/tools/prod) just by adding the Prefix value in the spec file during build. Apparently this is not enough.
What else do I need to do?
TIA.