debian: Remove gecos field when adding user
Remove the the gecos option when running the adduser command. This will cause the following issue when running build-image: Setting up docker-registry (2.7.1+ds2-7.stx.1) ... Adding system user `docker-registry' (UID 108) ... Adding new group `docker-registry' (GID 114) ... Adding new user `docker-registry' (UID 108) with group `docker-registry' ... chfn: PAM: Critical error - immediate abort adduser: `/bin/chfn -f Docker Registry docker-registry' returned error code 1. Exiting. dpkg: error processing package docker-registry (--configure): installed docker-registry package post-installation script subprocess returned error exit status 1 This is due to the fact that debootstrap does not like to run chfn since its setuid. Testing: Apply the patch and run the build-image. The build-image process should not fail with the above error. Story: 2009221 Task: 43631 Signed-off-by: Charles Short <charles.short@windriver.com> Change-Id: Iefe9465b17543627e86fb6797eae678359541b34
This commit is contained in:
parent
0439fdc89a
commit
a2cae4b9b6
|
@ -0,0 +1,28 @@
|
|||
From 4b27111fbe6b626d08e212eb48693a228da203bc Mon Sep 17 00:00:00 2001
|
||||
From: Charles Short <charles.short@windriver.com>
|
||||
Date: Tue, 7 Dec 2021 18:49:39 +0000
|
||||
Subject: [PATCH] Do not set gecos when creating user
|
||||
|
||||
Remove the gecos creation since it causes issue while running
|
||||
debootstrap.
|
||||
|
||||
Signed-off-by: Charles Short <charles.short@windriver.com>
|
||||
---
|
||||
debian/docker-registry.postinst | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/debian/docker-registry.postinst b/debian/docker-registry.postinst
|
||||
index 96ded3c..13df951 100755
|
||||
--- a/debian/docker-registry.postinst
|
||||
+++ b/debian/docker-registry.postinst
|
||||
@@ -7,7 +7,6 @@ if [ "$1" = 'configure' ]; then
|
||||
--home /var/lib/docker-registry \
|
||||
--no-create-home \
|
||||
--group \
|
||||
- --gecos 'Docker Registry' \
|
||||
docker-registry
|
||||
fi
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
|
@ -1 +1,2 @@
|
|||
0001-update-paths-and-service.patch
|
||||
0002-no-gecos.patch
|
||||
|
|
Loading…
Reference in New Issue