<pre style='margin:0'>
Dan Villiom Podlaski Christiansen (danchr) pushed a commit to branch docker-compose-plugin
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/e22285d970650605bb6987f636d42832016d594d">https://github.com/macports/macports-ports/commit/e22285d970650605bb6987f636d42832016d594d</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit e22285d970650605bb6987f636d42832016d594d
</span>Author: Dan Villiom Podlaski Christiansen <danchr@gmail.com>
AuthorDate: Mon Feb 19 13:15:29 2024 +0100
<span style='display:block; white-space:pre;color:#404040;'> lima: tweaks
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * expand description
</span><span style='display:block; white-space:pre;color:#404040;'> * use make for install stage, obtaining niceties such as man pages
</span><span style='display:block; white-space:pre;color:#404040;'> * include shell completions scripts
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> The shell completion is somewhat tricky, as Lima refuses to do
</span><span style='display:block; white-space:pre;color:#404040;'> anything but generate documentation as root. I patched it to allow
</span><span style='display:block; white-space:pre;color:#404040;'> generating completions as well.
</span>---
sysutils/lima/Portfile | 57 +++++++++++++++++++------------------
sysutils/lima/files/patch-main.diff | 11 +++++++
2 files changed, 41 insertions(+), 27 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/lima/Portfile b/sysutils/lima/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 901810752dc..e5e924da6a1 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/lima/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/lima/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -6,13 +6,20 @@ PortGroup golang 1.0
</span> go.setup github.com/lima-vm/lima 0.20.1 v
go.offline_build no
github.tarball_from archive
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
homepage https://lima-vm.io
description Linux virtual machines
<span style='display:block; white-space:pre;background:#ffe0e0;'>-long_description {*}${description}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description {*}{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Lima launches Linux virtual machines with automatic file sharing
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and port forwarding (similar to WSL2). The original goal of Lima
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ was to promote containerd including nerdctl (contaiNERD ctl) to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Mac users, but Lima can be used for non-container applications as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ well. Lima also supports other container engines, such as Docker,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Podman, Kubernetes, etc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
categories sysutils
installs_libs no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,6 +29,8 @@ maintainers {gmail.com:herby.gillot @herbygillot} \
</span> openmaintainer
depends_run port:qemu
<span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:sudo
</span>
checksums rmd160 6c1ecf713ed8b63351d5e5032337362acf8751d9 \
sha256 3e8b16572a23d69ad16ef72f15b1697c35b5eacaf6c1f0943b6ebfb8bfaf1fd7 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,37 +38,31 @@ checksums rmd160 6c1ecf713ed8b63351d5e5032337362acf8751d9 \
</span>
build.cmd make
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-Makefile.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles patch-Makefile.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-main.diff
</span>
post-patch {
reinplace "s|@@VERSION@@|${version}|g" ${worksrcpath}/Makefile
}
destroot {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {*}[glob ${worksrcpath}/_output/bin/*] ${destroot}${prefix}/bin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 -d ${destroot}${prefix}/share/lima
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {*}[glob ${worksrcpath}/_output/share/lima/lima-guestagent.Linux-*] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/lima
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 -d ${destroot}${prefix}/share/doc/lima
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/_output/share/doc/lima/LICENSE \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/doc/lima
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/_output/share/doc/lima/README.md \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/doc/lima
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/lima/
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0755 -d ${destroot}${prefix}/share/lima/templates
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 0644 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- {*}[glob ${worksrcpath}/_output/share/doc/lima/examples/*.yaml] \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/share/lima/templates
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ln -fs ${prefix}/share/lima/templates ${destroot}${prefix}/share/lima/examples
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath} "make install DEST=${destroot}${prefix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # install completion for various shells
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set bash_completions_dir ${destroot}${prefix}/share/bash-completion/completions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set fish_completions_dir ${destroot}${prefix}/share/fish/vendor_completions.d
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set zsh_completions_dir ${destroot}${prefix}/share/zsh/site-functions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${bash_completions_dir} ${fish_completions_dir} ${zsh_completions_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/limactl completion bash \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ > ${bash_completions_dir}/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/limactl completion fish \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ > ${fish_completions_dir}/${name}.fish
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/limactl completion zsh \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ > ${zsh_completions_dir}/_${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span> }
github.livecheck.regex {([0-9.]+)}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/lima/files/patch-main.diff b/sysutils/lima/files/patch-main.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..84b726caa2e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/lima/files/patch-main.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- cmd/limactl/main.go
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ cmd/limactl/main.go
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -87,7 +87,7 @@ func newApp() *cobra.Command {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ formatter.ForceColors = true
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ logrus.StandardLogger().SetFormatter(formatter)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if os.Geteuid() == 0 && cmd.Name() != "generate-doc" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if os.Geteuid() == 0 && cmd.Name() != "generate-doc" && cmd.Parent().Name() != "completion" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return errors.New("must not run as the root")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Make sure either $HOME or $LIMA_HOME is defined, so we don't need
</span></pre><pre style='margin:0'>
</pre>