PDA

View Full Version : rebuilding openssl1-1.0.1g-0.16.1.src.rpm



shawn_protsman
10-Jul-2014, 18:00
The libopenssl1-1.0.1g-0.16.1.rpm package installs into /usr/lib64 so you end up with both the old and newer versions of OpenSSL. The RPM is not relocatable, so I cannot simply change the install prefix.

/usr/lib64/libssl.so.0.9.8
/usr/lib64/libssl.so.1.0.0

This is fine, but I'd like to have 1.0.1g in a completely different location. I grabbed the source RPM hoping I could build 1.0.1g and have it install in another directory, but I'm not having much luck. I've tried things like this:



$ rpmbuild --rebuild --define '_prefix /tmp/opt/suse' --define '_libdir /tmp/opt/suse/lib64' --define '_openssldir /tmp/opt/suse/etc' --define '_mandir /tmp/opt/suse/share/man' --define '_includedir /tmp/opt/suse/include' --define '_docdir /tmp/opt/suse/share/doc' --define '_bindir /tmp/opt/suse/bin' openssl1-1.0.1g-0.16.1.src.rpm


This results in RPM build errors. What is the proper way of rebuilding this source RPM so that the installation RPMs can be installed in a different directory? :confused:

malcolmlewis
10-Jul-2014, 18:32
On Thu 10 Jul 2014 05:04:02 PM CDT, shawn protsman wrote:


The libopenssl1-1.0.1g-0.16.1.rpm package installs into /usr/lib64 so
you end up with both the old and newer versions of OpenSSL. The RPM is
not relocatable, so I cannot simply change the install prefix.

/usr/lib64/libssl.so.0.9.8
/usr/lib64/libssl.so.1.0.0

This is fine, but I'd like to have 1.0.1g in a completely different
location. I grabbed the source RPM hoping I could build 1.0.1g and have
it install in another directory, but I'm not having much luck. I've
tried things like this:


Code:
--------------------

$ rpmbuild --rebuild --define '_prefix /tmp/opt/suse' --define
'_libdir /tmp/opt/suse/lib64' --define '_openssldir /tmp/opt/suse/etc'
--define '_mandir /tmp/opt/suse/share/man' --define
'_includedir /tmp/opt/suse/include' --define
'_docdir /tmp/opt/suse/share/doc' --define '_bindir /tmp/opt/suse/bin'
openssl1-1.0.1g-0.16.1.src.rpm --------------------


This results in RPM build errors. What is the proper way of rebuilding
this source RPM so that the installation RPMs can be installed in a
different directory? :confused:




Hi
Use the Open Build Service to upload your sources and modify the spec
file, else install the src rpm and modify the spec file down
in /usr/src/packages (note install src rpm as root, but all your
modifying and building as your user).

--
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE 13.1 (Bottle) (x86_64) GNOME 3.10.1 Kernel 3.11.10-17-desktop
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!

shawn_protsman
10-Jul-2014, 19:25
Malcolm, thanks. While trying to resolve this I did end up editing the openssl1.spec file, but was hoping to avoid having to do this for the sake of maintainability.

What that accomplished is hunting for and changing lines to take care of package build errors that appear.

For the sake of clarity, this is an example of what I'm trying to do ...

RPM from SUSE:
$ rpm -qlp ~/tmp/openssl-1.0.1g-0.16.1/libopenssl1_0_0-1.0.1g-0.16.1.x86_64.rpm
/usr/lib64/engines1
/usr/lib64/engines1/lib4758cca.so
/usr/lib64/engines1/libcapi.so
/usr/lib64/engines1/libgmp.so
/usr/lib64/engines1/libgost.so
/usr/lib64/engines1/libpadlock.so
/usr/lib64/libcrypto.so.1.0.0
/usr/lib64/libssl.so.1.0.0

What I'm trying to accomplish:
$ rpm -qlp ~/tmp/openssl-1.0.1g-0.16.1/libopenssl1_0_0-1.0.1g-0.16.1.x86_64.rpm
/opt/suse/ssl/lib64/engines1
/opt/suse/ssl/lib64/engines1/lib4758cca.so
/opt/suse/ssl/lib64/engines1/libcapi.so
/opt/suse/ssl/lib64/engines1/libgmp.so
/opt/suse/ssl/lib64/engines1/libgost.so
/opt/suse/ssl/lib64/engines1/libpadlock.so
/opt/suse/ssl/lib64/libcrypto.so.1.0.0
/opt/suse/ssl/lib64/libssl.so.1.0.0

smflood
15-Jul-2014, 12:25
On 10/07/2014 18:04, shawn protsman wrote:

> The libopenssl1-1.0.1g-0.16.1.rpm package installs into /usr/lib64 so
> you end up with both the old and newer versions of OpenSSL. The RPM is
> not relocatable, so I cannot simply change the install prefix.

Since you have posted in a forum for SUSE Linux Enterprise Server (SLES)
which version of SLES are you using?

As I'm not aware of a packaged version of OpenSSL 1.0.x available from
SUSE for SLES I suspect that you're actually using a version of openSUSE
in which case you should instead post @ https://forums.opensuse.org/

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------

shawn_protsman
15-Jul-2014, 17:24
Hi Simon,

SLES 11 SP3. They have posted a 1.0.1 RPM.

RPM: https://nu.novell.com/repo/$RCE/SLE11-Security-Module/sle-11-x86_64/rpm/x86_64/
SRPM: https://nu.novell.com/repo/$RCE/SLE11-Security-Module/sle-11-x86_64/rpm/src/