Bug 228220

Summary: Prevent removal of phttpget when WITHOUT_PORTSNAP= is defined
Product: Base System Reporter: Dries Michiels <driesm>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: emaste
Priority: --- Keywords: easy, patch
Version: 11.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix phttpget removal when only WITHOUT_PORTSNAP= is defined none

Description Dries Michiels freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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.
Comment 4 Dries Michiels freebsd_committer freebsd_triage 2020-09-09 06:55:36 UTC
Fixed in r365490.