add debian bullseye support

This commit is contained in:
Kevin Olbrich 2020-01-20 09:49:39 +01:00
parent 7b01f8a30c
commit cc00d28e00
8 changed files with 28 additions and 9 deletions

View file

@ -31,7 +31,8 @@ class _ReleaseAlias(_Release):
return self.alias
sid = _Release('sid', 11)
sid = _Release('sid', 12)
bullseye = _Release('bullseye', 11)
buster = _Release('buster', 10)
stretch = _Release('stretch', 9)
jessie = _Release('jessie', 8)
@ -49,9 +50,9 @@ rex = _Release('rex', 1.2)
buzz = _Release('buzz', 1.1)
unstable = _ReleaseAlias('unstable', sid)
testing = _ReleaseAlias('testing', buster)
stable = _ReleaseAlias('stable', stretch)
oldstable = _ReleaseAlias('oldstable', jessie)
testing = _ReleaseAlias('testing', bullseye)
stable = _ReleaseAlias('stable', buster)
oldstable = _ReleaseAlias('oldstable', stretch)
def get_release(release_name):

View file

@ -14,6 +14,9 @@ stretch: |
buster: |
auto eth0
iface eth0 inet dhcp
bullseye: |
auto eth0
iface eth0 inet dhcp
sid: |
auto eth0
iface eth0 inet dhcp

View file

@ -15,6 +15,7 @@ properties:
- stable
- stretch
- buster
- bullseye
- testing
- sid
- unstable

View file

@ -3,10 +3,11 @@ from bootstrapvz.base import Task
from bootstrapvz.common import phases
from bootstrapvz.common.tasks import apt
from bootstrapvz.common.exceptions import TaskError
from bootstrapvz.common.releases import jessie, wheezy, stretch, buster
from bootstrapvz.common.releases import jessie, wheezy, stretch, buster, bullseye
from bootstrapvz.common.tools import sed_i, log_check_call, rel_path
ASSETS_DIR_BULLSEYE = rel_path(__file__, 'assets/gpg-keyrings-PC1/bullseye')
ASSETS_DIR_BUSTER = rel_path(__file__, 'assets/gpg-keyrings-PC1/buster')
ASSETS_DIR_STRETCH = rel_path(__file__, 'assets/gpg-keyrings-PC1/stretch')
ASSETS_DIR_JESSIE = rel_path(__file__, 'assets/gpg-keyrings-PC1/jessie')
@ -19,7 +20,7 @@ class CheckRequestedDebianRelease(Task):
@classmethod
def run(cls, info):
if info.manifest.release not in (jessie, wheezy, stretch, buster):
if info.manifest.release not in (jessie, wheezy, stretch, buster, bullseye):
msg = 'Debian {info.manifest.release} is not (yet) available in the Puppetlabs.com APT repository.'
raise TaskError(msg)
@ -64,6 +65,8 @@ class InstallPuppetlabsPC1ReleaseKey(Task):
@classmethod
def run(cls, info):
from shutil import copy
if (info.manifest.release == bullseye):
key_path = os.path.join(ASSETS_DIR_BULLSEYE, 'puppetlabs-pc1-keyring.gpg')
if (info.manifest.release == buster):
key_path = os.path.join(ASSETS_DIR_BUSTER, 'puppetlabs-pc1-keyring.gpg')
if (info.manifest.release == stretch):
@ -82,6 +85,8 @@ class AddPuppetlabsPC1SourcesList(Task):
@classmethod
def run(cls, info):
if (info.manifest.release == bullseye):
info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com bullseye PC1')
if (info.manifest.release == buster):
info.source_lists.add('puppetlabs', 'deb http://apt.puppetlabs.com buster PC1')
if (info.manifest.release == stretch):

View file

@ -12,6 +12,9 @@ stretch:
buster:
amd64: linux-image-amd64
i386: linux-image-686-pae
bullseye:
amd64: linux-image-amd64
i386: linux-image-686-pae
sid:
amd64: linux-image-amd64
i386: linux-image-686-pae

View file

@ -8,5 +8,7 @@ stretch:
amd64: linux-image-amd64
buster:
amd64: linux-image-amd64
bullseye:
amd64: linux-image-amd64
sid:
amd64: linux-image-amd64

View file

@ -15,6 +15,10 @@ buster:
amd64: linux-image-amd64
i386: linux-image-686-pae
arm64: linux-image-arm64
bullseye:
amd64: linux-image-amd64
i386: linux-image-686-pae
arm64: linux-image-arm64
sid:
amd64: linux-image-amd64
i386: linux-image-686-pae

View file

@ -35,9 +35,9 @@ def test_not_identity():
def test_alias():
assert releases.oldstable == releases.jessie
assert releases.stable == releases.stretch
assert releases.testing == releases.buster
assert releases.oldstable == releases.stretch
assert releases.stable == releases.buster
assert releases.testing == releases.bullseye
assert releases.unstable == releases.sid