Skip to content
Snippets Groups Projects
Verified Commit c7aa9467 authored by Michal Hrusecky's avatar Michal Hrusecky :mouse:
Browse files

lxc-generator: Fix build of images

LinuxConatiners stopped shipping armv7l images, so for Debian based
ones, we fallback to our cached ones that we have from before for now.
For Alpine and OpenWrt we switch to their own repos. Also deleted some
outdated versions of the distro to get everything working again.
parent 5af48625
No related branches found
No related tags found
No related merge requests found
......@@ -74,38 +74,46 @@ get_linaro_url() {
}
get_lxc_url() {
date="$(wget -O - https://images.linuxcontainers.org/images/$1/${2:-default} | sed -n 's|.*href="\(20.*\)/".*|\1|p' | sort | tail -n 1)"
date="$(wget -O - https://images.linuxcontainers.org/images/$1/${2:-default} | sed -n 's|.*href="\(20[^/]*\)/.*|\1|p' | sort | tail -n 1)"
echo "https://images.linuxcontainers.org/images/$1/${2:-default}/$date/rootfs.tar.xz"
}
get_cached_url() {
date="$(wget -O - https://repo.turris.cz/lxc/images/$1 | sed -n 's|.*href="\(20[^/]*\)/.*|\1|p' | sort | tail -n 1)"
echo "https://repo.turris.cz/lxc/images/$1/$date/rootfs.tar.xz"
}
get_opensuse_url() {
URL="`wget -O - "$1" | sed -n 's|.*href="\([^"]*JeOS[^"]*rootfs[^"]*.tar.xz\)".*|\1|p' | head -n 1`"
[ -n "$URL" ] || URL="`wget -O - "$1" | sed -n 's|.*href="\([^"]*JeOS[^"]*Snapshot[^"]*.tar.xz\)".*|\1|p' | head -n 1`"
URL="`wget -O - "$1" | sed -n 's|.*href="\([^"]*JeOS[^"]*rootfs[^"]*'"$2"'[^"]*.tar.xz\)".*|\1|p' | head -n 1`"
[ -n "$URL" ] || URL="`wget -O - "$1" | sed -n 's|.*href="\([^"]*JeOS[^"]*Snapshot[^"]*'"$2"'[^"]*.tar.xz\)".*|\1|p' | head -n 1`"
echo "$1/$URL"
}
get_alpine_url() {
VER="$1"
[ "$1" = edge ] || VER="v$VER"
URL="https://dl-cdn.alpinelinux.org/alpine/$VER/releases/$2"
URL="`wget -O - "$URL" | sed -n 's|.*href="\(alpine-minirootfs-[^"]*\)".*|'"$URL"'/\1|p' | grep -v '_rc' | tail -n 1`"
echo "$URL"
}
add_image "Turris_OS" "HBS" "aarch64" "https://repo.turris.cz/hbs/medkit/mox-medkit-latest.tar.gz"
add_image "Turris_OS" "HBS" "armv7l" "https://repo.turris.cz/hbs/medkit/omnia-medkit-latest.tar.gz"
add_image "Turris_OS" "HBS" "ppc" "https://repo.turris.cz/hbs/medkit/turris1x-medkit-latest.tar.gz"
add_image "Alpine" "3.15" "armv7l" "`get_lxc_url alpine/3.15/armhf`"
add_image "Alpine" "3.15" "aarch64" "`get_lxc_url alpine/3.15/arm64`"
add_image "Alpine" "3.16" "armv7l" "`get_lxc_url alpine/3.16/armhf`"
add_image "Alpine" "3.16" "aarch64" "`get_lxc_url alpine/3.16/arm64`"
add_image "Alpine" "3.17" "armv7l" "`get_lxc_url alpine/3.17/armhf`"
add_image "Alpine" "3.17" "aarch64" "`get_lxc_url alpine/3.17/arm64`"
add_image "Alpine" "3.18" "armv7l" "`get_lxc_url alpine/3.18/armhf`"
add_image "Alpine" "3.18" "aarch64" "`get_lxc_url alpine/3.18/arm64`"
add_image "Alpine" "Edge" "armv7l" "`get_lxc_url alpine/edge/armhf`"
add_image "Alpine" "Edge" "aarch64" "`get_lxc_url alpine/edge/arm64`"
add_image "ArchLinux" "latest" "armv7l" "`get_lxc_url archlinux/current/armhf`"
add_image "Alpine" "3.17" "armv7l" "`get_alpine_url 3.17 armhf`"
add_image "Alpine" "3.17" "aarch64" "`get_alpine_url 3.17 aarch64`"
add_image "Alpine" "3.18" "armv7l" "`get_alpine_url 3.18 armhf`"
add_image "Alpine" "3.18" "aarch64" "`get_alpine_url 3.18 aarch64`"
add_image "Alpine" "Edge" "armv7l" "`get_alpine_url edge armhf`"
add_image "Alpine" "Edge" "aarch64" "`get_alpine_url edge aarch64`"
add_image "ArchLinux" "2023-06" "armv7l" "`get_cached_url ArchLinux/latest/armv7l`"
add_image "ArchLinux" "latest" "aarch64" "`get_lxc_url archlinux/current/arm64`"
add_image "CentOS_Stream" "8" "aarch64" "`get_lxc_url centos/8-Stream/arm64`"
add_image "CentOS_Stream" "9" "aarch64" "`get_lxc_url centos/9-Stream/arm64`"
add_image "Debian" "Bullseye" "armv7l" "`get_lxc_url debian/bullseye/armhf`"
add_image "Debian" "Bullseye-2023-06" "armv7l" "`get_cached_url Debian/Bullseye/armv7l`"
add_image "Debian" "Bullseye" "aarch64" "`get_lxc_url debian/bullseye/arm64`"
add_image "Fedora" "36" "aarch64" "`get_lxc_url fedora/36/arm64`"
add_image "Fedora" "37" "aarch64" "`get_lxc_url fedora/37/arm64`"
add_image "Fedora" "38" "aarch64" "`get_lxc_url fedora/37/arm64`"
add_image "Fedora" "38" "aarch64" "`get_lxc_url fedora/38/arm64`"
add_image "Gentoo" "openrc" "armv7l" "`get_gentoo_url arm armv7a_hardfp-openrc`"
add_image "Gentoo" "systemd" "armv7l" "`get_gentoo_url arm armv7a_hardfp-systemd`"
add_image "Gentoo" "musl-openrc" "armv7l" "`get_gentoo_url arm armv7a_hardfp-musl-openrc`"
......@@ -114,24 +122,21 @@ add_image "Gentoo" "systemd" "aarch64" "`get_gentoo_url arm64 arm64-systemd`"
add_image "Gentoo" "musl-openrc" "aarch64" "`get_gentoo_url arm64 arm64-musl`"
add_image "openSUSE" "15.4" "armv7l" "`get_opensuse_url https://download.opensuse.org/ports/armv7hl/distribution/leap/15.4/appliances`"
add_image "openSUSE" "15.4" "aarch64" "`get_opensuse_url https://download.opensuse.org/ports/aarch64/distribution/leap/15.4/appliances`"
add_image "openSUSE" "15.5" "aarch64" "`get_opensuse_url https://download.opensuse.org/distribution/leap/15.5/appliances/ aarch64`"
add_image "openSUSE" "Tumbleweed" "armv7l" "https://download.opensuse.org/ports/armv7hl/factory/appliances/opensuse-tumbleweed-image.armv7l-lxc.tar.xz"
add_image "openSUSE" "Tumbleweed" "aarch64" "https://download.opensuse.org/ports/aarch64/tumbleweed/appliances/opensuse-tumbleweed-image.aarch64-lxc.tar.xz"
add_image "OpenWrt" "21.02" "aarch64" "`get_lxc_url openwrt/21.02/arm64`"
add_image "OpenWrt" "21.02" "armv7l" "`get_lxc_url openwrt/21.02/armhf`"
add_image "OpenWrt" "22.03" "aarch64" "`get_lxc_url openwrt/22.03/arm64`"
add_image "OpenWrt" "22.03" "armv7l" "`get_lxc_url openwrt/22.03/armhf`"
add_image "OpenWrt" "snapshot" "aarch64" "`get_lxc_url openwrt/snapshot/arm64`"
add_image "OpenWrt" "snapshot" "armv7l" "`get_lxc_url openwrt/snapshot/armhf`"
add_image "Ubuntu" "Bionic" "armv7l" "`get_lxc_url ubuntu/bionic/armhf`"
add_image "OpenWrt" "22.03.5" "arm64" "https://downloads.openwrt.org/releases/22.03.5/targets/mvebu/cortexa53/openwrt-22.03.5-mvebu-cortexa53-rootfs.tar.gz"
add_image "OpenWrt" "22.03.5" "armv7l" "https://downloads.openwrt.org/releases/22.03.5/targets/mvebu/cortexa9/openwrt-22.03.5-mvebu-cortexa9-rootfs.tar.gz"
add_image "OpenWrt" "snapshot" "arm64" "https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa53/openwrt-mvebu-cortexa53-rootfs.tar.gz"
add_image "OpenWrt" "snapshot" "armv7l" "https://downloads.openwrt.org/snapshots/targets/mvebu/cortexa9/openwrt-mvebu-cortexa9-rootfs.tar.gz"
add_image "Ubuntu" "Bionic-2023-06" "armv7l" "`get_cached_url Ubuntu/Bionic/armv7l`"
add_image "Ubuntu" "Bionic" "aarch64" "`get_lxc_url ubuntu/bionic/arm64`"
add_image "Ubuntu" "Focal" "armv7l" "`get_lxc_url ubuntu/focal/armhf`"
add_image "Ubuntu" "Focal-2023-06" "armv7l" "`get_cached_url Ubuntu/Focal/armv7l`"
add_image "Ubuntu" "Focal" "aarch64" "`get_lxc_url ubuntu/focal/arm64`"
add_image "Ubuntu" "Jammy" "armv7l" "`get_lxc_url ubuntu/jammy/armhf`"
add_image "Ubuntu" "Jammy-2023-06" "armv7l" "`get_cached_url Ubuntu/Jammy/armv7l`"
add_image "Ubuntu" "Jammy" "aarch64" "`get_lxc_url ubuntu/jammy/arm64`"
add_image "VoidLinux" "glibc" "aarch64" "`get_lxc_url voidlinux/current/arm64`"
add_image "VoidLinux" "glibc" "armv7l" "`get_lxc_url voidlinux/current/armhf`"
add_image "VoidLinux" "musl" "aarch64" "`get_lxc_url voidlinux/current/arm64 musl`"
add_image "VoidLinux" "musl" "armv7l" "`get_lxc_url voidlinux/current/armhf musl`"
if [ "`gpg -K`" ]; then
if [ -f ~/gpg-pass ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment