Github messages for voidlinux
 help / color / mirror / Atom feed
From: RunningDroid <RunningDroid@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] preload: generate manpage when not cross
Date: Wed, 31 May 2023 04:07:50 +0200	[thread overview]
Message-ID: <20230531020750.oqkuDD-CCKtGZ_bcTHVwYp23-YwVpKQ9s0YYY4uaZmU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44038@inbox.vuxu.org>

[-- 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"

  parent reply	other threads:[~2023-05-31  2:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23  7:51 [PR PATCH] " 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 ` RunningDroid [this message]
2023-05-31  2:08 ` [PR PATCH] [Updated] " 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

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=20230531020750.oqkuDD-CCKtGZ_bcTHVwYp23-YwVpKQ9s0YYY4uaZmU@z \
    --to=runningdroid@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).