commit transactional-update for openSUSE:Factory

Hello community, here is the log from the commit of package transactional-update for openSUSE:Factory checked in at 2018-04-30 22:57:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/transactional-update (Old) and /work/SRC/openSUSE:Factory/.transactional-update.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "transactional-update" Mon Apr 30 22:57:27 2018 rev:27 rq:602459 version:2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/transactional-update/transactional-update.changes 2018-04-25 10:02:00.753387693 +0200 +++ /work/SRC/openSUSE:Factory/.transactional-update.new/transactional-update.changes 2018-04-30 22:59:21.403545871 +0200 @@ -1,0 +2,6 @@ +Thu Apr 26 15:14:36 CEST 2018 - kukuk@suse.de + +- Update to version 2.1 + - Cleanup the code cleaning up /etc + +------------------------------------------------------------------- Old: ---- transactional-update-2.0.tar.bz2 New: ---- transactional-update-2.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ transactional-update.spec ++++++ --- /var/tmp/diff_new_pack.0yxsJw/_old 2018-04-30 22:59:21.943526168 +0200 +++ /var/tmp/diff_new_pack.0yxsJw/_new 2018-04-30 22:59:21.947526022 +0200 @@ -17,7 +17,7 @@ Name: transactional-update -Version: 2.0 +Version: 2.1 Release: 0 Summary: Transactional Updates with btrfs and snapshots License: GPL-2.0-or-later ++++++ transactional-update-2.0.tar.bz2 -> transactional-update-2.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/NEWS new/transactional-update-2.1/NEWS --- old/transactional-update-2.0/NEWS 2018-04-23 10:03:28.000000000 +0200 +++ new/transactional-update-2.1/NEWS 2018-04-26 15:00:29.000000000 +0200 @@ -2,6 +2,9 @@ Copyright (C) 2016, 2017, 2018 Thorsten Kukuk +Version 2.1 +* Cleanup /etc cleanup + Version 2.0 * Create missing directories from rpm database during boot * Merge /etc overlay with root subvolume during update diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/configure new/transactional-update-2.1/configure --- old/transactional-update-2.0/configure 2018-04-23 10:24:56.000000000 +0200 +++ new/transactional-update-2.1/configure 2018-04-26 15:13:56.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for transactional-update 2.0. +# Generated by GNU Autoconf 2.69 for transactional-update 2.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -576,8 +576,8 @@ # Identity of this package. PACKAGE_NAME='transactional-update' PACKAGE_TARNAME='transactional-update' -PACKAGE_VERSION='2.0' -PACKAGE_STRING='transactional-update 2.0' +PACKAGE_VERSION='2.1' +PACKAGE_STRING='transactional-update 2.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1261,7 +1261,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures transactional-update 2.0 to adapt to many kinds of systems. +\`configure' configures transactional-update 2.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1328,7 +1328,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of transactional-update 2.0:";; + short | recursive ) echo "Configuration of transactional-update 2.1:";; esac cat <<\_ACEOF @@ -1438,7 +1438,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -transactional-update configure 2.0 +transactional-update configure 2.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1531,7 +1531,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by transactional-update $as_me 2.0, which was +It was created by transactional-update $as_me 2.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2394,7 +2394,7 @@ # Define the identity of the package. PACKAGE='transactional-update' - VERSION='2.0' + VERSION='2.1' cat >>confdefs.h <<_ACEOF @@ -5070,7 +5070,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by transactional-update $as_me 2.0, which was +This file was extended by transactional-update $as_me 2.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5127,7 +5127,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -transactional-update config.status 2.0 +transactional-update config.status 2.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/configure.ac new/transactional-update-2.1/configure.ac --- old/transactional-update-2.0/configure.ac 2018-04-23 09:57:43.000000000 +0200 +++ new/transactional-update-2.1/configure.ac 2018-04-26 15:13:51.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(transactional-update, 2.0) +AC_INIT(transactional-update, 2.1) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([sbin/transactional-update.in]) AC_PREFIX_DEFAULT(/usr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/dracut/transactional-update-etc-cleaner.service new/transactional-update-2.1/dracut/transactional-update-etc-cleaner.service --- old/transactional-update-2.0/dracut/transactional-update-etc-cleaner.service 2018-04-20 18:34:52.000000000 +0200 +++ new/transactional-update-2.1/dracut/transactional-update-etc-cleaner.service 2018-04-26 14:59:47.000000000 +0200 @@ -4,7 +4,7 @@ After=dracut-pre-pivot.service Before=initrd-cleanup.service DefaultDependencies=no -ConditionPathExists=/sysroot/var/lib/overlay/etc/transactional-update.newsnapshot +ConditionPathExists=/sysroot/var/lib/overlay/transactional-update.newsnapshot [Service] Type=oneshot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/dracut/transactional-update-etc-cleaner.sh new/transactional-update-2.1/dracut/transactional-update-etc-cleaner.sh --- old/transactional-update-2.0/dracut/transactional-update-etc-cleaner.sh 2018-04-20 18:34:52.000000000 +0200 +++ new/transactional-update-2.1/dracut/transactional-update-etc-cleaner.sh 2018-04-26 14:59:47.000000000 +0200 @@ -19,7 +19,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ETC_OVERLAY="${NEWROOT}/var/lib/overlay/etc" -TU_FLAGFILE="${ETC_OVERLAY}/transactional-update.newsnapshot" +TU_FLAGFILE="${NEWROOT}/var/lib/overlay/transactional-update.newsnapshot" # Import common dracut variables . /dracut-state.sh 2>/dev/null @@ -46,7 +46,8 @@ } # Remove files from overlay with safety checks -# etc directory mustn't be deleted completely, as it's still mounted and the kernel won't be able to recover from that (different inode?) +# etc directory mustn't be deleted completely, as it's still mounted and the +# kernel won't be able to recover from that (different inode?) clean_overlay() { local dir="${1:-.}" local file @@ -98,7 +99,6 @@ fi UMOUNT_DOT_SNAPSHOTS=1 fi - CURRENT_SNAPSHOT_ID="`btrfs subvolume get-default /${NEWROOT} | sed 's#.*/.snapshots/\(.*\)/snapshot#\1#g'`" PREV_SNAPSHOT_ID="`sed -n 's#.*<pre_num>\([^>]\+\)</pre_num>#\1#p' ${NEWROOT}/.snapshots/${CURRENT_SNAPSHOT_ID}/info.xml`" PREV_SNAPSHOT_DIR="`btrfs subvolume list /${NEWROOT} | sed -n 's#.*\(/.snapshots/'${PREV_SNAPSHOT_ID}'/snapshot\)#\1#p'`" if [ -n "${PREV_SNAPSHOT_DIR}" ] && ! findmnt "${NEWROOT}/${PREV_SNAPSHOT_DIR}" >/dev/null; then @@ -121,13 +121,18 @@ } if [ -e "${ETC_OVERLAY}" -a -e "${TU_FLAGFILE}" ]; then - # Previous snapshot may not be available; just delete all overlay contents in this case - rm "${TU_FLAGFILE}" - if prepare_environment; then - clean_overlay - else - remove_overlay + CURRENT_SNAPSHOT_ID="`findmnt /${NEWROOT} | sed -n 's#.*\[/@/\.snapshots/\([[:digit:]]\+\)/snapshot\].*#\1#p'`" + . "${TU_FLAGFILE}" + + if [ "${CURRENT_SNAPSHOT_ID}" = "${EXPECTED_SNAPSHOT_ID}" ]; then + # Previous snapshot may not be available; just delete all overlay contents in this case + rm "${TU_FLAGFILE}" + if prepare_environment; then + clean_overlay + else + remove_overlay + fi + mount -o remount "${NEWROOT}/etc" + release_environment fi - mount -o remount "${NEWROOT}/etc" - release_environment fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/transactional-update-2.0/sbin/transactional-update.in new/transactional-update-2.1/sbin/transactional-update.in --- old/transactional-update-2.0/sbin/transactional-update.in 2018-04-20 20:40:09.000000000 +0200 +++ new/transactional-update-2.1/sbin/transactional-update.in 2018-04-30 09:44:56.000000000 +0200 @@ -45,7 +45,7 @@ SYSTEMCONFFILE="@prefix@@sysconfdir@/transactional-update.conf" LOGFILE="/var/log/transactional-update.log" STATE_FILE="/var/lib/misc/transactional-update.state" -NEW_SNAPSHOT_FLAG="/var/lib/overlay/etc/transactional-update.newsnapshot" +NEW_SNAPSHOT_FLAG="/var/lib/overlay/transactional-update.newsnapshot" SELF_PATH="`dirname $0`" PACKAGE_UPDATES=0 ZYPPER_AUTO_IMPORT_KEYS=0 @@ -454,7 +454,7 @@ fi fi -if [ ${ZYPPER_AUTO_IMPORT_KEYS} -eq 1 ]; then +if [ -n "${ZYPPER_ARG}" -a ${ZYPPER_AUTO_IMPORT_KEYS} -eq 1 ]; then ZYPPER_ARG="--gpg-auto-import-keys ${ZYPPER_ARG}" fi @@ -570,6 +570,13 @@ -o ${RUN_SHELL} -eq 1 -o ${REWRITE_BOOTLOADER} -eq 1 \ -o ${DO_REGISTRATION} -eq 1 ]; then + # If the current snapshot and the default snapshot differ + # there have been changes that we are now discarding. + if [ "${DEFAULT_SNAPSHOT_ID}" -ne "${CURRENT_SNAPSHOT_ID}" ]; then + log_error: "WARNING: Default snapshot differs from current snapshot." + log_error: "WARNING: Any changes within the previous snapshot will be discarded!" + fi + # Check if there are updates at all. Don't check if we do # a registration, as this can change the zypper result. if [ -n "${ZYPPER_ARG}" -a -n "${ZYPPER_NONINTERACTIVE}" \ @@ -629,7 +636,7 @@ # Copy the contents of /etc into the backup snapshot log_info "Copying /etc state into backup snapshot" - rsync --archive --xattrs --acls --quiet --exclude "${NEW_SNAPSHOT_FLAG}" --delete-excluded /etc ${BACKUP_SNAPSHOT_DIR} + rsync --archive --xattrs --acls --quiet --delete-excluded /etc ${BACKUP_SNAPSHOT_DIR} if [ $? -ne 0 ]; then log_error "ERROR: copying of /etc into backup snapshot failed!" quit 1; @@ -725,7 +732,7 @@ # Copy the contents of /etc log_info "Copying /etc state into snapshot" - rsync --archive --xattrs --acls --quiet --exclude "${NEW_SNAPSHOT_FLAG}" --delete-excluded /etc ${SNAPSHOT_DIR} + rsync --archive --xattrs --acls --quiet --delete-excluded /etc ${SNAPSHOT_DIR} if [ $? -ne 0 ]; then log_error "ERROR: copying of /etc into snapshot failed!" quit 1; @@ -897,7 +904,9 @@ add_unique_id ${CURRENT_SNAPSHOT_ID} save_state_file ${SNAPSHOT_ID} # Create flag file for overlay purging - touch "${NEW_SNAPSHOT_FLAG}" + if [ ${RO_ROOT} = "true" ]; then + echo "EXPECTED_SNAPSHOT_ID=${SNAPSHOT_ID}" > "${NEW_SNAPSHOT_FLAG}" + fi # Reset in-progress flag snapper ${SNAPPER_NO_DBUS} modify -u "transactional-update-in-progress=" ${SNAPSHOT_ID} fi
participants (1)
-
root@hilbert.suse.de