Bug 272727 - net/boinc-client: configure alternate platform according to ${ARCH}
Summary: net/boinc-client: configure alternate platform according to ${ARCH}
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://boinc.berkeley.edu/trac/wiki/...
Keywords: easy, feature
Depends on:
Blocks:
 
Reported: 2023-07-26 00:54 UTC by Älven
Modified: 2025-01-31 23:57 UTC (History)
3 users (show)

See Also:
alster: maintainer-feedback-


Attachments
Trivial patch (1.06 KB, patch)
2023-07-26 00:54 UTC, Älven
no flags Details | Diff
[PATCH] net/boinc-client: Change alternate platform to x86_64-pc-linux-gnu (952 bytes, patch)
2023-08-05 10:12 UTC, Älven
no flags Details | Diff
[PATCH] net/boinc-client: Change alternate platform to x86_64-pc-linux-gnu (1.11 KB, patch)
2023-08-05 12:52 UTC, Älven
no flags Details | Diff
[PATCH] net/boinc-client: configure alternate platform according to ${ARCH} (1.78 KB, patch)
2024-06-09 08:36 UTC, Älven
no flags Details | Diff
[PATCH] net/boinc-client: configure alternate platform according to ${ARCH} (2.29 KB, patch)
2025-01-28 21:16 UTC, Älven
alster: maintainer-approval+
Details | Diff
v1 (5.56 KB, patch)
2025-01-29 22:13 UTC, Vladimir Druzenko
no flags Details | Diff
[PATCH] [FOLLOW-UP] net/boinc-client: improve port (1.10 KB, patch)
2025-01-31 23:28 UTC, Älven
alster: maintainer-approval? (ler)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Älven 2023-07-26 00:54:03 UTC
Created attachment 243618 [details]
Trivial patch

As most computers with BOINC clients are running on x86_64 nowadays
Comment 1 Älven 2023-07-26 01:49:14 UTC
We also could have it with both platforms enabled:

For example, on a x86_64 linux system that supports both 64-bit and 32-bit executables, you might specify --with-boinc-platform=x86_64-pc-linux-gnu and --with-boinc-alt-platform=i686-pc-linux-gnu.

Just not sure whether it could be of any use, as even if some BOINC projects still have 32-bit executables, they are very likely to have 64-bit ones too, which perform better. And whether Linuxulator subsystem would be able to run 32 bit Linux executables?

What else could we do with it: some kind of platform autodetection? Or manual selection via Makefile flags? This patch is just a simplest working solution, but what could the best one look like?
Comment 2 Älven 2023-08-05 10:12:51 UTC
Created attachment 243858 [details]
[PATCH] net/boinc-client: Change alternate platform to x86_64-pc-linux-gnu
Comment 3 Älven 2023-08-05 12:52:11 UTC
Created attachment 243865 [details]
[PATCH] net/boinc-client: Change alternate platform to x86_64-pc-linux-gnu
Comment 4 Älven 2023-10-31 21:22:11 UTC
Comment on attachment 243865 [details]
[PATCH] net/boinc-client: Change alternate platform to x86_64-pc-linux-gnu

Maintainer timeout
Comment 5 Älven 2024-06-05 16:40:38 UTC
Fixed with commit for bug #252273.
Comment 6 Älven 2024-06-09 08:30:55 UTC
I have a simple patch for this now.
Comment 7 Älven 2024-06-09 08:36:56 UTC
Created attachment 251307 [details]
[PATCH] net/boinc-client: configure alternate platform according to ${ARCH}
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-27 23:40:52 UTC
Maintainer timeout > 18 months.

Is port support other arch(7)-es: armv7, armv6, powerpcspe, powerpc64le, riscv64?
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-27 23:55:23 UTC
FreeBSD ports support Linux only on amd64, i386 and aarch64 for rl9 (Rocky Linux 9) and on amd64 and i386 for c7 (CentOS 7).
Check Mk/Uses/linux.mk.

-OPTIONS_DEFINE=         CLIENT LINUX MANAGER NLS SKINS USER X11
+OPTIONS_DEFINE=         CLIENT MANAGER NLS SKINS USER X11
+OPTIONS_DEFINE_amd64=   LINUX
+OPTIONS_DEFINE_aarch64= LINUX
+OPTIONS_DEFINE_i386=    LINUX

+# https://boinc.berkeley.edu/trac/wiki/BoincPlatforms
+.if ${ARCH} == "amd64"
+BOINC_ALT_PLATFORM=	x86_64-pc-linux-gnu
+.elif ${ARCH} == "aarch64"
+BOINC_ALT_PLATFORM=	aarch64-unknown-linux-gnu
+.elif ${ARCH} == "i386"
+BOINC_ALT_PLATFORM=	i686-pc-linux-gnu
+.endif
Comment 10 Älven 2025-01-28 21:16:21 UTC
Created attachment 257076 [details]
[PATCH] net/boinc-client: configure alternate platform according to ${ARCH}

(In reply to Vladimir Druzenko from comment #9)

Thank you for the idea: I improved it even more :)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-29 16:40:52 UTC
Options in the port is "very broken" - fixing and testing are in progress…
Comment 12 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-29 22:13:51 UTC
Created attachment 257103 [details]
v1

Improve port:
- fix options - dependencies, plist, configure options;
- fix check for symlinks in pkg-deinstall;
- fix warnings from portclippy;
- configure alternate platform according to ${ARCH} for option LINUX.

Can you test this patch?
Comment 13 commit-hook freebsd_committer freebsd_triage 2025-01-31 23:03:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=209307e6d5bc4b3a48a5e7d7447378f2fa786aec

commit 209307e6d5bc4b3a48a5e7d7447378f2fa786aec
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-01-31 22:56:46 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-31 23:02:45 +0000

    net/boinc-client: configure alternate platform according to ${ARCH}, fix options

    Improve port:
    - fix options - dependencies, plist, configure options;
    - fix check for symlinks in pkg-deinstall;
    - fix warnings from portclippy;
    - configure alternate platform according to ${ARCH} for option LINUX
    (patch from Älven <alster@vinterdalen.se>).

    PR:             272727
    Approved by:    ler (maintainer, timeout > 7 months)

 net/boinc-client/Makefile               | 58 ++++++++++++++++++---------------
 net/boinc-client/files/pkg-deinstall.in | 12 ++++---
 net/boinc-client/pkg-plist              |  6 ++--
 3 files changed, 43 insertions(+), 33 deletions(-)
Comment 14 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-31 23:05:46 UTC
Thanks.
Comment 15 Älven 2025-01-31 23:28:26 UTC
Created attachment 257157 [details]
[PATCH] [FOLLOW-UP] net/boinc-client: improve port
Comment 16 Älven 2025-01-31 23:28:43 UTC
(In reply to Vladimir Druzenko from comment #14)

Thank you too. Sorry for being too late: you was so fast to commit it :)
I've just successfully tested it on my local BOINC instance, all works well.

And just this small follow-up, please, removing unnecessary dos2unix and tar from USES.
Comment 17 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-31 23:37:23 UTC
(In reply to Älven from comment #16)
> removing unnecessary dos2unix
Why unnecessary?
I see:
DOS2UNIX_GLOB=  *.xpm
Comment 18 Älven 2025-01-31 23:40:54 UTC
Yes, it is written, but no actual XPM files do have DOS-encoding in current versions of BOINC. It may be actual some time in the past. You may check it yourself, if you like or just need to.
Comment 19 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-31 23:41:30 UTC
All files *.xpm already have UNIX "End Of Lines"?
Comment 20 Vladimir Druzenko freebsd_committer freebsd_triage 2025-01-31 23:45:44 UTC
(In reply to Älven from comment #16)
Something else? Before I commit this change. :-)
Comment 21 Älven 2025-01-31 23:54:36 UTC
(In reply to Vladimir Druzenko from comment #20)
> Something else? Before I commit this change. :-)

Thank you. Looks like you are kind and not angry on me :-)
Nothing I could remember for now.

P.S. I've run 
% find . -not -type d -exec file "{}" ";" | grep CRLF
on extracted tarball of the port, and no XPM file was found.
Some files which still did were lot of *.vcxproj XMLs from "win_build" folder and alike and some *.bat files. None of this seems to be relevant to non-windows builds, I think.
Comment 22 Älven 2025-01-31 23:57:36 UTC
P.P.S. I really opened several (not all) of these XPMs with my GNU/EMACS.
Mode line clearly showed common "-UU-:@---", so UNIX. For *.bat files it showed
"-UU-(DOS)@---".