[bionic] no unattended installation

Bug #1773687 reported by Dirk Eddelbuettel
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tzdata (Ubuntu)
Invalid
High
Steve Langasek

Bug Description

Package: tzdata
Version: 2018d-1
Ubuntu release: 18.04

There appears to be a regression with the preseeding data for tzdata in the 18.04 release.
When running

   apt-get install tzdata

I now _always_ drop into an interactive selection of the timezone 'area' and 'zone'. This was not the case before; it is also not the case in Debian 'unstable' right now.

I looked into the postinst script, but I can't figure out where the preseeded info would be. I tried debconf-set-selections with a preseed file, but no luck.

This blocks usage of tzdata in Docker containers and is there for a bit annoying.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: tzdata 2017c-0ubuntu0.17.10
ProcVersionSignature: Ubuntu 4.13.0-41.46-generic 4.13.16
Uname: Linux 4.13.0-41-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.7-0ubuntu3.8
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun May 27 13:17:42 2018
InstallationDate: Installed on 2017-12-31 (147 days ago)
InstallationMedia: Ubuntu-Server 17.10 "Artful Aardvark" - Release amd64 (20171017.1)
PackageArchitecture: all
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: tzdata
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dirk Eddelbuettel (edd) wrote :
Revision history for this message
Dirk Eddelbuettel (edd) wrote :

Note that I filed this on my 17.10 machine so the final paragraph is mildly inaccurate.

Revision history for this message
Dirk Eddelbuettel (edd) wrote :

Also, it is not the package per se but possibly the debconf settings -- installing tzdata_2018e-1 from Debian reveals the same issue.

Changed in tzdata (Ubuntu):
importance: Undecided → High
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Dirk Eddelbuettel (edd) wrote :
Download full text (3.8 KiB)

Update:

A friend just pointed out that setting `export DEBIAN_FRONTEND=noninteractive` helps,
and I verified that in Docker. So _maybe_ we just dropped that setting?

edd@rob:~$ docker run --rm -ti ubuntu:bionic
root@cf1720b38f97:/# apt-get update
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security/universe Sources [3783 B]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [18.8 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [1066 B]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [88.7 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [83.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [65.5 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/universe Sources [11.5 MB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe Sources [28.7 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [1660 B]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [79.3 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [127 kB]
Fetched 25.2 MB in 4s (5655 kB/s)
Reading package lists... Done
root@cf1720b38f97:/# export DEBIAN_FRONTEND=noninteractive
root@cf1720b38f97:/# apt-get install -y tzdata
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  tzdata
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 188 kB of archives.
After this operation, 3088 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 tzdata all 2018d-1 [188 kB]
Fetched 188 kB in 1s (271 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting...

Read more...

Revision history for this message
Steve Langasek (vorlon) wrote :

This was going to be my recommended approach, as it's the authoritative way to have a noninteractive install. I haven't had a chance to look into the package yet given the holiday weekend. Do you think there is a bug here that still warrants investigating, or do you think this was a configuration regression on your side?

Revision history for this message
Dirk Eddelbuettel (edd) wrote : [Bug 1773687] Re: [bionic] no unattended installation

Hi Steve,

On 28 May 2018 at 22:47, Steve Langasek wrote:
| This was going to be my recommended approach, as it's the authoritative
| way to have a noninteractive install. I haven't had a chance to look
| into the package yet given the holiday weekend. Do you think there is a
| bug here that still warrants investigating, or do you think this was a
| configuration regression on your side?

I have the feeling that one important variable setting may have gotten
dropped at your end because if I look at my GH repo here:

   https://github.com/rocker-org/rocker/tree/master/r-apt

you will see essentially identical Dockerfile setups that worked for

   precise
   trusty
   wily
   xenial
   yakkety
   zesty
   artful

and then all of a sudden failed for

   bionic

I will add the setting, but methinks you guys set it before. Or maybe one of
the Debian packages involved did.

Dirk

--
http://dirk.eddelbuettel.com | @eddelbuettel | <email address hidden>

Revision history for this message
Steve Langasek (vorlon) wrote :

Ok, I see what's happening here. The reason artful doesn't prompt is because /etc/localtime is prepopulated within the image:

$ tar tvf ubuntu-artful-core-cloudimg-amd64-root.tar.gz |grep zoneinfo
lrwxrwxrwx root/root 0 2018-05-24 13:44 etc/localtime -> /usr/share/zoneinfo/UTC
$

This is despite the fact that the tzdata package itself is not installed.

In bionic, this symlink is not present:

$ tar tvf ubuntu-bionic-core-cloudimg-amd64-root.tar.gz |grep zoneinfo
$

This is in fact a deliberate change in bionic as part of the minimal image work; in livecd-rootfs live-build/auto/build:

        if [ "${SUBPROJECT:-}" = minimized ] \
           && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then
                # workaround for tzdata purge not removing these files
                rm -f chroot/etc/localtime chroot/etc/timezone
        fi

The behavior you're seeing in bionic is the *expected* behavior on a completely fresh install of the tzdata package. The reason you don't see this behavior in prior releases is that it's not truly a fresh install, and there is cruft left on the filesystem in the form of /etc/localtime. If /etc/localtime already exists, tzdata has no need to prompt instead of using the existing configuration on the system. If it doesn't exist, tzdata will ask debconf, which means a prompt by default.

So your setting DEBIAN_FRONTEND=noninteractive, if you don't care about /etc/localtime and just tzdata to use the default, is the correct fix here.

Changed in tzdata (Ubuntu):
status: New → Invalid
Revision history for this message
Dirk Eddelbuettel (edd) wrote :

Hi Steve,

On 30 May 2018 at 00:10, Steve Langasek wrote:
| Ok, I see what's happening here. The reason artful doesn't prompt is
| because /etc/localtime is prepopulated within the image:
|
| $ tar tvf ubuntu-artful-core-cloudimg-amd64-root.tar.gz |grep zoneinfo
| lrwxrwxrwx root/root 0 2018-05-24 13:44 etc/localtime -> /usr/share/zoneinfo/UTC
| $
|
| This is despite the fact that the tzdata package itself is not
| installed.
|
| In bionic, this symlink is not present:
|
| $ tar tvf ubuntu-bionic-core-cloudimg-amd64-root.tar.gz |grep zoneinfo
| $
|
| This is in fact a deliberate change in bionic as part of the minimal
| image work; in livecd-rootfs live-build/auto/build:
|
| if [ "${SUBPROJECT:-}" = minimized ] \
| && ! Chroot chroot dpkg -l tzdata 2>&1 |grep -q ^ii; then
| # workaround for tzdata purge not removing these files
| rm -f chroot/etc/localtime chroot/etc/timezone
| fi
|
| The behavior you're seeing in bionic is the *expected* behavior on a
| completely fresh install of the tzdata package. The reason you don't
| see this behavior in prior releases is that it's not truly a fresh
| install, and there is cruft left on the filesystem in the form of

Nice. I was always a big fan of the minimal ubuntu-server installations "way
back when" a decade or so ago, and am glad to see them back.

| /etc/localtime. If /etc/localtime already exists, tzdata has no need to
| prompt instead of using the existing configuration on the system. If it
| doesn't exist, tzdata will ask debconf, which means a prompt by default.
|
| So your setting DEBIAN_FRONTEND=noninteractive, if you don't care about
| /etc/localtime and just tzdata to use the default, is the correct fix
| here.

Agreed. I have set that in the corresponding bionic Dockerfile and will use
it going forward.

Cheers, Dirk

| ** Changed in: tzdata (Ubuntu)
| Status: New => Invalid
|
| --
| You received this bug notification because you are subscribed to the bug
| report.
| https://bugs.launchpad.net/bugs/1773687
|
| Title:
| [bionic] no unattended installation
|
| To manage notifications about this bug go to:
| https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/1773687/+subscriptions

--
http://dirk.eddelbuettel.com | @eddelbuettel | <email address hidden>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.