Skip to content

templates: add linuxbrew #3454

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

Merged
merged 1 commit into from
Apr 23, 2025
Merged

templates: add linuxbrew #3454

merged 1 commit into from
Apr 23, 2025

Conversation

AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Apr 21, 2025

This template does not use macOS as the guest OS, because it seems hard to automate provisioning macOS instances (accept EULA, skip enabling iCloud, set up SSH...).

To run Homebrew on macOS with a sandbox, Alcoholless can be used instead. The alclessctl CLI of Alcoholless is designed to be similar to limactl: https://github.com/AkihiroSuda/alcless

alclessctl create default
cd ~/SOME_DIRECTORY
alcless brew install xz
alcless xz SOME_FILE

Eventually, Alcoholless may be consolidated into Lima.

@AkihiroSuda AkihiroSuda added the area/homebrew Homebrew formula label Apr 21, 2025
@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Apr 21, 2025
@AkihiroSuda AkihiroSuda force-pushed the linuxbrew branch 2 times, most recently from 2516450 to 0474835 Compare April 21, 2025 17:35
#
# To run Homebrew on macOS with a sandbox user account, Alcoholless can be used instead.
# The `alclessctl` CLI of Alcoholless is designed to be similar to `limactl`:
# https://github.com/AkihiroSuda/alcless
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the best place to discuss this. I don't have strong objections, but it does not really feel like it is related to "Linux Machines"; it is more like a chroot jail.

I also really don't like the name. I find the whole beer/brew/tap/cask/bottle terminology quite weird, and unless you want to make this part of homebrew, I don't know why you would have picked a name from the same origin. Also alclessctl has just too many syllables. 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably not the best place to discuss this. I don't have strong objections, but it does not really feel like it is related to "Linux Machines"

There has been a discussion to extend the project scope to support non-Linux Machines:

My initial intent was to extend Lima to directly support macOS VMs so as to isolate brew install <RANDOM_UNREVIEWED_PACKAGE> from the host, but I ended up creating a "poor man's container with Lima's CLI" using su + sudo + rsync, because macOS doesn't have an equivalent of cloud-init 😞. I strongly guess that Apple internally has it, though.

it is more like a chroot jail.

It is just su + sudo + rsync

I also really don't like the name.

I don't like the name either 😅 . Suggestions are welcome for an alternative name..

I find the whole beer/brew/tap/cask/bottle terminology quite weird, and unless you want to make this part of homebrew, I don't know why you would have picked a name from the same origin.

I still want to make it part of the upstream Homebrew, but I don't feel it is negotiable with Homebrew maintainers in the current state, as Alcoholless depends on the "Untar anywhere (unsupported)" mode (Tier 3).

I still wish that this mode could be promoted to Tier 1, or at least Tier 2, if I manage to spread Alcoholless to Homebrew users.

Also alclessctl has just too many syllables. 😄

Yep. Totally unpronounceable 😓

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There has been a discussion to extend the project scope to support non-Linux Machines:

That is still about virtualization though. But I guess we can still find some over-arching theme that would make it fit, like "running isolated workloads" or something... As I said, I don't have strong objections, just feels a bit like scope creep.

My initial intent was to extend Lima to directly support macOS VMs so as to isolate brew install <RANDOM_UNREVIEWED_PACKAGE> from the host, but I ended up creating a "poor man's container with Lima's CLI" using su + sudo + rsync, because macOS doesn't have an equivalent of cloud-init 😞. I strongly guess that Apple internally has it, though.

Maybe, but I doubt that they would ever make it publicly available.

I don't like the name either 😅 . Suggestions are welcome for an alternative name..

Why not call it jail. It is short, pronounceable, and unclaimed, afaict. Also has nice symmetry with lima and limactl: jail and jailctl.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"jail" means FreeBSD-style jails by default, so some prefix would have to be prepended to "jail"
e.g., "brewjail", "userjail", etc.

Copy link
Member

@afbjorklund afbjorklund Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see the connection between this template and alcless, it reads more like an advert?

Having a template for Linuxbrew sounds possible, but then again it's just Ubuntu and brew.sh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it reads more like an advert?

I agree, but I thought @AkihiroSuda gets some leeway here, as the creator of the Lima project.

Copy link
Member

@jandubois jandubois Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We continued to brainstorm on Slack. I kind of like confine, as in "you are confined to this directory and cannot escape".

Synonyms: enclose, restrict. But I like confine best.

Another candidate: silo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the advert from the yaml

isola

To me it sounds like an equivalent of mtools (still actively maintained in 2025 👀) for ISO9660 images 💿

confine, enclose, restrict

Ungoogleable.

silo

Taken by https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/s/silo.rb

Thanks for the suggestions anyway.

Let me open a new issue for continuing the discussion

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AkihiroSuda AkihiroSuda marked this pull request as draft April 22, 2025 07:56
@AkihiroSuda AkihiroSuda force-pushed the linuxbrew branch 2 times, most recently from dbd4ba0 to c4ed6d9 Compare April 22, 2025 08:03
@AkihiroSuda AkihiroSuda marked this pull request as ready for review April 22, 2025 08:06
jandubois
jandubois previously approved these changes Apr 22, 2025
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

This template does not use macOS as the guest OS, because it seems hard to automate
provisioning macOS instances (accept EULA, skip enabling iCloud, set up SSH...).

To run Homebrew on macOS with a sandbox, Alcoholless can be used instead.
The `alclessctl` CLI of Alcoholless is desigined to be similar to `limactl`:
https://github.com/AkihiroSuda/alcless

```
alclessctl create default
cd ~/SOME_DIRECTORY
alcless brew install xz
alcless xz SOME_FILE
```

Signed-off-by: Akihiro Suda <[email protected]>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@AkihiroSuda AkihiroSuda merged commit 473fc70 into lima-vm:master Apr 23, 2025
31 of 32 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 23, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [lima-vm/lima](https://github.com/lima-vm/lima) | minor | `v1.0.7` -> `v1.1.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>lima-vm/lima (lima-vm/lima)</summary>

### [`v1.1.1`](https://github.com/lima-vm/lima/releases/tag/v1.1.1)

[Compare Source](lima-vm/lima@v1.1.0...v1.1.1)

#### Changes

-   Fixed the guestagent path issues with Homebrew  ([#&#8203;3566](lima-vm/lima#3566), thanks to [@&#8203;jandubois](https://github.com/jandubois))
-   Documentation for disk management https://lima-vm.io/docs/config/disk/ ([#&#8203;3539](lima-vm/lima#3539), thanks to [@&#8203;Sonichigo](https://github.com/Sonichigo))

#### Usage

```console
[macOS]$ limactl create
[macOS]$ limactl start
...
INFO[0029] READY. Run `lima` to open the shell.

[macOS]$ lima uname
Linux
```

***

The binaries were built automatically on GitHub Actions.
The build log is available for 90 days: https://github.com/lima-vm/lima/actions/runs/15178234655

The sha256sum of the SHA256SUMS file itself is `0d2d3fb073c8e26df163937dd605e9f2b9f227814a697411cc2b8879347bdd7f` .

***

Release manager: [@&#8203;AkihiroSuda](https://github.com/AkihiroSuda)

### [`v1.1.0`](https://github.com/lima-vm/lima/releases/tag/v1.1.0)

[Compare Source](lima-vm/lima@v1.0.7...v1.1.0)

> \[!IMPORTANT]
> Package maintainers should refer to "Hint for package maintainers" below

Highlights:

-   Simplification of YAMLs
-   New port forwarder implementation by default
-   DragonflyBSD hosts
-   S390X and PPC64LE guests
-   Smaller binary packages

#### Changes

-   Build system:
    -   Split `lima-additional-guestagents-*.tar.gz` from `lima-*.tar.gz` ([#&#8203;3503](lima-vm/lima#3503))
    -   Set `CONFIG_GUESTAGENT_COMPRESS=y` by default ([#&#8203;3529](lima-vm/lima#3529))
-   YAML:
    -   Support inheritance ([#&#8203;3072](lima-vm/lima#3072), thanks to [@&#8203;jandubois](https://github.com/jandubois))
    -   Deprecate provision mode `ansible` ([#&#8203;3451](lima-vm/lima#3451), thanks to [@&#8203;afbjorklund](https://github.com/afbjorklund))
    -   Add new provision mode `data` ([#&#8203;3302](lima-vm/lima#3302), thanks to [@&#8203;jandubois](https://github.com/jandubois))
-   QEMU:
    -   Support DragonflyBSD hosts ([#&#8203;3356](lima-vm/lima#3356), thanks to [@&#8203;tuxillo](https://github.com/tuxillo))
    -   Support S390X guests ([#&#8203;3319](lima-vm/lima#3319))
    -   Support PPC64LE guests ([#&#8203;3488](lima-vm/lima#3488))
    -   TCG: change the default CPU from `qemu64` (x86-64 v1) to `max` ([#&#8203;3487](lima-vm/lima#3487))
    -   Bump up the minimum QEMU version to v8.2.1 on ARM Mac. On Linux/x86\_64, QEMU v6.2.0 is still supported. ([#&#8203;3491](lima-vm/lima#3491))
-   WSL2:
    -   Lots of improvements (several MRs, thanks to [@&#8203;arixmkii](https://github.com/arixmkii))
-   Port forwarding:
    -   Enable faster gRPC implementation by default ([#&#8203;3046](lima-vm/lima#3046))
-   `limactl` CLI:
    -   Add `--yes` flag as an alias of `--tty=false` ([#&#8203;3342](lima-vm/lima#3342), thanks to [@&#8203;suryaaprakassh](https://github.com/suryaaprakassh))
    -   Support resizing disk in `limactl edit` ([#&#8203;3437](lima-vm/lima#3437), [#&#8203;3533](lima-vm/lima#3533), thanks to [@&#8203;songponssw](https://github.com/songponssw))
    -   Add `limactl disk import` command ([#&#8203;3439](lima-vm/lima#3439), thanks to [@&#8203;songponssw](https://github.com/songponssw))
-   Rootless Containers:
    -   Allow UID >= 524288 ([#&#8203;3435](lima-vm/lima#3435))
-   nerdctl:
    -   Update from v2.0.4 to [v2.1.2](https://github.com/containerd/nerdctl/releases/tag/v2.1.2). ([#&#8203;3483](lima-vm/lima#3483), [#&#8203;3534](lima-vm/lima#3534), [#&#8203;3560](lima-vm/lima#3560))
        See also the release notes of [v2.0.5](https://github.com/containerd/nerdctl/releases/tag/v2.0.5), [v2.1.0](https://github.com/containerd/nerdctl/releases/tag/v2.1.0), [v2.1.1](https://github.com/containerd/nerdctl/releases/tag/v2.1.1).
        -   nerdctl v2.1.1 included in Lima v1.1.0-rc.0 had a vulnerability of containerd CVE-2025-47290 (GHSA-cm76-qm8v-3j95). Other versions of Lima are not affected.
-   Templates:
    -   `ubuntu-25.04`: New template ([#&#8203;3445](lima-vm/lima#3445)).
        The `default` template still refers to Ubuntu 24.10, as `ubuntu-25.04` needs
        the very recent release of macOS on Intel Mac by default (see the note below).
    -   `fedora-42`: New template ([#&#8203;3434](lima-vm/lima#3434))
    -   `linuxbrew`: New template ([#&#8203;3454](lima-vm/lima#3454))
    -   `almalinux-kitten-10`: New template ([#&#8203;3084](lima-vm/lima#3084), thanks to [@&#8203;afbjorklund](https://github.com/afbjorklund))
    -   `oraclelinux-8`: Fix virtiofs support ([#&#8203;3441](lima-vm/lima#3441))

> \[!NOTE]
> On Intel Mac with `--vm-type=vz`, macOS 15.5 or later is needed to boot `ubuntu-25.04` and `fedora-42`

Full changes: https://github.com/lima-vm/lima/milestone/26?closed=1
Thanks to [@&#8203;KGB33](https://github.com/KGB33) [@&#8203;Nino-K](https://github.com/Nino-K) [@&#8203;afbjorklund](https://github.com/afbjorklund) [@&#8203;alexandear](https://github.com/alexandear) [@&#8203;apachex692](https://github.com/apachex692) [@&#8203;arixmkii](https://github.com/arixmkii) [@&#8203;cakemanny](https://github.com/cakemanny) [@&#8203;jandubois](https://github.com/jandubois) [@&#8203;jonas-peter](https://github.com/jonas-peter) [@&#8203;kairveeehh](https://github.com/kairveeehh) [@&#8203;liangyuanpeng](https://github.com/liangyuanpeng) [@&#8203;nirs](https://github.com/nirs) [@&#8203;shenki](https://github.com/shenki) [@&#8203;songponssw](https://github.com/songponssw) [@&#8203;unsuman](https://github.com/unsuman) [@&#8203;ycdzj](https://github.com/ycdzj)

#### Hint for package maintainers

Starting with v1.1, the official binary packages of Lima are split to two files for the each of the host OS and the architectures to save the disk space:

1.  `lima-<VERSION>-Darwin-arm64.tar.gz`: (Built with `make native`)

-   The core components (`bin/lima`, `bin/limactl`, `share/lima/templates`, ...)
-   The guest agent for the native architecture (`share/lima/lima-guestagent.Linux-aarch64.gz`)

2.  `lima-additional-guestagents-<VERSION>-Darwin-arm64.tar.gz`: (Built with `make additional-guestagents`)

-   The guest agents for emulating non-native architectures (`share/lima/lima-guestagent.Linux-{armv7l,ppc64le,riscv64,s390x,x86_64}.gz)`)

For compatibility reason, `make` still builds the guest agents for all the architectures by default.

Package maintainers are suggested to split their `lima` package to `lima` (`make native`) and `lima-additional-guestagents` (`make additional-guestagents`).

#### Usage

```console
[macOS]$ limactl create
[macOS]$ limactl start
...
INFO[0029] READY. Run `lima` to open the shell.

[macOS]$ lima uname
Linux
```

***

The binaries were built automatically on GitHub Actions.
The build log is available for 90 days: https://github.com/lima-vm/lima/actions/runs/15154830653

The sha256sum of the SHA256SUMS file itself is `4391505a7f833c8245497b29fec65743abb1561a275037f6d268026284883c8a` .

***

Release manager: [@&#8203;AkihiroSuda](https://github.com/AkihiroSuda)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4yMS4wIiwidXBkYXRlZEluVmVyIjoiNDAuMjMuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/homebrew Homebrew formula
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants