Bug 262600 - [PATCH] Incorrect major-only revision used in pkg build target triple, xdev symlink names
Summary: [PATCH] Incorrect major-only revision used in pkg build target triple, xdev s...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Warner Losh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-16 20:45 UTC by Eugene M. Kim
Modified: 2024-02-19 02:59 UTC (History)
1 user (show)

See Also:
imp: mfc-stable13-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene M. Kim 2022-03-16 20:45:19 UTC
The make-pkg-package.sh target triple and the versioned cross dev symlink names use major-only revision (14) instead of the usual major.minor (14.0).

  - make-pkg-package.sh target triple is amd64-portbld-freebsd14, but should instead be amd64-portbld-freebsd14.0;
  - Versioned cross dev symlinks are named amd64-freebsd14-<tool>, but should instead be amd64-freebsd14.0-<tool>.

The problem does not occur if a custom PKG_VERSION is specified.

https://github.com/freebsd/freebsd-src/pull/592 fixes this.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:40:23 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-06 21:15:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a1e3fb8fa0a4652bc345bd284c32d6630a8dbe08

commit a1e3fb8fa0a4652bc345bd284c32d6630a8dbe08
Author:     Eugene M. Kim <astralblue@gmail.com>
AuthorDate: 2022-03-11 04:32:00 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-02-06 21:02:32 +0000

    Fix _REVISION to be always major.minor

    Introduced in commit 613fe53, _REVISION was redefined to be just the
    major version (14) instead of major.minor (14.0) iff:

      - PKG_VERSION was not overridden (default), and
      - Branch was -CURRENT, -STABLE, or -PRERELEASE.

    This introduced side effects in other parts of the code which expected
    _REVISION to be major.minor:

      - make-pkg-package.sh target triple became amd64-portbld-freebsd14
        (should be amd64-portbld-freebsd14.0);
      - Versioned cross dev symlink name became amd64-freebsd14-<tool>
        (should be amd64-freebsd14.0-<tool>)

    Also, compounded with commit ea9a92d (which was introduced afterward
    and removed minor version from _REVISION incorrectly using :S with a
    regex) this also caused pkgbase repo to use a wrong PKG_ABI with a minor
    version (FreeBSD:14.0:amd64) when a custom PKG_VERSION was specified.
    (Note, without a custom PKG_VERSION the bug was not triggered because in
    that case _REVISION was already major-only.)

    This commit fixes both problems by introducing and using MAJOR_REVISION
    instead of redefining _REVISION.  Existing uses of _REVISION now see
    major.minor again, except PKG_ABI (ex: FreeBSD:14:amd64, as described
    above) and PKG_VERSION (ex: 14.snap20220311121531) need only the major
    version and now use MAJOR_REVISION instead.

    PR: 262600, 262601
    Reviewed by: imp, emaste
    Pull Request: https://github.com/freebsd/freebsd-src/pull/592

 Makefile.inc1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2024-01-10 04:30:47 UTC
^Triage: assign to committer that resolved.
Comment 4 Warner Losh freebsd_committer freebsd_triage 2024-02-19 02:59:52 UTC
This doesn't MFC and doesn't seem to be appropriate to 13, so closing.