Page MenuHomeFreeBSD

net-p2p/transmission: Reorganize as a metaport
ClosedPublic

Authored by mondo.debater_0q_icloud.com on Sep 25 2023, 4:18 PM.
Tags
None
Referenced Files
F82724838: D41975.diff
Thu, May 2, 12:40 AM
F82724124: D41975.id127791.diff
Thu, May 2, 12:35 AM
F82724119: D41975.id.diff
Thu, May 2, 12:35 AM
F82723408: D41975.diff
Thu, May 2, 12:21 AM
Unknown Object (File)
Sun, Apr 28, 10:19 AM
Unknown Object (File)
Sun, Apr 28, 3:56 AM
Unknown Object (File)
Sat, Apr 27, 11:00 AM
Unknown Object (File)
Fri, Apr 26, 1:50 AM

Details

Summary
Fixes: Bugs 273841, 274054
Port reorganized as a metaport. Each component can be installed
separately or selected as an option via the metaport.
See MOVED for additional information.

Also fixes log-level typo in rc file.
Test Plan

All flavors and options tested in 13.2amd64.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 53771
Build 50662: arc lint + arc unit

Event Timeline

So, initial thoughts on rework:

After carefully reading bsd.options.mk I came to following coclusions (but I may be wrong):

  1. OPTIONS_FILE being crafted from <category>/<portname>, which means we can't really define any options inside flavors, but in root of Makefile only (to prevent overwriting OPTIONS_FILE by different flavors.
  2. There are couple of options especially useful for slave ports (and I believe flavors): OPTIONS_EXCLUDE, OPTIONS_SLAVE.

Thus, I propose trying something like:

OPTIONS_DEFINE=DAEMON NLS UTILS ...

*_DEPENDS=<whatever needed by every component>

.if ${FLAVOR} == daemon
OPTIONS_SLAVE=DAEMON
OPTIONS_EXCLUDE=<whatever isn't applicable for daemon, GUI obviously>

<USE_RC_SUBR>, <CMAKE_*>, <*_DEPENDS>, <whatever else applicable for daemon>
.endif

.if ${FLAVOR} == <...>
.endif

Thus, we will achieve:

  1. Configuring and installing net-p2p/transmission will allow user to select any components combination needed.
  2. Installing net-p2p/transmission@<flavor> will allow modular installation.

So, just one port which covers everything without a need for separate metaport? I'm unsure where to put DOCS option though. It would be nice to install it with any of flavors, but there will be a conflict then...
Also, it seems reasonable to me install GUI not as bin/transmission-{gtk|qt}, but as bin/transmission (of course, then respective OPTION should be changed to RADIO and conflicts between default, gtk, and qt flavors should be registered.

So, initial thoughts on rework:

After carefully reading bsd.options.mk I came to following coclusions (but I may be wrong):

  1. OPTIONS_FILE being crafted from <category>/<portname>, which means we can't really define any options inside flavors, but in root of Makefile only (to prevent overwriting OPTIONS_FILE by different flavors.

Take a look at devel/git or mail/postfix which override OPTIONS_FILE to allow different options for flavors.

After carefully reading bsd.options.mk I came to following coclusions (but I may be wrong):

  1. OPTIONS_FILE being crafted from <category>/<portname>, which means we can't really define any options inside flavors, but in root of Makefile only [...]

I'm unsure where to put DOCS option though. It would be nice to install it with any of flavors, but there will be a conflict then...
Also, it seems reasonable to me install GUI not as bin/transmission-{gtk|qt}, but as bin/transmission (of course, then respective OPTION should be changed to RADIO and conflicts between default, gtk, and qt flavors should be registered.

Your suggestion would go back to the problem earlier versions of the 4.0 port had, which is that going from a full install to a partial install (or vice versa) would require a wholesale uninstall and reinstall, instead of merely adding or removing the selected components. While I initially disfavored a metaport, I do have to agree that this is a meaningful benefit.

It seems ridiculous for the docs to be a separate component package, which is why I stuck them in what I figured was the most likely used component.

Prior to the 4.0 update, the default install of the metaport installed all slave ports, including both GTK and QT. The updated port has aimed to preserve this setup.

Updating D41975: net-p2p/transmission: Reorganize as a metaport

  1. Added flavor-specific options files, fixed option descriptions.

So, initial thoughts on rework:

After carefully reading bsd.options.mk I came to following coclusions (but I may be wrong):

  1. OPTIONS_FILE being crafted from <category>/<portname>, which means we can't really define any options inside flavors, but in root of Makefile only (to prevent overwriting OPTIONS_FILE by different flavors.

Take a look at devel/git or mail/postfix which override OPTIONS_FILE to allow different options for flavors.

Could you please suggest Makefile line number for devel/git? I don't see that. But I actually see OPTIONS_EXCLUDE/OPTIONS_SLAVE, what was a proposal right after text cited by you.

Take a look at devel/git or mail/postfix which override OPTIONS_FILE to allow different options for flavors.

Could you please suggest Makefile line number for devel/git? I don't see that.

https://cgit.freebsd.org/ports/tree/devel/git/Makefile#n86

Could you please suggest Makefile line number for devel/git? I don't see that.

https://cgit.freebsd.org/ports/tree/devel/git/Makefile#n86

Thank you, I missed that somehow. Will take a deeper look bit later.

LGTM but for the two minor issues I noted.

Please also check if you can move the documentation to a separate flavor of net-p2p/transmission-components. It is currently not obvious which flavour installs the documentation.

UPDATING
13

The UPDATING file is primarily for people who build from source. So please mention the complete category/portname@flavor here. The package name alone may be sightly confusing.

net-p2p/transmission-components/Makefile
2โ€“3

PORTREVISION should be cleared when making a new port.

net-p2p/transmission-components/pkg-descr
1 โ†—(On Diff #127871)

Also consider using a separate pkg-descr for each flavour. You can use

DESCR= ${PKGDIR}/pkg-descr.${FLAVOR}

to have a separate pkg-descr for each one.

Updating D41975: net-p2p/transmission: Reorganize as a metaport

  1. -Added docs flavor -Revised per fuz

LGTM, will commit later today.

This revision is now accepted and ready to land.Sep 30 2023, 4:19 PM