Bug 224048 - freebsd-update should check for src component under BASEDIR
Summary: freebsd-update should check for src component under BASEDIR
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-03 07:12 UTC by Michael Zuo
Modified: 2019-09-23 15:59 UTC (History)
1 user (show)

See Also:
grembo: mfc-stable12+
grembo: mfc-stable11+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zuo 2017-12-03 07:12:12 UTC
freebsd-update checks in config_Components whether /usr/src/COPYRIGHT exists, and if it doesn't, avoids avoids adding src to the components list even if it is listed in the configuration file.

When run with -b, the src component may be installed in the system at basedir, but not outside. In this case, freebsd-update nonetheless *does not* include the src component, which it should.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-01-18 17:42:40 UTC
A commit references this bug:

Author: emaste
Date: Fri Jan 18 17:41:45 UTC 2019
New revision: 343152
URL: https://svnweb.freebsd.org/changeset/base/343152

Log:
  freebsd-update: Use BASEDIR when checking for src component

  src could potentially be installed under the based dir
  and not under the root or vice versa.

  PR:		224048
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18849

Changes:
  head/usr.sbin/freebsd-update/freebsd-update.sh
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-03-05 18:52:19 UTC
A commit references this bug:

Author: emaste
Date: Tue Mar  5 18:52:14 UTC 2019
New revision: 344811
URL: https://svnweb.freebsd.org/changeset/base/344811

Log:
  MFC r343152: freebsd-update: Use BASEDIR when checking for src component

  src could potentially be installed under the based dir
  and not under the root or vice versa.

  PR:		224048
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-03-05 18:55:27 UTC
A commit references this bug:

Author: emaste
Date: Tue Mar  5 18:54:47 UTC 2019
New revision: 344813
URL: https://svnweb.freebsd.org/changeset/base/344813

Log:
  freebsd-update: Use BASEDIR when checking for src componentfreebsd-update: Use BMFC r343152: freebsd-update: Use BASEDIR when checking for src component

  src could potentially be installed under the based dir
  and not under the root or vice versa.

  PR:		224048
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/usr.sbin/freebsd-update/freebsd-update.sh
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-09-22 19:53:58 UTC
A commit references this bug:

Author: grembo
Date: Sun Sep 22 19:53:29 UTC 2019
New revision: 352608
URL: https://svnweb.freebsd.org/changeset/base/352608

Log:
  MFC r352542: freebsd-update: Fix src component detection

  PR:	224048, 238558, 239997
  Reviewed by:    emaste
  Differential Revision:  https://reviews.freebsd.org/D21579

Changes:
_U  stable/12/
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-09-22 20:04:03 UTC
A commit references this bug:

Author: grembo
Date: Sun Sep 22 20:03:26 UTC 2019
New revision: 352610
URL: https://svnweb.freebsd.org/changeset/base/352610

Log:
  MFC r352542: freebsd-update: Fix src component detection

  PR:		224048, 238558, 23999
  Reviewed by:	emaste
  Differential Revision:	https://reviews.freebsd.org/D21579

Changes:
_U  stable/11/
  stable/11/usr.sbin/freebsd-update/freebsd-update.sh
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-09-23 15:59:24 UTC
A commit references this bug:

Author: grembo
Date: Mon Sep 23 15:58:55 UTC 2019
New revision: 352628
URL: https://svnweb.freebsd.org/changeset/base/352628

Log:
  MF stable/12 r352608

  Approved by:	re (gjb)

  r352608:
  freebsd-update: Fix src component detection

  In case BASEDIR was set to a directory that differed from the default
  filesystem root, freebsd-update wrongly checked for the existence
  of /usr/src/COPYRIGHT to determine if the src component was
  installed. Existing code to address this wasn't effective due to the
  order in which configuration options were evaluated.

  PR:		224048, 238558, 239997
  Reviewed by:	emaste
  Differential Revision:	https://reviews.freebsd.org/D21579

Changes:
_U  releng/12.1/
  releng/12.1/usr.sbin/freebsd-update/freebsd-update.sh