Bug 228220 - Prevent removal of phttpget when WITHOUT_PORTSNAP= is defined
Summary: Prevent removal of phttpget when WITHOUT_PORTSNAP= is defined
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2018-05-13 16:15 UTC by Dries Michiels
Modified: 2018-05-16 01:35 UTC (History)
1 user (show)

See Also:


Attachments
Fix phttpget removal when only WITHOUT_PORTSNAP= is defined (549 bytes, patch)
2018-05-13 16:15 UTC, Dries Michiels
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels 2018-05-13 16:15:54 UTC
Created attachment 193357 [details]
Fix phttpget removal when only WITHOUT_PORTSNAP= is defined

When building from source and the following variables are defined in src.conf:
WITHOUT_PORTSNAP=. Then when issuing make check-old, it will remove /usr/libexec/phttpget. This program is needed for freebsd-update to function.

Either implicitly set WITHOUT_FREEBSD_UPDATE= when WITHOUT_PORTSNAP= is defined or check if WITHOUT_FREEBSD_UPDATE= is also set before safe removal of the programm phttpget (the latter is the patch provided).
Comment 1 Ed Maste freebsd_committer 2018-05-15 21:32:25 UTC
Comment on attachment 193357 [details]
Fix phttpget removal when only WITHOUT_PORTSNAP= is defined

There's still a problem if we go with this change, in that phttpget won't be built unless MK_PORTSNAP == yes, so it has different behaviour for building it in the first place vs. not removing it. I suspect we should move phttpget out of usr.sbin so we can conveniently build it if either portsnap or freebsd-update need it, but in the short term we should probably start by explicitly recording the dependency (that turning off portsnap also turns off freebsd-update).
Comment 2 commit-hook freebsd_committer 2018-05-16 01:34:11 UTC
A commit references this bug:

Author: emaste
Date: Wed May 16 01:33:49 UTC 2018
New revision: 333658
URL: https://svnweb.freebsd.org/changeset/base/333658

Log:
  Force WITHOUT_FREEBSD_UPDATE when WITHOUT_PORTSNAP is set

  freebsd-update depends on phttpget from portsnap. We could move phttpget
  out of portsnap and build it as long as WITHOUT_FREEBSD_UPDATE and
  WITHOUT_PORTSNAP are not both set, but for now just make the dependency
  explicit.

  PR:		228220
  Reported by:	Dries Michiels
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/share/mk/src.opts.mk
Comment 3 Ed Maste freebsd_committer 2018-05-16 01:35:54 UTC
I've now made the dependency explicit, and will later on try to take a look at having phttpget built as long as portsnap and freebsd-update are not both disabled.