<pre style='margin:0'>
Leonardo Brondani Schenkel (lbschenkel) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ef8068608d38c71df052df6ece38c77ff26f8c67">https://github.com/macports/macports-ports/commit/ef8068608d38c71df052df6ece38c77ff26f8c67</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ef8068608d3 kubectl: build from source for 1.21, 1.20, & 1.19
</span>ef8068608d3 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ef8068608d38c71df052df6ece38c77ff26f8c67
</span>Author: Herby Gillot <herby.gillot@gmail.com>
AuthorDate: Wed Jun 30 07:01:07 2021 -0400
<span style='display:block; white-space:pre;color:#404040;'> kubectl: build from source for 1.21, 1.20, & 1.19
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Adds the option to build kubectl from source instead of using the
</span><span style='display:block; white-space:pre;color:#404040;'> pre-built amd64 binary. This option is enabled for kubectl-1.21,
</span><span style='display:block; white-space:pre;color:#404040;'> kubectl-1.20, and kubectl-1.19.
</span>---
sysutils/kubectl/Portfile | 112 +++++++++++++++++++++++++++++++++-------------
1 file changed, 80 insertions(+), 32 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/kubectl/Portfile b/sysutils/kubectl/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0cedf47a486..feafb410d15 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/kubectl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/kubectl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,28 +18,44 @@ maintainers {@patarra gmail.com:patarra} \
</span>
subport kubectl_select {}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+set source_build no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # *NOTE* Remember to update `latestVersion` on a version upgrade.
set latestVersion kubectl-1.21
subport kubectl-1.21 {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set source_build yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set patchNumber 2
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 16d618be1dabdf6bbebcdaa3eb19c98a6ebfaeee \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 4a6c072223d5944b98601fc9f4cfdc5652ff0919ca91210b7eed5c83f2422fa1 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 52540272
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # because source_build is yes, this is the checksum of the kubernetes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # source tarball
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 e32b00e8b34f90888f85a1d49cd4cc19edc89eae \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 1173f1ea1b6d291666715f54c7d6dd9c54357c0f80aa453f243fd7b3a7498972 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 36081553
</span> }
subport kubectl-1.20 {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set source_build yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set patchNumber 4
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 6a96b5e7fcc550198ddf4056ee3b0a644bd4b78c \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 37f593731b8c9913bf2a3bfa36dacb3058dc176c7aeae2930c783822ea03a573 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 46263664
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 ace075d1556d3f990a415a694dcd7ba89568bf2d \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 79ee11e306d948afe18c3265023218470956f5434daf52340188339ec322a5db \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 34447748
</span> }
subport kubectl-1.19 {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set source_build yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set patchNumber 8
<span style='display:block; white-space:pre;background:#ffe0e0;'>- checksums rmd160 598965501bd55a2c84db22ebca1d131b6beff61a \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 51e937f4d863a41299952428616aece20c7289548c08239db50dcb9f826c46ff \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 49442736
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 6c388189031d21318206ab7e289459a0ed6b465b \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 b18e17fe404b3e004339ec686455b7db3feccf46a6077be49745101ea2e8fff3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 33500607
</span> }
subport kubectl-1.18 {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -136,43 +152,75 @@ if {${subport} == ${name}} {
</span> livecheck.type none
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- supported_archs x86_64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run port:kubectl_select
</span>
set baseVersion [lindex [split ${subport} "-"] 1]
set patchVersion ${baseVersion}.${patchNumber}
set baseName kubectl${baseVersion}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- github.setup kubernetes kubectl ${patchVersion}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ${source_build} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Build kubectl from source
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PortGroup golang 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ go.setup github.com/kubernetes/kubernetes ${patchVersion} v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ go.package k8s.io/kubernetes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.cmd make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.target kubectl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.tarball_from archive
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ use_parallel_build no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:bash
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall ${worksrcpath}/_output/bin/kubectl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/kubectl${baseVersion}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Use Darwin amd64 pre-built binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup kubernetes kubectl ${patchVersion}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs x86_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ master_sites https://storage.googleapis.com/kubernetes-release/release/v${version}/bin/darwin/amd64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ distname kubectl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dist_subdir ${name}/${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extract.suffix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extract.only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ use_configure no
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall ${distpath}/kubectl \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/kubectl${baseVersion}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # legacysupport tweaks don't work, since the install here is from
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # a binary tarball ... have to tweak the binary to use the legacy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # support library, which in turn uses the System.B library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ legacysupport::relink_libSystem ${destroot}${prefix}/bin/kubectl${baseVersion}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run port:kubectl_select
</span>
description Kubernetes cluster CLI
long_description Command line interface for running commands against \
Kubernetes clusters
<span style='display:block; white-space:pre;background:#ffe0e0;'>- master_sites https://storage.googleapis.com/kubernetes-release/release/v${version}/bin/darwin/amd64
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- distname kubectl
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- dist_subdir ${name}/${version}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extract.suffix
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- extract.only
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- use_configure no
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-build {
</span> file copy ${filespath}/kubectlX.YY.template ${workpath}/${baseName}
reinplace "s|@@BASE_VERSION@@|${baseVersion}|g" ${workpath}/${baseName}
reinplace "s|@@PORT_NAME@@|${subport}|g" ${workpath}/${baseName}
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- destroot {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall ${distpath}/kubectl \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${destroot}${prefix}/bin/kubectl${baseVersion}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # legacysupport tweaks don't work, since the install here is from
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # a binary tarball ... have to tweak the binary to use the legacy
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # support library, which in turn uses the System.B library.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- legacysupport::relink_libSystem ${destroot}${prefix}/bin/kubectl${baseVersion}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-destroot {
</span> set completionsPath ${destroot}${prefix}/share/${subport}/completion
xinstall -d ${completionsPath}
exec ${destroot}${prefix}/bin/kubectl${baseVersion} completion bash \
</pre><pre style='margin:0'>
</pre>