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

make minimal is too minimal, does not install all templates #2641

Closed
nirs opened this issue Sep 20, 2024 · 7 comments
Closed

make minimal is too minimal, does not install all templates #2641

nirs opened this issue Sep 20, 2024 · 7 comments

Comments

@nirs
Copy link
Contributor

nirs commented Sep 20, 2024

Description

This is what I'm doing in CI to get a minimal build (since it takes 4 minutes instead of 11 minutes), and use the vmnet template:

      - name: Install lima
        run: |
          cd lima

          # Miniaml build is 3 times faster than full make..
          make minimal                                                                                                                                                                                                         

          # But it adds only the default template, so lets fix it: 
          rm -rf _output/share/lima/templates
          cp -aL examples _output/share/lima/templates
          ln -sf templates _output/share/lima/examples

          # And install
          sudo make install
          limactl --version

Possible fixes:

  • Install all templates in make minimal

  • Provide a templates target to install all templates, so user can do:

    make minimal templates
    

The second option seems better, keeping the current behavior, and providing more options for developers with special needs.

I can post a PR if we have an agreement on the wanted solution.

@jandubois
Copy link
Member

  • Provide a templates target to install all templates,

This is already proposed in #2638 (except it has separate templates and template_experimentals targets).

So I think this issue could be closed as a duplicate.

@nirs
Copy link
Contributor Author

nirs commented Sep 20, 2024

This may be resolved by #2638 but the issue it is solving is not unrelated (#2638). Refactor makefiles cannot change the behavior (since refactoring is changing the design without changing the behaviour). So maybe add this issue to the #2638?

@afbjorklund
Copy link
Member

afbjorklund commented Sep 21, 2024

This was supposed to be done by supplying a .config file, but it could have been better documented.

I think we could move the Source installation to a separate page? https://lima-vm.io/docs/installation/

To change the build configuration, run make config or make menuconfig.

This requires kconfig tools installed, it is also possible to edit .config.
The default configuration can be found in the file config.mk (make syntax).

@afbjorklund
Copy link
Member

afbjorklund commented Sep 21, 2024

Also in CI it should not be a major issue, if the build results are being put in the CI cache?

i.e. there is no need to install go and to build it from source, if there already is a binary...

@nirs
Copy link
Contributor Author

nirs commented Sep 23, 2024

Also in CI it should not be a major issue, if the build results are being put in the CI cache?

i.e. there is no need to install go and to build it from source, if there already is a binary...

It depends on what you want to test. I want to lima from master in the ramen CI so we can validate that ramen code using lima does not break because of new changes in lima. The CI runners are very slow and building lima can take more than 10 minutes for a full build.

@afbjorklund
Copy link
Member

afbjorklund commented Sep 28, 2024

Sorry about your CI runners, I just find the cache to be even more valuable on the small systems like the Raspberry Pi...

It is off-topic to the discussion on what to build and install with make, like which OS and Arch should be supported etc.

@AkihiroSuda
Copy link
Member

The makefile now has templates target

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

4 participants