[fpc] #311: Node.js guidelines update
by fedora-badges
#311: Node.js guidelines update
-----------------------------+------------------
Reporter: patches | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Guideline Draft | Version:
Keywords: | Blocked By:
Blocking: |
-----------------------------+------------------
We have a couple of changes we'd like to make to the Node.js Guidelines
after several months of refining our processes a little bit.
You can see the new draft at:
https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS
The changes include:
* I've restored the %nodejs_fixdep section included in the original
version of the draft. After reviewing the IRC logs, it seemed FPC didn't
strongly object to this, and I believe it has several advantages to patch-
based workflows. Not only is it simpler for packagers, but it also makes
them dead simple to audit later on for staleness/compliance/whathaveyou.
(`grep -r nodejs_fixdep` is just a lot easier than trying to find relevant
patches. ;-) It also makes changes to dependencies much easier to see in
git.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#Correc...
(relevant section)]
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff)]
* The RPM magic was recently split into it's own "nodejs-packaging" SRPM,
similar to Java. Accordingly, packages can now require "nodejs-packaging"
instead of "nodejs-devel" to reduce the number of deps dragged in at
build-time.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#BuildR...
(relevant section)]
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff #1)]
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff #2)]
[https://lists.fedoraproject.org/pipermail/nodejs/2013-April/000001.html
(list discussion)]
* The necessary ExclusiveArch line needed for Node.js packages is now
documented, including the %{nodejs_arches} macro recently added to redhat-
rpm-config for this purpose.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#Exclus...
(new section)]
[https://lists.fedoraproject.org/pipermail/nodejs/2013-May/000017.html
(list discussion)]
* A strategy for handling multiple/compatibility versions of packages that
is transparent to dependent packagers has been implemented.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#Handli...
(new section)]
[https://lists.fedoraproject.org/pipermail/nodejs/2013-June/000032.html
(list discussion)]
* The %{nodejs_default_filter} default automatic virtual provides
filtering macro (similar to Perl's) is now documented.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#Filter...
(new section)]
* A --check argument was added to %nodejs_symlink_deps simplify running
test suites in specs.
[https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/NodeJS#.25check
(new section)]
* A brief mention that additional virtual provides are added for native
modules to track ABI compatibility was added.
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff)]
* Some minor edits were made to the installing native modules section to
reflect reality; my initial draft contained errors.
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff)]
* A brief note about an additional macro required to enable dependency
generation on EPEL was added.
[https://fedoraproject.org/w/index.php?title=User:Patches/PackagingDrafts/...
(diff)]
I'd like to thank the fledgling Node.js SIG, including Stephen Gallager,
Jamie Nguyen, Tom Hughes, and Stanislav Ochotnicky for their valuable bug
catching, feedback, and suggestions, without which none of this would be
possible. And, also the FPC in advance for reviewing our changes, of
course. ;-)
--
Ticket URL: <https://fedorahosted.org/fpc/ticket/311>
fpc <https://fedoraproject.org/wiki/Packaging:Committee>
Fedora Packages Collection Task Tracking
9 years, 3 months
xmlbuilder
by Tom Hughes
I need to package the xmlbuilder module (it's a new dependency for
another module I own) but packaging it has raised some interesting
questions.
The javascript source in the npm package, which is what the packaging
guidelines tell us to use as the source, is compiled from coffee script
and also doesn't include any source.
We've worked around similar situations in the past by having a second
source archive which contains the tests pulled from github, but in this
case there's an extra issue - the tests work on the original coffee
script source not the compiled javascript.
In any case the coffee script is the real source, so shouldn't I really
be packaging the github tar ball and building the js from that as part
of the rpm?
Tom
--
Tom Hughes (tom(a)compton.nu)
http://compton.nu/
9 years, 6 months
njs2rpm - NodeJS to RPM made simple, RedHat compatible
by Sérgio Freire
Hi all,
Just to let you know of "njs2rpm", a NodeJS to RPM converter that tries to follow the RH/Fedora packaging guidelines and more!
See the project page for more relevant info.
https://github.com/sfreire/njs2rpm
All made in Bash, without weird dependencies and (.spec) template based.
Features:
- supports RHEL6 and RHEL5/Centos5 (yes, RHEL5!) - runs and build RPM packages on these systems
- simple creation of RPM obtaining sources directly from NPM Registry, of any package and version available!
- does not require Perl, Python, Ruby and a bulk of dependencies in order to run! It's made in shell script: "BASH" to the rescue!
- supports NodeJS packaging guidelines used in Fedora/EPEL (and upcoming RedHat versions) for building clean ("single") packages
- supports the creation of "bundle" packages with all dependencies pre-bundled, overcoming the "limitation" of some modules with dependency problems!
- supports RPM (or .spec) creation based on template files in order to customized the generated RPM
Examples:
njs2rpm uglify-js 2.4.1 1 single rpm
njs2rpm uglify-js 2.4.1 1 bundle rpm
njs2rpm express 3.4.4 1 bundle spec mytemplate.n2r
PS: a .spec is provided along with a Makefile and a "mock" script, whatever you prefer.
Regards,
Sergio Freire
9 years, 7 months