Bug 188486 - [PATCH] security/openssl build from inside jail
Summary: [PATCH] security/openssl build from inside jail
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: 2014-04-12 00:30 UTC by George Fazio
Modified: 2014-04-12 18: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 George Fazio 2014-04-12 00:30:00 UTC
When attempting to build security/openssl in a jail, installation fails because of a shebang issue.  The jail was created with the ezjail framework of that matters.

Warning: /usr/bin/perl is an invalid shebang you need USES=shebangfix for openssl/misc/tsget

Portupgrade failed the installation because of this.  An attempt was made to run run make from /usr/ports/security/openssl.  This also display the error and failed the installation.

Fix: 

Patch makefile with

54c54
< USES=         perl5
---
> USES=         perl5 shebangfix
58a59
> SHEBANG_FILES=        apps/tsget
How-To-Repeat: Build security/openssl from inside a jail.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-04-12 01:50:32 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

ports PR.
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2014-04-12 01:50:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dinoex

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-04-12 17:58:30 UTC
Author: dinoex
Date: Sat Apr 12 16:58:26 2014
New Revision: 351109
URL: http://svnweb.freebsd.org/changeset/ports/351109
QAT: https://qat.redports.org/buildarchive/r351109/

Log:
  - fix perl path for CURRENT
  PR:		188486

Modified:
  head/security/openssl/files/patch-Configure

Modified: head/security/openssl/files/patch-Configure
==============================================================================
--- head/security/openssl/files/patch-Configure	Sat Apr 12 16:29:28 2014	(r351108)
+++ head/security/openssl/files/patch-Configure	Sat Apr 12 16:58:26 2014	(r351109)
@@ -1,5 +1,5 @@
---- Configure.orig	2012-03-03 14:18:06.000000000 +0100
-+++ Configure	2012-03-25 19:22:16.000000000 +0200
+--- Configure.orig	2014-03-17 17:14:20.000000000 +0100
++++ Configure	2014-04-12 17:20:19.000000000 +0200
 @@ -150,7 +150,7 @@
  # which has to be accompanied by explicit -D_THREAD_SAFE and
  # sometimes -D_REENTRANT. FreeBSD 5.x expands it as -lc_r, which
@@ -9,7 +9,7 @@
  
  #config-string	$cc : $cflags : $unistd : $thread_cflag : $sys_id : $lflags : $bn_ops : $cpuid_obj : $bn_obj : $des_obj : $aes_obj : $bf_obj : $md5_obj : $sha1_obj : $cast_obj : $rc4_obj : $rmd160_obj : $rc5_obj : $wp_obj : $cmll_obj : $modes_obj : $engines_obj : $dso_scheme : $shared_target : $shared_cflag : $shared_ldflag : $shared_extension : $ranlib : $arflags : $multilib
  
-@@ -407,19 +407,20 @@
+@@ -409,19 +409,20 @@
  "android-armv7","gcc:-march=armv7-a -mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  
  #### *BSD [do see comment about ${BSDthreads} above!]
@@ -39,3 +39,16 @@
  
  "bsdi-elf-gcc",     "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
  
+@@ -1922,10 +1923,12 @@
+ 	if ( $perl =~ m@^/@) {
+ 	    &dofile("tools/c_rehash",$perl,'^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";', '^my \$prefix;$', 'my $prefix = "' . $prefix . '";');
+ 	    &dofile("apps/CA.pl",$perl,'^#!/', '#!%s');
++	    &dofile("apps/tsget",$perl,'^#!/', '#!%s');
+ 	} else {
+ 	    # No path for Perl known ...
+ 	    &dofile("tools/c_rehash",'/usr/local/bin/perl','^#!/', '#!%s','^my \$dir;$', 'my $dir = "' . $openssldir . '";',  '^my \$prefix;$', 'my $prefix = "' . $prefix . '";');
+ 	    &dofile("apps/CA.pl",'/usr/local/bin/perl','^#!/', '#!%s');
++	    &dofile("apps/tsget",'/usr/local/bin/perl',,'^#!/', '#!%s');
+ 	}
+ 	if ($depflags ne $default_depflags && !$make_depend) {
+ 		print <<EOF;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2014-04-12 18:01:47 UTC
State Changed
From-To: open->closed



1) security/openssl always builds in a clean jail 

2) I can not reproduce the problem on FreeBSD-9 

3) on removing /usr/bin/perl i see the warning. 

4) openssl has already perl prefix detection.