From e940167696f9641de6ef449978d0db69878ffcd4 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 20 Dec 2016 05:36:10 +0000 Subject: [PATCH 01/48] current --- defaults/main.yml | 3 + files/1160-openssh-server | 49 +++++++++++++++ tasks/main.yml | 102 ++++++++++++++++++++++++++++++++ templates/common.list.chroot.j2 | 3 + templates/custom.list.chroot.j2 | 3 + templates/isolinux.cfg.j2 | 5 ++ templates/lb-config-args.j2 | 11 ++++ vars/main.yml | 3 + 8 files changed, 179 insertions(+) create mode 100644 defaults/main.yml create mode 100755 files/1160-openssh-server create mode 100644 tasks/main.yml create mode 100644 templates/common.list.chroot.j2 create mode 100644 templates/custom.list.chroot.j2 create mode 100644 templates/isolinux.cfg.j2 create mode 100644 templates/lb-config-args.j2 create mode 100644 vars/main.yml diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..def9d97 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,3 @@ +live_build_serial: no +live_build_bootappend_live: boot=live components quiet {{ live_build_serial | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} +live_build_hostname: "{{ inventory_hostname }}" \ No newline at end of file diff --git a/files/1160-openssh-server b/files/1160-openssh-server new file mode 100755 index 0000000..0df712f --- /dev/null +++ b/files/1160-openssh-server @@ -0,0 +1,49 @@ +#!/bin/sh + +## live-config(7) - System Configuration Components +## Copyright (C) 2006-2014 Daniel Baumann +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +#set -e + +Init () +{ + # Checking if package is installed or already configured + if [ ! -e /var/lib/dpkg/info/openssh-server.list ] || \ + [ -e /var/lib/live/config/openssh-server ] + then + exit 0 + fi + + echo -n " openssh-server" +} + +Config () +{ + for _PROTOCOL in dsa rsa ecdsa ed25519 + do + if [ ! -e /etc/ssh/ssh_host_${_PROTOCOL}_key ] && + grep -qs ssh_host_${_PROTOCOL}_key /etc/ssh/sshd_config + then + ssh-keygen -q -f /etc/ssh/ssh_host_${_PROTOCOL}_key -N "" -t ${_PROTOCOL} + + _SSH="true" + fi + done + + sed -i -e 's|#\(PasswordAuthentication\) yes|\1 no|' /etc/ssh/sshd_config + + case "${_SSH}" in + true) + # Creating state file + touch /var/lib/live/config/openssh-server + ;; + esac +} + +Init +Config diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..4a069cb --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,102 @@ +--- + +- setup: + gather_subset: '!all' + +- name: install apt packages + apt: + pkg: "{{ item }}" + state: installed + with_items: + - live-build + - memtest86 + - memtest86+ + +- name: live build directory + file: + path: "{{ live_build_directory }}" + state: directory + +- name: remove config directory + file: + path: "{{ live_build_directory }}/config" + state: absent + +- name: lb clean + command: + lb clean + args: + chdir: "{{ live_build_directory }}" + +- name: lb config + command: + lb config + {{ lookup('template','lb-config-args.j2') }} + args: + chdir: "{{ live_build_directory }}" + +- name: ssh root access + include_role: + name: ssh_root_access + vars: + root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" + +- name: keyboard configuration + include_role: + name: keyboard_configuration + vars: + root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" + when: live_build_serial == false + +- name: include common packages + template: + src: common.list.chroot.j2 + dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" + +- name: include console-setup package + copy: + content: console-setup + dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot" + when: live_build_serial == false + +- name: include custom packages + template: + src: custom.list.chroot.j2 + dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" + when: live_build_custom_packages is defined + +- name: isolinx directory + file: + path: "{{ live_build_directory }}/config/includes.binary/isolinux" + state: directory + +- name: isolinux.cfg + template: + src: isolinux.cfg.j2 + dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" + +- name: fix debian jessie generate ssh host ed25519 keys directory + file: + path: "{{ live_build_directory }}/config/includes.chroot/lib/live/config" + state: directory + when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' + +- name: fix debian jessie generate ssh host ed25519 keys + copy: + src: 1160-openssh-server + dest: "{{ live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" + mode: 755 + when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' + +- name: lb build + command: + lb build + args: + chdir: "{{ live_build_directory }}" + register: _lb_build + +- name: save build log + copy: + content: "{{ _lb_build.stdout }}" + dest: "{{ live_build_directory }}/build.log" + diff --git a/templates/common.list.chroot.j2 b/templates/common.list.chroot.j2 new file mode 100644 index 0000000..00f3b68 --- /dev/null +++ b/templates/common.list.chroot.j2 @@ -0,0 +1,3 @@ +{% for package in live_build_common_packages %} +{{package}} +{% endfor %} diff --git a/templates/custom.list.chroot.j2 b/templates/custom.list.chroot.j2 new file mode 100644 index 0000000..da979d9 --- /dev/null +++ b/templates/custom.list.chroot.j2 @@ -0,0 +1,3 @@ +{% for package in live_build_custom_packages %} +{{package}} +{% endfor %} diff --git a/templates/isolinux.cfg.j2 b/templates/isolinux.cfg.j2 new file mode 100644 index 0000000..7b8b546 --- /dev/null +++ b/templates/isolinux.cfg.j2 @@ -0,0 +1,5 @@ +include live.cfg +default live-amd64 +{% if live_build_serial == true %} +serial 0 +{% endif %} diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 new file mode 100644 index 0000000..606c597 --- /dev/null +++ b/templates/lb-config-args.j2 @@ -0,0 +1,11 @@ +{% if live_build_distribution is defined %} +--distribution "{{ live_build_distribution }}" +{% endif %} +{% if live_build_archive_areas is defined %} +--archive-areas "{{ live_build_archive_areas | join(' ') }}" +{% endif %} +--mirror-bootstrap {{ debian_mirror }} +--mirror-binary {{ debian_mirror }} +{% if live_build_bootappend_live is defined %} +--bootappend-live "{{ live_build_bootappend_live }}" +{% endif %} diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..70a6dc2 --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,3 @@ +live_build_common_packages: + - task-ssh-server + - python From e1d11da2fb9ecbfbdf57370e4da9b7e944fc828b Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 12 May 2017 19:30:53 +0000 Subject: [PATCH 02/48] current --- defaults/main.yml | 8 ++++--- tasks/main.yml | 42 ++++++++++++++++----------------- templates/common.list.chroot.j2 | 4 ++-- templates/custom.list.chroot.j2 | 2 +- templates/isolinux.cfg.j2 | 2 +- templates/lb-config-args.j2 | 12 +++++----- vars/main.yml | 39 ++++++++++++++++++++++++++++-- 7 files changed, 73 insertions(+), 36 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index def9d97..8058558 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,3 +1,5 @@ -live_build_serial: no -live_build_bootappend_live: boot=live components quiet {{ live_build_serial | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} -live_build_hostname: "{{ inventory_hostname }}" \ No newline at end of file +debian_mirror: http://deb.debian.org/debian + +debian_live_build_serial_console: false +debian_live_build_bootappend_live: boot=live components quiet {{ debian_live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ debian_live_build_hostname }} +debian_live_build_hostname: "{{ inventory_hostname }}" diff --git a/tasks/main.yml b/tasks/main.yml index 4a069cb..b95c910 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,91 +12,91 @@ - memtest86 - memtest86+ -- name: live build directory +- name: debian live-build directory file: - path: "{{ live_build_directory }}" + path: "{{ debian_live_build_directory }}" state: directory - name: remove config directory file: - path: "{{ live_build_directory }}/config" + path: "{{ debian_live_build_directory }}/config" state: absent - name: lb clean command: lb clean args: - chdir: "{{ live_build_directory }}" + chdir: "{{ debian_live_build_directory }}" + when: live_build_clean is defined and live_build_clean - name: lb config command: lb config {{ lookup('template','lb-config-args.j2') }} args: - chdir: "{{ live_build_directory }}" + chdir: "{{ debian_live_build_directory }}" - name: ssh root access include_role: name: ssh_root_access vars: - root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" + root_target_directory: "{{ debian_live_build_directory }}/config/includes.chroot/" - name: keyboard configuration include_role: name: keyboard_configuration vars: - root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - when: live_build_serial == false + root_target_directory: "{{ debian_live_build_directory }}/config/includes.chroot/" + when: debian_live_build_serial_console == false - name: include common packages template: src: common.list.chroot.j2 - dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" + dest: "{{ debian_live_build_directory }}/config/package-lists/common.list.chroot" - name: include console-setup package copy: content: console-setup - dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot" - when: live_build_serial == false + dest: "{{ debian_live_build_directory }}/config/package-lists/console-setup.list.chroot" + when: debian_live_build_serial_console == false - name: include custom packages template: src: custom.list.chroot.j2 - dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" - when: live_build_custom_packages is defined + dest: "{{ debian_live_build_directory }}/config/package-lists/custom.list.chroot" + when: debian_live_build_custom_packages is defined - name: isolinx directory file: - path: "{{ live_build_directory }}/config/includes.binary/isolinux" + path: "{{ debian_live_build_directory }}/config/includes.binary/isolinux" state: directory - name: isolinux.cfg template: src: isolinux.cfg.j2 - dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" + dest: "{{ debian_live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" - name: fix debian jessie generate ssh host ed25519 keys directory file: - path: "{{ live_build_directory }}/config/includes.chroot/lib/live/config" + path: "{{ debian_live_build_directory }}/config/includes.chroot/lib/live/config" state: directory when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' - name: fix debian jessie generate ssh host ed25519 keys copy: src: 1160-openssh-server - dest: "{{ live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" + dest: "{{ debian_live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" mode: 755 when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' - + - name: lb build command: lb build args: - chdir: "{{ live_build_directory }}" + chdir: "{{ debian_live_build_directory }}" register: _lb_build - name: save build log copy: content: "{{ _lb_build.stdout }}" - dest: "{{ live_build_directory }}/build.log" - + dest: "{{ debian_live_build_directory }}/build.log" diff --git a/templates/common.list.chroot.j2 b/templates/common.list.chroot.j2 index 00f3b68..7f87c6a 100644 --- a/templates/common.list.chroot.j2 +++ b/templates/common.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in live_build_common_packages %} -{{package}} +{% for package in debian_live_build_common_packages %} +{{ package }} {% endfor %} diff --git a/templates/custom.list.chroot.j2 b/templates/custom.list.chroot.j2 index da979d9..439b8cb 100644 --- a/templates/custom.list.chroot.j2 +++ b/templates/custom.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in live_build_custom_packages %} +{% for package in debian_live_build_custom_packages %} {{package}} {% endfor %} diff --git a/templates/isolinux.cfg.j2 b/templates/isolinux.cfg.j2 index 7b8b546..6a41761 100644 --- a/templates/isolinux.cfg.j2 +++ b/templates/isolinux.cfg.j2 @@ -1,5 +1,5 @@ include live.cfg default live-amd64 -{% if live_build_serial == true %} +{% if debian_live_build_serial_console == true %} serial 0 {% endif %} diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 606c597..12ec36c 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -1,11 +1,11 @@ -{% if live_build_distribution is defined %} ---distribution "{{ live_build_distribution }}" +{% if debian_live_build_distribution is defined %} +--distribution "{{ debian_live_build_distribution }}" {% endif %} -{% if live_build_archive_areas is defined %} ---archive-areas "{{ live_build_archive_areas | join(' ') }}" +{% if debian_live_build_archive_areas is defined %} +--archive-areas "{{ debian_live_build_archive_areas | join(' ') }}" {% endif %} --mirror-bootstrap {{ debian_mirror }} --mirror-binary {{ debian_mirror }} -{% if live_build_bootappend_live is defined %} ---bootappend-live "{{ live_build_bootappend_live }}" +{% if debian_live_build_bootappend_live is defined %} +--bootappend-live "{{ debian_live_build_bootappend_live }}" {% endif %} diff --git a/vars/main.yml b/vars/main.yml index 70a6dc2..6ba9744 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,3 +1,38 @@ -live_build_common_packages: - - task-ssh-server +debian_live_build_common_packages: + - openssh-server - python + + # hardware utils + - pciutils + - usbutils + - acpi + + # admin tools + - tmux + - rsync + - lsof + - vim + - pv + - less + + # network tools + - iputils-ping + - whois + - nmap + - tcpdump + + - dnsutils + # admin tools + - tmux + - rsync + - lsof + - vim + - pv + - less + + # network tools + - iputils-ping + - whois + - nmap + - tcpdump + - dnsutils From 2bec50c2de63960e520f59ba51ad59cfc6805a63 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 30 Aug 2017 22:17:34 +0000 Subject: [PATCH 03/48] current --- defaults/main.yml | 2 ++ tasks/main.yml | 1 - templates/custom.list.chroot.j2 | 2 +- templates/lb-config-args.j2 | 20 ++++++++++++++++++++ vars/main.yml | 13 ++++++++++++- 5 files changed, 35 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8058558..a1cf333 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,3 +3,5 @@ debian_mirror: http://deb.debian.org/debian debian_live_build_serial_console: false debian_live_build_bootappend_live: boot=live components quiet {{ debian_live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ debian_live_build_hostname }} debian_live_build_hostname: "{{ inventory_hostname }}" + +debian_live_build_distribution: stretch diff --git a/tasks/main.yml b/tasks/main.yml index b95c910..449548a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,7 +27,6 @@ lb clean args: chdir: "{{ debian_live_build_directory }}" - when: live_build_clean is defined and live_build_clean - name: lb config command: diff --git a/templates/custom.list.chroot.j2 b/templates/custom.list.chroot.j2 index 439b8cb..f334167 100644 --- a/templates/custom.list.chroot.j2 +++ b/templates/custom.list.chroot.j2 @@ -1,3 +1,3 @@ {% for package in debian_live_build_custom_packages %} -{{package}} +{{ package }} {% endfor %} diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 12ec36c..e68c123 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -9,3 +9,23 @@ {% if debian_live_build_bootappend_live is defined %} --bootappend-live "{{ debian_live_build_bootappend_live }}" {% endif %} +{% if debian_live_debian_installer is defined %} +--debian-installer "{{ debian_live_debian_installer }}" +{% endif %} +{% if debian_mirror is defined %} +--mirror-binary "{{ debian_mirror }}" +--mirror-binary-updates "{{ debian_mirror }}" +{% if (debian_backports is defined) and (debian_backports == true) %} +--mirror-binary-backports "{{ debian_mirror }}" +{% endif %} +--mirror-debian-installer "{{ debian_mirror }}" +{% endif %} +{% if debian_security_mirror is defined %} +--mirror-binary-security "{{ debian_security_mirror }}" +{% endif %} +{% if (debian_backports is defined) and (debian_backports == true) %} +--backports true +{% endif %} +{% if debian_components is defined %} +--archive-areas {% debian_components | join(",") %} +{% endif %} diff --git a/vars/main.yml b/vars/main.yml index 6ba9744..4cfe32b 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,12 +1,23 @@ debian_live_build_common_packages: - openssh-server - python + - console-setup # hardware utils - pciutils - usbutils - acpi + # hard disk utils + - btrfs-tools + - parted + - mdadm + - cryptsetup + - lvm2 + + # installation utils + - debootstrap + # admin tools - tmux - rsync @@ -20,8 +31,8 @@ debian_live_build_common_packages: - whois - nmap - tcpdump - - dnsutils + # admin tools - tmux - rsync From cb7738af99a5a7d66944f5f1a038435257361691 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:02:09 +0000 Subject: [PATCH 04/48] removed fix for debian jessie --- files/1160-openssh-server | 49 --------------------------------------- tasks/main.yml | 6 ----- 2 files changed, 55 deletions(-) delete mode 100755 files/1160-openssh-server diff --git a/files/1160-openssh-server b/files/1160-openssh-server deleted file mode 100755 index 0df712f..0000000 --- a/files/1160-openssh-server +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -## live-config(7) - System Configuration Components -## Copyright (C) 2006-2014 Daniel Baumann -## -## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. -## This is free software, and you are welcome to redistribute it -## under certain conditions; see COPYING for details. - - -#set -e - -Init () -{ - # Checking if package is installed or already configured - if [ ! -e /var/lib/dpkg/info/openssh-server.list ] || \ - [ -e /var/lib/live/config/openssh-server ] - then - exit 0 - fi - - echo -n " openssh-server" -} - -Config () -{ - for _PROTOCOL in dsa rsa ecdsa ed25519 - do - if [ ! -e /etc/ssh/ssh_host_${_PROTOCOL}_key ] && - grep -qs ssh_host_${_PROTOCOL}_key /etc/ssh/sshd_config - then - ssh-keygen -q -f /etc/ssh/ssh_host_${_PROTOCOL}_key -N "" -t ${_PROTOCOL} - - _SSH="true" - fi - done - - sed -i -e 's|#\(PasswordAuthentication\) yes|\1 no|' /etc/ssh/sshd_config - - case "${_SSH}" in - true) - # Creating state file - touch /var/lib/live/config/openssh-server - ;; - esac -} - -Init -Config diff --git a/tasks/main.yml b/tasks/main.yml index 449548a..8541c5f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -75,12 +75,6 @@ src: isolinux.cfg.j2 dest: "{{ debian_live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" -- name: fix debian jessie generate ssh host ed25519 keys directory - file: - path: "{{ debian_live_build_directory }}/config/includes.chroot/lib/live/config" - state: directory - when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' - - name: fix debian jessie generate ssh host ed25519 keys copy: src: 1160-openssh-server From 424274cbb4247b5e704e751a306e72ec56748c02 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:05:10 +0000 Subject: [PATCH 05/48] rename variables to live_build --- defaults/main.yml | 8 ++++---- tasks/main.yml | 34 ++++++++++++++++----------------- templates/common.list.chroot.j2 | 2 +- templates/custom.list.chroot.j2 | 2 +- templates/isolinux.cfg.j2 | 2 +- templates/lb-config-args.j2 | 12 ++++++------ vars/main.yml | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index a1cf333..0e3416e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,7 +1,7 @@ debian_mirror: http://deb.debian.org/debian -debian_live_build_serial_console: false -debian_live_build_bootappend_live: boot=live components quiet {{ debian_live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ debian_live_build_hostname }} -debian_live_build_hostname: "{{ inventory_hostname }}" +live_build_serial_console: false +live_build_bootappend_live: boot=live components quiet {{ live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} +live_build_hostname: "{{ inventory_hostname }}" -debian_live_build_distribution: stretch +live_build_distribution: stretch diff --git a/tasks/main.yml b/tasks/main.yml index 8541c5f..f362973 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -14,71 +14,71 @@ - name: debian live-build directory file: - path: "{{ debian_live_build_directory }}" + path: "{{ live_build_directory }}" state: directory - name: remove config directory file: - path: "{{ debian_live_build_directory }}/config" + path: "{{ live_build_directory }}/config" state: absent - name: lb clean command: lb clean args: - chdir: "{{ debian_live_build_directory }}" + chdir: "{{ live_build_directory }}" - name: lb config command: lb config {{ lookup('template','lb-config-args.j2') }} args: - chdir: "{{ debian_live_build_directory }}" + chdir: "{{ live_build_directory }}" - name: ssh root access include_role: name: ssh_root_access vars: - root_target_directory: "{{ debian_live_build_directory }}/config/includes.chroot/" + root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - name: keyboard configuration include_role: name: keyboard_configuration vars: - root_target_directory: "{{ debian_live_build_directory }}/config/includes.chroot/" - when: debian_live_build_serial_console == false + root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" + when: live_build_serial_console == false - name: include common packages template: src: common.list.chroot.j2 - dest: "{{ debian_live_build_directory }}/config/package-lists/common.list.chroot" + dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" - name: include console-setup package copy: content: console-setup - dest: "{{ debian_live_build_directory }}/config/package-lists/console-setup.list.chroot" - when: debian_live_build_serial_console == false + dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot" + when: live_build_serial_console == false - name: include custom packages template: src: custom.list.chroot.j2 - dest: "{{ debian_live_build_directory }}/config/package-lists/custom.list.chroot" - when: debian_live_build_custom_packages is defined + dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" + when: live_build_custom_packages is defined - name: isolinx directory file: - path: "{{ debian_live_build_directory }}/config/includes.binary/isolinux" + path: "{{ live_build_directory }}/config/includes.binary/isolinux" state: directory - name: isolinux.cfg template: src: isolinux.cfg.j2 - dest: "{{ debian_live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" + dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" - name: fix debian jessie generate ssh host ed25519 keys copy: src: 1160-openssh-server - dest: "{{ debian_live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" + dest: "{{ live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" mode: 755 when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' @@ -86,10 +86,10 @@ command: lb build args: - chdir: "{{ debian_live_build_directory }}" + chdir: "{{ live_build_directory }}" register: _lb_build - name: save build log copy: content: "{{ _lb_build.stdout }}" - dest: "{{ debian_live_build_directory }}/build.log" + dest: "{{ live_build_directory }}/build.log" diff --git a/templates/common.list.chroot.j2 b/templates/common.list.chroot.j2 index 7f87c6a..fe3391f 100644 --- a/templates/common.list.chroot.j2 +++ b/templates/common.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in debian_live_build_common_packages %} +{% for package in live_build_common_packages %} {{ package }} {% endfor %} diff --git a/templates/custom.list.chroot.j2 b/templates/custom.list.chroot.j2 index f334167..44a77ff 100644 --- a/templates/custom.list.chroot.j2 +++ b/templates/custom.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in debian_live_build_custom_packages %} +{% for package in live_build_custom_packages %} {{ package }} {% endfor %} diff --git a/templates/isolinux.cfg.j2 b/templates/isolinux.cfg.j2 index 6a41761..02adfad 100644 --- a/templates/isolinux.cfg.j2 +++ b/templates/isolinux.cfg.j2 @@ -1,5 +1,5 @@ include live.cfg default live-amd64 -{% if debian_live_build_serial_console == true %} +{% if live_build_serial_console == true %} serial 0 {% endif %} diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index e68c123..03fb497 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -1,13 +1,13 @@ -{% if debian_live_build_distribution is defined %} ---distribution "{{ debian_live_build_distribution }}" +{% if live_build_distribution is defined %} +--distribution "{{ live_build_distribution }}" {% endif %} -{% if debian_live_build_archive_areas is defined %} ---archive-areas "{{ debian_live_build_archive_areas | join(' ') }}" +{% if live_build_archive_areas is defined %} +--archive-areas "{{ live_build_archive_areas | join(' ') }}" {% endif %} --mirror-bootstrap {{ debian_mirror }} --mirror-binary {{ debian_mirror }} -{% if debian_live_build_bootappend_live is defined %} ---bootappend-live "{{ debian_live_build_bootappend_live }}" +{% if live_build_bootappend_live is defined %} +--bootappend-live "{{ live_build_bootappend_live }}" {% endif %} {% if debian_live_debian_installer is defined %} --debian-installer "{{ debian_live_debian_installer }}" diff --git a/vars/main.yml b/vars/main.yml index 4cfe32b..a11c893 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,4 +1,4 @@ -debian_live_build_common_packages: +live_build_common_packages: - openssh-server - python - console-setup From 9068f85557bb2f2f85e7bc3a1a7efef60ce027c3 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:11:55 +0000 Subject: [PATCH 06/48] fix lb-config-args for debian_components --- templates/lb-config-args.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 03fb497..63da45b 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -27,5 +27,5 @@ --backports true {% endif %} {% if debian_components is defined %} ---archive-areas {% debian_components | join(",") %} +--archive-areas {{ debian_components | join(",") }} {% endif %} From e0627217cd7e748aeda3dd952c6956772708c6a4 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:15:12 +0000 Subject: [PATCH 07/48] lb config seems not to have the argument --mirror-binary-updates anymore --- templates/lb-config-args.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 63da45b..eeb989e 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -14,7 +14,6 @@ {% endif %} {% if debian_mirror is defined %} --mirror-binary "{{ debian_mirror }}" ---mirror-binary-updates "{{ debian_mirror }}" {% if (debian_backports is defined) and (debian_backports == true) %} --mirror-binary-backports "{{ debian_mirror }}" {% endif %} From b1420a791c9dab98e28bdb19573a26db14dfae41 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:40:32 +0000 Subject: [PATCH 08/48] clean up lb-config-args.j2 --- templates/lb-config-args.j2 | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index eeb989e..32ea12c 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -1,30 +1,17 @@ {% if live_build_distribution is defined %} --distribution "{{ live_build_distribution }}" {% endif %} -{% if live_build_archive_areas is defined %} ---archive-areas "{{ live_build_archive_areas | join(' ') }}" -{% endif %} --mirror-bootstrap {{ debian_mirror }} --mirror-binary {{ debian_mirror }} {% if live_build_bootappend_live is defined %} --bootappend-live "{{ live_build_bootappend_live }}" {% endif %} -{% if debian_live_debian_installer is defined %} ---debian-installer "{{ debian_live_debian_installer }}" -{% endif %} -{% if debian_mirror is defined %} ---mirror-binary "{{ debian_mirror }}" -{% if (debian_backports is defined) and (debian_backports == true) %} ---mirror-binary-backports "{{ debian_mirror }}" -{% endif %} ---mirror-debian-installer "{{ debian_mirror }}" -{% endif %} {% if debian_security_mirror is defined %} --mirror-binary-security "{{ debian_security_mirror }}" {% endif %} +{% if debian_live_debian_installer is defined %} +--debian-installer "{{ debian_live_debian_installer }}" +{% endif %} {% if (debian_backports is defined) and (debian_backports == true) %} --backports true {% endif %} -{% if debian_components is defined %} ---archive-areas {{ debian_components | join(",") }} -{% endif %} From bc4f4587a6b73ae9d900ae10efc7e09e1ff268a7 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 31 Aug 2017 00:57:58 +0000 Subject: [PATCH 09/48] remove old fix line --- tasks/main.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index f362973..d7ca8f0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -75,13 +75,6 @@ src: isolinux.cfg.j2 dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" -- name: fix debian jessie generate ssh host ed25519 keys - copy: - src: 1160-openssh-server - dest: "{{ live_build_directory }}/config/includes.chroot/lib/live/config/1160-openssh-server" - mode: 755 - when: ansible_distribution == 'Debian' and ansible_distribution_release == 'jessie' - - name: lb build command: lb build From bdfde3ec596c55047a4ad0f288ca42b733117ac8 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Mon, 25 Sep 2017 08:33:21 +0000 Subject: [PATCH 10/48] split build stages --- tasks/main.yml | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index d7ca8f0..99b477c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -75,14 +75,49 @@ src: isolinux.cfg.j2 dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" -- name: lb build +- name: lb bootstrap (first build stage) command: - lb build + lb bootstrap args: chdir: "{{ live_build_directory }}" - register: _lb_build + register: _lb_bootstrap -- name: save build log - copy: - content: "{{ _lb_build.stdout }}" - dest: "{{ live_build_directory }}/build.log" +- name: lb chroot (second build stage) + command: + lb chroot + args: + chdir: "{{ live_build_directory }}" + register: _lb_chroot + +- name: lb installer (third build stage) + command: + lb installer + args: + chdir: "{{ live_build_directory }}" + register: _lb_installer + +- name: lb binary (fourth build stage) + command: + lb binary + args: + chdir: "{{ live_build_directory }}" + register: _lb_binary + +#- name: lb source (fifth build stage) +# command: +# lb source +# args: +# chdir: "{{ live_source_directory }}" +# register: _lb_source + +#- name: lb build +# command: +# lb build +# args: +# chdir: "{{ live_build_directory }}" +# register: _lb_build +# +#- name: save build log +# copy: +# content: "{{ _lb_build.stdout }}" +# dest: "{{ live_build_directory }}/build.log" From c9f3ed3ee82241041e5c32177c0e79be727f2ddc Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 26 Sep 2017 11:22:57 +0000 Subject: [PATCH 11/48] predictable hostnames for virtio --- tasks/main.yml | 10 ++++++++++ templates/virtio.link.j2 | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 templates/virtio.link.j2 diff --git a/tasks/main.yml b/tasks/main.yml index 99b477c..ae71e81 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -48,6 +48,16 @@ root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" when: live_build_serial_console == false +- name: systemd network config directory + file: + path: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network" + state: directory + +- name: name policy for predictable interface names with virtio to mac + template: + src: virtio.link.j2 + dest: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network/20-virtio.link" + - name: include common packages template: src: common.list.chroot.j2 diff --git a/templates/virtio.link.j2 b/templates/virtio.link.j2 new file mode 100644 index 0000000..78c58c9 --- /dev/null +++ b/templates/virtio.link.j2 @@ -0,0 +1,4 @@ +[Match] +Driver=virtio_net +[Link] +NamePolicy=mac From 925f238c1a22bfbb13ddeba39c105c34899348af Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 26 Sep 2017 17:48:45 +0000 Subject: [PATCH 12/48] add resolvconf to common packages --- vars/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/vars/main.yml b/vars/main.yml index a11c893..591fc17 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -47,3 +47,4 @@ live_build_common_packages: - nmap - tcpdump - dnsutils + - resolvconf From 7cb26dbc0afa8e539ae52d407a2daa02d02117f8 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 26 Sep 2017 23:20:00 +0000 Subject: [PATCH 13/48] resolvconf symlink --- tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/main.yml b/tasks/main.yml index ae71e81..fcc6362 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -69,6 +69,13 @@ dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot" when: live_build_serial_console == false +- name: resolvconf symlink + file: + src: /etc/resolvconf/run/resolv.conf + dest: "{{ live_build_directory }}/config/includes.chroot/etc/resolv.conf" + force: yes + state: link + - name: include custom packages template: src: custom.list.chroot.j2 From 231b48695ae3cce6e707564699d6d9dcf34a5c7c Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 27 Sep 2017 23:30:56 +0000 Subject: [PATCH 14/48] do not create systemd.link files --- tasks/main.yml | 10 ---------- templates/virtio.link.j2 | 4 ---- 2 files changed, 14 deletions(-) delete mode 100644 templates/virtio.link.j2 diff --git a/tasks/main.yml b/tasks/main.yml index fcc6362..8448e50 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -48,16 +48,6 @@ root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" when: live_build_serial_console == false -- name: systemd network config directory - file: - path: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network" - state: directory - -- name: name policy for predictable interface names with virtio to mac - template: - src: virtio.link.j2 - dest: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network/20-virtio.link" - - name: include common packages template: src: common.list.chroot.j2 diff --git a/templates/virtio.link.j2 b/templates/virtio.link.j2 deleted file mode 100644 index 78c58c9..0000000 --- a/templates/virtio.link.j2 +++ /dev/null @@ -1,4 +0,0 @@ -[Match] -Driver=virtio_net -[Link] -NamePolicy=mac From 9f49b8ec9dcc7b3811246e37ad6e503ad4c77a6f Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Mon, 30 Oct 2017 18:34:42 +0000 Subject: [PATCH 15/48] root_users role instead of ssh_root_access install fish on live image --- tasks/main.yml | 4 ++-- vars/main.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 8448e50..7194267 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -35,9 +35,9 @@ args: chdir: "{{ live_build_directory }}" -- name: ssh root access +- name: root user include_role: - name: ssh_root_access + name: root_user vars: root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" diff --git a/vars/main.yml b/vars/main.yml index 591fc17..e42bb0a 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -3,6 +3,9 @@ live_build_common_packages: - python - console-setup + # shells + - fish + # hardware utils - pciutils - usbutils From 27160bf73de990c28ef96e283cac222633172f7d Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Mon, 6 Nov 2017 19:31:55 +0000 Subject: [PATCH 16/48] add filesystems tolls --- vars/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vars/main.yml b/vars/main.yml index e42bb0a..b8a51d7 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,6 +18,10 @@ live_build_common_packages: - cryptsetup - lvm2 + # filesystem tools + - btrfs-tools + - dosfstools + # installation utils - debootstrap From 95dff0ef713cd361fe4aa3afcd0adc67bc6c90ff Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Thu, 27 Sep 2018 15:48:43 +0200 Subject: [PATCH 17/48] live build with installer --- defaults/main.yml | 3 +- tasks/main.yml | 53 +++++----------- templates/desktop.list.chroot.j2 | 3 + templates/isolinux.cfg.j2 | 5 -- templates/lb-config-args.j2 | 18 ++++-- templates/preseed.cfg.j2 | 100 +++++++++++++++++++++++++++++++ vars/main.yml | 5 ++ 7 files changed, 138 insertions(+), 49 deletions(-) create mode 100644 templates/desktop.list.chroot.j2 delete mode 100644 templates/isolinux.cfg.j2 create mode 100644 templates/preseed.cfg.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 0e3416e..55390b5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,7 +1,8 @@ debian_mirror: http://deb.debian.org/debian +debian_security_mirror: http://security.debian.org/debian-security live_build_serial_console: false -live_build_bootappend_live: boot=live components quiet {{ live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} +live_build_bootappend_live: boot=live components quiet {{ live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} locales=de_DE.UTF-8 timezone=Europe/Berlin keyboard-layouts=de live_build_hostname: "{{ inventory_hostname }}" live_build_distribution: stretch diff --git a/tasks/main.yml b/tasks/main.yml index 7194267..4fd7992 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -36,35 +36,20 @@ chdir: "{{ live_build_directory }}" - name: root user - include_role: + import_role: name: root_user vars: root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" -- name: keyboard configuration - include_role: - name: keyboard_configuration - vars: - root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - when: live_build_serial_console == false - - name: include common packages template: src: common.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" -- name: include console-setup package - copy: - content: console-setup - dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot" - when: live_build_serial_console == false - -- name: resolvconf symlink - file: - src: /etc/resolvconf/run/resolv.conf - dest: "{{ live_build_directory }}/config/includes.chroot/etc/resolv.conf" - force: yes - state: link +- name: include desktop packages + template: + src: desktop.list.chroot.j2 + dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" - name: include custom packages template: @@ -72,54 +57,48 @@ dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" when: live_build_custom_packages is defined -- name: isolinx directory +- name: debian-installer installer includes directory file: - path: "{{ live_build_directory }}/config/includes.binary/isolinux" + path: "{{ live_build_directory }}/config/includes.installer" state: directory -- name: isolinux.cfg +- name: debian-installer preseed template: - src: isolinux.cfg.j2 - dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg" + src: preseed.cfg.j2 + dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg" - name: lb bootstrap (first build stage) - command: - lb bootstrap + command: lb bootstrap args: chdir: "{{ live_build_directory }}" register: _lb_bootstrap - name: lb chroot (second build stage) - command: - lb chroot + command: lb chroot args: chdir: "{{ live_build_directory }}" register: _lb_chroot - name: lb installer (third build stage) - command: - lb installer + command: lb installer args: chdir: "{{ live_build_directory }}" register: _lb_installer - name: lb binary (fourth build stage) - command: - lb binary + command: lb binary args: chdir: "{{ live_build_directory }}" register: _lb_binary #- name: lb source (fifth build stage) -# command: -# lb source +# command: lb source # args: # chdir: "{{ live_source_directory }}" # register: _lb_source #- name: lb build -# command: -# lb build +# command: lb build # args: # chdir: "{{ live_build_directory }}" # register: _lb_build diff --git a/templates/desktop.list.chroot.j2 b/templates/desktop.list.chroot.j2 new file mode 100644 index 0000000..3ffd921 --- /dev/null +++ b/templates/desktop.list.chroot.j2 @@ -0,0 +1,3 @@ +{% for package in live_build_desktop_packages %} +{{ package }} +{% endfor %} diff --git a/templates/isolinux.cfg.j2 b/templates/isolinux.cfg.j2 deleted file mode 100644 index 02adfad..0000000 --- a/templates/isolinux.cfg.j2 +++ /dev/null @@ -1,5 +0,0 @@ -include live.cfg -default live-amd64 -{% if live_build_serial_console == true %} -serial 0 -{% endif %} diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 32ea12c..e150573 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -1,17 +1,23 @@ {% if live_build_distribution is defined %} --distribution "{{ live_build_distribution }}" {% endif %} ---mirror-bootstrap {{ debian_mirror }} ---mirror-binary {{ debian_mirror }} +--mirror-bootstrap "{{ debian_mirror }}" +--mirror-chroot-security "{{ debian_security_mirror }}" +--mirror-binary "{{ debian_mirror }}" +--mirror-binary-security "{{ debian_security_mirror }}" +{% if debian_nonfree_firmware %} +--firmware-chroot true +{% endif %} {% if live_build_bootappend_live is defined %} --bootappend-live "{{ live_build_bootappend_live }}" {% endif %} -{% if debian_security_mirror is defined %} ---mirror-binary-security "{{ debian_security_mirror }}" +{% if (debian_backports is defined) and (debian_backports == true) %} +--backports true {% endif %} {% if debian_live_debian_installer is defined %} --debian-installer "{{ debian_live_debian_installer }}" +--debian-installer-gui false +{% if debian_nonfree_firmware %} +--firmware-binary true {% endif %} -{% if (debian_backports is defined) and (debian_backports == true) %} ---backports true {% endif %} diff --git a/templates/preseed.cfg.j2 b/templates/preseed.cfg.j2 new file mode 100644 index 0000000..5efc0a4 --- /dev/null +++ b/templates/preseed.cfg.j2 @@ -0,0 +1,100 @@ +#### Contents of the preconfiguration file (for jessie) +### Localization +# Locale +d-i debian-installer/language string de +d-i debian-installer/country string DE +d-i debian-installer/locale string de_DE.UTF-8 + +# Keyboard selection. +d-i keyboard-configuration/xkb-keymap select de +d-i keyboard-configuration/toggle select No toggling + +### Network configuration + +### Network console + +### Hostname +{# +d-i netcfg/hostname string {{inventory_hostname}} +#} + +### Mirror settings +d-i mirror/country string manual +d-i mirror/http/hostname string deb.debian.org +d-i mirror/http/directory string /debian +d-i mirror/http/proxy string + +### Account setup +# Skip creation of a root account (normal user account will be able to +# use sudo). +d-i passwd/root-login boolean true +# Alternatively, to skip creation of a normal user account. +d-i passwd/make-user boolean false + +# Root password +{% if root_password is defined %} +d-i passwd/root-password-crypted password {{ root_password }} +{% endif %} + +### Clock and time zone setup +d-i clock-setup/utc boolean true +d-i time/zone string Europe/Berlin +d-i clock-setup/ntp boolean true +d-i clock-setup/ntp-server string 0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org + +### Partitioning + +## Controlling how partitions are mounted +# The default is to mount by UUID, but you can also choose "traditional" to +# use traditional device names, or "label" to try filesystem labels before +# falling back to UUIDs. +d-i partman/mount_style select uuid + +d-i partman/default_filesystem string btrfs + +### Apt setup +# You can choose to install non-free and contrib software. +d-i apt-setup/non-free boolean {{ debian_nonfree_firmware }} +d-i apt-setup/contrib boolean {{ debian_nonfree_firmware }} +d-i apt-setup/services-select multiselect security,updates +d-i apt-setup/security_host string security.debian.org + +### Package selection +tasksel tasksel/first multiselect minimal + +# Individual additional packages to install +d-i pkgsel/include string openssh-server python python-apt + +# Whether to upgrade packages after debootstrap. +# Allowed values: none, safe-upgrade, full-upgrade +d-i pkgsel/upgrade select full-upgrade + +# Some versions of the installer can report back on what software you have +# installed, and what software you use. The default is not to report back, +# but sending reports helps the project determine what software is most +# popular and include it on CDs. +popularity-contest popularity-contest/participate boolean false + +### Boot loader installation +# This is fairly safe to set, it makes grub install automatically to the MBR +# if no other operating system is detected on the machine. +d-i grub-installer/only_debian boolean true + +# This one makes grub-installer install to the MBR if it also finds some other +# OS, which is less safe as it might not be able to boot that other OS. +d-i grub-installer/with_other_os boolean true + +### Finishing up the installation +# Avoid that last message about the install being complete. +d-i finish-install/reboot_in_progress note + +### Running custom commands during the installation +d-i preseed/late_command string DIR=/target/root/.ssh; \ +mkdir -p $DIR; \ +chmod 700 $DIR; \ +{% if root_ssh_authorized_keys is defined %} +{% for key in root_ssh_authorized_keys %} +echo '{{key}}' >> $DIR/authorized_keys; \ +{% endfor %} +{% endif %} +echo ssh authorized keys configured diff --git a/vars/main.yml b/vars/main.yml index b8a51d7..799551c 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -55,3 +55,8 @@ live_build_common_packages: - tcpdump - dnsutils - resolvconf + +live_build_desktop_packages: + - xfce4 + - i3 + - firefox-esr From c1cf4f141122a40293a1644f7f98e04979640e70 Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Thu, 27 Sep 2018 16:44:09 +0200 Subject: [PATCH 18/48] task desktop xfce --- vars/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/vars/main.yml b/vars/main.yml index 799551c..db905b7 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -60,3 +60,4 @@ live_build_desktop_packages: - xfce4 - i3 - firefox-esr + - task-desktop-xfce From 0dc98f69faffa73c8e6d495e5c73ce253abc4354 Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Fri, 28 Sep 2018 11:12:27 +0200 Subject: [PATCH 19/48] working configuration --- templates/lb-config-args.j2 | 1 + templates/preseed.cfg.j2 | 7 +++---- vars/main.yml | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index e150573..8e6d735 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -6,6 +6,7 @@ --mirror-binary "{{ debian_mirror }}" --mirror-binary-security "{{ debian_security_mirror }}" {% if debian_nonfree_firmware %} +--archive-areas "main contrib non-free" --firmware-chroot true {% endif %} {% if live_build_bootappend_live is defined %} diff --git a/templates/preseed.cfg.j2 b/templates/preseed.cfg.j2 index 5efc0a4..2eb775d 100644 --- a/templates/preseed.cfg.j2 +++ b/templates/preseed.cfg.j2 @@ -73,20 +73,19 @@ d-i pkgsel/upgrade select full-upgrade # installed, and what software you use. The default is not to report back, # but sending reports helps the project determine what software is most # popular and include it on CDs. -popularity-contest popularity-contest/participate boolean false ### Boot loader installation # This is fairly safe to set, it makes grub install automatically to the MBR # if no other operating system is detected on the machine. -d-i grub-installer/only_debian boolean true +#d-i grub-installer/only_debian boolean true # This one makes grub-installer install to the MBR if it also finds some other # OS, which is less safe as it might not be able to boot that other OS. -d-i grub-installer/with_other_os boolean true +#d-i grub-installer/with_other_os boolean true ### Finishing up the installation # Avoid that last message about the install being complete. -d-i finish-install/reboot_in_progress note +#d-i finish-install/reboot_in_progress note ### Running custom commands during the installation d-i preseed/late_command string DIR=/target/root/.ssh; \ diff --git a/vars/main.yml b/vars/main.yml index db905b7..a718c6f 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -60,4 +60,7 @@ live_build_desktop_packages: - xfce4 - i3 - firefox-esr - - task-desktop-xfce + - task-xfce-desktop + - task-german + - task-german-desktop + - debian-installer-launcher From d571c6fe4498b0ad29dbb98c43958abdb595080f Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Fri, 28 Sep 2018 11:36:04 +0200 Subject: [PATCH 20/48] new tasks structure --- tasks/build.yaml | 42 ++++++++++++++++++++++++ tasks/{main.yml => config.yaml} | 58 --------------------------------- tasks/main.yaml | 11 +++++++ tasks/setup.yaml | 9 +++++ 4 files changed, 62 insertions(+), 58 deletions(-) create mode 100644 tasks/build.yaml rename tasks/{main.yml => config.yaml} (51%) create mode 100644 tasks/main.yaml create mode 100644 tasks/setup.yaml diff --git a/tasks/build.yaml b/tasks/build.yaml new file mode 100644 index 0000000..c600108 --- /dev/null +++ b/tasks/build.yaml @@ -0,0 +1,42 @@ +--- + +- name: lb bootstrap (first build stage) + command: lb bootstrap + args: + chdir: "{{ live_build_directory }}" + register: _lb_bootstrap + +- name: lb chroot (second build stage) + command: lb chroot + args: + chdir: "{{ live_build_directory }}" + register: _lb_chroot + +- name: lb installer (third build stage) + command: lb installer + args: + chdir: "{{ live_build_directory }}" + register: _lb_installer + +- name: lb binary (fourth build stage) + command: lb binary + args: + chdir: "{{ live_build_directory }}" + register: _lb_binary + +#- name: lb source (fifth build stage) +# command: lb source +# args: +# chdir: "{{ live_source_directory }}" +# register: _lb_source + +#- name: lb build +# command: lb build +# args: +# chdir: "{{ live_build_directory }}" +# register: _lb_build +# +#- name: save build log +# copy: +# content: "{{ _lb_build.stdout }}" +# dest: "{{ live_build_directory }}/build.log" diff --git a/tasks/main.yml b/tasks/config.yaml similarity index 51% rename from tasks/main.yml rename to tasks/config.yaml index 4fd7992..504c39f 100644 --- a/tasks/main.yml +++ b/tasks/config.yaml @@ -1,22 +1,5 @@ --- -- setup: - gather_subset: '!all' - -- name: install apt packages - apt: - pkg: "{{ item }}" - state: installed - with_items: - - live-build - - memtest86 - - memtest86+ - -- name: debian live-build directory - file: - path: "{{ live_build_directory }}" - state: directory - - name: remove config directory file: path: "{{ live_build_directory }}/config" @@ -66,44 +49,3 @@ template: src: preseed.cfg.j2 dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg" - -- name: lb bootstrap (first build stage) - command: lb bootstrap - args: - chdir: "{{ live_build_directory }}" - register: _lb_bootstrap - -- name: lb chroot (second build stage) - command: lb chroot - args: - chdir: "{{ live_build_directory }}" - register: _lb_chroot - -- name: lb installer (third build stage) - command: lb installer - args: - chdir: "{{ live_build_directory }}" - register: _lb_installer - -- name: lb binary (fourth build stage) - command: lb binary - args: - chdir: "{{ live_build_directory }}" - register: _lb_binary - -#- name: lb source (fifth build stage) -# command: lb source -# args: -# chdir: "{{ live_source_directory }}" -# register: _lb_source - -#- name: lb build -# command: lb build -# args: -# chdir: "{{ live_build_directory }}" -# register: _lb_build -# -#- name: save build log -# copy: -# content: "{{ _lb_build.stdout }}" -# dest: "{{ live_build_directory }}/build.log" diff --git a/tasks/main.yaml b/tasks/main.yaml new file mode 100644 index 0000000..a4b86e8 --- /dev/null +++ b/tasks/main.yaml @@ -0,0 +1,11 @@ +--- + +- import_tasks: setup.yaml + +- name: debian live-build directory + file: + path: "{{ live_build_directory }}" + state: directory + +- import_tasks: config.yaml +- import_tasks: build.yaml diff --git a/tasks/setup.yaml b/tasks/setup.yaml new file mode 100644 index 0000000..3d3d839 --- /dev/null +++ b/tasks/setup.yaml @@ -0,0 +1,9 @@ +--- +- name: install apt packages + apt: + pkg: "{{ item }}" + state: installed + with_items: + - live-build + - memtest86 + - memtest86+ From 10dfab439c332a6086a81c5a6212a644a6e2a141 Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Fri, 28 Sep 2018 11:36:17 +0200 Subject: [PATCH 21/48] also build installer with gui --- templates/lb-config-args.j2 | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 8e6d735..994f061 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -17,7 +17,6 @@ {% endif %} {% if debian_live_debian_installer is defined %} --debian-installer "{{ debian_live_debian_installer }}" ---debian-installer-gui false {% if debian_nonfree_firmware %} --firmware-binary true {% endif %} From 429b9f1850cb59a6d3d58d30c710e23eacfe2ae4 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 16 Nov 2018 13:08:52 +0000 Subject: [PATCH 22/48] default nonfree firmware --- defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 55390b5..55da7f7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,3 +6,5 @@ live_build_bootappend_live: boot=live components quiet {{ live_build_serial_cons live_build_hostname: "{{ inventory_hostname }}" live_build_distribution: stretch + +debian_nonfree_firmware: true From a63105d38784d018e77f79ac62df7449e55dd7cb Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 16 Nov 2018 13:13:25 +0000 Subject: [PATCH 23/48] default build directory --- defaults/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 55da7f7..c776cf1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,3 +8,5 @@ live_build_hostname: "{{ inventory_hostname }}" live_build_distribution: stretch debian_nonfree_firmware: true + +live_build_directory: /opt/live From 3abb6cd89813f756d46d52cbf3da0c67cbb69bc6 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 16 Nov 2018 13:14:14 +0000 Subject: [PATCH 24/48] new apt module format --- tasks/setup.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tasks/setup.yaml b/tasks/setup.yaml index 3d3d839..6dd2643 100644 --- a/tasks/setup.yaml +++ b/tasks/setup.yaml @@ -1,9 +1,7 @@ --- -- name: install apt packages +- name: debian packages apt: - pkg: "{{ item }}" - state: installed - with_items: - - live-build - - memtest86 - - memtest86+ + pkg: + - live-build + - memtest86 + - memtest86+ From e8ed8d284a4f063aaa9c185c6e0bccc47e7ef2d4 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 16 Nov 2018 13:17:15 +0000 Subject: [PATCH 25/48] config args in tasks --- tasks/config.yaml | 30 +++++++++++++++++++++++++++++- templates/lb-config-args.j2 | 23 ----------------------- 2 files changed, 29 insertions(+), 24 deletions(-) delete mode 100644 templates/lb-config-args.j2 diff --git a/tasks/config.yaml b/tasks/config.yaml index 504c39f..9a8f8e6 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -14,7 +14,35 @@ - name: lb config command: lb config - {{ lookup('template','lb-config-args.j2') }} + + {% if live_build_distribution is defined %} + --distribution "{{ live_build_distribution }}" + {% endif %} + + --mirror-bootstrap "{{ debian_mirror }}" + --mirror-chroot-security "{{ debian_security_mirror }}" + --mirror-binary "{{ debian_mirror }}" + --mirror-binary-security "{{ debian_security_mirror }}" + + {% if debian_nonfree_firmware %} + --archive-areas "main contrib non-free" + --firmware-chroot true + {% endif %} + + {% if live_build_bootappend_live is defined %} + --bootappend-live "{{ live_build_bootappend_live }}" + {% endif %} + + {% if (debian_backports is defined) and (debian_backports == true) %} + --backports true + {% endif %} + + {% if debian_live_debian_installer is defined %} + --debian-installer "{{ debian_live_debian_installer }}" + {% if debian_nonfree_firmware %} + --firmware-binary true + {% endif %} + {% endif %} args: chdir: "{{ live_build_directory }}" diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 deleted file mode 100644 index 994f061..0000000 --- a/templates/lb-config-args.j2 +++ /dev/null @@ -1,23 +0,0 @@ -{% if live_build_distribution is defined %} ---distribution "{{ live_build_distribution }}" -{% endif %} ---mirror-bootstrap "{{ debian_mirror }}" ---mirror-chroot-security "{{ debian_security_mirror }}" ---mirror-binary "{{ debian_mirror }}" ---mirror-binary-security "{{ debian_security_mirror }}" -{% if debian_nonfree_firmware %} ---archive-areas "main contrib non-free" ---firmware-chroot true -{% endif %} -{% if live_build_bootappend_live is defined %} ---bootappend-live "{{ live_build_bootappend_live }}" -{% endif %} -{% if (debian_backports is defined) and (debian_backports == true) %} ---backports true -{% endif %} -{% if debian_live_debian_installer is defined %} ---debian-installer "{{ debian_live_debian_installer }}" -{% if debian_nonfree_firmware %} ---firmware-binary true -{% endif %} -{% endif %} From 0757aca4411b7c11d5bafa091a8d362fd665eb38 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 16 Nov 2018 15:28:21 +0000 Subject: [PATCH 26/48] debian installer included by default --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index c776cf1..a0a3a8b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -9,4 +9,5 @@ live_build_distribution: stretch debian_nonfree_firmware: true +debian_live_debian_installer: live live_build_directory: /opt/live From ce62ad65e123d02ed6653f0974033a7d866450a6 Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Mon, 1 Apr 2019 15:33:04 +0200 Subject: [PATCH 27/48] some improvements of installer --- templates/lb-config-args.j2 | 5 +++-- templates/preseed.cfg.j2 | 15 ++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 index 994f061..a68a4e9 100644 --- a/templates/lb-config-args.j2 +++ b/templates/lb-config-args.j2 @@ -15,8 +15,9 @@ {% if (debian_backports is defined) and (debian_backports == true) %} --backports true {% endif %} -{% if debian_live_debian_installer is defined %} ---debian-installer "{{ debian_live_debian_installer }}" +{% if live_build_debian_installer is defined %} +--debian-installer "{{ live_build_debian_installer }}" +--debian-installer-gui false {% if debian_nonfree_firmware %} --firmware-binary true {% endif %} diff --git a/templates/preseed.cfg.j2 b/templates/preseed.cfg.j2 index 2eb775d..ce6f7e6 100644 --- a/templates/preseed.cfg.j2 +++ b/templates/preseed.cfg.j2 @@ -14,9 +14,7 @@ d-i keyboard-configuration/toggle select No toggling ### Network console ### Hostname -{# -d-i netcfg/hostname string {{inventory_hostname}} -#} +{# d-i netcfg/hostname string {{inventory_hostname}} #} ### Mirror settings d-i mirror/country string manual @@ -25,13 +23,8 @@ d-i mirror/http/directory string /debian d-i mirror/http/proxy string ### Account setup -# Skip creation of a root account (normal user account will be able to -# use sudo). d-i passwd/root-login boolean true -# Alternatively, to skip creation of a normal user account. d-i passwd/make-user boolean false - -# Root password {% if root_password is defined %} d-i passwd/root-password-crypted password {{ root_password }} {% endif %} @@ -53,9 +46,9 @@ d-i partman/mount_style select uuid d-i partman/default_filesystem string btrfs ### Apt setup -# You can choose to install non-free and contrib software. -d-i apt-setup/non-free boolean {{ debian_nonfree_firmware }} -d-i apt-setup/contrib boolean {{ debian_nonfree_firmware }} +d-i apt-setup/use_mirror boolean true +d-i apt-setup/non-free boolean {{ debian_nonfree_firmware | default(false) }} +d-i apt-setup/contrib boolean {{ debian_nonfree_firmware | default(false) }} d-i apt-setup/services-select multiselect security,updates d-i apt-setup/security_host string security.debian.org From 83748de9a3c3a98d80d865bbf651937075fd3507 Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Mon, 1 Apr 2019 15:46:33 +0200 Subject: [PATCH 28/48] Merge branch 'master' of git.devops.thengo.intranet:chaotika/ansible-role-live-build --- defaults/main.yml | 5 +++++ tasks/config.yaml | 31 ++++++++++++++++++++++++++++++- tasks/setup.yaml | 12 +++++------- templates/lb-config-args.j2 | 24 ------------------------ 4 files changed, 40 insertions(+), 32 deletions(-) delete mode 100644 templates/lb-config-args.j2 diff --git a/defaults/main.yml b/defaults/main.yml index 55390b5..a0a3a8b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,3 +6,8 @@ live_build_bootappend_live: boot=live components quiet {{ live_build_serial_cons live_build_hostname: "{{ inventory_hostname }}" live_build_distribution: stretch + +debian_nonfree_firmware: true + +debian_live_debian_installer: live +live_build_directory: /opt/live diff --git a/tasks/config.yaml b/tasks/config.yaml index 504c39f..2009671 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -14,7 +14,36 @@ - name: lb config command: lb config - {{ lookup('template','lb-config-args.j2') }} + + {% if live_build_distribution is defined %} + --distribution "{{ live_build_distribution }}" + {% endif %} + + --mirror-bootstrap "{{ debian_mirror }}" + --mirror-chroot-security "{{ debian_security_mirror }}" + --mirror-binary "{{ debian_mirror }}" + --mirror-binary-security "{{ debian_security_mirror }}" + + {% if debian_nonfree_firmware %} + --archive-areas "main contrib non-free" + --firmware-chroot true + {% endif %} + + {% if live_build_bootappend_live is defined %} + --bootappend-live "{{ live_build_bootappend_live }}" + {% endif %} + + {% if (debian_backports is defined) and (debian_backports == true) %} + --backports true + {% endif %} + + {% if debian_live_debian_installer is defined %} + --debian-installer "{{ debian_live_debian_installer }}" + --debian-installer-gui "{{ live_build_debian_installer_gui | default(false) }}" + {% if debian_nonfree_firmware %} + --firmware-binary true + {% endif %} + {% endif %} args: chdir: "{{ live_build_directory }}" diff --git a/tasks/setup.yaml b/tasks/setup.yaml index 3d3d839..6dd2643 100644 --- a/tasks/setup.yaml +++ b/tasks/setup.yaml @@ -1,9 +1,7 @@ --- -- name: install apt packages +- name: debian packages apt: - pkg: "{{ item }}" - state: installed - with_items: - - live-build - - memtest86 - - memtest86+ + pkg: + - live-build + - memtest86 + - memtest86+ diff --git a/templates/lb-config-args.j2 b/templates/lb-config-args.j2 deleted file mode 100644 index a68a4e9..0000000 --- a/templates/lb-config-args.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{% if live_build_distribution is defined %} ---distribution "{{ live_build_distribution }}" -{% endif %} ---mirror-bootstrap "{{ debian_mirror }}" ---mirror-chroot-security "{{ debian_security_mirror }}" ---mirror-binary "{{ debian_mirror }}" ---mirror-binary-security "{{ debian_security_mirror }}" -{% if debian_nonfree_firmware %} ---archive-areas "main contrib non-free" ---firmware-chroot true -{% endif %} -{% if live_build_bootappend_live is defined %} ---bootappend-live "{{ live_build_bootappend_live }}" -{% endif %} -{% if (debian_backports is defined) and (debian_backports == true) %} ---backports true -{% endif %} -{% if live_build_debian_installer is defined %} ---debian-installer "{{ live_build_debian_installer }}" ---debian-installer-gui false -{% if debian_nonfree_firmware %} ---firmware-binary true -{% endif %} -{% endif %} From 44c84d1d70315ce9da7579d78394c7011145e02d Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Mon, 1 Apr 2019 15:53:46 +0200 Subject: [PATCH 29/48] remove merge artefacts --- tasks/config.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tasks/config.yaml b/tasks/config.yaml index 82b3ec2..2009671 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -39,10 +39,7 @@ {% if debian_live_debian_installer is defined %} --debian-installer "{{ debian_live_debian_installer }}" -<<<<<<< HEAD --debian-installer-gui "{{ live_build_debian_installer_gui | default(false) }}" -======= ->>>>>>> b3ddf4d5d15d8494bd5a720b8835e4e587db7973 {% if debian_nonfree_firmware %} --firmware-binary true {% endif %} From dec36a71caaadb019d539bca0918ca0fe4af0d68 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 19:03:16 +0000 Subject: [PATCH 30/48] added config files --- .../live/0010-disable-kexec-tools.hook.chroot | 1 + .../0050-disable-sysvinit-tmpfs.hook.chroot | 1 + .../0020-create-mtab-symlink.hook.chroot | 1 + .../normal/0030-enable-cryptsetup.hook.chroot | 1 + .../0040-create-locales-files.hook.chroot | 1 + ...0-remove-adjtime-configuration.hook.chroot | 1 + .../0110-remove-backup-files.hook.chroot | 1 + .../0120-remove-dbus-machine-id.hook.chroot | 1 + .../0130-remove-gnome-icon-cache.hook.chroot | 1 + .../normal/0140-remove-log-files.hook.chroot | 1 + ...150-remove-mdadm-configuration.hook.chroot | 1 + ...emove-openssh-server-host-keys.hook.chroot | 1 + .../normal/0170-remove-python-py.hook.chroot | 1 + ...0180-remove-systemd-machine-id.hook.chroot | 1 + .../0190-remove-temporary-files.hook.chroot | 1 + .../0195-remove-ssl-cert-snakeoil.hook.chroot | 1 + ...emove-udev-persistent-cd-rules.hook.chroot | 1 + ...move-udev-persistent-net-rules.hook.chroot | 1 + .../0400-update-apt-file-cache.hook.chroot | 1 + .../0410-update-apt-xapian-index.hook.chroot | 1 + .../0420-update-glx-alternative.hook.chroot | 1 + .../0430-update-mlocate-database.hook.chroot | 1 + ...0440-update-nvidia-alternative.hook.chroot | 1 + files/config/package-lists/live.list.chroot | 3 + templates/config/binary.j2 | 158 ++++++++++++++++++ templates/config/bootstrap.j2 | 73 ++++++++ templates/config/build.j2 | 10 ++ templates/config/chroot.j2 | 37 ++++ templates/config/common.j2 | 119 +++++++++++++ templates/config/source.j2 | 9 + 30 files changed, 432 insertions(+) create mode 120000 files/config/hooks/live/0010-disable-kexec-tools.hook.chroot create mode 120000 files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot create mode 120000 files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot create mode 120000 files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot create mode 120000 files/config/hooks/normal/0040-create-locales-files.hook.chroot create mode 120000 files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot create mode 120000 files/config/hooks/normal/0110-remove-backup-files.hook.chroot create mode 120000 files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot create mode 120000 files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot create mode 120000 files/config/hooks/normal/0140-remove-log-files.hook.chroot create mode 120000 files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot create mode 120000 files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot create mode 120000 files/config/hooks/normal/0170-remove-python-py.hook.chroot create mode 120000 files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot create mode 120000 files/config/hooks/normal/0190-remove-temporary-files.hook.chroot create mode 120000 files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot create mode 120000 files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot create mode 120000 files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot create mode 120000 files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot create mode 120000 files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot create mode 120000 files/config/hooks/normal/0420-update-glx-alternative.hook.chroot create mode 120000 files/config/hooks/normal/0430-update-mlocate-database.hook.chroot create mode 120000 files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot create mode 100644 files/config/package-lists/live.list.chroot create mode 100644 templates/config/binary.j2 create mode 100644 templates/config/bootstrap.j2 create mode 100644 templates/config/build.j2 create mode 100644 templates/config/chroot.j2 create mode 100644 templates/config/common.j2 create mode 100644 templates/config/source.j2 diff --git a/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot b/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot new file mode 120000 index 0000000..996f766 --- /dev/null +++ b/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/live/0010-disable-kexec-tools.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot b/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot new file mode 120000 index 0000000..5ddf090 --- /dev/null +++ b/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot b/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot new file mode 120000 index 0000000..58123fc --- /dev/null +++ b/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0020-create-mtab-symlink.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot b/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot new file mode 120000 index 0000000..c5ab625 --- /dev/null +++ b/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0030-enable-cryptsetup.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0040-create-locales-files.hook.chroot b/files/config/hooks/normal/0040-create-locales-files.hook.chroot new file mode 120000 index 0000000..036e7e0 --- /dev/null +++ b/files/config/hooks/normal/0040-create-locales-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0040-create-locales-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot b/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot new file mode 120000 index 0000000..b0ccdb6 --- /dev/null +++ b/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0100-remove-adjtime-configuration.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0110-remove-backup-files.hook.chroot b/files/config/hooks/normal/0110-remove-backup-files.hook.chroot new file mode 120000 index 0000000..8b68c5c --- /dev/null +++ b/files/config/hooks/normal/0110-remove-backup-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0110-remove-backup-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot b/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot new file mode 120000 index 0000000..4d55b27 --- /dev/null +++ b/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0120-remove-dbus-machine-id.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot b/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot new file mode 120000 index 0000000..54f6a9b --- /dev/null +++ b/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0140-remove-log-files.hook.chroot b/files/config/hooks/normal/0140-remove-log-files.hook.chroot new file mode 120000 index 0000000..2b99cec --- /dev/null +++ b/files/config/hooks/normal/0140-remove-log-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0140-remove-log-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot b/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot new file mode 120000 index 0000000..0c3cd2f --- /dev/null +++ b/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0150-remove-mdadm-configuration.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot b/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot new file mode 120000 index 0000000..e57b8d2 --- /dev/null +++ b/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0170-remove-python-py.hook.chroot b/files/config/hooks/normal/0170-remove-python-py.hook.chroot new file mode 120000 index 0000000..858a942 --- /dev/null +++ b/files/config/hooks/normal/0170-remove-python-py.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0170-remove-python-py.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot b/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot new file mode 120000 index 0000000..6cecf66 --- /dev/null +++ b/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0180-remove-systemd-machine-id.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot b/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot new file mode 120000 index 0000000..ada76d9 --- /dev/null +++ b/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot b/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot new file mode 120000 index 0000000..9fc0723 --- /dev/null +++ b/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot b/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot new file mode 120000 index 0000000..f893dcc --- /dev/null +++ b/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot b/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot new file mode 120000 index 0000000..a6ee33d --- /dev/null +++ b/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot b/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot new file mode 120000 index 0000000..380fdcf --- /dev/null +++ b/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0400-update-apt-file-cache.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot b/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot new file mode 120000 index 0000000..dd7150e --- /dev/null +++ b/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0410-update-apt-xapian-index.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot b/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot new file mode 120000 index 0000000..4da25f8 --- /dev/null +++ b/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0420-update-glx-alternative.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot b/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot new file mode 120000 index 0000000..13b49d7 --- /dev/null +++ b/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0430-update-mlocate-database.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot b/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot new file mode 120000 index 0000000..0a65196 --- /dev/null +++ b/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/0440-update-nvidia-alternative.hook.chroot \ No newline at end of file diff --git a/files/config/package-lists/live.list.chroot b/files/config/package-lists/live.list.chroot new file mode 100644 index 0000000..1e6ef96 --- /dev/null +++ b/files/config/package-lists/live.list.chroot @@ -0,0 +1,3 @@ +live-boot +live-config +live-config-systemd diff --git a/templates/config/binary.j2 b/templates/config/binary.j2 new file mode 100644 index 0000000..d575efe --- /dev/null +++ b/templates/config/binary.j2 @@ -0,0 +1,158 @@ +# config/binary - options for live-build(7), binary stage + +# $LB_BINARY_FILESYSTEM: set image filesystem +# (Default: fat32) +LB_BINARY_FILESYSTEM="fat32" + +# $LB_APT_INDICES: set apt/aptitude generic indices +# (Default: true) +LB_APT_INDICES="true" + +# $LB_BOOTAPPEND_LIVE: set boot parameters +# (Default: empty) +LB_BOOTAPPEND_LIVE="boot=live components quiet splash" + +# $LB_BOOTAPPEND_INSTALL: set boot parameters +# (Default: empty) +LB_BOOTAPPEND_INSTALL="" + +# $LB_BOOTAPPEND_LIVE_FAILSAFE: set boot parameters +# (Default: empty) +LB_BOOTAPPEND_LIVE_FAILSAFE="boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal" + +# $LB_BOOTLOADERS: set bootloaders +# (Default: syslinux,grub-efi) +LB_BOOTLOADERS="syslinux,grub-efi" + +# $LB_CHECKSUMS: set checksums +# (Default: md5) +LB_CHECKSUMS="md5" + +# $LB_COMPRESSION: set compression +# (Default: none) +LB_COMPRESSION="none" + +# $LB_ZSYNC: set zsync +# (Default: true) +LB_ZSYNC="true" + +# ${LB_BUILD_WITH_CHROOT: control if we build binary images chrooted +# (Default: true) +# DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to false. +LB_BUILD_WITH_CHROOT="true" + +# $LB_DEBIAN_INSTALLER: set debian-installer +# (Default: false) +LB_DEBIAN_INSTALLER="false" + +# $LB_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite +# (Default: empty) +LB_DEBIAN_INSTALLER_DISTRIBUTION="stretch" + +# $LB_DEBIAN_INSTALLER_PRESEEDFILE: set debian-installer preseed filename/url +# (Default: ) +LB_DEBIAN_INSTALLER_PRESEEDFILE="" + +# $LB_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer +# (Default: true) +LB_DEBIAN_INSTALLER_GUI="true" + +# $LB_GRUB_SPLASH: set custom grub splash +# (Default: empty) +LB_GRUB_SPLASH="" + +# $LB_HDD_LABEL: set hdd label +# (Default: DEBIAN_LIVE) +LB_HDD_LABEL="DEBIAN_LIVE" + +# $LB_HDD_SIZE: set hdd filesystem size +# (Default: auto) +LB_HDD_SIZE="auto" + +# $LB_HDD_PARTITION_START: set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. +# (Default: ) +LB_HDD_PARTITION_START="" + +# $LB_ISO_APPLICATION: set iso author +# (Default: Debian Live) +LB_ISO_APPLICATION="Debian Live" + +# $LB_ISO_PREPARER: set iso preparer +# (Default: live-build $VERSION; http://live-systems.org/devel/live-build) +LB_ISO_PREPARER="live-build $VERSION; http://live-systems.org/devel/live-build" + +# $LB_ISO_PUBLISHER: set iso publisher +# (Default: Live Systems project; http://live-systems.org/; debian-live@lists.debian.org) +LB_ISO_PUBLISHER="Live Systems project; http://live-systems.org/; debian-live@lists.debian.org" + +# $LB_ISO_VOLUME: set iso volume (max 32 chars) +# (Default: Debian stretch $(date +%Y%m%d-%H:%M)) +LB_ISO_VOLUME="Debian stretch $(date +%Y%m%d-%H:%M)" + +# $LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size +# (Default: unset) +LB_JFFS2_ERASEBLOCK="" + +# $LB_MEMTEST: set memtest +# (Default: none) +LB_MEMTEST="none" + +# $LB_LOADLIN: set loadlin +# (Default: false) +LB_LOADLIN="false" + +# $LB_WIN32_LOADER: set win32-loader +# (Default: false) +LB_WIN32_LOADER="false" + +# $LB_NET_ROOT_FILESYSTEM: set netboot filesystem +# (Default: nfs) +LB_NET_ROOT_FILESYSTEM="nfs" + +# $LB_NET_ROOT_MOUNTOPTIONS: set nfsopts +# (Default: empty) +LB_NET_ROOT_MOUNTOPTIONS="" + +# $LB_NET_ROOT_PATH: set netboot server directory +# (Default: /srv/debian-live) +LB_NET_ROOT_PATH="/srv/debian-live" + +# $LB_NET_ROOT_SERVER: set netboot server address +# (Default: 192.168.1.1) +LB_NET_ROOT_SERVER="192.168.1.1" + +# $LB_NET_COW_FILESYSTEM: set net client cow filesystem +# (Default: nfs) +LB_NET_COW_FILESYSTEM="nfs" + +# $LB_NET_COW_MOUNTOPTIONS: set cow mount options +# (Default: empty) +LB_NET_COW_MOUNTOPTIONS="" + +# $LB_NET_COW_PATH: set cow directory +# (Default: ) +LB_NET_COW_PATH="" + +# $LB_NET_COW_SERVER: set cow server +# (Default: ) +LB_NET_COW_SERVER="" + +# $LB_NET_TARBALL: set net tarball +# (Default: true) +LB_NET_TARBALL="true" + +# $LB_FIRMWARE_BINARY: include firmware packages in debian-installer +# (Default: true) +LB_FIRMWARE_BINARY="true" + +# $LB_FIRMWARE_CHROOT: include firmware packages in debian-installer +# (Default: true) +LB_FIRMWARE_CHROOT="true" + +# $LB_SWAP_FILE_PATH: set swap file path +# (Default: ) +LB_SWAP_FILE_PATH="" + +# $LB_SWAP_FILE_SIZE: set swap file size +# (Default: 512) +LB_SWAP_FILE_SIZE="512" diff --git a/templates/config/bootstrap.j2 b/templates/config/bootstrap.j2 new file mode 100644 index 0000000..7d12d94 --- /dev/null +++ b/templates/config/bootstrap.j2 @@ -0,0 +1,73 @@ +# config/bootstrap - options for live-build(7), bootstrap stage + +# $LB_DISTRIBUTION: select distribution to use +# (Default: stretch) +LB_DISTRIBUTION="stretch" + +# $LB_PARENT_DISTRIBUTION: select parent distribution to use +# (Default: stretch) +LB_PARENT_DISTRIBUTION="stretch" + +# $LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use +# (Default: stretch) +LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="stretch" + +# $LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from +# (Default: http://ftp.debian.org/debian/) +LB_PARENT_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" + +# $LB_PARENT_MIRROR_CHROOT: set parent mirror to fetch packages from +# (Default: http://ftp.debian.org/debian/) +LB_PARENT_MIRROR_CHROOT="http://ftp.debian.org/debian/" + +# $LB_PARENT_MIRROR_CHROOT_SECURITY: set security parent mirror to fetch packages from +# (Default: http://security.debian.org/) +LB_PARENT_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# $LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image +# (Default: http://httpredir.debian.org/debian/) +LB_PARENT_MIRROR_BINARY="http://httpredir.debian.org/debian/" + +# $LB_PARENT_MIRROR_BINARY_SECURITY: set security parent mirror which ends up in the image +# (Default: http://security.debian.org/) +LB_PARENT_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# $LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror +# (Default: http://ftp.debian.org/debian/) +LB_PARENT_MIRROR_DEBIAN_INSTALLER="http://ftp.debian.org/debian/" + +# $LB_MIRROR_BOOTSTRAP: set mirror to bootstrap from +# (Default: http://ftp.debian.org/debian/) +LB_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" + +# $LB_MIRROR_CHROOT: set mirror to fetch packages from +# (Default: http://ftp.debian.org/debian/) +LB_MIRROR_CHROOT="http://ftp.debian.org/debian/" + +# $LB_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from +# (Default: http://security.debian.org/) +LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# $LB_MIRROR_BINARY: set mirror which ends up in the image +# (Default: http://httpredir.debian.org/debian/) +LB_MIRROR_BINARY="http://httpredir.debian.org/debian/" + +# $LB_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image +# (Default: http://security.debian.org/) +LB_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# $LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror +# (Default: http://ftp.debian.org/debian/) +LB_MIRROR_DEBIAN_INSTALLER="http://ftp.debian.org/debian/" + +# $LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap +# (Default: ) +LB_BOOTSTRAP_QEMU_ARCHITECTURES="" + +# $LB_BOOTSTRAP_QEMU_EXCLUDE: packages to exclude during foreign bootstrap +# (Default: ) +LB_BOOTSTRAP_QEMU_EXCLUDE="" + +# $LB_BOOTSTRAP_QEMU_STATIC: static qemu binary for foreign bootstrap +# (Default: ) +LB_BOOTSTRAP_QEMU_STATIC="" diff --git a/templates/config/build.j2 b/templates/config/build.j2 new file mode 100644 index 0000000..016eb23 --- /dev/null +++ b/templates/config/build.j2 @@ -0,0 +1,10 @@ +[Image] +Architecture: amd64 +Archive-Areas: main +Distribution: stretch +Mirror-Bootstrap: http://ftp.debian.org/debian/ + +[FIXME] +Configuration-Version: 1:20170213 +Name: live-image +Type: iso-hybrid diff --git a/templates/config/chroot.j2 b/templates/config/chroot.j2 new file mode 100644 index 0000000..4bb1e96 --- /dev/null +++ b/templates/config/chroot.j2 @@ -0,0 +1,37 @@ +# config/chroot - options for live-build(7), chroot stage + +# $LB_CHROOT_FILESYSTEM: set chroot filesystem +# (Default: squashfs) +LB_CHROOT_FILESYSTEM="squashfs" + +# $LB_UNION_FILESYSTEM: set union filesystem +# (Default: overlay) +LB_UNION_FILESYSTEM="overlay" + +# $LB_INTERACTIVE: set interactive build +# (Default: false) +LB_INTERACTIVE="false" + +# $LB_KEYRING_PACKAGES: set keyring packages +# (Default: empty) +LB_KEYRING_PACKAGES="debian-archive-keyring" + +# $LB_LINUX_FLAVOURS: set kernel flavour to use +# (Default: autodetected) +LB_LINUX_FLAVOURS="amd64" + +# $LB_LINUX_PACKAGES: set kernel packages to use +# (Default: autodetected) +LB_LINUX_PACKAGES="linux-image" + +# $LB_SECURITY: enable security updates +# (Default: true) +LB_SECURITY="true" + +# $LB_UPDATES: enable updates updates +# (Default: true) +LB_UPDATES="true" + +# $LB_BACKPORTS: enable backports updates +# (Default: false) +LB_BACKPORTS="false" diff --git a/templates/config/common.j2 b/templates/config/common.j2 new file mode 100644 index 0000000..856f78f --- /dev/null +++ b/templates/config/common.j2 @@ -0,0 +1,119 @@ +# config/common - common options for live-build(7) + +# $LB_APT: set package manager +# (Default: apt) +LB_APT="apt" + +# $LB_APT_FTP_PROXY: set apt/aptitude ftp proxy +# (Default: autodetected or empty) +LB_APT_FTP_PROXY="" + +# $LB_APT_HTTP_PROXY: set apt/aptitude http proxy +# (Default: autodetected or empty) +LB_APT_HTTP_PROXY="" + +# $LB_APT_PIPELINE: set apt/aptitude pipeline depth +# (Default: ) +LB_APT_PIPELINE="" + +# $LB_APT_RECOMMENDS: set apt/aptitude recommends +# (Default: true) +LB_APT_RECOMMENDS="true" + +# $LB_APT_SECURE: set apt/aptitude security +# (Default: true) +LB_APT_SECURE="true" + +# $LB_APT_SOURCE_ARCHIVES: set apt/aptitude source entries in sources.list +# (Default: true) +LB_APT_SOURCE_ARCHIVES="true" + +# $LB_CACHE: control cache +# (Default: true) +LB_CACHE="true" + +# $LB_CACHE_INDICES: control if downloaded package indices should be cached +# (Default: false) +LB_CACHE_INDICES="false" + +# $LB_CACHE_PACKAGES: control if downloaded packages files should be cached +# (Default: true) +LB_CACHE_PACKAGES="true" + +# $LB_CACHE_STAGES: control if completed stages should be cached +# (Default: bootstrap) +LB_CACHE_STAGES="bootstrap" + +# $LB_DEBCONF_FRONTEND: set debconf(1) frontend to use +# (Default: noninteractive) +LB_DEBCONF_FRONTEND="noninteractive" + +# $LB_DEBCONF_PRIORITY: set debconf(1) priority to use +# (Default: critical) +LB_DEBCONF_PRIORITY="critical" + +# $LB_INITRAMFS: set initramfs hook +# (Default: live-boot) +LB_INITRAMFS="live-boot" + +# $LB_INITRAMFS_COMPRESSION: set initramfs compression +# (Default: gzip) +LB_INITRAMFS_COMPRESSION="gzip" + +# $LB_INITSYSTEM: set init system +# (Default: systemd) +LB_INITSYSTEM="systemd" + +# $LB_FDISK: set fdisk program +# (Default: autodetected) +LB_FDISK="fdisk" + +# $LB_LOSETUP: set losetup program +# (Default: autodetected) +LB_LOSETUP="losetup" + +# $LB_MODE: set distribution mode +# (Default: debian) +LB_MODE="debian" + +# $LB_SYSTEM: set system type +# (Default: live) +LB_SYSTEM="live" + +# $LB_TASKSEL: set tasksel program +# (Default: apt) +LB_TASKSEL="apt" + +# live-build options + +# $_BREAKPOINTS: enable breakpoints +# (Default: false) +#_BREAKPOINTS="false" + +# $_DEBUG: enable debug +# (Default: false) +#_DEBUG="false" + +# $_COLOR: enable color +# (Default: false) +#_COLOR="false" + +# $_FORCE: enable force +# (Default: false) +#_FORCE="false" + +# $_QUIET: enable quiet +# (Default: false) +_QUIET="false" + +# $_VERBOSE: enable verbose +# (Default: false) +#_VERBOSE="false" + +# Internal stuff (FIXME) +APT_OPTIONS="--yes" +APTITUDE_OPTIONS="--assume-yes" +DEBOOTSTRAP_OPTIONS="" +DEBOOTSTRAP_SCRIPT="" +GZIP_OPTIONS="-6 --rsyncable" +ISOHYBRID_OPTIONS="" diff --git a/templates/config/source.j2 b/templates/config/source.j2 new file mode 100644 index 0000000..93a022a --- /dev/null +++ b/templates/config/source.j2 @@ -0,0 +1,9 @@ +# config/source - options for live-build(7), source stage + +# $LB_SOURCE: set source option +# (Default: false) +LB_SOURCE="false" + +# $LB_SOURCE_IMAGES: set image type +# (Default: tar) +LB_SOURCE_IMAGES="tar" From 290ba30d4dadea26620fbf3bcb33401f39e64b25 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 19:20:20 +0000 Subject: [PATCH 31/48] move preseed file --- tasks/config.yaml | 2 +- templates/{ => config/includes.installer}/preseed.cfg.j2 | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename templates/{ => config/includes.installer}/preseed.cfg.j2 (100%) diff --git a/tasks/config.yaml b/tasks/config.yaml index 9a8f8e6..b234683 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -75,5 +75,5 @@ - name: debian-installer preseed template: - src: preseed.cfg.j2 + src: config/includes.installer/preseed.cfg.j2 dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg" diff --git a/templates/preseed.cfg.j2 b/templates/config/includes.installer/preseed.cfg.j2 similarity index 100% rename from templates/preseed.cfg.j2 rename to templates/config/includes.installer/preseed.cfg.j2 From 10f249e92d3d4550283144874b8719d41a2ddfce Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 19:25:37 +0000 Subject: [PATCH 32/48] move package lists --- tasks/config.yaml | 6 +++--- templates/{ => config/package-lists}/common.list.chroot.j2 | 0 templates/{ => config/package-lists}/custom.list.chroot.j2 | 0 templates/{ => config/package-lists}/desktop.list.chroot.j2 | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename templates/{ => config/package-lists}/common.list.chroot.j2 (100%) rename templates/{ => config/package-lists}/custom.list.chroot.j2 (100%) rename templates/{ => config/package-lists}/desktop.list.chroot.j2 (100%) diff --git a/tasks/config.yaml b/tasks/config.yaml index b234683..ceedbb7 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -54,17 +54,17 @@ - name: include common packages template: - src: common.list.chroot.j2 + src: config/package-lists/common.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" - name: include desktop packages template: - src: desktop.list.chroot.j2 + src: config/package-lists/desktop.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" - name: include custom packages template: - src: custom.list.chroot.j2 + src: config/package-lists/custom.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" when: live_build_custom_packages is defined diff --git a/templates/common.list.chroot.j2 b/templates/config/package-lists/common.list.chroot.j2 similarity index 100% rename from templates/common.list.chroot.j2 rename to templates/config/package-lists/common.list.chroot.j2 diff --git a/templates/custom.list.chroot.j2 b/templates/config/package-lists/custom.list.chroot.j2 similarity index 100% rename from templates/custom.list.chroot.j2 rename to templates/config/package-lists/custom.list.chroot.j2 diff --git a/templates/desktop.list.chroot.j2 b/templates/config/package-lists/desktop.list.chroot.j2 similarity index 100% rename from templates/desktop.list.chroot.j2 rename to templates/config/package-lists/desktop.list.chroot.j2 From c4942c5c701fcbeb2abaeb4ffb092e4c31c73f1b Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 21:43:25 +0000 Subject: [PATCH 33/48] remove config files --- .../live/0010-disable-kexec-tools.hook.chroot | 1 - .../0050-disable-sysvinit-tmpfs.hook.chroot | 1 - .../0020-create-mtab-symlink.hook.chroot | 1 - .../normal/0030-enable-cryptsetup.hook.chroot | 1 - .../0040-create-locales-files.hook.chroot | 1 - ...0-remove-adjtime-configuration.hook.chroot | 1 - .../0110-remove-backup-files.hook.chroot | 1 - .../0120-remove-dbus-machine-id.hook.chroot | 1 - .../0130-remove-gnome-icon-cache.hook.chroot | 1 - .../normal/0140-remove-log-files.hook.chroot | 1 - ...150-remove-mdadm-configuration.hook.chroot | 1 - ...emove-openssh-server-host-keys.hook.chroot | 1 - .../normal/0170-remove-python-py.hook.chroot | 1 - ...0180-remove-systemd-machine-id.hook.chroot | 1 - .../0190-remove-temporary-files.hook.chroot | 1 - .../0195-remove-ssl-cert-snakeoil.hook.chroot | 1 - ...emove-udev-persistent-cd-rules.hook.chroot | 1 - ...move-udev-persistent-net-rules.hook.chroot | 1 - .../0400-update-apt-file-cache.hook.chroot | 1 - .../0410-update-apt-xapian-index.hook.chroot | 1 - .../0420-update-glx-alternative.hook.chroot | 1 - .../0430-update-mlocate-database.hook.chroot | 1 - ...0440-update-nvidia-alternative.hook.chroot | 1 - files/config/package-lists/live.list.chroot | 3 - templates/config/binary.j2 | 158 ------------------ templates/config/bootstrap.j2 | 73 -------- templates/config/build.j2 | 10 -- templates/config/chroot.j2 | 37 ---- templates/config/common.j2 | 119 ------------- templates/config/source.j2 | 9 - 30 files changed, 432 deletions(-) delete mode 120000 files/config/hooks/live/0010-disable-kexec-tools.hook.chroot delete mode 120000 files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot delete mode 120000 files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot delete mode 120000 files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot delete mode 120000 files/config/hooks/normal/0040-create-locales-files.hook.chroot delete mode 120000 files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot delete mode 120000 files/config/hooks/normal/0110-remove-backup-files.hook.chroot delete mode 120000 files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot delete mode 120000 files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot delete mode 120000 files/config/hooks/normal/0140-remove-log-files.hook.chroot delete mode 120000 files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot delete mode 120000 files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot delete mode 120000 files/config/hooks/normal/0170-remove-python-py.hook.chroot delete mode 120000 files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot delete mode 120000 files/config/hooks/normal/0190-remove-temporary-files.hook.chroot delete mode 120000 files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot delete mode 120000 files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot delete mode 120000 files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot delete mode 120000 files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot delete mode 120000 files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot delete mode 120000 files/config/hooks/normal/0420-update-glx-alternative.hook.chroot delete mode 120000 files/config/hooks/normal/0430-update-mlocate-database.hook.chroot delete mode 120000 files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot delete mode 100644 files/config/package-lists/live.list.chroot delete mode 100644 templates/config/binary.j2 delete mode 100644 templates/config/bootstrap.j2 delete mode 100644 templates/config/build.j2 delete mode 100644 templates/config/chroot.j2 delete mode 100644 templates/config/common.j2 delete mode 100644 templates/config/source.j2 diff --git a/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot b/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot deleted file mode 120000 index 996f766..0000000 --- a/files/config/hooks/live/0010-disable-kexec-tools.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/live/0010-disable-kexec-tools.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot b/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot deleted file mode 120000 index 5ddf090..0000000 --- a/files/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot b/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot deleted file mode 120000 index 58123fc..0000000 --- a/files/config/hooks/normal/0020-create-mtab-symlink.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0020-create-mtab-symlink.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot b/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot deleted file mode 120000 index c5ab625..0000000 --- a/files/config/hooks/normal/0030-enable-cryptsetup.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0030-enable-cryptsetup.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0040-create-locales-files.hook.chroot b/files/config/hooks/normal/0040-create-locales-files.hook.chroot deleted file mode 120000 index 036e7e0..0000000 --- a/files/config/hooks/normal/0040-create-locales-files.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0040-create-locales-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot b/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot deleted file mode 120000 index b0ccdb6..0000000 --- a/files/config/hooks/normal/0100-remove-adjtime-configuration.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0100-remove-adjtime-configuration.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0110-remove-backup-files.hook.chroot b/files/config/hooks/normal/0110-remove-backup-files.hook.chroot deleted file mode 120000 index 8b68c5c..0000000 --- a/files/config/hooks/normal/0110-remove-backup-files.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0110-remove-backup-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot b/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot deleted file mode 120000 index 4d55b27..0000000 --- a/files/config/hooks/normal/0120-remove-dbus-machine-id.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0120-remove-dbus-machine-id.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot b/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot deleted file mode 120000 index 54f6a9b..0000000 --- a/files/config/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0140-remove-log-files.hook.chroot b/files/config/hooks/normal/0140-remove-log-files.hook.chroot deleted file mode 120000 index 2b99cec..0000000 --- a/files/config/hooks/normal/0140-remove-log-files.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0140-remove-log-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot b/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot deleted file mode 120000 index 0c3cd2f..0000000 --- a/files/config/hooks/normal/0150-remove-mdadm-configuration.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0150-remove-mdadm-configuration.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot b/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot deleted file mode 120000 index e57b8d2..0000000 --- a/files/config/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0170-remove-python-py.hook.chroot b/files/config/hooks/normal/0170-remove-python-py.hook.chroot deleted file mode 120000 index 858a942..0000000 --- a/files/config/hooks/normal/0170-remove-python-py.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0170-remove-python-py.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot b/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot deleted file mode 120000 index 6cecf66..0000000 --- a/files/config/hooks/normal/0180-remove-systemd-machine-id.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0180-remove-systemd-machine-id.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot b/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot deleted file mode 120000 index ada76d9..0000000 --- a/files/config/hooks/normal/0190-remove-temporary-files.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot b/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot deleted file mode 120000 index 9fc0723..0000000 --- a/files/config/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot b/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot deleted file mode 120000 index f893dcc..0000000 --- a/files/config/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot b/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot deleted file mode 120000 index a6ee33d..0000000 --- a/files/config/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot b/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot deleted file mode 120000 index 380fdcf..0000000 --- a/files/config/hooks/normal/0400-update-apt-file-cache.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0400-update-apt-file-cache.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot b/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot deleted file mode 120000 index dd7150e..0000000 --- a/files/config/hooks/normal/0410-update-apt-xapian-index.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0410-update-apt-xapian-index.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot b/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot deleted file mode 120000 index 4da25f8..0000000 --- a/files/config/hooks/normal/0420-update-glx-alternative.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0420-update-glx-alternative.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot b/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot deleted file mode 120000 index 13b49d7..0000000 --- a/files/config/hooks/normal/0430-update-mlocate-database.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0430-update-mlocate-database.hook.chroot \ No newline at end of file diff --git a/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot b/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot deleted file mode 120000 index 0a65196..0000000 --- a/files/config/hooks/normal/0440-update-nvidia-alternative.hook.chroot +++ /dev/null @@ -1 +0,0 @@ -/usr/share/live/build/hooks/normal/0440-update-nvidia-alternative.hook.chroot \ No newline at end of file diff --git a/files/config/package-lists/live.list.chroot b/files/config/package-lists/live.list.chroot deleted file mode 100644 index 1e6ef96..0000000 --- a/files/config/package-lists/live.list.chroot +++ /dev/null @@ -1,3 +0,0 @@ -live-boot -live-config -live-config-systemd diff --git a/templates/config/binary.j2 b/templates/config/binary.j2 deleted file mode 100644 index d575efe..0000000 --- a/templates/config/binary.j2 +++ /dev/null @@ -1,158 +0,0 @@ -# config/binary - options for live-build(7), binary stage - -# $LB_BINARY_FILESYSTEM: set image filesystem -# (Default: fat32) -LB_BINARY_FILESYSTEM="fat32" - -# $LB_APT_INDICES: set apt/aptitude generic indices -# (Default: true) -LB_APT_INDICES="true" - -# $LB_BOOTAPPEND_LIVE: set boot parameters -# (Default: empty) -LB_BOOTAPPEND_LIVE="boot=live components quiet splash" - -# $LB_BOOTAPPEND_INSTALL: set boot parameters -# (Default: empty) -LB_BOOTAPPEND_INSTALL="" - -# $LB_BOOTAPPEND_LIVE_FAILSAFE: set boot parameters -# (Default: empty) -LB_BOOTAPPEND_LIVE_FAILSAFE="boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal" - -# $LB_BOOTLOADERS: set bootloaders -# (Default: syslinux,grub-efi) -LB_BOOTLOADERS="syslinux,grub-efi" - -# $LB_CHECKSUMS: set checksums -# (Default: md5) -LB_CHECKSUMS="md5" - -# $LB_COMPRESSION: set compression -# (Default: none) -LB_COMPRESSION="none" - -# $LB_ZSYNC: set zsync -# (Default: true) -LB_ZSYNC="true" - -# ${LB_BUILD_WITH_CHROOT: control if we build binary images chrooted -# (Default: true) -# DO NEVER, *NEVER*, *N*E*V*E*R* SET THIS OPTION to false. -LB_BUILD_WITH_CHROOT="true" - -# $LB_DEBIAN_INSTALLER: set debian-installer -# (Default: false) -LB_DEBIAN_INSTALLER="false" - -# $LB_DEBIAN_INSTALLER_DISTRIBUTION: set debian-installer suite -# (Default: empty) -LB_DEBIAN_INSTALLER_DISTRIBUTION="stretch" - -# $LB_DEBIAN_INSTALLER_PRESEEDFILE: set debian-installer preseed filename/url -# (Default: ) -LB_DEBIAN_INSTALLER_PRESEEDFILE="" - -# $LB_DEBIAN_INSTALLER_GUI: toggle use of GUI debian-installer -# (Default: true) -LB_DEBIAN_INSTALLER_GUI="true" - -# $LB_GRUB_SPLASH: set custom grub splash -# (Default: empty) -LB_GRUB_SPLASH="" - -# $LB_HDD_LABEL: set hdd label -# (Default: DEBIAN_LIVE) -LB_HDD_LABEL="DEBIAN_LIVE" - -# $LB_HDD_SIZE: set hdd filesystem size -# (Default: auto) -LB_HDD_SIZE="auto" - -# $LB_HDD_PARTITION_START: set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. -# (Default: ) -LB_HDD_PARTITION_START="" - -# $LB_ISO_APPLICATION: set iso author -# (Default: Debian Live) -LB_ISO_APPLICATION="Debian Live" - -# $LB_ISO_PREPARER: set iso preparer -# (Default: live-build $VERSION; http://live-systems.org/devel/live-build) -LB_ISO_PREPARER="live-build $VERSION; http://live-systems.org/devel/live-build" - -# $LB_ISO_PUBLISHER: set iso publisher -# (Default: Live Systems project; http://live-systems.org/; debian-live@lists.debian.org) -LB_ISO_PUBLISHER="Live Systems project; http://live-systems.org/; debian-live@lists.debian.org" - -# $LB_ISO_VOLUME: set iso volume (max 32 chars) -# (Default: Debian stretch $(date +%Y%m%d-%H:%M)) -LB_ISO_VOLUME="Debian stretch $(date +%Y%m%d-%H:%M)" - -# $LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size -# (Default: unset) -LB_JFFS2_ERASEBLOCK="" - -# $LB_MEMTEST: set memtest -# (Default: none) -LB_MEMTEST="none" - -# $LB_LOADLIN: set loadlin -# (Default: false) -LB_LOADLIN="false" - -# $LB_WIN32_LOADER: set win32-loader -# (Default: false) -LB_WIN32_LOADER="false" - -# $LB_NET_ROOT_FILESYSTEM: set netboot filesystem -# (Default: nfs) -LB_NET_ROOT_FILESYSTEM="nfs" - -# $LB_NET_ROOT_MOUNTOPTIONS: set nfsopts -# (Default: empty) -LB_NET_ROOT_MOUNTOPTIONS="" - -# $LB_NET_ROOT_PATH: set netboot server directory -# (Default: /srv/debian-live) -LB_NET_ROOT_PATH="/srv/debian-live" - -# $LB_NET_ROOT_SERVER: set netboot server address -# (Default: 192.168.1.1) -LB_NET_ROOT_SERVER="192.168.1.1" - -# $LB_NET_COW_FILESYSTEM: set net client cow filesystem -# (Default: nfs) -LB_NET_COW_FILESYSTEM="nfs" - -# $LB_NET_COW_MOUNTOPTIONS: set cow mount options -# (Default: empty) -LB_NET_COW_MOUNTOPTIONS="" - -# $LB_NET_COW_PATH: set cow directory -# (Default: ) -LB_NET_COW_PATH="" - -# $LB_NET_COW_SERVER: set cow server -# (Default: ) -LB_NET_COW_SERVER="" - -# $LB_NET_TARBALL: set net tarball -# (Default: true) -LB_NET_TARBALL="true" - -# $LB_FIRMWARE_BINARY: include firmware packages in debian-installer -# (Default: true) -LB_FIRMWARE_BINARY="true" - -# $LB_FIRMWARE_CHROOT: include firmware packages in debian-installer -# (Default: true) -LB_FIRMWARE_CHROOT="true" - -# $LB_SWAP_FILE_PATH: set swap file path -# (Default: ) -LB_SWAP_FILE_PATH="" - -# $LB_SWAP_FILE_SIZE: set swap file size -# (Default: 512) -LB_SWAP_FILE_SIZE="512" diff --git a/templates/config/bootstrap.j2 b/templates/config/bootstrap.j2 deleted file mode 100644 index 7d12d94..0000000 --- a/templates/config/bootstrap.j2 +++ /dev/null @@ -1,73 +0,0 @@ -# config/bootstrap - options for live-build(7), bootstrap stage - -# $LB_DISTRIBUTION: select distribution to use -# (Default: stretch) -LB_DISTRIBUTION="stretch" - -# $LB_PARENT_DISTRIBUTION: select parent distribution to use -# (Default: stretch) -LB_PARENT_DISTRIBUTION="stretch" - -# $LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION: select parent distribution for debian-installer to use -# (Default: stretch) -LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="stretch" - -# $LB_PARENT_MIRROR_BOOTSTRAP: set parent mirror to bootstrap from -# (Default: http://ftp.debian.org/debian/) -LB_PARENT_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" - -# $LB_PARENT_MIRROR_CHROOT: set parent mirror to fetch packages from -# (Default: http://ftp.debian.org/debian/) -LB_PARENT_MIRROR_CHROOT="http://ftp.debian.org/debian/" - -# $LB_PARENT_MIRROR_CHROOT_SECURITY: set security parent mirror to fetch packages from -# (Default: http://security.debian.org/) -LB_PARENT_MIRROR_CHROOT_SECURITY="http://security.debian.org/" - -# $LB_PARENT_MIRROR_BINARY: set parent mirror which ends up in the image -# (Default: http://httpredir.debian.org/debian/) -LB_PARENT_MIRROR_BINARY="http://httpredir.debian.org/debian/" - -# $LB_PARENT_MIRROR_BINARY_SECURITY: set security parent mirror which ends up in the image -# (Default: http://security.debian.org/) -LB_PARENT_MIRROR_BINARY_SECURITY="http://security.debian.org/" - -# $LB_PARENT_MIRROR_DEBIAN_INSTALLER: set debian-installer parent mirror -# (Default: http://ftp.debian.org/debian/) -LB_PARENT_MIRROR_DEBIAN_INSTALLER="http://ftp.debian.org/debian/" - -# $LB_MIRROR_BOOTSTRAP: set mirror to bootstrap from -# (Default: http://ftp.debian.org/debian/) -LB_MIRROR_BOOTSTRAP="http://ftp.debian.org/debian/" - -# $LB_MIRROR_CHROOT: set mirror to fetch packages from -# (Default: http://ftp.debian.org/debian/) -LB_MIRROR_CHROOT="http://ftp.debian.org/debian/" - -# $LB_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from -# (Default: http://security.debian.org/) -LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/" - -# $LB_MIRROR_BINARY: set mirror which ends up in the image -# (Default: http://httpredir.debian.org/debian/) -LB_MIRROR_BINARY="http://httpredir.debian.org/debian/" - -# $LB_MIRROR_BINARY_SECURITY: set security mirror which ends up in the image -# (Default: http://security.debian.org/) -LB_MIRROR_BINARY_SECURITY="http://security.debian.org/" - -# $LB_MIRROR_DEBIAN_INSTALLER: set debian-installer mirror -# (Default: http://ftp.debian.org/debian/) -LB_MIRROR_DEBIAN_INSTALLER="http://ftp.debian.org/debian/" - -# $LB_BOOTSTRAP_QEMU_ARCHITECTURES: architectures to use foreign bootstrap -# (Default: ) -LB_BOOTSTRAP_QEMU_ARCHITECTURES="" - -# $LB_BOOTSTRAP_QEMU_EXCLUDE: packages to exclude during foreign bootstrap -# (Default: ) -LB_BOOTSTRAP_QEMU_EXCLUDE="" - -# $LB_BOOTSTRAP_QEMU_STATIC: static qemu binary for foreign bootstrap -# (Default: ) -LB_BOOTSTRAP_QEMU_STATIC="" diff --git a/templates/config/build.j2 b/templates/config/build.j2 deleted file mode 100644 index 016eb23..0000000 --- a/templates/config/build.j2 +++ /dev/null @@ -1,10 +0,0 @@ -[Image] -Architecture: amd64 -Archive-Areas: main -Distribution: stretch -Mirror-Bootstrap: http://ftp.debian.org/debian/ - -[FIXME] -Configuration-Version: 1:20170213 -Name: live-image -Type: iso-hybrid diff --git a/templates/config/chroot.j2 b/templates/config/chroot.j2 deleted file mode 100644 index 4bb1e96..0000000 --- a/templates/config/chroot.j2 +++ /dev/null @@ -1,37 +0,0 @@ -# config/chroot - options for live-build(7), chroot stage - -# $LB_CHROOT_FILESYSTEM: set chroot filesystem -# (Default: squashfs) -LB_CHROOT_FILESYSTEM="squashfs" - -# $LB_UNION_FILESYSTEM: set union filesystem -# (Default: overlay) -LB_UNION_FILESYSTEM="overlay" - -# $LB_INTERACTIVE: set interactive build -# (Default: false) -LB_INTERACTIVE="false" - -# $LB_KEYRING_PACKAGES: set keyring packages -# (Default: empty) -LB_KEYRING_PACKAGES="debian-archive-keyring" - -# $LB_LINUX_FLAVOURS: set kernel flavour to use -# (Default: autodetected) -LB_LINUX_FLAVOURS="amd64" - -# $LB_LINUX_PACKAGES: set kernel packages to use -# (Default: autodetected) -LB_LINUX_PACKAGES="linux-image" - -# $LB_SECURITY: enable security updates -# (Default: true) -LB_SECURITY="true" - -# $LB_UPDATES: enable updates updates -# (Default: true) -LB_UPDATES="true" - -# $LB_BACKPORTS: enable backports updates -# (Default: false) -LB_BACKPORTS="false" diff --git a/templates/config/common.j2 b/templates/config/common.j2 deleted file mode 100644 index 856f78f..0000000 --- a/templates/config/common.j2 +++ /dev/null @@ -1,119 +0,0 @@ -# config/common - common options for live-build(7) - -# $LB_APT: set package manager -# (Default: apt) -LB_APT="apt" - -# $LB_APT_FTP_PROXY: set apt/aptitude ftp proxy -# (Default: autodetected or empty) -LB_APT_FTP_PROXY="" - -# $LB_APT_HTTP_PROXY: set apt/aptitude http proxy -# (Default: autodetected or empty) -LB_APT_HTTP_PROXY="" - -# $LB_APT_PIPELINE: set apt/aptitude pipeline depth -# (Default: ) -LB_APT_PIPELINE="" - -# $LB_APT_RECOMMENDS: set apt/aptitude recommends -# (Default: true) -LB_APT_RECOMMENDS="true" - -# $LB_APT_SECURE: set apt/aptitude security -# (Default: true) -LB_APT_SECURE="true" - -# $LB_APT_SOURCE_ARCHIVES: set apt/aptitude source entries in sources.list -# (Default: true) -LB_APT_SOURCE_ARCHIVES="true" - -# $LB_CACHE: control cache -# (Default: true) -LB_CACHE="true" - -# $LB_CACHE_INDICES: control if downloaded package indices should be cached -# (Default: false) -LB_CACHE_INDICES="false" - -# $LB_CACHE_PACKAGES: control if downloaded packages files should be cached -# (Default: true) -LB_CACHE_PACKAGES="true" - -# $LB_CACHE_STAGES: control if completed stages should be cached -# (Default: bootstrap) -LB_CACHE_STAGES="bootstrap" - -# $LB_DEBCONF_FRONTEND: set debconf(1) frontend to use -# (Default: noninteractive) -LB_DEBCONF_FRONTEND="noninteractive" - -# $LB_DEBCONF_PRIORITY: set debconf(1) priority to use -# (Default: critical) -LB_DEBCONF_PRIORITY="critical" - -# $LB_INITRAMFS: set initramfs hook -# (Default: live-boot) -LB_INITRAMFS="live-boot" - -# $LB_INITRAMFS_COMPRESSION: set initramfs compression -# (Default: gzip) -LB_INITRAMFS_COMPRESSION="gzip" - -# $LB_INITSYSTEM: set init system -# (Default: systemd) -LB_INITSYSTEM="systemd" - -# $LB_FDISK: set fdisk program -# (Default: autodetected) -LB_FDISK="fdisk" - -# $LB_LOSETUP: set losetup program -# (Default: autodetected) -LB_LOSETUP="losetup" - -# $LB_MODE: set distribution mode -# (Default: debian) -LB_MODE="debian" - -# $LB_SYSTEM: set system type -# (Default: live) -LB_SYSTEM="live" - -# $LB_TASKSEL: set tasksel program -# (Default: apt) -LB_TASKSEL="apt" - -# live-build options - -# $_BREAKPOINTS: enable breakpoints -# (Default: false) -#_BREAKPOINTS="false" - -# $_DEBUG: enable debug -# (Default: false) -#_DEBUG="false" - -# $_COLOR: enable color -# (Default: false) -#_COLOR="false" - -# $_FORCE: enable force -# (Default: false) -#_FORCE="false" - -# $_QUIET: enable quiet -# (Default: false) -_QUIET="false" - -# $_VERBOSE: enable verbose -# (Default: false) -#_VERBOSE="false" - -# Internal stuff (FIXME) -APT_OPTIONS="--yes" -APTITUDE_OPTIONS="--assume-yes" -DEBOOTSTRAP_OPTIONS="" -DEBOOTSTRAP_SCRIPT="" -GZIP_OPTIONS="-6 --rsyncable" -ISOHYBRID_OPTIONS="" diff --git a/templates/config/source.j2 b/templates/config/source.j2 deleted file mode 100644 index 93a022a..0000000 --- a/templates/config/source.j2 +++ /dev/null @@ -1,9 +0,0 @@ -# config/source - options for live-build(7), source stage - -# $LB_SOURCE: set source option -# (Default: false) -LB_SOURCE="false" - -# $LB_SOURCE_IMAGES: set image type -# (Default: tar) -LB_SOURCE_IMAGES="tar" From 35e288939effa89aba381cebe116b1328ebee1e6 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 21:46:39 +0000 Subject: [PATCH 34/48] package config files --- .../package-lists/common.list.chroot.j2 | 2 +- .../package-lists/custom.list.chroot.j2 | 2 +- .../package-lists/desktop.list.chroot.j2 | 2 +- vars/main.yml | 47 +++++++------------ 4 files changed, 19 insertions(+), 34 deletions(-) diff --git a/templates/config/package-lists/common.list.chroot.j2 b/templates/config/package-lists/common.list.chroot.j2 index fe3391f..b7a1eb1 100644 --- a/templates/config/package-lists/common.list.chroot.j2 +++ b/templates/config/package-lists/common.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in live_build_common_packages %} +{% for package in live_build_common_packages | unique %} {{ package }} {% endfor %} diff --git a/templates/config/package-lists/custom.list.chroot.j2 b/templates/config/package-lists/custom.list.chroot.j2 index 44a77ff..1b2238c 100644 --- a/templates/config/package-lists/custom.list.chroot.j2 +++ b/templates/config/package-lists/custom.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in live_build_custom_packages %} +{% for package in live_build_custom_packages | unique %} {{ package }} {% endfor %} diff --git a/templates/config/package-lists/desktop.list.chroot.j2 b/templates/config/package-lists/desktop.list.chroot.j2 index 3ffd921..2c99860 100644 --- a/templates/config/package-lists/desktop.list.chroot.j2 +++ b/templates/config/package-lists/desktop.list.chroot.j2 @@ -1,3 +1,3 @@ -{% for package in live_build_desktop_packages %} +{% for package in live_build_desktop_packages | unique %} {{ package }} {% endfor %} diff --git a/vars/main.yml b/vars/main.yml index a718c6f..ac558f2 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -6,6 +6,22 @@ live_build_common_packages: # shells - fish + # admin tools + - tmux + - rsync + - lsof + - vim + - pv + - less + + # network tools + - iputils-ping + - whois + - nmap + - tcpdump + - dnsutils + - resolvconf + # hardware utils - pciutils - usbutils @@ -25,37 +41,6 @@ live_build_common_packages: # installation utils - debootstrap - # admin tools - - tmux - - rsync - - lsof - - vim - - pv - - less - - # network tools - - iputils-ping - - whois - - nmap - - tcpdump - - dnsutils - - # admin tools - - tmux - - rsync - - lsof - - vim - - pv - - less - - # network tools - - iputils-ping - - whois - - nmap - - tcpdump - - dnsutils - - resolvconf - live_build_desktop_packages: - xfce4 - i3 From fe9a605ffcabd2df076cc3d5297cf915ea670185 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 21:47:22 +0000 Subject: [PATCH 35/48] default installer shall be netinst --- defaults/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index a0a3a8b..3569ff6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,12 +2,17 @@ debian_mirror: http://deb.debian.org/debian debian_security_mirror: http://security.debian.org/debian-security live_build_serial_console: false -live_build_bootappend_live: boot=live components quiet {{ live_build_serial_console | ternary('console=ttyS0','') }} hostname={{ live_build_hostname }} locales=de_DE.UTF-8 timezone=Europe/Berlin keyboard-layouts=de -live_build_hostname: "{{ inventory_hostname }}" +live_build_bootappend_live: + boot=live + components + quiet + locales=de_DE.UTF-8 + timezone=Europe/Berlin + keyboard-layouts=de live_build_distribution: stretch debian_nonfree_firmware: true -debian_live_debian_installer: live +debian_live_debian_installer: netinst live_build_directory: /opt/live From 6ffc85f72c0a988b66934119869ae7e41bdd4c5b Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 22:11:08 +0000 Subject: [PATCH 36/48] live setup --- defaults/main.yml | 4 ++++ tasks/config.yaml | 5 ++++- tasks/setup.yaml | 1 - 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3569ff6..b1ac1c8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,3 +16,7 @@ debian_nonfree_firmware: true debian_live_debian_installer: netinst live_build_directory: /opt/live + +live_build_desktop: false + +live_build_iso_publisher: custom diff --git a/tasks/config.yaml b/tasks/config.yaml index baba4ed..112680a 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -44,6 +44,8 @@ --firmware-binary true {% endif %} {% endif %} + + --iso-publisher "{{ live_build_iso_publisher }}" args: chdir: "{{ live_build_directory }}" @@ -62,12 +64,13 @@ template: src: config/package-lists/desktop.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" + when: "{{ live_build_desktop }}" - name: include custom packages template: src: config/package-lists/custom.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" - when: live_build_custom_packages is defined + when: "{{ live_build_custom_packages is defined }}" - name: debian-installer installer includes directory file: diff --git a/tasks/setup.yaml b/tasks/setup.yaml index 6dd2643..b8cddee 100644 --- a/tasks/setup.yaml +++ b/tasks/setup.yaml @@ -3,5 +3,4 @@ apt: pkg: - live-build - - memtest86 - memtest86+ From 88164e60fc37a08f46d46dbea661e9706857eb83 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sat, 13 Apr 2019 22:31:34 +0000 Subject: [PATCH 37/48] error --- tasks/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/config.yaml b/tasks/config.yaml index 112680a..928ec3b 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -64,13 +64,13 @@ template: src: config/package-lists/desktop.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" - when: "{{ live_build_desktop }}" + when: live_build_desktop - name: include custom packages template: src: config/package-lists/custom.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" - when: "{{ live_build_custom_packages is defined }}" + when: live_build_custom_packages is defined - name: debian-installer installer includes directory file: From ea22da56771f4df7f806ea3a868854a938b36af1 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 14 Apr 2019 00:08:33 +0000 Subject: [PATCH 38/48] preseed --- templates/config/includes.installer/preseed.cfg.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/config/includes.installer/preseed.cfg.j2 b/templates/config/includes.installer/preseed.cfg.j2 index ce6f7e6..c2f7223 100644 --- a/templates/config/includes.installer/preseed.cfg.j2 +++ b/templates/config/includes.installer/preseed.cfg.j2 @@ -66,11 +66,12 @@ d-i pkgsel/upgrade select full-upgrade # installed, and what software you use. The default is not to report back, # but sending reports helps the project determine what software is most # popular and include it on CDs. +popularity-contest popularity-contest/participate boolean false ### Boot loader installation # This is fairly safe to set, it makes grub install automatically to the MBR # if no other operating system is detected on the machine. -#d-i grub-installer/only_debian boolean true +d-i grub-installer/only_debian boolean true # This one makes grub-installer install to the MBR if it also finds some other # OS, which is less safe as it might not be able to boot that other OS. From 375bb833c42576d73919ab97cbe78c89de188471 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 14 Apr 2019 00:09:39 +0000 Subject: [PATCH 39/48] desktop per default --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index b1ac1c8..1d00f6c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -17,6 +17,6 @@ debian_nonfree_firmware: true debian_live_debian_installer: netinst live_build_directory: /opt/live -live_build_desktop: false +live_build_desktop: true live_build_iso_publisher: custom From e7d9662d955c7fbccc10ba71e43e59330b6b0ced Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 14 Apr 2019 13:32:55 +0000 Subject: [PATCH 40/48] set nice level of work intensive tasks --- defaults/main.yml | 2 ++ tasks/build.yaml | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1d00f6c..3b4b881 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,3 +20,5 @@ live_build_directory: /opt/live live_build_desktop: true live_build_iso_publisher: custom + +live_build_nice_level: 14 diff --git a/tasks/build.yaml b/tasks/build.yaml index c600108..c101803 100644 --- a/tasks/build.yaml +++ b/tasks/build.yaml @@ -1,25 +1,33 @@ --- - name: lb bootstrap (first build stage) - command: lb bootstrap + command: + nice -n {{ live_build_nice_level }} + lb bootstrap args: chdir: "{{ live_build_directory }}" register: _lb_bootstrap - name: lb chroot (second build stage) - command: lb chroot + command: + nice -n {{ live_build_nice_level }} + lb chroot args: chdir: "{{ live_build_directory }}" register: _lb_chroot - name: lb installer (third build stage) - command: lb installer + command: + nice -n {{ live_build_nice_level }} + lb installer args: chdir: "{{ live_build_directory }}" register: _lb_installer - name: lb binary (fourth build stage) - command: lb binary + command: + nice -n {{ live_build_nice_level }} + lb binary args: chdir: "{{ live_build_directory }}" register: _lb_binary From 777c212e389998592adda80627bdbede1449b9ed Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 6 Aug 2019 11:35:29 +0200 Subject: [PATCH 41/48] debian buster --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3b4b881..3a9e4e9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,7 +10,7 @@ live_build_bootappend_live: timezone=Europe/Berlin keyboard-layouts=de -live_build_distribution: stretch +live_build_distribution: buster debian_nonfree_firmware: true From 5d7afb1d514b924d9c5731dd74e1005e44d90af4 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 17 Sep 2019 08:02:42 +0000 Subject: [PATCH 42/48] current --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1d00f6c..e7a6dcd 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,7 +10,7 @@ live_build_bootappend_live: timezone=Europe/Berlin keyboard-layouts=de -live_build_distribution: stretch +live_build_distribution: buster debian_nonfree_firmware: true From 19c628b634ebf2c9b17eadacdc8102cae1950d94 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Thu, 13 Jan 2022 23:58:01 +0100 Subject: [PATCH 43/48] update distribution to bullseye --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3a9e4e9..a6c4f0b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,7 +10,7 @@ live_build_bootappend_live: timezone=Europe/Berlin keyboard-layouts=de -live_build_distribution: buster +live_build_distribution: bullseye debian_nonfree_firmware: true From 664a807aa4922a421ebf1af655ad459d7c5db227 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 14 Jan 2022 00:40:29 +0100 Subject: [PATCH 44/48] some fixes --- defaults/main.yml | 1 + tasks/config.yaml | 2 +- vars/main.yml | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index a6c4f0b..0ac9cb7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,6 +15,7 @@ live_build_distribution: bullseye debian_nonfree_firmware: true debian_live_debian_installer: netinst +live_build_debian_installer_gui: false live_build_directory: /opt/live live_build_desktop: true diff --git a/tasks/config.yaml b/tasks/config.yaml index 928ec3b..9e87228 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -39,7 +39,7 @@ {% if debian_live_debian_installer is defined %} --debian-installer "{{ debian_live_debian_installer }}" - --debian-installer-gui "{{ live_build_debian_installer_gui | default(false) }}" + --debian-installer-gui "{{ live_build_debian_installer_gui | ternary("true","false") }}" {% if debian_nonfree_firmware %} --firmware-binary true {% endif %} diff --git a/vars/main.yml b/vars/main.yml index ac558f2..d124399 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -28,14 +28,13 @@ live_build_common_packages: - acpi # hard disk utils - - btrfs-tools - parted - mdadm - cryptsetup - lvm2 # filesystem tools - - btrfs-tools + - btrfs-progs - dosfstools # installation utils From ec7b6e488421c843657a47b7b06b61b40248c39c Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 14 Jan 2022 01:22:14 +0100 Subject: [PATCH 45/48] do not build desktop by default --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0ac9cb7..e01eb94 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -18,7 +18,7 @@ debian_live_debian_installer: netinst live_build_debian_installer_gui: false live_build_directory: /opt/live -live_build_desktop: true +live_build_desktop: false live_build_iso_publisher: custom From a09d24d8387d5120d3ad920f4079aec35ad67020 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 14 Jan 2022 18:58:09 +0100 Subject: [PATCH 46/48] linux-surface build --- defaults/main.yml | 2 + .../config/archives/linux-surface.key.chroot | 51 +++++++++++++++++++ .../config/archives/linux-surface.list.chroot | 1 + .../package-lists/linux-surface.list.chroot | 4 ++ tasks/build.yaml | 8 +++ tasks/config.yaml | 13 +++++ 6 files changed, 79 insertions(+) create mode 100644 files/linux-surface/config/archives/linux-surface.key.chroot create mode 100644 files/linux-surface/config/archives/linux-surface.list.chroot create mode 100644 files/linux-surface/config/package-lists/linux-surface.list.chroot diff --git a/defaults/main.yml b/defaults/main.yml index e01eb94..a809c35 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,3 +23,5 @@ live_build_desktop: false live_build_iso_publisher: custom live_build_nice_level: 14 + +live_build_linux_surface: false diff --git a/files/linux-surface/config/archives/linux-surface.key.chroot b/files/linux-surface/config/archives/linux-surface.key.chroot new file mode 100644 index 0000000..34c14ca --- /dev/null +++ b/files/linux-surface/config/archives/linux-surface.key.chroot @@ -0,0 +1,51 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF4mFh4BEADLu7iRoKyoFSCt35hCzl4w9TmtTIaSB7oHsOAlU+PizbSGrnmb +svnu5/kEXCBu2L/vk6rKzoIbgBDOtNE+6WnDOAhzMcQIQ73laIDPxJA5qO/wgaeT +ifhO/JI62Lw48hDRpbYNKqZVabnJ5UZIoKRO13PjSQKl55hexuhdQhSi3nRl6vUE +uQLBVftZP2yn1oep7/weaRhabKHDpjXNkdA8m8lZhD7J95IuaS0COzpwhxUJtCW0 +UE5qRxeOm6QT4yKRDq6PyAvXKHSORdKUxB492BOC7Gb6TABTLgV7mZnZvbuKHf+r +gMAuBcxodvB83O2UgaKtwX9JK8u6RkR9oo0pjhQWt/f4fej3uIxBgJW3ksZrexao +fCwT9p7XYsDZKm8yZO1lelZCg+nTWHEcc4G7tp+PxQxiOxXg2gkLdP7dOrOlynNW +BH6+7cPqhe1w5PonYOSQBae1kwFyI5pE+mxCeOUMWdyu9yWVPbsidXUnz3qH37Hs +0MTvn6s9CYTGnng/+JD+at2PFQTvqkh+9wIo0WKu9g+wUvyo5Ncp5B2FL8jsgTmR +HfKmNzoFNBXtpMJ5qfSEk9YqIGmGb3/pd3baePuDE8V9f3jvhD80Unn/LYQPkePi +UIzYRamoYb+DK/9kYncXO4vdsgwsSds+oSuYpjsYzmfdMC53BixbjF0T5wARAQAB +tA1saW51eC1zdXJmYWNliQJOBBMBCAA4FiEEh976SrlKmaTIwxElVsRkuqxCFFMF +Al4mFh4CGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQVsRkuqxCFFOw2xAA +kc4iDI4zOY3AVwdJ0/Cg6z7XCOdXBZJ4gDtAuHhi9h7UiOzgw6Ey4rvNDHJ64Npg +gPtsG6jocZurOreldrZlc+egPx18wVI8ouuaeiKCO+q7wjs1thxH9I323r4V96ye +7jJ02p3a8nCs1fDjdn9SlP7Ig9axfOdEI5fBhyT1B2RstGEEGqN3ZmAOt8rLSgXd +PQi3VdrsEI4ljOTg6ygCBeNUKH+jJ48QRk7SsgX5rb3ZCF0c6sA4buy0Y4vyVW8S +Qg5VkPz8Oz4+Zm3W+CXawa4LVtzz5twFwWBjhaSnLsRXBZXAu1QU5aIcwsfeQLqX +X4NGtqIa/HV6lw1rA97qmVBq4PNY1QIMZ9xQSoSHDJ1aONhDON5jW0VK7iJr+g+A +0ot42X7OTeYi/lZL6aWVY/DG480eh07oxJyMt/BVoVqbruYsIDluwhP5YEGn9iNr ++V+Kfe7chZzyeqBDjewfHP9FlpNxNfdMa6Xr5nFFrec+wXx5y34/p6WXlukpjy/D +9i5fNCKAUxS74k41C7x2//jF/vFoMJhtDwIwYszp1TS9qfAnbygWZmHBAiB8FjBM +lMmlRcuTyb8bPuhur0CbhtLr+ZOA3yzb54YKgeNrJXU+L/mOLA/Axr6wKppcAcmm +xCEs7a07XWmNPiKLn5KQqjBdRYCEdIaBuRyay36ynAi5Ag0EXiYWHgEQALFXP2NX +46+2t4W82CClZ8tvw+4xLBXHbq4/ejwIJEdUtk/lRUUXEhERELxV/RIOP7R7PoKM +DKVcXAoOSx19ei6SkKBFKJlG8ocavbRXaScc8rtO1iotJggpq79X+t8u6N2SkxOQ +3ynuxS7aI1tOKChMwF9lgcvcG7YpXSLsZLwYgX/msUY0C4Qz3Rsb/74jZuKFeSwl +RcY1fix17+wnoldKlQlcK6sOLUtQ39fcUpd9ktEHQ+s1BhynLvyfEHDXZkZulUpr +63OSjP7gvN6PsF3iShu4fcpB6yWiiQQyCgKq5SlnE0glKbZwfbRWZ2zwYr7NbfPK +3yObvGqBtpIjWguS0mM80d3tkieHlmvqTljx5LiPBhosuCREdnH6GZ5Oa6n6T7m1 +7996XphxcaER9i0fkMB1HfU7ECJjiIOXUVkgUt9rP7F70/EbzsZuBF+NzFoui0ma +u4UcW1f+4QnEldn94BOOGOtV/mqvk7kk/LXplPDgELsZYtpWHNht+9wOsZaT8dQU +sOsI1lKB83hsr3tkgyiWXRcP3561hJG1Vhqx19IKFKKmy3xUemonV2dshP5Kzqd3 +W/FwLUuGWsI6fK0x7ak8G+Hy+AMKMcXblM/oSuMbgu3f/SXKnfvKurIc50QZQWky +97lWjwX6Ek8f1YvkSLuz37dRCEOOpp6UR6S7ABEBAAGJAjYEGAEIACAWIQSH3vpK +uUqZpMjDESVWxGS6rEIUUwUCXiYWHgIbDAAKCRBWxGS6rEIUU9OrD/9cNF7W1Lip +nH/vet4X1Z2mm1fN5iQ/r+jOyLmf9L6LXtAfjDla7oU+X0Kj8FxOZetaRWJfx+vb +yscCNHW6z8s6ai9HSa6D81g8xOmVya/ULx19WcDNgsyEpBiv6SKkm45GN/lByneX +paBhrOi9DWvz/c22GW69I7+DtLhVjJvGhkAfYF/RIn15KEsgfNk+/FBNK1dnmhHO +Vt2Szf33xkGv08SRgi/0dULPygGLXgrptrkzyfV7oMNhIjvO74ZF+hQt9YeFG1Yq +MqqmWIjnau7v8lvp7vIVeZvqO16e+swhcU2puaXagrKrB97mumQ68TC2FBkkwvM7 +d15BqRKqaAv7WwBxXE/SGUywNip9oaEasho9odMXlf/XHKWh2XmCkccfFkejFemr +boSqNLs6mNPeo0k9msZl3ARLO8/mMPnX1WW6wZ8ApH3GE6/goZz44qZuomO+eBqW +xE5BNzuBLLJkg7rq8OoT1bMzoKd90+gZjJZzj+qM5bnaU81gGOtlA4s6cbRk5zu8 +9iRRZoI5YBQAVzRJ49xOu0CGhzGfmrG/y28qxLHQgaovVjVbZgdjUdbVYJ3n3Iro +JdpouBPRoXr7cKjV74mCG2VX/LPSmRM4JizyZg2wKtIop9u+fcm8yxkTkOlGGTjL +JcYSQaEgtpWZ3OhD14QVf5museDuNdfluQ== +=06Jw +-----END PGP PUBLIC KEY BLOCK----- diff --git a/files/linux-surface/config/archives/linux-surface.list.chroot b/files/linux-surface/config/archives/linux-surface.list.chroot new file mode 100644 index 0000000..2f2d383 --- /dev/null +++ b/files/linux-surface/config/archives/linux-surface.list.chroot @@ -0,0 +1 @@ +deb [arch=amd64] https://pkg.surfacelinux.com/debian release main diff --git a/files/linux-surface/config/package-lists/linux-surface.list.chroot b/files/linux-surface/config/package-lists/linux-surface.list.chroot new file mode 100644 index 0000000..f1f61da --- /dev/null +++ b/files/linux-surface/config/package-lists/linux-surface.list.chroot @@ -0,0 +1,4 @@ +linux-image-surface +linux-headers-surface +iptsd +libwacom-surface diff --git a/tasks/build.yaml b/tasks/build.yaml index c101803..6dad300 100644 --- a/tasks/build.yaml +++ b/tasks/build.yaml @@ -8,6 +8,14 @@ chdir: "{{ live_build_directory }}" register: _lb_bootstrap +- name: install ca-certificates in the chroot + command: + nice -n {{ live_build_nice_level }} + chroot "{{ live_build_directory }}/chroot" apt install -f ca-certificates + args: + chdir: "{{ live_build_directory }}" + register: _lb_chroot + - name: lb chroot (second build stage) command: nice -n {{ live_build_nice_level }} diff --git a/tasks/config.yaml b/tasks/config.yaml index 9e87228..5ff4671 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -46,6 +46,13 @@ {% endif %} --iso-publisher "{{ live_build_iso_publisher }}" + + --debootstrap-options "--include=ca-certificates" + + {% if live_build_linux_surface %} + --linux-flavours surface + {% endif %} + args: chdir: "{{ live_build_directory }}" @@ -81,3 +88,9 @@ template: src: config/includes.installer/preseed.cfg.j2 dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg" + +- name: linux-surface + copy: + src: linux-surface/ + dest: "{{ live_build_directory }}" + when: live_build_linux_surface From 997ebc628ee7ad374d689ffc9dfdf29211c10ce0 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Tue, 18 Jan 2022 22:45:16 +0100 Subject: [PATCH 47/48] do not configure packages in this role anymore --- defaults/main.yml | 5 ++ tasks/config.yaml | 18 ++++--- .../package-lists/common.list.chroot.j2 | 3 -- .../package-lists/custom.list.chroot.j2 | 3 -- .../package-lists/desktop.list.chroot.j2 | 3 -- vars/main.yml | 50 ------------------- 6 files changed, 17 insertions(+), 65 deletions(-) delete mode 100644 templates/config/package-lists/common.list.chroot.j2 delete mode 100644 templates/config/package-lists/custom.list.chroot.j2 delete mode 100644 templates/config/package-lists/desktop.list.chroot.j2 delete mode 100644 vars/main.yml diff --git a/defaults/main.yml b/defaults/main.yml index a809c35..2d71e11 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,3 +25,8 @@ live_build_iso_publisher: custom live_build_nice_level: 14 live_build_linux_surface: false + +live_build_common_packages: + - openssh-server + - python + - console-setup diff --git a/tasks/config.yaml b/tasks/config.yaml index 5ff4671..7e58814 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -63,19 +63,25 @@ root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - name: include common packages - template: - src: config/package-lists/common.list.chroot.j2 + copy: "{{ live_build_common_packages | unique | join('\n') }}" + content: config/package-lists/common.list.chroot.j2 dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" - name: include desktop packages - template: - src: config/package-lists/desktop.list.chroot.j2 + copy: + content: "{{ live_build_desktop_packages | unique | join('\n') }}" dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" when: live_build_desktop +- name: include debian-installer-launcher package + copy: + content: debian-installer-launcher + dest: "{{ live_build_directory }}/config/package-lists/debian-installer-launcher.list.chroot" + when: live_build_desktop + - name: include custom packages - template: - src: config/package-lists/custom.list.chroot.j2 + copy: + content: "{{ live_build_custom_packages | unique | join('\n') }}" dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" when: live_build_custom_packages is defined diff --git a/templates/config/package-lists/common.list.chroot.j2 b/templates/config/package-lists/common.list.chroot.j2 deleted file mode 100644 index b7a1eb1..0000000 --- a/templates/config/package-lists/common.list.chroot.j2 +++ /dev/null @@ -1,3 +0,0 @@ -{% for package in live_build_common_packages | unique %} -{{ package }} -{% endfor %} diff --git a/templates/config/package-lists/custom.list.chroot.j2 b/templates/config/package-lists/custom.list.chroot.j2 deleted file mode 100644 index 1b2238c..0000000 --- a/templates/config/package-lists/custom.list.chroot.j2 +++ /dev/null @@ -1,3 +0,0 @@ -{% for package in live_build_custom_packages | unique %} -{{ package }} -{% endfor %} diff --git a/templates/config/package-lists/desktop.list.chroot.j2 b/templates/config/package-lists/desktop.list.chroot.j2 deleted file mode 100644 index 2c99860..0000000 --- a/templates/config/package-lists/desktop.list.chroot.j2 +++ /dev/null @@ -1,3 +0,0 @@ -{% for package in live_build_desktop_packages | unique %} -{{ package }} -{% endfor %} diff --git a/vars/main.yml b/vars/main.yml deleted file mode 100644 index d124399..0000000 --- a/vars/main.yml +++ /dev/null @@ -1,50 +0,0 @@ -live_build_common_packages: - - openssh-server - - python - - console-setup - - # shells - - fish - - # admin tools - - tmux - - rsync - - lsof - - vim - - pv - - less - - # network tools - - iputils-ping - - whois - - nmap - - tcpdump - - dnsutils - - resolvconf - - # hardware utils - - pciutils - - usbutils - - acpi - - # hard disk utils - - parted - - mdadm - - cryptsetup - - lvm2 - - # filesystem tools - - btrfs-progs - - dosfstools - - # installation utils - - debootstrap - -live_build_desktop_packages: - - xfce4 - - i3 - - firefox-esr - - task-xfce-desktop - - task-german - - task-german-desktop - - debian-installer-launcher From ee2ddc78fcf01deda9cfde5c1d37c8672a990e1b Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Wed, 19 Jan 2022 00:15:01 +0100 Subject: [PATCH 48/48] config --- defaults/main.yml | 5 ----- tasks/build.yaml | 1 + tasks/config.yaml | 44 +++++++++++++++++--------------------------- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2d71e11..a809c35 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,8 +25,3 @@ live_build_iso_publisher: custom live_build_nice_level: 14 live_build_linux_surface: false - -live_build_common_packages: - - openssh-server - - python - - console-setup diff --git a/tasks/build.yaml b/tasks/build.yaml index 6dad300..b503982 100644 --- a/tasks/build.yaml +++ b/tasks/build.yaml @@ -15,6 +15,7 @@ args: chdir: "{{ live_build_directory }}" register: _lb_chroot + when: live_build_linux_surface - name: lb chroot (second build stage) command: diff --git a/tasks/config.yaml b/tasks/config.yaml index 7e58814..01cd0f8 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -56,34 +56,11 @@ args: chdir: "{{ live_build_directory }}" -- name: root user - import_role: - name: root_user - vars: - root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - -- name: include common packages - copy: "{{ live_build_common_packages | unique | join('\n') }}" - content: config/package-lists/common.list.chroot.j2 - dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" - -- name: include desktop packages +- name: include chroot packages copy: - content: "{{ live_build_desktop_packages | unique | join('\n') }}" - dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" - when: live_build_desktop - -- name: include debian-installer-launcher package - copy: - content: debian-installer-launcher - dest: "{{ live_build_directory }}/config/package-lists/debian-installer-launcher.list.chroot" - when: live_build_desktop - -- name: include custom packages - copy: - content: "{{ live_build_custom_packages | unique | join('\n') }}" - dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" - when: live_build_custom_packages is defined + content: "{{ live_build_chroot_package_lists[item] | unique | join('\n') }}" + dest: "{{ live_build_directory }}/config/package-lists/{{ item }}.list.chroot" + loop: "{{ live_build_chroot_package_lists.keys() | list }}" - name: debian-installer installer includes directory file: @@ -100,3 +77,16 @@ src: linux-surface/ dest: "{{ live_build_directory }}" when: live_build_linux_surface + +- name: root user ssh directory + file: + path: "{{ live_build_directory }}/config/includes.chroot/root/.ssh" + state: directory + mode: 0700 + when: root_ssh_authorized_keys is defined + +- name: root user ssh authorized keys + copy: + content: "{{ root_ssh_authorized_keys | join('\n') }}" + dest: "{{ live_build_directory }}/config/includes.chroot/root/.ssh/authorized_keys" + when: root_ssh_authorized_keys is defined