diff --git a/Makefile b/Makefile index 165eec5..b746adf 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,10 @@ include Makefile.inputs ################### # Hidden vars -export SHELL = /bin/sh +export SHELL := /bin/sh # Cache -export DNF_CACHE = -export PACKAGE_MANAGER = dnf +export DNF_CACHE := +export PACKAGE_MANAGER := dnf # Functions ## Formatting = lowercase @@ -24,20 +24,20 @@ export install_pkg # Generated/internal vars ## Formatting = _UPPERCASE -export _BASE_DIR = $(shell pwd) -_IMAGE_REPO_ESCAPED = $(subst /,\/,$(IMAGE_REPO)) -_IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED)) -_LORAX_ARGS = -_LORAX_TEMPLATES = $(call get_templates,install) -_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS)) -_TEMP_DIR = $(shell mktemp -d) -_TEMPLATE_VARS = ARCH _BASE_DIR IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI -_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) +export _BASE_DIR := $(shell pwd) +_IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO)) +_IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED)) +_LORAX_ARGS := +_LORAX_TEMPLATES := $(call get_templates,install) +_REPO_FILES := $(subst /etc/yum.repos.d,repos,$(REPOS)) +_TEMP_DIR := $(shell mktemp -d) +_TEMPLATE_VARS := ARCH _BASE_DIR IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI +_VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo) -_RHEL = true +_RHEL := true else -_RHEL = false +_RHEL := false endif ifeq ($(_RHEL),true) @@ -66,7 +66,7 @@ _LORAX_TEMPLATES += $(call get_templates,secureboot) _TEMPLATE_VARS += ENROLLMENT_PASSWORD endif -_SUBDIRS = container external flatpak_refs lorax_templates repos xorriso test +_SUBDIRS := container external flatpak_refs lorax_templates repos xorriso test # Create checksum ## Default action @@ -103,7 +103,7 @@ results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templat $(if $(wildcard $(_TEMP_DIR)/macros.image-language-conf),mv -f $(_TEMP_DIR)/macros.image-language-conf /etc/rpm/macros.image-language-conf) -FILES_TO_CLEAN = $(wildcard build debugdata pkglists results original-pkgsizes.txt final-pkgsizes.txt lorax.conf *.iso *log) +FILES_TO_CLEAN := $(wildcard build debugdata pkglists results original-pkgsizes.txt final-pkgsizes.txt lorax.conf *.iso *log) .PHONY: clean clean: rm -Rf $(FILES_TO_CLEAN) diff --git a/Makefile.flatpak b/Makefile.flatpak index b0d332f..6279934 100644 --- a/Makefile.flatpak +++ b/Makefile.flatpak @@ -1,18 +1,18 @@ ifneq ($(FLATPAK_DIR),) -_FLATPAK_REPO_GPG = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) -export _FLATPAK_REPO_URL = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) +_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) +export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) _LORAX_ARGS += -i flatpak-libs _LORAX_TEMPLATES += $(call get_templates,flatpak) _TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL else ifneq ($(FLATPAK_REMOTE_REFS_DIR),) -COLLECTED_REFS = $(foreach file,$(filter-out README.md Makefile,$(wildcard $(FLATPAK_REMOTE_REFS_DIR)/*)),$(shell cat $(file))) +COLLECTED_REFS := $(foreach file,$(filter-out README.md Makefile,$(wildcard $(FLATPAK_REMOTE_REFS_DIR)/*)),$(shell cat $(file))) FLATPAK_REMOTE_REFS += $(sort $(COLLECTED_REFS)) endif ifneq ($(FLATPAK_REMOTE_REFS),) -_FLATPAK_REPO_GPG = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) -export _FLATPAK_REPO_URL = $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) +_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2) +export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2) _LORAX_ARGS += -i flatpak-libs _LORAX_TEMPLATES += $(call get_templates,flatpak) \ external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl diff --git a/Makefile.inputs b/Makefile.inputs index c425bea..ad4f333 100644 --- a/Makefile.inputs +++ b/Makefile.inputs @@ -1,24 +1,24 @@ # Configuration vars ## Formatting = UPPERCASE # General -export ADDITIONAL_TEMPLATES = -export ARCH = x86_64 -export EXTRA_BOOT_PARAMS = -export IMAGE_NAME = base -export IMAGE_REPO = quay.io/fedora-ostree-desktops -export IMAGE_TAG = $(VERSION) - REPOS = $(subst :,\:,$(wildcard /etc/yum.repos.d/*.repo)) -export ROOTFS_SIZE = 4 -export VARIANT = Server -export VERSION = 39 -export WEB_UI = false +export ADDITIONAL_TEMPLATES := +export ARCH := x86_64 +export EXTRA_BOOT_PARAMS := +export IMAGE_NAME := base +export IMAGE_REPO := quay.io/fedora-ostree-desktops +export IMAGE_TAG = $(VERSION) + REPOS := $(subst :,\:,$(wildcard /etc/yum.repos.d/*.repo)) +export ROOTFS_SIZE := 4 +export VARIANT := Server +export VERSION := 39 +export WEB_UI := false # Flatpak -export FLATPAK_REMOTE_NAME = flathub -export FLATPAK_REMOTE_URL = https://flathub.org/repo/flathub.flatpakrepo -export FLATPAK_REMOTE_REFS = -export FLATPAK_REMOTE_REFS_DIR = -export FLATPAK_DIR = +export FLATPAK_REMOTE_NAME := flathub +export FLATPAK_REMOTE_URL := https://flathub.org/repo/flathub.flatpakrepo +export FLATPAK_REMOTE_REFS := +export FLATPAK_REMOTE_REFS_DIR := +export FLATPAK_DIR := # Secure boot -export ENROLLMENT_PASSWORD = -export SECURE_BOOT_KEY_URL = -export ISO_NAME = build/deploy.iso \ No newline at end of file +export ENROLLMENT_PASSWORD := +export SECURE_BOOT_KEY_URL := +export ISO_NAME := build/deploy.iso \ No newline at end of file diff --git a/test/iso/Makefile b/test/iso/Makefile index ec99e88..b154ec6 100644 --- a/test/iso/Makefile +++ b/test/iso/Makefile @@ -15,9 +15,9 @@ mnt/iso: sudo mount -t squashfs -o loop mnt/iso/images/install.img mnt/install clean: - sudo umount /mnt/install || true - sudo umount /mnt/iso || true - sudo rmdir /mnt/install /mnt/iso + sudo umount mnt/install || true + sudo umount mnt/iso || true + sudo rmdir mnt/install /mnt/iso install-deps: $(install_pkg) isomd5sum coreutils squashfs-tools curl