commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] Debian GNU Hurd packaging branch, master, updated. debian/20110319


From: Samuel Thibault
Subject: [SCM] Debian GNU Hurd packaging branch, master, updated. debian/20110319-1-3-g15bf1a6
Date: Mon, 21 Mar 2011 16:39:26 +0000

The following commit has been merged in the master branch:
commit 15bf1a61e07f611f954c7e9872cb46e717ab574b
Author: Samuel Thibault <address@hidden>
Date:   Mon Mar 21 17:38:49 2011 +0100

    Use useradd instead of adduser to fix debootstrap
    
      * debian/hurd.postinst: use useradd from required passwd package instead 
of
        adduser, which is not required and thus not available at debootstrap.
      * debian/control: Bump Standards-Version to 3.9.1 (no change needed).

diff --git a/debian/changelog b/debian/changelog
index 873dacb..a26c246 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+hurd (20110319-2) unstable; urgency=low
+
+  * debian/hurd.postinst: use useradd from required passwd package instead of
+    adduser, which is not required and thus not available at debootstrap.
+  * debian/control: Bump Standards-Version to 3.9.1 (no change needed).
+
+ -- Samuel Thibault <address@hidden>  Mon, 21 Mar 2011 17:33:19 +0100
+
 hurd (20110319-1) unstable; urgency=low
 
   [ Samuel Thibault ]
diff --git a/debian/control b/debian/control
index 4aadcf9..5f30274 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: hurd
 Section: admin
 Priority: required
 Maintainer: GNU Hurd Maintainers <address@hidden>
-Standards-Version: 3.8.4
+Standards-Version: 3.9.1
 Build-Depends: mig (>= 1.3-2), gnumach-dev (>= 2:1.3.99.dfsg.cvs20070526),
  libc0.3-dev (>= 2.9), texinfo, texi2html, libncursesw5-dev, cdbs,
  debhelper (>= 4.2.0), gcc-4.4, dpkg (>= 1.15.4) | install-info,
diff --git a/debian/hurd.postinst b/debian/hurd.postinst
index 98945ee..965f8ab 100644
--- a/debian/hurd.postinst
+++ b/debian/hurd.postinst
@@ -20,12 +20,36 @@ update-alternatives \
 update-alternatives \
        --install /usr/bin/w w /usr/bin/w-hurd 60
 
+ADDUSERCONF='/etc/adduser.conf'
+
+if test -f $ADDUSERCONF; then
+    FIRST_SYSTEM_UID=$(sed -n 
"s/^[[:space:]]*FIRST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
 $ADDUSERCONF)
+    LAST_SYSTEM_UID=$(sed -n 
"s/^[[:space:]]*LAST_SYSTEM_UID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
 $ADDUSERCONF)
+    FIRST_SYSTEM_GID=$(sed -n 
"s/^[[:space:]]*FIRST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
 $ADDUSERCONF)
+    LAST_SYSTEM_GID=$(sed -n 
"s/^[[:space:]]*LAST_SYSTEM_GID[[:space:]]*=[[:space:]]*[\"']\?\([^\"']*\)[\"']\?/\1/p"
 $ADDUSERCONF)
+fi
+
+if test -z "$FIRST_SYSTEM_UID"; then
+    FIRST_SYSTEM_UID=100
+fi
+if test -z "$LAST_SYSTEM_UID"; then
+    LAST_SYSTEM_UID=999
+fi
+if test -z "$FIRST_SYSTEM_GID"; then
+    FIRST_SYSTEM_GID=100
+fi
+if test -z "$LAST_SYSTEM_GID"; then
+    LAST_SYSTEM_GID=999
+fi
+
 if [ "$1" = configure ]; then
   add-shell /bin/loginpr || true
   if ! getent passwd login >/dev/null; then
-    adduser --disabled-password  --quiet --system \
-      --home /etc/login --no-create-home --shell /bin/loginpr \
-      --gecos "login user" --group login
+    useradd -K UID_MIN=$FIRST_SYSTEM_UID -K UID_MAX=$LAST_SYSTEM_UID \
+      -K GID_MIN=$FIRST_SYSTEM_GID -K GID_MAX=$LAST_SYSTEM_GID \
+      --home-dir /etc/login --no-create-home \
+      --shell /bin/loginpr --comment "login user" \
+      --user-group login
   fi
 fi
 

-- 
Debian GNU Hurd packaging



reply via email to

[Prev in Thread] Current Thread [Next in Thread]