Try to add Rawhide

This commit is contained in:
Greg Hellings
2022-06-01 10:43:12 -05:00
parent a3265bb64f
commit db801efcbb
5 changed files with 61 additions and 3 deletions
+8 -3
View File
@@ -15,7 +15,7 @@ jobs:
id: distros
run: |-
set -eo pipefail
distros=$(ls distros/*.hcl | jq -cRs 'split("\n") | [ .[] | if length > 0 then . else empty end ]')
distros=$(ls distros/*.hcl{,.sh} | jq -cRs 'split("\n") | [ .[] | if length > 0 then . else empty end ]')
echo "::set-output name=distros::${distros}"
build:
@@ -43,13 +43,18 @@ jobs:
if: contains(matrix.needs_timeout, matrix.distro)
shell: bash
run: ./modify_timeout.sh "${{ matrix.distro }}"
- name: Run generator, if necessary
if: endsWith(matrix.distro, '.sh')
run: "${{ matrix.distro }}"
- name: try build
shell: bash
run: |
set -e
# Strip .sh if it is a dynamic one
file="$(printf "${{ matrix.distro }}" | sed -E -e 's/^(.*).sh$/\1/')"
# Add a retry in case something bogus like a network failure happens
./packer build -var-file=${{ matrix.distro }} -var "qemu_accelerator=tcg" -except=upload sources || \
./packer build -var-file=${{ matrix.distro }} -var "qemu_accelerator=tcg" -except=upload sources
./packer build -var-file="${file}" -var "qemu_accelerator=tcg" -except=upload sources || \
./packer build -var-file="${file}" -var "qemu_accelerator=tcg" -except=upload sources
env:
VAGRANT_CLOUD_TOKEN: ${{ secrets.VAGRANT_CLOUD_TOKEN }}
PACKER_LOG: ${{ contains(matrix.needs_timeout, matrix.distro) && '1' || '0' }}
+3
View File
@@ -2,3 +2,6 @@ output_*
*.box
*.iso
.vagrant
# Generated distros
distros/fedora-rawhide-*.hcl
+4
View File
@@ -10,3 +10,7 @@
path = http/fedora/f36
url = https://pagure.io/fedora-kickstarts.git
branch = f36
[submodule "http/fedora/rawhide"]
path = http/fedora/rawhide
url = https://pagure.io/fedora-kickstarts.git
branch = main
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
set -exo pipefail
# Name of the file to write out
name="${0%.sh}"
# Base URL
fedora=https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/
# Working directory
tmp="$(mktemp -d)"
listing="${tmp}/listing.html"
checksums="${tmp}/checksums"
# First, find the proper URL, since it updates every build
curl -L -o "${listing}" "${fedora}"
links="$(cat "${listing}" | pup 'a[href*=".iso"] attr{href}' | grep dvd)"
iso_name="$(echo "${links}" | grep -e 'iso$')"
iso="${fedora}${iso_name}"
# Read the SHA256 sum value
sums="$(cat "${listing}" | pup 'a[href*="CHECKSUM"] attr{href}')"
until curl -f -L -o "${checksums}" "${fedora}${sums}"; do
sleep 1
done
sha="$(cat "${checksums}" | grep dvd | grep SHA256 | cut -d' ' -f 4)"
# Write out HCL file
cat << EOF > "${name}"
distro = "fedora"
arch = "x86_64"
version = "rawhide"
iso = {
url = "${iso}"
checksum = "${sha}"
}
boot_wait = "20s"
boot_command = [
"<up><tab><bs><bs><bs><bs><bs>",
"edd=off net.ifnames=0 biosdevnames=0 inst.ks=http://{{.HTTPIP}}:{{.HTTPPort}}/fedora/rawhide-x86_64.ks console=ttyS0<enter><wait>"
]
ssh_handshake_attempts = 1000
EOF
rm -r "${tmp}"
Submodule http/fedora/rawhide added at 1fcebbbe22