Patchwork D11767: dockerrpm: always use current user and group

login
register
mail settings
Submitter phabricator
Date Nov. 17, 2021, 12:49 p.m.
Message ID <differential-rev-PHID-DREV-7yxiou7y7mhz6kyzqk54-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50092/
State Superseded
Headers show

Comments

phabricator - Nov. 17, 2021, 12:49 p.m.
Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Using uid 1000 and gid 1000 works by default in some cases,
  but 'id -u' and 'id -g' should work in all cases.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11767

AFFECTED FILES
  contrib/packaging/dockerrpm

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/contrib/packaging/dockerrpm b/contrib/packaging/dockerrpm
--- a/contrib/packaging/dockerrpm
+++ b/contrib/packaging/dockerrpm
@@ -18,13 +18,8 @@ 
 
 CONTAINER=hg-docker-$PLATFORM
 
-if [[ -z "${HG_DOCKER_OWN_USER}" ]]; then
-    DOCKERUID=1000
-    DOCKERGID=1000
-else
-    DOCKERUID=$(id -u)
-    DOCKERGID=$(id -g)
-fi
+DOCKERUID=$(id -u)
+DOCKERGID=$(id -g)
 
 $BUILDDIR/hg-docker build \
     --build-arg UID=$DOCKERUID \