On 07/22, Daniel Lobato Garcia 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.
More updates - bundled npms are building fine in f24, however on el7 they're not building yet. Part of the reason is that I have not been able to build an npm registry cache that satisfies both. A bit worrisome - the version of npm used in el7 isn't able to build the cache for certain versions of some packages. For example: https://github.com/theforeman/foreman-packaging/pull/1246#issuecomment-235877288 It might mean we have to use older versions so that older node/npm can deal with it of some libraries. BTW we would've missed these errors if we had gone with packaging options 3 or 4! Please follow https://github.com/theforeman/foreman-packaging/milestone/1 if you want to be on top of things or want to help :) > > > > > -- > > 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 -- 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.
signature.asc
Description: PGP signature
