TMPTIME migration does not work on upgrade from wily to xenial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
TMPTIME setting from Wily is not migrated to mountall on upgrade to Xenial.
systemd.postinst from 229-4ubuntu4 contains this bit:
# Do a one-time migration of the TMPTIME setting
if dpkg --compare-versions "$2" lt "204-9"; then
# Fix up potentially broken tmp.conf, see Debian#738862
if [ -e /etc/tmpfiles.
sed -i '/^# Clear \/var\/tmp/d' /etc/tmpfiles.
sed -i 's,^\(d /var/tmp\),#\1,g' /etc/tmpfiles.
fi
if [ -f /etc/default/rcS ]; then
. /etc/default/rcS
fi
if [ ! -e /etc/tmpfiles.
case "$TMPTIME" in
cat > /etc/tmpfiles.
# Avoid clearing /tmp by shipping an empty /etc/tmpfiles.
# which overrides /usr/lib/
# This file was automatically created because of local modifications in
# /etc/default/rcS where TMPTIME was set to infinite.
EOF
;;
esac
fi
fi
However, Xenial ships with a more recent systemd than 204, meaning that the TMPTIME setting is not migrated. As a result people who upgrade from Wily to Xenial will find that /tmp is always erased on startup, with no clear indication of how to change the behavior.
Fixing this behavior would still expose this debian bug <https:/
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: initscripts 2.88dsf-59.3ubuntu2
ProcVersionSign
Uname: Linux 4.4.0-18-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Tue Apr 19 19:57:23 2016
InstallationDate: Installed on 2012-10-07 (1290 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120822.4)
ProcEnviron:
LANGUAGE=
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: sysvinit
UpgradeStatus: Upgraded to xenial on 2016-04-09 (10 days ago)
modified.
mtime.conffile.
On Wed, Apr 20, 2016 at 12:18:40AM -0000, Ian Turner wrote:
> TMPTIME setting from Wily is not migrated to mountall on upgrade to
> Xenial.
<snip>
> systemd.postinst from 229-4ubuntu4 contains this bit:
> # Do a one-time migration of the TMPTIME setting
> if dpkg --compare-versions "$2" lt "204-9"; then
<snip>
> However, Xenial ships with a more recent systemd than 204, meaning that
> the TMPTIME setting is not migrated.
I have not investigated this bug in detail, but the above analysis is
incorrect. First of all, that version check is for the *previously
installed* version of the systemd package; so the version of the package in
xenial is not relevant to whether that check triggers. Secondly, that
maintainer script piece is already present in the wily version of the
package. It is not *supposed* to run on upgrade from wily to xenial,
because it was *already run* before upgrade to wily.