mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2025-12-16 11:52:43 +03:00
Compare commits
1 Commits
f873288185
...
9641a85aa6
| Author | SHA1 | Date | |
|---|---|---|---|
| 9641a85aa6 |
@ -8,12 +8,11 @@ test-default:
|
|||||||
- docker-alpine
|
- docker-alpine
|
||||||
- x86_64
|
- x86_64
|
||||||
|
|
||||||
# disabled - 0.13.1 has globbing bug
|
test-dash:
|
||||||
#test-dash:
|
extends: test-default
|
||||||
# extends: test-default
|
before_script:
|
||||||
# before_script:
|
- apk add dash
|
||||||
# - apk add dash
|
- ln -sf /usr/bin/dash /bin/sh
|
||||||
# - ln -sf /usr/bin/dash /bin/sh
|
|
||||||
|
|
||||||
test-oksh:
|
test-oksh:
|
||||||
extends: test-default
|
extends: test-default
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
## 2025:12-07 - Tiny Cloud v3.2.3
|
|
||||||
|
|
||||||
* Correctly identify empty `user-data` content instead of flagging it as "unknown".
|
|
||||||
|
|
||||||
## 2025-06-11 - Tiny Cloud v3.2.2
|
## 2025-06-11 - Tiny Cloud v3.2.2
|
||||||
|
|
||||||
* Fix `Makefile` to dynamically generate the list of clouds, allowing the new
|
* Fix `Makefile` to dynamically generate the list of clouds, allowing the new
|
||||||
|
|||||||
4
TODO.md
4
TODO.md
@ -18,10 +18,6 @@
|
|||||||
|
|
||||||
* Support additional features of `#cloud-config` as needed
|
* Support additional features of `#cloud-config` as needed
|
||||||
|
|
||||||
* Support for multipart `user-data` payload?
|
|
||||||
|
|
||||||
* Support for `#network-config`?
|
|
||||||
|
|
||||||
* Support LVM partitioning and non-`ext[234]` filesystems?
|
* Support LVM partitioning and non-`ext[234]` filesystems?
|
||||||
|
|
||||||
* Support other cloud providers...
|
* Support other cloud providers...
|
||||||
|
|||||||
@ -178,11 +178,9 @@ init__create_default_user() {
|
|||||||
echo '%wheel ALL=(ALL) NOPASSWD: ALL' > "$ETC/sudoers.d/wheel"
|
echo '%wheel ALL=(ALL) NOPASSWD: ALL' > "$ETC/sudoers.d/wheel"
|
||||||
fi
|
fi
|
||||||
if [ -d "$ETC/doas.d" ]; then
|
if [ -d "$ETC/doas.d" ]; then
|
||||||
echo 'permit nopass :wheel' > "$ETC/doas.d/wheel.conf"
|
echo 'permit nopass :wheel' > "$TARGET/etc/doas.d/wheel.conf"
|
||||||
#echo 'permit nopass :wheel' > "$TARGET/etc/doas.d/wheel.conf"
|
|
||||||
elif [ -f "$ETC/doas.conf" ]; then
|
elif [ -f "$ETC/doas.conf" ]; then
|
||||||
add_once "$ETC/doas.conf" "permit nopass :wheel"
|
add_once "$TARGET/etc/doas.conf" "permit nopass :wheel"
|
||||||
#add_once "$TARGET/etc/doas.conf" "permit nopass :wheel"
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,9 +294,6 @@ userdata_type() {
|
|||||||
if [ ! -f "$TINY_CLOUD_VAR/user-data" ]; then
|
if [ ! -f "$TINY_CLOUD_VAR/user-data" ]; then
|
||||||
echo missing
|
echo missing
|
||||||
return
|
return
|
||||||
elif [ ! -s "$TINY_CLOUD_VAR/user-data" ]; then
|
|
||||||
echo empty
|
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
header=$(head -n1 "$TINY_CLOUD_VAR/user-data" | sed -e 's/[[:space:]].*//g')
|
header=$(head -n1 "$TINY_CLOUD_VAR/user-data" | sed -e 's/[[:space:]].*//g')
|
||||||
case "$header" in
|
case "$header" in
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
# Empty UserData Functions
|
|
||||||
# vim:set filetype=sh:
|
|
||||||
# shellcheck shell=sh
|
|
||||||
|
|
||||||
init__empty_userdata() {
|
|
||||||
log -i -t "$phase" notice "$ACTION: empty user-data found"
|
|
||||||
}
|
|
||||||
|
|
||||||
INIT_ACTIONS_MAIN="empty_userdata ${INIT_ACTIONS_MAIN}"
|
|
||||||
@ -197,11 +197,6 @@ userdata_type_body() {
|
|||||||
-o match:"missing" \
|
-o match:"missing" \
|
||||||
sh -c ". \"$lib\"; userdata_type"
|
sh -c ". \"$lib\"; userdata_type"
|
||||||
|
|
||||||
touch var/lib/cloud/user-data
|
|
||||||
CLOUD="$c" atf_check \
|
|
||||||
-o match:"empty" \
|
|
||||||
sh -c ". \"$lib\"; userdata_type"
|
|
||||||
|
|
||||||
echo "#tiny-cloud-config" > var/lib/cloud/user-data
|
echo "#tiny-cloud-config" > var/lib/cloud/user-data
|
||||||
CLOUD="$c" atf_check \
|
CLOUD="$c" atf_check \
|
||||||
-o match:"tiny-cloud-config" \
|
-o match:"tiny-cloud-config" \
|
||||||
|
|||||||
@ -32,7 +32,6 @@ init_tests \
|
|||||||
userdata_users_groups \
|
userdata_users_groups \
|
||||||
userdata_users_lock_passwd \
|
userdata_users_lock_passwd \
|
||||||
userdata_users_doas \
|
userdata_users_doas \
|
||||||
userdata_users_doas_with_default \
|
|
||||||
userdata_users_ssh_authorized_keys \
|
userdata_users_ssh_authorized_keys \
|
||||||
userdata_ssh_authorized_keys \
|
userdata_ssh_authorized_keys \
|
||||||
userdata_groups \
|
userdata_groups \
|
||||||
@ -421,26 +420,6 @@ userdata_users_doas_body() {
|
|||||||
|| atf_fail "etc/doas.d/foo.conf is not as expected"
|
|| atf_fail "etc/doas.d/foo.conf is not as expected"
|
||||||
}
|
}
|
||||||
|
|
||||||
userdata_users_doas_with_default_body() {
|
|
||||||
# first specified user keeps the default user
|
|
||||||
fake_userdata_nocloud <<-EOF
|
|
||||||
#cloud-config
|
|
||||||
users:
|
|
||||||
- default
|
|
||||||
- name: foo
|
|
||||||
doas: ["permit nopass foo"]
|
|
||||||
EOF
|
|
||||||
mkdir -p etc/doas.d
|
|
||||||
atf_check -e ignore -o ignore tiny-cloud early
|
|
||||||
atf_check \
|
|
||||||
-e match:"userdata_users: done" \
|
|
||||||
-o ignore \
|
|
||||||
tiny-cloud main
|
|
||||||
find .
|
|
||||||
grep "permit nopass foo" etc/doas.d/foo.conf \
|
|
||||||
|| atf_fail "etc/doas.d/foo.conf is not as expected"
|
|
||||||
}
|
|
||||||
|
|
||||||
userdata_users_ssh_authorized_keys_body() {
|
userdata_users_ssh_authorized_keys_body() {
|
||||||
fake_bin getent <<-EOF
|
fake_bin getent <<-EOF
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
@ -944,3 +923,4 @@ userdata_autoinstall_lvm_body() {
|
|||||||
-o match:"reboot" \
|
-o match:"reboot" \
|
||||||
tiny-cloud final
|
tiny-cloud final
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user