Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: superd-0.7
@ 2022-10-14 11:55 JamiKettunen
  2022-10-14 21:19 ` [PR REVIEW] " paper42
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-14 11:55 UTC (permalink / raw)
  To: ml

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

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

https://github.com/JamiKettunen/void-packages superd
https://github.com/void-linux/void-packages/pull/39949

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

Since I had to add a `do_check()` myself it made me wonder if the go build-style should have a default of some kind. Thoughts?

#### 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**|**NO**
-->

<!-- 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, (ARCH-LIBC)
- 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/39949.patch is attached

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

From 12672fc7bc0f429162248d7848455ff7387a8a33 Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 26 Sep 2022 00:08:23 +0300
Subject: [PATCH] New package: superd-0.7

---
 .../patches/ignore-binaries-on-install.diff   | 18 +++++++++++++++
 srcpkgs/superd/template                       | 23 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 srcpkgs/superd/patches/ignore-binaries-on-install.diff
 create mode 100644 srcpkgs/superd/template

diff --git a/srcpkgs/superd/patches/ignore-binaries-on-install.diff b/srcpkgs/superd/patches/ignore-binaries-on-install.diff
new file mode 100644
index 000000000000..47b69733cf11
--- /dev/null
+++ b/srcpkgs/superd/patches/ignore-binaries-on-install.diff
@@ -0,0 +1,18 @@
+Let xbps-src handle (cross)building super{d,ctl} binaries properly with the go build-style.
+
+--- a/Makefile
++++ b/Makefile
+@@ -58,12 +58,10 @@ doc: $(DOCS)
+ clean:
+ 	$(RM) $(DOCS) superd superctl
+ 
+-install: $(DOCS) superd superctl
++install: $(DOCS)
+ 	mkdir -m755 -p \
+ 		$(DESTDIR)$(SYSCONFDIR)/superd/services \
+ 		$(DESTDIR)$(SHAREDIR)/superd/services
+-	install -Dm755 superd -t $(DESTDIR)$(BINDIR)/
+-	install -Dm755 superctl -t $(DESTDIR)$(BINDIR)/
+ 	install -Dm644 superd.1 -t $(DESTDIR)$(MANDIR)/man1/
+ 	install -Dm644 superd.service.5 -t $(DESTDIR)$(MANDIR)/man5/
+ 	install -Dm644 superctl.1 -t $(DESTDIR)$(MANDIR)/man1/
diff --git a/srcpkgs/superd/template b/srcpkgs/superd/template
new file mode 100644
index 000000000000..ec9b94dc6186
--- /dev/null
+++ b/srcpkgs/superd/template
@@ -0,0 +1,23 @@
+# Template file for 'superd'
+pkgname=superd
+version=0.7
+revision=1
+build_style=go
+go_import_path="sr.ht/~craftyguy/superd"
+go_package="${go_import_path}/cmd/superd ${go_import_path}/cmd/superctl"
+go_ldflags="-X 'main.Version=${version}'"
+hostmakedepends="scdoc"
+short_desc="Lightweight user service supervising daemon"
+maintainer="Jami Kettunen <jami.kettunen@protonmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sr.ht/~craftyguy/superd/"
+distfiles="https://git.sr.ht/~craftyguy/superd/archive/${version}.tar.gz"
+checksum=7563647dd5303752237e1b8453c770dd83c908a239da73f48b11e2151109586b
+
+do_check() {
+	go test ./...
+}
+
+post_install() {
+	make PREFIX=/usr DESTDIR=${DESTDIR} install
+}

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

* Re: [PR REVIEW] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
@ 2022-10-14 21:19 ` paper42
  2022-10-14 22:11 ` [PR PATCH] [Updated] " JamiKettunen
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paper42 @ 2022-10-14 21:19 UTC (permalink / raw)
  To: ml

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

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/39949#discussion_r996166728

Comment:
Maybe you could try to upstream this by creating a new install-docs target and adding it to the install target's dependencies. The template could then just use `make install-docs` and we might be able to drop the patch eventually if it's accepted upstream.

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

* Re: [PR PATCH] [Updated] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
  2022-10-14 21:19 ` [PR REVIEW] " paper42
@ 2022-10-14 22:11 ` JamiKettunen
  2022-10-14 22:11 ` [PR REVIEW] " JamiKettunen
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-14 22:11 UTC (permalink / raw)
  To: ml

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

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

https://github.com/JamiKettunen/void-packages superd
https://github.com/void-linux/void-packages/pull/39949

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

Since I had to add a `do_check()` myself it made me wonder if the go build-style should have a default of some kind. Thoughts?

#### 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**|**NO**
-->

<!-- 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, (ARCH-LIBC)
- 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/39949.patch is attached

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

From 936d08c7c122aff322725909a28d07174f1fa00b Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 26 Sep 2022 00:08:23 +0300
Subject: [PATCH] New package: superd-0.7

---
 srcpkgs/superd/template | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 srcpkgs/superd/template

diff --git a/srcpkgs/superd/template b/srcpkgs/superd/template
new file mode 100644
index 000000000000..49ae64d7a1ba
--- /dev/null
+++ b/srcpkgs/superd/template
@@ -0,0 +1,27 @@
+# Template file for 'superd'
+pkgname=superd
+version=0.7
+revision=1
+build_style=go
+go_import_path="sr.ht/~craftyguy/superd"
+hostmakedepends="scdoc"
+short_desc="Lightweight user service supervising daemon"
+maintainer="Jami Kettunen <jami.kettunen@protonmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sr.ht/~craftyguy/superd/"
+distfiles="https://git.sr.ht/~craftyguy/superd/archive/${version}.tar.gz"
+checksum=7563647dd5303752237e1b8453c770dd83c908a239da73f48b11e2151109586b
+
+do_build() {
+	unset LDFLAGS
+	make VERSION=${version}
+}
+
+do_check() {
+	go test ./...
+}
+
+do_install() {
+	unset LDFLAGS
+	make PREFIX=/usr DESTDIR=${DESTDIR} install
+}

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

* Re: [PR REVIEW] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
  2022-10-14 21:19 ` [PR REVIEW] " paper42
  2022-10-14 22:11 ` [PR PATCH] [Updated] " JamiKettunen
@ 2022-10-14 22:11 ` JamiKettunen
  2022-10-14 22:27 ` JamiKettunen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-14 22:11 UTC (permalink / raw)
  To: ml

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

New review comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/39949#discussion_r996190263

Comment:
I came up with an alternative that lets up get rid of the patch entirely, let me know what you think :)

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

* Re: [PR REVIEW] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
                   ` (2 preceding siblings ...)
  2022-10-14 22:11 ` [PR REVIEW] " JamiKettunen
@ 2022-10-14 22:27 ` JamiKettunen
  2022-10-15  0:09 ` JamiKettunen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-14 22:27 UTC (permalink / raw)
  To: ml

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

New review comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/39949#discussion_r996190263

Comment:
I came up with an alternative that lets us get rid of the patch entirely, let me know what you think :)

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

* Re: [PR REVIEW] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
                   ` (3 preceding siblings ...)
  2022-10-14 22:27 ` JamiKettunen
@ 2022-10-15  0:09 ` JamiKettunen
  2022-10-16 19:17 ` [PR PATCH] [Updated] " JamiKettunen
  2022-10-16 20:27 ` [PR PATCH] [Merged]: " paper42
  6 siblings, 0 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-15  0:09 UTC (permalink / raw)
  To: ml

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

New review comment by JamiKettunen on void-packages repository

https://github.com/void-linux/void-packages/pull/39949#discussion_r996190263

Comment:
~~I came up with an alternative that lets us get rid of the patch entirely, let me know what you think :)~~ Going back to initial version and figuring out a patch to separate binary installations from everything else.

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

* Re: [PR PATCH] [Updated] New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
                   ` (4 preceding siblings ...)
  2022-10-15  0:09 ` JamiKettunen
@ 2022-10-16 19:17 ` JamiKettunen
  2022-10-16 20:27 ` [PR PATCH] [Merged]: " paper42
  6 siblings, 0 replies; 8+ messages in thread
From: JamiKettunen @ 2022-10-16 19:17 UTC (permalink / raw)
  To: ml

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

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

https://github.com/JamiKettunen/void-packages superd
https://github.com/void-linux/void-packages/pull/39949

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

~~Since I had to add a `do_check()` myself it made me wonder if the go build-style should have a default of some kind. Thoughts?~~ As per conversation on `#xbps` IRC we should `: ${make_check_target:=./...}` and `go test -v ${make_check_target}`, but I'll reserve that for another PR and tweak all `build_style=go` packages as needed.

#### 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**|**NO**
-->

<!-- 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, (ARCH-LIBC)
- 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/39949.patch is attached

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

From 776f8f1bf96a0b59aed8aad9dae9c5f8466caa5d Mon Sep 17 00:00:00 2001
From: Jami Kettunen <jami.kettunen@protonmail.com>
Date: Mon, 26 Sep 2022 00:08:23 +0300
Subject: [PATCH] New package: superd-0.7

---
 .../patches/add-installmisc-target.patch      | 50 +++++++++++++++++++
 srcpkgs/superd/template                       | 24 +++++++++
 2 files changed, 74 insertions(+)
 create mode 100644 srcpkgs/superd/patches/add-installmisc-target.patch
 create mode 100644 srcpkgs/superd/template

diff --git a/srcpkgs/superd/patches/add-installmisc-target.patch b/srcpkgs/superd/patches/add-installmisc-target.patch
new file mode 100644
index 000000000000..48fdf17e01e4
--- /dev/null
+++ b/srcpkgs/superd/patches/add-installmisc-target.patch
@@ -0,0 +1,50 @@
+From 0983f081efada98a6b61d70de10bbf01d5f430bd Mon Sep 17 00:00:00 2001
+From: Jami Kettunen <jamipkettunen@gmail.com>
+Date: Sun, 16 Oct 2022 20:51:39 +0300
+Subject: [PATCH] makefile: add installmisc target to install everything except
+ binaries
+
+The "install" target still behaves like before but now one can
+"make installmisc" to not install the binaries in case they're being
+handled (built and installed) outside the makefile in e.g. a
+distribution's package build environment.
+
+Link: https://lists.sr.ht/~craftyguy/superd/patches/36158
+---
+ Makefile | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0a7b0d2..8bd6946 100644
+--- a/Makefile
++++ b/Makefile
+@@ -58,12 +58,14 @@ doc: $(DOCS)
+ clean:
+ 	$(RM) $(DOCS) superd superctl
+ 
+-install: $(DOCS) superd superctl
++installbins: superd superctl
++	install -Dm755 superd -t $(DESTDIR)$(BINDIR)/
++	install -Dm755 superctl -t $(DESTDIR)$(BINDIR)/
++
++installmisc: $(DOCS)
+ 	mkdir -m755 -p \
+ 		$(DESTDIR)$(SYSCONFDIR)/superd/services \
+ 		$(DESTDIR)$(SHAREDIR)/superd/services
+-	install -Dm755 superd -t $(DESTDIR)$(BINDIR)/
+-	install -Dm755 superctl -t $(DESTDIR)$(BINDIR)/
+ 	install -Dm644 superd.1 -t $(DESTDIR)$(MANDIR)/man1/
+ 	install -Dm644 superd.service.5 -t $(DESTDIR)$(MANDIR)/man5/
+ 	install -Dm644 superctl.1 -t $(DESTDIR)$(MANDIR)/man1/
+@@ -72,6 +74,8 @@ install: $(DOCS) superd superctl
+ 	install -Dm644 completions/bash/superctl \
+ 		$(DESTDIR)$(SHAREDIR)/bash-completion/completions/superctl
+ 
++install: installbins installmisc
++
+ .PHONY: checkinstall
+ checkinstall:
+ 	$(DESTDIR)$(BINDIR)/superd -v
+-- 
+2.38.0
+
diff --git a/srcpkgs/superd/template b/srcpkgs/superd/template
new file mode 100644
index 000000000000..6c9c219fe6a7
--- /dev/null
+++ b/srcpkgs/superd/template
@@ -0,0 +1,24 @@
+# Template file for 'superd'
+pkgname=superd
+version=0.7
+revision=1
+build_style=go
+go_import_path="sr.ht/~craftyguy/superd"
+go_package="${go_import_path}/cmd/superd ${go_import_path}/cmd/superctl"
+go_ldflags="-X 'main.Version=${version}'"
+make_dirs="/etc/superd/services 0755 root root"
+hostmakedepends="scdoc"
+short_desc="Lightweight user service supervising daemon"
+maintainer="Jami Kettunen <jami.kettunen@protonmail.com>"
+license="GPL-3.0-or-later"
+homepage="https://sr.ht/~craftyguy/superd/"
+distfiles="https://git.sr.ht/~craftyguy/superd/archive/${version}.tar.gz"
+checksum=7563647dd5303752237e1b8453c770dd83c908a239da73f48b11e2151109586b
+
+do_check() {
+	go test ./...
+}
+
+post_install() {
+	make PREFIX=/usr DESTDIR=${DESTDIR} installmisc
+}

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

* Re: [PR PATCH] [Merged]: New package: superd-0.7
  2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
                   ` (5 preceding siblings ...)
  2022-10-16 19:17 ` [PR PATCH] [Updated] " JamiKettunen
@ 2022-10-16 20:27 ` paper42
  6 siblings, 0 replies; 8+ messages in thread
From: paper42 @ 2022-10-16 20:27 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

New package: superd-0.7
https://github.com/void-linux/void-packages/pull/39949

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

~~Since I had to add a `do_check()` myself it made me wonder if the go build-style should have a default of some kind. Thoughts?~~ As per conversation on `#xbps` IRC we should `: ${make_check_target:=./...}` and `go test -v ${make_check_target}`, but I'll reserve that for another PR and tweak all `build_style=go` packages as needed.

#### 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**|**NO**
-->

<!-- 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, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

end of thread, other threads:[~2022-10-16 20:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 11:55 [PR PATCH] New package: superd-0.7 JamiKettunen
2022-10-14 21:19 ` [PR REVIEW] " paper42
2022-10-14 22:11 ` [PR PATCH] [Updated] " JamiKettunen
2022-10-14 22:11 ` [PR REVIEW] " JamiKettunen
2022-10-14 22:27 ` JamiKettunen
2022-10-15  0:09 ` JamiKettunen
2022-10-16 19:17 ` [PR PATCH] [Updated] " JamiKettunen
2022-10-16 20:27 ` [PR PATCH] [Merged]: " paper42

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