Skip to content
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

Kernel Bump v2 #14913

Merged
merged 11 commits into from Apr 12, 2024
Merged

Kernel Bump v2 #14913

merged 11 commits into from Apr 12, 2024

Commits on Apr 12, 2024

  1. scripts/kernel_bump: Avoid potential copyright claim

    Due to potential fears of copyright infringement noted by Elliott
    Mitchell [0], rewrite our message to belong to OpenWRT.
    
    Note, AI was used to aid in construction of this sentence.
    
    [0]: https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042422.html
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    4 Configuration menu
    Copy the full SHA
    7b7f170 View commit details
    Browse the repository at this point in the history
  2. scripts/kernel_bump: Drop unused function

    No need to keep unused empty functions. A left over from early development.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    1bbc249 View commit details
    Browse the repository at this point in the history
  3. scripts/kernel_bump: Always drop v prefix

    Naivly and lazyly the leading v was only dropped from optarg, not from any
    environment variable.
    
    Lets do this properly and ensure a leading 'v' is always dropped.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    03f2f53 View commit details
    Browse the repository at this point in the history
  4. scripts/kernel_bump: Improve omitted version error

    If a version string was not supplied, we currently print an empty
    string. We can do better here. Also by popular demand, print the usage
    information in case of error.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    ed896c3 View commit details
    Browse the repository at this point in the history
  5. scripts/kernel_bump: Do no run on dirty repositories

    We want to avoid starting a process when we know it will fail later.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    f9ac106 View commit details
    Browse the repository at this point in the history
  6. scripts/kernel_bump: Run script relative to the script dir

    Determine the target directory based on the script location, which might
    work better in some cases, but at least also allows the script to be ran
    from with any location in the OpenWRT repository.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    9f0cc3e View commit details
    Browse the repository at this point in the history
  7. scripts/kernel_bump: Allow for migrating only configuration files

    In some cases, we want to only migrate configuration files, e.g. if the
    kernel was bumped already. Lets add a flag for this case to offer
    flexibility. By default we will migrate configuration flags as before.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    9e6c439 View commit details
    Browse the repository at this point in the history
  8. scripts/kernel_bump: Use git to obtain the list of files

    Instead of looping of a directory to find directories related to kernel
    changes, use the git index instead.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    8ed187e View commit details
    Browse the repository at this point in the history
  9. scripts/kernel_bump: Use the git index to find the needed config files

    The current solution using `find` introduces a racecondition, where `find`
    and `git mv` get in each others way. While this could be fixed with
    more-utils sponge command (or even sort -u) to buffer the output of
    find.
    
    However, a much better approach, is to query the git index directly,
    which will not change, and is far more accurate.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    b62aafc View commit details
    Browse the repository at this point in the history
  10. scripts/kernel_bump: Allow bumping sub-targets

    Some targets may need to bump specific sub-targets only. So lets offer
    this as an option.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    71c663b View commit details
    Browse the repository at this point in the history
  11. scripts/kernel_bump: Delete merge commit

    While we have included the needed changes via a merge commit, there is
    no need to keep it. Lets drop the merge commit, which we can do as we
    haven't pushed anything.
    
    Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
    oliv3r authored and robimarko committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    98235e6 View commit details
    Browse the repository at this point in the history