Bug 204904 - Making CKSUMFILES more flexible by allowing USES clauses to add files there
Summary: Making CKSUMFILES more flexible by allowing USES clauses to add files there
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks: 204577
  Show dependency treegraph
 
Reported: 2015-11-30 07:05 UTC by Yuri Victorovich
Modified: 2016-04-13 11:34 UTC (History)
1 user (show)

See Also:


Attachments
patch (408 bytes, patch)
2015-11-30 07:05 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2015-11-30 07:05:19 UTC
Created attachment 163673 [details]
patch

The patch makes it possible for certain USES clauses to control (add to) what distfiles are included in distinfo.

This is needed to support more complex USES=nodejs fetch stage that will be made dependent on this bug.
Comment 1 Mathieu Arnold freebsd_committer 2015-11-30 10:24:28 UTC
CKSUMFILES is an internal variables, you can't use it directly, you should use DISTFILES or PATCHFILES.
Comment 2 Yuri Victorovich freebsd_committer 2015-11-30 10:46:39 UTC
DISTFILES is usually sufficient. But I have 2 sets of distfiles: originally downloaded (DISTFILES1), and generated by fetch (DISTFILES2). distinfo should have DISTFILES1 and DISTFILES2, but MASTER_BACKUP_SITE should only have DISTFILES2. This is why I prefer to keep the distinction between CKSUMFILES and DISTFILES. There should also be BACKUP_FILES variable. Usually they are all the same, but not in my case.

NodeJS downloads things in the process, that's why it calls for a very complex fetch stage with its own ins and outs, all of which are distfiles. The result overall looks like download, with custom process running inside.
Comment 3 Mathieu Arnold freebsd_committer 2015-11-30 13:25:04 UTC
All this seems like over-engineering. Would it not be simpler to replicate what  npm does instead of trying to coerce it and the ports framework to work together ?
Comment 4 Yuri Victorovich freebsd_committer 2015-11-30 20:44:12 UTC
npm first pre-builds locally, then places the result into another, separate hosting location, and then during port build they just download and unpack it.

There are many NodeJS projects, you can't make everybody do this manually. And the way I suggested with USES=nodejs circumvents the problem, and builds it all in a close to normal way. Please note that the fetch is really a fancy fetch, it doesn't compile anything.

This makes it a bit difficult to implement USES=nodejs, but easy to make many ports based on it.