-
Notifications
You must be signed in to change notification settings - Fork 14
CLK 6.12 Namespacing #1172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bmastbergen
wants to merge
13
commits into
ciq-6.12.y
Choose a base branch
from
{bmastbergen}_ciq-6.12.y-namespacing
base: ciq-6.12.y
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CLK 6.12 Namespacing #1172
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c7d93ac
Rename package to kernel-clk6.12 and add Provides/Conflicts
bmastbergen f63b199
Use gzip for symvers compression to match upstream
jdieter 9beb819
Add +clk6.12 suffix to kernel version string (uname -r)
jdieter e916df6
Sync spec changes from 6.18 branch
bmastbergen da560e3
kernel-clk6.12: replace merge.py stub with functional version from 6.18
bmastbergen 41218b6
kernel-clk6.12: fix Config= to use %{name}-%{specversion} prefix, in …
bmastbergen 5e7bb03
kernel-clk6.12: add missing namespaced Provides, in sync with 6.18
bmastbergen 82b03b7
Add generic kernel Provides to spec
bmastbergen a6d0731
spec: Fix posttrans script to handle noarch package expansion
bmastbergen 889d4b1
github actions: update rpm-build workflow for namespaced spec
bmastbergen 7e73526
Add generic kernel-headers and kernel-devel Provides to spec
bmastbergen 05f7e6d
spec: fix missed kernel -> %{name} substitutions in kvm, uki-virt-add…
bmastbergen 28f12bb
bundle_bindgen: add set -e, curl --fail, and SHA256 verification
bmastbergen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # Bundle the bindgen-cli source code to be included in the kernel build. | ||
| # https://crates.io/crates/bindgen-cli | ||
| # | ||
| # The bindgen tool, required to build Rust code in the Linux kernel, is | ||
| # currently only packaged in Fedora/ELN. In order to build CLK kernels | ||
| # on Rocky Linux we need to build bindgen as part of the kernel build. | ||
|
|
||
| SOURCES=$1 | ||
|
|
||
| BINDGEN_CLI=bindgen-cli | ||
| BINDGEN_CLI_VERSION="0.71.1" | ||
| BINDGEN_CLI_CRATE=bindgen-cli.crate | ||
| BINDGEN_CLI_SHA256="fded10ca0956afd0cbe5cf89cc71ae1a679e65b8216c651fca17ba7de8ac54dc" | ||
| CRATESIO_API_ENDPOINT=https://crates.io/api/v1/crates/bindgen-cli/${BINDGEN_CLI_VERSION}/download | ||
|
|
||
| curl -sfL $CRATESIO_API_ENDPOINT -o $SOURCES/$BINDGEN_CLI_CRATE | ||
|
|
||
| echo "$BINDGEN_CLI_SHA256 $SOURCES/$BINDGEN_CLI_CRATE" | sha256sum -c - || { | ||
| echo "Error: SHA256 checksum mismatch for $BINDGEN_CLI_CRATE" | ||
| echo "Expected: $BINDGEN_CLI_SHA256" | ||
| echo "Got: $(sha256sum $SOURCES/$BINDGEN_CLI_CRATE | awk '{print $1}')" | ||
| rm -f $SOURCES/$BINDGEN_CLI_CRATE | ||
| exit 1 | ||
| } | ||
|
|
||
| tar -xf $SOURCES/$BINDGEN_CLI_CRATE -C $SOURCES | ||
| mv $SOURCES/$BINDGEN_CLI-$BINDGEN_CLI_VERSION $SOURCES/$BINDGEN_CLI | ||
|
|
||
| # vendor bindgen-cli | ||
| cd $SOURCES/$BINDGEN_CLI | ||
| mkdir .cargo | ||
| cat > .cargo/config.toml <<EOF | ||
| [source.crates-io] | ||
| replace-with = "vendored-sources" | ||
|
|
||
| [source.vendored-sources] | ||
| directory = "vendor" | ||
| EOF | ||
|
|
||
| cargo vendor --locked --quiet | ||
|
|
||
| cd .. | ||
| tar czf $BINDGEN_CLI.tar.gz $BINDGEN_CLI | ||
|
|
||
| # clean up | ||
| rm -f $SOURCES/$BINDGEN_CLI_CRATE | ||
| rm -rf $SOURCES/$BINDGEN_CLI | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this was an accident on no longer being a stub ... its still commented out in the SPEC as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,88 @@ | ||
| #!/usr/bin/env python3 | ||
| print("merge.py stub: no merge performed") | ||
| #!/usr/bin/python3 | ||
| # SPDX-License-Identifier: GPL-2.0 | ||
| # Author: Clark Williams <williams@redhat.com> | ||
| # 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 [arch] | ||
| # | ||
| # This script merges two kernel configuration files, an override file and a | ||
| # base config file and writes the results to stdout. | ||
| # | ||
| # The script reads the overrides into a dictionary, then reads the baseconfig | ||
| # file, looking for overrides and replacing any found, then printing the result | ||
| # to stdout. Finally any remaining (new) configs in the override are appended to the | ||
| # end of the output | ||
|
|
||
| import sys | ||
| import re | ||
| import os.path | ||
|
|
||
| def usage(msg): | ||
| '''print a usage message and exit''' | ||
| sys.stderr.write(msg + "\n") | ||
| sys.stderr.write("usage: merge.py overrides baseconfig [arch]\n") | ||
| sys.exit(1) | ||
|
|
||
| isset = re.compile(r'^(CONFIG_\w+)=') | ||
| notset = re.compile(r'^#\s+(CONFIG_\w+)\s+is not set') | ||
|
|
||
| # search an input line for a config (set or notset) pattern | ||
| # if we get a match return the config that is being changed | ||
| def find_config(line): | ||
| '''find a configuration line in the input and return the config name''' | ||
| m = isset.match(line) | ||
| if (m is not None): | ||
| return m.group(1) | ||
|
|
||
| m = notset.match(line) | ||
| if (m is not None): | ||
| return m.group(1) | ||
|
|
||
| return None | ||
|
|
||
| ######################################################### | ||
|
|
||
| if len(sys.argv) < 3: | ||
| usage("must have two input files") | ||
|
|
||
| override_file = sys.argv[1] | ||
| baseconfig_file = sys.argv[2] | ||
|
|
||
| if not os.path.exists(override_file): | ||
| usage(f"overrides config file {override_file:s} does not exist!") | ||
|
|
||
| if not os.path.exists(baseconfig_file): | ||
| usage(f"base configs file {baseconfig_file:s} does not exist") | ||
|
|
||
| if len(sys.argv) == 4: | ||
| print(f"# {sys.argv[3]:s}") | ||
|
|
||
| # read each line of the override file and store any configuration values | ||
| # in the overrides dictionary, keyed by the configuration name. | ||
| overrides = {} | ||
| with open(override_file, "rt", encoding="utf-8") as f: | ||
| for line in [l.strip() for l in f.readlines()]: | ||
| c = find_config(line) | ||
| if c and c not in overrides: | ||
| overrides[c] = line | ||
|
|
||
| # now read and print the base config, checking each line | ||
| # that defines a config value and printing the override if | ||
| # it exists | ||
| with open(baseconfig_file, "rt", encoding="utf-8") as f: | ||
| for line in [ l.strip() for l in f.readlines() ]: | ||
| c = find_config(line) | ||
| if c and c in overrides: | ||
| print(overrides[c]) | ||
| del overrides[c] | ||
| else: | ||
| print(line) | ||
|
|
||
| # print out the remaining configs (new values) | ||
| # from the overrides file | ||
| for v in overrides.values(): | ||
| print (v) | ||
|
|
||
| sys.exit(0) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.