On Jul 22, 2016 9:01 PM, "Daniel Lobato Garcia" <[email protected]> wrote:
>
> On 07/22, Daniel Lobato Garcia wrote:
> > On 07/21, Daniel Lobato Garcia wrote:
> >
> > > 3. Put node_modules in a new package (foreman-npm-assets?) that
> > > foreman-assets %install section puts in the right place?
> > >
> > >   - Upsides:
> > >      - relatively easy to do
> > >      - jenkins can automate it
> > >
> > >   - Downsides:
> > >      - less control or information for users about what's installed
with
> > >        foreman, although we could specify the dependencies under
> > >        "Provides: bundled-npm(xxxx)"
> > >
> > >   - Success with POC: haven't tried
> >
> > Update - I tried to make a POC for this quickly
> > https://github.com/theforeman/foreman-packaging/pull/1240
> >
> > I think it could work if there's a way of telling RPM to not care about
> > the requirements -i.e: it notices there are multiple npm(tap-stream)
> > versions and complains about that...
> >
> > To be fair I didn't expect RPM to read the contents of
> > %{nodejs_sitelib} and figure out all the dependencies!
>
> Update 2:
>
> It's working! - http://i.imgur.com/c8CPRqq.gif
>
:)
> Brief summary:
>
> The way foreman-node_modules works is by dumping node_modules in
> /opt/foreman/node_modules, then copying that sources to the Foreman root
> to ensure webpack:compile can run. Aside from that the Foreman package
> itself now has a BuildDependency on node itself (& libuv) to run
> webpack.
>
> That way we ensure no other program finds stuff it shouldn't on
%{nodejs_sitelib}
> and we don't conflict with the nodejs-XXX packages provided by the
> linux distribution.
>
> It's not building in Jenkins, but it's just because I have not put the
> sources for foreman-node_modules anywhere yet. You should be able to
> build it with mockchain locally.
>
> I think this solution would be a good compromise considering the
> difficulties 2. (bundled-npms) had and also it's much less intrusive -
> other packages need not to care about our npm deps at all.
>

It sounds great but I'm really looking for Dominic feedback here. I hope
it's enough to unblock merging webpack and can be improved if needed.

Thanks for your efforts!
Ohad
> >
> > --
> > Daniel Lobato Garcia
> >
> > @dLobatog
> > blog.daniellobato.me
> > daniellobato.me
> >
> > GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
> > Keybase: https://keybase.io/elobato
>
>
>
> --
> Daniel Lobato Garcia
>
> @dLobatog
> blog.daniellobato.me
> daniellobato.me
>
> GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
> Keybase: https://keybase.io/elobato
>
> --
> You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to