Bug 215212 - [NEW PORT] textproc/ripgrep: Command line search tool
Summary: [NEW PORT] textproc/ripgrep: Command line search tool
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL: https://reviews.freebsd.org/D11162
Keywords:
: 219916 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-11 12:59 UTC by Petteri Valkonen
Modified: 2017-06-21 16:33 UTC (History)
2 users (show)

See Also:


Attachments
shar archive of textproc/ripgrep (2.16 KB, application/x-shar)
2016-12-11 12:59 UTC, Petteri Valkonen
no flags Details
Updated shar archive of textproc/ripgrep with no network access after 'fetch' phase (2.79 KB, application/x-shar)
2017-02-28 20:02 UTC, Petteri Valkonen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petteri Valkonen 2016-12-11 12:59:34 UTC
Created attachment 177868 [details]
shar archive of textproc/ripgrep

ripgrep is a command line search tool that combines the usability of The Silver Searcher (an ack clone) with the raw speed of GNU grep. ripgrep is fast, cross platform and written in Rust.

WWW: http://blog.burntsushi.net/ripgrep/
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2017-02-24 16:33:02 UTC
This fails to build in Poudriere:

=======================<phase: build          >============================
===>  Building for ripgrep-0.3.2
cd /wrkdirs/usr/ports/textproc/ripgrep/work/ripgrep-0.3.2 &&  CARGO_HOME='/wrkdirs/usr/ports/textproc/ripgrep/work/.cargo' cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
warning: spurious network error (2 tries remaining): [12/-1] curl error: Could not resolve host: github.com

warning: spurious network error (1 tries remaining): [12/-1] curl error: Could not resolve host: github.com

error: failed to fetch `https://github.com/rust-lang/crates.io-index`

To learn more, run the command again with --verbose.
*** Error code 101

Stop.
make: stopped in /usr/ports/textproc/ripgrep
build of textproc/ripgrep ended at Fri Feb 24 16:05:57 CET 2017
build time: 00:00:10
!!! build failure encountered !!!
[01:04:58] ====>> Error: Build failed in phase: build
Comment 2 Petteri Valkonen 2017-02-28 20:02:32 UTC
Created attachment 180374 [details]
Updated shar archive of textproc/ripgrep with no network access after 'fetch' phase

This updated version fixes a problem where devel/cargo would attempt to download dependencies during the 'build' phase. Dependencies are now packaged in a distfile created during the 'fetch' phase.

Also updates ripgrep to upstream version 0.4.0.
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-11 19:37:27 UTC
(In reply to petteri.valkonen from comment #2)
The updated version builds fine in Poudriere but cannot be committed
IMHO.  I'm concerned that the tarballs you create in do-fetch will
change between different builds and machines, plus their checksums
are missing in distinfo.

I have a similar situation with devel/stack (a Haskell build tool that
uses Cabal during the build phase which also downloads dependencies),
where I currently create my own tarball of stack's dependencies
whenever I update the port.

For lack of a better alternative and unless someone has a better idea,
I suggest you roll your own tarball of the cargo registry (like you
currently do in do-fetch), give it a proper version number, upload it
somewhere, and make the port use it.

OpenBSD does something similar though they have ports framework
support for Cargo which makes this easier.
Comment 4 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-13 20:38:44 UTC
(In reply to Tobias Kortkamp from comment #3)
I've submitted a draft for a USES=cargo and have converted your port to use it.  Let's see how this goes.
Comment 5 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-13 20:39:08 UTC
*** Bug 219916 has been marked as a duplicate of this bug. ***
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-06-21 16:24:34 UTC
A commit references this bug:

Author: tobik
Date: Wed Jun 21 16:23:53 UTC 2017
New revision: 444035
URL: https://svnweb.freebsd.org/changeset/ports/444035

Log:
  New port: textproc/ripgrep

  ripgrep is a command line search tool that combines the usability of
  The Silver Searcher (an ack clone) with the raw speed of GNU grep.
  ripgrep is fast, cross platform and written in Rust.

  WWW: http://blog.burntsushi.net/ripgrep/

  PR:		215212
  Submitted by:	petteri.valkonen@iki.fi (based on)
  Approved by:	mat (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11162

Changes:
  head/textproc/Makefile
  head/textproc/ripgrep/
  head/textproc/ripgrep/Makefile
  head/textproc/ripgrep/distinfo
  head/textproc/ripgrep/pkg-descr
Comment 7 Tobias Kortkamp freebsd_committer freebsd_triage 2017-06-21 16:33:03 UTC
Committed with the necessary changes for the new USES=cargo. :)