Page MenuHomeFreeBSD

Subpackages!
ClosedPublic

Authored by pizzamig on Jun 14 2023, 8:24 PM.
Tags
None
Referenced Files
F102044214: D40549.diff
Wed, Nov 6, 10:07 PM
Unknown Object (File)
Tue, Nov 5, 2:03 PM
Unknown Object (File)
Wed, Oct 23, 3:29 PM
Unknown Object (File)
Mon, Oct 21, 2:19 PM
Unknown Object (File)
Fri, Oct 18, 9:09 AM
Unknown Object (File)
Fri, Oct 18, 9:05 AM
Unknown Object (File)
Fri, Oct 18, 7:24 AM
Unknown Object (File)
Wed, Oct 16, 7:26 PM

Details

Reviewers
rene
Group Reviewers
portmgr
Commits
R11:47564762a319: component: add SUBPACKAGES
Summary

Initial implementation of subpackages.

Based on previous mat's implementation: https://reviews.freebsd.org/D16457
To add subpackages to a port, define:

SUBPACKAGES=  foo bar

and in the plist, prefix files to put in a subpackage with @@foo@@.

For each subpackage, some variables can be set, if needed.

  • DESCR.<subpkg> defaults to the pkg-descr if pkg-descr.<subpkg> does not exist (with a warning)
  • COMMENT.<subpkg> defaults to ${COMMENT} (subpkg: <subpkg>)
  • All the PKGMESSAGE/PKGINSTALL/... variable have .<subpkg> version, pointing to pkg-message.<subpkg>/pkg-install.<subpkg> files.
  • A few options helpers <opt>_SUBPACKAGES and <opt>_*_DEPENDS.<subpkg> can be used.
  • PLIST_FILES.<subpkg> and PLIST_DIRS.subpkg were added too.

Subpackages can depend on each other, a new variable has been introduced, SELF_DEPENDS, and a special subpackage name has been introduced to refer to the main package. For example:

If the foo subpackage depends on the main subpackage:

SUBPACKAGES=  foo
SELF_DEPENDS.foo= main

If the main package depends on the tools subpackage:

SUBPACKAGE=   tools
SELF_DEPENDS=  tools

An OPTIONcan define a SUBPACKAGEwith

<OPT>_SUBPACKAGES=  subpkg

Licenses are currently propagated on every subpackage. Open to suggestions.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 54908
Build 51797: arc lint + arc unit

Event Timeline

pizzamig edited the summary of this revision. (Show Details)
This comment was removed by pizzamig.
This comment was removed by pizzamig.
  • Fix dependencies in sub-packages
rene added a subscriber: rene.

Rubberstamping this one and D40550 as discussed during the last portmgr meeting.

This revision is now accepted and ready to land.Jun 25 2023, 1:35 PM
  • Initial import of the subpackage framework
  • Fix [build|run]-depends-list targets
  • Fix type in PKGFILE
  • Fix METADIR
  • Fix type in RE
  • Fix PLIST
  • Fix _PKGDIR initialization
  • Fix typo
  • Fix the case when there are no subpackages
  • Fix _PLIST
  • Simplify METADIR as in the original patch
  • Fix _strip_perms
  • More fixes
  • Fix package creation
  • Add SUBPACKES to the list of OPTIONS_HELPERS
  • Make DESCR.subpkg warning message shorter
  • Fix PLIST_FILES.subpkg
  • Implement LICENSE support
  • Fix dependencies in sub-packages
  • Fix actual-package-depends target
  • Add PKGBASE.subpkg variable
  • Make do-depends aware of the subpackages
  • do-depends.sh: fix a typo
This revision now requires review to proceed.Jun 29 2023, 8:38 PM
  • Add annotation to packages about being a subpkg
  • Remove a weird copy&pasta leftover
  • Initial import of the subpackage framework
  • Fix [build|run]-depends-list targets
  • Fix type in PKGFILE
  • Fix METADIR
  • Fix type in RE
  • Fix PLIST
  • Fix _PKGDIR initialization
  • Fix typo
  • Fix the case when there are no subpackages
  • Fix _PLIST
  • Simplify METADIR as in the original patch
  • Fix _strip_perms
  • More fixes
  • Fix package creation
  • Add SUBPACKES to the list of OPTIONS_HELPERS
  • Make DESCR.subpkg warning message shorter
  • Fix PLIST_FILES.subpkg
  • Implement LICENSE support
  • Fix dependencies in sub-packages
  • Fix actual-package-depends target
  • Add PKGBASE.subpkg variable
  • Make do-depends aware of the subpackages
  • do-depends.sh: fix a typo
  • Add annotation to packages about being a subpkg
  • Remove a weird copy&pasta leftover
  • Fix subpackages in some dependency list
tcberner added inline comments.
Mk/bsd.licenses.mk
813

^missed a ${LICENSE_DIR.${sp} here on line 813, I think

  • Fix users of _LICENSE_DIR
This revision was not accepted when it landed; it landed in state Needs Review.Jan 1 2024, 9:59 PM
This revision was automatically updated to reflect the committed changes.