Linux Labs

Packages, services, and logs / Stage 3 of 13 · step 7 of 8

Upgrade a package without losing its setting

easy ~25 min
Not running Starting usually ~20 s
Report a problem

Situation

An isolated machine runs a training reporter, lab-pkg-report version 1.0-1, together with the data package lab-pkg-data. Running lab-pkg-report prints the versions and the operating mode. The mode is a local setting here: /etc/lab-pkg-report.conf says mode=training. Release 2.0-1 is approved, and the archives of both packages have already been delivered to /srv/package-lab. The user keeps a note in ~/pkg-notes/report.txt.

Task

  1. lab-pkg-report is installed and configured at version 2.0-1 — as dpkg sees it.
  2. lab-pkg-data is installed at version 2.0-1, and lab-pkg-report's dependency is met.
  3. Both packages' files come from release 2.0-1, and lab-pkg-report run as student prints report=2.0-1 data=2.0-1 mode=training.
  4. /etc/lab-pkg-report.conf still says mode=training and remains the package's conffile.
  5. The note ~/pkg-notes/report.txt is intact: same contents, owner and modes.
  6. Other packages, APT sources and indexes, and the archives in /srv/package-lab are unchanged.

Constraints

  • There's no internet; no need to refresh indexes or upgrade system packages.
  • Don't bypass dependencies with --force-… options or edit the dpkg database by hand.
  • Don't remove packages together with their configuration (purge): the local setting is needed.

The tools you need are already installed. There's no internet on this machine.

Visible only to you. Saved as you type.

All notes

Lab goals

0 of 6
  • lab-pkg-report is installed and configured at version 2.0-1 — not checked yet
  • lab-pkg-data is installed at version 2.0-1 and report's dependency is met — not checked yet
  • Package files come from release 2.0-1, and the program run as student prints the new report — not checked yet
  • /etc/lab-pkg-report.conf kept mode=training and is still the package's conffile — not checked yet
  • The note in ~/pkg-notes is intact with the same owner and modes — not checked yet
  • Other packages, APT and the supplied archives are unchanged — not checked yet

Hints

0 of 3 open · they open one at a time
Hint 1
Show the solution after 3 failed checks

Leave the lab?

The machine keeps running for 10 more minutes, then it is removed. Files are lost; completed goals stay.

Loading…