Skip to content

Commit

Permalink
Merge pull request #1321 from cfengine/ENT-10739/3.21
Browse files Browse the repository at this point in the history
ENT-10739: Improved locale env vars safety during installation for postgresql (3.21)
  • Loading branch information
craigcomstock authored Oct 13, 2023
2 parents 3ccbcd5 + f2103b4 commit 5b92fa7
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions packaging/common/script-templates/script-common.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# These can have bad effects on certain commands if set incorrectly. Found
# when investigating why PostgreSQL was not starting.
unset LANG
unset LC_ADDRESS
unset LC_ALL
unset LC_IDENTIFICATION
unset LC_MEASUREMENT
unset LC_MONETARY
unset LC_NAME
unset LC_NUMERIC
unset LC_PAPER
unset LC_TELEPHONE
unset LC_TIME


# postgresql docs, https://www.postgresql.org/docs/current/locale.html, recommend using C locale unless otherwise needed
export LC_ALL=C # overrides all other env vars: https://www.gnu.org/software/libc/manual/html_node/Locale-Categories.html
# Upgrade detection is a mess. It is often difficult to tell, especially from
# the postinstall script, so we use the package-upgrade.txt file to remember.
case "$PKG_TYPE" in
Expand Down

0 comments on commit 5b92fa7

Please sign in to comment.