Hello community,

here is the log from the commit of package clone-master-clean-up for 
openSUSE:Factory checked in at 2020-08-18 12:00:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/clone-master-clean-up (Old)
 and      /work/SRC/openSUSE:Factory/.clone-master-clean-up.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "clone-master-clean-up"

Tue Aug 18 12:00:25 2020 rev:3 rq:827375 version:1.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/clone-master-clean-up/clone-master-clean-up.changes  
    2019-10-16 09:18:43.166936529 +0200
+++ 
/work/SRC/openSUSE:Factory/.clone-master-clean-up.new.3399/clone-master-clean-up.changes
    2020-08-18 12:02:51.303421929 +0200
@@ -1,0 +2,11 @@
+Wed Aug 12 15:44:30 UTC 2020 - [email protected]
+
+- Bump version to 1.6
+- cleanup salt client ID and osad authentication configuration
+  file and the system ID
+  (bsc#1174147)
+- change the path of the template file in the comments of
+  custom_remove.template and clone-master-clean-up.sh
+  (jsc#TEAM-490)
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ clone-master-clean-up.spec ++++++
--- /var/tmp/diff_new_pack.CqxcHS/_old  2020-08-18 12:02:52.411422080 +0200
+++ /var/tmp/diff_new_pack.CqxcHS/_new  2020-08-18 12:02:52.415422082 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package clone-master-clean-up
 #
-# Copyright (c) 2017-2019 SUSE LLC
+# Copyright (c) 2017-2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,12 +17,12 @@
 
 
 Name:           clone-master-clean-up
-Version:        1.5
+Version:        1.6
 Release:        0
 Summary:        Tool to clean up a system for cloning preparation
 License:        GPL-2.0-or-later
 Group:          System/Management
-Url:            https://www.suse.com
+URL:            https://www.suse.com
 Source0:        clone-master-clean-up.sh
 Source1:        clone-master-clean-up.1
 Source2:        sysconfig.clone-master-clean-up

++++++ clone-master-clean-up.1 ++++++
--- /var/tmp/diff_new_pack.CqxcHS/_old  2020-08-18 12:02:52.515422095 +0200
+++ /var/tmp/diff_new_pack.CqxcHS/_new  2020-08-18 12:02:52.519422095 +0200
@@ -91,6 +91,12 @@
 .IP \[bu]
 Systemd journal.
 .IP \[bu]
+machine ID.
+.IP \[bu]
+Salt client ID.
+.IP \[bu]
+osad authentication configuration file and the system ID.
+.IP \[bu]
 Domain and host names.
 .IP \[bu]
 /etc/hostname, /etc/hosts, /etc/resolv.conf are restored to original.

++++++ clone-master-clean-up.sh ++++++
--- /var/tmp/diff_new_pack.CqxcHS/_old  2020-08-18 12:02:52.535422098 +0200
+++ /var/tmp/diff_new_pack.CqxcHS/_new  2020-08-18 12:02:52.535422098 +0200
@@ -17,7 +17,7 @@
 [ "$UID" != "0" ] && echo 'Please run this program as root user.' && exit 1
 
 echo 'The script will delete all SSH keys, log data, and more. Type YES and 
enter to proceed.'
-read answer
+read -r answer
 [ "$answer" != "YES" ] && exit 1
 
 # source config file
@@ -29,7 +29,7 @@
 fi
 
 echo 'Wiping active swap devices/files (this may take a while)'
-while read swap_name discard; do
+while read -r swap_name discard; do
   uuid=$(env $(blkid -o export "$swap_name") printenv UUID)
   echo "Turning off swap device/file $swap_name (UUID $uuid)"
   swapoff "$swap_name"
@@ -78,8 +78,17 @@
 mv journald.conf.bak journald.conf
 popd > /dev/null
 
-echo 'Clearing systemd machine ID file'
+echo 'Clearing machine ID file'
+# on distributions that support systemd
 truncate -s 0 /etc/machine-id
+# on distributions that do not support systemd
+[ ! -f /etc/machine-id ] && truncate -s 0 /var/lib/dbus/machine-id
+
+echo 'Removing Salt client ID'
+[ -f /etc/salt/minion_id ] && rm -f /etc/salt/minion_id
+
+echo 'Removing osad authentication configuration file and the system ID'
+rm -f /etc/sysconfig/rhn/{osad-auth.conf,systemid}
 
 echo 'Removing domain name and set host name from DHCP in network config'
 sed -i 
's/^NETCONFIG_DNS_STATIC_SEARCHLIST=.*$/NETCONFIG_DNS_STATIC_SEARCHLIST=""/g' 
/etc/sysconfig/network/config
@@ -181,7 +190,7 @@
 fi
 
 echo 'Would you like to give root user a new password? Type YES to set a new 
password, otherwise simply press Enter.'
-read answer
+read -r answer
 [ "$answer" == "YES" ] && passwd root
 
 if [ "$CMCU_EC2" = "yes" ]; then
@@ -196,22 +205,22 @@
 
 if [ "$CMCU_USERIDS" = "yes" ]; then
     echo "clean up user ids >= 1000"
-    for i in `awk -F ":" '$3 >= 1000 && $1 !~ /nobody/ {print $1}' 
/etc/passwd`; do
-        userdel -r $i
+    for i in $(awk -F ":" '$3 >= 1000 && $1 !~ /nobody/ {print $1}' 
/etc/passwd); do
+        userdel -r "$i"
     done
 fi
 
 echo "swap the uuid strings with dev strings in /etc/fstab"
 > /tmp/fstab.tmp
-while read disk remain; do
+while read -r disk remain; do
     case "$disk" in
     UUID=*)
         uuid=${disk#UUID=}
-        new_disk=`/usr/sbin/blkid -U $uuid`
+        new_disk=$(/usr/sbin/blkid -U "$uuid")
         ;;
     LABEL=*)
         label=${disk#LABEL=}
-        new_disk=`/usr/sbin/blkid -L $label`
+        new_disk=$(/usr/sbin/blkid -L "$label")
         ;;
     *)
         new_disk="$disk"
@@ -226,11 +235,11 @@
 
 echo "Clean up network files (except interfaces using dhcp boot protocol)"
 # additional files like bondig interfaces or vlans can be found in 
-# /var/adm/clone-master-clean-up/custom_remove.template
-for intf in `ls -1 /etc/sysconfig/network/ifcfg-eth*`; do
-    bprot=`grep "^BOOTPROTO=" $intf | sed "s/^BOOTPROTO=//"`
+# /usr/share/clone-master-clean-up/custom_remove.template
+for intf in /etc/sysconfig/network/ifcfg-eth*; do
+    bprot=$(grep "^BOOTPROTO=" "$intf" | sed "s/^BOOTPROTO=//")
     if ! [[ "$bprot" =~ dhcp ]]; then
-        rm -rf $intf
+        rm -rf "$intf"
     fi
 done
 if [ -d /var/lib/wicked ]; then

++++++ custom_remove.template ++++++
--- /var/tmp/diff_new_pack.CqxcHS/_old  2020-08-18 12:02:52.563422102 +0200
+++ /var/tmp/diff_new_pack.CqxcHS/_new  2020-08-18 12:02:52.563422102 +0200
@@ -5,8 +5,8 @@
 # use cases.
 # See some examples for additional needed clean ups below.
 # 
-# Please copy the template file 
'/var/adm/clone-master-clean-up/custom_remove.template'
-# to '/var/adm/clone-master-clean-up/custom_remove' and un-comment the parts
+# Please copy the template file 
'/usr/share/clone-master-clean-up/custom_remove.template'
+# to '/etc/clone-master-clean-up/custom_remove' and un-comment the parts
 # you need or add additional parts, which will fit your needs.
 # Please be careful, the template file will be changed during future package
 # updates. So do NOT change the content. It will get lost. Always make changes


Reply via email to