Hello community,
here is the log from the commit of package transactional-update for
openSUSE:Factory checked in at 2019-09-23 12:00:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/transactional-update (Old)
and /work/SRC/openSUSE:Factory/.transactional-update.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "transactional-update"
Mon Sep 23 12:00:51 2019 rev:45 rq:730426 version:2.16
Changes:
--------
---
/work/SRC/openSUSE:Factory/transactional-update/transactional-update.changes
2019-07-22 12:17:18.619713120 +0200
+++
/work/SRC/openSUSE:Factory/.transactional-update.new.7948/transactional-update.changes
2019-09-23 12:00:55.357969643 +0200
@@ -1,0 +2,19 @@
+Mon Sep 9 19:36:59 UTC 2019 - Ignaz Forster <[email protected]>
+
+- Update to version 2.16
+ - Use default command if options, but no command was given [boo#1146116]
+ - Make sure only one process appears in `ps` output [boo#1111897]
+ - Move update check: If a new repository is added (and
+ ZYPPER_AUTO_IMPORT_KEYS is set) adding the new repository key won't fail
+ any more
+ - Avoid unnecessary snapshots / reboots by detecting zypper operations
+ without changes more reliably (e.g. when installing an already installed
+ package)
+ - Update the manpage accordingly
+ - Bugfixes:
+ - Ignore commented lines in fstab when checking for shadowed files
+ - Avoid warning when copying network config
+- Remove Perl dependency
+- Building documentation requires Python 3 now
+
+-------------------------------------------------------------------
Old:
----
transactional-update-2.15.tar.gz
New:
----
transactional-update-2.16.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ transactional-update.spec ++++++
--- /var/tmp/diff_new_pack.WFS1Gk/_old 2019-09-23 12:00:55.941969547 +0200
+++ /var/tmp/diff_new_pack.WFS1Gk/_new 2019-09-23 12:00:55.941969547 +0200
@@ -17,7 +17,7 @@
Name: transactional-update
-Version: 2.15
+Version: 2.16
Release: 0
Summary: Transactional Updates with btrfs and snapshots
License: GPL-2.0-or-later
@@ -31,15 +31,14 @@
BuildRequires: fdupes
BuildRequires: libzypp
BuildRequires: pkgconfig
-BuildRequires: python-lxml
+BuildRequires: python3-lxml
BuildRequires: rpm-devel
BuildRequires: suse-module-tools
Requires: attr
+Requires: bc
Requires: logrotate
Requires: lsof
-Requires: perl-HTML-Parser
# psmisc is needed because of fuser
-Requires: bc
Requires: psmisc
Requires: rsync
Recommends: rebootmgr
++++++ transactional-update-2.15.tar.gz -> transactional-update-2.16.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transactional-update-2.15/NEWS
new/transactional-update-2.16/NEWS
--- old/transactional-update-2.15/NEWS 2019-07-08 14:57:13.000000000 +0200
+++ new/transactional-update-2.16/NEWS 2019-09-12 14:56:59.000000000 +0200
@@ -2,6 +2,22 @@
Copyright (C) 2016-2019 Thorsten Kukuk et al.
+Version 2.16
+* Use default command if options, but no command was given [boo#1146116]
+* Make sure only one process appears in `ps` output [boo#1111897]
+* Move update check: If a new repository is added (and
+ ZYPPER_AUTO_IMPORT_KEYS is set) adding the new repository key won't fail any
+ more
+* Avoid unnecessary snapshots / reboots by detecting zypper operations
+ without changes more reliably (e.g. when installing an already installed
+ package)
+* Update the manpage accordingly
+* Get rid of Perl dependency
+* Building documentation requires Python 3 now
+* Bugfixes:
+ * Ignore commented lines in fstab when checking for shadowed files
+ * Avoid warning when copying network config
+
Version 2.15
* Move description of interactiveness [boo#1132438]
* Enable network during update [boo#1137890]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transactional-update-2.15/configure.ac
new/transactional-update-2.16/configure.ac
--- old/transactional-update-2.15/configure.ac 2019-07-08 14:57:13.000000000
+0200
+++ new/transactional-update-2.16/configure.ac 2019-09-12 14:56:59.000000000
+0200
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(transactional-update, 2.15)
+AC_INIT(transactional-update, 2.16)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([sbin/transactional-update.in])
AC_PREFIX_DEFAULT(/usr)
@@ -67,7 +67,7 @@
[DocBook XSL Stylesheets], [], enable_man=no)
m4_ifdef([AX_PYTHON_MODULE],
- [AX_PYTHON_MODULE([lxml], , [python])],
+ [AX_PYTHON_MODULE([lxml])],
[m4_warn([unsupported], [Missing macro AX_PYTHON_MODULE: please install
autoconf-archive to enable Python module checks.])])
AS_IF([test "${HAVE_PYMOD_LXML}" != "yes"], enable_man=no)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transactional-update-2.15/doc/transactional-update.xml
new/transactional-update-2.16/doc/transactional-update.xml
--- old/transactional-update-2.15/doc/transactional-update.xml 2019-07-08
14:57:13.000000000 +0200
+++ new/transactional-update-2.16/doc/transactional-update.xml 2019-09-12
14:56:59.000000000 +0200
@@ -16,7 +16,7 @@
<email>[email protected]</email>
</author>
</authorgroup>
- <releaseinfo>Version 0.2, 14. March 2019</releaseinfo>
+ <releaseinfo>Version 0.3, 12. September 2019</releaseinfo>
<abstract>
<para>
This is the documentation for transactional-update and is intended for
@@ -27,6 +27,12 @@
setting up and operating such a system and what a packager needs to
know for creating compatible packages.
</para>
+ <para>
+ For specific usage see the
+ <ulink
url="https://kubic.opensuse.org/documentation/man-pages/transactional-update.8.html">transactional-update
man page</ulink>
+ or the
+ <ulink url="https://kubic.opensuse.org/documentation/man-pages/">list
of Kubic related commands</ulink>.
+ </para>
</abstract>
</bookinfo>
@@ -507,7 +513,10 @@
<term><filename>/usr/etc/transactional-update.conf</filename></term>
<listitem>
<para>
- TBD
+ This is the reference configuration file for
+ <command>transactional-update</command>, containing distribution
+ default values. This file should not be changed by the
+ administrator.
</para>
</listitem>
</varlistentry>
@@ -515,7 +524,12 @@
<term><filename>/etc/transactional-update.conf</filename></term>
<listitem>
<para>
- TBD
+ To change the default configuration for
+ <command>transactional-update</command> copy or create this file
+ and change the options accordingly. See
+ <ulink
url="https://kubic.opensuse.org/documentation/man-pages/transactional-update.conf.5.html">transactional-update.conf(5)</ulink>
+ for a description of the configuration options. Values from this
+ file will overwride the distribution default values.
</para>
</listitem>
</varlistentry>
@@ -523,7 +537,8 @@
<term><filename>/var/lib/overlay/</filename></term>
<listitem>
<para>
- TDB
+ See <xref linkend="tu-setup-etc" /> for an explanation of this
+ directory's contents.
</para>
</listitem>
</varlistentry>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/transactional-update-2.15/man/Makefile.am
new/transactional-update-2.16/man/Makefile.am
--- old/transactional-update-2.15/man/Makefile.am 2019-07-08
14:57:13.000000000 +0200
+++ new/transactional-update-2.16/man/Makefile.am 2019-09-12
14:56:59.000000000 +0200
@@ -43,7 +43,7 @@
endef
transactional-update.index.xml: make-man-index.py $(XMLS)
- python $(srcdir)/make-man-index.py $(srcdir)/$@ $(XMLS)
+ python3 $(srcdir)/make-man-index.py $(srcdir)/$@ $(XMLS)
transactional-update.8: transactional-update.8.xml
$(XSLTPROC) -o $(srcdir)/$@ --path $(srcdir) $(XSLTPROC_FLAGS_MAN) $<
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transactional-update-2.15/man/transactional-update.8.xml
new/transactional-update-2.16/man/transactional-update.8.xml
--- old/transactional-update-2.15/man/transactional-update.8.xml
2019-07-08 14:57:13.000000000 +0200
+++ new/transactional-update-2.16/man/transactional-update.8.xml
2019-09-12 14:56:59.000000000 +0200
@@ -134,10 +134,15 @@
</refsect1>
<refsect1 id='commands'><title>COMMANDS</title>
+<para>
+ If none of the following commands is given <option>up</option> will be
+ assumed.
+</para>
<refsect2 id='general_commands'><title>General Commands</title>
<para>
General Commands can be used together in any combination; additionally they
can be extended with one <link linkend='pkg_commands'>Package Command</link>.
+ The order of the General Commands doesn't matter.
</para>
<variablelist remap='TP'>
<varlistentry>
@@ -197,12 +202,17 @@
<term><option>reboot</option></term>
<listitem>
<para>
- If a new snapshot with updates was created, the system should be
- rebooted. This option will trigger the necessary reboot. If the
+ Trigger a reboot after updating the system.
+ </para>
+ <para>
+ Several different reboot methods are supported, configurable via the
+ <option>REBOOT_METHOD</option> configuration option in
+
<citerefentry><refentrytitle>transactional-update.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
+ By default
<citerefentry><refentrytitle>rebootmgrd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
- is running, <command>transactional-update</command> will tell the
- daemon to reboot the system according to the configured policies. Else
- <command>systemctl reboot</command> is called.
+ will be used to reboot the system according to the configured policies
+ if the service is running, otherwise <command>systemctl reboot</command>
+ will be called.
</para>
</listitem>
</varlistentry>
@@ -236,9 +246,10 @@
<option>--non-interactive</option> options.
</para>
<para>
- Note that when using Package Commands non-interactively and combining them
- with <link linkend='general_commands'>General Commands</link> the General
- Commands will only be executed if the Package Command updated any packages.
+ To facilitate scripting Package Commands will exit early if no packages were
+ updated; if combined with
+ <link linkend='general_commands'>General Commands</link> those will not be
+ executed any more in that case.
</para>
<refsect3 id='ni_pkg_commands'><title>Non-interactive Package Commands</title>
<variablelist>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/transactional-update-2.15/sbin/transactional-update.in
new/transactional-update-2.16/sbin/transactional-update.in
--- old/transactional-update-2.15/sbin/transactional-update.in 2019-07-08
14:57:13.000000000 +0200
+++ new/transactional-update-2.16/sbin/transactional-update.in 2019-09-12
14:56:59.000000000 +0200
@@ -83,7 +83,7 @@
exec 4>&2
fi
# Log stderr to log file
-exec 2> >(tee -a "${LOGFILE}")
+exec 2> >(exec tee -a "${LOGFILE}")
self_update() {
if [ ${DO_SELF_UPDATE} == 0 ]; then
@@ -536,12 +536,6 @@
ORIG_ARGS=("$@")
-# If no option is given, assume "up"
-if [ $# -eq 0 ]; then
- ZYPPER_ARG="up"
- TELEM_CLASS="update"
-fi
-
while [ 1 ]; do
if [ $# -eq 0 ]; then
break
@@ -714,8 +708,11 @@
esac
done
-if [ $# -ne 0 ]; then
- usage 1
+# If no commands were given, assume "up"
+if [ -z "${ZYPPER_ARG}" -a -z "${TELEM_CLASS}" -a "${REBOOT_AFTERWARDS}" -eq 0
\
+ -a "${DO_REGISTRATION}" -eq 0 -a "${DO_CLEANUP}" -eq 0 ]; then
+ ZYPPER_ARG="up"
+ TELEM_CLASS="update"
fi
# Check if this is a self-updated transactional-update; if it isn't lock and
@@ -927,42 +924,6 @@
log_info "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}" \
- -a ${DO_REGISTRATION} -eq 0 -a ${DO_MIGRATION} -eq 0 ]; then
-
- TMPFILE=`mktemp /tmp/transactional-update.XXXXXXXXXX`
- zypper --xml ${ZYPPER_ARG} ${ZYPPER_NONINTERACTIVE} --dry-run
"${ZYPPER_ARG_PKGS[@]}" > ${TMPFILE}
- if [ $? -ne 0 ]; then
- LOG_MESSAGES=`awk -v RS='<' -v FS='>' '{if ($1 ~
/^(message|description)/) print $2}' ${TMPFILE} | perl -MHTML::Entities -pe
'decode_entities($_);'`
- log_error "ERROR: Zypper failed with the following message(s):"
- log_error "${LOG_MESSAGES}"
- rm -f ${TMPFILE}
- echo "Use '--interactive' for manual problem resolution."
- quit 1
- fi
- PACKAGE_UPDATES=`grep "install-summary download-size" ${TMPFILE} | sed
-e 's|.*install-summary download-size=\"\(.*\)\" space-usage-diff.*|\1|g'`
- SIZE_OF_UPDATES=`grep "install-summary.*space-usage-diff" ${TMPFILE} |
sed -e 's|.*install-summary.*space-usage-diff=\"\([^"]*\)\".*|\1|g'`
- NUM_OF_UPDATES=`grep "install-summary.*packages-to-change" ${TMPFILE} |
sed -e 's|.*install-summary.*packages-to-change=\"\([^"]*\)\".*|\1|g'`
- rm -f ${TMPFILE}
-
TELEM_PAYLOAD="${TELEM_PAYLOAD}\npackages=${NUM_OF_UPDATES}\ndownload_size=${PACKAGE_UPDATES}\nspace-usage=${SIZE_OF_UPDATES}"
- if [ "${NUM_OF_UPDATES}" = "0" ] || [ -z "${NUM_OF_UPDATES}" -a
"${PACKAGE_UPDATES}" = "0" -a "${SIZE_OF_UPDATES}" = "0" ]; then
- log_info "zypper: nothing to update"
- log_info "transactional-update finished"
- if [ $USE_SALT_GRAINS -eq 1 ]; then
- log_info "Updating salt grains"
- if [ -f /etc/salt/grains ]; then
- # Reset tx_update_failed if it exists. Could have been set
due to wrong
- # repository configuration or another temporary error
before.
- sed -i -e 's|tx_update_failed:.*|tx_update_failed: false|g'
/etc/salt/grains
- fi
- fi
- telem_finish 0
- exit 0
- fi
- fi
-
# Create the working snapshot
SNAPSHOT_ID=`snapper create -p -u "transactional-update-in-progress=yes"
-d "Snapshot Update of #${CURRENT_SNAPSHOT_ID}"`
if [ $? -ne 0 ]; then
@@ -1138,7 +1099,8 @@
fi
# Copy network configuration into chroot
- if [ -e /var/run/netconfig ]; then
+ if [ -e /var/run/netconfig -a ${HAS_SEPARATE_VAR} -eq 1 ]; then
+ rm -rf ${SNAPSHOT_DIR}/var/run
mkdir -p ${SNAPSHOT_DIR}/var/run
cp -r /var/run/netconfig ${SNAPSHOT_DIR}/var/run/
fi
@@ -1164,26 +1126,34 @@
if [ -n "${ZYPPER_ARG}" ]; then
log_info "Calling zypper ${ZYPPER_ARG}"
- if [ -n "${ZYPPER_NONINTERACTIVE}" ]; then
- # In non-interactive mode, we redirect everything to a log file
- if [ ${DO_MIGRATION} -eq 1 ]; then
- # transactional-update migration
- env DISABLE_RESTART_ON_UPDATE=yes zypper ${ZYPPER_ARG} --root
${MOUNT_DIR} ${ZYPPER_NONINTERACTIVE} "${ZYPPER_ARG_PKGS[@]}" |& tee -a
${LOGFILE}
- RETVAL=${PIPESTATUS[0]}
- else
- env DISABLE_RESTART_ON_UPDATE=yes zypper -R ${MOUNT_DIR}
${ZYPPER_ARG} ${ZYPPER_NONINTERACTIVE} "${ZYPPER_ARG_PKGS[@]}" |& tee -a
${LOGFILE}
- RETVAL=${PIPESTATUS[0]}
- fi
+ if [ ${DO_MIGRATION} -eq 1 ]; then
+ # transactional-update migration
+ env DISABLE_RESTART_ON_UPDATE=yes zypper ${ZYPPER_ARG} --root
${MOUNT_DIR} ${ZYPPER_NONINTERACTIVE} "${ZYPPER_ARG_PKGS[@]}" |& tee -a
${LOGFILE}
+ RETVAL=${PIPESTATUS[0]}
else
- # in interactive mode, we don't redirect to a log file
- if [ ${DO_MIGRATION} -eq 1 ]; then
- # transactional-update migration
- env DISABLE_RESTART_ON_UPDATE=yes zypper ${ZYPPER_ARG} --root
${MOUNT_DIR} "${ZYPPER_ARG_PKGS[@]}"
- RETVAL=$?
- else
- env DISABLE_RESTART_ON_UPDATE=yes zypper -R ${MOUNT_DIR}
${ZYPPER_ARG} "${ZYPPER_ARG_PKGS[@]}"
- RETVAL=$?
+ # Check if there are updates at all.
+ TMPFILE=`mktemp /tmp/transactional-update.XXXXXXXXXX`
+ zypper -R ${MOUNT_DIR} --xml ${ZYPPER_ARG} -y
--auto-agree-with-product-licenses --dry-run "${ZYPPER_ARG_PKGS[@]}" >
${TMPFILE}
+ PACKAGE_UPDATES=`grep "install-summary download-size" ${TMPFILE} |
sed -e 's|.*install-summary download-size=\"\(.*\)\" space-usage-diff.*|\1|g'`
+ SIZE_OF_UPDATES=`grep "install-summary.*space-usage-diff"
${TMPFILE} | sed -e
's|.*install-summary.*space-usage-diff=\"\([^"]*\)\".*|\1|g'`
+ NUM_OF_UPDATES=`grep "install-summary.*packages-to-change"
${TMPFILE} | sed -e
's|.*install-summary.*packages-to-change=\"\([^"]*\)\".*|\1|g'`
+ rm -f ${TMPFILE}
+
TELEM_PAYLOAD="${TELEM_PAYLOAD}\npackages=${NUM_OF_UPDATES}\ndownload_size=${PACKAGE_UPDATES}\nspace-usage=${SIZE_OF_UPDATES}"
+ if [ "${NUM_OF_UPDATES}" = "0" ] || [ -z "${NUM_OF_UPDATES}" -a
"${PACKAGE_UPDATES}" = "0" -a "${SIZE_OF_UPDATES}" = "0" ]; then
+ log_info "zypper: nothing to update"
+ if [ $USE_SALT_GRAINS -eq 1 ]; then
+ log_info "Updating salt grains"
+ if [ -f /etc/salt/grains ]; then
+ # Reset tx_update_failed if it exists. Could have been
set due to wrong
+ # repository configuration or another temporary error
before.
+ sed -i -e 's|tx_update_failed:.*|tx_update_failed:
false|g' /etc/salt/grains
+ fi
+ fi
+ quit 0
fi
+
+ env DISABLE_RESTART_ON_UPDATE=yes zypper -R ${MOUNT_DIR}
${ZYPPER_ARG} ${ZYPPER_NONINTERACTIVE} "${ZYPPER_ARG_PKGS[@]}" |& tee -a
${LOGFILE}
+ RETVAL=${PIPESTATUS[0]}
fi
# in case of migration, we need to do a little bit more:
if [ ${DO_MIGRATION} -eq 1 ]; then
@@ -1215,6 +1185,9 @@
TELEM_PAYLOAD="${TELEM_PAYLOAD}\nnext_version=${VERSION_ID}"
else
log_error "ERROR: zypper ${ZYPPER_ARG} on ${MOUNT_DIR} failed with
exit code ${RETVAL}!"
+ if [ -n "${ZYPPER_NONINTERACTIVE}" ]; then
+ echo "Use '--interactive' for manual problem resolution."
+ fi
EXITCODE=1
fi
fi
@@ -1298,7 +1271,8 @@
# visible in the actual system as they are shadowed by the real mount
# points, so warn the user
searchdirs=""
- for mountdir in $(awk '$2 ~ "^/.*" { print $2 }'
${SNAPSHOT_DIR}/etc/fstab); do
+ # Filter out commented lines and swap partition
+ for mountdir in $(awk '$1 !~ "^#.*" && $2 ~ "^/.*" { print $2 }'
${SNAPSHOT_DIR}/etc/fstab); do
# Filter out root fs and fstab entries which we bind mounted anyway
if [[ ! $mountdir =~ ^(/|/etc|${DIR_TO_MOUNT// /|})$ ]]; then
searchdirs+="${SNAPSHOT_DIR}${mountdir} "