From 9ca88b0043618caadb7475387c5326da0449b58d Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Sat, 20 Jul 2024 14:45:16 -0500 Subject: Add distrobuilder yaml --- image-clang32.yaml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ init | 6 +++++- meta.lua | 3 ++- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 image-clang32.yaml diff --git a/image-clang32.yaml b/image-clang32.yaml new file mode 100644 index 0000000..6558784 --- /dev/null +++ b/image-clang32.yaml @@ -0,0 +1,60 @@ +image: + distribution: alpinelinux + description: Build image for lua4.win + architecture: i386 + +source: + downloader: alpinelinux-http + same_as: 3.12 + url: http://dl-cdn.alpinelinux.org/alpine + +files: +- path: /etc/hostname + generator: hostname + +- path: /etc/hosts + generator: hosts + +- path: /etc/machine-id + generator: dump + +- path: /etc/user/profile + generator: copy + source: /etc/profile + +- path: /etc/netplan/10-lxc.yaml + generator: dump + content: |- + network: + version: 2 + ethernets: + eth0: + dhcp4: true + dhcp-identifier: mac + +packages: + manager: apk + update: true + cleanup: true + sets: + - packages: + - gcc + - alpine-base + - neovim + action: install + +actions: +- trigger: post-update + action: |- + #!/bin/sh + set -eux + systemctl enable systemd-networkd +- trigger: post-packages + action: |- + #!/bin/sh + set -eux + locale-gen en_US.UTF-8 + update-locale LANG=en_US.UTF-8 + +mappings: + architecture_map: diff --git a/init b/init index b669c39..242fe06 100755 --- a/init +++ b/init @@ -1,2 +1,6 @@ -#!/bin/sh +#!/bin/bash -ex +apt update +apt install -yqq distrobuilder +distrobuilder build-incus image-clang32.yaml + echo "Hello, world!" > hello.txt diff --git a/meta.lua b/meta.lua index 0db8cf9..9e16b56 100644 --- a/meta.lua +++ b/meta.lua @@ -1,7 +1,8 @@ return { { + image = "images:debian/trixie" name = "image-clang32", requires = {}, - produces = {"hello.txt"}, + produces = {"hello.txt", "incus.tar.xz","rootfs.squashfs"}, } } -- cgit v1.2.3-55-g6feb