Wednesday, May 26, 2021

Re: HylaFax Port - Broken since OpenBSD 5.7

On 23/05/2021 11:52 pm, Greg Steuck wrote:
> Larry Moore <lmoore@starwon.com.au> writes:
>
>> I've installed release of 6.9 and the problem still exists.
>>
>> I've attached a patch created on OpenBSD 6.9 which appears to overcome
>> the high CPU utilisation, also included is a change which configures
>> HylaFAX to use ASCII lock files, seeing as this is what OpenBSD uses.
> Thank you Larry for sending the patch. I changed it into a patch below
> applicable to the ports tree. I only tested that this builds as I don't
> run hylafax.
>
> Anybody can test this or we go with Larry's verification?
>
> OK?
>
> From d283f25d7843c8a50faabfd4b44b553e28ef2e39 Mon Sep 17 00:00:00 2001
> From: Greg Steuck <greg@nest.cx>
> Date: Sun, 23 May 2021 08:45:58 -0700
> Subject: [PATCH] comms/hylafax: avoid CPU spinning (wrong fifo mode)
>
> Patch from Larry Moore lmoore at starwon dot com dot au
> ---
> comms/hylafax/Makefile | 2 +-
> comms/hylafax/patches/patch-configure | 27 ++++++++++++++++++++++++---
> 2 files changed, 25 insertions(+), 4 deletions(-)
>
> diff --git a/comms/hylafax/Makefile b/comms/hylafax/Makefile
> index 1c0f40dfe8b..a6569328459 100644
> --- a/comms/hylafax/Makefile
> +++ b/comms/hylafax/Makefile
> @@ -2,7 +2,7 @@
>
> COMMENT= send/receive faxes and share modems
> DISTNAME= hylafax-6.0.6
> -REVISION= 14
> +REVISION= 15
> CATEGORIES= comms
>
> HOMEPAGE= https://www.HylaFAX.org/
> diff --git a/comms/hylafax/patches/patch-configure b/comms/hylafax/patches/patch-configure
> index acd5e9ae620..1499a9a423d 100644
> --- a/comms/hylafax/patches/patch-configure
> +++ b/comms/hylafax/patches/patch-configure
> @@ -45,7 +45,20 @@ Index: configure
> }
>
> if [ "$SGI2FAX" = auto ]; then
> -@@ -2563,12 +2562,11 @@ EOF
> +@@ -1959,6 +1958,12 @@ EmitConfigurationDefinitions()
> + CONFIG_OPENFIFO=O_RDONLY;
> + fi
> + ;;
> ++ *-openbsd*) if releaseAtLeast 5.7; then
> ++ CONFIG_OPENFIFO=O_RDWR;
> ++ else
> ++ CONFIG_OPENFIFO=O_RDONLY;
> ++ fi
> ++ ;;
> + *sysv4.2uw2.1.3) CONFIG_OPENFIFO=O_RDWR;; # UnixWare 2.1.3
> + *-sysv5UnixWare*) CONFIG_OPENFIFO=O_RDWR;; # UnixWare 7
> + *-sysv5OpenUNIX*) CONFIG_OPENFIFO=O_RDWR;; # OpenUNIX 8
> +@@ -2563,12 +2568,11 @@ EOF
> tiff_offset_t="uint32"
> tiff_bytecount_t="uint32"
> ;;
> @@ -59,7 +72,7 @@ Index: configure
> ;;
> esac
> fi
> -@@ -3405,19 +3403,8 @@ fi
> +@@ -3405,19 +3409,8 @@ fi
> HAVE_JBIGTIFF="/*#define HAVE_JBIGTIFF 1*/"
> if [ "$DISABLE_JBIG" != "yes" ]; then
> Note "Checking JBIG-in-TIFF conversion support."
> @@ -81,7 +94,15 @@ Index: configure
> fi
>
> Note "Done checking TIFF support."
> -@@ -4681,10 +4668,10 @@ case $MANSCHEME in
> +@@ -3957,6 +3950,7 @@ if [ "$LOCKS" = auto ]; then
> + *-solaris*) LOCKS="+ascii";;
> + *-freebsd*) LOCKS=ascii;;
> + *-netbsd*) LOCKS=ascii;;
> ++ *-openbsd*) LOCKS=ascii;;
> + *bsd*) LOCKS=binary;;
> + *) LOCKS=ascii;;
> + esac
> +@@ -4681,10 +4675,10 @@ case $MANSCHEME in
> *-0|*-0.gz|*-0.Z|*-gz|*-Z|*-z)
> suf=`echo $MANSCHEME | $SED 's/.*-/./'`
> A='`echo $$i | sed' B='`' # workaround shell bugs

I'll test it over the weekend.

Regards,

Larry.

No comments:

Post a Comment