Date: Tue, 29 Oct 2019 09:53:19 +0100 From: Willem Jan Withagen <wjw@digiware.nl> To: Adam Weinberger <adamw@adamw.org> Cc: "ports@freebsd.org" <ports@freebsd.org> Subject: Re: packaging a port that uses npm during build. Message-ID: <0a027c56-79e9-4915-bac1-61de4d0da2d0@digiware.nl> In-Reply-To: <CAP7rwcjzywXbdiCcfcZFPXe2Tcz_4H9N5DVXOPNY8FkktmPchQ@mail.gmail.com> References: <ed00bd7d-c13c-f7ec-1fbb-48b97f242a6c@digiware.nl> <CAP7rwcho=Lq=kzq1nj_UaDNh0FN60KJS7fZjUTY1ChH-1N5--w@mail.gmail.com> <4f4ba55b-fc5e-f700-2d78-e0c210453d4d@digiware.nl> <CAP7rwcjzywXbdiCcfcZFPXe2Tcz_4H9N5DVXOPNY8FkktmPchQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29-10-2019 01:41, Adam Weinberger wrote: > On Mon, Oct 28, 2019 at 6:34 AM Willem Jan Withagen <wjw@digiware.nl> wrote: >> On 28-10-2019 13:28, Adam Weinberger wrote: >>> On Mon, Oct 28, 2019 at 5:17 AM Willem Jan Withagen <wjw@digiware.nl> wrote: >>>> Hi, >>>> >>>> The ceph ports should have a manager module called dashboard that >>>> exists of a large bundle op JS-scripts that get installed with npm/node >>>> during running make on the configured build. >>>> >>>> Uptil now I've exclude that from builds, but that gets more and more >>>> complicated. Ceph cluster status is not reported not healty if the >>>> dashboard is not running.... >>>> >>>> Apart from the fact that npm does not like to be ran as 'root', >>>> poudriere also complains about fetching data afte the fetch fase. >>>> >>>> There are about 1000 npm-modules included in this project. >>>> So that would be a large set of things to maintain correctly. >>>> >>>> Is there a way around this? >>>> Or does anybody here have experience with this? >>>> >>>> I think I read once somewhere that there is also a "flag" that indicates >>>> that the port wants network access during the build. Is that feasible? >>> Can the modules be installed after installation? As in, does a >>> package.json get installed somewhere? If so, I'd put the `npm install` >>> instructions in pkg-message. >> I'd have to dig deeper, but as far as I can now see it is a rather >> convoluted part of the Cmake infra that gets called by gmake to run >> several scripts and others... >> But the hint is very temping if it was only like: call npm in something >> like /usr/local/share/ceph/dasboard/frontend > It looks like in the tarball there is > src/pybind/mgr/dashboard/frontend/package.json. Does this have what > you're looking for? Yup, ATM I'm testing to see if your trick works and just cd to /usr/local/share/ceph/mgr/dashboard/frontend and go npm ci Question is: will this deliver a working dashboard. It looks like it, but I'm still missing some other components. So I guess that the plan will be an addendum to the post install text. Note that this will delivers an incomplete setup, untill this is manually fixed by the operator. >>> The flag you're talking about has to go in poudriere.conf, so it >>> wouldn't be able to help much here. It's for local control. >> Bummer... >> What is the latest moment a (Make)script can get access to the network? >> Tried finding this in the porters manual, but could not find that detail. > The fetch phase is the only time that the network is available, > unfortunately. It's a great feature, though it does require rethinking > in situations like this. I think I understand the rationale behind it, but now the user starts donwloading things himself post install. Not per definition increasing the level of security. --WjW
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0a027c56-79e9-4915-bac1-61de4d0da2d0>