New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild webpack during RPM build #65
Conversation
This is a no-op by itself, but cockpit-project/cockpituous#438 will use this to automatically build and publish the node-cache. |
This is the first part for addressing https://bugzilla.redhat.com/show_bug.cgi?id=1969450 properly, and rebuilding the webpack during rpm build. |
@skobyda : Would you mind if I clean up all the old and merged branches on this project? https://github.com/skobyda/cockpit-certificates/branches/all (or do it yourself, of course). I also recommend you to enable this in your project settings: Then you don't have to do this manually. |
Let's not merge that yet -- it races with the dist-gzip tarball build. I'm working on the full thing now. |
This is ugly as it races with other make targets which expect node_modules/ to exist. It's also unnecessary, we can just tell tar to ignore node_modules/.
b1408f7
to
604a1a6
Compare
Our own CI log shows that the webpack gets built during RPM, and tests succeed. It does not work for packit yet. |
604a1a6
to
32f82e5
Compare
I don't see how to fix packit right now -- I filed packit/packit#1355 for help/fixing this. |
32f82e5
to
27a7bf0
Compare
With the help of packit maintainers I found a solution/workaround for packit/packit#1355, pushed. packit is down right now, but hopefully it comes back soon. |
Avoid the indirection, and directly call webpack. This avoids adding an `npm` build dependency if/when the RPM wants to rebuild the webpack during package build.
Otherwise it is incomplete and can't be rebuilt.
The node_modules cache tarball will be published as release artifact, to make sure that any release can be rebuilt in a reproducible way. Cockpituous' release-source will call this if available: cockpit-project/cockpituous#438
This is necessary to comply with Fedora's packaging policy: https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/ Include the node cache in the source rpm, unpack it into the main source dir, and force a webpack rebuild in `%build`.
27a7bf0
to
a5004a3
Compare
Yay! COPR rpm build succeeded and correctly rebuilt the webpack. Waiting for TMT tests now, but the crucial parts are working. |
This is necessary to comply with Fedora's packaging policy:
https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/
Include the node cache in the source rpm, unpack it into the main source
dir, and force a webpack rebuild in
%build
.Tested the integration with cockpituous with:
This created a proper release (which I deleted again, sorry for the noise!)