Skip to content

Idea for easily creating OSv images from list of Ubuntu packages #1041

@nyh

Description

@nyh

Now that OSv is better at running PIEs, and Ubuntu (if I understand correctly) packages executables as PIEs by default, it would be really cool if we could create OSv images by simply giving a list of Ubuntu packages to include in the image. We could do this in the context of the Capstan tool, but I'd really like to see it in our scripts/build and apps submodule as well, as a simple option for adding new applications or libraries to apps/.

I suggest we should create a common script which:

  1. Takes a list of Ubuntu packages. Fetches the latest one for each if not previously fetched (note that the build machine may not be Ubuntu at all) and opens them into a directory.
  2. The script could also optionally recursively look for dependencies of the given packages, although we will need to also blacklist some packages (e.g., some package may depend on bash because it includes a shell script - but in OSv, we will not want to include the shell, nor use the shell script).
  3. Take various options to transform the resulting directory - e.g., remove unnecessary files.
  4. Also take as an option the command line.

Finally we could have in apps/something nothing more than a Makefile with a "module" target which just runs this script (the Makefile and module target is what scripts/build currently looks for).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions