debian: add extra package build routines#515
Conversation
|
|
||
| Config Files | ||
| ------------ | ||
| The .config files used to build the various linux-image files are dynamically |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| ======================= | ||
|
|
||
| There is a checklist in the kernel-team.git repository; see | ||
| <https://salsa.debian.org/kernel-team/kernel-team/-/blob/master/docs/kernel-upload-checklist.md>. |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,111 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| class CheckImage(object): | ||
| def __init__(self, config, dir, arch, featureset, flavour): | ||
| self.dir = dir | ||
| self.arch, self.featureset, self.flavour = arch, featureset, flavour |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| # not the case. | ||
| usage = (float(size)/value) * 100.0 | ||
| out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage)) | ||
| if size > value: |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| @@ -0,0 +1,28 @@ | |||
| #!/bin/sh -e | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| for patchdir in debian/patches*; do | ||
| sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series | ||
| done | sort -u > $TMPDIR/used | ||
| find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
|
|
||
| # Using OrderedDict instead of dict makes the pickled config reproducible | ||
| class ConfigCore(collections.OrderedDict): | ||
| def get_merge(self, section, arch, featureset, flavour, key, default=None): |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| def _convert_one(self, schema, data): | ||
| ret = {} | ||
| for key, value in data.items(): | ||
| value = value.replace('\n', ' ') |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| compiler_gnutype: Optional[str] = None | ||
| compiler_gnutype_compat: Optional[str] = None | ||
| config: list[Path] = dataclasses.field(default_factory=list) | ||
| config_default: list[Path] = dataclasses.field(default_factory=list, repr=False) |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
|
|
||
| class FirmwareFile(object): | ||
| def __init__(self, binary, desc=None, source=None, version=None) -> None: |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| if in_header: | ||
| continue | ||
|
|
||
| if line == '\n': |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| assert a.long == [] | ||
|
|
||
| def test_init_str(self) -> None: | ||
| a = PackageDescription('Short\nLong1\n.\nLong2') |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| a = PackageRelationEntry('package (>=version) [arch2 arch1] <profile1 >') | ||
| assert a.name == 'package' | ||
| assert a.version == 'version' | ||
| assert a.arches == {'arch1', 'arch2'} |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| return value[0] | ||
|
|
||
| def get_control(self, key: str, context: dict[str, str] = {}) -> BinaryPackage: |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,30 @@ | |||
| #!/bin/bash | |||
| set -euE | |||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| trap "rm -rf '$TMP'" EXIT | ||
|
|
||
| function git { | ||
| command git -c advice.detachedHead=false -c init.defaultBranch=main -C "$TMP" "$@" |
| } | ||
|
|
||
| git init -q | ||
| git remote add origin "$REPO" |
|
|
||
| git init -q | ||
| git remote add origin "$REPO" | ||
| git fetch -q --depth 1 origin "$COMMIT_BASE" |
| popd > /dev/null | ||
| done | ||
|
|
||
| for i in control rules.gen generated.signed-amd64 generated.signed-arm64; do |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,109 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| with open(path, 'w') as patch: | ||
| in_header = True | ||
| for line in source_patch: | ||
| if in_header and re.match(r'^(\n|[^\w\s]|Index:)', line): |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| args = ['git', 'format-patch', '--subject-prefix=', range] | ||
| format_proc = subprocess.Popen(args, | ||
| cwd=os.path.join(patch_dir, | ||
| lockdown_patch_dir), |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,39 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| @@ -0,0 +1,18 @@ | |||
| #!/bin/sh | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| # not the case. | ||
| usage = (float(size)/value) * 100.0 | ||
| out.write('Image size %d/%d, using %.2f%%. ' % (size, value, usage)) | ||
| if size > value: |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| @@ -0,0 +1,28 @@ | |||
| #!/bin/sh -e | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| for patchdir in debian/patches*; do | ||
| sed '/^#/d; /^[[:space:]]*$/d; /^X /d; s/^+ //; s,^,'"$patchdir"'/,' "$patchdir"/series | ||
| done | sort -u > $TMPDIR/used | ||
| find debian/patches* ! -path '*/series' -type f -name "*.diff" -o -name "*.patch" -printf "%p\n" | sort > $TMPDIR/avail |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
|
|
||
| def read(self, file): | ||
| for line in file: | ||
| version, name, module, export, namespace = \ |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
|
|
||
| # Using OrderedDict instead of dict makes the pickled config reproducible | ||
| class ConfigCore(collections.OrderedDict): | ||
| def get_merge(self, section, arch, featureset, flavour, key, default=None): |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| def _convert_one(self, schema, data): | ||
| ret = {} | ||
| for key, value in data.items(): | ||
| value = value.replace('\n', ' ') |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| compiler_gnutype: Optional[str] = None | ||
| compiler_gnutype_compat: Optional[str] = None | ||
| config: list[Path] = dataclasses.field(default_factory=list) | ||
| config_default: list[Path] = dataclasses.field(default_factory=list, repr=False) |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
|
|
||
| class FirmwareFile(object): | ||
| def __init__(self, binary, desc=None, source=None, version=None) -> None: |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| if in_header: | ||
| continue | ||
|
|
||
| if line == '\n': |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| assert a.long == [] | ||
|
|
||
| def test_init_str(self) -> None: | ||
| a = PackageDescription('Short\nLong1\n.\nLong2') |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| a = PackageRelationEntry('package (>=version) [arch2 arch1] <profile1 >') | ||
| assert a.name == 'package' | ||
| assert a.version == 'version' | ||
| assert a.arches == {'arch1', 'arch2'} |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
|
|
||
| return value[0] | ||
|
|
||
| def get_control(self, key: str, context: dict[str, str] = {}) -> BinaryPackage: |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,30 @@ | |||
| #!/bin/bash | |||
| set -euE | |||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| trap "rm -rf '$TMP'" EXIT | ||
|
|
||
| function git { | ||
| command git -c advice.detachedHead=false -c init.defaultBranch=main -C "$TMP" "$@" |
| } | ||
|
|
||
| git init -q | ||
| git remote add origin "$REPO" |
|
|
||
| git init -q | ||
| git remote add origin "$REPO" | ||
| git fetch -q --depth 1 origin "$COMMIT_BASE" |
| popd > /dev/null | ||
| done | ||
|
|
||
| for i in control rules.gen generated.signed-amd64 generated.signed-arm64; do |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,109 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| with open(path, 'w') as patch: | ||
| in_header = True | ||
| for line in source_patch: | ||
| if in_header and re.match(r'^(\n|[^\w\s]|Index:)', line): |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| args = ['git', 'format-patch', '--subject-prefix=', range] | ||
| format_proc = subprocess.Popen(args, | ||
| cwd=os.path.join(patch_dir, | ||
| lockdown_patch_dir), |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| @@ -0,0 +1,39 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| @@ -0,0 +1,18 @@ | |||
| #!/bin/sh | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| @@ -0,0 +1,135 @@ | |||
| #!/usr/bin/python3 | |||
|
|
|||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
| major_ver = re.sub(r'^(\d+)\..*', r'\1', cur_ver) | ||
| while cur_ver != new_ver: | ||
| next_ver = next_update(cur_ver) | ||
| print(' https://www.kernel.org/pub/linux/kernel/v{}.x/ChangeLog-{}' |
There was a problem hiding this comment.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
| with open('debian/changelog.new', 'w') as new_log: | ||
| line_no = 0 | ||
| inserted = False | ||
| intro_line = ' * {}\n'.format(changelog_intro) |
There was a problem hiding this comment.
ERROR: patch seems to be corrupt (line wrapped?)
| @@ -0,0 +1,2 @@ | |||
| #!/bin/sh -e | |||
| exec "$(dirname "$0")/stable-update" "$@" | |||
| @@ -0,0 +1,2 @@ | |||
| #!/bin/sh -e | |||
| exec "$(dirname "$0")/stable-update" "$@" | |||
There was a problem hiding this comment.
WARNING: Missing or malformed SPDX-License-Identifier tag in line 2
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
And remove linux-image*, linux-libc-dev*, and linux-support* to remove unneeded packages (some of those needed are generated with our build_kernel.sh script).
Footnotes
Build these packages with:
apt build-dep .
dpkg-buildpackage -uc -us ↩