Update debian stretch to buster

This commit is contained in:
jalr 2018-09-26 23:05:42 +02:00
parent 751a4661b5
commit b92561806e
6 changed files with 27 additions and 27 deletions

View file

@ -76,7 +76,7 @@ security_scanner:
services: services:
- docker:dind - docker:dind
script: script:
- make images/debian-stretch.squashfs - make images/debian-buster.squashfs
artifacts: artifacts:
paths: paths:
- images - images

View file

@ -20,7 +20,7 @@ qemu_network = 10.2.2.0
qemu_netmask = 24 qemu_netmask = 24
qemu_vm_ip = 10.2.2.10 qemu_vm_ip = 10.2.2.10
qemu_disk = tmp/qemu-disk.img qemu_disk = tmp/qemu-disk.img
qemu_target ?= debian-stretch qemu_target ?= debian-buster
qemu_kernel = $(qemu_target).linux qemu_kernel = $(qemu_target).linux
qemu_torrent = $(qemu_target).torrent qemu_torrent = $(qemu_target).torrent
qemu_initramfs = $(shell \ qemu_initramfs = $(shell \
@ -33,7 +33,7 @@ fi \
ci_environment=$(shell env | sed -n 's/^\(CI_.*\)=.*/-e \1/p') ci_environment=$(shell env | sed -n 's/^\(CI_.*\)=.*/-e \1/p')
.PHONY: default .PHONY: default
default: builderimg images/debian-stretch.squashfs default: builderimg images/debian-buster.squashfs
.PHONY: clean .PHONY: clean
clean: clean:
@ -52,7 +52,7 @@ images:
[ ! -d "$@" ] && mkdir "$@" [ ! -d "$@" ] && mkdir "$@"
touch "$@" touch "$@"
images/debian-stretch.squashfs: images images/debian-buster.squashfs: images
docker run \ docker run \
--rm \ --rm \
-v /var/run/docker.sock:/var/run/docker.sock \ -v /var/run/docker.sock:/var/run/docker.sock \
@ -67,9 +67,9 @@ images/debian-stretch.squashfs: images
-e "COMPRESSION_LEVEL=$(COMPRESSION_LEVEL)" \ -e "COMPRESSION_LEVEL=$(COMPRESSION_LEVEL)" \
$(ci_environment) \ $(ci_environment) \
"$(DOCKER_IMAGE_BUILDER)" \ "$(DOCKER_IMAGE_BUILDER)" \
debian-stretch debian-buster
images/debian-stretch.torrent: images images/debian-buster.torrent: images
docker run \ docker run \
--rm \ --rm \
-v "${PWD}/images:/images" \ -v "${PWD}/images:/images" \
@ -79,7 +79,7 @@ images/debian-stretch.torrent: images
-e "WEBSEED=$(WEBSEED)" \ -e "WEBSEED=$(WEBSEED)" \
-e "TASK=torrent" \ -e "TASK=torrent" \
"$(DOCKER_IMAGE_BUILDER)" \ "$(DOCKER_IMAGE_BUILDER)" \
debian-stretch debian-buster
.PHONY: ansible .PHONY: ansible
ansible: ansible:
@ -102,24 +102,24 @@ ansible:
# updates the initramfs # updates the initramfs
# only used for development # only used for development
images/debian-stretch.initramfs.dev: tmp/initramfs-extracted/debian-stretch packer/initramfs/labsync images/debian-buster.initramfs.dev: tmp/initramfs-extracted/debian-buster packer/initramfs/labsync
cp packer/initramfs/labsync tmp/initramfs-extracted/debian-stretch/scripts/labsync cp packer/initramfs/labsync tmp/initramfs-extracted/debian-buster/scripts/labsync
(cd tmp/initramfs-extracted/debian-stretch && find . | cpio -H newc -o | gzip > $(CWD)/images/debian-stretch.initramfs.dev) (cd tmp/initramfs-extracted/debian-buster && find . | cpio -H newc -o | gzip > $(CWD)/images/debian-buster.initramfs.dev)
tmp: tmp:
[ ! -d "$@" ] && mkdir "$@" || true [ ! -d "$@" ] && mkdir "$@" || true
tmp/initramfs-extracted/debian-stretch: images/debian-stretch.initramfs tmp/initramfs-extracted/debian-buster: images/debian-buster.initramfs
rm -rf tmp/initramfs-extracted/debian-stretch rm -rf tmp/initramfs-extracted/debian-buster
mkdir -p tmp/initramfs-extracted/debian-stretch mkdir -p tmp/initramfs-extracted/debian-buster
(cd tmp/initramfs-extracted/debian-stretch && zcat "$(CWD)/images/debian-stretch.initramfs" | cpio -i) (cd tmp/initramfs-extracted/debian-buster && zcat "$(CWD)/images/debian-buster.initramfs" | cpio -i)
touch tmp/initramfs-extracted/debian-stretch touch tmp/initramfs-extracted/debian-buster
$(qemu_disk): tmp $(qemu_disk): tmp
qemu-img create "$@" 20G qemu-img create "$@" 20G
tmp/netboot.tar.gz: tmp tmp/netboot.tar.gz: tmp
wget -c -O "$@" https://cdn-aws.deb.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/netboot.tar.gz wget -c -O "$@" https://cdn-aws.deb.debian.org/debian/dists/buster/main/installer-amd64/current/images/netboot/netboot.tar.gz
touch "$@" touch "$@"
tmp/tftproot: tmp/netboot.tar.gz tmp/tftproot: tmp/netboot.tar.gz

View file

@ -11,20 +11,20 @@
- name: configure main repo - name: configure main repo
apt_repository: apt_repository:
filename: "{{ ansible_distribution_release }}" filename: "{{ ansible_lsb.codename }}"
repo: "deb {{ debian_mirror }} {{ ansible_distribution_release }} {{ debian_sections | join(' ') }}" repo: "deb {{ debian_mirror }} {{ ansible_lsb.codename }} {{ debian_sections | join(' ') }}"
state: present state: present
- name: configure updates repo - name: configure updates repo
apt_repository: apt_repository:
filename: "{{ ansible_distribution_release }}-updates" filename: "{{ ansible_lsb.codename }}-updates"
repo: "deb {{ mirror }} {{ ansible_distribution_release }}-updates {{ debian_sections | join(' ') }}" repo: "deb {{ mirror }} {{ ansible_lsb.codename }}-updates {{ debian_sections | join(' ') }}"
state: present state: present
vars: vars:
mirror: "{{ debian_mirror_updates | default(debian_mirror) }}" mirror: "{{ debian_mirror_updates | default(debian_mirror) }}"
- name: configure security updates repo - name: configure security updates repo
apt_repository: apt_repository:
filename: "{{ ansible_distribution_release }}-security" filename: "{{ ansible_lsb.codename }}-security"
repo: "deb {{ debian_mirror_security }} {{ ansible_distribution_release }}/updates {{ debian_sections | join(' ') }}" repo: "deb {{ debian_mirror_security }} {{ ansible_lsb.codename }}/updates {{ debian_sections | join(' ') }}"
state: present state: present

View file

@ -22,7 +22,7 @@
[ [
{ {
"type": "docker", "type": "docker",
"image": "debian:stretch", "image": "debian:buster",
"discard": true, "discard": true,
"run_command": [ "run_command": [
"-d", "-d",
@ -80,7 +80,7 @@
}, },
{ {
"type": "shell", "type": "shell",
"inline": [ "apt-get -y install openssh-server python" ] "inline": [ "apt-get -y install openssh-server python lsb-release" ]
}, },
{ {
"type": "ansible", "type": "ansible",

View file

@ -1,4 +1,4 @@
FROM debian:stretch-slim FROM debian:buster-slim
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install \ && apt-get -y install \

View file

@ -1,7 +1,7 @@
label labsync label labsync
menu label ^labsync menu label ^labsync
kernel images/debian-stretch.linux kernel images/debian-buster.linux
append initrd=images/debian-stretch.initramfs.dev boot=labsync labsync_disk=sda labsync_partsize_boot=512 labsync_torrent=http://10.2.2.1/debian-stretch.torrent quiet vga=792 ip=10.2.2.10:::255.255.255.0:qemu-host:ens3:off labsync_wait=pause append initrd=images/debian-buster.initramfs.dev boot=labsync labsync_disk=sda labsync_partsize_boot=512 labsync_torrent=http://10.2.2.1/debian-buster.torrent quiet vga=792 ip=10.2.2.10:::255.255.255.0:qemu-host:ens3:off labsync_wait=pause
label install label install
menu label ^Install menu label ^Install