+1 for option 4. From what I saw it's common approach in other projects. It's simple enough for start and we can re-evaluate later if we find it problematic.

T.

On 07/26/2016 05:25 PM, Tomer Brisker wrote:
Hi,

I meant to reply to this much sooner but it somehow slipped between the
cracks.
First, a big thank-you to Daniel for all the effort put into getting
this done.
I think either 3 or 4 make the most sense, but at this point anything
that will let us move forward is fine with me.
I still haven't managed to understand why we insist on building a ton of
RPMs just so we can provide them to Koji.
All the node modules are only needed for one step in building the rpm
and are never used for anything else or provided to users.
I would understand the need to separately package them if they were
needed for running Foreman, but this is not the case.
We are literally wasting weeks of time and I have no idea how many hours
of engineering work for something that can be achieved in a simple tar
ball or a single package containing everything.
Lets finish this, please, one way or another, so we can concentrate on
building a better Foreman for our community.

Tomer


On Fri, Jul 22, 2016 at 10:26 PM, Ohad Levy <[email protected]
<mailto:[email protected]>> wrote:

    On Jul 22, 2016 9:01 PM, "Daniel Lobato Garcia" <[email protected]
    <mailto:[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 <http://blog.daniellobato.me>
    > >daniellobato.me <http://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 <http://blog.daniellobato.me>
    >daniellobato.me <http://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 [email protected]
    <mailto:foreman-dev%[email protected]>.
    > For more options, visithttps://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]
    <mailto:[email protected]>.
    For more options, visit https://groups.google.com/d/optout.




--
Have a nice day,
Tomer Brisker
Red Hat Engineering

--
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]
<mailto:[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