diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-22 03:56:44 +0000 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-01-22 03:56:44 +0000 |
commit | 8aee1fd032bbfcee3ef0618f683723d119850da0 (patch) | |
tree | 7d493c6eff8dff2e3e5016aeb3bc5e0eca5c932e /reproduce/src/bash | |
parent | 914e101735da4451ac77e7970b1b952afd95c7f4 (diff) |
Using fork of metastore to work when getpwuid isn't usable
After testing the built of Metastore on a server, I noticed that because
its `/etc/passwd' doesn't have the list of users, the `getpwuid' call
within metastore failed and wouldn't let it finish.
So I looked into the code and was able to implement a solution to this
problem by adding two options to it for default values for the user and
group. Also, file attributes are not necessary in our (current) use case of
metastore and caused crashes on our server, so they are also disabled.
Diffstat (limited to 'reproduce/src/bash')
-rw-r--r-- | reproduce/src/bash/git-post-checkout | 2 | ||||
-rw-r--r-- | reproduce/src/bash/git-pre-commit | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/reproduce/src/bash/git-post-checkout b/reproduce/src/bash/git-post-checkout index 4ec2fa6..4c69b2d 100644 --- a/reproduce/src/bash/git-post-checkout +++ b/reproduce/src/bash/git-post-checkout @@ -25,6 +25,6 @@ if [ ! -e "$MSFILE" ]; then fi exit_on_fail \ - @BINDIR@/metastore -a -m -e -E -q -f "$MSFILE" + @BINDIR@/metastore -a -m -e -E -q -O @USER@ -G @GROUP@ -f "$MSFILE" exit 0 diff --git a/reproduce/src/bash/git-pre-commit b/reproduce/src/bash/git-pre-commit index 295c033..4373898 100644 --- a/reproduce/src/bash/git-pre-commit +++ b/reproduce/src/bash/git-pre-commit @@ -31,12 +31,12 @@ exit_on_fail() { } exit_on_fail \ - @BINDIR@/metastore -s -f "$MSFILE" + @BINDIR@/metastore -O @USER@ -G @GROUP@ -s -f "$MSFILE" # If it's first metastore commit, store again to include $MSFILE in $MSFILE. if ! git-ls-tree --name-only HEAD 2>/dev/null | grep -Fqx "$MSFILE"; then exit_on_fail \ - @BINDIR@/metastore -s -f "$MSFILE" + @BINDIR@/metastore -O @USER@ -G @GROUP@ -s -f "$MSFILE" fi if [ ! -e "$MSFILE" ]; then |