[Pkg-javascript-devel] Bug#932956: ITP: node-node-sass -- Wrapper around libsass

Xavier yadd at debian.org
Mon Aug 12 21:21:26 BST 2019


Le 12/08/2019 à 19:41, Nilesh Patra a écrit :
> 
> 
> 
>     Needed component are: async-foreach, gaze, get-stdin, js-base64,
>     sass-graph, sass-spec, scss-tokenizer, stdout-stream, true-case-path.
>     "in-publish" seems not used
> 
> 
> I have included them, but on sbuild I get a few lintian errors which I
> have no idea as to how to resolve.
> 
> E: node-node-sass: embedded-library usr/lib/x86_64-linux-gnu/nodejs/node-sass/vendor/linux-x64-64/binding.node: libsass
> E: node-node-sass: missing-dependency-on-libc needed by usr/lib/x86_64-linux-gnu/nodejs/node-sass/vendor/linux-x64-64/binding.node
> 
> Here's the complete error log: http://paste.debian.net/1095493/
> Could you suggest a workaround for it? Also Pirate Praveen suggested
> removing sass-spec/spec. Should that be done?
> Your advice would be much appreciated.
> 
> Regards
> Nilesh

You miss to remove debian/install and upstream provides a bad "files"
field. You just have to add a "debian/nodejs/files" file to fix it:

$ git rm debian/install
$ mkdir debian/nodejs
$ cat > debian/nodejs/files <<EOF
binding.gyp
bin
package.json
scripts
src
lib
EOF

Then your debian/rules must be patched to install using pkg-js-tools
(else your components are not installed); By the way your debian/install
was wrong (missing vendor dir at least):

diff --git a/debian/control b/debian/control
index e69460c..e7dde13 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Build-Depends:
  , node-gyp (>= 3.8.0)
  , libuv1
  , libuv1-dev
+ , pkg-js-tools (>= 0.8.10)
 Standards-Version: 4.4.0
 Homepage: https://github.com/sass/node-sass
 Vcs-Git: https://salsa.debian.org/js-team/node-node-sass.git
diff --git a/debian/rules b/debian/rules
index 8c6c81d..0b1a0d6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,15 +6,15 @@
 export NODE_PATH := ${CURDIR}:/usr/share:/usr/include

 %:
-       dh $@
+       dh $@ --with nodejs

 override_dh_auto_build:
        rm -rf build vendor
        node scripts/build.js --force

-override_dh_install:
-       dh_install
-       find
debian/node-node-sass/usr/lib/nodejs/node-sass/src/libsass/win -name
libsass.sln -delete
-       find debian/node-node-sass/usr/lib/nodejs/node-sass/src/libsass
-name .gitignore -delete
-       find debian/node-node-sass/usr/lib/nodejs/node-sass/src/libsass
-name .gitattributes -delete
+override_dh_auto_install:
+       dh_auto_install --buildsystem=nodejs
+       find
debian/node-node-sass/usr/lib/*/nodejs/node-sass/src/libsass/win -name
libsass.sln -delete
+       find
debian/node-node-sass/usr/lib/*/nodejs/node-sass/src/libsass -name
.gitignore -delete
+       find
debian/node-node-sass/usr/lib/*/nodejs/node-sass/src/libsass -name
.gitattributes -delete
 #override_dh_auto_test:


pkg-js-tools will test your package during build. This means that you
have to copy dependencies in build dependencies (debian/control).
You kept embedded component in binary dependencies, this makes package
uninstallable (see attached diff)

Then take a look at debian/rules. There is a "rm -rf build vendor" in
the wrong place. Its place is in a debian/clean file.

Lintian reports a lot of bad files installed by embedded libsass. This
can be removed in debian/rules

Then package builds.

Next steps:
 - you should never embed a library that already exist in debian. I
   tried to add "--libsass=auto", but then compilation is bad: proved by
   test:

     /usr/bin/node: symbol lookup error:
     /.../node-node-sass/vendor/linux-x64-64/binding.node: undefined
                                              symbol: sass_make_boolean

I need some JS-Team help for this

Cheers,
Xavier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node-sass.patch
Type: text/x-patch
Size: 3471 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20190812/f2ac69fa/attachment.bin>


More information about the Pkg-javascript-devel mailing list