Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#572 - OpenSSL STAMP_CONFIGURED can lead to filename too long #5598

Closed
openwrt-bot opened this issue Mar 1, 2017 · 3 comments
Closed

FS#572 - OpenSSL STAMP_CONFIGURED can lead to filename too long #5598

openwrt-bot opened this issue Mar 1, 2017 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Mar 1, 2017

ffainelli:

Build OpenSSL with the default set of options, the STAMP_CONFIGURED line can result in the following:

rm -f /home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_*
touch /home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2
touch: cannot touch '/home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2': File name too long
Makefile:258: recipe for target '/home/fainelli/dev/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/openssl-1.0.2k/.configured_bc7334694fa4b40acb40d6b11be8a816_shared_no-err_no-sse2_no-ssl2_no-ssl2-method_no-heartbeats_no-engines_no-ec2m_no-ssl3_no-ssl3-method_no-hw_no-dtls_no-comp_no-sse2' failed

Which is a filename too long for "touch" from Ubuntu 16.10, coreutils-8.25-2ubuntu2.

OpenSSL .config:

fainelli@fainelli-laptop:[~/../trunk]$ grep -i openssl .config

CONFIG_BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL is not set

CONFIG_PACKAGE_libopenssl=m
CONFIG_OPENSSL_WITH_EC=y

CONFIG_OPENSSL_WITH_EC2M is not set

CONFIG_OPENSSL_WITH_SSL3 is not set

CONFIG_OPENSSL_WITH_DEPRECATED=y

CONFIG_OPENSSL_WITH_DTLS is not set

CONFIG_OPENSSL_WITH_COMPRESSION is not set

CONFIG_OPENSSL_WITH_NPN=y
CONFIG_OPENSSL_WITH_PSK=y
CONFIG_OPENSSL_WITH_SRP=y

CONFIG_OPENSSL_HARDWARE_SUPPORT is not set

CONFIG_OPENSSL_ENGINE_CRYPTO is not set

CONFIG_PACKAGE_libevent2-openssl is not set

CONFIG_PACKAGE_libustream-openssl is not set

CONFIG_PACKAGE_openvpn-openssl is not set

CONFIG_PACKAGE_openssl-util=m

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 1, 2017

ffainelli:

Proposed fix:

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 73811e16da97..1aa0677d0d10 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -168,7 +168,7 @@ else
endif
endif

-STAMP_CONFIGURED := $(STAMP_CONFIGURED)$(subst $(space),,$(OPENSSL_OPTIONS))
+STAMP_CONFIGURED := $(STAMP_CONFIGURED)_$(subst $(space),,$(patsubst no-%,n,$(OPENSSL_OPTIONS)))

define Build/Configure
[ -f $(STAMP_CONFIGURED) ] || { \

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 1, 2017

hnyman:

Or maybe something similar as in:

"rules.mk: make PKG_CONFIG_DEPENDS properly track string values"

https://git.lede-project.org/?p=source.git;a=commitdiff;h=5ef0854b1109ba2dbd1dd3d9f87ce5801002d0ba;hp=d49ddcdfd27ba3d171b856f223712b88d5fc2046

After that commit the hash of the configure options string is added, instead of the cleartext options string. (That is the bc7334694fa4b40acb40d6b11be8a816 in the above example's filename)

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Mar 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant