It would be nice to have trendy and hip editor [0] in openSUSE. Currently however some nodejs dependencies are missing.

What needs to be done:

  • Package atom dependencies (mostly nodejs packages) - [1]
  • There is documentation on how to do so [2][3] using nodejs-packaging helper [4] but there are some limitations for packages with dependencies
  • Try using local-npm as local fake registry [5]
  • Current first attempt is at my home project [6], but i would like to push as much as possible to proper devel project [7]
  • Submit result to Factory (and potentially Backports [8][9] and Leap as well)
0. https://github.com/atom/atom
1. https://github.com/atom/atom/blob/master/package.json
2. https://en.opensuse.org/openSUSE:Packaging_nodejs
3. https://fedoraproject.org/wiki/Packaging:Node.js?rd=Node.js/Packagers
4. https://github.com/AdamMajer/nodejs-packaging
5. https://github.com/nolanlawson/local-npm
6. https://build.opensuse.org/project/show/home:pluskalm:atom
7. https://build.opensuse.org/project/show/devel:languages:nodejs
8. https://en.opensuse.org/Portal:Backports
9. https://en.opensuse.org/openSUSE:BackportsPackageSubmission_Process

Looking for hackers with the skills:

packaging npm

This project is part of:

Hack Week 15

Activity

  • over 5 years ago: cdywan liked this project.
  • over 6 years ago: dasantiago left this project.
  • almost 8 years ago: blarson liked this project.
  • almost 8 years ago: diegoakechi liked this project.
  • almost 8 years ago: troy_topnik liked this project.
  • almost 8 years ago: farahschueller liked this project.
  • almost 8 years ago: mbologna liked this project.
  • almost 8 years ago: j_renner liked this project.
  • almost 8 years ago: mgriessmeier liked this project.
  • almost 8 years ago: vsvecova joined this project.
  • almost 8 years ago: vsvecova liked this project.
  • almost 8 years ago: dmaiocchi disliked this project.
  • almost 8 years ago: dmaiocchi liked this project.
  • almost 8 years ago: randybb liked this project.
  • almost 8 years ago: JCayouette liked this project.
  • almost 8 years ago: pluskalm joined this project.
  • almost 8 years ago: dasantiago started this project.
  • almost 8 years ago: pluskalm added keyword "npm" to this project.
  • almost 8 years ago: hennevogel liked this project.
  • almost 8 years ago: pluskalm added keyword "packaging" to this project.
  • almost 8 years ago: pluskalm originated this project.

  • Comments

    • mkittler
      almost 8 years ago by mkittler | Reply

      Atom and its dependencies are already packaged under Arch Linux so you can just convert their PKGBUILDs to rmp specs.

      • pluskalm
        almost 8 years ago by pluskalm | Reply

        In Arch linux, only binary provided by upstream is repackaged, while all dependencies stay bundled.

    • lslezak
      almost 8 years ago by lslezak | Reply

      And what's wrong with the official RPM? (https://atom.io/download/rpm) It works for me well in Leap 42.2...

      • pluskalm
        almost 8 years ago by pluskalm | Reply

        Well there are several things wrong with official rpm, it bundles all of its dependecies in itself, plus we are interested in having Atom in distribution - having openSUSE users rely on binary provided by third party (even though its upstream project) does not seem like a right think to do to me.

    • MargueriteSu
      almost 8 years ago by MargueriteSu | Reply

      Hi, I have been preparing/working on this for about two years. Two main things:

      A. We can't use the "one package per nodejs module" packaging method. (Some SUSE people invented or borrowed it to openSUSE in the beginning)

      Nodejs modules can have their own 'home' to place dependencies. That is, you can rely on a very very old version of something. You don't have to update it at all. Because you have your own home. You don't have to update it.

      This situation will result two different kinds of troubles:

      A.1 security issues. No need to further explain.

      A.2 muti-versions co-existed for the same module as different packages.

      I maintained devel:languages:nodejs for two+ years. this is heart-breaking. and fragmentation. Can you imagine to update 200+ packages in one night by hand? 4 times a month? Just no go.

      There's even no way to automate it.

      package.json can only list the dependencies of this module. no dependencies for a dependency.

      You can't shrinkwrap it. because a batch update will break other packages depend on one of the packages you update (multi-version issue). It is an endless loop as the packages in the repository are growing in amount.

      So you can only package one by one. Watch on build.opensuse.org to find out dependencies for one package (no way on your own machine, because you can't see dependency for dependency since you have only one source tarball), package dependencies, find dependencies for dependencies, package, and so on.

      Based on these facts. I decided to package nodejs module and all its dependencies in one package (bundle).

      That'll be too much easy to maintain and automate.

      I invented a "nodejs-packaging" toolkit in github.com/marguerite/nodejs-packaging, which is far more reasonable than the Fedora one. On your own machine, you can use my tool to create a .json file contains a dependency map. And download all the source tarballs needed, Autofill the specfile. Write changelog. Then submit.

      For security issues, I invented another tool to parse the .json my tool created and find the specific version of a dependency out among packages in the repository. Easy target, Easy fix.

      I have done this last year. But I found my tool is too bad in coding style...and less comments...so I can't even read some parts of it now.

      This year, I started it over again, by following Ruby coding style and writing nice comments. Also I wanted to split it into a few standard rubygems so we can maintain it in our ruby repository automatically.

      So I'd say your project now highly relies on my process of developing the tool...

      B. Atom relies on electron. Currently there's no native build of electron on any distribution.

      I started to package electron to make it build natively on OBS last year.

      I have finished "libchromiumcontent" package which is basically a rebuild of chromium :-(

      But I didn't finish the "electron" yet. Because its build script focus on building on your own machine instead of standard build virtual machine (it uses 'git' at build time), so I have to patch it, and separately package all its dependencies. BTW It is written in Python. Any help is welcome.

      Marguerite

    • dasantiago
      almost 8 years ago by dasantiago | Reply

      Lessons learned:

      • Not recommended/advised to split nodejs modules into packages. The nodejs modules need to be local, as it's the way npm will deal with the dependency versions. IF the packages are installed globally nodejs don't recognize them as libraries.

      • The current nodejs rpm macros aren't suitable for this as it changes the variable npm _ config _ prefix. This will cause the npm to stop knowing about required global nodejs packages already installed

      • Atom will download the electron binary, so we need to compile electron first.

      • To compile electron we need the ninja build system, which in turn will download all the required dependencies code and dependencies (it downloads more than 1GiB of files).

      Next hackweek activities:

      • Install a couchdb on the OBS so we can emulate the behaviour in a normal system with internet

    Similar Projects

    Packaging Mu on OBS by joeyli

    Description

    Packaging Microsoft Mu project

    Goals

    Packaging Mu RPM on OBS.

    Resources

    https://microsoft.github.io/mu/

    https://github.com/microsoft/mu

    https://github.com/microsoft/mu_basecore

    https://github.com/microsoft/mutianoplatforms

    https://github.com/microsoft/mutianoplus

    https://github.com/microsoft/mu_plus

    Hackweek 22: Look at Microsoft Mu project

    https://hackweek.opensuse.org/22/projects/look-at-microsoft-mu-project

    https://drive.google.com/file/d/1BT31i7z3qh13adj9pdRz3lTUkqIsXvjY/view?usp=drive_link


    Update Haskell ecosystem in Tumbleweed to GHC-9.10.x by psimons

    Description

    We are currently at GHC-9.8.x, which a bit old. So I'd like to take a shot at the latest version of the compiler, GHC-9.10.x. This is gonna be interesting because the new version requires major updates to all kinds of libraries and base packages, which typically means patching lots of packages to make them build again.

    Goals

    Have working builds of GHC-9.10.x and the required Haskell packages in 'devel:languages:haskell` so that we can compile:

    • git-annex
    • pandoc
    • xmonad
    • cabal-install

    Resources

    • https://build.opensuse.org/project/show/devel:languages:haskell/
    • https://github.com/opensuse-haskell/configuration/
    • #discuss-haskell
    • https://www.twitch.tv/peti343


    Framework laptop integration by nkrapp

    Project Description

    Although openSUSE does run on the Framework laptops out-of-the-box, there is still room to improve the experience. The ultimate goal is to get openSUSE on the list of community supported distros

    Goal for this Hackweek

    The goal this year is to at least package all of the soft- and firmware for accessories like the embedded controller, Framework 16 inputmodule and other tools. I already made some progress by packaging the inputmodule control software, but the firmware is still missing

    Resources

    As I only have a Framework laptop 16 and not a 13 I'm looking for people with hardware that can help me test

    Progress:

    Update 1:

    The project lives under my home for now until I can get an independent project on OBS: Framework Laptop project

    Also, the first package is already done, it's the cli for the led-matrix spacer module on the Framework Laptop 16. I am also testing this myself, but any feedback or questions are welcome.

    You can test the package on the Framework 16 by adding this repo and installing the package inputmodule-control

    Update 2:

    I finished packaging the python cli/gui for the inputmodule. It is using a bit of a hack because one of the dependencies (PySimpleGUI) recently switched to a noncommercial license so I cannot ship it. But now you can actually play the games on the led-matrix (the rust package doesn't include controls for the games). I'm also working on the Framework system tools now, which should be more interesting for Framework 13 users.

    You can test the package on the Framework 16 by installing python311-framework16_inputmodule and then running "ledmatrixctl" from the command line.

    Update 3:

    I packaged the framework_tool, a general application for interacting with the system. You can find it some detailed information what it can do here. On my system everything related to the embedded controller functionality doesn't work though, so some help testing and debugging would be appreciated.

    Update 4:

    Today I finished the qmk interface, which gives you a cli (and gui) to configure your Framework 16 keyboard. Sadly the Python gui is broken upstream, but I added the qmk_hid package with the cli and from my testing it works well.

    Final Update:

    All the interesting programs are now done, I decided to exclude the firmware for now since upstream also recommends using fwupd to update it. I will hack on more things related to the Framework Laptops in the future so if there are any ideas to improve the experience (or any bugs to report) feel free to message me about it.

    As a final summary/help for everyone using a Framework Laptop who wants to use this software:

    The source code for all packages can be found in repositories in the Framework organization on Github

    All software can be installed from this repo (Tumbleweed)

    The available packages are:

    • framework-inputmodule-control (FW16) - play with the inputmodules on your Framework 16 (b1-display, led-matrix, c1-minimal)

    • python-framework16_inputmodule (FW16) - same as inputmodule-control but is needed if you want to play and crontrol the built-in games in the led-matrix (call with ledmatrixctl or ledmatrixgui)

    • framework_tool (FW13 and FW 16) - use to see and configure general things on your framework system. Commands using the embedded controller might not work, it looks like there are some problems with the kernel module used by the EC. Fixing this is out of scope for this hackweek but I am working on it

    • qmk_hid (FW16) - a cli to configure the FW16 qmk keyboard. Sadly the gui for this is broken upstream so only the cli is usable for now