diff --git a/scripts/bs-upload-kernel b/scripts/bs-upload-kernel index b592cc8..c97c25a 100755 --- a/scripts/bs-upload-kernel +++ b/scripts/bs-upload-kernel @@ -103,6 +103,9 @@ my @macros = ("%is_kotd 1"); if ($ignore_kabi) { push(@macros, "%ignore_kabi_badness 1"); } +if (-e "$dir/klp-symbols") { + push(@macros, "%klp_symbols 1"); +} my @remove_packages = qw(kernel-dummy); if (!$enable_checks) { push(@remove_packages, "post-build-checks", "rpmlint-Factory", diff --git a/scripts/git_sort/lib.py b/scripts/git_sort/lib.py index 9442b37..c656116 100644 --- a/scripts/git_sort/lib.py +++ b/scripts/git_sort/lib.py @@ -280,6 +280,11 @@ class InputEntry(object): if not commit_tags: self.dest_head = git_sort.oot mainline = mainline_tags[0] + if re.match("^(v[1-9]|Queued)", mainline, re.IGNORECASE): + raise exc.KSError( + "There is a problem with patch \"%s\". " + "The Patch-mainline tag \"%s\" requires Git-commit." % ( + name, mainline,)) if not re.match("^(Submitted|Not yet)", mainline, re.IGNORECASE): raise exc.KSError( "There is a problem with patch \"%s\". " diff --git a/scripts/git_sort/tests/test_series_sort.py b/scripts/git_sort/tests/test_series_sort.py index 96f54e8..f0ffe5b 100755 --- a/scripts/git_sort/tests/test_series_sort.py +++ b/scripts/git_sort/tests/test_series_sort.py @@ -955,6 +955,18 @@ class TestFromPatch(unittest.TestCase): "Error: There is a problem with patch \"%s\". The Git-repo tag is incorrect or the patch is in the wrong section of series.conf and (the Git-commit tag is incorrect or the relevant remote is outdated or not available locally) or an entry for this repository is missing from \"remotes\". In the last case, please edit \"remotes\" in \"scripts/git_sort/git_sort.py\" and commit the result. Manual intervention is required.\n" % (name,)) + def test_malformed(self): + """ + Generate a series and destroy the Git-commit tag on one of the patches + This should report a specific error so that this situation is not conflated with wrong Patch-mainline tag in out-of-tree section + """ + + name, series2 = self.prepare_found_indexed_upstream_good() + subprocess.call(['sed', '-i', '-e', 's/commit/comit/', name]) + self.check_failure( +'Error: There is a problem with patch "%s". The Patch-mainline tag "Queued in subsystem maintainer repository" requires Git-commit.\n' % (name)) + + if __name__ == '__main__': # Run a single testcase suite = unittest.TestLoader().loadTestsFromTestCase(TestFromPatch) diff --git a/scripts/gitlog2changes b/scripts/gitlog2changes index 7f59a5d..15435c5 100755 --- a/scripts/gitlog2changes +++ b/scripts/gitlog2changes @@ -63,11 +63,22 @@ sub parse_gitlog { my $cur = { message => [] }; my @states = qw(commit tree parent author committer blank message); my $st = 0; + my $gpgsig = 0; while (my $line = <$fh>) { next if $line =~ /^#/; chomp($line); my $expect = $states[$st]; if ($expect eq "blank") { + if ($gpgsig > 0) { + if ($line =~ /-----END PGP SIGNATURE-----/) { + $gpgsig = 0; + } + next; + } + if ($line =~ /^gpgsig/) { + $gpgsig = 1; + next; + } if ($line ne "") { die "Malformed git rev-parse output ($cur->{commit}): expected blank line, got \"$line\"\n"; } diff --git a/scripts/python/check-patchhdr b/scripts/python/check-patchhdr index 0f8f89e..165eae2 100755 --- a/scripts/python/check-patchhdr +++ b/scripts/python/check-patchhdr @@ -1,9 +1,5 @@ -#!/usr/bin/python3 -# -*- coding: utf-8 -*-, - -from __future__ import absolute_import -from __future__ import print_function -from __future__ import division +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys from optparse import OptionParser diff --git a/scripts/python/suse_git/header.py b/scripts/python/suse_git/header.py index 1cbf0a9..43d4406 100755 --- a/scripts/python/suse_git/header.py +++ b/scripts/python/suse_git/header.py @@ -1,5 +1,5 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*-, +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys import re @@ -331,7 +331,7 @@ class HeaderChecker(patch.PatchChecker): target[tag].append(new_req) def do_patch(self): - for line in self.stream: + for line in self.stream.readlines(): if diffstart.match(line): break diff --git a/scripts/python/suse_git/patch.py b/scripts/python/suse_git/patch.py index 13ff659..2116d15 100644 --- a/scripts/python/suse_git/patch.py +++ b/scripts/python/suse_git/patch.py @@ -1,5 +1,5 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*-, +#!/usr/bin/env python3 +# vim: sw=4 ts=4 et si: import sys diff --git a/scripts/python/test-all.sh b/scripts/python/test-all.sh old mode 100644 new mode 100755 index 77cb2eb..8308965 --- a/scripts/python/test-all.sh +++ b/scripts/python/test-all.sh @@ -1 +1,2 @@ -python3 -m unittest discover +#! /bin/sh +python3 -m unittest discover "$@" diff --git a/scripts/python/tests/test_header.py b/scripts/python/tests/test_header.py index 59a2906..5051b39 100755 --- a/scripts/python/tests/test_header.py +++ b/scripts/python/tests/test_header.py @@ -1,10 +1,10 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # -*- coding: utf-8 -*-, +# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: import sys import os.path import unittest -from io import StringIO from suse_git import header diff --git a/scripts/run_oldconfig.sh b/scripts/run_oldconfig.sh index fe50a1a..357692a 100755 --- a/scripts/run_oldconfig.sh +++ b/scripts/run_oldconfig.sh @@ -423,6 +423,9 @@ for config in $config_files; do esac if [ -d scripts/dummy-tools ] ; then MAKE_ARGS="$MAKE_ARGS CROSS_COMPILE=scripts/dummy-tools/" + if [ -e scripts/dummy-tools/pahole ]; then + MAKE_ARGS="$MAKE_ARGS PAHOLE=scripts/dummy-tools/pahole" + fi chmod 755 scripts/dummy-tools/* chmod 755 scripts/* fi