Page MenuHomeFreeBSD

Subpackages!
ClosedPublic

Authored by pizzamig on Jun 14 2023, 8:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 3:18 PM
Unknown Object (File)
Sun, Nov 24, 4:16 PM
Unknown Object (File)
Sat, Nov 23, 1:58 PM
Unknown Object (File)
Sat, Nov 23, 11:02 AM
Unknown Object (File)
Fri, Nov 22, 12:51 PM
Unknown Object (File)
Thu, Nov 21, 4:41 PM
Unknown Object (File)
Wed, Nov 20, 8:01 PM
Unknown Object (File)
Tue, Nov 19, 10:35 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
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 52062
Build 48953: 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–814

^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.