FreeBSD NodeBB package : call for testers


  • FreeBSD/OpenBSD

    I finally found the time to finish the NodeBB port. Now, before submitting it to the official port tree, I am testing it (install, upgrade, etc.). If you feel like you want to test it too, here are the instructions.

    Installing NodeBB

    In order to install NodeBB using pkg(8), you need to add the nodebb repository (my repository, not an official NodeBB repository as shown by the url). For this, create a nodebb.conf file in /usr/local/etc/pkg/repos/ (create this folder if it does not exist) with the following content :

    nodebb: {
      url: "pkg+https://pkg.hukadan.org/${ABI}",
      mirror_type: "srv",
      signature_type  : "PUBKEY",
      pubkey: "/usr/local/etc/ssl/certs/pkg.cert",
      enabled: yes
    }
    
    FreeBSD: {
      enabled: yes
    }
    

    Next you need to copy the public key of the nodebb repository into /usr/local/etc/ssl/certs/(create this folder if it does not exist). You can find the public key here. I will try to rebuild this repo once or twice a week.

    Then, update the repository database and install NodeBB :

    % pkg update
    % pkg install www/nodebb-devel
    

    It will not install any database so you will have to choose yours, for instance redis with pkg install databases/redis.

    For the ones who want to use the ports(7) instead of pkg(8), here we go.

    Launch NodeBB

    First, launch your database with service redis onestart. Once it is done, you can launch NodeBB using the command service nodebb onestart. You can make it start at boot like any other services by adding the following lines in the /etc/rc.conf:

    redis_enable=YES
    nodebb_enable=YES
    

    The ordering does not matter. These two lines will make sure that both services are started at boot. Once these lines added use start instead of onestart.

    Misc

    All the commands you use with the nodebb $arguments are available without modifications using service nodebb $arguments. They work in exactly the same way except for service nodebb upgrade that only update database schema.

    NodeBB will be installed in the /usr/local/www/nodebb folder and will run under the unprivileged nodebb user.

    For the one that test it, report any problem (or propose improvements) with the package (not NodeBB itself) here :
    https://github.com/Hukadan/nodebb-devel-port/issues

    Thank you for your participation.



  • That was easier that I thought.

    Installation had a little glitch, when creating user 'nodebb' and 'redis, i.e.:

    "pw: user 'redis' disappeared during update"
    

    which I fixed with:

    pwd_mkdb /etc/master.passwd
    

    I have now NodeBB v1.2.0 installed on a dedicated server, for now served from port 4567.

    Install time: less than 10 minutes.

    Thank you!



  • It seems I am unable to pull in plugins, as nodebb does not find npm.

    Command failed: /bin/sh -c npm install nodebb-plugin-2factor@2.1.0 /bin/sh: npm: not found
    

    But npm is installed of course:

    root@fc:~ # whereis npm
    npm: /usr/local/bin/npm /usr/local/lib/node_modules/npm/man/man1/npm.1.gz
    
    root@fc:~ # npm --version
    2.15.6
    

    This is if I try to install npm:

    root@fc:~ # pkg install npm
    Updating nodebb repository catalogue...
    nodebb repository is up-to-date.
    Updating FreeBSD repository catalogue...
    FreeBSD repository is up-to-date.
    All repositories are up-to-date.
    The following 3 package(s) will be affected (of 0 checked):
    
    New packages to be INSTALLED:
    	npm: 3.9.2 [FreeBSD]
    	node: 6.7.0 [FreeBSD]
    	c-ares: 1.11.0 [FreeBSD]
    
    Number of packages to be installed: 3
    
    The process will require 26 MiB more space.
    6 MiB to be downloaded.
    
    Proceed with this action? [y/N]: y
    Fetching npm-3.9.2.txz: 100%    2 MiB   2.2MB/s    00:01
    Fetching node-6.7.0.txz: 100%    4 MiB   3.8MB/s    00:01
    Fetching c-ares-1.11.0.txz: 100%  118 KiB 120.8kB/s    00:01
    Checking integrity... done (2 conflicting)
      - npm-3.9.2 [FreeBSD] conflicts with npm2-2.15.6 [installed] on /usr/local/bin/npm
      - node-6.7.0 [FreeBSD] conflicts with node4-4.6.0 [installed] on /usr/local/bin/node
    Checking integrity... done (0 conflicting)
    Conflicts with the existing packages have been found.
    One more solver iteration is needed to resolve them.
    The following 6 package(s) will be affected (of 0 checked):
    
    Installed packages to be REMOVED:
    	node4-4.6.0
    	nodebb-devel-1.2.0
    	npm2-2.15.6
    
    New packages to be INSTALLED:
    	c-ares: 1.11.0 [FreeBSD]
    	node: 6.7.0 [FreeBSD]
    	npm: 3.9.2 [FreeBSD]
    
    Number of packages to be removed: 3
    Number of packages to be installed: 3
    
    The operation will free 64 MiB.
    
    Proceed with this action? [y/N]: n

  • FreeBSD/OpenBSD

    Hi,

    Sorry for that, while cleaning a bit the rc(8) script, I accidentally removed the modified PATH. It is fixed now. Just run pkg upgrade. Concerning redis, I did not encounter the problem but apparently it is not the first time it happens : https://forums.freebsd.org/threads/30304/.



  • Thank you, I ran pkg update && pkg upgrade and service nodebb restart and now nodebb is able to install plugins.

    The redis issue seems to be more a pkg related issue. Searching around, it seems it does happen sometimes, and pwd_mkdb /etc/master.passwd fixes it.

    Thank you once again, this is a great service.


Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.