Bug 50292 - openssl-overwrite-base cannot be upgraded with portupgrade
Summary: openssl-overwrite-base cannot be upgraded with portupgrade
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 17:40 UTC by Angelo Turetta
Modified: 2003-04-16 15:15 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Angelo Turetta 2003-03-25 17:40:20 UTC
portupgrade uses a sequence build-uninstall-reinstall to upgrade a port.
In recent version of openssl port, the Makefile, when the OPENSSL_OVERWRITE_BASE
is defined, looks at the currently installed libcrypto.so.n.
If libcrypto.so.3 exists, it will go on with a targe name of libcrypto.so.3,
otherwise it switches to libcrypto.so.2.
The problem is that when portupgrade invokes 'make build', the makefile builds
libcripto.so.3. Later, after successfull build & uninstall, portupgrade tries to
'make reinstall', but then the makefile tries to install a shared library which
was not built (libcrypto.so.2) because the check mentioned before does not find the .3
shared library, so it goes on with a .2 suffix.

Fix: 

The name to be given to the shared library should be decided during the build phase,
subsequent target should read some permanent setting (a file in work/ ?) in order to
remain consistent with the built version.

Workaround:

cd /usr/ports/security/openssl
make -DOPENSSL_OVERWRITE_BASE package
pkg_deinstall openssl-overwrite-base
pkg_add <name of the package previously created>
How-To-Repeat: cd /usr/ports/security/openssl
make -DOPENSSL_OVERWRITE_BASE build
make -DOPENSSL_OVERWRITE_BASE deinstall
make -DOPENSSL_OVERWRITE_BASE reinstall

or:

portupgrade -m "-DOPENSSL_OVERWRITE_BASE" openssl-overwrite-base
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2003-04-05 20:19:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2003-04-05 21:23:11 UTC
State Changed
From-To: open->feedback

Please try this patch: 

Index: Makefile 
=================================================================== 
RCS file: /home/pcvs/ports/security/openssl/Makefile,v 
retrieving revision 1.81 
diff -u -r1.81 Makefile 
--- Makefile	3 Apr 2003 18:24:52 -0000	1.81 
+++ Makefile	5 Apr 2003 20:24:18 -0000 
@@ -828,10 +828,10 @@ 
.else 
PLIST_SUB+=	SHARED="" 
ALL_TARGET=	freebsd-shared all 
-.if exists(/usr/lib/libcrypto.so.3) 
-SHLIBVER=	4 
-.else 
+.if exists(/usr/lib/libcrypto.so.2) && !exists(/usr/lib/libcrypto.so.3) 
SHLIBVER=	3 
+.else 
+SHLIBVER=	4 
.endif 
MAKE_ENV+=	SHLIBVER=${SHLIBVER} 
PLIST_SUB+=	SHLIBVER=${SHLIBVER} 
@@ -841,10 +841,10 @@ 
.if defined(OPENSSL_OVERWRITE_BASE) 
PKGNAMESUFFIX=	-overwrite-base 
PREFIX=		/usr 
-.if exists(/usr/lib/libcrypto.so.3) 
-SHLIBVER=	3 
-.else 
+.if exists(/usr/lib/libcrypto.so.2) && !exists(/usr/lib/libcrypto.so.3) 
SHLIBVER=	2 
+.else 
+SHLIBVER=	3 
.endif 
OPENSSLDIR=	/etc/ssl 
MANPREFIX=	${PREFIX}/openssl
Comment 3 Dirk Meyer freebsd_committer freebsd_triage 2003-04-16 15:14:28 UTC
State Changed
From-To: feedback->closed

A change has been committed.