commit clone-master-clean-up for openSUSE:Factory

2020-08-18 Thread root
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 - abr...@suse.com
+
+- 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
  

commit clone-master-clean-up for openSUSE:Factory

2019-10-16 Thread root
Hello community,

here is the log from the commit of package clone-master-clean-up for 
openSUSE:Factory checked in at 2019-10-16 09:18:38

Comparing /work/SRC/openSUSE:Factory/clone-master-clean-up (Old)
 and  /work/SRC/openSUSE:Factory/.clone-master-clean-up.new.2352 (New)


Package is "clone-master-clean-up"

Wed Oct 16 09:18:38 2019 rev:2 rq:738667 version:1.5

Changes:

--- 
/work/SRC/openSUSE:Factory/clone-master-clean-up/clone-master-clean-up.changes  
2019-08-08 14:23:33.472347657 +0200
+++ 
/work/SRC/openSUSE:Factory/.clone-master-clean-up.new.2352/clone-master-clean-up.changes
2019-10-16 09:18:43.166936529 +0200
@@ -1,0 +2,18 @@
+Tue Oct  8 13:24:41 UTC 2019 - abr...@suse.com
+
+- Bump version to 1.5
+- Don't show output from pushd/popd
+- Make snapper snapshot removal more generic
+  The output format is not really meant for machine reading, it's
+  format has changed thus the simple parser broke.
+  This now makes the parser more generic (using data from d-bus),
+  also now it is ensured the snapshots are deleted in the correct
+  order.
+  (bsc#1149322)
+
+---
+Tue Aug 27 07:06:00 UTC 2019 - Jan Engelhardt 
+
+- Use noun phrase in descriptions.
+
+---
@@ -77 +94,0 @@
-



Other differences:
--
++ clone-master-clean-up.spec ++
--- /var/tmp/diff_new_pack.hlB7VN/_old  2019-10-16 09:18:43.806934880 +0200
+++ /var/tmp/diff_new_pack.hlB7VN/_new  2019-10-16 09:18:43.810934870 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package clone-master-clean-up
 #
-# Copyright (c) 2017 SUSE LLC
+# Copyright (c) 2017-2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,16 +12,17 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 Name:   clone-master-clean-up
-Version:1.4
+Version:1.5
 Release:0
-License:GPL-2.0+
-Summary:Clean up a system for cloning preparation
-Url:https://www.suse.com
+Summary:Tool to clean up a system for cloning preparation
+License:GPL-2.0-or-later
 Group:  System/Management
+Url:https://www.suse.com
 Source0:clone-master-clean-up.sh
 Source1:clone-master-clean-up.1
 Source2:sysconfig.clone-master-clean-up
@@ -29,7 +30,10 @@
 Source10:   LICENSE
 Source11:   README.md
 BuildRoot:  %{_tmppath}/%{name}-%{version}-build
-Requires:   systemd sed curl coreutils
+Requires:   coreutils
+Requires:   curl
+Requires:   sed
+Requires:   systemd
 Requires(post): %fillup_prereq
 BuildArch:  noarch
 
@@ -37,9 +41,9 @@
   %define _fillupdir /var/adm/fillup-templates
 %endif
 
-
 %description
-Clean up a system for cloning preparation by cleaning up usage history and log 
files, etc.
+A tool to clean up a system for cloning preparation by cleaning up
+usage history and log files, etc.
 
 %prep
 
@@ -65,8 +69,8 @@
 %fillup_only -n clone-master-clean-up
 
 %files
-%doc %{basename:%{S:11}}
-%license %{basename:%{S:10}}
+%doc README.md
+%license LICENSE
 %{_sbindir}/*
 %{_mandir}/man1/*
 %{_fillupdir}/*
@@ -74,3 +78,5 @@
 %dir %{_sysconfdir}/%{name}
 %{_datadir}/%{name}/custom_remove.template
 %ghost %config %{_sysconfdir}/%{name}/custom_remove
+
+%changelog

++ clone-master-clean-up.sh ++
--- /var/tmp/diff_new_pack.hlB7VN/_old  2019-10-16 09:18:43.878934694 +0200
+++ /var/tmp/diff_new_pack.hlB7VN/_new  2019-10-16 09:18:43.882934684 +0200
@@ -71,12 +71,12 @@
 done
 
 echo 'Clearing systemd journal'
-pushd /etc/systemd
+pushd /etc/systemd > /dev/null
 cp journald.conf journald.conf.bak
 echo -e '\nSystemMaxUse=1K' >> journald.conf
 systemctl restart systemd-journald
 mv journald.conf.bak journald.conf
-popd
+popd > /dev/null
 
 echo 'Clearing systemd machine ID file'
 truncate -s 0 /etc/machine-id
@@ -108,14 +108,59 @@
 echo 'Enabling YaST Firstboot if necessary'
 [ -e /etc/YaST2/firstboot.xml ] && touch /var/lib/YaST2/reconfig_system
 
+
 if [ "$CMCU_RSNAP" = "yes" ]; then
+SNAPPER_CMD="snapper delete"
 if [ -d /.snapshots ]; then
-echo "Remove all btrfs snapshots from /.snapshot"
-for s in `snapper list | awk '/pre/||/post/{print $3}'`; do
-snapper delete $s
-done
+   echo "Removing all pre/post btrfs snapshots from /.snapshot"
+   snapshots=$(dbus-send --type=method_call --system --print-reply \