Makefile: Update CoreOS, improve image download
This commit is contained in:
parent
c496425203
commit
c35cd7209a
14
Makefile
14
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# CoreOS options.
|
# CoreOS options.
|
||||||
NAME := coreos-home-server
|
NAME := coreos-home-server
|
||||||
STREAM := stable
|
STREAM := stable
|
||||||
VERSION := 38.20231027.3.2
|
VERSION := 39.20231119.3.0
|
||||||
ARCH := x86_64
|
ARCH := x86_64
|
||||||
IMAGE_URI := https://builds.coreos.fedoraproject.org/prod/streams/
|
IMAGE_URI := https://builds.coreos.fedoraproject.org/prod/streams/
|
||||||
HOST := $(if $(filter deploy,$(MAKECMDGOALS)),$(if $(HOST),$(HOST),$(error Please specify a valid HOST to deploy)),$(HOST))
|
HOST := $(if $(filter deploy,$(MAKECMDGOALS)),$(if $(HOST),$(HOST),$(error Please specify a valid HOST to deploy)),$(HOST))
|
||||||
|
@ -24,6 +24,7 @@ CURL ?= $(call find-cmd,curl) $(if $(VERBOSE),,--progress-bar) --fail
|
||||||
GPG ?= $(call find-cmd,gpg) $(if $(VERBOSE),,-q)
|
GPG ?= $(call find-cmd,gpg) $(if $(VERBOSE),,-q)
|
||||||
QEMU ?= $(call find-cmd,qemu-system-$(ARCH)) -enable-kvm
|
QEMU ?= $(call find-cmd,qemu-system-$(ARCH)) -enable-kvm
|
||||||
NC ?= $(call find-cmd,nc) -vv -r -l
|
NC ?= $(call find-cmd,nc) -vv -r -l
|
||||||
|
XZ ?= $(call find-cmd,xz) $(if $(VERBOSE),--verbose)
|
||||||
|
|
||||||
## Builds and deploys Fedora CoreOS for HOST of TYPE.
|
## Builds and deploys Fedora CoreOS for HOST of TYPE.
|
||||||
deploy: deploy-$(TYPE)
|
deploy: deploy-$(TYPE)
|
||||||
|
@ -53,7 +54,7 @@ deploy-metal: $(TMPDIR)deploy/host/$(HOST)/spec.ign
|
||||||
@printf 'HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n%s\n' "$$(wc -c < $<)" "$$(cat $<)" | $(NC) -s $(ADDRESS) || exit 0
|
@printf 'HTTP/1.0 200 OK\r\nContent-Length: %d\r\n\r\n%s\n' "$$(wc -c < $<)" "$$(cat $<)" | $(NC) -s $(ADDRESS) || exit 0
|
||||||
|
|
||||||
# Prepares and deploys CoreOS release for local, virtual environment.
|
# Prepares and deploys CoreOS release for local, virtual environment.
|
||||||
deploy-virtual: $(TMPDIR)images/fedora-coreos-$(VERSION)-qemu.$(ARCH).qcow2.xz $(TMPDIR)deploy/host/$(HOST)/spec.ign
|
deploy-virtual: $(TMPDIR)images/fedora-coreos-$(VERSION)-qemu.$(ARCH).qcow2 $(TMPDIR)deploy/host/$(HOST)/spec.ign
|
||||||
@printf "Preparing virtual environment (press C-a h for help)...\n"
|
@printf "Preparing virtual environment (press C-a h for help)...\n"
|
||||||
$Q $(QEMU) -m 4096 -cpu host -nographic -snapshot \
|
$Q $(QEMU) -m 4096 -cpu host -nographic -snapshot \
|
||||||
-fw_cfg name=opt/com.coreos/config,file=$(TMPDIR)deploy/host/$(HOST)/spec.ign \
|
-fw_cfg name=opt/com.coreos/config,file=$(TMPDIR)deploy/host/$(HOST)/spec.ign \
|
||||||
|
@ -95,11 +96,10 @@ $(TMPDIR)deploy/%.ign: $(ROOTDIR)%.bu
|
||||||
$(TMPDIR)images/fedora-coreos-$(VERSION)-%:
|
$(TMPDIR)images/fedora-coreos-$(VERSION)-%:
|
||||||
@printf "Downloading image file '$(@F)'...\n"
|
@printf "Downloading image file '$(@F)'...\n"
|
||||||
$Q install -d $(TMPDIR)images
|
$Q install -d $(TMPDIR)images
|
||||||
$Q $(CURL) -o $@ $(IMAGE_URI)$(STREAM)/builds/$(VERSION)/$(ARCH)/$(@F)
|
$Q $(CURL) -o $@.xz.sig $(IMAGE_URI)$(STREAM)/builds/$(VERSION)/$(ARCH)/$(@F).xz.sig
|
||||||
$Q $(CURL) -o $@.sig $(IMAGE_URI)$(STREAM)/builds/$(VERSION)/$(ARCH)/$(@F).sig
|
$Q $(CURL) -o $@.xz $(IMAGE_URI)$(STREAM)/builds/$(VERSION)/$(ARCH)/$(@F).xz
|
||||||
$Q $(GPG) --verify $@.sig
|
$Q $(GPG) --verify $@.xz.sig
|
||||||
$Q test $(suffix $(@F)) = .xz && xz --decompress $@ || true
|
$Q $(XZ) --decompress $@.xz
|
||||||
$Q touch $@
|
|
||||||
|
|
||||||
# Generate Makefile dependencies from `local:` definitions in BUTANE files.
|
# Generate Makefile dependencies from `local:` definitions in BUTANE files.
|
||||||
$(TMPDIR)make.depend: $(shell find $(ROOTDIR) -name '*.bu' -type f 2>/dev/null)
|
$(TMPDIR)make.depend: $(shell find $(ROOTDIR) -name '*.bu' -type f 2>/dev/null)
|
||||||
|
|
|
@ -22,7 +22,7 @@ This is required for validating the signatures for installation media when deplo
|
||||||
virtual hosts:
|
virtual hosts:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl https://getfedora.org/static/fedora.gpg | gpg --import
|
curl -fL https://getfedora.org/static/fedora.gpg | gpg --import
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setup and Deployment
|
## Setup and Deployment
|
||||||
|
|
Loading…
Reference in New Issue