fix host-openssl binary installation
PATCH 1/1 fix host-openssl binary installation
From: Matthew Shyu <[email protected]>
The Configure script in openssl takes install_prefix from env by default $install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, the INSTALL_PREFIX points to *TARGET* folder instead of *HOST* folder.
This is fixed by intentionally setting install_prefix to blank.
--- package/openssl/openssl.mk | 1 + 1 file changed, 1 insertion(+)
package/openssl/openssl.mk +1 -0
@@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS $(HOST_CONFIGURE_OPTS) \ ./config \ --prefix=$(HOST_DIR)/usr \ + --install_prefix= \ --openssldir=$(HOST_DIR)/etc/ssl \ --libdir=/lib \ shared \
Signature · 1 line
1.7.9.5
PATCH 1/1 fix host-openssl binary installation
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matthew" == Matthew Shyu <[email protected]> writes:
From: Matthew Shyu <[email protected]>
The Configure script in openssl takesinstall_prefixfrom env by default $install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, theINSTALL_PREFIXpoints to *TARGET* folder instead of *HOST* folder.
This is fixed by intentionally settinginstall_prefixto blank.
Sorry, I'm not following you here. Do you mean that you have exported INSTALL_PREFIX=<something> in your environment outside Buildroot? We do indeed pass INSTALL_PREFIX to make install when we install the target version to staging/target, but I don't see the relation to the host variant?
Quoted 24 lines
Signed-off-by Matthew Shyu <[email protected]>--- package/openssl/openssl.mk | 1 + 1 file changed, 1 insertion(+)package/openssl/openssl.mk +1
-0@@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS $(HOST_CONFIGURE_OPTS) \ ./config \ --prefix=$(HOST_DIR)/usr \ + --install_prefix= \ --openssldir=$(HOST_DIR)/etc/ssl \ --libdir=/lib \ shared \Signature · 6 lines
1.7.9.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 fix host-openssl binary installation
Hi Peter,
Quoted 10 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matthew" == Matthew Shyu <[email protected]
Quoted 6 lines · <javascript:;>> writes:
From: Matthew Shyu <[email protected] <javascript:;>> The Configure script in openssl takes
install_prefixfrom env by default $install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, theINSTALL_PREFIXpoints to *TARGET* folder instead of *HOST* folder.
This is fixed by intentionally settinginstall_prefixto blank.
Quoted 7 lines
Sorry, I'm not following you here. Do you mean that you have exported INSTALL_PREFIX=<something> in your environment outside Buildroot? We do indeed pass
INSTALL_PREFIXto make install when we install the target version to staging/target, but I don't see the relation to the host variant?Yes, the
INSTALL_PREFIXenv is passed in from buildroot. However, as
you said, it points to output/staging/usr. For host variant, the correct installation path should be output/host/usr, which is set by --prefix. The idea of this patch is for host-openssl not to use --install-prefix but to use --prefix.
Quoted 21 lines
Quoted 20 lines
Signed-off-by Matthew Shyu <[email protected] <javascript:;>>--- package/openssl/openssl.mk | 1 + 1 file changed, 1 insertion(+)package/openssl/openssl.mk +1
-1@@ -63,6 +63,7 @@ define HOST_OPENSSL_CONFIGURE_CMDS $(HOST_CONFIGURE_OPTS) \ ./config \ --prefix=$(HOST_DIR)/usr \ + --install_prefix= \ --openssldir=$(HOST_DIR)/etc/ssl \ --libdir=/lib \ shared \ --1.7.9.5
Quoted 9 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net <javascript:;>
http://lists.busybox.net/mailman/listinfo/buildroot--
Bye, Peter Korsgaard
Regards,
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160218/c159dbe7/attachment.html>
PATCH 1/1 fix host-openssl binary installation
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"matthew" == matthew amlogic shyu <[email protected]> writes:
Hi,
Quoted 12 lines
Quoted 11 lines
Quoted 5 lines
The Configure script in openssl takes
install_prefixfrom env by default $install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, theINSTALL_PREFIXpoints to *TARGET* folder instead of *HOST* folder.
This is fixed by intentionally settinginstall_prefixto blank.Sorry, I'm not following you here. Do you mean that you have exported INSTALL_PREFIX=<something> in your environment outside Buildroot? We do indeed pass
INSTALL_PREFIXto make install when we install the target version to staging/target, but I don't see the relation to the host variant?
Quoted 5 lines
Yes, the
INSTALL_PREFIXenv is passed in from buildroot. However, as you said, it points to output/staging/usr. For host variant, the correct installation path should be output/host/usr, which is set by --prefix. The idea of this patch is for host-openssl not to use --install-prefix but to use --prefix.
But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the make-install-to-staging step, and not when we configure/build/install the host variant:
define OPENSSL_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
endef
define HOST_OPENSSL_INSTALL_CMDS
$(MAKE) -C $(@D) install
endef
define OPENSSL_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl rm -f $(TARGET_DIR)/usr/bin/c_rehash
endef
So I'm still not sure what you are trying to solve?
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH 1/1 fix host-openssl binary installation
2016-02-19 18:18 GMT+08:00 Peter Korsgaard <[email protected]>:
Quoted 40 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"matthew" == matthew amlogic shyu <[email protected]>
writes:
Hi,
Quoted 1 line
Quoted 1 line
Quoted 1 line
The Configure script in openssl takes
install_prefixfrom env bydefault
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
$install_prefix= "$ENV{'INSTALL_PREFIX'}"
However, theINSTALL_PREFIXpoints to *TARGET* folder instead of *HOST* folder.
This is fixed by intentionally settinginstall_prefixto blank.Quoted 8 lines
Quoted 5 lines
Sorry, I'm not following you here. Do you mean that you have exported INSTALL_PREFIX=<something> in your environment outside Buildroot? We do indeed pass
INSTALL_PREFIXto make install when we install the target version to staging/target, but I don't see the relation to the host variant?Yes, the
INSTALL_PREFIXenv is passed in from buildroot. However, as you said, it points to output/staging/usr. For host variant, thecorrect
Quoted 1 line
installation path should be output/host/usr, which is set by --prefix.
The
Quoted 1 line
idea of this patch is for host-openssl not to use --install-prefix but
to
Quoted 1 line
use --prefix.
But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the make-install-to-staging step, and not when we configure/build/install the host variant:
define
OPENSSL_INSTALL_STAGING_CMDS$(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) installendef
define
HOST_OPENSSL_INSTALL_CMDS$(MAKE) -C $(@D) installendef
define
OPENSSL_INSTALL_TARGET_CMDS
Quoted 8 lines
$(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl rm -f $(TARGET_DIR)/usr/bin/c_rehashendef
So I'm still not sure what you are trying to solve?
Ha, you're right!
I found that I have a stupid package inside my Buildroot tree that's exporting INSTALL_PREFIX during the build and thus messing up my environment.
There's nothing wrong with host-openssl package.
My bad. Sorry.
Quoted 4 lines
--
Venlig hilsen,
Peter Korsgaard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160219/818deaa6/attachment.html>
PATCH 1/1 fix host-openssl binary installation
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"matthew" == matthew amlogic shyu <[email protected]> writes:
Hi,
Quoted 18 lines
Quoted 18 lines
But we only pass INSTALL_PREFIX=$(STAGING_DIR)/usr during the make-install-to-staging step, and not when we configure/build/install the host variant:
define
OPENSSL_INSTALL_STAGING_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install endefdefine
HOST_OPENSSL_INSTALL_CMDS
$(MAKE) -C $(@D) install
endefdefine
OPENSSL_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install rm -rf $(TARGET_DIR)/usr/lib/ssl
rm -f $(TARGET_DIR)/usr/bin/c_rehash
endef
Quoted 7 lines
Quoted 1 line
So I'm still not sure what you are trying to solve?
Ha, you're right!
I found that I have a stupid package inside my Buildroot tree that's exportingINSTALL_PREFIXduring the build and thus messing up my environment.
There's nothing wrong with host-openssl package.
Ahh, that explains it ;)
Quoted 1 line
My bad. Sorry.
No problem. I've marked you patch as rejected in patchwork.
Signature · 2 lines
Venlig hilsen, Peter Korsgaard