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

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

Open
nyh opened this issue May 20, 2019 · 1 comment
Open

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

nyh opened this issue May 20, 2019 · 1 comment

Comments

@nyh
Copy link
Contributor

nyh commented May 20, 2019

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).

@wkozaczuk
Copy link
Collaborator

BTW based on what I could tell Fedora is even better at this. For example Python 3 is a pie o fedora whereas it is not on Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants