Bug 226967 - openssl-devel port does not respect PREFIX
Summary: openssl-devel port does not respect PREFIX
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 09:24 UTC by Dmitry Sivachenko
Modified: 2018-04-05 10:04 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 Dmitry Sivachenko freebsd_committer 2018-03-27 09:24:12 UTC
Hello, 
I am trying to install openssl-devel port to non-standard location:

demon@freefall> make DISTDIR=/tmp/ PORT_DBDIR=/tmp PREFIX=/home/demon/local install

I get the following error:

/home/demon/ports/security/openssl-devel/work/stage/usr/local/man/man7/ct.7
/home/demon/ports/security/openssl-devel/work/stage/usr/local/man/man7/des_modes.7
/home/demon/ports/security/openssl-devel/work/stage/usr/local/man/man7/evp.7
/home/demon/ports/security/openssl-devel/work/stage/usr/local/man/man7/x509.7
/usr/bin/strip /home/demon/ports/security/openssl-devel/work/stage/home/demon/local/bin/openssl
strip: open /home/demon/ports/security/openssl-devel/work/stage/home/demon/local/bin/openssl failed: No such file or directory
*** Error code 1

Stop.
make[1]: stopped in /home/demon/ports/security/openssl-devel

As you see, all files are installed under /usr/local/, rather than /home/demon/local as expected.
Comment 1 Bernard Spil freebsd_committer 2018-03-27 12:05:22 UTC
Looking into this.

I assume you also used PREFIX=/home/demon/local with the other make targets?
Comment 2 Bernard Spil freebsd_committer 2018-03-27 12:14:19 UTC
Hi Dmitry,

Error on my part in the port... Fix is trivial

--- Makefile    (revision 465230)
+++ Makefile    (working copy)
@@ -21,7 +21,8 @@
 HAS_CONFIGURE= yes
 CONFIGURE_SCRIPT=      config
 CONFIGURE_ENV= PERL="${PERL}"
-CONFIGURE_ARGS=        --openssldir=${OPENSSLDIR}
+CONFIGURE_ARGS=        --openssldir=${OPENSSLDIR} \
+               --prefix=${PREFIX}

 OPTIONS_GROUP= CIPHERS HASHES OPTIMIZE PROTOCOLS
 OPTIONS_GROUP_CIPHERS= IDEA JPAKE RC2 RC4 RC5

This will land later today together with the security update to 1.1.0h and 1.0.2o
Comment 3 Dmitry Sivachenko freebsd_committer 2018-03-27 12:15:11 UTC
Thanks!
Comment 4 commit-hook freebsd_committer 2018-03-27 15:24:02 UTC
A commit references this bug:

Author: brnrd
Date: Tue Mar 27 15:23:12 UTC 2018
New revision: 465716
URL: https://svnweb.freebsd.org/changeset/ports/465716

Log:
  security/openssl-devel: Security update to 1.1.0h

   - Update to 1.1.0h
   - Fix PREFIX [1]
   - Add DH option (default enabled)
   - Set EC default regardless (no-op if no EC option)
   - Upstream properly creates the symlinks, simplify strip

  PR:		226967 [1]
  Reported by:	demon [1]
  MFH:		2018Q1
  Security:	b7cff5a9-31cc-11e8-8f07-b499baebfeaf

Changes:
  head/security/openssl-devel/Makefile
  head/security/openssl-devel/distinfo
  head/security/openssl-devel/pkg-plist