Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] preload: generate manpage when not cross
@ 2023-05-23  7:51 RunningDroid
  2023-05-23 19:55 ` classabbyamp
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-23  7:51 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages fix_preload_manpage
https://github.com/void-linux/void-packages/pull/44038

preload: generate manpage when not cross
If `help2man` isn't available at build time then the contents of man8/preload.8 are 

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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/44038.patch is attached

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

From a0e6820b06bc029a9e07e4013da6d0d6094744b6 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Tue, 23 May 2023 03:15:55 -0400
Subject: [PATCH] preload: generate manpage when not cross

this also adds psmisc to checkdepends
(the test script uses killall to end the tests)
---
 srcpkgs/preload/template | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template
index 9623aed0e6eb..51c0f703fade 100644
--- a/srcpkgs/preload/template
+++ b/srcpkgs/preload/template
@@ -1,10 +1,11 @@
 # Template file for 'preload'
 pkgname=preload
 version=0.6.4
-revision=11
+revision=12
 build_style=gnu-configure
 hostmakedepends="pkg-config"
 makedepends="libglib-devel"
+checkdepends="psmisc"
 short_desc="Adaptive readahead daemon"
 maintainer="bougyman <bougyman@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -13,6 +14,10 @@ distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=d0a558e83cb29a51d9d96736ef39f4b4e55e43a589ad1aec594a048ca22f816b
 disable_parallel_build=yes
 
+if [ -z "$CROSS_BUILD" ]; then
+	hostmakedepends+=" help2man"
+fi
+
 conf_files="/etc/preload.conf"
 
 make_dirs="
@@ -23,5 +28,10 @@ post_install() {
 	rm -rf ${DESTDIR}/etc/logrotate.d
 	rm -rf ${DESTDIR}/etc/sysconfig
 	rm -rf ${DESTDIR}/var/log
+	if [ -n "$CROSS_BUILD" ]; then
+		# if help2man isn't available at build time this file contains
+		# "help2man is required to generate this file."
+		rm "${DESTDIR}/usr/share/man/man8/preload.8.gz"
+	fi
 	vsv preload
 }

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
@ 2023-05-23 19:55 ` classabbyamp
  2023-05-27 23:34 ` [PR PATCH] [Updated] " RunningDroid
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: classabbyamp @ 2023-05-23 19:55 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1560041944

Comment:
what's happening is help2man is trying to run the binary to get the help output to turn into a manpage. maybe there's a better way to get it to work, either through adding preload to hostmakedepends on cross or using the qemu build helper

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

* Re: [PR PATCH] [Updated] preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
  2023-05-23 19:55 ` classabbyamp
@ 2023-05-27 23:34 ` RunningDroid
  2023-05-27 23:38 ` RunningDroid
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-27 23:34 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages fix_preload_manpage
https://github.com/void-linux/void-packages/pull/44038

preload: generate manpage when not cross
If `help2man` isn't available at build time then the contents of man8/preload.8 are:

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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/44038.patch is attached

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

From f56a569a7a8a5483281453e30c52e9faad33211e Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Tue, 23 May 2023 03:15:55 -0400
Subject: [PATCH] preload: generate manpage

this also adds psmisc to checkdepends
(the test script uses killall to end the tests)
---
 srcpkgs/preload/template | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template
index 9623aed0e6eb..39bee6b37981 100644
--- a/srcpkgs/preload/template
+++ b/srcpkgs/preload/template
@@ -1,10 +1,11 @@
 # Template file for 'preload'
 pkgname=preload
 version=0.6.4
-revision=11
+revision=12
 build_style=gnu-configure
-hostmakedepends="pkg-config"
+hostmakedepends="pkg-config help2man"
 makedepends="libglib-devel"
+checkdepends="psmisc"
 short_desc="Adaptive readahead daemon"
 maintainer="bougyman <bougyman@voidlinux.org>"
 license="GPL-2.0-or-later"
@@ -13,11 +14,22 @@ distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.gz"
 checksum=d0a558e83cb29a51d9d96736ef39f4b4e55e43a589ad1aec594a048ca22f816b
 disable_parallel_build=yes
 
+if [ -n "$CROSS_BUILD" ]; then
+	hostmakedepends+=" preload"
+fi
+
 conf_files="/etc/preload.conf"
 
 make_dirs="
  /var/log/preload 0755 root root"
 
+post_patch() {
+	if [ -n "$CROSS_BUILD" ]; then
+		# run help2man against the system binary, not the one we're compiling
+		vsed -i 'src/Makefile.in' -e 's/\.\/preload/preload/'
+	fi
+}
+
 post_install() {
 	rm -rf ${DESTDIR}/etc/rc.d
 	rm -rf ${DESTDIR}/etc/logrotate.d

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
  2023-05-23 19:55 ` classabbyamp
  2023-05-27 23:34 ` [PR PATCH] [Updated] " RunningDroid
@ 2023-05-27 23:38 ` RunningDroid
  2023-05-27 23:41 ` RunningDroid
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-27 23:38 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1565740989

Comment:
Is a conditional `vsed` ok, or should I patch the Makefile to check for a system binary?

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (2 preceding siblings ...)
  2023-05-27 23:38 ` RunningDroid
@ 2023-05-27 23:41 ` RunningDroid
  2023-05-27 23:44 ` classabbyamp
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-27 23:41 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1565740989

Comment:
Is a conditional `vsed` ok, or should I patch the Makefile to check for a system binary?

Edit to add: I personally prefer adding preload to hostmakedepends on cross because using the qemu build helper seems like overkill

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (3 preceding siblings ...)
  2023-05-27 23:41 ` RunningDroid
@ 2023-05-27 23:44 ` classabbyamp
  2023-05-28  1:05 ` RunningDroid
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: classabbyamp @ 2023-05-27 23:44 UTC (permalink / raw)
  To: ml

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

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1565742731

Comment:
i think it would be better to add the qemu build helper and patch the makefile


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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (4 preceding siblings ...)
  2023-05-27 23:44 ` classabbyamp
@ 2023-05-28  1:05 ` RunningDroid
  2023-05-31  2:07 ` [PR PATCH] [Updated] " RunningDroid
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-28  1:05 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1565774011

Comment:
Ok I'll switch to that then, it might take me a bit though because I'm not familiar with makefile syntax 

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

* Re: [PR PATCH] [Updated] preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (5 preceding siblings ...)
  2023-05-28  1:05 ` RunningDroid
@ 2023-05-31  2:07 ` RunningDroid
  2023-05-31  2:08 ` RunningDroid
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:07 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages fix_preload_manpage
https://github.com/void-linux/void-packages/pull/44038

preload: generate manpage when not cross
If `help2man` isn't available at build time then the contents of man8/preload.8 are:

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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/44038.patch is attached

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

From e9a818c559fc1bd853d287f4852e2f9fe52beb37 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Tue, 23 May 2023 03:15:55 -0400
Subject: [PATCH] preload: generate manpage

this also adds psmisc to checkdepends
(the test script uses killall to end the tests)
---
 srcpkgs/preload/patches/qemu-help2man.patch | 29 +++++++++++++++++++++
 srcpkgs/preload/template                    |  6 +++--
 2 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/preload/patches/qemu-help2man.patch

diff --git a/srcpkgs/preload/patches/qemu-help2man.patch b/srcpkgs/preload/patches/qemu-help2man.patch
new file mode 100644
index 000000000000..35e91299ab6b
--- /dev/null
+++ b/srcpkgs/preload/patches/qemu-help2man.patch
@@ -0,0 +1,29 @@
+--- preload-0.6.4/src/Makefile.in	2009-04-15 17:49:28.000000000 -0400
++++ preload-0.6.4.new/src/Makefile.in	2023-05-30 22:04:40.778379947 -0400
+@@ -222,6 +222,12 @@
+ dist_man_MANS = preload.8
+ RUNPREQ = preload preload.conf.debug
+ RUNCMD = ./preload -c preload.conf.debug -s preload.state -d $(ARGS)
++preload_binary = `if [ -n "$$CROSS_BUILD" ]; then \
++				 	echo "qemu-$$CROSS_BUILD-static ./preload"; \
++				else \
++				 	echo './preload'; \
++				fi;`
++
+ all: all-am
+ 
+ .SUFFIXES:
+@@ -678,11 +684,10 @@
+ 	@$(top_builddir)/missing --run \
+ 	   help2man --no-info --section=8 --include=preload.8.i \
+ 	   	    --help-option="-H" --output="$@.tmp" \
+-		    --name 'Adaptive readahead daemon' ./preload \
++		    --name 'Adaptive readahead daemon' "$(preload_binary)" \
+ 	 && mv "$@.tmp" "$@" \
+ 	  || ($(RM) "$@"; \
+-	      echo Failed to update preload.8, the man page may be outdated >&2; \
+-	      (test -f "$@" || echo help2man is required to generate this file. >> "$@"));
++	      echo Failed to create preload.8 >&2);
+ 
+ install-data-hook:
+ 	@cd "$(DESTDIR)$(man8dir)" && gzip -c preload.8 > preload.8.gz.tmp && mv preload.8.gz.tmp preload.8.gz && $(RM) preload.8
diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template
index 9623aed0e6eb..2efe74d46b6c 100644
--- a/srcpkgs/preload/template
+++ b/srcpkgs/preload/template
@@ -1,10 +1,12 @@
 # Template file for 'preload'
 pkgname=preload
 version=0.6.4
-revision=11
+revision=12
 build_style=gnu-configure
-hostmakedepends="pkg-config"
+build_helper=qemu
+hostmakedepends="pkg-config help2man"
 makedepends="libglib-devel"
+checkdepends="psmisc"
 short_desc="Adaptive readahead daemon"
 maintainer="bougyman <bougyman@voidlinux.org>"
 license="GPL-2.0-or-later"

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

* Re: [PR PATCH] [Updated] preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (6 preceding siblings ...)
  2023-05-31  2:07 ` [PR PATCH] [Updated] " RunningDroid
@ 2023-05-31  2:08 ` RunningDroid
  2023-05-31  2:08 ` RunningDroid
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:08 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages fix_preload_manpage
https://github.com/void-linux/void-packages/pull/44038

preload: generate manpage when not cross
If `help2man` isn't available at build time then the contents of man8/preload.8 are:

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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/44038.patch is attached

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

From 3b635f200bfab442db73fda099a612c984ec9df2 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Tue, 23 May 2023 03:15:55 -0400
Subject: [PATCH] preload: generate manpage

this also adds psmisc to checkdepends
(the test script uses killall to end the tests)
---
 srcpkgs/preload/patches/qemu-help2man.patch | 29 +++++++++++++++++++++
 srcpkgs/preload/template                    |  6 +++--
 2 files changed, 33 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/preload/patches/qemu-help2man.patch

diff --git a/srcpkgs/preload/patches/qemu-help2man.patch b/srcpkgs/preload/patches/qemu-help2man.patch
new file mode 100644
index 000000000000..35e91299ab6b
--- /dev/null
+++ b/srcpkgs/preload/patches/qemu-help2man.patch
@@ -0,0 +1,29 @@
+--- preload-0.6.4/src/Makefile.in	2009-04-15 17:49:28.000000000 -0400
++++ preload-0.6.4.new/src/Makefile.in	2023-05-30 22:04:40.778379947 -0400
+@@ -222,6 +222,12 @@
+ dist_man_MANS = preload.8
+ RUNPREQ = preload preload.conf.debug
+ RUNCMD = ./preload -c preload.conf.debug -s preload.state -d $(ARGS)
++preload_binary = `if [ -n "$$CROSS_BUILD" ]; then \
++				 	echo "qemu-$$CROSS_BUILD-static ./preload"; \
++				else \
++				 	echo './preload'; \
++				fi;`
++
+ all: all-am
+ 
+ .SUFFIXES:
+@@ -678,11 +684,10 @@
+ 	@$(top_builddir)/missing --run \
+ 	   help2man --no-info --section=8 --include=preload.8.i \
+ 	   	    --help-option="-H" --output="$@.tmp" \
+-		    --name 'Adaptive readahead daemon' ./preload \
++		    --name 'Adaptive readahead daemon' "$(preload_binary)" \
+ 	 && mv "$@.tmp" "$@" \
+ 	  || ($(RM) "$@"; \
+-	      echo Failed to update preload.8, the man page may be outdated >&2; \
+-	      (test -f "$@" || echo help2man is required to generate this file. >> "$@"));
++	      echo Failed to create preload.8 >&2);
+ 
+ install-data-hook:
+ 	@cd "$(DESTDIR)$(man8dir)" && gzip -c preload.8 > preload.8.gz.tmp && mv preload.8.gz.tmp preload.8.gz && $(RM) preload.8
diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template
index 9623aed0e6eb..2efe74d46b6c 100644
--- a/srcpkgs/preload/template
+++ b/srcpkgs/preload/template
@@ -1,10 +1,12 @@
 # Template file for 'preload'
 pkgname=preload
 version=0.6.4
-revision=11
+revision=12
 build_style=gnu-configure
-hostmakedepends="pkg-config"
+build_helper=qemu
+hostmakedepends="pkg-config help2man"
 makedepends="libglib-devel"
+checkdepends="psmisc"
 short_desc="Adaptive readahead daemon"
 maintainer="bougyman <bougyman@voidlinux.org>"
 license="GPL-2.0-or-later"

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (7 preceding siblings ...)
  2023-05-31  2:08 ` RunningDroid
@ 2023-05-31  2:08 ` RunningDroid
  2023-05-31  2:18 ` RunningDroid
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:08 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1569388318

Comment:
I initially tried using Make's `ifdef` statement, but that kept getting fed to `sh` for some reason so I just put the logic in shell. I also patched out the part that puts "help2man is required to generate this file" in the manpage and replaced it with an error.

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (8 preceding siblings ...)
  2023-05-31  2:08 ` RunningDroid
@ 2023-05-31  2:18 ` RunningDroid
  2023-05-31  2:25 ` [PR PATCH] [Updated] " RunningDroid
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:18 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1569388318

Comment:
I initially tried using Make's `ifdef` statement, but that kept getting fed to `sh` for some reason so I just put the logic in shell. I also patched out the part that puts "help2man is required to generate this file" in the manpage and replaced it with an error.

edit: the build failure is because I tried to use `$CROSS_BUILD` to get the name of the right `qemu-*-static` binary without noticing that `$CROSS_BUILD` includes the -musl suffixes

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

* Re: [PR PATCH] [Updated] preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (9 preceding siblings ...)
  2023-05-31  2:18 ` RunningDroid
@ 2023-05-31  2:25 ` RunningDroid
  2023-05-31  2:26 ` RunningDroid
  2023-06-27  8:10 ` [PR PATCH] [Merged]: " classabbyamp
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:25 UTC (permalink / raw)
  To: ml

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

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

https://github.com/RunningDroid/void-packages fix_preload_manpage
https://github.com/void-linux/void-packages/pull/44038

preload: generate manpage when not cross
If `help2man` isn't available at build time then the contents of man8/preload.8 are:

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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/44038.patch is attached

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

From cab33cad3add53aac8748d04b8bd387fd96146f8 Mon Sep 17 00:00:00 2001
From: RunningDroid <runningdroid@zoho.com>
Date: Tue, 23 May 2023 03:15:55 -0400
Subject: [PATCH] preload: generate manpage

this also adds psmisc to checkdepends
(the test script uses killall to end the tests)
---
 srcpkgs/preload/patches/qemu-help2man.patch | 30 +++++++++++++++++++++
 srcpkgs/preload/template                    |  6 +++--
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/preload/patches/qemu-help2man.patch

diff --git a/srcpkgs/preload/patches/qemu-help2man.patch b/srcpkgs/preload/patches/qemu-help2man.patch
new file mode 100644
index 000000000000..c2fa7068bb2d
--- /dev/null
+++ b/srcpkgs/preload/patches/qemu-help2man.patch
@@ -0,0 +1,30 @@
+--- preload-0.6.4/src/Makefile.in	2009-04-15 17:49:28.000000000 -0400
++++ preload-0.6.4.new/src/Makefile.in	2023-05-30 22:23:16.820648202 -0400
+@@ -222,6 +222,12 @@
+ dist_man_MANS = preload.8
+ RUNPREQ = preload preload.conf.debug
+ RUNCMD = ./preload -c preload.conf.debug -s preload.state -d $(ARGS)
++preload_binary = `if [ -n "$$CROSS_BUILD" ]; then \
++				 	echo "qemu-$$XBPS_TARGET_QEMU_MACHINE-static ./preload"; \
++				else \
++				 	echo './preload'; \
++				fi;`
++
+ all: all-am
+ 
+ .SUFFIXES:
+@@ -678,11 +684,11 @@
+ 	@$(top_builddir)/missing --run \
+ 	   help2man --no-info --section=8 --include=preload.8.i \
+ 	   	    --help-option="-H" --output="$@.tmp" \
+-		    --name 'Adaptive readahead daemon' ./preload \
++		    --name 'Adaptive readahead daemon' "$(preload_binary)" \
+ 	 && mv "$@.tmp" "$@" \
+ 	  || ($(RM) "$@"; \
+-	      echo Failed to update preload.8, the man page may be outdated >&2; \
+-	      (test -f "$@" || echo help2man is required to generate this file. >> "$@"));
++	      echo Failed to create preload.8 >&2; \
++		  exit 1);
+ 
+ install-data-hook:
+ 	@cd "$(DESTDIR)$(man8dir)" && gzip -c preload.8 > preload.8.gz.tmp && mv preload.8.gz.tmp preload.8.gz && $(RM) preload.8
diff --git a/srcpkgs/preload/template b/srcpkgs/preload/template
index 9623aed0e6eb..2efe74d46b6c 100644
--- a/srcpkgs/preload/template
+++ b/srcpkgs/preload/template
@@ -1,10 +1,12 @@
 # Template file for 'preload'
 pkgname=preload
 version=0.6.4
-revision=11
+revision=12
 build_style=gnu-configure
-hostmakedepends="pkg-config"
+build_helper=qemu
+hostmakedepends="pkg-config help2man"
 makedepends="libglib-devel"
+checkdepends="psmisc"
 short_desc="Adaptive readahead daemon"
 maintainer="bougyman <bougyman@voidlinux.org>"
 license="GPL-2.0-or-later"

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

* Re: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (10 preceding siblings ...)
  2023-05-31  2:25 ` [PR PATCH] [Updated] " RunningDroid
@ 2023-05-31  2:26 ` RunningDroid
  2023-06-27  8:10 ` [PR PATCH] [Merged]: " classabbyamp
  12 siblings, 0 replies; 14+ messages in thread
From: RunningDroid @ 2023-05-31  2:26 UTC (permalink / raw)
  To: ml

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

New comment by RunningDroid on void-packages repository

https://github.com/void-linux/void-packages/pull/44038#issuecomment-1569388318

Comment:
I initially tried using Make's `ifdef` statement, but that kept getting fed to `sh` for some reason so I just put the logic in shell. I also patched out the part that puts "help2man is required to generate this file" in the manpage and replaced it with an error.

edit: the build failure was because I tried to use `$CROSS_BUILD` to get the name of the right `qemu-*-static` binary without noticing that `$CROSS_BUILD` includes the -musl suffixes

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

* Re: [PR PATCH] [Merged]: preload: generate manpage when not cross
  2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
                   ` (11 preceding siblings ...)
  2023-05-31  2:26 ` RunningDroid
@ 2023-06-27  8:10 ` classabbyamp
  12 siblings, 0 replies; 14+ messages in thread
From: classabbyamp @ 2023-06-27  8:10 UTC (permalink / raw)
  To: ml

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

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

preload: generate manpage when not cross
https://github.com/void-linux/void-packages/pull/44038

Description:
If `help2man` isn't available at build time then the contents of man8/preload.8 are:

> help2man is required to generate this file.

 Apparently `makewhatis` has to run after the new file is installed so `man` knows to run the file through the formatter but I'd rather not add a post-install script.

This also adds psmisc to checkdepends because the test script uses `( sleep 1; killall ./preload 2>/dev/null ) &` to ensure the test ends.

<!-- 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**|**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] 14+ messages in thread

end of thread, other threads:[~2023-06-27  8:10 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23  7:51 [PR PATCH] preload: generate manpage when not cross RunningDroid
2023-05-23 19:55 ` classabbyamp
2023-05-27 23:34 ` [PR PATCH] [Updated] " RunningDroid
2023-05-27 23:38 ` RunningDroid
2023-05-27 23:41 ` RunningDroid
2023-05-27 23:44 ` classabbyamp
2023-05-28  1:05 ` RunningDroid
2023-05-31  2:07 ` [PR PATCH] [Updated] " RunningDroid
2023-05-31  2:08 ` RunningDroid
2023-05-31  2:08 ` RunningDroid
2023-05-31  2:18 ` RunningDroid
2023-05-31  2:25 ` [PR PATCH] [Updated] " RunningDroid
2023-05-31  2:26 ` RunningDroid
2023-06-27  8:10 ` [PR PATCH] [Merged]: " classabbyamp

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