LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RPM vs Source (https://www.linuxquestions.org/questions/linux-newbie-8/rpm-vs-source-126610/)

dvong3 12-17-2003 07:46 AM

RPM vs Source
 
How do I know if my installation is using the rpm or source code files? I upgraded my ssh using source code, which you manually compile the code (make, make install). I notice one change, the configuration file is now located in /usr/local/etc & sbin & etc. The original ssh is rpm located /etc/ssh.

My question; Is my ssh using the new version or still using the old rpm version? How do I verify?

openssh-3.7p1-- source code
openssh-3.1p1-13 --- rpm

dingding66 12-17-2003 08:04 AM

If you just used the default ./configure without passing --prefix=/usr to it then it defaulted to install in /usr/local instead of /usr. If /usr/local/bin is not in your PATH$ then you're most likely still calling the old version. Try starting it from the command line with --version after it. Most programs recognize this and will output the version and exit. Hope that helps.

dvong3 12-17-2003 08:25 AM

How do you know where should you place the ssh files /usr/ or default? Yes /usr/local/bin is already in my PATH. Where do I type the command --version? What is the whole command?

dingding66 12-17-2003 08:55 AM

I was just looking at mine and I guess it doesn't recognize --version (grumble grumble) so that way won't work. if you rpm -e openssh (in a terminal, as root) it will remove the rpm of the old version, leaving you with the newer version which you installed from source. Since /usr/local is in your PATH$ then it will be found/used.

Generally, if you're upgrading something that was originally an rpm and now you're building it from source the best way to do it is to remove the rpm package first.

Something you may want to look into if you're going to build from source is a program called 'checkinstall.' http://asic-linux.com.mx/~izto/checkinstall/ it will create an .rpm (or a .deb or a .tgz) which can be installed/uninstalled (it's explained on their site) from the source code. Since I've found it I use it all the time. Quite a handy little tool.

As to whether you should put the ssh in /usr or /usr/local, as long as it's in your PATH$ and the lib directory (/usr/local/lib) is in /etc/ld.so.conf you're fine just using /usr/local. (if /usr/local/lib is not in /etc/ld.so.conf, add it (open it in a text editor as root), save it, then run (as root) ldconfig.)

dvong3 12-17-2003 09:28 AM

Build source to rpm....I'll check it out.

unSpawn 12-17-2003 09:45 AM

Apart from that, the OpenSSH tarball does contain a spec file, which means you could do "rpm -tb openssh-3.71p2.tar.gz" and generate the binary rpm.
Use "-ta" to generate .rpm's and .src.rpm's.

dvong3 12-18-2003 02:46 AM

Unspawn...i try both command, I get an error message.

[root@mrtg2 /tmp]# rpm -ta openssh-3.7.1p2.tar.gz
error: File /tmp/x11-ssh-askpass-1.2.4.1.tar.gz: No such file or directory

dvong3 12-18-2003 07:17 AM

dingding.....I downloaded the binary in RPM. I notice checkinstall file created on /usr/doc. I'm a little puzzle with the README instructions. Do we created a running scripts??

[root@mrtg2 tmp]# checkinstall -R openssl-0.9.6l.tar.gz

checkinstall 1.5.3, Copyright 2001 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]: y

Preparing package documentation...OK

*** No known documentation files were found. The new package
*** won't include a documentation directory.

Installing with "openssl-0.9.6l.tar.gz"...

========================= Installation results ===========================
/var/tmp/phVVqRRHhZQTkCAdNPRD/installscript.sh: openssl-0.9.6l.tar.gz: command not found

**** Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

dingding66 12-18-2003 11:11 AM

To use the checkinstall:

tar zxvf openssl-0.9.6l.tar.gz
cd openssl-0.9.6l
./configure --prefix=/usr
make
su
(root password)
checkinstall

then it will ask a few things... it needs a description (you can just say openssl and hit enter twice or if you want to be more descriptive you can), you'll want to choose "R" for an RPM package. It will then give you a summary and you just hit Enter to continue.

unSpawn 12-18-2003 01:22 PM

Its a separate tarball, see http://www.jmknoble.net/software/x11-ssh-askpass/.

dvong3 12-19-2003 06:07 AM

dingding...checkinstall works real good but I run into a problem, missing a file when I restart my sshd.

What do you guys think what happen to the file?

[root@mrtg2 sbin]# ./sshd start

./sshd: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory

unSpawn 12-19-2003 06:41 AM

Try to find out:
Binary linkage: running "ldd /usr/sbin/sshd |grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Linker cache: running "ldconfig -p|grep crypt" should show "libcrypt.so.1 => /lib/libcrypt.so.1". Stat or "file /lib/libcrypt.so.1" should show "/lib/libcrypt.so.1: symbolic link to libcrypt-(version).so"

If running "file" doesn't show the file, then you need to install it (part of Glibc AFAIK). If "ldconfig" doesnt show it but you have the file, then you need to run "ldconfig" to update the linker cache.

dvong3 12-19-2003 07:05 AM

OK...My ssh was working before until I upgraded to a new version...where can I find the Glibc AFAIK?


[danny@mrtg2 danny]# ldconfig -p|grep crypt
libk5crypto.so.3 (libc6) => /usr/kerberos/lib/libk5crypto.so.3
libcrypto.so.0 (libc6) => /usr/lib/libcrypto.so.0
libcrypt.so.1 (libc6, OS ABI: Linux 2.2.5) => /lib/libcrypt.so.1
libcrypt.so (libc6, OS ABI: Linux 2.2.5) => /usr/lib/libcrypt.so

[danny@mrtg2 danny]# ldd /usr/sbin/sshd |grep crypt
libcrypto.so.1 => not found
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40050000)

[danny@mrtg2 danny]# ldconfig
[danny@mrtg2 danny]# /etc/init.d/sshd restart
Stopping sshd:[FAILED]
Starting sshd:/usr/sbin/sshd: error while loading shared libraries: libcrypto.so.1: cannot open shared object file: No such file or directory
[FAILED]
[danny@mrtg2 danny]#

dingding66 12-19-2003 09:10 AM

Which distribution are you using?

First, run updatedb as root then do
locate lybcrypto.so.1
It should have been installed as part of openssl. If it is found, make note of the location then:
1) as root, edit /etc/ld.so.conf
2) add the path to the directory containing lybcrypto.so.1
(for example, if locate tells you it's in /usr/local/lib/libcrypto.so.1 you would add /usr/local/lib)
3) save and exit
4) as root, run ldconfig

dvong3 12-19-2003 12:35 PM

I download openssh & openssl from openssh.org & openssl.org site. I follow your checkinstall instruction and select R.

I try your steps to locate the file.


All times are GMT -5. The time now is 01:57 AM.