Patchwork [STABLE] dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977)

login
register
mail settings
Submitter Mathias De Maré
Date Dec. 7, 2015, 5:07 p.m.
Message ID <b880f92e6ca788469d0b.1449508039@waste.org>
Download mbox | patch
Permalink /patch/11904/
State Accepted
Headers show

Comments

Mathias De Maré - Dec. 7, 2015, 5:07 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1449506371 -3600
#      Mon Dec 07 17:39:31 2015 +0100
# Branch stable
# Node ID b880f92e6ca788469d0b585628be579e17166c4a
# Parent  7e1fac6c0a9ce6afd3edeed5e47bcca343155d8a
dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977)

CentOS 5 does not support '--non-unique', but does support the short '-o'.
Pierre-Yves David - Dec. 7, 2015, 6:40 p.m.
On 12/07/2015 09:07 AM, Mathias De Maré wrote:
> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1449506371 -3600
> #      Mon Dec 07 17:39:31 2015 +0100
> # Branch stable
> # Node ID b880f92e6ca788469d0b585628be579e17166c4a
> # Parent  7e1fac6c0a9ce6afd3edeed5e47bcca343155d8a
> dockerlib: short form for non-unique uid/gid for CentOS 5 compat (issue4977)

Pushed to the clowncopter, thanks

Patch

diff --git a/contrib/dockerlib.sh b/contrib/dockerlib.sh
--- a/contrib/dockerlib.sh
+++ b/contrib/dockerlib.sh
@@ -35,8 +35,8 @@ 
         # running docker. This is *very likely* to fail at some point.
         echo RUN useradd $DBUILDUSER -u 1000
     else
-        echo RUN groupadd $DBUILDUSER -g `id -g` --non-unique
-        echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER --non-unique
+        echo RUN groupadd $DBUILDUSER -g `id -g` -o
+        echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER -o
     fi
   ) | $DOCKER build --tag $CONTAINER -
 }