Skip to contentSkip to conversation

fix host-openssl binary installation

PATCH New Matthew Shyu 2 participants 6 messages Feb 17, 2016 – Feb 19, 2016

lore
Share & tools
lore
#0 lore raw

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
index b7498a7..c35e93f 100644
@@ -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
#1 lore raw

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 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.

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
---
 package/openssl/openssl.mk |    1 +
 1 file changed, 1 insertion(+)
package/openssl/openssl.mk +1 -0
index b7498a7..c35e93f 100644
@@ -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
#2 lore raw

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_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.

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_PREFIX to 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_PREFIX env 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
index b7498a7..c35e93f 100644
@@ -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>

#3 lore raw

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_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.

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 5 lines

Yes, the INSTALL_PREFIX env 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 
#4 lore raw

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_prefix from env by

default

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

$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.

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_PREFIX to 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_PREFIX env is passed in from buildroot. However, as you said, it points to output/staging/usr. For host variant, the

correct

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) install

endef

define HOST_OPENSSL_INSTALL_CMDS

        $(MAKE) -C $(@D) install

endef

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_rehash

endef

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>

#5 lore raw

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 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

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 exporting INSTALL_PREFIX during 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