[Pkg-javascript-devel] Bug#932956: ITP: node-node-sass -- Wrapper around libsass
Xavier
yadd at debian.org
Tue Aug 13 05:48:10 BST 2019
Le 13/08/2019 à 00:16, Jérémy Lal a écrit :
>
>
> Le lun. 12 août 2019 à 22:25, Xavier <yadd at debian.org
> <mailto:yadd at debian.org>> a écrit :
>
> Le 12/08/2019 à 22:21, Xavier a écrit :
> > 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
>
> Fix:
> $ cat > debian/nodejs/files <<EOF
> binding.gyp
> bin
> lib
> package.json
> scripts
> src
> vendor
> EOF
>
> The only diff with package.json#files is the removal of "test"
>
> > 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
>
>
> Hi,
>
> i did was going to MR a patch for scripts/buid.js to make sure
> --libsass_ext=auto
> option works as expected.
> The patch is forwarded upstream.
> salsa is too slow right now, so i just attach it, you'll have to quilt
> import it.
>
> Jérémy
Thanks a lot for fixing this !
@Nilesh: here is the new diff with hardening flags enabled
Next step, enable upstream test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: node-sass.patch
Type: text/x-patch
Size: 6981 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20190813/1db5afa6/attachment.bin>
More information about the Pkg-javascript-devel
mailing list