diff --git a/helpers/DATA/depthcharge-tools/patch_changes/001_prevent-error-when-using-versionless-vmlinuz-in-netinstall.patch b/helpers/DATA/depthcharge-tools/patch_changes/001_prevent-error-when-using-versionless-vmlinuz-in-netinstall.patch new file mode 100644 index 0000000..56492c6 --- /dev/null +++ b/helpers/DATA/depthcharge-tools/patch_changes/001_prevent-error-when-using-versionless-vmlinuz-in-netinstall.patch @@ -0,0 +1,39 @@ +diff --git a/depthcharge_tools/depthchargectl/_build.py b/depthcharge_tools/depthchargectl/_build.py +index a605b83c..746e8a51 100644 +--- a/depthcharge_tools/depthchargectl/_build.py ++++ b/depthcharge_tools/depthchargectl/_build.py +@@ -157,11 +157,12 @@ class depthchargectl_build( + @Argument("--kernel-release", nargs=1) + def kernel_release(self, name=None): + """Release name for the kernel used in image name""" +- if name is None and self.kernel_version is not None: +- if self.kernel == self.kernel_version.kernel: +- name = self.kernel_version.release +- +- return name ++ # Trisquel customization: skip autodetection and honor empty values. ++ if name is not None: ++ return name ++ if self.kernel_version is not None and self.kernel == self.kernel_version.kernel: ++ return self.kernel_version.release ++ return "" + + @custom_kernel_options.add + @Argument("--kernel", nargs=1) +diff --git a/depthcharge_tools/depthchargectl/_build.py b/depthcharge_tools/depthchargectl/_build.py +index 746e8a51..45e0c02c 100644 +--- a/depthcharge_tools/depthchargectl/_build.py ++++ b/depthcharge_tools/depthchargectl/_build.py +@@ -82,6 +82,12 @@ class depthchargectl_build( + @Argument + def kernel_version(self, kernel_version=None): + """Installed kernel version to build an image for.""" ++ ++ # Trisquel customization: If --kernel is set but --kernel-version is ++ # not, skip autodetection and return None early ++ if kernel_version is None and self.kernel is not None: ++ return None ++ + if isinstance(kernel_version, KernelEntry): + return kernel_version + diff --git a/helpers/make-depthcharge-tools b/helpers/make-depthcharge-tools new file mode 100644 index 0000000..05e1390 --- /dev/null +++ b/helpers/make-depthcharge-tools @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright (C) 2025 Luis Guzmán +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +#STAGE-4-UDEBS-DEBIAN-INSTALLER + +VERSION=1 +NETINST=true +. ./config + +apply_patch_changes + +changelog "Patch kernel discovery to match version-less vmlinuz in Ecne for debian-installer." +package