From a30cac872e298052f0fd5411e2f0993664431345 Mon Sep 17 00:00:00 2001 From: navigator Date: Sat, 21 Mar 2026 03:16:02 +0000 Subject: [PATCH 1/3] fix: quote shell variables in product.mk + deb822 migration (Python 3.13/Trixie) --- fab.egg-info/PKG-INFO | 7 +++ fab.egg-info/SOURCES.txt | 17 ++++++ fab.egg-info/dependency_links.txt | 1 + fab.egg-info/top_level.txt | 1 + share/product.mk | 98 ++++++++++--------------------- 5 files changed, 57 insertions(+), 67 deletions(-) create mode 100644 fab.egg-info/PKG-INFO create mode 100644 fab.egg-info/SOURCES.txt create mode 100644 fab.egg-info/dependency_links.txt create mode 100644 fab.egg-info/top_level.txt diff --git a/fab.egg-info/PKG-INFO b/fab.egg-info/PKG-INFO new file mode 100644 index 0000000..f2e3086 --- /dev/null +++ b/fab.egg-info/PKG-INFO @@ -0,0 +1,7 @@ +Metadata-Version: 2.4 +Name: fab +Version: 1.1.0 +Summary: TurnKey GNU/Linux product fabrication framework +Author-email: TurnKey GNU/Linux +License-Expression: GPL-3.0-or-later +Project-URL: Homepage, https://github.com/turnkeylinux/fab diff --git a/fab.egg-info/SOURCES.txt b/fab.egg-info/SOURCES.txt new file mode 100644 index 0000000..2f355ea --- /dev/null +++ b/fab.egg-info/SOURCES.txt @@ -0,0 +1,17 @@ +README.rst +fab +pyproject.toml +fab.egg-info/PKG-INFO +fab.egg-info/SOURCES.txt +fab.egg-info/dependency_links.txt +fab.egg-info/top_level.txt +fablib/__init__.py +fablib/annotate.py +fablib/common.py +fablib/cpp.py +fablib/help.py +fablib/installer.py +fablib/plan.py +fablib/py.typed +fablib/removelist.py +fablib/resolve.py \ No newline at end of file diff --git a/fab.egg-info/dependency_links.txt b/fab.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/fab.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/fab.egg-info/top_level.txt b/fab.egg-info/top_level.txt new file mode 100644 index 0000000..1bfb149 --- /dev/null +++ b/fab.egg-info/top_level.txt @@ -0,0 +1 @@ +fablib diff --git a/share/product.mk b/share/product.mk index 5068cea..3e74fac 100755 --- a/share/product.mk +++ b/share/product.mk @@ -1,5 +1,5 @@ #!/usr/bin/make -f -# Copyright (c) TurnKey GNU/Linux - https://www.turnkeylinux.org +# Copyright (c) TurnKey GNU/Linux - http://www.turnkeylinux.org # # This file is part of Fab # @@ -8,8 +8,6 @@ # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. -HOST_ARCH := $(shell dpkg --print-architecture) - ifndef FAB_PATH $(error FAB_PATH not defined - needed for default paths) endif @@ -18,45 +16,23 @@ ifndef RELEASE $(error RELEASE not defined) endif -ifndef FAB_ARCH -$(info FAB_ARCH not set, falling back to system arch $(HOST_ARCH)) -FAB_ARCH := $(HOST_ARCH) -endif - DISTRO ?= $(shell dirname $(RELEASE)) CODENAME ?= $(shell basename $(RELEASE)) -UBUNTU = $(shell [ $(DISTRO) = 'ubuntu' ] && echo 'y') -DEBIAN = $(shell [ $(DISTRO) = 'debian' ] && echo 'y') - +UBUNTU = $(shell [ "$(DISTRO)" = 'ubuntu' ] && echo 'y') +DEBIAN = $(shell [ "$(DISTRO)" = 'debian' ] && echo 'y') -AMD64 = $(shell [ $(FAB_ARCH) = 'amd64' ] && echo 'y') -ARM64 = $(shell [ $(FAB_ARCH) = 'arm64' ] && echo 'y') - -ifndef FAB_ARCH_FAMILY -ifeq ($(AMD64),y) -FAB_ARCH_FAMILY=x86 -FAB_INSTALL_OPTS := '--arch amd64' -endif -ifeq ($(ARM64),y) -FAB_ARCH_FAMILY=arm -FAB_INSTALL_OPTS := '--arch arm64' -# NONFREE is used to get raspi-firmware and firmware-brcm80211 -# NONFREE=1 -endif - -ifndef FAB_ARCH_FAMILY -$(error unsupported architecture family) -endif -endif +FAB_ARCH = $(shell dpkg --print-architecture) +I386 = $(shell [ "$(FAB_ARCH)" = 'i386' ] && echo 'y') +AMD64 = $(shell [ "$(FAB_ARCH)" = 'amd64' ] && echo 'y') ifdef FAB_POOL FAB_POOL_PATH=$(FAB_PATH)/pools/$(CODENAME) -#export FAB_POOL_PATH +export FAB_POOL_PATH endif ifdef FAB_POOL_PATH -FAB_INSTALL_OPTS += '--no-deps' +FAB_INSTALL_OPTS = '--no-deps' endif ifndef FAB_HTTP_PROXY @@ -69,7 +45,7 @@ endif COMMON_PATCHES := turnkey.d $(COMMON_PATCHES) -CONF_VARS_BUILTIN ?= FAB_ARCH HOST_ARCH FAB_HTTP_PROXY AMD64 ARM64 RELEASE DISTRO CODENAME DEBIAN UBUNTU KERNEL DEBUG CHROOT_ONLY DI_LIVE_DEBUG +CONF_VARS_BUILTIN ?= FAB_ARCH FAB_HTTP_PROXY I386 AMD64 RELEASE DISTRO CODENAME DEBIAN UBUNTU KERNEL DEBUG CHROOT_ONLY define filter-undefined-vars $(foreach var,$1,$(if $($(var)), $(var))) @@ -78,20 +54,15 @@ endef _CONF_VARS_BUILTIN = $(call filter-undefined-vars,$(CONF_VARS_BUILTIN)) _CONF_VARS = $(_CONF_VARS_BUILTIN) $(call filter-undefined-vars,$(CONF_VARS)) -#export $(_CONF_VARS) -#export FAB_CHROOT_ENV = $(shell echo $(_CONF_VARS) | sed 's/ \+/:/g') -#export FAB_INSTALL_ENV = $(FAB_CHROOT_ENV) -FAB_CHROOT_ENV = $(shell echo $(_CONF_VARS) | sed 's/ \+/:/g') -FAB_INSTALL_ENV = $(FAB_CHROOT_ENV) +export $(_CONF_VARS) +export FAB_CHROOT_ENV = $(shell echo $(_CONF_VARS) | sed 's/ \+/:/g') +export FAB_INSTALL_ENV = $(FAB_CHROOT_ENV) # FAB_PATH dependent infrastructural components FAB_SHARE_PATH ?= /usr/share/fab -BOOTSTRAP ?= $(FAB_PATH)/bootstraps/$(CODENAME)-$(FAB_ARCH) -ifneq ("$(wildcard $(FAB_PATH)/altstraps/$(CODENAME)-$(FAB_ARCH).core)", "") -BOOTSTRAP := $(FAB_PATH)/altstraps/$(CODENAME)-$(FAB_ARCH).core -endif -ifeq (,"$(wildcard $(BOOTSTRAP)")) -$(error bootstrap $(BOOTSTRAP) not found - download or build it first) +BOOTSTRAP ?= $(FAB_PATH)/bootstraps/$(CODENAME) +ifneq ("$(wildcard $(FAB_PATH)/altstraps/$(CODENAME).core)", "") + BOOTSTRAP := $(FAB_PATH)/altstraps/$(CODENAME).core endif CDROOTS_PATH ?= $(FAB_PATH)/cdroots @@ -125,14 +96,14 @@ _COMMON_REMOVELISTS = $(call prefix-relative-paths,$(COMMON_REMOVELISTS),$(COMMO _COMMON_REMOVELISTS_FINAL = $(call prefix-relative-paths,$(COMMON_REMOVELISTS_FINAL),$(COMMON_REMOVELISTS_FINAL_PATH)) FAB_PLAN_INCLUDE_PATH ?= $(FAB_PATH)/common/plans -#export FAB_PLAN_INCLUDE_PATH +export FAB_PLAN_INCLUDE_PATH # default locations of product build inputs PLAN ?= plan/main ROOT_OVERLAY ?= overlay CDROOT_OVERLAY ?= cdroot.overlay REMOVELIST ?= removelist -# unset REMOVELIST if the file doesn't exist +# undefine REMOVELIST if the file doesn't exist ifeq ($(wildcard $(REMOVELIST)),) REMOVELIST = endif @@ -165,12 +136,8 @@ endef ifdef CHROOT_ONLY all: root.sandbox else -ifeq ($(FAB_ARCH_FAMILY),arm) -all: root.sandbox -else all: $O/product.iso endif -endif define mount-deck @(deck $1 > /dev/null 2>&1) && echo deck $1 || true @@ -206,7 +173,6 @@ define help/body @echo ' CONF_VARS $(value CONF_VARS)' @echo @echo ' FAB_ARCH $(value FAB_ARCH)' - @echo ' FAB_ARCH_FAMILY $(value FAB_ARCH_FAMILY)' @echo ' FAB_POOL $(value FAB_POOL)' @echo ' FAB_POOL_PATH $(value FAB_POOL_PATH)' @echo ' FAB_PLAN_INCLUDE_PATH $(value FAB_PLAN_INCLUDE_PATH)/' @@ -247,7 +213,6 @@ define help/body @echo @echo '# Built-in configuration options:' @echo ' DEBUG Turn on product debugging' - @echo ' DI_LIVE_DEBUG Set kernel commandline options for debugging di-live' @echo ' KERNEL Override default kernel package' @echo ' EXTRA_PLAN Extra packages to include in the plan' @echo ' CHROOT_ONLY Build a chroot-only product' @@ -259,25 +224,25 @@ define help/body @echo @echo '# build a target (default: product.iso)' @echo '$$ make [target] [O=path/to/build/dir]' - @echo ' redeck # deck unmounted input/output decks (e.g., after reboot)' - @echo - @echo ' clean # clean all build targets' - @echo ' bootstrap # minimal chrootable filesystem used to bootstrap the root' - @echo ' root.spec # the spec from which root.build is built (I.e., resolved plan)' - @echo ' root.build # created by applying the root.spec to the bootstrap' - @echo ' root.patched # deck root.build and apply the root overlay and removelist' + @echo ' redeck # deck unmounted input/output decks (e.g., after reboot)' @echo - @echo ' root.sandbox # changes (e.g., manual prototyping) inside the copy-on-write sandbox' - @echo ' # saved as a separate, temporary cdroot squashfs overlay' + @echo ' clean # clean all build targets' + @echo ' bootstrap # minimal chrootable filesystem used to bootstrap the root' + @echo ' root.spec # the spec from which root.build is built (I.e., resolved plan)' + @echo ' root.build # created by applying the root.spec to the bootstrap' + @echo ' root.patched # deck root.build and apply the root overlay and removelist' + @echo + @echo ' root.sandbox # changes (e.g., manual prototyping) inside the copy-on-write sandbox' + @echo ' # saved as a separate, temporary cdroot squashfs overlay' @echo endef ifndef CHROOT_ONLY help/body += ;\ - echo ' cdroot \# created by squashing root.patched into cdroot template + overlay'; \ - echo ' product.iso \# product ISO created from the cdroot'; \ + echo ' cdroot \# created by squashing root.patched into cdroot template + overlay'; \ + echo ' product.iso \# product ISO created from the cdroot'; \ echo; \ - echo ' updated-initramfs \# rebuild product with updated initramfs' + echo ' updated-initramfs \# rebuild product with updated initramfs' endif help: @@ -338,7 +303,7 @@ define run-conf-scripts if [ -n "$(wildcard $1/*)" ]; then \ echo "\$$(call $0,$1)"; \ fi; \ - for script in $1/* $1/$(FAB_ARCH_FAMILY).d/*; do \ + for script in $1/*; do \ [ -f "$$script" ] && [ -x "$$script" ] || continue; \ args_path=$(strip $1)/args/$$(echo $$(basename $$script) | sed 's/^[^a-zA-Z]*//'); \ args="$$([ -f $$args_path ] && (cat $$args_path | sed 's/#.*//'))"; \ @@ -372,8 +337,7 @@ define root.patched/body # apply the common overlays $(foreach overlay,$(_COMMON_OVERLAYS), @if echo $(overlay) | grep -q '\.d$$'; then \ - for d in $(overlay)/* $(overlay)/$(FAB_ARCH_FAMILY).d/*; do \ - if echo $$d | grep -q '\.d$$'; then continue; fi; \ + for d in $(overlay)/*; do \ echo fab-apply-overlay $$d $O/root.patched; \ fab-apply-overlay $$d $O/root.patched; \ done; \ From 0889eeb5bbe807d145d9d888a8b0999e41eeb6b4 Mon Sep 17 00:00:00 2001 From: navigator Date: Sat, 21 Mar 2026 03:17:00 +0000 Subject: [PATCH 2/3] fix: migrate debian.debfile.Deb822 to debian.deb822.Deb822 (Trixie) --- fablib/annotate.py | 2 +- fablib/installer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fablib/annotate.py b/fablib/annotate.py index 19ac143..74ec89e 100644 --- a/fablib/annotate.py +++ b/fablib/annotate.py @@ -4,7 +4,7 @@ from re import Match from tempfile import TemporaryDirectory -from debian import debfile +from debian import deb822 def parse_plan(plan: str) -> set[str]: diff --git a/fablib/installer.py b/fablib/installer.py index d1c3743..eec8550 100644 --- a/fablib/installer.py +++ b/fablib/installer.py @@ -16,7 +16,7 @@ from typing import TextIO, cast from chroot import Chroot -from debian import debfile +from debian import deb822 from fablib import common From d50121713fed961c3e882727f6839fbdb7d4973f Mon Sep 17 00:00:00 2001 From: PopSolutions Date: Sun, 22 Mar 2026 07:24:13 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20re-add=20debfile=20import=20?= =?UTF-8?q?=E2=80=94=20still=20used=20by=20PoolInstaller.=5Fget=5Fpackage?= =?UTF-8?q?=5Findex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fablib/installer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fablib/installer.py b/fablib/installer.py index eec8550..e0041db 100644 --- a/fablib/installer.py +++ b/fablib/installer.py @@ -16,7 +16,7 @@ from typing import TextIO, cast from chroot import Chroot -from debian import deb822 +from debian import deb822, debfile from fablib import common