[pve-devel] [PATCH container 0/8] improve general CT distro detection and enhance suse

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Aug 1 11:28:51 CEST 2017


This add infrastructure to use 'os-release' [1] as a source for detecting
the distribution type and also the version from CT templates.
As 'os-release' was introduced over 5 years ago all supported distros
include it, at least in their current stable/oldstable release.

Further move also the versioning detection for openSUSE to os-release, as
the old one is marked obsolete and its fallback was bad.
This makes it also more easy to add support for the rolling release version
of openSUSE, Tumbleweed.
And, we may allow SLES templates, as requested by:
<https://bugzilla.proxmox.com/show_bug.cgi?id=1464>
SLES and Leap share a common base.

[1]: <http://0pointer.de/blog/projects/os-release>

Thomas Lamprecht (5):
  setup: add a additional mapping for archlinux
  setup/suse: use new os_release_var to simplify version detection
  setup/suse: check early if setting up the ct getty service is needed
  setup/suse: support tumbleweed container
  setup/suse: fix #1464: support SLES 12 container

Wolfgang Bumiller (3):
  setup: support returning a scalar in protected_call
  setup: protected_call: the plugin is not required
  use /etc/os-release

 src/PVE/LXC/Setup.pm                               | 81 ++++++++++++++++++++--
 src/PVE/LXC/Setup/Base.pm                          |  4 +-
 src/PVE/LXC/Setup/SUSE.pm                          | 37 ++++++----
 src/test/test-opensuse-001/etc/SuSE-brand          |  2 -
 src/test/test-opensuse-001/etc/os-release          | 10 +++
 .../lib/systemd/system/container-getty at .service    | 20 ++++++
 src/test/test-opensuse-002/etc/SuSE-brand          |  2 -
 src/test/test-opensuse-002/etc/os-release          | 10 +++
 src/test/test-opensuse-003/etc/SuSE-brand          |  2 -
 src/test/test-opensuse-003/etc/SuSE-release        |  4 ++
 src/test/test-opensuse-003/etc/os-release          | 10 +++
 .../lib/systemd/system/container-getty at .service    | 20 ++++++
 src/test/test-opensuse-004/config                  |  3 +
 src/test/test-opensuse-004/etc/os-release          | 10 +++
 src/test/test-opensuse-004/etc/securetty           |  7 ++
 src/test/test-opensuse-004/etc/securetty.exp       | 12 ++++
 .../etc/sysconfig/network/ifcfg-eth0.exp           |  4 ++
 .../etc/sysconfig/network/ifcfg-eth1.exp           |  2 +
 .../etc/sysconfig/network/ifroute-eth0.exp         |  5 ++
 .../root/.ssh/authorized_keys.exp                  |  3 +
 .../lib/systemd/system/container-getty at .service    | 24 +++++++
 src/test/test-opensuse-005/config                  |  3 +
 src/test/test-opensuse-005/etc/os-release          |  7 ++
 src/test/test-opensuse-005/etc/securetty           |  7 ++
 src/test/test-opensuse-005/etc/securetty.exp       | 12 ++++
 .../etc/sysconfig/network/ifcfg-eth0.exp           |  4 ++
 .../etc/sysconfig/network/ifcfg-eth1.exp           |  2 +
 .../etc/sysconfig/network/ifroute-eth0.exp         |  5 ++
 .../root/.ssh/authorized_keys.exp                  |  3 +
 .../lib/systemd/system/container-getty at .service    | 24 +++++++
 30 files changed, 309 insertions(+), 30 deletions(-)
 delete mode 100644 src/test/test-opensuse-001/etc/SuSE-brand
 create mode 100644 src/test/test-opensuse-001/etc/os-release
 create mode 100644 src/test/test-opensuse-001/usr/lib/systemd/system/container-getty at .service
 delete mode 100644 src/test/test-opensuse-002/etc/SuSE-brand
 create mode 100644 src/test/test-opensuse-002/etc/os-release
 delete mode 100644 src/test/test-opensuse-003/etc/SuSE-brand
 create mode 100644 src/test/test-opensuse-003/etc/SuSE-release
 create mode 100644 src/test/test-opensuse-003/etc/os-release
 create mode 100644 src/test/test-opensuse-003/usr/lib/systemd/system/container-getty at .service
 create mode 100644 src/test/test-opensuse-004/config
 create mode 100644 src/test/test-opensuse-004/etc/os-release
 create mode 100644 src/test/test-opensuse-004/etc/securetty
 create mode 100644 src/test/test-opensuse-004/etc/securetty.exp
 create mode 100644 src/test/test-opensuse-004/etc/sysconfig/network/ifcfg-eth0.exp
 create mode 100644 src/test/test-opensuse-004/etc/sysconfig/network/ifcfg-eth1.exp
 create mode 100644 src/test/test-opensuse-004/etc/sysconfig/network/ifroute-eth0.exp
 create mode 100644 src/test/test-opensuse-004/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-opensuse-004/usr/lib/systemd/system/container-getty at .service
 create mode 100644 src/test/test-opensuse-005/config
 create mode 100644 src/test/test-opensuse-005/etc/os-release
 create mode 100644 src/test/test-opensuse-005/etc/securetty
 create mode 100644 src/test/test-opensuse-005/etc/securetty.exp
 create mode 100644 src/test/test-opensuse-005/etc/sysconfig/network/ifcfg-eth0.exp
 create mode 100644 src/test/test-opensuse-005/etc/sysconfig/network/ifcfg-eth1.exp
 create mode 100644 src/test/test-opensuse-005/etc/sysconfig/network/ifroute-eth0.exp
 create mode 100644 src/test/test-opensuse-005/root/.ssh/authorized_keys.exp
 create mode 100644 src/test/test-opensuse-005/usr/lib/systemd/system/container-getty at .service

-- 
2.11.0





More information about the pve-devel mailing list