[Piuparts-commits] [piuparts] 05/08: post_setup_dummy_users: skip regular users when testing dpsyco*
Holger Levsen
holger at layer-acht.org
Wed May 3 13:40:17 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit f2b6c517dc0e177a6e9ad5d85306106afb6c51a0
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue May 2 19:41:07 2017 +0200
post_setup_dummy_users: skip regular users when testing dpsyco*
may kill host processes of non-system users existing in the chroot
favorite targets: piupartss, piupartsm
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
custom-scripts/scripts/post_setup_dummy_users | 9 ++++++++-
debian/changelog | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/custom-scripts/scripts/post_setup_dummy_users b/custom-scripts/scripts/post_setup_dummy_users
index 0b930e4..a8c9ff9 100755
--- a/custom-scripts/scripts/post_setup_dummy_users
+++ b/custom-scripts/scripts/post_setup_dummy_users
@@ -1,14 +1,21 @@
#!/bin/sh
set -e
+sys_ids=$(seq 100 149)
+usr_ids=$(seq 1000 1010)
+
case ${PIUPARTS_OBJECTS%%=*} in
TARBALL)
# skip while creating the tarball
exit 0
;;
+ dpsyco*)
+ # may kill processes of these users on the host if they exist in the chroot
+ usr_ids=
+ ;;
esac
-for id in $(seq 100 149) $(seq 1000 1010)
+for id in $sys_ids $usr_ids
do
getent group $id > /dev/null || groupadd --system -g $id dummy$id
getent passwd $id > /dev/null || useradd --system -u $id -g 100 dummy$id
diff --git a/debian/changelog b/debian/changelog
index 8f18cec..8eb5775 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -44,6 +44,7 @@ piuparts (0.77) UNRELEASED; urgency=medium
once per month.
* custom-scripts: Check for dummy package "TARBALL" to detect tarball
creation phase.
+ * scripts/post_setup_dummy_users: Skip regular users when testing dpsyco*.
* scripts/post_distupgrade_base_cleanup: Remove (transitional) sysvinit from
stretch. (Closes: #860819)
* scripts/pre_distupgrade_exceptions:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list