Bug 275735 - Introduce SUBPACKAGE support in the framework
Summary: Introduce SUBPACKAGE support in the framework
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL: https://reviews.freebsd.org/D40549
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 22:57 UTC by Luca Pizzamiglio
Modified: 2024-01-01 22:08 UTC (History)
3 users (show)

See Also:
antoine: exp-run+


Attachments
Patch (28.96 KB, patch)
2023-12-12 22:57 UTC, Luca Pizzamiglio
no flags Details | Diff
Patch with fix (29.04 KB, patch)
2023-12-20 18:33 UTC, Luca Pizzamiglio
no flags Details | Diff
New patch with a fix (28.98 KB, patch)
2023-12-27 13:08 UTC, Luca Pizzamiglio
pizzamig: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Pizzamiglio freebsd_committer freebsd_triage 2023-12-12 22:57:40 UTC
Created attachment 247015 [details]
Patch

The attached patch is going to introduce the support for SUBPACKAGES.

We need to run an EXP-RUN to ensure we are not introducing any regressions.
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2023-12-20 09:48:10 UTC
@antoine, could you manually change line 813 of Mk/bsd.license.mk

to read

@${INSTALL_DATA} ${_LICENSE_FILE_${lic}} ${STAGEDIR}${_LICENSE_DIR.${sp}}/${lic}

i.e. replace the ${_LICENSE_DIR} there with ${_LICENSE_DIR.${sp}} and rerun it?


mfg Tobias
Comment 3 Luca Pizzamiglio freebsd_committer freebsd_triage 2023-12-20 18:33:44 UTC
Created attachment 247172 [details]
Patch with fix
Comment 4 Luca Pizzamiglio freebsd_committer freebsd_triage 2023-12-20 18:34:16 UTC
Uploaded the patch with the fix suggested by Tobias
Comment 6 Luca Pizzamiglio freebsd_committer freebsd_triage 2023-12-27 13:08:36 UTC
Created attachment 247292 [details]
New patch with a fix

This patch contains a fix for the direct users of _LICENSE_DIR variable.
Comment 7 Antoine Brodin freebsd_committer freebsd_triage 2023-12-31 08:27:07 UTC
Exp-run seems fine
Comment 8 Tobias C. Berner freebsd_committer freebsd_triage 2023-12-31 21:40:29 UTC
(In reply to Antoine Brodin from comment #7)

\o/ *party time*
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-01-01 21:59:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=47564762a319a037686c921accbb831db779715c

commit 47564762a319a037686c921accbb831db779715c
Author:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
AuthorDate: 2024-01-01 21:53:32 +0000
Commit:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
CommitDate: 2024-01-01 21:58:53 +0000

    component: add SUBPACKAGES

    This commit add SUBPACKAGES support to the framework.

    Fix users of _LICENSE_DIR
    Fix multi/dual license
    Add annotation to packages about being a subpkg
    Make do-depends aware of the subpackages
    Add PKGBASE.subpkg variable
    Fix actual-package-depends target
    Fix dependencies in sub-packages
    Implement LICENSE support
    Fix PLIST_FILES.subpkg
    Make DESCR.subpkg warning message shorter
    Add SUBPACKES to the list of OPTIONS_HELPERS
    Fix _strip_perms
    Simplify METADIR as in the original patch
    Fix _PLIST
    Fix the case when there are no subpackages
    Fix typo
    Fix _PKGDIR initialization
    Fix PLIST
    Fix typo in RE
    Fix METADIR
    Fix type in PKGFILE
    Fix [build|run]-depends-list targets
    Initial import of the subpackage framework
    This import is based on https://reviews.freebsd.org/D16457

    PR:             275735
    Differential Revision:  https://reviews.freebsd.org/D40549

 Mk/Scripts/depends-list.sh |   6 +
 Mk/Scripts/do-depends.sh   |  23 +++-
 Mk/Scripts/functions.sh    |   3 +-
 Mk/bsd.licenses.mk         |  68 ++++++----
 Mk/bsd.options.mk          |  27 +++-
 Mk/bsd.port.mk             | 310 +++++++++++++++++++++++++++++++--------------
 6 files changed, 313 insertions(+), 124 deletions(-)
Comment 10 Luca Pizzamiglio freebsd_committer freebsd_triage 2024-01-01 22:08:00 UTC
Antoine: thanks for running this exp-run, as it identified a couple of regressions with the license framework.

I'm closing this ticket, as this patch has finally landed.