Bug 224842 - [exp-run] patch(1) change to fix net/rubygem-grpc patching
Summary: [exp-run] patch(1) change to fix net/rubygem-grpc patching
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: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-02 17:55 UTC by Kyle Evans
Modified: 2018-01-11 15:05 UTC (History)
3 users (show)

See Also:
antoine: exp-run+


Attachments
patch against ports (67.70 KB, patch)
2018-01-02 17:55 UTC, Kyle Evans
no flags Details | Diff
patch against src/head (697 bytes, patch)
2018-01-02 17:55 UTC, Kyle Evans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Evans freebsd_committer freebsd_triage 2018-01-02 17:55:21 UTC
Created attachment 189342 [details]
patch against ports

Hi,

Please do an exp-run on -HEAD with the attached patches against the ports tree and src tree. The ports patch is just an experimental 'make sure it really does work' for rubygem-grpc since it's been worked around, and not intended for commit later.

The following review is open for this: https://reviews.freebsd.org/D13738

Thanks!
Comment 1 Kyle Evans freebsd_committer freebsd_triage 2018-01-02 17:55:44 UTC
Created attachment 189343 [details]
patch against src/head
Comment 2 Kyle Evans freebsd_committer freebsd_triage 2018-01-02 18:24:23 UTC
(In reply to Kyle Evans from comment #1)

Oh shoot, that looked like a question mark. Apologies =)
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2018-01-06 19:37:58 UTC
The exp-run looks fine.

Note however that the ports patch can't be committed until all supported releases of FreeBSD work with it.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-01-11 15:02:43 UTC
A commit references this bug:

Author: kevans
Date: Thu Jan 11 15:01:48 UTC 2018
New revision: 327826
URL: https://svnweb.freebsd.org/changeset/base/327826

Log:
  patch(1): Don't check for NUL bytes in Plan A

  Plan A mmap()'s the entire input file and operates on it in memory. The
  map(2) call succeeded, so we shouldn't need to bother checking for the NUL
  byte as long as we're within our buffer space.

  This was clearly intentional to match "the behavior of the original code",
  but it creates a discrepancy between Plan A and Plan B that doesn't seem
  sensible and it's not inherently wrong to allow a NUL byte.

  This change was motivated by the gemspec in net/rubygem-grpc failing to
  patch, despite the patch being generated with diff, because a NUL byte was
  used as a delimiter in the header briefly in an otherwise text file.

  An alternative was considered: to fallback to plan B if plan A won't process
  the entire file due to a NUL byte, but I deemed this to be the better option
  since plan A isn't failing due to memory limitations and will fail later on
  if it's really dealing with a file it shouldn't be.

  PR:		224842 (exp-run)
  Reported by:	swills
  Reviewed by:	emaste, pfg
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D13738

Changes:
  head/usr.bin/patch/inp.c
Comment 5 Kyle Evans freebsd_committer freebsd_triage 2018-01-11 15:05:27 UTC
Indeed- as indicated in the initial post, the ports patch was mostly for a proof of "it actually fixes the initial problem." =)