209 karma · joined Nov 18, 2019 (7y ago) · 69 submissions
comment 2y ago · link · parent
Flatcar inside Incus is a bit more difficult: for Flatcar being a container one can import https://stable.release.flatcar-linux.net/amd64-usr/current/f... and for it being a VM I don't know if the regular image works. A major hurdle is that one has to tweak the way VMs/containers are configured because normally Ubuntu's cloud-init is used but in Flatcar only coreos-cloudinit or Ignition is supported and there are differences in the way the user-data has to be set up and the contents as well. But in the end Incus would be one more "cloud" platform to support and one could make the Incus integration as nice as with other platforms where Flatcar runs on (OpenStack, VMware, etc.).
comment 2y ago · link · parent
If you want to repackage distro binaries without recompilation, you can have a look here: https://github.com/flatcar/sysext-bakery/pull/74 There are two tools, one can bundle the needed libs in a separate folder, and the other one works more like Flatpak and uses a full chroot. Since you already know what files are needed at runtime I think you could try the first approach, otherwise the second might be easier.
4.
Flatcar: OS Innovation with Systemd-Sysext(flatcar.org ↗)
120 points · by goombacloud · 2y ago · 18 comments
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
tee /tmp/server > /dev/null <<'EOF'
#!/bin/bash
set -euo pipefail
SERVE="$1"
TYPE="$2"
read -a WORDS
if [ "${#WORDS[@]}" != 3 ] || [ "${WORDS[0]}" != "GET" ]; then
echo -ne "HTTP/1.1 400 Bad request\r\n\r\n"; exit 0
fi
# Subfolders are not supported for security reasons as this avoids having to deal with ../../ attacks
FILE="${SERVE}/$(basename -- "${WORDS[1]}")"
if [ -d "${FILE}" ] || [ ! -e "${FILE}" ]; then
echo -ne "HTTP/1.1 404 Not found\r\n\r\n" ; exit 0
fi
echo -ne "HTTP/1.1 200 OK\r\n"
echo -ne "Content-Type: ${TYPE};\r\n"
LEN=$(stat -L --printf='%s\n' "${FILE}")
echo -ne "Content-Length: ${LEN}\r\n"
echo -ne "\r\n"
cat "${FILE}"
EOF
chmod +x /tmp/server
# switch from "text/plain" to "application/octet-stream" for file downloads
socat TCP-LISTEN:8000,reuseaddr,fork SYSTEM:'/tmp/server /tmp/ text-plain'
# test:
curl -v http://localhost:8000/servercomment 2y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
18.
MNT Pocket Reform – A Technical Walkthrough(crowdsupply.com ↗)
1 points · by goombacloud · 3y ago · discuss
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Nowadays it's very easy to build for arm64 - you either go the way with cross compilation or you go the way with full qemu binary emulation which is as simple as it gets because you would build within an arm64 docker image, e.g., docker.io/arm64v8/alpine or docker.io/arm64v8/ubuntu and qemu-static handles the emulation (it will be slower than cross compilation but as long as speed is acceptable you can go this easy way).
comment 4y ago · link · parent
comment 4y ago · link · parent