hooks
hooks copied to clipboard
KB-H053 INVALID SYMLINKS: actually breaks valid symlinks
Without this hook installed, I can build and install libressl (https://github.com/conan-io/conan-center-index/pull/2933).
conan create . libressl/2.9.2@
Symlinks are correct:
~/.conan/data/libressl/2.9.2/_/_/package/2af715f34a7c8c2aeae57b25be0a52c4110dc502/lib$ ll
total 2788
drwxrwxr-x 2 spaceim spaceim 4096 sept. 16 17:54 ./
drwxrwxr-x 5 spaceim spaceim 4096 sept. 16 17:54 ../
lrwxrwxrwx 1 spaceim spaceim 15 sept. 16 17:54 libcrypto.so -> libcrypto.so.45
lrwxrwxrwx 1 spaceim spaceim 19 sept. 16 17:54 libcrypto.so.45 -> libcrypto.so.45.4.0
-rw-r--r-- 1 spaceim spaceim 2320672 sept. 16 17:54 libcrypto.so.45.4.0
lrwxrwxrwx 1 spaceim spaceim 12 sept. 16 17:54 libssl.so -> libssl.so.47
lrwxrwxrwx 1 spaceim spaceim 16 sept. 16 17:54 libssl.so.47 -> libssl.so.47.5.0
-rw-r--r-- 1 spaceim spaceim 435344 sept. 16 17:54 libssl.so.47.5.0
lrwxrwxrwx 1 spaceim spaceim 12 sept. 16 17:54 libtls.so -> libtls.so.19
lrwxrwxrwx 1 spaceim spaceim 16 sept. 16 17:54 libtls.so.19 -> libtls.so.19.6.0
-rw-r--r-- 1 spaceim spaceim 85608 sept. 16 17:54 libtls.so.19.6.0
If this hook is installed, the same recipe breaks at installation time:
conan create . libressl/2.9.2@
[HOOK - conan-center.py] post_package(): [PACKAGE LICENSE (KB-H012)] OK
[HOOK - conan-center.py] post_package(): [DEFAULT PACKAGE LAYOUT (KB-H013)] OK
[HOOK - conan-center.py] post_package(): [MATCHING CONFIGURATION (KB-H014)] OK
[HOOK - conan-center.py] post_package(): [SHARED ARTIFACTS (KB-H015)] OK
[HOOK - conan-center.py] post_package(): [PC-FILES (KB-H020)] OK
[HOOK - conan-center.py] post_package(): [CMAKE-MODULES-CONFIG-FILES (KB-H016)] OK
[HOOK - conan-center.py] post_package(): [PDB FILES NOT ALLOWED (KB-H017)] OK
[HOOK - conan-center.py] post_package(): [LIBTOOL FILES PRESENCE (KB-H018)] OK
[HOOK - conan-center.py] post_package(): [MS RUNTIME FILES (KB-H021)] OK
libressl/2.9.2: ERROR: file 'lib/libtls.so' links to a path that doesn't exist, it's been removed.
[HOOK - conan-center.py] post_package(): ERROR: [INVALID SYMLINKS (KB-H053)] There are symlinks in the package pointing outside the package_folder. You can use 'tools.fix_symlinks(self)' to fix some of these symlinks. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H053)
ERROR: The file is a broken symlink, verify that you are packaging the needed destination files: '/home/spaceim/.conan/data/libressl/2.9.2/_/_/package/2af715f34a7c8c2aeae57b25be0a52c4110dc502/lib/libcrypto.so'.You can skip this check adjusting the 'general.skip_broken_symlinks_check' at the conan.conf file
Then I see that symlinks have been modified (libtls.so has been removed, and others modified but are completly broken), probably by this hook I guess:
~/.conan/data/libressl/2.9.2/_/_/package/2af715f34a7c8c2aeae57b25be0a52c4110dc502/lib$ ll
total 2788
drwxrwxr-x 2 spaceim spaceim 4096 sept. 16 18:03 ./
drwxrwxr-x 5 spaceim spaceim 4096 sept. 16 18:03 ../
lrwxrwxrwx 1 spaceim spaceim 19 sept. 16 18:03 libcrypto.so -> lib/libcrypto.so.45
lrwxrwxrwx 1 spaceim spaceim 23 sept. 16 18:03 libcrypto.so.45 -> lib/libcrypto.so.45.4.0
-rw-r--r-- 1 spaceim spaceim 2320672 sept. 16 18:03 libcrypto.so.45.4.0
lrwxrwxrwx 1 spaceim spaceim 16 sept. 16 18:03 libssl.so -> lib/libssl.so.47
lrwxrwxrwx 1 spaceim spaceim 20 sept. 16 18:03 libssl.so.47 -> lib/libssl.so.47.5.0
-rw-r--r-- 1 spaceim spaceim 435344 sept. 16 18:03 libssl.so.47.5.0
lrwxrwxrwx 1 spaceim spaceim 20 sept. 16 18:03 libtls.so.19 -> lib/libtls.so.19.6.0
-rw-r--r-- 1 spaceim spaceim 85608 sept. 16 18:03 libtls.so.19.6.0
So I suppose that this hook is buggy, but also intrusive which is worse.