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

Liboci additional flags and subcommands, as required by ociplex #2149

Merged
merged 14 commits into from
Jul 13, 2023

Commits on Jul 7, 2023

  1. checkpoint: Add the missing options and change options order

    Add the missing command-line options as documented for runc, and also reorder
    the options to match the documentation:
    https://github.com/opencontainers/runc/blob/main/man/runc-checkpoint.8.md
    
    (This does not mean that they are necessarily implemented)
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    8a37a91 View commit details
    Browse the repository at this point in the history
  2. create: Add no_pivot option, and change option order

    The --no-pivot option is documented in
    https://github.com/opencontainers/runc/blob/main/man/runc-create.8.md
    
    Also change the options order in order to match the doc, this makes the code a
    bit easier to maintain.
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 7, 2023
    Configuration menu
    Copy the full SHA
    6f93020 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. exec: Add missing command-line options

    Add the missing command-line options for the exec subcommand.
    Reference: https://github.com/opencontainers/runc/blob/main/man/runc-exec.8.md
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    20431f3 View commit details
    Browse the repository at this point in the history
  2. run: Add missing options to run subcommand

    Also change the order to match the documentation in
    https://github.com/opencontainers/runc/blob/main/man/runc-run.8.md
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    c58b308 View commit details
    Browse the repository at this point in the history
  3. update: Add missing options to the update subcommand

    Add command-line options as documented in
    https://github.com/opencontainers/runc/blob/main/man/runc-update.8.md
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    b7f54aa View commit details
    Browse the repository at this point in the history
  4. spec: Add options for the spec subcommand

    Add the missing bundle option, as documented in
    https://github.com/opencontainers/runc/blob/main/man/runc-spec.8.md
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    e223403 View commit details
    Browse the repository at this point in the history
  5. features: Add features subcommand

    The 'features' subcommand is not publicly documented yet, but it was introduced
    in `runc` in opencontainers/runc#3296.
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    4c57517 View commit details
    Browse the repository at this point in the history
  6. liboci-cli: Update README with information about features subcommand

    The `features` subcommand is  implemented in `runc`, but not documented.
    See opencontainers/runc#3296
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    Suggested-by: Toru Komatsu <k0ma@utam0k.jp>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    136abf5 View commit details
    Browse the repository at this point in the history
  7. list: Add missing command-line options

    Add the command-line options documented in
    https://github.com/opencontainers/runc/blob/main/man/runc-list.8.md
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    e2dc283 View commit details
    Browse the repository at this point in the history
  8. ociplex: Change order of exec subcommand to match documentation

    We have to pick an order for the command-line options.
    Let's just use the same order as in the runc documentation
    (since this will also be the order shown by the command-line help)
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    d258324 View commit details
    Browse the repository at this point in the history
  9. Document the features subcommand.

    The `features` subcommand is now officially documented.
    Update the links to the documentation.
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    Suggested-by: Toru Komatsu <k0ma@utam0k.jp>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    a3ac34a View commit details
    Browse the repository at this point in the history
  10. Rename parse_key_val and parse_colon_separated_pair

    It is better to describe the intent of the parsing than how it is done.
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    Suggested-by: Eric Fang <yihuaf@unkies.org>
    c3d committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    3b13f73 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2023

  1. exec: Box the Exec structure

    The `Exec` structure is large compared to the others. This causes `just lint`
    to complain:
    
    ```
    error: large size difference between variants
      --> crates/youki/src/main.rs:48:1
       |
    48 | / enum SubCommand {
    49 | |     // Standard and common commands handled by the liboci_cli crate
    50 | |     #[clap(flatten)]
    51 | |     Standard(liboci_cli::StandardCmd),
       | |     --------------------------------- the second-largest variant contains at least 104 bytes
    52 | |     #[clap(flatten)]
    53 | |     Common(liboci_cli::CommonCmd),
       | |     ----------------------------- the largest variant contains at least 320 bytes
    ...  |
    57 | |     Completion(commands::completion::Completion),
    58 | | }
       | |_^ the entire enum is at least 320 bytes
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
       = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    help: consider boxing the large fields to reduce the total size of the enum
       |
    53 |     Common(Box<liboci_cli::CommonCmd>),
       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~
    ```
    
    Boxing the `Exec` variant prevents this problem from happening.
    
    Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
    c3d committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    bcabc06 View commit details
    Browse the repository at this point in the history
  2. box up commands enum to avoid lints

    Signed-off-by: yihuaf <yihuaf@unkies.org>
    yihuaf committed Jul 12, 2023
    Configuration menu
    Copy the full SHA
    cdb860d View commit details
    Browse the repository at this point in the history