Skip to content
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

official debian packages #1305

Closed
marado opened this issue Oct 20, 2016 · 14 comments

Comments

Projects
None yet
5 participants
@marado
Copy link

commented Oct 20, 2016

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
No package on official Debian repositories.

What is the expected behavior?
Package on official Debian repositories.

Description

At #275 debian packages were created, and there are yarn-maintained repositories to allow users to install yarn via apt. However, it would be better still if people could install yarn directly from debian repositories.

For that to happen, an ITP should be created. I believe this will end up happening anyway, but it would be advantageous if the debian package was actually maintained by someone from upstream (I mean, whomever is currently maintaining the yarn debian repository).

This issue is not being submitted simply as a "feature request", but also to know if this is something yarn people are willing to do in the future, or if someone else should work on it.

@Daniel15

This comment has been minimized.

Copy link
Member

commented Oct 21, 2016

Hi @marado!

whomever is currently maintaining the yarn debian repository)

That's me! 😄

Getting it into Debian would require some more work. The current Debian package is "good enough" for people to use and works well, but I don't think it's quite ready for inclusion in Debian as they have pretty strict quality requirements for packages. For one, the current package bundles all dependencies into the package itself. Debian requires dependencies to be in their own separate packages (for example, see the npm package in Ubuntu). Additionally, we currently don't have manpages/docs or a proper changelog for Yarn.

It's not something we'll do in the short term, but maybe in the long term!

Thanks for your interest.

@simevo

This comment has been minimized.

Copy link
Contributor

commented Nov 3, 2016

@simevo

This comment has been minimized.

Copy link
Contributor

commented Dec 16, 2016

We're making progress on this one !

The introduction with this commit of the new dependency on the inquirer module makes the matter harder because we need to package that first...

Next there's waiting for gulp to get into debian and finally implement the actual build in the curiously named makefile debian/rules.

For detailed a status update see https://bugs.debian.org/843021.

@Daniel15

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

@simevo - Why node-yarnpkg rather than just yarnpkg? npm's package is just npm rather than node-npm, right?

@simevo

This comment has been minimized.

Copy link
Contributor

commented Dec 19, 2016

The normal JS maintainers team best practice is that "binary and the source package should be called node-foo". But since node-yarnpkg also installs a binary in /usr/bin called yarnpkg, as I have currently set it up (see the control file), the binary in this case is called just yarnpkg. So users will happily install it with:

apt install yarnpkg
@Daniel15

This comment has been minimized.

Copy link
Member

commented Dec 19, 2016

Oh cool, thanks for the info! 😃

@simevo

This comment has been minimized.

Copy link
Contributor

commented Dec 25, 2016

Status update: we've all dependencies and main build dependencies (gulp-if and gulp-watch we avoided)in the archive with the exception of babel and gulp-babel.
ATM just for testing I'm patching the gulpfile to skip the babel step:
https://anonscm.debian.org/git/pkg-javascript/node-yarnpkg.git/tree/debian/patches/07-gulp-babel.diff
The resulting package passes the lintian tests and can be installed but on launching the CLI of course the nodejs interpreter version 4.6.1 cannot cope with the javascript which has not been processed with babel:

# yarnpkg 
/usr/lib/nodejs/yarn/lib-legacy/constants.js:5
let userHome = os.homedir();
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/lib/nodejs/yarn/bin/yarn.js:29:17)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

We face the risk of missing the stretch freeze. I wonder if there is any other transpiler or I-dont-kno-what-trick to make it run in node 4.6.1 ?

@Daniel15

This comment has been minimized.

Copy link
Member

commented Dec 26, 2016

I wonder if there is any other transpiler or I-dont-kno-what-trick to make it run in node 4.6.1 ?

@simevo - Unfortunately there's no other trick to make it run in Node.js 4.6.1, the code must be transpiled. I think Babel is only a build-time dependency and not a runtime dependency, so it just has to be available at build time. Does that help at all? Could the build script install Babel via npm?

It looks like Node.js 6.9.2 is available in Debian experimental and it supports much more ES6 syntax. Do you know if it will be migrated to unstable/testing?

@simevo

This comment has been minimized.

Copy link
Contributor

commented Dec 29, 2016

Alright we just missed the stretch freeze window so let's relax !

The good news is that since all dependencies required to run are in the archive (but for the versions of diff, ini, mkdirp and request which are bit behind), if anybody wants to provide a .deb for yarnpkg as it is now (0.18.1) they don't need to ship a node_modules dir with the dependencies inside. Until the yarn developers add some new dependency...

@Daniel15 as you know the Debian project is quite strict in requiring consistency of the build environment (that's for reproducible builds, for long term support and for free software guidelines compliance) but you're right we could still build with npm and target the contrib archive. I'm not too interested in that personally; my new goal is to finish the build deps and target the next Debian release (testing i..e buster). I hope nodejs 6.9.x we'll soon land from experimental so that should make it easier.

Creating a version for stretch-backports is also a possibility.

@bestander bestander removed the needs triage label May 23, 2017

@gsklee gsklee added the os-linux label Jun 21, 2017

@simevo

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2018

After a long pause (mostly we have been busy packaging build tools such as webpack...) here I am back with a status update.

The repo moved to the debian-hosted gitlab instance "salsa":
https://salsa.debian.org/js-team/node-yarnpkg

In the wiki home page of the repo I keep track of the packaging progress:
https://salsa.debian.org/js-team/node-yarnpkg/wikis/home
there's 6 new packages and 8 updated packages to go.

While we wait for those, there is also debian-contrib branch where we cheat on dependencies and run npm install in debian/rules, you can try it out like this:

git checkout debian-contrib 
gbp buildpackage -uc -us --git-debian-branch=debian-contrib 

The resulting yarnpkg_1.6.0-1_all.deb installs, and yarnpkg can be run, for example:

mkdir q
cd q
yarnpkg init
yarnpkg add ci-info

yields:

yarn add v1.6.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ ci-info@1.1.3
info All dependencies
└─ ci-info@1.1.3
Done in 1.01s.
@Daniel15

This comment has been minimized.

Copy link
Member

commented Apr 25, 2018

Glad to hear that it's going well! 😃

@simevo

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2019

Hi, FYI the official Debian package for yarnpkg is almost ready, see:
https://alioth-lists.debian.net/pipermail/pkg-javascript-devel/2019-January/030431.html

Once it's been tested and reviewed, I'd like to try to contribute upstream two of the patches I created, in particular:

  • 02-leven.diff: use fast-levenshtein instead of leven
  • 10-babel-plugin-inline-import.diff: do not depend on babel-plugin-inline-import as this plugin is not used: there are no .text, .raw or .graphql files, besides there is a single .tpl.js file in the repo, but there is no matching import
@Daniel15

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

Once it's been tested and reviewed, I'd like to try to contribute upstream two of the patches I created

This sounds fine to me! Feel free to send pull requests on Github with your changes.

@Daniel15

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

This landed in Buster, so I think we can close this out now.

@Daniel15 Daniel15 closed this Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.