Github messages for voidlinux
 help / color / mirror / Atom feed
From: gbrlsnchs <gbrlsnchs@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: docker-buildx-0.7.1
Date: Sun, 20 Feb 2022 03:51:24 +0100	[thread overview]
Message-ID: <20220220025124.OGeVkIh-CRSxCykqMYwYYAQ7HWRSVBf5n5jeBbs2oOI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-35682@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

There is an updated pull request by gbrlsnchs against master on the void-packages repository

https://github.com/gbrlsnchs/void-packages docker-buildx
https://github.com/void-linux/void-packages/pull/35682

New package: docker-buildx-0.7.1
I had to use this command at work and it simply didn't exist. I had previously used it on Arch and didn't really know why it wasn't available on Void as well.

It happens that this command is a Docker CLI plugin, and comes bundled with Docker when distributed via DEBs or RPMs, but Arch also packages it along with their Docker package.

In my opinion, it makes more sense to package this just like Docker Compose (which since `v2` is also a Docker CLI plugin), that is, as a separate package, easy to install, and which will work out of the box once installed.

P.S.: I based this template off `docker-compose`'s.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
 
#### Local build testing
- [x] I built this PR locally for my native architecture, (x86_64, both for glibc and musl)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/35682.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-docker-buildx-35682.patch --]
[-- Type: text/x-diff, Size: 4434 bytes --]

From 2e7179ab19cd8c032d9119b51fa72602297cab8c Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Fri, 18 Feb 2022 11:46:33 -0300
Subject: [PATCH 1/3] New package: docker-buildx-0.7.1

---
 srcpkgs/docker-buildx/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/docker-buildx/template

diff --git a/srcpkgs/docker-buildx/template b/srcpkgs/docker-buildx/template
new file mode 100644
index 000000000000..d86030d2db1c
--- /dev/null
+++ b/srcpkgs/docker-buildx/template
@@ -0,0 +1,24 @@
+# Template file for 'docker-buildx'
+pkgname=docker-buildx
+_pkgname=buildx
+version=0.7.1
+revision=1
+wrksrc="${_pkgname}-${version}"
+build_style=go
+go_import_path="github.com/docker/buildx/cmd/${_pkgname}"
+go_ldflags="-X github.com/docker/buildx/version.Version=${version}"
+depends="docker-cli"
+short_desc="Docker CLI plugin for extended build capabilities with BuildKit"
+maintainer="Gabriel Sanches <gabriel@gsr.dev>"
+license="Apache-2.0"
+homepage="https://docs.docker.com/buildx/working-with-buildx/"
+distfiles="https://github.com/docker/buildx/archive/refs/tags/v${version}.tar.gz"
+checksum=5df4224eeac5a00d1bef2344660e93415264a64ea4742133f2c2a794c563ef50
+
+post_install() {
+	local plugins_dir=/usr/libexec/docker/cli-plugins
+	local dest_plugins_dir="${DESTDIR}/${plugins_dir}"
+	mkdir -p $dest_plugins_dir
+	mv "${DESTDIR}/usr/bin/${_pkgname}" "${dest_plugins_dir}/${pkgname}"
+	ln -s ${plugins_dir}/${pkgname} ${DESTDIR}/usr/bin/${pkgname}
+}

From dd3ca94dd0bf2d1db024b6b13c3637bf32dd669b Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Sat, 19 Feb 2022 23:32:15 -0300
Subject: [PATCH 2/3] Apply suggestions from code review

Co-authored-by: Echo <michal@vasilek.cz>
---
 srcpkgs/docker-buildx/template | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/docker-buildx/template b/srcpkgs/docker-buildx/template
index d86030d2db1c..1996912b81c8 100644
--- a/srcpkgs/docker-buildx/template
+++ b/srcpkgs/docker-buildx/template
@@ -6,7 +6,7 @@ revision=1
 wrksrc="${_pkgname}-${version}"
 build_style=go
 go_import_path="github.com/docker/buildx/cmd/${_pkgname}"
-go_ldflags="-X github.com/docker/buildx/version.Version=${version}"
+go_ldflags="-X github.com/docker/buildx/version.Version=v${version}"
 depends="docker-cli"
 short_desc="Docker CLI plugin for extended build capabilities with BuildKit"
 maintainer="Gabriel Sanches <gabriel@gsr.dev>"
@@ -16,9 +16,7 @@ distfiles="https://github.com/docker/buildx/archive/refs/tags/v${version}.tar.gz
 checksum=5df4224eeac5a00d1bef2344660e93415264a64ea4742133f2c2a794c563ef50
 
 post_install() {
-	local plugins_dir=/usr/libexec/docker/cli-plugins
-	local dest_plugins_dir="${DESTDIR}/${plugins_dir}"
-	mkdir -p $dest_plugins_dir
-	mv "${DESTDIR}/usr/bin/${_pkgname}" "${dest_plugins_dir}/${pkgname}"
+	vmkdir usr/libexec/docker/cli-plugins
+	mv ${DESTDIR}/usr/bin/buildx ${DESTDIR}/usr/libexec/docker/cli-plugins/docker-buildx"
 	ln -s ${plugins_dir}/${pkgname} ${DESTDIR}/usr/bin/${pkgname}
 }

From 97bb1195018c9f0d32ea3ec968c4a3e44562e734 Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Sat, 19 Feb 2022 23:50:57 -0300
Subject: [PATCH 3/3] Clean up template

---
 srcpkgs/docker-buildx/template | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/docker-buildx/template b/srcpkgs/docker-buildx/template
index 1996912b81c8..fae3b3d3cb2f 100644
--- a/srcpkgs/docker-buildx/template
+++ b/srcpkgs/docker-buildx/template
@@ -1,11 +1,10 @@
 # Template file for 'docker-buildx'
 pkgname=docker-buildx
-_pkgname=buildx
 version=0.7.1
 revision=1
-wrksrc="${_pkgname}-${version}"
+wrksrc="buildx-${version}"
 build_style=go
-go_import_path="github.com/docker/buildx/cmd/${_pkgname}"
+go_import_path="github.com/docker/buildx/cmd/buildx"
 go_ldflags="-X github.com/docker/buildx/version.Version=v${version}"
 depends="docker-cli"
 short_desc="Docker CLI plugin for extended build capabilities with BuildKit"
@@ -17,6 +16,5 @@ checksum=5df4224eeac5a00d1bef2344660e93415264a64ea4742133f2c2a794c563ef50
 
 post_install() {
 	vmkdir usr/libexec/docker/cli-plugins
-	mv ${DESTDIR}/usr/bin/buildx ${DESTDIR}/usr/libexec/docker/cli-plugins/docker-buildx"
-	ln -s ${plugins_dir}/${pkgname} ${DESTDIR}/usr/bin/${pkgname}
+	mv "${DESTDIR}/usr/bin/buildx" "${DESTDIR}/usr/libexec/docker/cli-plugins/docker-buildx"
 }

  parent reply	other threads:[~2022-02-20  2:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 14:53 [PR PATCH] " gbrlsnchs
2022-02-19 15:30 ` [PR REVIEW] " paper42
2022-02-19 15:30 ` paper42
2022-02-19 15:30 ` paper42
2022-02-19 15:30 ` paper42
2022-02-20  2:30 ` gbrlsnchs
2022-02-20  2:32 ` [PR PATCH] [Updated] " gbrlsnchs
2022-02-20  2:51 ` gbrlsnchs [this message]
2022-02-20  2:52 ` [PR REVIEW] " gbrlsnchs
2022-02-20  2:52 ` gbrlsnchs
2022-02-20  2:56 ` [PR PATCH] [Updated] " gbrlsnchs
2022-02-20  2:58 ` gbrlsnchs
2022-02-20 11:54 ` [PR PATCH] [Merged]: " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220220025124.OGeVkIh-CRSxCykqMYwYYAQ7HWRSVBf5n5jeBbs2oOI@z \
    --to=gbrlsnchs@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).