From patchwork Wed Nov 24 05:54:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EDD0C433F5 for ; Wed, 24 Nov 2021 06:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233758AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56632 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233411AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 X-Greylist: delayed 322 seconds by postgrey-1.27 at vger.kernel.org; Wed, 24 Nov 2021 01:03:42 EST Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id E3978744D60; Wed, 24 Nov 2021 05:55:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id GSTnyP74lslO; Wed, 24 Nov 2021 05:55:06 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id 45384744D67; Wed, 24 Nov 2021 05:55:06 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen , Thomas Pedersen Subject: [PATCH 1/7] backport: refresh integration patch Date: Tue, 23 Nov 2021 21:54:59 -0800 Message-Id: <20211124055505.1267128-2-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Thomas Pedersen This was refreshed on Linux v5-10.42. Signed-off-by: Thomas Pedersen --- .../0001-enable-backports-built-in.patch | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch b/integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch index d66b203d0d07..35765ed113eb 100644 --- a/integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch +++ b/integration-patches/0001-enable-backports/0001-enable-backports-built-in.patch @@ -1,40 +1,36 @@ -Allow backports to be integrated into vmlinux. - diff --git a/Makefile b/Makefile -index 6d1e304..de26b18 100644 +index e5d41b6792d7..cdd600bda9d1 100644 --- a/Makefile +++ b/Makefile -@@ -542,6 +542,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \ - $(Q)$(MAKE) $(build)=$(@) +@@ -594,6 +594,7 @@ export KBUILD_MODULES KBUILD_BUILTIN + ifeq ($(KBUILD_EXTMOD),) # Objects we will link into vmlinux / subdirs we need to visit +backports-y := backports/ init-y := init/ drivers-y := drivers/ sound/ firmware/ net-y := net/ -@@ -820,13 +821,16 @@ core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ +@@ -989,11 +990,13 @@ core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ + $(backports-y) $(backports-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) + $(net-y) $(net-m) $(libs-y) $(libs-m) $(virt-y))) vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-n) $(init-) \ - $(core-n) $(core-) $(drivers-n) $(drivers-) \ -+ $(backports-n) $(backports-) \ - $(net-n) $(net-) $(libs-n) $(libs-)))) +- $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-)))) ++ $(init-) $(core-) $(drivers-) $(net-) $(libs-) $(virt-) $(backports)))) -+backports-y := $(patsubst %/, %/built-in.o, $(backports-y)) - init-y := $(patsubst %/, %/built-in.o, $(init-y)) - core-y := $(patsubst %/, %/built-in.o, $(core-y)) - drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) -@@ -837,7 +841,7 @@ libs-y := $(libs-y1) $(libs-y2) ++backports-y := $(patsubst %/, %/built-in.a, $(backports-y)) + init-y := $(patsubst %/, %/built-in.a, $(init-y)) + core-y := $(patsubst %/, %/built-in.a, $(core-y)) + drivers-y := $(patsubst %/, %/built-in.a, $(drivers-y)) +@@ -1004,7 +1007,7 @@ virt-y := $(patsubst %/, %/built-in.a, $(virt-y)) # Externally visible symbols (used by link-vmlinux.sh) export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) --export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) -+export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(backports-y) +-export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) ++export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) $(backports-y) + export KBUILD_VMLINUX_LIBS := $(libs-y1) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux - # used by scripts/pacmage/Makefile From patchwork Wed Nov 24 05:55:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2708C433FE for ; Wed, 24 Nov 2021 06:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233670AbhKXGDo (ORCPT ); Wed, 24 Nov 2021 01:03:44 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56674 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233736AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 75140744D6A; Wed, 24 Nov 2021 05:55:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id esuDlFYrOiHK; Wed, 24 Nov 2021 05:55:09 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id B8916744D69; Wed, 24 Nov 2021 05:55:06 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 2/7] backport: resurrect integrations Date: Tue, 23 Nov 2021 21:55:00 -0800 Message-Id: <20211124055505.1267128-3-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Couple fixes to fix the kernel build when using a built in backports ("integration mode"): - newer kernel kconfig doesn't seem to like evaluating variables with just '$'. Use '$()'. - define BACKPORT_DIR in the integration Kconfig so we don't have to supply it in an environment variable (where it can probably only ever be "backports/" anyway). Signed-off-by: Thomas Pedersen --- backport/Kconfig.integrate | 11 +++++------ backport/Kconfig.package | 10 +++++----- backport/Kconfig.sources | 18 +++++++++--------- gentree.py | 4 ++-- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/backport/Kconfig.integrate b/backport/Kconfig.integrate index 45ab3ecd4d57..10e9f2cb8ac5 100644 --- a/backport/Kconfig.integrate +++ b/backport/Kconfig.integrate @@ -1,3 +1,4 @@ +BACKPORT_DIR:=%%BACKPORT_DIR%% config BACKPORT_INTEGRATE bool def_bool y @@ -29,9 +30,7 @@ menuconfig BACKPORT_LINUX this should we run into any issues. if BACKPORT_LINUX - -source "$BACKPORT_DIR/Kconfig.versions" -source "$BACKPORT_DIR/Kconfig.sources" -source "$BACKPORT_DIR/Kconfig.local" - -endif # BACKPORT_LINUX +source "$(BACKPORT_DIR)/Kconfig.versions" +source "$(BACKPORT_DIR)/Kconfig.sources" +source "$(BACKPORT_DIR)/Kconfig.local" +endif # BACKPORT_LINUX diff --git a/backport/Kconfig.package b/backport/Kconfig.package index 250cdf3e4278..ce2f1cdb5893 100644 --- a/backport/Kconfig.package +++ b/backport/Kconfig.package @@ -14,12 +14,12 @@ config BACKPORTED_KERNEL_NAME option env="BACKPORTED_KERNEL_NAME" # Packaging hacks -source "$BACKPORT_DIR/Kconfig.package.hacks" +source "$(BACKPORT_DIR)/Kconfig.package.hacks" # Code we backport -source "$BACKPORT_DIR/Kconfig.sources" +source "$(BACKPORT_DIR)/Kconfig.sources" # these will be generated -source "$BACKPORT_DIR/Kconfig.kernel" -source "$BACKPORT_DIR/Kconfig.versions" -source "$BACKPORT_DIR/Kconfig.local" +source "$(BACKPORT_DIR)/Kconfig.kernel" +source "$(BACKPORT_DIR)/Kconfig.versions" +source "$(BACKPORT_DIR)/Kconfig.local" diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources index 5fb44780d842..8344a9aaa378 100644 --- a/backport/Kconfig.sources +++ b/backport/Kconfig.sources @@ -1,15 +1,15 @@ # this has the configuration for the backport code -source "$BACKPORT_DIR/compat/Kconfig" +source "$(BACKPORT_DIR)/compat/Kconfig" # these are copied from the kernel -source "$BACKPORT_DIR/net/wireless/Kconfig" -source "$BACKPORT_DIR/net/mac80211/Kconfig" -source "$BACKPORT_DIR/drivers/net/wireless/Kconfig" -source "$BACKPORT_DIR/drivers/net/usb/Kconfig" +source "$(BACKPORT_DIR)/net/wireless/Kconfig" +source "$(BACKPORT_DIR)/net/mac80211/Kconfig" +source "$(BACKPORT_DIR)/drivers/net/wireless/Kconfig" +source "$(BACKPORT_DIR)/drivers/net/usb/Kconfig" -source "$BACKPORT_DIR/drivers/ssb/Kconfig" -source "$BACKPORT_DIR/drivers/bcma/Kconfig" +source "$(BACKPORT_DIR)/drivers/ssb/Kconfig" +source "$(BACKPORT_DIR)/drivers/bcma/Kconfig" -source "$BACKPORT_DIR/drivers/usb/class/Kconfig" +source "$(BACKPORT_DIR)/drivers/usb/class/Kconfig" -source "$BACKPORT_DIR/drivers/staging/Kconfig" +source "$(BACKPORT_DIR)/drivers/staging/Kconfig" diff --git a/gentree.py b/gentree.py index 05bb91b39291..4705ffa08fc4 100755 --- a/gentree.py +++ b/gentree.py @@ -701,7 +701,7 @@ def _main(): project_dir = args.outdir, target_dir = os.path.join(args.outdir, 'backports/'), target_dir_name = 'backports/', - kconfig_source_var = '$BACKPORT_DIR', + kconfig_source_var = '$(BACKPORT_DIR)', ) else: bpid = Bp_Identity(integrate = args.integrate, @@ -710,7 +710,7 @@ def _main(): project_dir = args.outdir, target_dir = args.outdir, target_dir_name = '', - kconfig_source_var = '$BACKPORT_DIR', + kconfig_source_var = '$(BACKPORT_DIR)', ) def logwrite(msg): From patchwork Wed Nov 24 05:55:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 698F9C4332F for ; Wed, 24 Nov 2021 06:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233662AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56640 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233622AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 09602744D67; Wed, 24 Nov 2021 05:55:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id HukA_6zfisuz; Wed, 24 Nov 2021 05:55:10 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id 1BB03744D6D; Wed, 24 Nov 2021 05:55:07 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 3/7] gentree: try to make patch operation idempotent in case of --clean Date: Tue, 23 Nov 2021 21:55:01 -0800 Message-Id: <20211124055505.1267128-4-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The patch utility will not just skip a patch if it has already been applied. In the case of --integrate --clean we may need to repatch the kernel Makefile, which wasn't removed along with backports/. To support reapplying patches without error, revert a failed patch with -R, then reapply it. Signed-off-by: Thomas Pedersen --- gentree.py | 56 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/gentree.py b/gentree.py index 4705ffa08fc4..0576e14d6fe5 100755 --- a/gentree.py +++ b/gentree.py @@ -484,6 +484,31 @@ def upload_release(args, rel_prep, logwrite=lambda x:None): kup_cmd = "kup put /\n\t\t%s /\n\t\t%s /\n\t\t%s" % (gzip_name, tar_name + '.asc', korg_path) logwrite("kup-test: skipping cmd: %s" % kup_cmd) +def do_patch(args, logwrite, pfile, target_dir, reverse=False): + cmd = 'patch -p1'.split() + + if reverse: + cmd.append('-R') + process = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, stdin=subprocess.PIPE, + close_fds=True, universal_newlines=True, + cwd=target_dir) + output = process.communicate(input=open(pfile, 'r').read())[0] + output = output.split('\n') + if output[-1] == '': + output = output[:-1] + if args.verbose: + for line in output: + logwrite('> %s' % line) + else: + logwrite("Failed to apply changes from %s" % print_name) + if not args.verbose: + for line in output: + logwrite('> %s' % line) + + return process.returncode + + def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda x:None): """ Given a path of a directories of patches and SmPL patches apply @@ -539,23 +564,20 @@ def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda fullfn = os.path.join(target_dir, patched_file) shutil.copyfile(fullfn, fullfn + '.orig_file') - process = subprocess.Popen(['patch', '-p1'], stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, stdin=subprocess.PIPE, - close_fds=True, universal_newlines=True, - cwd=target_dir) - output = process.communicate(input=open(pfile, 'r').read())[0] - output = output.split('\n') - if output[-1] == '': - output = output[:-1] - if args.verbose: - for line in output: - logwrite('> %s' % line) - if process.returncode != 0: - if not args.verbose: - logwrite("Failed to apply changes from %s" % print_name) - for line in output: - logwrite('> %s' % line) - return 2 + err = do_patch(args, logwrite, pfile, target_dir) + if err > 0: + if not args.clean or err == 2: + return 2 + + # in case of clean, try to make patch idempotent + # try the reverse + err = do_patch(args, logwrite, pfile, target_dir, reverse=True) + if err != 0: + return 2 + # that worked, now reapply.. + err = do_patch(args, logwrite, pfile, target_dir) + if err != 0: + return 2 if args.refresh: pfilef = open(pfile + '.tmp', 'a') From patchwork Wed Nov 24 05:55:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DE17C43217 for ; Wed, 24 Nov 2021 06:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233622AbhKXGDn (ORCPT ); Wed, 24 Nov 2021 01:03:43 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56652 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233670AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 207F4744D70; Wed, 24 Nov 2021 05:55:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id fjsxB4hlXQXP; Wed, 24 Nov 2021 05:55:12 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id 7B937744D6E; Wed, 24 Nov 2021 05:55:07 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 4/7] gentree: do not prefix Kernel.local symbols Date: Tue, 23 Nov 2021 21:55:02 -0800 Message-Id: <20211124055505.1267128-5-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org In package mode the prefix is empty, so the ignore list does not matter. In integration mode there is a nonzero prefix, so add Kconfig.local to the ignore list like elsewhere in gentree.py. Signed-off-by: Thomas Pedersen --- gentree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentree.py b/gentree.py index 0576e14d6fe5..9699ce0128d0 100755 --- a/gentree.py +++ b/gentree.py @@ -235,7 +235,7 @@ def add_automatic_backports(args): export = re.compile(r'^EXPORT_SYMBOL(_GPL)?\((?P[^\)]*)\)') bpi = kconfig.get_backport_info(os.path.join(args.bpid.target_dir, 'compat', 'Kconfig')) configtree = kconfig.ConfigTree(os.path.join(args.bpid.target_dir, 'Kconfig'), args.bpid) - ignore=['Kconfig.kernel', 'Kconfig.versions'] + ignore=['Kconfig.kernel', 'Kconfig.versions', 'Kconfig.local'] configtree.verify_sources(ignore=ignore) git_debug_snapshot(args, "verify sources for automatic backports") all_selects = configtree.all_selects() From patchwork Wed Nov 24 05:55:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32DB4C43219 for ; Wed, 24 Nov 2021 06:00:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233777AbhKXGDn (ORCPT ); Wed, 24 Nov 2021 01:03:43 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56658 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233706AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 9ECCD744D6D; Wed, 24 Nov 2021 05:55:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id KiPF9L0XKEgo; Wed, 24 Nov 2021 05:55:13 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id CD5CA744D6F; Wed, 24 Nov 2021 05:55:07 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 5/7] lib/bpversion: calculate Kconfig.versions for next major version Date: Tue, 23 Nov 2021 21:55:03 -0800 Message-Id: <20211124055505.1267128-6-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Signed-off-by: Thomas Pedersen --- lib/bpversion.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/bpversion.py b/lib/bpversion.py index aefdcf0ce3c9..1659823baaf4 100644 --- a/lib/bpversion.py +++ b/lib/bpversion.py @@ -42,7 +42,12 @@ def kernelversion(tree): def genkconfig_versions(rel_specs): data = '' - for i in range(int(rel_specs['PATCHLEVEL']) + 1, 99): - data += "config BACKPORT_KERNEL_%s_%s\n" % (rel_specs['VERSION'], i) - data += " def_bool y\n" + print(str(rel_specs)) + version = int(rel_specs['VERSION']) + start_patchlevel = int(rel_specs['PATCHLEVEL']) + 1 + for i in range(version, version + 2): + for j in range(start_patchlevel, 99): + data += "config BACKPORT_KERNEL_%s_%s\n" % (i, j) + data += " def_bool y\n" + start_patchlevel = 0 return data From patchwork Wed Nov 24 05:55:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636093 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F77DC433EF for ; Wed, 24 Nov 2021 06:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233736AbhKXGDo (ORCPT ); Wed, 24 Nov 2021 01:03:44 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56672 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233741AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id A9777744D74; Wed, 24 Nov 2021 05:55:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id 36Q5Z02tSAJj; Wed, 24 Nov 2021 05:55:15 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id 4C530744D71; Wed, 24 Nov 2021 05:55:08 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 6/7] backport: expose BP_MODULES in package mode only Date: Tue, 23 Nov 2021 21:55:04 -0800 Message-Id: <20211124055505.1267128-7-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Otherwise 'option modules' conflicts with the kernel namespace. Signed-off-by: Thomas Pedersen --- backport/Kconfig.package.hacks | 9 +++++++++ backport/compat/Kconfig | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backport/Kconfig.package.hacks b/backport/Kconfig.package.hacks index 6a429dd107fd..85c71d43c690 100644 --- a/backport/Kconfig.package.hacks +++ b/backport/Kconfig.package.hacks @@ -6,3 +6,12 @@ config NET_CORE def_bool y config EXPERT def_bool y + +config BP_MODULES + option modules + bool + default MODULES + + help + This symbol is necessary for the newer kconf tool, it looks + for the "option modules" to control the 'm' state. diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig index 174322d8a340..87df1f731a34 100644 --- a/backport/compat/Kconfig +++ b/backport/compat/Kconfig @@ -53,15 +53,6 @@ # Variations are obviously possible. # -config BP_MODULES - option modules - bool - default MODULES - - help - This symbol is necessary for the newer kconf tool, it looks - for the "option modules" to control the 'm' state. - config BPAUTO_BUILD_NLATTR def_bool y depends on KERNEL_5_2 From patchwork Wed Nov 24 05:55:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Pedersen X-Patchwork-Id: 12636079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4550BC433EF for ; Wed, 24 Nov 2021 06:00:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233411AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from mail.adapt-ip.com ([107.194.246.123]:56646 "EHLO web.adapt-ip.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233662AbhKXGDm (ORCPT ); Wed, 24 Nov 2021 01:03:42 -0500 Received: from localhost (localhost [127.0.0.1]) by web.adapt-ip.com (Postfix) with ESMTP id 27CCC744D73; Wed, 24 Nov 2021 05:55:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at web.adapt-ip.com Received: from web.adapt-ip.com ([127.0.0.1]) by localhost (web.adapt-ip.com [127.0.0.1]) (amavisd-new, port 10026) with LMTP id Q5_UcL5uVQve; Wed, 24 Nov 2021 05:55:17 +0000 (UTC) Received: from atlas.campbell.adapt-ip.com (c-67-180-239-163.hsd1.ca.comcast.net [67.180.239.163]) (Authenticated sender: thomas@adapt-ip.com) by web.adapt-ip.com (Postfix) with ESMTPSA id A851E744D72; Wed, 24 Nov 2021 05:55:08 +0000 (UTC) From: Thomas Pedersen To: backports Cc: Hauke Mehrtens , Luis Rodriguez , Thomas Pedersen Subject: [PATCH 7/7] kconfig: fix select conversion for BPAUTO_ symbols in integration mode Date: Tue, 23 Nov 2021 21:55:05 -0800 Message-Id: <20211124055505.1267128-8-thomas@adapt-ip.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211124055505.1267128-1-thomas@adapt-ip.com> References: <20211124055505.1267128-1-thomas@adapt-ip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org In integration mode, the bpid.project_prefix is nonzero and needs to be prepended to the expected symbol to get a match. Signed-off-by: Thomas Pedersen --- lib/kconfig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/kconfig.py b/lib/kconfig.py index a77f8a54eea7..0b5f8ebc1726 100644 --- a/lib/kconfig.py +++ b/lib/kconfig.py @@ -228,9 +228,10 @@ class ConfigTree(object): out = '' for l in open(os.path.join(self.bpid.target_dir, nf), 'r'): m = sel_line.match(l) + bpauto_prefix = self.bpid.project_prefix + 'BPAUTO_' if m and not m.group('sym') in syms: - if 'BPAUTO_' + m.group('sym') in syms: - out += m.group('spc') + "select BPAUTO_" + m.group('sym') + '\n' + if bpauto_prefix + m.group('sym') in syms: + out += m.group('spc') + "select " + bpauto_prefix + m.group('sym') + '\n' else: out += m.group('spc') + "depends on " + m.group('sym') + '\n' else: