Hello community, here is the log from the commit of package npm for openSUSE:Factory checked in at 2015-08-05 06:51:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/npm (Old) and /work/SRC/openSUSE:Factory/.npm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "npm" Changes: -------- --- /work/SRC/openSUSE:Factory/npm/npm.changes 2014-11-26 10:32:59.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.npm.new/npm.changes 2015-08-05 06:51:45.000000000 +0200 @@ -1,0 +2,40 @@ +Fri Jul 31 16:23:59 UTC 2015 - [email protected] + +- fix: rpm can't change a directory to a symlink + * That /usr/lib/node_modules/npm/doc exists before installing npm + is because: npm requires nodejs-packaging to build, which + further requires nodejs-npm (the built in npm), which holds + the doc directory. then because it's an existing place, rpm + can't delete and symlink it to /usr/share/doc/packages/npm/doc + * https://bugzilla.redhat.com/show_bug.cgi?id=447156 + * another workaround: + https://bugs.launchpad.net/rpm/+bug/633636/comments/3 + * but we still want to keep our specfile simple, so we just + not to symlink doc and html directories. + +------------------------------------------------------------------- +Wed Jul 29 12:43:51 UTC 2015 - [email protected] + +- update version 2.11.3 +- fix boo#937854: request < 2.58 + +------------------------------------------------------------------- +Fri Jun 5 18:15:27 UTC 2015 - [email protected] + +- update version 2.11.2 +- add npm.rb, which is a powerful tool to help maintainers + surviving npm's dependencies' update cycle. + +------------------------------------------------------------------- +Thu Apr 23 13:23:37 UTC 2015 - [email protected] + +- Update to version 2.8.3. For details see the included + CHANGELOG.md +- drop npm-deps.diff + +------------------------------------------------------------------- +Sat Apr 4 06:48:29 UTC 2015 - [email protected] + +- enable building for all arches + +------------------------------------------------------------------- Old: ---- npm-2.1.3.tgz npm-deps.diff New: ---- npm-2.11.3.tgz npm.rb ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ npm.spec ++++++ --- /var/tmp/diff_new_pack.zJEEhY/_old 2015-08-05 06:51:46.000000000 +0200 +++ /var/tmp/diff_new_pack.zJEEhY/_new 2015-08-05 06:51:46.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package npm # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,25 +17,23 @@ Name: npm -Version: 2.1.3 +Version: 2.11.3 Release: 0 Summary: Node.js Package Manager License: Artistic-2.0 Group: Development/Tools Url: http://npmjs.org/ Source: http://registry.npmjs.org/npm/-/npm-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch -ExclusiveArch: %{ix86} x86_64 %{arm} noarch - +Source99: npm.rb # use system paths for man pages and documentation Patch1: %{name}-doc-path.diff # use external node-gyp because the internal will be removed Patch2: npm-external-node-gyp.patch -Patch3: npm-deps.diff - +BuildRequires: fdupes BuildRequires: nodejs-packaging - +Conflicts: otherproviders(npm(npm)) +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch %nodejs_find_provides_and_requires %description @@ -46,35 +44,38 @@ %setup -q -n package %patch1 -p1 %patch2 -p1 -%patch3 -p1 +%nodejs_fixdep normalize-package-data '~2.3.1' +%nodejs_fixdep request '~2.60.0' +%nodejs_fixdep readable-stream '~2.0.2' +%nodejs_fixdep init-package-json '~1.7.0' #remove bundled modules rm -rf node_modules +#remove bundled node-gyp +rm -rf bin/node-gyp-bin + +#remove unnessary npm +rm -rf bin/npm + #add a missing shebang -sed -i -e '1i#!/usr/bin/node' bin/read-package-json.js +sed -i -e '1i#!%{_bindir}/node' bin/read-package-json.js # delete windows stuff -rm bin/npm.cmd bin/node-gyp-bin/node-gyp.cmd +rm bin/npm.cmd # override some defaults -./configure globalconfig=/etc/npmrc globalignorefile=/etc/npmignore +./configure globalconfig=%{_sysconfdir}/npmrc globalignorefile=%{_sysconfdir}/npmignore %build #nothing to do %install -# some files are duplicate for whatever reason, replace with symlinks -ln -sf package.json.5 man/man5/npm-json.5 -ln -sf npm-folders.5 man/man5/npm-global.5 -ln -sf package.json.html html/doc/files/npm-json.html -ln -sf npm-folders.html html/doc/files/npm-global.html - -mkdir -p %{buildroot}%{nodejs_modulesdir}/npm -cp -pr bin lib cli.js package.json npmrc %{buildroot}%{nodejs_modulesdir}/npm/ +mkdir -p %{buildroot}%{nodejs_sitelib}/npm +cp -pr bin lib cli.js package.json %{buildroot}%{nodejs_sitelib}/npm/ mkdir -p %{buildroot}%{_bindir} -ln -sf ../lib/node_modules/npm/bin/npm-cli.js %{buildroot}%{_bindir}/npm +ln -sf %{_libexecdir}/node_modules/npm/bin/npm-cli.js %{buildroot}%{_bindir}/npm # ghosted global config files mkdir -p %{buildroot}%{_sysconfdir} @@ -86,13 +87,17 @@ cp -pr man/* %{buildroot}%{_mandir}/ mkdir -p %{buildroot}%{_docdir}/%{name} -cp -rp AUTHORS doc html README.md LICENSE CHANGELOG.md CONTRIBUTING.md %{buildroot}%{_docdir}/%{name} -ln -sf %{_docdir}/%{name} %{buildroot}%{nodejs_modulesdir}/npm/doc -ln -sf %{_docdir}/%{name}/html %{buildroot}%{nodejs_modulesdir}/npm/html +mkdir -p %{buildroot}%{nodejs_sitelib}/npm/{doc,html} +cp -rp AUTHORS README.md LICENSE CHANGELOG.md CONTRIBUTING.md %{buildroot}%{_docdir}/%{name} +cp -r doc %{buildroot}%{nodejs_sitelib}/npm/doc +cp -r html %{buildroot}%{nodejs_sitelib}/npm/html + +find %{buildroot} -name "*.orig" -delete -print +%fdupes %{buildroot} %files %defattr(-,root,root,-) -%{nodejs_modulesdir}/npm +%{nodejs_sitelib}/npm %ghost %{_sysconfdir}/npmrc %ghost %{_sysconfdir}/npmignore %{_bindir}/npm ++++++ npm-2.1.3.tgz -> npm-2.11.3.tgz ++++++ ++++ 212496 lines of diff (skipped) ++++++ npm-doc-path.diff ++++++ --- /var/tmp/diff_new_pack.zJEEhY/_old 2015-08-05 06:51:47.000000000 +0200 +++ /var/tmp/diff_new_pack.zJEEhY/_new 2015-08-05 06:51:47.000000000 +0200 @@ -1,8 +1,7 @@ -Index: package/lib/help.js -=================================================================== ---- package.orig/lib/help.js -+++ package/lib/help.js -@@ -56,7 +56,7 @@ function help (args, cb) { +diff -ur package/lib/help.js package.patched/lib/help.js +--- package/lib/help.js 2015-04-03 07:43:07.000000000 +0200 ++++ package.patched/lib/help.js 2015-04-23 15:14:29.081142190 +0200 +@@ -56,7 +56,7 @@ })) // npm help <section>: Try to find the path @@ -10,17 +9,8 @@ + var manroot = path.resolve("/usr/share/man") // legacy - if (section === "global") -@@ -65,7 +65,7 @@ function help (args, cb) { - section = "package.json" - - // find either /section.n or /npm-section.n -- var f = "+(npm-" + section + "|" + section + ").[0-9]" -+ var f = "+(npm-" + section + "|" + section + ").[0-9].gz" - return glob(manroot + "/*/" + f, function (er, mans) { - if (er) - return cb(er) -@@ -78,7 +78,7 @@ function help (args, cb) { + if (section === "global") section = "folders" +@@ -82,7 +82,7 @@ } function pickMan (mans, pref_) { @@ -29,7 +19,7 @@ var pref = {} pref_.forEach(function (sect, i) { pref[sect] = i -@@ -94,9 +94,9 @@ function pickMan (mans, pref_) { +@@ -98,9 +98,9 @@ } function viewMan (man, cb) { @@ -41,7 +31,7 @@ // at this point, we know that the specified man page exists var manpath = path.join(__dirname, "..", "man") -@@ -104,7 +104,6 @@ function viewMan (man, cb) { +@@ -108,7 +108,6 @@ Object.keys(process.env).forEach(function (i) { env[i] = process.env[i] }) @@ -49,7 +39,7 @@ var viewer = npm.config.get("viewer") var conf -@@ -147,7 +146,7 @@ function htmlMan (man) { +@@ -151,7 +150,7 @@ default: throw new Error("invalid man section: " + sect) } @@ -58,7 +48,7 @@ } function npmUsage (valid, cb) { -@@ -219,7 +218,7 @@ function wrap (arr) { +@@ -223,7 +222,7 @@ } function getSections (cb) { ++++++ npm-external-node-gyp.patch ++++++ --- /var/tmp/diff_new_pack.zJEEhY/_old 2015-08-05 06:51:47.000000000 +0200 +++ /var/tmp/diff_new_pack.zJEEhY/_new 2015-08-05 06:51:47.000000000 +0200 @@ -1,8 +1,7 @@ -Index: package/lib/utils/lifecycle.js -=================================================================== ---- package.orig/lib/utils/lifecycle.js -+++ package/lib/utils/lifecycle.js -@@ -79,7 +79,7 @@ function lifecycle_ (pkg, stage, wd, env +diff -ur package/lib/utils/lifecycle.js package.patched/lib/utils/lifecycle.js +--- package/lib/utils/lifecycle.js 2015-04-03 07:43:07.000000000 +0200 ++++ package.patched/lib/utils/lifecycle.js 2015-04-23 15:20:58.373174416 +0200 +@@ -80,7 +80,7 @@ // we also unshift the bundled node-gyp-bin folder so that // the bundled one will be used for installing things. ++++++ npm.rb ++++++ #!/usr/bin/env ruby require 'json' require 'open-uri' VERSION="2.11.2" def depends(name) if name.key?("dependencies") then name["dependencies"].each do |key, value| File.open("deps.txt","a+") do |f| f.puts key + "=" + value["version"] end url = value["resolved"] pkg = key + "-" + value["version"] + ".tgz" Dir.chdir("deps") do |dir| unless url == nil then open(pkg, 'w'){|f| f << open(url).read} p "downloaded dependency: " + pkg else url = "http://registry.npmjs.org/" + key + "/-/" + pkg open(pkg, 'w'){|f| f << open(url).read} p "downloaded dependency: " + pkg end end depends(value) end end end if File.exist?("/usr/bin/npm") then url = "http://registry.npmjs.org/npm/-/npm-" + VERSION + ".tgz" name = "npm-" + VERSION + ".tgz" open(name, 'w'){|f| f << open(url).read} if (system "tar -xf #{name}") then Dir.chdir("package") do |dir| system "npm shrinkwrap" end end io = File.read("package/npm-shrinkwrap.json") hash = JSON.parse(io) Dir.mkdir("deps") unless Dir.exists?("deps") depends(hash) else p 'npm not installed! please "sudo zypper in npm" first!' end
