-
Notifications
You must be signed in to change notification settings - Fork 712
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
For RAR load, check LD_LIBRARY_PATH before checking install path #1258
For RAR load, check LD_LIBRARY_PATH before checking install path #1258
Conversation
dd70e1e
to
1f0caa2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for also fixing the web link for LoadLibraryA()
1f0caa2
to
2676217
Compare
ClamAV initalization's rarload() function tries to load libclamunrar_iface from the install path before checking under LD_LIBRARY_PATH. This means the unit tests will use the wrong unrar library if testing on a system where ClamAV is already installed. In the event there is an ABI break between versions, this will cause a bunch of tests to fail. This commit fixes the issue by checking for libclamunrar_iface under LD_LIBRARY_PATH *first* before checking in the install lib directory. Note in the previous version we were also checking LD_LIBRARY_PATH on Windows, which is not a thing. I removed this. Fixes: Cisco-Talos#1249 Also removed check for WARN_DLOPEN_FAIL define, which was not used, and mistakenly set for the unrar library build target.
2676217
to
5c6b2d6
Compare
@TheRaynMan could use re-review. I tidied it up further while trying to figure out why there were test failures in Jenkins on Windows. (didn't figure it out, seemed fine to me). Will continue to investigate. |
d560f1d
to
7502682
Compare
Apparently GitHub actions on macOS fails today as well for a couple different reasons. I'm fixing them in this PR as well. |
9f2ca94
to
f6bff52
Compare
Upgrade macOS OpenSSL dependency to use 3 instead of 1.1. Python's pip from Homebrew now refuses to isntall globally: error: externally-managed-environment × This environment is externally managed ╰─> To install Python packages system-wide, try brew install xyz, where xyz is the package you are trying to install. If you wish to install a Python library that isn't in Homebrew, use a virtual environment: python3 -m venv path/to/venv source path/to/venv/bin/activate python3 -m pip install xyz If you wish to install a Python application that isn't in Homebrew, it may be easiest to use 'pipx install xyz', which will manage a virtual environment for you. You can install pipx with brew install pipx You may restore the old behavior of pip by passing the '--break-system-packages' flag to pip, or by adding 'break-system-packages = true' to your pip.conf file. The latter will permanently disable this error. If you disable this error, we STRONGLY recommend that you additionally pass the '--user' flag to pip, or set 'user = true' in your pip.conf file. Failure to do this can result in a broken Homebrew installation. Read more about this behavior here: <https://peps.python.org/pep-0668/> Using Pipx instead. Making the same change for Ubuntu just in case.
f6bff52
to
68b4ab4
Compare
UGH finally found the correct path for brew library installs after github's change to the macOS runners: I also fixed the windows build issues which had to do with the length of the path/commands in our Jenkins and not an actual bug in our code afaict. I solved that by relocating the build directory to be next to the source dir and to use a short directory name. Previously had been longer and in a subdirectory of the source directory. I should be done fussing with this now. |
ClamAV initalization's rarload() function tries to load libclamunrar_iface from the install path before checking under LD_LIBRARY_PATH.
This means the unit tests will use the wrong unrar library if testing on a system where ClamAV is already installed.
In the event there is an ABI break between versions, this will cause a bunch of tests to fail.
This commit fixes the issue by checking for libclamunrar_iface under LD_LIBRARY_PATH first before checking in the install lib directory.
Note in the previous version we were also checking LD_LIBRARY_PATH on Windows, which is not a thing. I removed this.
Fixes: #1249
Also removed check for WARN_DLOPEN_FAIL define, which was not used, and mistakenly set for the unrar library build target.