Bug 281706 - devel/distcc: Fix various bugs
Summary: devel/distcc: Fix various bugs
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-25 08:59 UTC by Laurent Chardon
Modified: 2024-10-06 13:49 UTC (History)
1 user (show)

See Also:
laurent.chardon: maintainer-feedback+


Attachments
distcc formatpatch 1 (11.46 KB, patch)
2024-09-25 08:59 UTC, Laurent Chardon
laurent.chardon: maintainer-approval+
Details | Diff
distcc formatpatch 2 (14.75 KB, patch)
2024-10-03 10:12 UTC, Laurent Chardon
laurent.chardon: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Chardon 2024-09-25 08:59:02 UTC
Created attachment 253808 [details]
distcc formatpatch 1

- Improve default options
- Fix GUI option not working
- Fix service not starting
- Update available compilers masquerade
- Create proper pkg-plist
- Take maintainership

portlint: OK
poudriere: OK
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2024-09-27 12:20:49 UTC
Thank you for this great patch and for volunteering to maintain the port.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2024-09-27 12:32:28 UTC
Here are some blockers:

 - the GTK option should be turned into a flavor, so binary package users can 
   install both packages.  If you make it a flavour, consider making AVAHI a
   default option when that flavour is selected as GUI users usually have the
   library installed.
 - please define LICENSE and if possible LICENSE_FILE
 - as the port writes into PY_SITELIBDIR, it needs to have PY_FLAVOR applied in
   addition to the GTK flavour (cf. § 6.18 Porter's Handbook).  This may require
   some manual massaging to get the setup right.  Alternatively, maybe you could
   move the PUMP bits to a separate port?
 - the whole _*_FILES block seems useless now that you have fixed the plist.
   Maybe you could get rid of it?

Please address these issues and resubmit the patch.
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2024-09-27 12:36:22 UTC
Also note that the port currently does not build if option PUMP is disabled, as it tries to unconditionally access PYTHON_PKGNAMEPREFIX for BUILD_DEPENDS, when USES=python is only present when building with option PUMP enabled.  Likely you want to move that dependency to the PUMP_BUILD_DEPENDS.

But honestly, it'll likely be better to just move the PUMP bits to a separate port for PY_FLAVOR reasons.
Comment 4 Laurent Chardon 2024-09-27 12:45:12 UTC
Thanks for the feedback.

I agree with the gtk flavor for sure, I was already looking into that for a future release. Same thing for the _*_FILES variables used in the Makefile.

I thought I had tested without the PUMP option, but I'll test again. I'll think a bit more about what to do with that option. Right now I'm inclined to remove the option and make it part of the default port, because I don't see a reason not to have it present. It doesn't hurt to have it, even if you're not using it.

I didn't notice the missing LICENSE, and neither did portlint. Good catch!
Comment 5 Laurent Chardon 2024-09-27 12:47:57 UTC
(In reply to Laurent Chardon from comment #4)

Actually, LICENSE and LICENSE_FILE are there.
Comment 6 Laurent Chardon 2024-09-27 12:50:43 UTC
I've never submitted a flavor before. Do I submit the flavor in a separate PR?
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2024-09-27 13:04:45 UTC
(In reply to Laurent Chardon from comment #6)

Flavors are done by setting some variables in the Makefile (see § 7 Porter's Handbook).  No need for a separate PR, just put it in this one.

I'm not sure why, but the ports framework complained that LICENSE is not set.  But it clearly is, so not sure why.
Comment 8 Laurent Chardon 2024-09-29 15:59:10 UTC
(In reply to Robert Clausecker from comment #7)

Sorry, I meant a slave port, if I go this way with pump. Do I submit it separately?
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2024-09-29 16:01:26 UTC
(In reply to Laurent Chardon from comment #8)

Just add it to this PR.  The two ports probably need to be committed together anyway.
Comment 10 Laurent Chardon 2024-10-03 10:12:45 UTC
Created attachment 253977 [details]
distcc formatpatch 2


- gtk is now a flavor
- pump mode package name protected by pyXY- prefix when non-default version of python is used (as done by devel/gdb, devel/meson and others)
- PUMP option protected correctly in pkg-plist

I didn't put pump in a separate package because there is no good way to only generate the pump portion of distcc without regenerating the rest. Also, generating pump is the default upstream, it's not generating it that's optional. So having pump being part of the main package makes more sense.
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2024-10-03 15:14:04 UTC
Looking good here!
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-10-06 11:50:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35db578d625710b24f9746b86d5197ec96713faa

commit 35db578d625710b24f9746b86d5197ec96713faa
Author:     Laurent Chardon <laurent.chardon@gmail.com>
AuthorDate: 2024-09-20 02:27:01 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2024-10-06 11:49:18 +0000

    devel/distcc: Patch small bugs

    - Fix GUI option not working and made it a flavor
    - Fix service not starting
    - Improve default options
    - Update available compilers masquerade
    - Create proper pkg-plist
    - Use pyXY- pkg prefix when pump mode is compiled with non-default python version
    - Take maintainership

    PR:             281706

 devel/distcc/Makefile                       | 119 +++++++++-------------------
 devel/distcc/files/patch-Makefile.in        |   6 +-
 devel/distcc/files/patch-src_daemon.c (new) |  11 +++
 devel/distcc/pkg-descr                      |   5 +-
 devel/distcc/pkg-descr.gtk (new)            |  19 +++++
 devel/distcc/pkg-plist (new)                | 105 ++++++++++++++++++++++++
 6 files changed, 179 insertions(+), 86 deletions(-)
Comment 13 Robert Clausecker freebsd_committer freebsd_triage 2024-10-06 11:51:40 UTC
Thank you for your contribution.
Comment 14 Laurent Chardon 2024-10-06 13:49:07 UTC
Thank you for the commit!