Blame SOURCES/rear-bz1692575.patch

b650a9
diff -up rear-2.4/usr/share/rear/conf/GNU/Linux.conf.empty rear-2.4/usr/share/rear/conf/GNU/Linux.conf
b650a9
--- rear-2.4/usr/share/rear/conf/GNU/Linux.conf.empty	2019-09-10 09:45:50.381285069 +0200
b650a9
+++ rear-2.4/usr/share/rear/conf/GNU/Linux.conf	2019-09-10 09:45:50.421284309 +0200
b650a9
@@ -276,6 +276,6 @@ COPY_AS_IS_EXCLUDE=( "${COPY_AS_IS_EXCLU
b650a9
 # some stuff for the Linux command line
b650a9
 KERNEL_CMDLINE="$KERNEL_CMDLINE selinux=0"
b650a9
 # common users and groups
b650a9
-CLONE_USERS=( "${CLONE_USERS[@]:-}" daemon rpc usbmuxd usbmux vcsa nobody dbus )
b650a9
-CLONE_GROUPS=( "${CLONE_GROUPS[@]:-}" tty usbmuxd usbmux fuse kvm oinstall dbus )
b650a9
+CLONE_USERS+=( daemon rpc usbmuxd usbmux vcsa nobody dbus )
b650a9
+CLONE_GROUPS+=( tty usbmuxd usbmux fuse kvm oinstall dbus )
b650a9
 
b650a9
diff -up rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh.empty rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh
b650a9
--- rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh.empty	2018-06-21 10:40:53.000000000 +0200
b650a9
+++ rear-2.4/usr/share/rear/rescue/default/900_clone_users_and_groups.sh	2019-09-10 09:45:50.421284309 +0200
b650a9
@@ -40,6 +40,8 @@ local group=""
b650a9
 # because it should succeed when there is any non-empty array member, not necessarily the first one:
b650a9
 test "${CLONE_USERS[*]}" && Log "Cloning users: ${CLONE_USERS[@]}"
b650a9
 for user in "${CLONE_USERS[@]}" ; do
b650a9
+    # Skip empty user values, cf. https://github.com/rear/rear/issues/2220
b650a9
+    test $user || continue
b650a9
     # Skip if the user exists already in the ReaR recovery system:
b650a9
     grep -q "^$user:" $ROOTFS_DIR/etc/passwd && continue
b650a9
     # Skip if the user does not exist in the current system:
b650a9
@@ -78,6 +80,8 @@ done
b650a9
 # because it should succeed when there is any non-empty array member, not necessarily the first one:
b650a9
 test "${CLONE_GROUPS[*]}" && Log "Cloning groups: ${CLONE_GROUPS[@]}"
b650a9
 for group in "${CLONE_GROUPS[@]}" ; do
b650a9
+    # Skip empty group values, cf. https://github.com/rear/rear/issues/2220
b650a9
+    test $group || continue
b650a9
     # Skip if the group exists already in the ReaR recovery system:
b650a9
     grep -q "^$group:" $ROOTFS_DIR/etc/group && continue
b650a9
     # Skip if the group does not exist in the current system: