From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6680483261914808320 X-Received: by 2002:a05:651c:c3:: with SMTP id 3mr16858045ljr.8.1556098064745; Wed, 24 Apr 2019 02:27:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:6505:: with SMTP id z5ls1718219ljb.15.gmail; Wed, 24 Apr 2019 02:27:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7uLUGKTi+KGsh4wyJKuW32O4jNnYYBXnIwceMprBCqCTVlsuhrZnk0JAZrOWHLIGy72ty X-Received: by 2002:a2e:8446:: with SMTP id u6mr16840111ljh.71.1556098064228; Wed, 24 Apr 2019 02:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556098064; cv=none; d=google.com; s=arc-20160816; b=hWmI1urgpENhbGzDt2QjkxsSkTODh0+1aD409tGvBw+950bE4+fuIdPXX5JqcRM3EB K9OAo1gQx9sudbiScs+x3VZr34QnrOnNCoF3kekVSW6XPfrhN3HPxyx7XcXlLhuT4x/3 8HxO2Z+gMfwryt55PiDBcBKTPDDBp+rRe47XnGvCjFLsnSOvDHJ+NAt28phY9BLXMOT8 uA8jeJe0AP6UD4+beHSIaJUxZZPvuJuBT8DdFeXEX4ivtYQlK26z9sQPa494JdNb+ZIK 2KHTPy9bvIPVC9Hjxzv+RXzpuo4/SqVJ9VVMf0aGDxr0DuwPP/oBk5o2m2uY/HrapD2y Nsqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=wFXxIm2Z8c1E90s4VcUWMUbirQFgkEX4v3rv5h5bJ3s=; b=wa0iUw5svMh4zU3wAObUjyuKZ9D3dxsIRTpgRZvekQIRsJxPqyG0MOliGEUF4iO00O F9SYD9akcqBJz7dosKAfjWa6/x3C/gjHFB8BoSdAuLIL0oKf727E0Tq7EMbQ6cU0XoeO EMxxEu6yDNYEir+EGi/lI+I6U5L4aaEyCcFn7K5X7+Hk6jT2sRuKwLzeJhWIHKxly8iy f0pgGCZ59e7rXNcZcsWKT8IBmISLmHu71E/7Oj6K8CALX7Nfr5ruq7fO7KvNBv30ivUz NVNVsU3lMETDZTDsTqZpwi6+JPOvdEjaaExmVv7/Rkz9Ggzk1g2uxDyODljpQsakFx2j k7AQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id o16si928119lji.0.2019.04.24.02.27.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 02:27:44 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x3O9RhjL026105 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Apr 2019 11:27:43 +0200 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x3O9Rflu018534; Wed, 24 Apr 2019 11:27:43 +0200 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [PATCH v3 8/8] buildchroot/configscript: make creation of builder uid/gid idempotent Date: Wed, 24 Apr 2019 11:27:34 +0200 Message-Id: <20190424092734.14167-9-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190424092734.14167-1-claudius.heine.ext@siemens.com> References: <20190424092734.14167-1-claudius.heine.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: ru0K0cvdR6yT From: Claudius Heine Signed-off-by: Claudius Heine --- meta/recipes-devtools/buildchroot/files/configscript.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/buildchroot/files/configscript.sh b/meta/recipes-devtools/buildchroot/files/configscript.sh index 25a21ef..c4d8cf8 100644 --- a/meta/recipes-devtools/buildchroot/files/configscript.sh +++ b/meta/recipes-devtools/buildchroot/files/configscript.sh @@ -10,6 +10,6 @@ locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8 locales locales/default_environment_locale select en_US.UTF-8 END -groupadd --system builder -o --gid $2 -useradd --system -o --uid $1 --gid builder --no-create-home --home /home/builder --no-user-group --comment "Isar buildchroot build user" builder +grep -q "builder:x:$2" /etc/group || groupadd -f --system builder -o --gid $2 +grep -q "builder:x:$1" /etc/passwd || useradd --system -o --uid $1 --gid builder --no-create-home --home /home/builder --no-user-group --comment "Isar buildchroot build user" builder chown -R builder:builder /home/builder -- 2.20.1