Re: [OS-BUILD PATCHv2] enable the rtc-rv8803 driver on RHEL
From: pbrobinson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2121#note_1152049527 Please enable it in common not ark, it should in Fedora too to enable proper Edge testing right the way through from Fedora -> C9S -> RHEL. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv3 0/5] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151697795 Backed out the specfile BuildRequires and modified merge.py to be executable and have a shbang of /usr/bin/python3, modified build_configs.sh to execute ./merge.py rather than calling python. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 3/5] redhat: Use a context manager in merge.py for opening the config file for reading
From: Patrick Talbert redhat: Use a context manager in merge.py for opening the config file for reading Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100755 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -26,14 +26,15 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in [ n.strip() for n in open(cfgfile).readlines()]: -if len(l) == 0: continue -if l.startswith("# CONFIG_"): -configs[l.split()[1]] = l -continue -if l.startswith("CONFIG_"): -configs[l.split('=')[0]] = l -continue +with open(cfgfile) as f: +for l in [n.strip() for n in f.readlines()]: +if not l: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue return configs -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 4/5] redhat: use 'update' method in merge.py
From: Patrick Talbert redhat: use 'update' method in merge.py Use the update method to update our baseconfigs dictionary rather than iterating Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100755 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -50,9 +50,8 @@ if not os.path.exists(sys.argv[2]): usage("base config file %s does not exist!" % sys.argv[2]) baseconfigs = read_config_file(sys.argv[2]) -# iterate over the overrides, replacing values in the base config -for v in overrides.keys(): -baseconfigs[v] = overrides[v] +# update baseconfigs with the overrides values +baseconfigs.update(overrides) # print the new config to stdout for v in baseconfigs.keys(): -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 5/5] redhat: method.py: change the output loop to use 'values' method
From: Patrick Talbert redhat: method.py: change the output loop to use 'values' method We don't need the key values when printing the output file so just use the values method to fetch them Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100755 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -54,5 +54,5 @@ baseconfigs = read_config_file(sys.argv[2]) baseconfigs.update(overrides) # print the new config to stdout -for v in baseconfigs.keys(): -print(baseconfigs[v]) +for v in baseconfigs.values(): +print(v) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 1/5] redhat: python replacement for merge.pl
From: Clark Williams redhat: python replacement for merge.pl Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/build_configs.sh +++ b/redhat/configs/build_configs.sh @@ -84,7 +84,7 @@ function merge_configs() test -n "$skip_if_missing" && test ! -e "$cfile" && continue - if ! perl merge.pl "$cfile" config-merging."$count" > config-merged."$count"; then + if ! ./merge.py "$cfile" config-merging."$count" > config-merged."$count"; then die "Failed to merge $cfile" fi mv config-merged."$count" config-merging."$count" diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py new file mode 100755 index blahblah..blahblah 100755 --- /dev/null +++ b/redhat/configs/merge.py @@ -0,0 +1,58 @@ +#!/usr/bin/python3 +# SPDX-License-Identifier: GPL-2.0 +# Author: Clark Williams +# Copyright (C) 2022 Red Hat, Inc. +# +# merge.py - a direct replacement for merge.pl in the redhat/configs directory +# +# invocation: python merge.py overrides baseconfig +# +# Both input files are kernel config files, where overides is config overides +# to the baseconfig file. Both are read into python dictionaries with the +# keys being the config name and the values being the config file text + +# The script iterates through the overrides keys adding/replacing the contents +# of the baseconfig values and then outputs the new baseconfig to stdout. +# + +import sys +import os.path + +def usage(msg): +print(msg) +print("usage: merge.py overrides baseconfig") +sys.exit(1) + +# read a config file and return a dictionary of the contents +def read_config_file(cfgfile): +configs = {} +for l in open(cfgfile).readlines(): +if len(l) == 0: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue +return configs + + +if len(sys.argv) < 3: usage("must have two input files") + +# read in the overides file +if not os.path.exists(sys.argv[1]): +usage("overrides config file %s does not exist!" % sys.argv[1]) +overrides = read_config_file(sys.argv[1]) + +# read in the base config file +if not os.path.exists(sys.argv[2]): +usage("base config file %s does not exist!" % sys.argv[2]) +baseconfigs = read_config_file(sys.argv[2]) + +# iterate over the overrides, replacing values in the base config +for v in overrides.keys(): +baseconfigs[v] = overrides[v] + +# print the new config to stdout +for v in baseconfigs.keys(): +print(baseconfigs[v]) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 2/5] redhat: automatically strip newlines in merge.py
From: Clark Williams redhat: automatically strip newlines in merge.py When reading configfiles call strip() to remove newlines, so that we can easily find blank lines Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100755 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -26,7 +26,7 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in open(cfgfile).readlines(): +for l in [ n.strip() for n in open(cfgfile).readlines()]: if len(l) == 0: continue if l.startswith("# CONFIG_"): configs[l.split()[1]] = l -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv3 0/5] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams --- redhat/configs/build_configs.sh | 2 +- redhat/configs/merge.py | 58 + 2 files changed, 59 insertions(+), 1 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151622605 `BuildRequires: python3-devel` This is already present. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151622156 Ok, I can remove the buildrequires and I'll change how we call it ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151621759 Yes, python2 doesn't exist anymore, and python3 is the default. At least it hasn't been a problem. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151620288 Are we guaranteed to actually *have* python3 in the buildroot? ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Herton R. Krzesinski on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151619466 Wouldn't it be better to just do what we already do eg. for redhat/genlog.py (where it's called directly from redhat/genlog.sh)? ``` Add #!/usr/bin/python3 to the first line of merge.py make it executable call it directly from buildconfigs.sh ``` ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117#note_1151608303 Added a commit that BuildRequires: python3 and python-unversioned-command packages. Hopefully that will allow the pipeline to run correctly ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 6/6] redhat: update specfile to require python3 for builds
From: Clark Williams redhat: update specfile to require python3 for builds Signed-off-by: Clark Williams diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -579,7 +579,7 @@ BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++ BuildRequires: net-tools, hostname, bc, elfutils-devel BuildRequires: dwarves -BuildRequires: python3-devel +BuildRequires: python3 python3-devel python-unversioned-command BuildRequires: gcc-plugin-devel BuildRequires: kernel-rpm-macros # glibc-static is required for a consistent build environment (specifically @@ -1038,7 +1038,7 @@ This package provides debug information for package kernel-tools. %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/gpio-watch(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|.*%%{_bindir}/intel-speed-select(\.debug)?|.*%%{_bindir}/page_owner_sort(\.debug)?|.*%%{_bindir}/slabinfo(\.debug)?|.*%%{_sbindir}/intel_sdsi(\.debug)?|XXX' -o kernel-tools-debuginfo.list} %package -n rtla -Summary: RTLA: Real-Time Linux Analysis tools +Summary: RTLA: Real-Time Linux Analysis tools %description -n rtla The rtla tool is a meta-tool that includes a set of commands that aims to analyze the real-time properties of Linux. But, instead of -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 5/6] redhat: method.py: change the output loop to use 'values' method
From: Patrick Talbert redhat: method.py: change the output loop to use 'values' method We don't need the key values when printing the output file so just use the values method to fetch them Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -53,5 +53,5 @@ baseconfigs = read_config_file(sys.argv[2]) baseconfigs.update(overrides) # print the new config to stdout -for v in baseconfigs.keys(): -print(baseconfigs[v]) +for v in baseconfigs.values(): +print(v) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 3/6] redhat: Use a context manager in merge.py for opening the config file for reading
From: Patrick Talbert redhat: Use a context manager in merge.py for opening the config file for reading Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -25,14 +25,15 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in [ n.strip() for n in open(cfgfile).readlines()]: -if len(l) == 0: continue -if l.startswith("# CONFIG_"): -configs[l.split()[1]] = l -continue -if l.startswith("CONFIG_"): -configs[l.split('=')[0]] = l -continue +with open(cfgfile) as f: +for l in [n.strip() for n in f.readlines()]: +if not l: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue return configs -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 1/6] redhat: python replacement for merge.pl
From: Clark Williams redhat: python replacement for merge.pl Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/build_configs.sh +++ b/redhat/configs/build_configs.sh @@ -84,7 +84,8 @@ function merge_configs() test -n "$skip_if_missing" && test ! -e "$cfile" && continue - if ! perl merge.pl "$cfile" config-merging."$count" > config-merged."$count"; then + #if ! perl merge.pl "$cfile" config-merging."$count" > config-merged."$count"; then + if ! python merge.py "$cfile" config-merging."$count" > config-merged."$count"; then die "Failed to merge $cfile" fi mv config-merged."$count" config-merging."$count" diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/merge.py @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0 +# Author: Clark Williams +# Copyright (C) 2022 Red Hat, Inc. +# +# merge.py - a direct replacement for merge.pl in the redhat/configs directory +# +# invocation: python merge.py overrides baseconfig +# +# Both input files are kernel config files, where overides is config overides +# to the baseconfig file. Both are read into python dictionaries with the +# keys being the config name and the values being the config file text + +# The script iterates through the overrides keys adding/replacing the contents +# of the baseconfig values and then outputs the new baseconfig to stdout. +# + +import sys +import os.path + +def usage(msg): +print(msg) +print("usage: merge.py overrides baseconfig") +sys.exit(1) + +# read a config file and return a dictionary of the contents +def read_config_file(cfgfile): +configs = {} +for l in open(cfgfile).readlines(): +if len(l) == 0: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue +return configs + + +if len(sys.argv) < 3: usage("must have two input files") + +# read in the overides file +if not os.path.exists(sys.argv[1]): +usage("overrides config file %s does not exist!" % sys.argv[1]) +overrides = read_config_file(sys.argv[1]) + +# read in the base config file +if not os.path.exists(sys.argv[2]): +usage("base config file %s does not exist!" % sys.argv[2]) +baseconfigs = read_config_file(sys.argv[2]) + +# iterate over the overrides, replacing values in the base config +for v in overrides.keys(): +baseconfigs[v] = overrides[v] + +# print the new config to stdout +for v in baseconfigs.keys(): +print(baseconfigs[v]) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 2/6] redhat: automatically strip newlines in merge.py
From: Clark Williams redhat: automatically strip newlines in merge.py When reading configfiles call strip() to remove newlines, so that we can easily find blank lines Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -25,7 +25,7 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in open(cfgfile).readlines(): +for l in [ n.strip() for n in open(cfgfile).readlines()]: if len(l) == 0: continue if l.startswith("# CONFIG_"): configs[l.split()[1]] = l -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 4/6] redhat: use 'update' method in merge.py
From: Patrick Talbert redhat: use 'update' method in merge.py Use the update method to update our baseconfigs dictionary rather than iterating Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -49,9 +49,8 @@ if not os.path.exists(sys.argv[2]): usage("base config file %s does not exist!" % sys.argv[2]) baseconfigs = read_config_file(sys.argv[2]) -# iterate over the overrides, replacing values in the base config -for v in overrides.keys(): -baseconfigs[v] = overrides[v] +# update baseconfigs with the overrides values +baseconfigs.update(overrides) # print the new config to stdout for v in baseconfigs.keys(): -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2 0/6] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams --- redhat/configs/build_configs.sh | 3 +- redhat/configs/merge.py | 57 + redhat/kernel.spec.template | 4 +- 3 files changed, 61 insertions(+), 3 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 5/5] redhat: method.py: change the output loop to use 'values' method
From: Patrick Talbert redhat: method.py: change the output loop to use 'values' method We don't need the key values when printing the output file so just use the values method to fetch them Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -53,5 +53,5 @@ baseconfigs = read_config_file(sys.argv[2]) baseconfigs.update(overrides) # print the new config to stdout -for v in baseconfigs.keys(): -print(baseconfigs[v]) +for v in baseconfigs.values(): +print(v) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 3/5] redhat: Use a context manager in merge.py for opening the config file for reading
From: Patrick Talbert redhat: Use a context manager in merge.py for opening the config file for reading Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -25,14 +25,15 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in [ n.strip() for n in open(cfgfile).readlines()]: -if len(l) == 0: continue -if l.startswith("# CONFIG_"): -configs[l.split()[1]] = l -continue -if l.startswith("CONFIG_"): -configs[l.split('=')[0]] = l -continue +with open(cfgfile) as f: +for l in [n.strip() for n in f.readlines()]: +if not l: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue return configs -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 4/5] redhat: use 'update' method in merge.py
From: Patrick Talbert redhat: use 'update' method in merge.py Use the update method to update our baseconfigs dictionary rather than iterating Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -49,9 +49,8 @@ if not os.path.exists(sys.argv[2]): usage("base config file %s does not exist!" % sys.argv[2]) baseconfigs = read_config_file(sys.argv[2]) -# iterate over the overrides, replacing values in the base config -for v in overrides.keys(): -baseconfigs[v] = overrides[v] +# update baseconfigs with the overrides values +baseconfigs.update(overrides) # print the new config to stdout for v in baseconfigs.keys(): -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 2/5] redhat: automatically strip newlines in merge.py
From: Clark Williams redhat: automatically strip newlines in merge.py When reading configfiles call strip() to remove newlines, so that we can easily find blank lines Signed-off-by: Clark Williams diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py index blahblah..blahblah 100644 --- a/redhat/configs/merge.py +++ b/redhat/configs/merge.py @@ -25,7 +25,7 @@ def usage(msg): # read a config file and return a dictionary of the contents def read_config_file(cfgfile): configs = {} -for l in open(cfgfile).readlines(): +for l in [ n.strip() for n in open(cfgfile).readlines()]: if len(l) == 0: continue if l.startswith("# CONFIG_"): configs[l.split()[1]] = l -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 0/5] redhat: python replacement for merge.pl
From: Clark Williams on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams --- redhat/configs/build_configs.sh | 3 +- redhat/configs/merge.py | 57 + 2 files changed, 59 insertions(+), 1 deletions(-) ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH 1/5] redhat: python replacement for merge.pl
From: Clark Williams redhat: python replacement for merge.pl Replace the (still functioning) merge.pl in redhat/configs with a python version (merge.py) for ease of maintenance. Signed-off-by: Clark Williams diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/build_configs.sh +++ b/redhat/configs/build_configs.sh @@ -84,7 +84,8 @@ function merge_configs() test -n "$skip_if_missing" && test ! -e "$cfile" && continue - if ! perl merge.pl "$cfile" config-merging."$count" > config-merged."$count"; then + #if ! perl merge.pl "$cfile" config-merging."$count" > config-merged."$count"; then + if ! python merge.py "$cfile" config-merging."$count" > config-merged."$count"; then die "Failed to merge $cfile" fi mv config-merged."$count" config-merging."$count" diff --git a/redhat/configs/merge.py b/redhat/configs/merge.py new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/merge.py @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0 +# Author: Clark Williams +# Copyright (C) 2022 Red Hat, Inc. +# +# merge.py - a direct replacement for merge.pl in the redhat/configs directory +# +# invocation: python merge.py overrides baseconfig +# +# Both input files are kernel config files, where overides is config overides +# to the baseconfig file. Both are read into python dictionaries with the +# keys being the config name and the values being the config file text + +# The script iterates through the overrides keys adding/replacing the contents +# of the baseconfig values and then outputs the new baseconfig to stdout. +# + +import sys +import os.path + +def usage(msg): +print(msg) +print("usage: merge.py overrides baseconfig") +sys.exit(1) + +# read a config file and return a dictionary of the contents +def read_config_file(cfgfile): +configs = {} +for l in open(cfgfile).readlines(): +if len(l) == 0: continue +if l.startswith("# CONFIG_"): +configs[l.split()[1]] = l +continue +if l.startswith("CONFIG_"): +configs[l.split('=')[0]] = l +continue +return configs + + +if len(sys.argv) < 3: usage("must have two input files") + +# read in the overides file +if not os.path.exists(sys.argv[1]): +usage("overrides config file %s does not exist!" % sys.argv[1]) +overrides = read_config_file(sys.argv[1]) + +# read in the base config file +if not os.path.exists(sys.argv[2]): +usage("base config file %s does not exist!" % sys.argv[2]) +baseconfigs = read_config_file(sys.argv[2]) + +# iterate over the overrides, replacing values in the base config +for v in overrides.keys(): +baseconfigs[v] = overrides[v] + +# print the new config to stdout +for v in baseconfigs.keys(): +print(baseconfigs[v]) -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2117 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCHv2] enable the rtc-rv8803 driver on RHEL
From: David Arcari enable the rtc-rv8803 driver on RHEL Enable CONFIG_RTC_DRV_RV8803 for x86 and arm for RHEL. Signed-off-by: David Arcari diff --git a/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 b/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 @@ -0,0 +1 @@ +CONFIG_RTC_DRV_RV8803=m diff --git a/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 b/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 @@ -0,0 +1 @@ +CONFIG_RTC_DRV_RV8803=m -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2121 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
[OS-BUILD PATCH] enable the rtc-rv8803 driver on RHEL
From: David Arcari enable the rtc-rv8803 driver on RHEL Enable CONFIG_RTC_DRV_RV8803 for x86 and arm for RHEL. diff --git a/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 b/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/arm/aarch64/CONFIG_RTC_DRV_RV8803 @@ -0,0 +1 @@ +CONFIG_RTC_DRV_RV8803=m diff --git a/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 b/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/configs/ark/generic/x86/CONFIG_RTC_DRV_RV8803 @@ -0,0 +1 @@ +CONFIG_RTC_DRV_RV8803=m -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2121 ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
Re: [OS-BUILD PATCH] perf tools: Fix man page build wrt perf-arm-coresight.txt
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2108#note_1151085979 This is upstream now. ___ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue