1.16.0+dfsg-1 FTBFS Error: File not found with singular glob: /usr/share/nodejs/knockout-sortable/build/knockout-sortable.js

Bug #1974202 reported by Athos Ribeiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rainloop (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

As discussed in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006060,
rainloop FTBFS with

Error: File not found with singular glob: /usr/share/nodejs/knockout-sortable/build/knockout-sortable.js (if this was purposeful, use `allowEmpty` option)

There is a fix available in

https://salsa.debian.org/js-team/rainloop/-/commit/5ce91f436d0390e0f6102b60aba54681618b4500 or
https://salsa.debian.org/js-team/rainloop/-/merge_requests/2

Related branches

Changed in rainloop (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
status: New → In Progress
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Since the latest gulp-util update (in -proposed), build are also failing with:

Error: Cannot find module 'gulp-util'.

The following salsa MR fixes the issue by moving away from gulp-util (deprecated):

https://salsa.debian.org/js-team/rainloop/-/merge_requests/3

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

After applying the patches above, we are left with the following error:

[16:01:01] '<anonymous>' errored after 530 ms
[16:01:01] Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/usr/share/nodejs/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/usr/share/nodejs/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/usr/share/nodejs/webpack/lib/NormalModule.js:471:10)
    at /usr/share/nodejs/webpack/lib/NormalModule.js:503:5
    at /usr/share/nodejs/webpack/lib/NormalModule.js:358:12
    at /usr/share/nodejs/loader-runner/lib/LoaderRunner.js:406:3
    at iterateNormalLoaders (/usr/share/nodejs/loader-runner/lib/LoaderRunner.js:232:10)
    at iterateNormalLoaders (/usr/share/nodejs/loader-runner/lib/LoaderRunner.js:239:10)
[16:01:01] 'rainloop' errored after 602 ms
make[1]: *** [debian/rules:13: override_dh_auto_build] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

As per https://github.com/webpack/webpack/issues/14532, using the new openssl-legacy-provider node option is a valid workaround. Unfortunately, the new option is only available from node 17 and on (we currently ship node 16 in -proposed).

If node >= 17 was available, adding the following line before the gulp call in d/rules should solve the issue:
echo '{ "flags": { "nodeFlags": ["--openssl-legacy-provider"] } }' > .gulp.json

A definitive fix lies in https://github.com/webpack/webpack/pull/14584, which was released in webpack 5.61.0: https://github.com/webpack/webpack/releases/tag/v5.61.0

Changed in rainloop (Ubuntu):
status: In Progress → Triaged
assignee: Athos Ribeiro (athos-ribeiro) → nobody
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

sergiodj has proposed backporting the nodejs option to nodejs 16 at https://bugs.launchpad.net/ubuntu/+source/nodejs/+bug/1974226

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rainloop - 1.16.0+dfsg-1ubuntu2

---------------
rainloop (1.16.0+dfsg-1ubuntu2) kinetic; urgency=medium

  * d/p/wepack5.patch: add support for webpack v5.

rainloop (1.16.0+dfsg-1ubuntu1) kinetic; urgency=medium

  * Fix FTBFS issues (LP: #1974202):
    - Switch to fancy-log instead of gulp-util's log:
      + d/p/switch-to-fancy-log.patch: Switch to fancy-log instead of
        gulp-util.
      + d/control: drop build dependency on node-gulp-util.
      + d/control: add node-fancy-log to Build-Dependencies.
      + Switch to plugin-error instead of gulp-util's PluginError.
    - d/p/debian-build.patch: Fix FTBFS when checking for knockout-sortable
      path.
    - d/rules: use legacy openssl providers.

 -- Athos Ribeiro <email address hidden> Tue, 24 May 2022 20:22:39 -0300

Changed in rainloop (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.