Refactor GaussDB Driver Installation into Reusable, Idempotent Script #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request refactors the GaussDB driver installation process by moving the installation logic from the README.rst into a standalone, reusable, and idempotent Bash script (
tools/install_gaussdb_driver.sh). The script automates the download, extraction, and configuration of the GaussDB driver, supporting multiple operating systems (HCE, CentOS, Euler, Kylin) and architectures (x86_64, aarch64). The refactoring improves maintainability, reduces duplication, and ensures consistent driver installation across different environments.The changes also include a merge of the latest updates from the
masterbranch to ensure compatibility.Changes Made
install_gaussdb_driver.shscript.libpqin the linker cache.masterbranch into the current branch.Testing
install_gaussdb_driver.shscript on the following environments:uname -moutput.libpqregistration.sh tools/install_gaussdb_driver.sh) works as expected.masterdoes not introduce conflicts or regressions.Additional Notes
wget,unzip,tar, andldconfigare installed on the target system. It includes checks for these dependencies and exits with an error if any are missing./tmp/gaussdb_driver_install_*.log) for debugging and auditing purposes.sudo) to modify/etc/ld.so.confand executeldconfig.