diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-03 00:47:22 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-03 00:47:22 -0400 |
commit | 682dca8fd09fd2fec335dc98f2cd4279c56f65b2 (patch) | |
tree | 2de1d85aa936802d943d6469682b4e9853176cb1 | |
parent | c61e40582a5016963ad8ed0b06cfee3d8cb66a34 (diff) |
Don't allow LC_COLLATE to reorder the .etckeeper file. Closes: #489057
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | pre-commit.d/30store-metadata | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 638926f..c4b65a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ etckeeper (0.18) UNRELEASED; urgency=low * Allow AVOID_COMMIT_BEFORE_INSTALL to be set to zero to disable. + * Don't allow LC_COLLATE to reorder the .etckeeper file. Closes: #489057 -- Joey Hess <joeyh@debian.org> Sun, 29 Jun 2008 12:56:10 -0400 diff --git a/pre-commit.d/30store-metadata b/pre-commit.d/30store-metadata index bed2d89..243e019 100755 --- a/pre-commit.d/30store-metadata +++ b/pre-commit.d/30store-metadata @@ -1,7 +1,6 @@ #!/bin/sh set -e - # Filters out UNKNOWN users and groups, prints a warning on stderr. filter_unknown() { CMD=$1 @@ -15,7 +14,6 @@ filter_unknown() { done } - generate_metadata() { # This function generates the script commands to fix any files # that aren't owner=root, group=root, or mode=0644 or 0755. @@ -25,6 +23,10 @@ generate_metadata() { # but we want find to ignore the VCS files themselves. NOVCS='. -wholename ./.git -prune -o -wholename ./.bzr -prune -o -wholename ./.hg -prune -o' + # Keep the sort order the same at all times. + LC_COLLATE=C + export LC_COLLATE + if [ "$VCS" = git ] || [ "$VCS" = hg ]; then # These version control systems do not track directories, # so empty directories must be stored specially. @@ -52,7 +54,6 @@ generate_metadata() { # Maybe check for getfattr/setfattr and use them if they're available? } - if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ]; then if [ -f .metadata ]; then # remove obsolete .metadata file |