Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: talosctl-1.8.1
@ 2024-10-10 15:53 chasinglogic
  2024-10-10 16:21 ` chasinglogic
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: chasinglogic @ 2024-10-10 15:53 UTC (permalink / raw)
  To: ml

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

There is a new pull request by chasinglogic against master on the void-packages repository

https://github.com/chasinglogic/void-packages new-package/talosctl
https://github.com/void-linux/void-packages/pull/52593

New package: talosctl-1.8.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

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


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

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
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
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - armv7l (crossbuild)
  - armv6l-musl (crossbuild)
  - armv6l (crossbuild)

Closes #52591 

I tried a crossbuild of aarch64 but got a strange error that it couldn't find the linker `ld`. I wasn't sure how to proceed with that but happy to try again if there's some troubleshooting steps I can follow.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new-package/talosctl-52593.patch --]
[-- Type: text/x-diff, Size: 1733 bytes --]

From af7c96f51176b0b31281977b17b5a8396c2d3318 Mon Sep 17 00:00:00 2001
From: Mathew Robinson <mathew@chasinglogic.io>
Date: Thu, 10 Oct 2024 16:24:37 +0100
Subject: [PATCH] New package: talosctl-1.8.1

---
 srcpkgs/talosctl/template | 25 +++++++++++++++++++++++++
 srcpkgs/talosctl/update   |  2 ++
 2 files changed, 27 insertions(+)
 create mode 100644 srcpkgs/talosctl/template
 create mode 100644 srcpkgs/talosctl/update

diff --git a/srcpkgs/talosctl/template b/srcpkgs/talosctl/template
new file mode 100644
index 00000000000000..fba0b69bc7f2fc
--- /dev/null
+++ b/srcpkgs/talosctl/template
@@ -0,0 +1,25 @@
+# Template file for 'talosctl'
+pkgname=talosctl
+version=1.8.1
+revision=1
+build_style=go
+go_import_path="github.com/siderolabs/talos"
+go_package="${go_import_path}/cmd/talosctl"
+go_build_tags="grpcnotrace"
+# use $(:) to silence xlint
+go_ldflags=$(:)
+short_desc="Talos Linux CLI client"
+maintainer="Mathew Robinson <chasinglogic@gmail.com>"
+license="MPL-2.0"
+homepage="https://www.talos.dev"
+changelog="https://github.com/siderolabs/talos/releases"
+distfiles="https://github.com/siderolabs/talos/archive/refs/tags/v${version}.tar.gz"
+checksum=65e2a8e046840d9df9a622c59652c825d7f937a29b70fd8ff6980900e6cf7765
+
+pre_build() {
+	local _date
+	if [ "$SOURCE_DATE_EPOCH" ]; then
+		_date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
+		go_ldflags="-X github.com/siderolabs/talos/pkg/machinery/version.Built=${_date}"
+	fi
+}
diff --git a/srcpkgs/talosctl/update b/srcpkgs/talosctl/update
new file mode 100644
index 00000000000000..12701ef28019ab
--- /dev/null
+++ b/srcpkgs/talosctl/update
@@ -0,0 +1,2 @@
+site="https://github.com/siderolabs/talos/releases"
+pattern='/tags/v\K[\d.]+(?=.tar.gz)'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New package: talosctl-1.8.1
  2024-10-10 15:53 [PR PATCH] New package: talosctl-1.8.1 chasinglogic
@ 2024-10-10 16:21 ` chasinglogic
  2024-10-10 16:21 ` chasinglogic
  2024-10-11 16:53 ` [PR PATCH] [Updated] " chasinglogic
  2 siblings, 0 replies; 4+ messages in thread
From: chasinglogic @ 2024-10-10 16:21 UTC (permalink / raw)
  To: ml

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

New comment by chasinglogic on void-packages repository

https://github.com/void-linux/void-packages/pull/52593#issuecomment-2405548455

Comment:
The tests fail locally and I assume they will in CI as well because they apparently need to be run as root. You can see this easily on any void linux install if you're brave (/ dumb) enough like me to run the tests directly:

```
~/Code/foss/talos main λ go test ./pkg/archiver/
--- FAIL: TestTarSuite (0.00s)
    --- FAIL: TestTarSuite/TestArchiveProcfs (0.00s)
        tar_test.go:146:
                Error Trace:    /home/chasinglogic/Code/foss/talos/pkg/archiver/tar_test.go:146
                Error:          Should not be zero, but was 0
                Test:           TestTarSuite/TestArchiveProcfs
FAIL
FAIL    github.com/siderolabs/talos/pkg/archiver        0.011s
FAIL
~/Code/foss/talos main λ sudo go test ./pkg/archiver/
Password:
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/stretchr/testify v1.9.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c
ok      github.com/siderolabs/talos/pkg/archiver        0.010s
~/Code/foss/talos main λ
```

The problem is the tests are trying to archive /proc/self/ as a test but it seems to run into permission issues. I'm not entirely sure what the best solution is. `talosctl` doesn't use this archiver package (only the talos server does).



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New package: talosctl-1.8.1
  2024-10-10 15:53 [PR PATCH] New package: talosctl-1.8.1 chasinglogic
  2024-10-10 16:21 ` chasinglogic
@ 2024-10-10 16:21 ` chasinglogic
  2024-10-11 16:53 ` [PR PATCH] [Updated] " chasinglogic
  2 siblings, 0 replies; 4+ messages in thread
From: chasinglogic @ 2024-10-10 16:21 UTC (permalink / raw)
  To: ml

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

New comment by chasinglogic on void-packages repository

https://github.com/void-linux/void-packages/pull/52593#issuecomment-2405548455

Comment:
The tests fail locally and I assume they will in CI as well because they apparently need to be run as root. You can see this easily on any void linux install if you're brave (/ dumb) enough like me to run the tests directly:

```
~/Code/foss/talos main λ go test ./pkg/archiver/
--- FAIL: TestTarSuite (0.00s)
    --- FAIL: TestTarSuite/TestArchiveProcfs (0.00s)
        tar_test.go:146:
                Error Trace:    /home/chasinglogic/Code/foss/talos/pkg/archiver/tar_test.go:146
                Error:          Should not be zero, but was 0
                Test:           TestTarSuite/TestArchiveProcfs
FAIL
FAIL    github.com/siderolabs/talos/pkg/archiver        0.011s
FAIL
~/Code/foss/talos main λ sudo go test ./pkg/archiver/
Password:
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/stretchr/testify v1.9.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
go: downloading github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
go: downloading github.com/unix4ever/yaml v0.0.0-20220527175918-f17b0f05cf2c
ok      github.com/siderolabs/talos/pkg/archiver        0.010s
~/Code/foss/talos main λ
```

The problem is the tests are trying to archive /proc/self/ as a test but it seems to run into permission issues. I'm not entirely sure what the best solution is. `talosctl` doesn't use this archiver package (only the talos server does).

They get around this in their CI etc because it's all dockerized running as root it seems.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Updated] New package: talosctl-1.8.1
  2024-10-10 15:53 [PR PATCH] New package: talosctl-1.8.1 chasinglogic
  2024-10-10 16:21 ` chasinglogic
  2024-10-10 16:21 ` chasinglogic
@ 2024-10-11 16:53 ` chasinglogic
  2 siblings, 0 replies; 4+ messages in thread
From: chasinglogic @ 2024-10-11 16:53 UTC (permalink / raw)
  To: ml

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

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

https://github.com/chasinglogic/void-packages new-package/talosctl
https://github.com/void-linux/void-packages/pull/52593

New package: talosctl-1.8.1
<!-- Uncomment relevant sections and delete options which are not applicable -->

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


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

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
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
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - armv7l (crossbuild)
  - armv6l-musl (crossbuild)
  - armv6l (crossbuild)

Closes #52591 

I tried a crossbuild of aarch64 but got a strange error that it couldn't find the linker `ld`. I wasn't sure how to proceed with that but happy to try again if there's some troubleshooting steps I can follow.


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new-package/talosctl-52593.patch --]
[-- Type: text/x-diff, Size: 1733 bytes --]

From 254fd919b1c349cd9ecaa502ff6f6afba76c6808 Mon Sep 17 00:00:00 2001
From: Mathew Robinson <mathew@chasinglogic.io>
Date: Thu, 10 Oct 2024 16:24:37 +0100
Subject: [PATCH] New package: talosctl-1.8.1

---
 srcpkgs/talosctl/template | 25 +++++++++++++++++++++++++
 srcpkgs/talosctl/update   |  2 ++
 2 files changed, 27 insertions(+)
 create mode 100644 srcpkgs/talosctl/template
 create mode 100644 srcpkgs/talosctl/update

diff --git a/srcpkgs/talosctl/template b/srcpkgs/talosctl/template
new file mode 100644
index 00000000000000..fba0b69bc7f2fc
--- /dev/null
+++ b/srcpkgs/talosctl/template
@@ -0,0 +1,25 @@
+# Template file for 'talosctl'
+pkgname=talosctl
+version=1.8.1
+revision=1
+build_style=go
+go_import_path="github.com/siderolabs/talos"
+go_package="${go_import_path}/cmd/talosctl"
+go_build_tags="grpcnotrace"
+# use $(:) to silence xlint
+go_ldflags=$(:)
+short_desc="Talos Linux CLI client"
+maintainer="Mathew Robinson <chasinglogic@gmail.com>"
+license="MPL-2.0"
+homepage="https://www.talos.dev"
+changelog="https://github.com/siderolabs/talos/releases"
+distfiles="https://github.com/siderolabs/talos/archive/refs/tags/v${version}.tar.gz"
+checksum=65e2a8e046840d9df9a622c59652c825d7f937a29b70fd8ff6980900e6cf7765
+
+pre_build() {
+	local _date
+	if [ "$SOURCE_DATE_EPOCH" ]; then
+		_date="$(date --utc --date "@$SOURCE_DATE_EPOCH" "+%Y-%m-%d")"
+		go_ldflags="-X github.com/siderolabs/talos/pkg/machinery/version.Built=${_date}"
+	fi
+}
diff --git a/srcpkgs/talosctl/update b/srcpkgs/talosctl/update
new file mode 100644
index 00000000000000..12701ef28019ab
--- /dev/null
+++ b/srcpkgs/talosctl/update
@@ -0,0 +1,2 @@
+site="https://github.com/siderolabs/talos/releases"
+pattern='/tags/v\K[\d.]+(?=.tar.gz)'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-11 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10 15:53 [PR PATCH] New package: talosctl-1.8.1 chasinglogic
2024-10-10 16:21 ` chasinglogic
2024-10-10 16:21 ` chasinglogic
2024-10-11 16:53 ` [PR PATCH] [Updated] " chasinglogic

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).