diff -u linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/abi/version linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/abi/version --- linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/abi/version +++ linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/abi/version @@ -1 +1 @@ -6.2.0-1005.5~22.04.2 +6.2.0-1005.5~22.04.3 diff -u linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/changelog linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/changelog --- linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/changelog +++ linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/changelog @@ -1,3 +1,16 @@ +linux-lowlatency-hwe-6.2 (6.2.0-1005.5~22.04.4) jammy; urgency=medium + + * jammy/linux-lowlatency-hwe-6.2: 6.2.0-1005.5~22.04.4 -proposed tracker + (LP: #2024016) + + * Packaging resync (LP: #1786013) + - [Packaging] update annotations scripts + + * Miscellaneous Ubuntu changes + - [Packaging] introduce do_lib_rust and enable it only on generic amd64 + + -- Andrea Righi Thu, 15 Jun 2023 20:11:10 +0200 + linux-lowlatency-hwe-6.2 (6.2.0-1005.5~22.04.3) jammy; urgency=medium * jammy/linux-lowlatency-hwe-6.2: 6.2.0-1005.5~22.04.3 -proposed tracker diff -u linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/reconstruct linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/reconstruct --- linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/reconstruct +++ linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/reconstruct @@ -42,6 +42,7 @@ chmod +x 'debian/scripts/misc/kernelconfig' chmod +x 'debian/scripts/misc/migrate-annotations' chmod +x 'debian/scripts/misc/retag' +chmod +x 'debian/scripts/misc/sanitize-annotations' chmod +x 'debian/scripts/misc/splitconfig.pl' chmod +x 'debian/scripts/misc/update-aufs.sh' chmod +x 'debian/scripts/module-inclusion' diff -u linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/tracking-bug linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/tracking-bug --- linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/tracking-bug +++ linux-lowlatency-hwe-6.2-6.2.0/debian.lowlatency-hwe-6.2/tracking-bug @@ -1 +1 @@ -2023761 d2023.05.29-2 +2024016 d2023.05.29-3 diff -u linux-lowlatency-hwe-6.2-6.2.0/debian.master/rules.d/amd64.mk linux-lowlatency-hwe-6.2-6.2.0/debian.master/rules.d/amd64.mk --- linux-lowlatency-hwe-6.2-6.2.0/debian.master/rules.d/amd64.mk +++ linux-lowlatency-hwe-6.2-6.2.0/debian.master/rules.d/amd64.mk @@ -23,0 +24 @@ +do_lib_rust = true diff -u linux-lowlatency-hwe-6.2-6.2.0/debian/changelog linux-lowlatency-hwe-6.2-6.2.0/debian/changelog --- linux-lowlatency-hwe-6.2-6.2.0/debian/changelog +++ linux-lowlatency-hwe-6.2-6.2.0/debian/changelog @@ -1,3 +1,16 @@ +linux-lowlatency-hwe-6.2 (6.2.0-1005.5~22.04.4) jammy; urgency=medium + + * jammy/linux-lowlatency-hwe-6.2: 6.2.0-1005.5~22.04.4 -proposed tracker + (LP: #2024016) + + * Packaging resync (LP: #1786013) + - [Packaging] update annotations scripts + + * Miscellaneous Ubuntu changes + - [Packaging] introduce do_lib_rust and enable it only on generic amd64 + + -- Andrea Righi Thu, 15 Jun 2023 20:11:10 +0200 + linux-lowlatency-hwe-6.2 (6.2.0-1005.5~22.04.3) jammy; urgency=medium * jammy/linux-lowlatency-hwe-6.2: 6.2.0-1005.5~22.04.3 -proposed tracker diff -u linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/1-maintainer.mk linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/1-maintainer.mk --- linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/1-maintainer.mk +++ linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/1-maintainer.mk @@ -104,6 +104,7 @@ @echo "do_common_headers_indep = $(do_common_headers_indep)" @echo "do_full_source = $(do_full_source)" @echo "do_odm_drivers = $(do_odm_drivers)" + @echo "do_lib_rust = $(do_lib_rust)" @echo "do_tools = $(do_tools)" @echo "do_tools_common = $(do_tools_common)" @echo "do_any_tools = $(do_any_tools)" diff -u linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/2-binary-arch.mk linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/2-binary-arch.mk --- linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/2-binary-arch.mk +++ linux-lowlatency-hwe-6.2-6.2.0/debian/rules.d/2-binary-arch.mk @@ -87,15 +87,15 @@ done endef -# Ensure the directory prefix is exactly 100 characters long so pathnames are the +# Ensure the directory prefix is exactly 140 characters long so pathnames are the # exact same length in any binary files produced by the builds. These will be # commonised later. dkms_20d=.................... -dkms_100d=$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d) -dkms_100c=$(shell echo '$(dkms_100d)' | sed -e 's/\./_/g') +dkms_140d=$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d)$(dkms_20d) +dkms_140c=$(shell echo '$(dkms_140d)' | sed -e 's/\./_/g') define dkms_dir_prefix = -$(shell echo $(1)/$(dkms_100c) | \ - sed -e 's/\($(dkms_100d)\).*/\1/' -e 's/^\(.*\)....$$/\1dkms/') +$(shell echo $(1)/$(dkms_140c) | \ + sed -e 's/\($(dkms_140d)\).*/\1/' -e 's/^\(.*\)....$$/\1dkms/') endef # Install the finished build @@ -132,7 +132,9 @@ dh_prep -p$(bin_pkg_name)-$* dh_prep -p$(mods_pkg_name)-$* dh_prep -p$(hdrs_pkg_name)-$* +ifeq ($(do_lib_rust),true) dh_prep -p$(rust_pkg_name)-$* +endif $(foreach _m,$(all_standalone_dkms_modules), \ $(if $(enable_$(_m)),dh_prep -p$(dkms_$(_m)_pkg_name)-$*;)\ ) @@ -675,7 +677,9 @@ $(call dh_all,$(pkgbldinfo)) $(call dh_all,$(pkghdr)) +ifeq ($(do_lib_rust),true) $(call dh_all,$(pkgrust)) +endif ifneq ($(skipsub),true) @set -e; for sub in $($(*)_sub); do \ diff -u linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/annotations linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/annotations --- linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/annotations +++ linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/annotations @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- mode: python -*- # Manage Ubuntu kernel .config and annotations # Copyright © 2022 Canonical Ltd. diff -u linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/kconfig/annotations.py linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/kconfig/annotations.py --- linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/kconfig/annotations.py +++ linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/kconfig/annotations.py @@ -105,7 +105,10 @@ m = re.match(r'.* policy<(.*?)>', line) if m: match = True - entry['policy'] |= literal_eval(m.group(1)) + try: + entry['policy'] |= literal_eval(m.group(1)) + except TypeError: + entry['policy'] = {**entry['policy'], **literal_eval(m.group(1))} m = re.match(r'.* note<(.*?)>', line) if m: @@ -114,14 +117,14 @@ entry['note'] = "'" + m.group(1).replace("'", '') + "'" if not match: - raise Exception('syntax error') + raise SyntaxError('syntax error') self.config[conf] = entry except Exception as e: - raise Exception(str(e) + f', line = {line}') from e + raise SyntaxError(str(e) + f', line = {line}') from e continue # Invalid line - raise Exception(f'invalid line: {line}') + raise SyntaxError(f'invalid line: {line}') def _parse(self, data: str): """ @@ -159,9 +162,9 @@ # Sanity check: Verify that all FLAVOUR_DEP flavors are valid for src, tgt in self.flavour_dep.items(): if src not in self.flavour: - raise Exception(f'Invalid source flavour in FLAVOUR_DEP: {src}') + raise SyntaxError(f'Invalid source flavour in FLAVOUR_DEP: {src}') if tgt not in self.include_flavour: - raise Exception(f'Invalid target flavour in FLAVOUR_DEP: {tgt}') + raise SyntaxError(f'Invalid target flavour in FLAVOUR_DEP: {tgt}') def _remove_entry(self, config: str): if self.config[config]: @@ -204,7 +207,10 @@ # Determine if we need to import all configs or a single config if not configs: configs = c.config.keys() - configs |= self.search_config(arch=arch, flavour=flavour).keys() + try: + configs |= self.search_config(arch=arch, flavour=flavour).keys() + except TypeError: + configs = {**configs, **self.search_config(arch=arch, flavour=flavour).keys()} # Import configs from the Kconfig object into Annotations if flavour is not None: @@ -332,11 +338,20 @@ if 'policy' not in new_val: continue - # If new_val is a subset of old_val, skip it + # If new_val is a subset of old_val, skip it unless there are + # new notes that are different than the old ones. old_val = tmp_a.config.get(conf) if old_val and 'policy' in old_val: - if old_val['policy'] == old_val['policy'] | new_val['policy']: - continue + try: + can_skip = old_val['policy'] == old_val['policy'] | new_val['policy'] + except TypeError: + can_skip = old_val['policy'] == {**old_val['policy'], **new_val['policy']} + if can_skip: + if 'note' not in new_val: + continue + if 'note' in old_val and 'note' in new_val: + if old_val['note'] == new_val['note']: + continue # Write out the policy (and note) line(s) val = dict(sorted(new_val['policy'].items())) only in patch2: unchanged: --- linux-lowlatency-hwe-6.2-6.2.0.orig/debian/scripts/misc/sanitize-annotations +++ linux-lowlatency-hwe-6.2-6.2.0/debian/scripts/misc/sanitize-annotations @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 +# +# Try to automatically sanitize an old "annotations" file, dropping all the +# deprecated flags, arbitrary enforcements rules, etc. +# +# Usage: +# $ ./sanitize-annotations debian.master/config/annotations + +import sys +import re + + +def remove_flags_and_drop_lines(file_path): + # Read the contents of the file + with open(file_path, "r", encoding="utf-8") as file: + content = file.read() + + # Check if the file has the required headers + lines = content.splitlines() + if ( + len(lines) < 2 + or lines[0].strip() != "# Menu: HEADER" + or lines[1].strip() != "# FORMAT: 4" + ): + print(f"ERROR: {file_path} doesn't have a valid header") + print("Fix the headers as explained here: " + + "https://docs.google.com/document/d/1NnGC2aknyy2TJWMsoYzhrZMr9rYMA09JQBEvC-LW_Lw/") + sys.exit(1) + + # Remove unsupported annotations + updated_content = re.sub(r"(flag|mark)<.*?>", "", content) + + # Drop lines with a single word and trailing spaces + updated_content = re.sub(r"^\w+\s*$", "", updated_content, flags=re.MULTILINE) + + # Add a space after all caps followed by 'policy' + updated_content = re.sub(r"([A-Z]+)(policy)", r"\1 \2", updated_content) + + # Add 'note' if missing + updated_content = re.sub(r"(\s+)(<.*?>)", r"\1note\2", updated_content) + + # Write the updated contents back to the file + with open(file_path, "w", encoding="utf-8") as file: + file.write(updated_content) + + +if __name__ == "__main__": + file_path = sys.argv[1] + remove_flags_and_drop_lines(file_path)