diff --git a/backups/fetch-macOS.py b/backups/fetch-macOS.py index 2a6f7f2..1cab437 100755 --- a/backups/fetch-macOS.py +++ b/backups/fetch-macOS.py @@ -70,13 +70,14 @@ catalogs = { "DeveloperSeed": "https://swscan.apple.com/content/catalogs/others/index-10.16seed-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog", "PublicSeed": "https://swscan.apple.com/content/catalogs/others/index-10.16beta-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog", "PublicRelease": "https://swscan.apple.com/content/catalogs/others/index-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog", - "20": "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog" + "20": "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog", + '21': "https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog", } def get_default_catalog(): '''Returns the default softwareupdate catalog for the current OS''' - return catalogs["20"] + return catalogs["21"] # return catalogs["PublicRelease"] # return catalogs["DeveloperSeed"] @@ -101,9 +102,9 @@ def replicate_url(full_url, # hack print("[+] Fetching %s" % full_url) - if installer and "BaseSystem.dmg" not in full_url and "Big Sur" not in product_title: + if installer and "BaseSystem.dmg" not in full_url and "Big Sur" not in product_title and "Monterey" not in product_title: return - if "Big Sur" in product_title and "InstallAssistant.pkg" not in full_url: + if ("Big Sur" in product_title or "Monterey" in product_title) and "InstallAssistant.pkg" not in full_url: return attempt_resume = True # path = urllib.parse.urlsplit(full_url)[2] diff --git a/scripts/bigsur/Makefile b/scripts/bigsur/Makefile index 615b8f3..8e731e5 100644 --- a/scripts/bigsur/Makefile +++ b/scripts/bigsur/Makefile @@ -55,7 +55,7 @@ else endif BaseSystem.dmg : - ../../fetch-macOS-v2.py --action download --board-id Mac-E43C1C25D4880AD6 + ../../fetch-macOS-v2.py --action download --board-id Mac-2BD1B31983FE1663 InstallAssistant.pkg : ../../backups/fetch-macOS.py --version latest --title "macOS Big Sur" diff --git a/scripts/monterey/Makefile b/scripts/monterey/Makefile index de3d660..eb36bec 100644 --- a/scripts/monterey/Makefile +++ b/scripts/monterey/Makefile @@ -1,19 +1,63 @@ -# Builds a full installer (Monterey-full.img) for Monterey Developer Beta. +# Builds either a recovery image (Monterey-recovery.img) or a full installer (Monterey-full.img) for Monterey. -# You need to opt-in to the Developer beta program first and get the Monterey installer app using System Update +# To build the full installer you must run this on macOS. +# The recovery can be built on either macOS or Linux. -MONTEREY_APP=/Applications/Install\ macOS\ 12\ Beta.app +# For Ubuntu (or similar Linux distribution) you'll need to run this first to get the required packages: +# sudo apt install qemu-utils make -all: Monterey-full.img +# For macOS you'll probably need to run xcode-select --install to get the commandline tools + +MONTEREY_APP=/Applications/Install\ macOS\ Monterey.app + +LINUX_TOOLS = qemu-img + +OS := +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S),Darwin) + OS = MACOS +endif + +# If this is Linux make sure we have all our build tools available: +ifeq ($(OS),) + K := $(foreach exec,$(LINUX_TOOLS),\ + $(if $(shell which $(exec)),some string,$(error "Missing required $(exec) tool for build"))) +endif + +all: Monterey-recovery.img %.img : %.dmg ln $< $@ || cp $< $@ +ifeq ($(OS),MACOS) Monterey-full.dmg : $(MONTEREY_APP) hdiutil create -o "$@" -size 14g -layout GPTSPUD -fs HFS+J hdiutil attach -noverify -mountpoint /Volumes/install_build "$@" sudo "$