diff -Nru kernelstub-3.1.4~1631911584~20.04~de5b292/debian/changelog kernelstub-3.1.4~1658498801~20.04~41819bb/debian/changelog --- kernelstub-3.1.4~1631911584~20.04~de5b292/debian/changelog 2021-09-17 20:46:24.000000000 +0000 +++ kernelstub-3.1.4~1658498801~20.04~41819bb/debian/changelog 2022-07-22 14:06:41.000000000 +0000 @@ -1,10 +1,10 @@ -kernelstub (3.1.4~1631911584~20.04~de5b292) focal; urgency=medium +kernelstub (3.1.4~1658498801~20.04~41819bb) focal; urgency=medium * Auto Build * Do live mode check immediately after parsing config - -- Pop OS (ISO Signing Key) Fri, 17 Sep 2021 14:46:24 -0600 + -- Pop OS (ISO Signing Key) Fri, 22 Jul 2022 08:06:41 -0600 kernelstub (3.1.3) eoan; urgency=medium diff -Nru kernelstub-3.1.4~1631911584~20.04~de5b292/debian/control kernelstub-3.1.4~1658498801~20.04~41819bb/debian/control --- kernelstub-3.1.4~1631911584~20.04~de5b292/debian/control 2021-09-17 20:46:24.000000000 +0000 +++ kernelstub-3.1.4~1658498801~20.04~41819bb/debian/control 2022-07-22 14:06:41.000000000 +0000 @@ -2,7 +2,7 @@ Maintainer: Ian Santopietro Section: python Priority: optional -Build-Depends: python3-all, pyflakes3, debhelper (>= 7.4.3), dh-python +Build-Depends: python3-all, pyflakes3, debhelper (>= 7.4.3), dh-python, python3-setuptools Standards-Version: 3.9.1 Package: kernelstub diff -Nru kernelstub-3.1.4~1631911584~20.04~de5b292/kernelstub/installer.py kernelstub-3.1.4~1658498801~20.04~41819bb/kernelstub/installer.py --- kernelstub-3.1.4~1631911584~20.04~de5b292/kernelstub/installer.py 2021-09-17 20:46:24.000000000 +0000 +++ kernelstub-3.1.4~1658498801~20.04~41819bb/kernelstub/installer.py 2022-07-22 14:06:41.000000000 +0000 @@ -22,7 +22,7 @@ terms. """ -import os, shutil, logging +import os, shutil, logging, platform, gzip from pathlib import Path @@ -118,10 +118,17 @@ self.log.debug('kernel being copied to %s' % self.kernel_dest) try: - self.copy_files( - self.opsys.kernel_path, - self.kernel_dest, - simulate=simulate) + arch = platform.machine() + if arch == "arm64" or arch == "aarch64": + self.gunzip_files( + self.opsys.kernel_path, + self.kernel_dest, + simulate=simulate) + else: + self.copy_files( + self.opsys.kernel_path, + self.kernel_dest, + simulate=simulate) except FileOpsError as e: self.log.exception( @@ -237,6 +244,23 @@ self.log.debug(e) return False + def gunzip_files(self, src, dest, simulate): # Decompress file src to dest + if simulate: + self.log.info('Simulate decompressing: %s => %s' % (src, dest)) + return True + else: + try: + self.log.debug('Decompressing: %s => %s' % (src, dest)) + with gzip.open(src, 'rb') as in_obj: + with open(dest, 'wb') as out_obj: + shutil.copyfileobj(in_obj, out_obj) + return True + except Exception as e: + self.log.debug(e) + raise FileOpsError("Could not decompress one or more files.") + return False + + def copy_files(self, src, dest, simulate): # Copy file src into dest if simulate: self.log.info('Simulate copying: %s => %s' % (src, dest)) diff -Nru kernelstub-3.1.4~1631911584~20.04~de5b292/kernelstub/kernel_option.py kernelstub-3.1.4~1658498801~20.04~41819bb/kernelstub/kernel_option.py --- kernelstub-3.1.4~1631911584~20.04~de5b292/kernelstub/kernel_option.py 2021-09-17 20:46:24.000000000 +0000 +++ kernelstub-3.1.4~1658498801~20.04~41819bb/kernelstub/kernel_option.py 2022-07-22 14:06:41.000000000 +0000 @@ -46,7 +46,8 @@ opts = options(path) latest_option, latest_version = get_newest_option(opts) - opts.pop(latest_version) + if latest_version is not None: + opts.pop(latest_version) previous_option = None if len(opts) > 0: previous_option, latest_version = get_newest_option(opts) diff -Nru kernelstub-3.1.4~1631911584~20.04~de5b292/setup.py kernelstub-3.1.4~1658498801~20.04~41819bb/setup.py --- kernelstub-3.1.4~1631911584~20.04~de5b292/setup.py 2021-09-17 20:46:24.000000000 +0000 +++ kernelstub-3.1.4~1658498801~20.04~41819bb/setup.py 2022-07-22 14:06:41.000000000 +0000 @@ -19,8 +19,8 @@ """ -from distutils.core import setup -from distutils.cmd import Command +from setuptools import setup +from setuptools import Command import os, subprocess, sys TREE = os.path.dirname(os.path.abspath(__file__))