Merge commit '469804206a51674d2e512ca523e2a3bf74de2b14'
This commit is contained in:
commit
6152828797
@ -55,10 +55,10 @@ Default {
|
|||||||
# profile build matrix
|
# profile build matrix
|
||||||
Dimensions {
|
Dimensions {
|
||||||
version {
|
version {
|
||||||
|
"3.18" { include required("version/3.17.conf") }
|
||||||
"3.17" { include required("version/3.17.conf") }
|
"3.17" { include required("version/3.17.conf") }
|
||||||
"3.16" { include required("version/3.16.conf") }
|
"3.16" { include required("version/3.16.conf") }
|
||||||
"3.15" { include required("version/3.15.conf") }
|
"3.15" { include required("version/3.15.conf") }
|
||||||
"3.14" { include required("version/3.14.conf") }
|
|
||||||
edge { include required("version/edge.conf") }
|
edge { include required("version/edge.conf") }
|
||||||
}
|
}
|
||||||
arch {
|
arch {
|
||||||
|
@ -12,6 +12,19 @@ packages {
|
|||||||
openssh-server-pam = true
|
openssh-server-pam = true
|
||||||
e2fsprogs-extra = true # for resize2fs
|
e2fsprogs-extra = true # for resize2fs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WHEN.nocloud {
|
||||||
|
# fix for "failed to mount /dev/sr0 when looking for data"
|
||||||
|
# @see https://git.alpinelinux.org/aports/tree/community/cloud-init/README.Alpine
|
||||||
|
packages.mount = true
|
||||||
|
WHEN {
|
||||||
|
"3.15 3.16" {
|
||||||
|
packages.mount = null
|
||||||
|
packages.util-linux-misc = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
services.default.cloud-init-hotplugd = true
|
services.default.cloud-init-hotplugd = true
|
||||||
|
|
||||||
scripts = [ setup-cloudinit ]
|
scripts = [ setup-cloudinit ]
|
||||||
|
@ -3,23 +3,22 @@ name = [tiny]
|
|||||||
bootstrap_name = Tiny Cloud
|
bootstrap_name = Tiny Cloud
|
||||||
bootstrap_url = "https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud"
|
bootstrap_url = "https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud"
|
||||||
|
|
||||||
services {
|
|
||||||
sysinit.tiny-cloud-early = true
|
|
||||||
default.tiny-cloud = true
|
|
||||||
default.tiny-cloud-final = true
|
|
||||||
}
|
|
||||||
|
|
||||||
WHEN {
|
WHEN {
|
||||||
|
"3.13 3.14 3.15 3.16 3.17" {
|
||||||
|
# tiny-cloud < 3.0.0 doesn't have --setup option
|
||||||
|
boot.tiny-cloud-early = true
|
||||||
|
default.tiny-cloud = true
|
||||||
|
default.tiny-cloud-final = true
|
||||||
|
}
|
||||||
aws {
|
aws {
|
||||||
packages.tiny-cloud-aws = true
|
packages.tiny-cloud-aws = true
|
||||||
WHEN {
|
WHEN {
|
||||||
"3.12" {
|
"3.12" {
|
||||||
# tiny-cloud-network requires ifupdown-ng (unavailable in 3.12)
|
# fallback to the old tiny-ec2-bootstrap package
|
||||||
packages.tiny-cloud-aws = null
|
packages.tiny-cloud-aws = null
|
||||||
services.sysinit.tiny-cloud-early = null
|
services.sysinit.tiny-cloud-early = null
|
||||||
services.default.tiny-cloud = null
|
services.default.tiny-cloud = null
|
||||||
services.default.tiny-cloud-final = null
|
services.default.tiny-cloud-final = null
|
||||||
# fall back to tiny-ec2-bootstrap instead
|
|
||||||
packages.tiny-ec2-bootstrap = true
|
packages.tiny-ec2-bootstrap = true
|
||||||
services.default.tiny-ec2-bootstrap = true
|
services.default.tiny-ec2-bootstrap = true
|
||||||
}
|
}
|
||||||
|
7
alpine-cloud-images/configs/version/3.18.conf
Normal file
7
alpine-cloud-images/configs/version/3.18.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# vim: ts=2 et:
|
||||||
|
|
||||||
|
include required("base/5.conf")
|
||||||
|
|
||||||
|
motd {
|
||||||
|
sudo_removed = "NOTE: 'sudo' is not installed by default, please use 'doas' instead."
|
||||||
|
}
|
@ -6,6 +6,8 @@ repos {
|
|||||||
"https://dl-cdn.alpinelinux.org/alpine/v{version}/testing" = false
|
"https://dl-cdn.alpinelinux.org/alpine/v{version}/testing" = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repo_keys = []
|
||||||
|
|
||||||
packages {
|
packages {
|
||||||
alpine-base = true
|
alpine-base = true
|
||||||
linux-virt = true
|
linux-virt = true
|
||||||
|
@ -56,7 +56,10 @@ make_filesystem() {
|
|||||||
mkfs.fat -n EFI "${DEVICE}1"
|
mkfs.fat -n EFI "${DEVICE}1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkfs.ext4 -O ^64bit -L / "$root_dev"
|
# before Alpine 3.18...
|
||||||
|
# - grub2 can't handle "metadata_csum_seed"
|
||||||
|
# - fsck can't handle "orphan_file"
|
||||||
|
mkfs.ext4 -O ^64bit,^metadata_csum_seed,^orphan_file -L / "$root_dev"
|
||||||
mkdir -p "$TARGET"
|
mkdir -p "$TARGET"
|
||||||
mount -t ext4 "$root_dev" "$TARGET"
|
mount -t ext4 "$root_dev" "$TARGET"
|
||||||
|
|
||||||
|
@ -15,7 +15,31 @@ if [ "$VERSION" = "3.12" ]; then
|
|||||||
echo "EC2_USER=$IMAGE_LOGIN" > /etc/conf.d/tiny-ec2-bootstrap
|
echo "EC2_USER=$IMAGE_LOGIN" > /etc/conf.d/tiny-ec2-bootstrap
|
||||||
else
|
else
|
||||||
einfo "Configuring Tiny Cloud..."
|
einfo "Configuring Tiny Cloud..."
|
||||||
sed -i.bak -Ee "s/^#?CLOUD_USER=.*/CLOUD_USER=$IMAGE_LOGIN/" \
|
|
||||||
"$TARGET"/etc/conf.d/tiny-cloud
|
TC_CONF="$TARGET/etc/tiny-cloud.conf"
|
||||||
rm "$TARGET"/etc/conf.d/tiny-cloud.bak
|
# tiny-cloud >= 3.0.0 moved configs, the following supports older versions
|
||||||
|
[ ! -f "$TC_CONF" ] && TC_CONF="$TARGET/etc/conf.d/tiny-cloud"
|
||||||
|
|
||||||
|
sed -i.bak -Ee "s/^#?CLOUD_USER=.*/CLOUD_USER=$IMAGE_LOGIN/" "$TC_CONF"
|
||||||
|
rm "$TC_CONF.bak"
|
||||||
|
|
||||||
|
# tiny-cloud >= 3.0.0 sets up init scripts with /sbin/tiny-cloud --setup
|
||||||
|
if [ -f "$TARGET/sbin/tiny-cloud" ]; then
|
||||||
|
# fixed in tiny-cloud >3.0.1
|
||||||
|
#chroot "$TARGET" /sbin/tiny-cloud --enable
|
||||||
|
# logic directly implemented here, for now
|
||||||
|
echo -- "- removing tiny-cloud* from all runlevels"
|
||||||
|
rm -f "$TARGET"/etc/runlevels/*/tiny-cloud*
|
||||||
|
ln -s /etc/init.d/tiny-cloud-boot "$TARGET"/etc/runlevels/boot
|
||||||
|
echo -- "+ tiny-cloud-boot service added to boot runlevel"
|
||||||
|
for p in early main final; do
|
||||||
|
ln -s "/etc/init.d/tiny-cloud-$p" "$TARGET"/etc/runlevels/default
|
||||||
|
echo -- "+ tiny-cloud-$p service added to default runlevel"
|
||||||
|
done
|
||||||
|
# TODO: will need to update this for >3.18
|
||||||
|
elif [ "$VERSION" = "3.18" ]; then
|
||||||
|
# 3.18 has tiny-cloud 3.0.0, and we didn't find what we expected
|
||||||
|
echo "Error: /sbin/tiny-cloud not found" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user